comparison src/quickfix.c @ 13821:98274127d675 v8.0.1782

patch 8.0.1782: no simple way to label quickfix entries commit https://github.com/vim/vim/commit/d76ce852668635d81778cedacc2d3f021ed4e475 Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 1 15:02:04 2018 +0200 patch 8.0.1782: no simple way to label quickfix entries Problem: No simple way to label quickfix entries. Solution: Add the "module" item, to be used instead of the file name for display purposes. (Martin Szamotulski, closes #1757)
author Christian Brabandt <cb@256bit.org>
date Tue, 01 May 2018 15:15:07 +0200
parents 31bb8e1f7625
children 1282a54c1f5a
comparison
equal deleted inserted replaced
13820:2e78af0dc866 13821:98274127d675
31 qfline_T *qf_prev; /* pointer to previous error in the list */ 31 qfline_T *qf_prev; /* pointer to previous error in the list */
32 linenr_T qf_lnum; /* line number where the error occurred */ 32 linenr_T qf_lnum; /* line number where the error occurred */
33 int qf_fnum; /* file number for the line */ 33 int qf_fnum; /* file number for the line */
34 int qf_col; /* column where the error occurred */ 34 int qf_col; /* column where the error occurred */
35 int qf_nr; /* error number */ 35 int qf_nr; /* error number */
36 char_u *qf_module; /* module name for this error */
36 char_u *qf_pattern; /* search pattern for the error */ 37 char_u *qf_pattern; /* search pattern for the error */
37 char_u *qf_text; /* description of the error */ 38 char_u *qf_text; /* description of the error */
38 char_u qf_viscol; /* set to TRUE if qf_col is screen column */ 39 char_u qf_viscol; /* set to TRUE if qf_col is screen column */
39 char_u qf_cleared; /* set to TRUE if line has been deleted */ 40 char_u qf_cleared; /* set to TRUE if line has been deleted */
40 char_u qf_type; /* type of the error (mostly 'E'); 1 for 41 char_u qf_type; /* type of the error (mostly 'E'); 1 for
99 }; 100 };
100 101
101 static qf_info_T ql_info; /* global quickfix list */ 102 static qf_info_T ql_info; /* global quickfix list */
102 static int_u last_qf_id = 0; /* Last used quickfix list id */ 103 static int_u last_qf_id = 0; /* Last used quickfix list id */
103 104
104 #define FMT_PATTERNS 10 /* maximum number of % recognized */ 105 #define FMT_PATTERNS 11 /* maximum number of % recognized */
105 106
106 /* 107 /*
107 * Structure used to hold the info of one part of 'errorformat' 108 * Structure used to hold the info of one part of 'errorformat'
108 */ 109 */
109 typedef struct efm_S efm_T; 110 typedef struct efm_S efm_T;
133 134
134 static efm_T *fmt_start = NULL; /* cached across qf_parse_line() calls */ 135 static efm_T *fmt_start = NULL; /* cached across qf_parse_line() calls */
135 136
136 static int qf_init_ext(qf_info_T *qi, int qf_idx, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast, char_u *qf_title, char_u *enc); 137 static int qf_init_ext(qf_info_T *qi, int qf_idx, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast, char_u *qf_title, char_u *enc);
137 static void qf_new_list(qf_info_T *qi, char_u *qf_title); 138 static void qf_new_list(qf_info_T *qi, char_u *qf_title);
138 static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid); 139 static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname, char_u *module, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid);
140 static qf_info_T *ll_new_list(void);
139 static void qf_free(qf_info_T *qi, int idx); 141 static void qf_free(qf_info_T *qi, int idx);
140 static char_u *qf_types(int, int); 142 static char_u *qf_types(int, int);
141 static int qf_get_fnum(qf_info_T *qi, int qf_idx, char_u *, char_u *); 143 static int qf_get_fnum(qf_info_T *qi, int qf_idx, char_u *, char_u *);
142 static char_u *qf_push_dir(char_u *, struct dir_stack_T **, int is_file_stack); 144 static char_u *qf_push_dir(char_u *, struct dir_stack_T **, int is_file_stack);
143 static char_u *qf_pop_dir(struct dir_stack_T **); 145 static char_u *qf_pop_dir(struct dir_stack_T **);
219 {'t', "."}, 221 {'t', "."},
220 {'m', ".\\+"}, 222 {'m', ".\\+"},
221 {'r', ".*"}, 223 {'r', ".*"},
222 {'p', "[- .]*"}, 224 {'p', "[- .]*"},
223 {'v', "\\d\\+"}, 225 {'v', "\\d\\+"},
224 {'s', ".\\+"} 226 {'s', ".\\+"},
227 {'o', ".\\+"}
225 }; 228 };
226 229
227 /* 230 /*
228 * Converts a 'errorformat' string to regular expression pattern 231 * Converts a 'errorformat' string to regular expression pattern
229 */ 232 */
807 return QF_OK; 810 return QF_OK;
808 } 811 }
809 812
810 typedef struct { 813 typedef struct {
811 char_u *namebuf; 814 char_u *namebuf;
815 char_u *module;
812 char_u *errmsg; 816 char_u *errmsg;
813 int errmsglen; 817 int errmsglen;
814 long lnum; 818 long lnum;
815 int col; 819 int col;
816 char_u use_viscol; 820 char_u use_viscol;
866 870
867 idx = fmt_ptr->prefix; 871 idx = fmt_ptr->prefix;
868 if (qfl->qf_multiscan && vim_strchr((char_u *)"OPQ", idx) == NULL) 872 if (qfl->qf_multiscan && vim_strchr((char_u *)"OPQ", idx) == NULL)
869 continue; 873 continue;
870 fields->namebuf[0] = NUL; 874 fields->namebuf[0] = NUL;
875 fields->module[0] = NUL;
871 fields->pattern[0] = NUL; 876 fields->pattern[0] = NUL;
872 if (!qfl->qf_multiscan) 877 if (!qfl->qf_multiscan)
873 fields->errmsg[0] = NUL; 878 fields->errmsg[0] = NUL;
874 fields->lnum = 0; 879 fields->lnum = 0;
875 fields->col = 0; 880 fields->col = 0;
1006 STRNCAT(fields->pattern, regmatch.startp[i], len); 1011 STRNCAT(fields->pattern, regmatch.startp[i], len);
1007 fields->pattern[len + 3] = '\\'; 1012 fields->pattern[len + 3] = '\\';
1008 fields->pattern[len + 4] = '$'; 1013 fields->pattern[len + 4] = '$';
1009 fields->pattern[len + 5] = NUL; 1014 fields->pattern[len + 5] = NUL;
1010 } 1015 }
1016 if ((i = (int)fmt_ptr->addr[10]) > 0) /* %o */
1017 {
1018 if (regmatch.startp[i] == NULL)
1019 continue;
1020 len = (int)(regmatch.endp[i] - regmatch.startp[i]);
1021 if (len > CMDBUFFSIZE)
1022 len = CMDBUFFSIZE;
1023 STRNCAT(fields->module, regmatch.startp[i], len);
1024 }
1011 break; 1025 break;
1012 } 1026 }
1013 } 1027 }
1014 qfl->qf_multiscan = FALSE; 1028 qfl->qf_multiscan = FALSE;
1015 1029
1179 state.vc.vc_type = CONV_NONE; 1193 state.vc.vc_type = CONV_NONE;
1180 if (enc != NULL && *enc != NUL) 1194 if (enc != NULL && *enc != NUL)
1181 convert_setup(&state.vc, enc, p_enc); 1195 convert_setup(&state.vc, enc, p_enc);
1182 #endif 1196 #endif
1183 fields.namebuf = alloc_id(CMDBUFFSIZE + 1, aid_qf_namebuf); 1197 fields.namebuf = alloc_id(CMDBUFFSIZE + 1, aid_qf_namebuf);
1198 fields.module = alloc_id(CMDBUFFSIZE + 1, aid_qf_module);
1184 fields.errmsglen = CMDBUFFSIZE + 1; 1199 fields.errmsglen = CMDBUFFSIZE + 1;
1185 fields.errmsg = alloc_id(fields.errmsglen, aid_qf_errmsg); 1200 fields.errmsg = alloc_id(fields.errmsglen, aid_qf_errmsg);
1186 fields.pattern = alloc_id(CMDBUFFSIZE + 1, aid_qf_pattern); 1201 fields.pattern = alloc_id(CMDBUFFSIZE + 1, aid_qf_pattern);
1187 if (fields.namebuf == NULL || fields.errmsg == NULL 1202 if (fields.namebuf == NULL || fields.errmsg == NULL
1188 || fields.pattern == NULL) 1203 || fields.pattern == NULL || fields.module == NULL)
1189 goto qf_init_end; 1204 goto qf_init_end;
1190 1205
1191 if (efile != NULL && (state.fd = mch_fopen((char *)efile, "r")) == NULL) 1206 if (efile != NULL && (state.fd = mch_fopen((char *)efile, "r")) == NULL)
1192 { 1207 {
1193 EMSG2(_(e_openerrf), efile); 1208 EMSG2(_(e_openerrf), efile);
1280 qfl->qf_directory, 1295 qfl->qf_directory,
1281 (*fields.namebuf || qfl->qf_directory != NULL) 1296 (*fields.namebuf || qfl->qf_directory != NULL)
1282 ? fields.namebuf 1297 ? fields.namebuf
1283 : ((qfl->qf_currfile != NULL && fields.valid) 1298 : ((qfl->qf_currfile != NULL && fields.valid)
1284 ? qfl->qf_currfile : (char_u *)NULL), 1299 ? qfl->qf_currfile : (char_u *)NULL),
1300 fields.module,
1285 0, 1301 0,
1286 fields.errmsg, 1302 fields.errmsg,
1287 fields.lnum, 1303 fields.lnum,
1288 fields.col, 1304 fields.col,
1289 fields.use_viscol, 1305 fields.use_viscol,
1325 } 1341 }
1326 qf_init_end: 1342 qf_init_end:
1327 if (state.fd != NULL) 1343 if (state.fd != NULL)
1328 fclose(state.fd); 1344 fclose(state.fd);
1329 vim_free(fields.namebuf); 1345 vim_free(fields.namebuf);
1346 vim_free(fields.module);
1330 vim_free(fields.errmsg); 1347 vim_free(fields.errmsg);
1331 vim_free(fields.pattern); 1348 vim_free(fields.pattern);
1332 vim_free(state.growbuf); 1349 vim_free(state.growbuf);
1333 1350
1334 if (qf_idx == qi->qf_curlist) 1351 if (qf_idx == qi->qf_curlist)
1442 qf_add_entry( 1459 qf_add_entry(
1443 qf_info_T *qi, /* quickfix list */ 1460 qf_info_T *qi, /* quickfix list */
1444 int qf_idx, /* list index */ 1461 int qf_idx, /* list index */
1445 char_u *dir, /* optional directory name */ 1462 char_u *dir, /* optional directory name */
1446 char_u *fname, /* file name or NULL */ 1463 char_u *fname, /* file name or NULL */
1464 char_u *module, /* module name or NULL */
1447 int bufnum, /* buffer number or zero */ 1465 int bufnum, /* buffer number or zero */
1448 char_u *mesg, /* message */ 1466 char_u *mesg, /* message */
1449 long lnum, /* line number */ 1467 long lnum, /* line number */
1450 int col, /* column */ 1468 int col, /* column */
1451 int vis_col, /* using visual column */ 1469 int vis_col, /* using visual column */
1481 if (pattern == NULL || *pattern == NUL) 1499 if (pattern == NULL || *pattern == NUL)
1482 qfp->qf_pattern = NULL; 1500 qfp->qf_pattern = NULL;
1483 else if ((qfp->qf_pattern = vim_strsave(pattern)) == NULL) 1501 else if ((qfp->qf_pattern = vim_strsave(pattern)) == NULL)
1484 { 1502 {
1485 vim_free(qfp->qf_text); 1503 vim_free(qfp->qf_text);
1504 vim_free(qfp);
1505 return FAIL;
1506 }
1507 if (module == NULL || *module == NUL)
1508 qfp->qf_module = NULL;
1509 else if ((qfp->qf_module = vim_strsave(module)) == NULL)
1510 {
1511 vim_free(qfp->qf_text);
1512 vim_free(qfp->qf_pattern);
1486 vim_free(qfp); 1513 vim_free(qfp);
1487 return FAIL; 1514 return FAIL;
1488 } 1515 }
1489 qfp->qf_nr = nr; 1516 qfp->qf_nr = nr;
1490 if (type != 1 && !vim_isprintc(type)) /* only printable chars allowed */ 1517 if (type != 1 && !vim_isprintc(type)) /* only printable chars allowed */
1633 { 1660 {
1634 if (qf_add_entry(to->w_llist, 1661 if (qf_add_entry(to->w_llist,
1635 to->w_llist->qf_curlist, 1662 to->w_llist->qf_curlist,
1636 NULL, 1663 NULL,
1637 NULL, 1664 NULL,
1665 from_qfp->qf_module,
1638 0, 1666 0,
1639 from_qfp->qf_text, 1667 from_qfp->qf_text,
1640 from_qfp->qf_lnum, 1668 from_qfp->qf_lnum,
1641 from_qfp->qf_col, 1669 from_qfp->qf_col,
1642 from_qfp->qf_viscol, 1670 from_qfp->qf_viscol,
2763 msg_putchar('\n'); 2791 msg_putchar('\n');
2764 if (got_int) 2792 if (got_int)
2765 break; 2793 break;
2766 2794
2767 fname = NULL; 2795 fname = NULL;
2768 if (qfp->qf_fnum != 0 2796 if (qfp->qf_module != NULL && *qfp->qf_module != NUL)
2769 && (buf = buflist_findnr(qfp->qf_fnum)) != NULL) 2797 vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", i, (char *)qfp->qf_module);
2770 { 2798 else {
2771 fname = buf->b_fname; 2799 if (qfp->qf_fnum != 0
2772 if (qfp->qf_type == 1) /* :helpgrep */ 2800 && (buf = buflist_findnr(qfp->qf_fnum)) != NULL)
2773 fname = gettail(fname); 2801 {
2802 fname = buf->b_fname;
2803 if (qfp->qf_type == 1) /* :helpgrep */
2804 fname = gettail(fname);
2805 }
2806 if (fname == NULL)
2807 sprintf((char *)IObuff, "%2d", i);
2808 else
2809 vim_snprintf((char *)IObuff, IOSIZE, "%2d %s",
2810 i, (char *)fname);
2774 } 2811 }
2775 if (fname == NULL)
2776 sprintf((char *)IObuff, "%2d", i);
2777 else
2778 vim_snprintf((char *)IObuff, IOSIZE, "%2d %s",
2779 i, (char *)fname);
2780 msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index 2812 msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index
2781 ? HL_ATTR(HLF_QFL) : qfFileAttr); 2813 ? HL_ATTR(HLF_QFL) : qfFileAttr);
2782 2814
2783 if (qfp->qf_lnum != 0) 2815 if (qfp->qf_lnum != 0)
2784 msg_puts_attr((char_u *)":", qfSepAttr); 2816 msg_puts_attr((char_u *)":", qfSepAttr);
2955 { 2987 {
2956 qfp = qfl->qf_start; 2988 qfp = qfl->qf_start;
2957 qfpnext = qfp->qf_next; 2989 qfpnext = qfp->qf_next;
2958 if (!stop) 2990 if (!stop)
2959 { 2991 {
2992 vim_free(qfp->qf_module);
2960 vim_free(qfp->qf_text); 2993 vim_free(qfp->qf_text);
2994 vim_free(qfp->qf_pattern);
2961 stop = (qfp == qfpnext); 2995 stop = (qfp == qfpnext);
2962 vim_free(qfp->qf_pattern);
2963 vim_free(qfp); 2996 vim_free(qfp);
2964 if (stop) 2997 if (stop)
2965 /* Somehow qf_count may have an incorrect value, set it to 1 2998 /* Somehow qf_count may have an incorrect value, set it to 1
2966 * to avoid crashing when it's wrong. 2999 * to avoid crashing when it's wrong.
2967 * TODO: Avoid qf_count being incorrect. */ 3000 * TODO: Avoid qf_count being incorrect. */
3560 qfp = old_last->qf_next; 3593 qfp = old_last->qf_next;
3561 lnum = buf->b_ml.ml_line_count; 3594 lnum = buf->b_ml.ml_line_count;
3562 } 3595 }
3563 while (lnum < qi->qf_lists[qi->qf_curlist].qf_count) 3596 while (lnum < qi->qf_lists[qi->qf_curlist].qf_count)
3564 { 3597 {
3565 if (qfp->qf_fnum != 0 3598 if (qfp->qf_module != NULL)
3599 {
3600 STRCPY(IObuff, qfp->qf_module);
3601 len = (int)STRLEN(IObuff);
3602 }
3603 else if (qfp->qf_fnum != 0
3566 && (errbuf = buflist_findnr(qfp->qf_fnum)) != NULL 3604 && (errbuf = buflist_findnr(qfp->qf_fnum)) != NULL
3567 && errbuf->b_fname != NULL) 3605 && errbuf->b_fname != NULL)
3568 { 3606 {
3569 if (qfp->qf_type == 1) /* :helpgrep */ 3607 if (qfp->qf_type == 1) /* :helpgrep */
3570 STRCPY(IObuff, gettail(errbuf->b_fname)); 3608 STRCPY(IObuff, gettail(errbuf->b_fname));
4365 * buffer will be wiped out below. */ 4403 * buffer will be wiped out below. */
4366 if (qf_add_entry(qi, 4404 if (qf_add_entry(qi,
4367 qi->qf_curlist, 4405 qi->qf_curlist,
4368 NULL, /* dir */ 4406 NULL, /* dir */
4369 fname, 4407 fname,
4408 NULL,
4370 duplicate_name ? 0 : buf->b_fnum, 4409 duplicate_name ? 0 : buf->b_fnum,
4371 ml_get_buf(buf, 4410 ml_get_buf(buf,
4372 regmatch->startpos[0].lnum + lnum, FALSE), 4411 regmatch->startpos[0].lnum + lnum, FALSE),
4373 regmatch->startpos[0].lnum + lnum, 4412 regmatch->startpos[0].lnum + lnum,
4374 regmatch->startpos[0].col + 1, 4413 regmatch->startpos[0].col + 1,
4932 if ( dict_add_nr_str(dict, "bufnr", (long)bufnum, NULL) == FAIL 4971 if ( dict_add_nr_str(dict, "bufnr", (long)bufnum, NULL) == FAIL
4933 || dict_add_nr_str(dict, "lnum", (long)qfp->qf_lnum, NULL) == FAIL 4972 || dict_add_nr_str(dict, "lnum", (long)qfp->qf_lnum, NULL) == FAIL
4934 || dict_add_nr_str(dict, "col", (long)qfp->qf_col, NULL) == FAIL 4973 || dict_add_nr_str(dict, "col", (long)qfp->qf_col, NULL) == FAIL
4935 || dict_add_nr_str(dict, "vcol", (long)qfp->qf_viscol, NULL) == FAIL 4974 || dict_add_nr_str(dict, "vcol", (long)qfp->qf_viscol, NULL) == FAIL
4936 || dict_add_nr_str(dict, "nr", (long)qfp->qf_nr, NULL) == FAIL 4975 || dict_add_nr_str(dict, "nr", (long)qfp->qf_nr, NULL) == FAIL
4976 || dict_add_nr_str(dict, "module", 0L,
4977 qfp->qf_module == NULL ? (char_u *)"" : qfp->qf_module) == FAIL
4937 || dict_add_nr_str(dict, "pattern", 0L, 4978 || dict_add_nr_str(dict, "pattern", 0L,
4938 qfp->qf_pattern == NULL ? (char_u *)"" : qfp->qf_pattern) == FAIL 4979 qfp->qf_pattern == NULL ? (char_u *)"" : qfp->qf_pattern) == FAIL
4939 || dict_add_nr_str(dict, "text", 0L, 4980 || dict_add_nr_str(dict, "text", 0L,
4940 qfp->qf_text == NULL ? (char_u *)"" : qfp->qf_text) == FAIL 4981 qfp->qf_text == NULL ? (char_u *)"" : qfp->qf_text) == FAIL
4941 || dict_add_nr_str(dict, "type", 0L, buf) == FAIL 4982 || dict_add_nr_str(dict, "type", 0L, buf) == FAIL
5310 char_u *title, 5351 char_u *title,
5311 int action) 5352 int action)
5312 { 5353 {
5313 listitem_T *li; 5354 listitem_T *li;
5314 dict_T *d; 5355 dict_T *d;
5315 char_u *filename, *pattern, *text, *type; 5356 char_u *filename, *module, *pattern, *text, *type;
5316 int bufnum; 5357 int bufnum;
5317 long lnum; 5358 long lnum;
5318 int col, nr; 5359 int col, nr;
5319 int vcol; 5360 int vcol;
5320 qfline_T *old_last = NULL; 5361 qfline_T *old_last = NULL;
5345 d = li->li_tv.vval.v_dict; 5386 d = li->li_tv.vval.v_dict;
5346 if (d == NULL) 5387 if (d == NULL)
5347 continue; 5388 continue;
5348 5389
5349 filename = get_dict_string(d, (char_u *)"filename", TRUE); 5390 filename = get_dict_string(d, (char_u *)"filename", TRUE);
5391 module = get_dict_string(d, (char_u *)"module", TRUE);
5350 bufnum = (int)get_dict_number(d, (char_u *)"bufnr"); 5392 bufnum = (int)get_dict_number(d, (char_u *)"bufnr");
5351 lnum = (int)get_dict_number(d, (char_u *)"lnum"); 5393 lnum = (int)get_dict_number(d, (char_u *)"lnum");
5352 col = (int)get_dict_number(d, (char_u *)"col"); 5394 col = (int)get_dict_number(d, (char_u *)"col");
5353 vcol = (int)get_dict_number(d, (char_u *)"vcol"); 5395 vcol = (int)get_dict_number(d, (char_u *)"vcol");
5354 nr = (int)get_dict_number(d, (char_u *)"nr"); 5396 nr = (int)get_dict_number(d, (char_u *)"nr");
5381 5423
5382 status = qf_add_entry(qi, 5424 status = qf_add_entry(qi,
5383 qf_idx, 5425 qf_idx,
5384 NULL, /* dir */ 5426 NULL, /* dir */
5385 filename, 5427 filename,
5428 module,
5386 bufnum, 5429 bufnum,
5387 text, 5430 text,
5388 lnum, 5431 lnum,
5389 col, 5432 col,
5390 vcol, /* vis_col */ 5433 vcol, /* vis_col */
5392 nr, 5435 nr,
5393 type == NULL ? NUL : *type, 5436 type == NULL ? NUL : *type,
5394 valid); 5437 valid);
5395 5438
5396 vim_free(filename); 5439 vim_free(filename);
5440 vim_free(module);
5397 vim_free(pattern); 5441 vim_free(pattern);
5398 vim_free(text); 5442 vim_free(text);
5399 vim_free(type); 5443 vim_free(type);
5400 5444
5401 if (status == FAIL) 5445 if (status == FAIL)
6038 6082
6039 if (qf_add_entry(qi, 6083 if (qf_add_entry(qi,
6040 qi->qf_curlist, 6084 qi->qf_curlist,
6041 NULL, /* dir */ 6085 NULL, /* dir */
6042 fname, 6086 fname,
6087 NULL,
6043 0, 6088 0,
6044 line, 6089 line,
6045 lnum, 6090 lnum,
6046 (int)(p_regmatch->startp[0] - line) 6091 (int)(p_regmatch->startp[0] - line)
6047 + 1, /* col */ 6092 + 1, /* col */
6102 { 6147 {
6103 #ifdef FEAT_MULTI_LANG 6148 #ifdef FEAT_MULTI_LANG
6104 /* Skip files for a different language. */ 6149 /* Skip files for a different language. */
6105 if (lang != NULL 6150 if (lang != NULL
6106 && STRNICMP(lang, fnames[fi] 6151 && STRNICMP(lang, fnames[fi]
6107 + STRLEN(fnames[fi]) - 3, 2) != 0 6152 + STRLEN(fnames[fi]) - 3, 2) != 0
6108 && !(STRNICMP(lang, "en", 2) == 0 6153 && !(STRNICMP(lang, "en", 2) == 0
6109 && STRNICMP("txt", fnames[fi] 6154 && STRNICMP("txt", fnames[fi]
6110 + STRLEN(fnames[fi]) - 3, 3) == 0)) 6155 + STRLEN(fnames[fi]) - 3, 3) == 0))
6111 continue; 6156 continue;
6112 #endif 6157 #endif