comparison src/regexp_nfa.c @ 10540:ea7fbae33285 v8.0.0160

patch 8.0.0160: EMSG() is sometimes used where it should be IEMSG() commit https://github.com/vim/vim/commit/de33011ec623fd562419dede6bf465b5b9881a20 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 8 20:50:52 2017 +0100 patch 8.0.0160: EMSG() is sometimes used where it should be IEMSG() Problem: EMSG() is sometimes used for internal errors. Solution: Change them to IEMSG(). (Dominique Pelle) And a few more.
author Christian Brabandt <cb@256bit.org>
date Sun, 08 Jan 2017 21:00:05 +0100
parents d76ccdacb41e
children c3cc8b2aab6a
comparison
equal deleted inserted replaced
10539:b7add90fec60 10540:ea7fbae33285
1357 { 1357 {
1358 EMSGN(_(e_ill_char_class), c); 1358 EMSGN(_(e_ill_char_class), c);
1359 rc_did_emsg = TRUE; 1359 rc_did_emsg = TRUE;
1360 return FAIL; 1360 return FAIL;
1361 } 1361 }
1362 EMSGN("INTERNAL: Unknown character class char: %ld", c); 1362 IEMSGN("INTERNAL: Unknown character class char: %ld", c);
1363 return FAIL; 1363 return FAIL;
1364 } 1364 }
1365 #ifdef FEAT_MBYTE 1365 #ifdef FEAT_MBYTE
1366 /* When '.' is followed by a composing char ignore the dot, so that 1366 /* When '.' is followed by a composing char ignore the dot, so that
1367 * the composing char is matched here. */ 1367 * the composing char is matched here. */
4923 return OK; 4923 return OK;
4924 break; 4924 break;
4925 4925
4926 default: 4926 default:
4927 /* should not be here :P */ 4927 /* should not be here :P */
4928 EMSGN(_(e_ill_char_class), class); 4928 IEMSGN(_(e_ill_char_class), class);
4929 return FAIL; 4929 return FAIL;
4930 } 4930 }
4931 return FAIL; 4931 return FAIL;
4932 } 4932 }
4933 4933
6686 { 6686 {
6687 int c = t->state->c; 6687 int c = t->state->c;
6688 6688
6689 #ifdef DEBUG 6689 #ifdef DEBUG
6690 if (c < 0) 6690 if (c < 0)
6691 EMSGN("INTERNAL: Negative state char: %ld", c); 6691 IEMSGN("INTERNAL: Negative state char: %ld", c);
6692 #endif 6692 #endif
6693 result = (c == curc); 6693 result = (c == curc);
6694 6694
6695 if (!result && rex.reg_ic) 6695 if (!result && rex.reg_ic)
6696 result = MB_TOLOWER(c) == MB_TOLOWER(curc); 6696 result = MB_TOLOWER(c) == MB_TOLOWER(curc);
7214 postfix = re2post(); 7214 postfix = re2post();
7215 if (postfix == NULL) 7215 if (postfix == NULL)
7216 { 7216 {
7217 /* TODO: only give this error for debugging? */ 7217 /* TODO: only give this error for debugging? */
7218 if (post_ptr >= post_end) 7218 if (post_ptr >= post_end)
7219 EMSGN("Internal error: estimated max number of states insufficient: %ld", post_end - post_start); 7219 IEMSGN("Internal error: estimated max number of states insufficient: %ld", post_end - post_start);
7220 goto fail; /* Cascaded (syntax?) error */ 7220 goto fail; /* Cascaded (syntax?) error */
7221 } 7221 }
7222 7222
7223 /* 7223 /*
7224 * In order to build the NFA, we parse the input regexp twice: 7224 * In order to build the NFA, we parse the input regexp twice: