119 |
const char *id_value; |
const char *id_value; |
120 |
const char *cgidir; |
const char *cgidir; |
121 |
const char *main_func = "main"; |
const char *main_func = "main"; |
|
const char *style_sheet; |
|
122 |
const char *cvsweb_url; |
const char *cvsweb_url; |
123 |
const char *cvsweb_cvsroot; |
const char *cvsweb_cvsroot; |
124 |
const char *gtagslabel; |
const char *gtagslabel; |
242 |
{"insert-header", required_argument, NULL, 1}, |
{"insert-header", required_argument, NULL, 1}, |
243 |
{"insert-footer", required_argument, NULL, 1}, |
{"insert-footer", required_argument, NULL, 1}, |
244 |
{"statistics", no_argument, &statistics, 1}, |
{"statistics", no_argument, &statistics, 1}, |
|
{"style-sheet", required_argument, NULL, 1}, |
|
245 |
{"version", no_argument, &show_version, 1}, |
{"version", no_argument, &show_version, 1}, |
246 |
{"help", no_argument, &show_help, 1}, |
{"help", no_argument, &show_help, 1}, |
247 |
{ 0 } |
{ 0 } |
1495 |
; /* --gtagsconf is estimated only once. */ |
; /* --gtagsconf is estimated only once. */ |
1496 |
else if (!strcmp("gtagslabel", long_options[option_index].name)) |
else if (!strcmp("gtagslabel", long_options[option_index].name)) |
1497 |
; /* --gtagslabel is estimated only once. */ |
; /* --gtagslabel is estimated only once. */ |
|
else if (!strcmp("style-sheet", long_options[option_index].name)) |
|
|
style_sheet = optarg; |
|
1498 |
else if (!strcmp("insert-header", long_options[option_index].name)) |
else if (!strcmp("insert-header", long_options[option_index].name)) |
1499 |
insert_header = optarg; |
insert_header = optarg; |
1500 |
else if (!strcmp("insert-footer", long_options[option_index].name)) |
else if (!strcmp("insert-footer", long_options[option_index].name)) |
1632 |
} |
} |
1633 |
if (dynamic && Sflag) |
if (dynamic && Sflag) |
1634 |
die("Current implementation doesn't allow both -D(--dynamic) and the -S(--secure-cgi)."); |
die("Current implementation doesn't allow both -D(--dynamic) and the -S(--secure-cgi)."); |
|
if (style_sheet) { |
|
|
char buf[MAXBUFLEN]; |
|
|
STRBUF *sb = strbuf_open(0); |
|
|
FILE *ip = fopen(style_sheet, "r"); |
|
|
|
|
|
if (ip) { |
|
|
while (fgets(buf, sizeof(buf), ip)) { |
|
|
if (*buf != '\t' && *buf != '<') |
|
|
strbuf_putc(sb, '\t'); |
|
|
strbuf_puts(sb, buf); |
|
|
} |
|
|
fclose(ip); |
|
|
}; |
|
|
style_sheet = strbuf_value(sb); |
|
|
/* Doesn't close string buffer. */ |
|
|
} |
|
1635 |
if (icon_list && !test("f", icon_list)) |
if (icon_list && !test("f", icon_list)) |
1636 |
die("icon_list '%s' not found.", icon_list); |
die("icon_list '%s' not found.", icon_list); |
1637 |
/* |
/* |