pavel (06/03/82)
For any given function, ctags produces a line like func_name filename.c ?^func_name(arg1, arg2)$? where the first field is the function name, the second the file in which the definition of that function appears and the third a search command to find the definition. If one has a function whose first line contains a '?', ctags doesn't escape it. For example: min filename.c ?^#define min(a,b) ((a)>(b) ? (b) : (a))$? This confuses vi which takes the imbedded '?' to be the end of the search string. The fix is easy: ----------------------------------- *** ctags.c Wed Apr 14 11:33:38 1982 --- new_ctags.c Wed Jun 2 21:50:00 1982 *************** *** 494,499 for (sp = node->pat; *sp; sp++) if (*sp == '\\') fprintf(outf, "\\\\"); else putc(*sp, outf); fprintf(outf, "%c\n", searchar); --- 494,501 ----- for (sp = node->pat; *sp; sp++) if (*sp == '\\') fprintf(outf, "\\\\"); + else if (*sp == searchar) + fprintf(outf, "\\%c", searchar); else putc(*sp, outf); fprintf(outf, "%c\n", searchar); ------------------------------------ Pavel Curtis Cornell University