320 |
{"@html_end@", html_end}, |
{"@html_end@", html_end}, |
321 |
{"@body_begin@", body_begin}, |
{"@body_begin@", body_begin}, |
322 |
{"@body_end@", body_end}, |
{"@body_end@", body_end}, |
323 |
|
{"@error_begin@", error_begin}, |
324 |
|
{"@error_end@", error_end}, |
325 |
|
{"@message_begin@", message_begin}, |
326 |
|
{"@message_end@", message_end}, |
327 |
|
{"@verbatim_begin@", verbatim_begin}, |
328 |
|
{"@verbatim_end@", verbatim_end}, |
329 |
{"@global_path@", global_path}, |
{"@global_path@", global_path}, |
330 |
{"@gtags_path@", gtags_path}, |
{"@gtags_path@", gtags_path}, |
331 |
{"@normal_suffix@", normal_suffix}, |
{"@normal_suffix@", normal_suffix}, |
332 |
{"@tabs@", stabs}, |
{"@tabs@", stabs}, |
333 |
{"@hr@", hr}, |
{"@hr@", hr}, |
334 |
|
{"@br@", br}, |
335 |
{"@HTML@", HTML}, |
{"@HTML@", HTML}, |
336 |
{"@action@", action}, |
{"@action@", action}, |
337 |
{"@null_device@", null_device}, |
{"@null_device@", null_device}, |
493 |
fprintf(op, "%s\n", html_begin); |
fprintf(op, "%s\n", html_begin); |
494 |
fprintf(op, "%s", set_header("HELP")); |
fprintf(op, "%s", set_header("HELP")); |
495 |
fprintf(op, "%s\n", body_begin); |
fprintf(op, "%s\n", body_begin); |
496 |
fprintf(op, "<h2>Usage of Links</h2>\n"); |
fprintf(op, "%sUsage of Links%s\n", header_begin, header_end); |
497 |
fprintf(op, "%s/* ", verbatim_begin); |
fprintf(op, "%s/* ", verbatim_begin); |
498 |
for (n = 0; n <= last; n++) { |
for (n = 0; n <= last; n++) { |
499 |
if (icon_list) { |
if (icon_list) { |
546 |
STRBUF *sb = strbuf_open(0); |
STRBUF *sb = strbuf_open(0); |
547 |
|
|
548 |
if (Fflag) |
if (Fflag) |
549 |
strbuf_sprintf(sb, "<h2><a href='search.%s'>SEARCH</a></h2>\n", normal_suffix); |
strbuf_sprintf(sb, "%s<a href='search.%s'>SEARCH</a>%s\n", header_begin, normal_suffix, header_end); |
550 |
else |
else |
551 |
strbuf_puts(sb, "<h2>SEARCH</h2>\n"); |
strbuf_sprintf(sb, "%sSEARCH%s\n", header_begin, header_end); |
552 |
if (!target) |
if (!target) |
553 |
strbuf_puts(sb, "Please input object name and select [Search]. POSIX's regular expression is allowed.<p>\n"); |
strbuf_puts(sb, "Please input object name and select [Search]. POSIX's regular expression is allowed.<p>\n"); |
554 |
strbuf_sprintf(sb, "<form method='get' action='%s'", action); |
strbuf_sprintf(sb, "<form method='get' action='%s'", action); |
561 |
strbuf_puts(sb, id); |
strbuf_puts(sb, id); |
562 |
strbuf_puts(sb, "'>\n"); |
strbuf_puts(sb, "'>\n"); |
563 |
strbuf_puts(sb, "<input type='submit' value='Search'>\n"); |
strbuf_puts(sb, "<input type='submit' value='Search'>\n"); |
564 |
strbuf_puts(sb, "<input type='reset' value='Reset'><br>\n"); |
strbuf_sprintf(sb, "<input type='reset' value='Reset'>%s\n", br); |
565 |
strbuf_puts(sb, "<input type='radio' name='type' value='definition' checked title='Retrieve the definition place of the specified symbol.'>"); |
strbuf_puts(sb, "<input type='radio' name='type' value='definition' checked title='Retrieve the definition place of the specified symbol.'>"); |
566 |
strbuf_puts(sb, target ? "Def" : "Definition"); |
strbuf_puts(sb, target ? "Def" : "Definition"); |
567 |
strbuf_puts(sb, "\n<input type='radio' name='type' value='reference' title='Retrieve the reference place of the specified symbol.'>"); |
strbuf_puts(sb, "\n<input type='radio' name='type' value='reference' title='Retrieve the reference place of the specified symbol.'>"); |
580 |
strbuf_puts(sb, "\n<input type='radio' name='type' value='idutils' title='Retrieve lines which matches to the specified pattern using idutils(1).'>"); |
strbuf_puts(sb, "\n<input type='radio' name='type' value='idutils' title='Retrieve lines which matches to the specified pattern using idutils(1).'>"); |
581 |
strbuf_puts(sb, target ? "Id" : "Id pattern"); |
strbuf_puts(sb, target ? "Id" : "Id pattern"); |
582 |
} |
} |
583 |
strbuf_puts(sb, "<br>\n<input type='checkbox' name='icase' value='1' title='Ignore case distinctions in the pattern.'>"); |
strbuf_sprintf(sb, "%s\n<input type='checkbox' name='icase' value='1' title='Ignore case distinctions in the pattern.'>", br); |
584 |
strbuf_puts(sb, target ? "Icase" : "Ignore case"); |
strbuf_puts(sb, target ? "Icase" : "Ignore case"); |
585 |
if (other_files) { |
if (other_files) { |
586 |
strbuf_puts(sb, "\n<input type='checkbox' name='other' value='1' title='Files other than the source code are also retrieved.'>"); |
strbuf_puts(sb, "\n<input type='checkbox' name='other' value='1' title='Files other than the source code are also retrieved.'>"); |
611 |
die("cannot make file '%s'.", file); |
die("cannot make file '%s'.", file); |
612 |
if (Fflag) { |
if (Fflag) { |
613 |
fprintf(op, "%s\n", html_begin); |
fprintf(op, "%s\n", html_begin); |
614 |
fprintf(op, "<head>\n<title>%s</title>\n", title); |
fprintf(op, "%s\n", head_begin); |
615 |
|
fprintf(op, "<title>%s</title>\n", title); |
616 |
fprintf(op, "%s", meta_record()); |
fprintf(op, "%s", meta_record()); |
617 |
if (style_sheet) |
if (style_sheet) |
618 |
fprintf(op, "%s", style_sheet); |
fprintf(op, "%s", style_sheet); |
619 |
fprintf(op, "</head>\n"); |
fprintf(op, "%s\n", head_end); |
620 |
fprintf(op, "<frameset cols='200,*'>\n"); |
fprintf(op, "<frameset cols='200,*'>\n"); |
621 |
if (fflag) { |
if (fflag) { |
622 |
fprintf(op, "<frameset rows='33%%,33%%,*'>\n"); |
fprintf(op, "<frameset rows='33%%,33%%,*'>\n"); |
847 |
strbuf_puts(sb, title_end); |
strbuf_puts(sb, title_end); |
848 |
strbuf_putc(sb, '\n'); |
strbuf_putc(sb, '\n'); |
849 |
strbuf_puts(sb, "<div align='right'>\n"); |
strbuf_puts(sb, "<div align='right'>\n"); |
850 |
strbuf_sprintf(sb, "Last updated %s<br>\n", now()); |
strbuf_sprintf(sb, "Last updated %s%s\n", now(), br); |
851 |
strbuf_sprintf(sb, "This hypertext was generated by <a href='%s' target='_top' title='Go to the GLOBAL project page.'>GLOBAL-%s</a>.<br>\n", www, get_version()); |
strbuf_sprintf(sb, "This hypertext was generated by <a href='%s' target='_top' title='Go to the GLOBAL project page.'>GLOBAL-%s</a>.%s\n", www, get_version(), br); |
852 |
strbuf_puts(sb, "</div>\n"); |
strbuf_puts(sb, "</div>\n"); |
853 |
strbuf_sprintf(sb, "%s\n", hr); |
strbuf_sprintf(sb, "%s\n", hr); |
854 |
if (caution) { |
if (caution) { |
855 |
strbuf_puts(sb, "<center>\n"); |
strbuf_sprintf(sb, "%s\n", caution_begin); |
856 |
strbuf_puts(sb, "<blockquote>\n"); |
strbuf_sprintf(sb, "<font size='+2' color='red'>CAUTION</font>%s\n", br); |
|
strbuf_puts(sb, "<font size='+2' color='red'>CAUTION</font><br>\n"); |
|
857 |
strbuf_sprintf(sb, "This hypertext consist of %d files.\n", file_count); |
strbuf_sprintf(sb, "This hypertext consist of %d files.\n", file_count); |
858 |
strbuf_puts(sb, "Please don't download whole hypertext using hypertext copy tools.\n"); |
strbuf_puts(sb, "Please don't download whole hypertext using hypertext copy tools.\n"); |
859 |
strbuf_puts(sb, "Our network cannot afford such traffic.\n"); |
strbuf_puts(sb, "Our network cannot afford such traffic.\n"); |
860 |
strbuf_puts(sb, "Instead, you can generate same thing in your computer using\n"); |
strbuf_puts(sb, "Instead, you can generate same thing in your computer using\n"); |
861 |
strbuf_sprintf(sb, "<a href='%s' target='_top'>GLOBAL source code tag system</a>.\n", www); |
strbuf_sprintf(sb, "<a href='%s' target='_top'>GLOBAL source code tag system</a>.\n", www); |
862 |
strbuf_puts(sb, "Thank you. \n"); |
strbuf_puts(sb, "Thank you. \n"); |
863 |
strbuf_puts(sb, "</blockquote>\n"); |
strbuf_sprintf(sb, "%s\n", caution_end); |
|
strbuf_puts(sb, "</center>\n"); |
|
864 |
strbuf_sprintf(sb, "\n%s\n", hr); |
strbuf_sprintf(sb, "\n%s\n", hr); |
865 |
} |
} |
866 |
if (fflag) { |
if (fflag) { |
867 |
strbuf_puts(sb, makesearchpart(action, id, NULL)); |
strbuf_puts(sb, makesearchpart(action, id, NULL)); |
868 |
strbuf_sprintf(sb, "%s\n", hr); |
strbuf_sprintf(sb, "%s\n", hr); |
869 |
} |
} |
870 |
strbuf_puts(sb, "<h2>MAINS</h2>\n"); |
strbuf_sprintf(sb, "%sMAINS%s\n", header_begin, header_end); |
871 |
|
|
872 |
snprintf(command, sizeof(command), "%s -nx %s | gnusort -k 1,1 -k 3,3 -k 2,2n", global_path, main_func); |
snprintf(command, sizeof(command), "%s -nx %s | gnusort -k 1,1 -k 3,3 -k 2,2n", global_path, main_func); |
873 |
ip = popen(command, "r"); |
ip = popen(command, "r"); |
885 |
die("cannot execute command '%s'.", command); |
die("cannot execute command '%s'.", command); |
886 |
strbuf_sprintf(sb, "%s\n", hr); |
strbuf_sprintf(sb, "%s\n", hr); |
887 |
if (aflag && !Fflag) { |
if (aflag && !Fflag) { |
888 |
strbuf_sprintf(sb, "<h2>%s</h2>\n", title_define_index); |
strbuf_sprintf(sb, "%s%s%s\n", header_begin, title_define_index, header_end); |
889 |
strbuf_puts(sb, defines); |
strbuf_puts(sb, defines); |
890 |
} else { |
} else { |
891 |
strbuf_sprintf(sb, "<h2><a href='defines.%s'>%s</a></h2>\n", normal_suffix, title_define_index); |
strbuf_sprintf(sb, "%s<a href='defines.%s'>%s</a>%s\n", header_begin, normal_suffix, title_define_index, header_end); |
892 |
} |
} |
893 |
strbuf_sprintf(sb, "%s\n", hr); |
strbuf_sprintf(sb, "%s\n", hr); |
894 |
if (Fflag) { |
if (Fflag) { |
895 |
strbuf_sprintf(sb, "<h2><a href='files.%s'>%s</a></h2>\n", normal_suffix, title_file_index); |
strbuf_sprintf(sb, "%s<a href='files.%s'>%s</a>%s\n", header_begin, normal_suffix, title_file_index, header_end); |
896 |
} else { |
} else { |
897 |
strbuf_sprintf(sb, "<h2>%s</h2>\n", title_file_index); |
strbuf_sprintf(sb, "%s%s%s\n", header_begin, title_file_index, header_end); |
898 |
if (!no_order_list) |
if (!no_order_list) |
899 |
strbuf_puts(sb, "<ol>\n"); |
strbuf_sprintf(sb, "%s\n", list_begin); |
900 |
strbuf_puts(sb, files); |
strbuf_puts(sb, files); |
901 |
if (!no_order_list) { |
if (!no_order_list) { |
902 |
strbuf_puts(sb, "</ol>\n"); |
strbuf_sprintf(sb, "%s\n", list_end); |
903 |
} else { |
} else { |
904 |
strbuf_puts(sb, "<br>\n"); |
strbuf_sprintf(sb, "%s\n", br); |
905 |
} |
} |
906 |
strbuf_sprintf(sb, "%s\n", hr); |
strbuf_sprintf(sb, "%s\n", hr); |
907 |
} |
} |