390 |
/* |
/* |
391 |
* gtop->format & GTAGS_COMPACT |
* gtop->format & GTAGS_COMPACT |
392 |
*/ |
*/ |
393 |
if (split(record, 4, &ptable) != 4) |
if (split(record, 4, &ptable) != 4) { |
394 |
die("illegal format."); |
recover(&ptable); |
395 |
|
die("illegal tag format.\n'%s'", record); |
396 |
|
} |
397 |
line = ptable.part[1].start; |
line = ptable.part[1].start; |
398 |
path = ptable.part[2].start; |
path = ptable.part[2].start; |
399 |
/* |
/* |
443 |
STRBUF *sb = strbuf_open(0); |
STRBUF *sb = strbuf_open(0); |
444 |
STRBUF *ib = strbuf_open(MAXBUFLEN); |
STRBUF *ib = strbuf_open(MAXBUFLEN); |
445 |
STRBUF *sort_command = strbuf_open(0); |
STRBUF *sort_command = strbuf_open(0); |
|
STRBUF *sed_command = strbuf_open(0); |
|
446 |
char *fid; |
char *fid; |
447 |
|
|
448 |
/* |
/* |
454 |
if (!locatestring(strbuf_value(sort_command), ".exe", MATCH_LAST)) |
if (!locatestring(strbuf_value(sort_command), ".exe", MATCH_LAST)) |
455 |
strbuf_puts(sort_command, ".exe"); |
strbuf_puts(sort_command, ".exe"); |
456 |
#endif |
#endif |
|
if (!getconfs("sed_command", sed_command)) |
|
|
die("cannot get sed command name."); |
|
|
#if defined(_WIN32) || defined(__DJGPP__) |
|
|
if (!locatestring(strbuf_value(sed_command), ".exe", MATCH_LAST)) |
|
|
strbuf_puts(sed_command, ".exe"); |
|
|
#endif |
|
457 |
/* |
/* |
458 |
* add path index if not yet. |
* add path index if not yet. |
459 |
*/ |
*/ |
474 |
* Compact format. |
* Compact format. |
475 |
*/ |
*/ |
476 |
if (gtop->format & GTAGS_PATHINDEX) { |
if (gtop->format & GTAGS_PATHINDEX) { |
477 |
strbuf_puts(sb, "| "); |
strbuf_puts(sb, "| gtags --sed"); |
|
strbuf_puts(sb, strbuf_value(sed_command)); |
|
478 |
strbuf_putc(sb, ' '); |
strbuf_putc(sb, ' '); |
|
strbuf_puts(sb, "\"s@"); |
|
|
strbuf_puts(sb, path); |
|
|
strbuf_puts(sb, "@"); |
|
479 |
strbuf_puts(sb, fid); |
strbuf_puts(sb, fid); |
|
strbuf_puts(sb, "@\""); |
|
480 |
} |
} |
481 |
if (gtop->format & GTAGS_COMPACT) { |
if (gtop->format & GTAGS_COMPACT) { |
482 |
strbuf_puts(sb, "| "); |
strbuf_puts(sb, "| "); |
522 |
if (pclose(ip) < 0) |
if (pclose(ip) < 0) |
523 |
die("terminated abnormally."); |
die("terminated abnormally."); |
524 |
strbuf_close(sort_command); |
strbuf_close(sort_command); |
|
strbuf_close(sed_command); |
|
525 |
strbuf_close(sb); |
strbuf_close(sb); |
526 |
strbuf_close(ib); |
strbuf_close(ib); |
527 |
} |
} |