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

Diff of /global/htags/htags.c

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

revision 1.68 by shigio, Sun Aug 28 11:05:21 2005 UTC revision 1.69 by shigio, Sun Sep 4 02:46:12 2005 UTC
# Line 1075  configuration(argc, argv) Line 1075  configuration(argc, argv)
1075                  char *confpath = NULL;                  char *confpath = NULL;
1076                  char *label = NULL;                  char *label = NULL;
1077                  char *opt_gtagsconf = "--gtagsconf";                  char *opt_gtagsconf = "--gtagsconf";
                 int leng_gtagsconf = strlen(opt_gtagsconf);  
1078                  char *opt_gtagslabel = "--gtagslabel";                  char *opt_gtagslabel = "--gtagslabel";
                 int leng_gtagslabel = strlen(opt_gtagslabel);  
1079    
1080                  for (i = 1; i < argc; i++) {                  for (i = 1; i < argc; i++) {
1081                          if (!strncmp(argv[i], opt_gtagsconf, leng_gtagsconf)) {                          if ((p = locatestring(argv[i], opt_gtagsconf, MATCH_AT_FIRST))) {
1082                                  if (!strcmp(argv[i], opt_gtagsconf)) {                                  if (*p == '\0') {
1083                                          if (++i >= argc)                                          if (++i >= argc)
1084                                                  die("%s needs an argument.", opt_gtagsconf);                                                  die("%s needs an argument.", opt_gtagsconf);
1085                                          confpath = argv[i];                                          confpath = argv[i];
1086                                  } else {                                  } else {
                                         p = argv[i] + leng_gtagsconf;  
1087                                          if (*p++ == '=' && *p)                                          if (*p++ == '=' && *p)
1088                                                  confpath = p;                                                  confpath = p;
1089                                  }                                  }
1090                          } else if (!strncmp(argv[i], opt_gtagslabel, leng_gtagslabel)) {                          } else if ((p = locatestring(argv[i], opt_gtagslabel, MATCH_AT_FIRST))) {
1091                                  if (!strcmp(argv[i], opt_gtagslabel)) {                                  if (*p == '\0') {
1092                                          if (++i >= argc)                                          if (++i >= argc)
1093                                                  die("%s needs an argument.", opt_gtagslabel);                                                  die("%s needs an argument.", opt_gtagslabel);
1094                                          label = argv[i];                                          label = argv[i];
1095                                  } else {                                  } else {
                                         p = argv[i] + leng_gtagslabel;  
1096                                          if (*p++ == '=' && *p)                                          if (*p++ == '=' && *p)
1097                                                  label = p;                                                  label = p;
1098                                  }                                  }
# Line 1462  save_environment(argc, argv) Line 1458  save_environment(argc, argv)
1458                           * skip --gtagsconf because it is already read                           * skip --gtagsconf because it is already read
1459                           * as config value.                           * as config value.
1460                           */                           */
1461                          if (!strncmp(argv[i], opt_gtagsconf, leng_gtagsconf)) {                          if ((p = locatestring(argv[i], opt_gtagsconf, MATCH_AT_FIRST))) {
1462                                  if (!strcmp(argv[i], opt_gtagsconf))                                  if (*p == '\0')
1463                                          i++;                                          i++;
1464                                  continue;                                  continue;
1465                          }                          }

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69

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