comparison src/regexp_nfa.c @ 32489:d6055989fa27 v9.0.1576

patch 9.0.1576: users may not know what to do with an internal error Commit: https://github.com/vim/vim/commit/097c5370ea8abab17ceb0f3bcd74f57b1655c7f7 Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 24 21:02:24 2023 +0100 patch 9.0.1576: users may not know what to do with an internal error Problem: Users may not know what to do with an internal error. Solution: Add a translated message with instructions.
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 May 2023 22:15:06 +0200
parents 2ed95122d59c
children bb5458706799
comparison
equal deleted inserted replaced
32488:dab4184aaff9 32489:d6055989fa27
1399 { 1399 {
1400 semsg(_(e_nfa_regexp_invalid_character_class_nr), c); 1400 semsg(_(e_nfa_regexp_invalid_character_class_nr), c);
1401 rc_did_emsg = TRUE; 1401 rc_did_emsg = TRUE;
1402 return FAIL; 1402 return FAIL;
1403 } 1403 }
1404 siemsg("INTERNAL: Unknown character class char: %d", c); 1404 siemsg("Unknown character class char: %d", c);
1405 return FAIL; 1405 return FAIL;
1406 } 1406 }
1407 1407
1408 // When '.' is followed by a composing char ignore the dot, so that 1408 // When '.' is followed by a composing char ignore the dot, so that
1409 // the composing char is matched here. 1409 // the composing char is matched here.
6903 { 6903 {
6904 int c = t->state->c; 6904 int c = t->state->c;
6905 6905
6906 #ifdef DEBUG 6906 #ifdef DEBUG
6907 if (c < 0) 6907 if (c < 0)
6908 siemsg("INTERNAL: Negative state char: %ld", (long)c); 6908 siemsg("Negative state char: %ld", (long)c);
6909 #endif 6909 #endif
6910 result = (c == curc); 6910 result = (c == curc);
6911 6911
6912 if (!result && rex.reg_ic) 6912 if (!result && rex.reg_ic)
6913 result = MB_CASEFOLD(c) == MB_CASEFOLD(curc); 6913 result = MB_CASEFOLD(c) == MB_CASEFOLD(curc);
7194 #ifdef ENABLE_LOG 7194 #ifdef ENABLE_LOG
7195 f = fopen(NFA_REGEXP_RUN_LOG, "a"); 7195 f = fopen(NFA_REGEXP_RUN_LOG, "a");
7196 if (f != NULL) 7196 if (f != NULL)
7197 { 7197 {
7198 fprintf(f, "\n\n\t=======================================================\n"); 7198 fprintf(f, "\n\n\t=======================================================\n");
7199 #ifdef DEBUG 7199 # ifdef DEBUG
7200 fprintf(f, "\tRegexp is \"%s\"\n", nfa_regengine.expr); 7200 fprintf(f, "\tRegexp is \"%s\"\n", nfa_regengine.expr);
7201 #endif 7201 # endif
7202 fprintf(f, "\tInput text is \"%s\" \n", rex.input); 7202 fprintf(f, "\tInput text is \"%s\" \n", rex.input);
7203 fprintf(f, "\t=======================================================\n\n"); 7203 fprintf(f, "\t=======================================================\n\n");
7204 nfa_print_state(f, start); 7204 nfa_print_state(f, start);
7205 fprintf(f, "\n\n"); 7205 fprintf(f, "\n\n");
7206 fclose(f); 7206 fclose(f);