diff --git a/onig-config.in b/onig-config.in index 57fe3ad..4152e42 100644 --- a/onig-config.in +++ b/onig-config.in @@ -63,7 +63,7 @@ while test $# -gt 0; do echo $show_includedir ;; --libs) - echo -L@libdir@ -lonig + echo -lonig ;; --version) echo $ONIG_VERSION diff --git a/onig-config.in.multilib b/onig-config.in.multilib new file mode 100644 index 0000000..57fe3ad --- /dev/null +++ b/onig-config.in.multilib @@ -0,0 +1,78 @@ +#!/bin/sh +# Copyright (C) 2006 K.Kosako + +ONIG_VERSION=@PACKAGE_VERSION@ + +show_usage() +{ + cat <te.Then; Node* Else = node->te.Else; @@ -1291,8 +1292,7 @@ compile_enclosure_node(EnclosureNode* node, regex_t* reg, ScanEnv* env) else then_len = 0; - jump_len = cond_len + then_len + SIZE_OP_ATOMIC_END; - if (IS_NOT_NULL(Else)) jump_len += SIZE_OP_JUMP; + jump_len = cond_len + then_len + SIZE_OP_ATOMIC_END + SIZE_OP_JUMP; r = add_opcode_rel_addr(reg, OP_PUSH, jump_len); if (r != 0) return r; @@ -1307,9 +1307,19 @@ compile_enclosure_node(EnclosureNode* node, regex_t* reg, ScanEnv* env) } if (IS_NOT_NULL(Else)) { - int else_len = compile_length_tree(Else, reg); - r = add_opcode_rel_addr(reg, OP_JUMP, else_len); - if (r != 0) return r; + else_len = compile_length_tree(Else, reg); + if (else_len < 0) return else_len; + } + else + else_len = 0; + + r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_ATOMIC_END + else_len); + if (r != 0) return r; + + r = add_opcode(reg, OP_ATOMIC_END); + if (r != 0) return r; + + if (IS_NOT_NULL(Else)) { r = compile_tree(Else, reg, env); } }