/[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.49 by shigio, Sun Oct 31 07:07:03 2004 UTC revision 1.50 by shigio, Wed Nov 3 13:31:48 2004 UTC
# Line 390  gtags_put(gtop, tag, record, fid) Line 390  gtags_put(gtop, tag, record, fid)
390          /*          /*
391           * gtop->format & GTAGS_COMPACT           * gtop->format & GTAGS_COMPACT
392           */           */
393          if (split(record, 4, &ptable) != 4)          if (split(record, 4, &ptable) != 4) {
394                  die("illegal format.");                  recover(&ptable);
395                    die("illegal tag format.\n'%s'", record);
396            }
397          line = ptable.part[1].start;          line = ptable.part[1].start;
398          path = ptable.part[2].start;          path = ptable.part[2].start;
399          /*          /*
# Line 441  gtags_add(gtop, comline, path, flags) Line 443  gtags_add(gtop, comline, path, flags)
443          STRBUF *sb = strbuf_open(0);          STRBUF *sb = strbuf_open(0);
444          STRBUF *ib = strbuf_open(MAXBUFLEN);          STRBUF *ib = strbuf_open(MAXBUFLEN);
445          STRBUF *sort_command = strbuf_open(0);          STRBUF *sort_command = strbuf_open(0);
         STRBUF *sed_command = strbuf_open(0);  
446          char *fid;          char *fid;
447    
448          /*          /*
# Line 453  gtags_add(gtop, comline, path, flags) Line 454  gtags_add(gtop, comline, path, flags)
454          if (!locatestring(strbuf_value(sort_command), ".exe", MATCH_LAST))          if (!locatestring(strbuf_value(sort_command), ".exe", MATCH_LAST))
455                  strbuf_puts(sort_command, ".exe");                  strbuf_puts(sort_command, ".exe");
456  #endif  #endif
         if (!getconfs("sed_command", sed_command))  
                 die("cannot get sed command name.");  
 #if defined(_WIN32) || defined(__DJGPP__)  
         if (!locatestring(strbuf_value(sed_command), ".exe", MATCH_LAST))  
                 strbuf_puts(sed_command, ".exe");  
 #endif  
457          /*          /*
458           * add path index if not yet.           * add path index if not yet.
459           */           */
# Line 479  gtags_add(gtop, comline, path, flags) Line 474  gtags_add(gtop, comline, path, flags)
474           * Compact format.           * Compact format.
475           */           */
476          if (gtop->format & GTAGS_PATHINDEX) {          if (gtop->format & GTAGS_PATHINDEX) {
477                  strbuf_puts(sb, "| ");                  strbuf_puts(sb, "| gtags --sed");
                 strbuf_puts(sb, strbuf_value(sed_command));  
478                  strbuf_putc(sb, ' ');                  strbuf_putc(sb, ' ');
                 strbuf_puts(sb, "\"s@");  
                 strbuf_puts(sb, path);  
                 strbuf_puts(sb, "@");  
479                  strbuf_puts(sb, fid);                  strbuf_puts(sb, fid);
                 strbuf_puts(sb, "@\"");  
480          }          }
481          if (gtop->format & GTAGS_COMPACT) {          if (gtop->format & GTAGS_COMPACT) {
482                  strbuf_puts(sb, "| ");                  strbuf_puts(sb, "| ");
# Line 532  gtags_add(gtop, comline, path, flags) Line 522  gtags_add(gtop, comline, path, flags)
522          if (pclose(ip) < 0)          if (pclose(ip) < 0)
523                  die("terminated abnormally.");                  die("terminated abnormally.");
524          strbuf_close(sort_command);          strbuf_close(sort_command);
         strbuf_close(sed_command);  
525          strbuf_close(sb);          strbuf_close(sb);
526          strbuf_close(ib);          strbuf_close(ib);
527  }  }

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

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