/[global]/global/libutil/gtagsop.c
ViewVC logotype

Diff of /global/libutil/gtagsop.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.72 by shigio, Fri Jul 22 23:34:10 2005 UTC revision 1.73 by shigio, Mon Jul 25 02:40:25 2005 UTC
# Line 566  gtags_add(gtop, comline, path_list, flag Line 566  gtags_add(gtop, comline, path_list, flag
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
# Line 628  gtags_delete(gtop, deleteset) Line 632  gtags_delete(gtop, deleteset)
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)
# Line 647  gtags_delete(gtop, deleteset) Line 654  gtags_delete(gtop, deleteset)
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          }          }

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26