566 |
*/ |
*/ |
567 |
makecommand(comline, path_list, sb); |
makecommand(comline, path_list, sb); |
568 |
/* |
/* |
569 |
* Compact format. |
* Compact format requires the output of parser sorted by the path. |
570 |
|
* |
571 |
|
* We assume that the output of gtags-parser is sorted by the path. |
572 |
|
* About the other parsers, it is not guaranteed, so we sort it |
573 |
|
* using external sort command (gnusort). |
574 |
*/ |
*/ |
575 |
if ((gtop->format & GTAGS_COMPACT) != 0 |
if ((gtop->format & GTAGS_COMPACT) != 0 |
576 |
&& locatestring(comline, "gtags-parser", MATCH_FIRST) == NULL |
&& locatestring(comline, "gtags-parser", MATCH_FIRST) == NULL |
632 |
int fid, n; |
int fid, n; |
633 |
|
|
634 |
for (line = dbop_first(gtop->dbop, NULL, NULL, 0); line; line = dbop_next(gtop->dbop)) { |
for (line = dbop_first(gtop->dbop, NULL, NULL, 0); line; line = dbop_next(gtop->dbop)) { |
635 |
|
/* |
636 |
|
* Extract the path, and if needed, convert it into the file id. |
637 |
|
*/ |
638 |
n = split((char *)line, 4, &ptable); |
n = split((char *)line, 4, &ptable); |
639 |
if (gtop->format & GTAGS_COMPACT) { |
if (gtop->format & GTAGS_COMPACT) { |
640 |
if (n != 3) |
if (n != 3) |
654 |
} |
} |
655 |
fid = atoi(p); |
fid = atoi(p); |
656 |
recover(&ptable); |
recover(&ptable); |
657 |
|
/* |
658 |
|
* If the file id exists in the deleteset, delete the record. |
659 |
|
*/ |
660 |
if (idset_contains(deleteset, fid)) |
if (idset_contains(deleteset, fid)) |
661 |
dbop_delete(gtop->dbop, NULL); |
dbop_delete(gtop->dbop, NULL); |
662 |
} |
} |