/[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.75 by h-iwamoto, Sat Oct 29 13:09:40 2005 UTC revision 1.76 by shigio, Mon Oct 31 12:44:14 2005 UTC
# Line 119  const char *action_value; Line 119  const char *action_value;
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;
# Line 243  static struct option const long_options[ Line 242  static struct option const long_options[
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 }
# Line 1497  main(int argc, char **argv) Line 1495  main(int argc, char **argv)
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))
# Line 1636  main(int argc, char **argv) Line 1632  main(int argc, char **argv)
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          /*          /*

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.76

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