/[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.156 by h-iwamoto, Mon Nov 7 14:53:00 2005 UTC revision 1.157 by h-iwamoto, Mon Nov 7 16:17:07 2005 UTC
# Line 698  incremental(const char *dbpath, const ch Line 698  incremental(const char *dbpath, const ch
698          STRBUF *addlist = strbuf_open(0);          STRBUF *addlist = strbuf_open(0);
699          STRBUF *deletelist = strbuf_open(0);          STRBUF *deletelist = strbuf_open(0);
700          STRBUF *addlist_other = strbuf_open(0);          STRBUF *addlist_other = strbuf_open(0);
         STRBUF *deletelist_other = strbuf_open(0);  
701          IDSET *deleteset;          IDSET *deleteset;
702          int updated = 0;          int updated = 0;
703          const char *path;          const char *path;
# Line 757  incremental(const char *dbpath, const ch Line 756  incremental(const char *dbpath, const ch
756          find_close();          find_close();
757          /*          /*
758           * make delete list.           * make delete list.
          *  
          * deletelist: source files  
          * deletelist_other: other files  
759           */           */
760          limit = gpath_nextkey();          limit = gpath_nextkey();
761          for (i = 1; i < limit; i++) {          for (i = 1; i < limit; i++) {
# Line 771  incremental(const char *dbpath, const ch Line 767  incremental(const char *dbpath, const ch
767                          continue;                          continue;
768                  if (other) {                  if (other) {
769                          if (!test("f", path) || test("b", path))                          if (!test("f", path) || test("b", path))
770                                  strbuf_puts0(deletelist_other, path);                                  strbuf_puts0(deletelist, path);
771                  } else {                  } else {
772                          if (!test("f", path)) {                          if (!test("f", path)) {
773                                  strbuf_puts0(deletelist, path);                                  strbuf_puts0(deletelist, path);
# Line 799  incremental(const char *dbpath, const ch Line 795  incremental(const char *dbpath, const ch
795                  }                  }
796                  updated = 1;                  updated = 1;
797          }          }
798          if (strbuf_getlen(deletelist) + strbuf_getlen(deletelist_other) + strbuf_getlen(addlist_other) > 0) {          if (strbuf_getlen(deletelist) + strbuf_getlen(addlist_other) > 0) {
799                  const char *start, *end, *p;                  const char *start, *end, *p;
800    
801                  if (vflag)                  if (vflag)
# Line 812  incremental(const char *dbpath, const ch Line 808  incremental(const char *dbpath, const ch
808                          for (p = start; p < end; p += strlen(p) + 1)                          for (p = start; p < end; p += strlen(p) + 1)
809                                  gpath_delete(p);                                  gpath_delete(p);
810                  }                  }
                 if (strbuf_getlen(deletelist_other) > 0) {  
                         start = strbuf_value(deletelist_other);  
                         end = start + strbuf_getlen(deletelist_other);  
   
                         for (p = start; p < end; p += strlen(p) + 1)  
                                 gpath_delete(p);  
                 }  
811                  if (strbuf_getlen(addlist_other) > 0) {                  if (strbuf_getlen(addlist_other) > 0) {
812                          start = strbuf_value(addlist_other);                          start = strbuf_value(addlist_other);
813                          end = start + strbuf_getlen(addlist_other);                          end = start + strbuf_getlen(addlist_other);
# Line 852  incremental(const char *dbpath, const ch Line 841  incremental(const char *dbpath, const ch
841          strbuf_close(addlist);          strbuf_close(addlist);
842          strbuf_close(deletelist);          strbuf_close(deletelist);
843          strbuf_close(addlist_other);          strbuf_close(addlist_other);
         strbuf_close(deletelist_other);  
844          idset_close(deleteset);          idset_close(deleteset);
845    
846          return updated;          return updated;

Legend:
Removed from v.1.156  
changed lines
  Added in v.1.157

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