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 |
} |
} |
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 |
} |
} |