/[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.114 by h-iwamoto, Fri Jun 24 15:17:34 2005 UTC revision 1.115 by h-iwamoto, Sat Jun 25 14:42:51 2005 UTC
# Line 681  incremental(dbpath, root) Line 681  incremental(dbpath, root)
681          STRBUF *deletelist = strbuf_open(0);          STRBUF *deletelist = strbuf_open(0);
682          int updated = 0;          int updated = 0;
683          const char *path;          const char *path;
         const char *end;  
         int db;  
684    
685          if (vflag) {          if (vflag) {
686                  fprintf(stderr, " Tag found in '%s'.\n", dbpath);                  fprintf(stderr, " Tag found in '%s'.\n", dbpath);
# Line 729  incremental(dbpath, root) Line 727  incremental(dbpath, root)
727                  }                  }
728          }          }
729          gpath_close();          gpath_close();
730          if (strbuf_getlen(addlist) + strbuf_getlen(deletelist) + strbuf_getlen(updatelist)) {          if (strbuf_getlen(addlist) + strbuf_getlen(deletelist) + strbuf_getlen(updatelist))
731                  updated = 1;                  updated = 1;
732                  /*          /*
733                   * execute updating.           * execute updating.
734                   */           */
735                  signal_setup();          signal_setup();
736            if (updated) {
737                    int db;
738    
739                  for (db = GTAGS; db < GTAGLIM; db++) {                  for (db = GTAGS; db < GTAGLIM; db++) {
740                          /*                          /*
# Line 749  incremental(dbpath, root) Line 749  incremental(dbpath, root)
749                          if (exitflag)                          if (exitflag)
750                                  exit(1);                                  exit(1);
751                  }                  }
752            }
753            if (strbuf_getlen(deletelist) > 0) {
754                    const char *start = strbuf_value(deletelist);
755                    const char *end = start + strbuf_getlen(deletelist);
756                    const char *p;
757    
758                  gpath_open(dbpath, 2, 0);                  gpath_open(dbpath, 2, 0);
759                  path = strbuf_value(deletelist);                  for (p = start; p < end; p += strlen(p) + 1) {
                 end = path + strbuf_getlen(deletelist);  
                 while (path < end) {  
                         gpath_delete(path);  
760                          if (exitflag)                          if (exitflag)
761                                  break;                                  break;
762                          path += strlen(path) + 1;                          gpath_delete(p);
763                  }                  }
764                  gpath_close();                  gpath_close();
765                  if (exitflag)          }
766                          exit(1);          if (exitflag)
767                    exit(1);
768            if (updated) {
769                    int db;
770                  /*                  /*
771                   * Update modification time of tag files                   * Update modification time of tag files
772                   * because they may have no definitions.                   * because they may have no definitions.

Legend:
Removed from v.1.114  
changed lines
  Added in v.1.115

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