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

Diff of /global/htags/common.c

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

revision 1.50 by shigio, Mon May 16 13:48:31 2005 UTC revision 1.51 by shigio, Tue Oct 4 07:59:04 2005 UTC
# Line 119  static int strict_xhtml = 0; Line 119  static int strict_xhtml = 0;
119   * This function is a replacement of fprintf(op, "%s\n", s) in htags.   * This function is a replacement of fprintf(op, "%s\n", s) in htags.
120   */   */
121  int  int
122  fputs_nl(s, op)  fputs_nl(const char *s, FILE *op)
         const char *s;  
         FILE *op;  
123  {  {
124          fputs(s, op);          fputs(s, op);
125          putc('\n', op);          putc('\n', op);
# Line 200  setup_xhtml(void) Line 198  setup_xhtml(void)
198   * Generate upper directory.   * Generate upper directory.
199   */   */
200  const char *  const char *
201  upperdir(dir)  upperdir(const char *dir)
         const char *dir;  
202  {  {
203          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
204    
# Line 215  upperdir(dir) Line 212  upperdir(dir)
212   * of the 'HTML' directory.   * of the 'HTML' directory.
213   */   */
214  static const char *  static const char *
215  sed(ip, place)  sed(FILE *ip, int place)
         FILE *ip;  
         int place;  
216  {  {
217          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
218          const char *parent_dir = (place == SUBDIR) ? "../.." : "..";          const char *parent_dir = (place == SUBDIR) ? "../.." : "..";
# Line 253  sed(ip, place) Line 248  sed(ip, place)
248   * Generate custom header.   * Generate custom header.
249   */   */
250  const char *  const char *
251  gen_insert_header(place)  gen_insert_header(int place)
         int place;  
252  {  {
253          static FILE *ip;          static FILE *ip;
254    
# Line 271  gen_insert_header(place) Line 265  gen_insert_header(place)
265   * Generate custom footer.   * Generate custom footer.
266   */   */
267  const char *  const char *
268  gen_insert_footer(place)  gen_insert_footer(int place)
         int place;  
269  {  {
270          static FILE *ip;          static FILE *ip;
271    
# Line 295  gen_insert_footer(place) Line 288  gen_insert_footer(place)
288   *                      use frameset document type or not   *                      use frameset document type or not
289   */   */
290  static const char *  static const char *
291  gen_page_generic_begin(title, place, use_frameset)  gen_page_generic_begin(const char *title, int place, int use_frameset)
         const char *title;  
         int place;  
         int use_frameset;  
292  {  {
293          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
294          const char *dir = (place == SUBDIR) ? "../" : "";          const char *dir = (place == SUBDIR) ? "../" : "";
# Line 352  gen_page_generic_begin(title, place, use Line 342  gen_page_generic_begin(title, place, use
342   *                      TOPDIR: this page is in the top directory   *                      TOPDIR: this page is in the top directory
343   */   */
344  const char *  const char *
345  gen_page_begin(title, place)  gen_page_begin(const char *title, int place)
         const char *title;  
         int place;  
346  {  {
347          return gen_page_generic_begin(title, place, 0);          return gen_page_generic_begin(title, place, 0);
348  }  }
# Line 364  gen_page_begin(title, place) Line 352  gen_page_begin(title, place)
352   *      i)      title   title of this page   *      i)      title   title of this page
353   */   */
354  const char *  const char *
355  gen_page_frameset_begin(title)  gen_page_frameset_begin(const char *title)
         const char *title;  
356  {  {
357          return gen_page_generic_begin(title, TOPDIR, 1);          return gen_page_generic_begin(title, TOPDIR, 1);
358  }  }
# Line 388  gen_page_end(void) Line 375  gen_page_end(void)
375   *      i)      alt     alt string   *      i)      alt     alt string
376   */   */
377  const char *  const char *
378  gen_image(where, file, alt)  gen_image(int where, const char *file, const char *alt)
         int where;  
         const char *file;  
         const char *alt;  
379  {  {
380          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
381          const char *dir = (where == PARENT) ? "../icons" : "icons";          const char *dir = (where == PARENT) ? "../icons" : "icons";
# Line 409  gen_image(where, file, alt) Line 393  gen_image(where, file, alt)
393   * Generate name tag.   * Generate name tag.
394   */   */
395  const char *  const char *
396  gen_name_number(number)  gen_name_number(int number)
         int number;  
397  {  {
398          static char buf[32];          static char buf[32];
399    
# Line 421  gen_name_number(number) Line 404  gen_name_number(number)
404   * Generate name tag.   * Generate name tag.
405   */   */
406  const char *  const char *
407  gen_name_string(name)  gen_name_string(const char *name)
         const char *name;  
408  {  {
409          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
410    
# Line 455  gen_name_string(name) Line 437  gen_name_string(name)
437   *      r)              generated anchor tag   *      r)              generated anchor tag
438   */   */
439  const char *  const char *
440  gen_href_begin_with_title_target(dir, file, suffix, key, title, target)  gen_href_begin_with_title_target(const char *dir, const char *file, const char *suffix, const char *key, const char *title, const char *target)
         const char *dir;  
         const char *file;  
         const char *suffix;  
         const char *key;  
         const char *title;  
         const char *target;  
441  {  {
442          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
443    
# Line 504  gen_href_begin_with_title_target(dir, fi Line 480  gen_href_begin_with_title_target(dir, fi
480   * Generate simple anchor begin tag.   * Generate simple anchor begin tag.
481   */   */
482  const char *  const char *
483  gen_href_begin_simple(file)  gen_href_begin_simple(const char *file)
         const char *file;  
484  {  {
485          return gen_href_begin_with_title_target(NULL, file, NULL, NULL, NULL, NULL);          return gen_href_begin_with_title_target(NULL, file, NULL, NULL, NULL, NULL);
486  }  }
# Line 513  gen_href_begin_simple(file) Line 488  gen_href_begin_simple(file)
488   * Generate anchor begin tag without title and target.   * Generate anchor begin tag without title and target.
489   */   */
490  const char *  const char *
491  gen_href_begin(dir, file, suffix, key)  gen_href_begin(const char *dir, const char *file, const char *suffix, const char *key)
         const char *dir;  
         const char *file;  
         const char *suffix;  
         const char *key;  
492  {  {
493          return gen_href_begin_with_title_target(dir, file, suffix, key, NULL, NULL);          return gen_href_begin_with_title_target(dir, file, suffix, key, NULL, NULL);
494  }  }
# Line 525  gen_href_begin(dir, file, suffix, key) Line 496  gen_href_begin(dir, file, suffix, key)
496   * Generate anchor begin tag without target.   * Generate anchor begin tag without target.
497   */   */
498  const char *  const char *
499  gen_href_begin_with_title(dir, file, suffix, key, title)  gen_href_begin_with_title(const char *dir, const char *file, const char *suffix, const char *key, const char *title)
         const char *dir;  
         const char *file;  
         const char *suffix;  
         const char *key;  
         const char *title;  
500  {  {
501          return gen_href_begin_with_title_target(dir, file, suffix, key, title, NULL);          return gen_href_begin_with_title_target(dir, file, suffix, key, title, NULL);
502  }  }
# Line 580  gen_list_begin(void) Line 546  gen_list_begin(void)
546   * s must be choped.   * s must be choped.
547   */   */
548  const char *  const char *
549  gen_list_body(srcdir, string)  gen_list_body(const char *srcdir, const char *string)           /* virtually const */
         const char *srcdir;  
         const char *string;             /* virtually const */  
550  {  {
551          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
552          const char *p, *filename, *fid;          const char *p, *filename, *fid;
# Line 673  gen_list_end(void) Line 637  gen_list_end(void)
637   *      i)      align   right,left,center   *      i)      align   right,left,center
638   */   */
639  const char *  const char *
640  gen_div_begin(align)  gen_div_begin(const char *align)
         const char *align;  
641  {  {
642          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
643    
# Line 708  gen_div_end(void) Line 671  gen_div_end(void)
671   *      i)      target  target   *      i)      target  target
672   */   */
673  const char *  const char *
674  gen_form_begin(target)  gen_form_begin(const char *target)
         const char *target;  
675  {  {
676          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
677    
# Line 732  gen_form_end(void) Line 694  gen_form_end(void)
694   * Generate input tag   * Generate input tag
695   */   */
696  const char *  const char *
697  gen_input(name, value, type)  gen_input(const char *name, const char *value, const char *type)
         const char *name;  
         const char *value;  
         const char *type;  
698  {  {
699          return gen_input_with_title_checked(name, value, type, 0, NULL);          return gen_input_with_title_checked(name, value, type, 0, NULL);
700  }  }
# Line 743  gen_input(name, value, type) Line 702  gen_input(name, value, type)
702   * Generate input radiobox tag   * Generate input radiobox tag
703   */   */
704  const char *  const char *
705  gen_input_radio(name, value, checked, title)  gen_input_radio(const char *name, const char *value, int checked, const char *title)
         const char *name;  
         const char *value;  
         int checked;  
         const char *title;  
706  {  {
707          return gen_input_with_title_checked(name, value, "radio", checked, title);          return gen_input_with_title_checked(name, value, "radio", checked, title);
708  }  }
# Line 755  gen_input_radio(name, value, checked, ti Line 710  gen_input_radio(name, value, checked, ti
710   * Generate input checkbox tag   * Generate input checkbox tag
711   */   */
712  const char *  const char *
713  gen_input_checkbox(name, value, title)  gen_input_checkbox(const char *name, const char *value, const char *title)
         const char *name;  
         const char *value;  
         const char *title;  
714  {  {
715          return gen_input_with_title_checked(name, value, "checkbox", 0, title);          return gen_input_with_title_checked(name, value, "checkbox", 0, title);
716  }  }
# Line 766  gen_input_checkbox(name, value, title) Line 718  gen_input_checkbox(name, value, title)
718   * Generate input radio tag   * Generate input radio tag
719   */   */
720  const char *  const char *
721  gen_input_with_title_checked(name, value, type, checked, title)  gen_input_with_title_checked(const char *name, const char *value, const char *type, int checked, const char *title)
         const char *name;  
         const char *value;  
         const char *type;  
         int checked;  
         const char *title;  
722  {  {
723          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
724    
# Line 800  gen_input_with_title_checked(name, value Line 747  gen_input_with_title_checked(name, value
747   *      i)      target  target   *      i)      target  target
748   */   */
749  const char *  const char *
750  gen_frameset_begin(contents)  gen_frameset_begin(const char *contents)
         const char *contents;  
751  {  {
752          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
753    
# Line 823  gen_frameset_end(void) Line 769  gen_frameset_end(void)
769   *      i)      target  target   *      i)      target  target
770   */   */
771  const char *  const char *
772  gen_frame(name, src)  gen_frame(const char *name, const char *src)
         const char *name;  
         const char *src;  
773  {  {
774          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
775    

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

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