/[global]/global/gtags/gtags.c
ViewVC logotype

Diff of /global/gtags/gtags.c

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

revision 1.150 by h-iwamoto, Fri Nov 4 16:07:24 2005 UTC revision 1.151 by h-iwamoto, Fri Nov 4 17:42:14 2005 UTC
# Line 849  updatetags(const char *dbpath, const cha Line 849  updatetags(const char *dbpath, const cha
849  {  {
850          GTOP *gtop;          GTOP *gtop;
851          STRBUF *comline = strbuf_open(0);          STRBUF *comline = strbuf_open(0);
         int flags;  
852          int seqno;          int seqno;
853    
854          /*          /*
# Line 883  updatetags(const char *dbpath, const cha Line 882  updatetags(const char *dbpath, const cha
882          }          }
883          if (deleteset->max > 0)          if (deleteset->max > 0)
884                  gtags_delete(gtop, deleteset);                  gtags_delete(gtop, deleteset);
885          flags = 0;          gtop->flags = 0;
886          if (extractmethod)          if (extractmethod)
887                  flags |= GTAGS_EXTRACTMETHOD;                  gtop->flags |= GTAGS_EXTRACTMETHOD;
888          if (debug)          if (debug)
889                  flags |= GTAGS_DEBUG;                  gtop->flags |= GTAGS_DEBUG;
890            /*
891             * Compact format requires the tag records of the same file are
892             * consecutive.
893             *
894             * We assume that the output of gtags-parser is consecutive for each
895             * file. About the other parsers, it is not guaranteed, so we sort it
896             * using external sort command (gnusort).
897             */
898            if (gtop->format & GTAGS_COMPACT) {
899                    if (locatestring(strbuf_value(comline), "gtags-parser", MATCH_FIRST) == NULL) {
900                            if (locatestring(strbuf_value(comline), "%s", MATCH_FIRST) == NULL)
901                                    strbuf_puts(comline, " %s");
902                            strbuf_sprintf(comline, "| %s -k 3,3", POSIX_SORT);
903                    }
904            }
905          /*          /*
906           * If the --max-args option is not specified, we pass the parser           * If the --max-args option is not specified, we pass the parser
907           * the source file as a lot as possible to decrease the invoking           * the source file as a lot as possible to decrease the invoking
# Line 915  updatetags(const char *dbpath, const cha Line 929  updatetags(const char *dbpath, const cha
929                           * data = 'Class::method  103 ./class.cpp ...'                           * data = 'Class::method  103 ./class.cpp ...'
930                           */                           */
931                          p = tag;                          p = tag;
932                          if (flags & GTAGS_EXTRACTMETHOD) {                          if (gtop->flags & GTAGS_EXTRACTMETHOD) {
933                                  if ((p = locatestring(tag, ".", MATCH_LAST)) != NULL)                                  if ((p = locatestring(tag, ".", MATCH_LAST)) != NULL)
934                                          p++;                                          p++;
935                                  else if ((p = locatestring(tag, "::", MATCH_LAST)) != NULL)                                  else if ((p = locatestring(tag, "::", MATCH_LAST)) != NULL)

Legend:
Removed from v.1.150  
changed lines
  Added in v.1.151

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