From: K.Kosako Date: Tue, 10 Apr 2018 00:16:01 +0000 (+0900) Subject: remove C++ style comments X-Git-Tag: v6.8.2^2~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd97c04be41c126932a8ae3478b673bd0c10abf2;p=onig remove C++ style comments --- diff --git a/src/regcomp.c b/src/regcomp.c index 45d4acf..f953ed1 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -2450,7 +2450,6 @@ is_exclusive(Node* x, Node* y, regex_t* reg) if (NODE_STRING_LEN(x) == 0) break; - //c = *(xs->s); switch (ytype) { case NODE_CTYPE: switch (CTYPE_(y)->ctype) { @@ -2758,7 +2757,7 @@ tree_min_len(Node* node, ScanEnv* env) len = en->min_len; else { if (NODE_IS_MARK1(node)) - len = 0; // recursive + len = 0; /* recursive */ else { NODE_STATUS_ADD(node, NST_MARK1); len = tree_min_len(NODE_BODY(node), env); diff --git a/src/regenc.h b/src/regenc.h index ba659db..ae7a774 100644 --- a/src/regenc.h +++ b/src/regenc.h @@ -160,7 +160,7 @@ extern int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UCh extern int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype)); extern struct PropertyNameCtype* euc_jp_lookup_property_name P_((register const char *str, register unsigned int len)); extern struct PropertyNameCtype* sjis_lookup_property_name P_((register const char *str, register unsigned int len)); -//extern const struct PropertyNameCtype* unicode_lookup_property_name P_((register const char *str, register unsigned int len)); +/* extern const struct PropertyNameCtype* unicode_lookup_property_name P_((register const char *str, register unsigned int len)); */ /* in enc/unicode.c */ extern int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype)); diff --git a/src/regexec.c b/src/regexec.c index 3e18a74..24a918c 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -569,7 +569,7 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp, UChar* start, #ifdef USE_CALLOUT case OP_CALLOUT_CONTENTS: { - GET_MEMNUM_INC(mem, bp); // number + GET_MEMNUM_INC(mem, bp); /* number */ fprintf(f, ":%d", mem); } break; @@ -578,8 +578,8 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp, UChar* start, { int id; - GET_MEMNUM_INC(id, bp); // id - GET_MEMNUM_INC(mem, bp); // number + GET_MEMNUM_INC(id, bp); /* id */ + GET_MEMNUM_INC(mem, bp); /* number */ fprintf(f, ":%d:%d", id, mem); } @@ -1019,7 +1019,7 @@ struct OnigCalloutArgsStruct { const OnigUChar* string_end; const OnigUChar* start; const OnigUChar* right_range; - const OnigUChar* current; // current matching position + const OnigUChar* current; /* current matching position */ unsigned long retry_in_match_counter; /* invisible to users */ @@ -1150,7 +1150,7 @@ onig_get_retry_limit_in_match(void) #ifdef USE_RETRY_LIMIT_IN_MATCH return RetryLimitInMatch; #else - //return ONIG_NO_SUPPORT_CONFIG; + /* return ONIG_NO_SUPPORT_CONFIG; */ return 0; #endif } @@ -2384,7 +2384,6 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, retry_limit_in_match = msa->retry_limit_in_match; #endif - //n = reg->num_repeat + reg->num_mem * 2; pop_level = reg->stack_pop_level; num_mem = reg->num_mem; STACK_INIT(INIT_MATCH_STACK_SIZE); @@ -3032,7 +3031,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case OP_WORD_BOUNDARY: SOP_IN(OP_WORD_BOUNDARY); { ModeType mode; - GET_MODE_INC(mode, p); // ascii_mode + GET_MODE_INC(mode, p); /* ascii_mode */ if (ON_STR_BEGIN(s)) { DATA_ENSURE(1); @@ -3056,7 +3055,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case OP_NO_WORD_BOUNDARY: SOP_IN(OP_NO_WORD_BOUNDARY); { ModeType mode; - GET_MODE_INC(mode, p); // ascii_mode + GET_MODE_INC(mode, p); /* ascii_mode */ if (ON_STR_BEGIN(s)) { if (DATA_ENSURE_CHECK1 && IS_MBC_WORD_ASCII_MODE(encode, s, end, mode)) @@ -3080,7 +3079,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case OP_WORD_BEGIN: SOP_IN(OP_WORD_BEGIN); { ModeType mode; - GET_MODE_INC(mode, p); // ascii_mode + GET_MODE_INC(mode, p); /* ascii_mode */ if (DATA_ENSURE_CHECK1 && IS_MBC_WORD_ASCII_MODE(encode, s, end, mode)) { if (ON_STR_BEGIN(s) || !IS_MBC_WORD_ASCII_MODE(encode, sprev, end, mode)) { @@ -3095,7 +3094,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case OP_WORD_END: SOP_IN(OP_WORD_END); { ModeType mode; - GET_MODE_INC(mode, p); // ascii_mode + GET_MODE_INC(mode, p); /* ascii_mode */ if (!ON_STR_BEGIN(s) && IS_MBC_WORD_ASCII_MODE(encode, sprev, end, mode)) { if (ON_STR_END(s) || ! IS_MBC_WORD_ASCII_MODE(encode, s, end, mode)) { @@ -3614,8 +3613,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case OP_POP_OUT: SOP_IN(OP_POP_OUT); STACK_POP_ONE; - // for stop backtrack - //CHECK_RETRY_LIMIT_IN_MATCH; + /* for stop backtrack */ + /* CHECK_RETRY_LIMIT_IN_MATCH; */ SOP_OUT; continue; break; diff --git a/src/regparse.c b/src/regparse.c index f96180f..3d49f1a 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -525,7 +525,7 @@ onig_st_insert_strend(hash_table_type* table, const UChar* str_key, typedef struct { OnigEncoding enc; - int type; // callout type: single or not + int type; /* callout type: single or not */ UChar* s; UChar* end; } st_callout_name_key; @@ -1583,7 +1583,7 @@ onig_set_callout_of_name(OnigEncoding enc, OnigCalloutType callout_type, } } - r = id; // return id + r = id; return r; } @@ -2689,7 +2689,7 @@ make_absent_engine(Node** node, int pre_save_right_id, Node* absent, for (i = 0; i < 4; i++) ns[i] = NULL_NODE; ns[1] = absent; - ns[3] = step_one; // for err + ns[3] = step_one; /* for err */ r = node_new_save_gimmick(&ns[0], SAVE_S, env); if (r != 0) goto err; @@ -6589,7 +6589,6 @@ parse_callout_of_contents(Node** np, int cterm, UChar** src, UChar* end, ScanEnv PFETCH_S(c); } else if (c == '>') { /* no needs (default) */ - //in = ONIG_CALLOUT_IN_PROGRESS; if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; PFETCH_S(c); } @@ -6829,7 +6828,7 @@ parse_callout_of_name(Node** np, int cterm, UChar** src, UChar* end, ScanEnv* en OnigEncoding enc = env->enc; UChar* p = *src; - //PFETCH_READY; + /* PFETCH_READY; */ if (PEND) return ONIGERR_INVALID_CALLOUT_PATTERN; node = 0; @@ -7059,12 +7058,12 @@ parse_enclosure(Node** np, OnigToken* tok, int term, UChar** src, UChar* end, if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; - if (PPEEK_IS('|')) { // (?~|generator|absent) + if (PPEEK_IS('|')) { /* (?~|generator|absent) */ PINC; if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; head_bar = 1; - if (PPEEK_IS(')')) { // (?~|) : range clear + if (PPEEK_IS(')')) { /* (?~|) : range clear */ PINC; r = make_range_clear(np, env); if (r != 0) return r; @@ -7089,7 +7088,7 @@ parse_enclosure(Node** np, OnigToken* tok, int term, UChar** src, UChar* end, if (NODE_TYPE(top) != NODE_ALT || IS_NULL(NODE_CDR(top))) { expr = NULL_NODE; is_range_cutter = 1; - //return ONIGERR_INVALID_ABSENT_GROUP_GENERATOR_PATTERN; + /* return ONIGERR_INVALID_ABSENT_GROUP_GENERATOR_PATTERN; */ } else { absent = NODE_CAR(top); @@ -7784,7 +7783,7 @@ parse_exp(Node** np, OnigToken* tok, int term, UChar** src, UChar* end, len = 1; while (1) { if (len >= ONIGENC_MBC_MINLEN(env->enc)) { - if (len == enclen(env->enc, STR_(*np)->s)) {//should not enclen_end() + if (len == enclen(env->enc, STR_(*np)->s)) {/* should not enclen_end() */ r = fetch_token(tok, src, end, env); NODE_STRING_CLEAR_RAW(*np); goto string_end; diff --git a/src/unicode.c b/src/unicode.c index e585937..a8bae66 100644 --- a/src/unicode.c +++ b/src/unicode.c @@ -335,7 +335,7 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc, n++; } } - code = items[0].code[0]; // for multi-code to unfold search. + code = items[0].code[0]; /* for multi-code to unfold search. */ } else if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { OnigCodePoint cs[3][4]; diff --git a/src/utf8.c b/src/utf8.c index 7919e21..22a8db1 100644 --- a/src/utf8.c +++ b/src/utf8.c @@ -29,7 +29,7 @@ #include "regenc.h" -//#define USE_INVALID_CODE_SCHEME +/* #define USE_INVALID_CODE_SCHEME */ #ifdef USE_INVALID_CODE_SCHEME /* virtual codepoint values for invalid encoding byte 0xfe and 0xff */