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

Diff of /global/htags/src2html.c

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

revision 1.30 by shigio, Tue Apr 5 12:58:26 2005 UTC revision 1.31 by shigio, Tue Apr 5 17:17:56 2005 UTC
# Line 623  put_begin_of_line(lineno) Line 623  put_begin_of_line(lineno)
623                          guide = NULL;                          guide = NULL;
624          }          }
625          if (guide && definition_header == BEFORE_HEADER) {          if (guide && definition_header == BEFORE_HEADER) {
626                  fputs(guide, out);                  fputs_nl(guide, out);
                 fputc('\n', out);  
627                  guide = NULL;                  guide = NULL;
628          }          }
629  }  }
# Line 660  put_end_of_line(lineno) Line 659  put_end_of_line(lineno)
659                          fputs(guide, out);                          fputs(guide, out);
660                  fputc('\n', out);                  fputc('\n', out);
661                  if (definition_header == AFTER_HEADER) {                  if (definition_header == AFTER_HEADER) {
662                          fputs(guide, out);                          fputs_nl(guide, out);
                         fputc('\n', out);  
663                  }                  }
664                  guide = NULL;                  guide = NULL;
665          }          }
# Line 704  src2html(src, html, notsource) Line 702  src2html(src, html, notsource)
702          if (!notsource) {          if (!notsource) {
703                  anchor_load(src);                  anchor_load(src);
704          }          }
705          fprintf(out, "%s\n", gen_page_begin(src, 1));          fputs_nl(gen_page_begin(src, 1), out);
706          fprintf(out, "%s\n", body_begin);          fputs_nl(body_begin, out);
707          /*          /*
708           * print the header           * print the header
709           */           */
# Line 728  src2html(src, html, notsource) Line 726  src2html(src, html, notsource)
726                  }                  }
727                  if (cvsweb_cvsroot)                  if (cvsweb_cvsroot)
728                          strbuf_sprintf(sb, "?cvsroot=%s", cvsweb_cvsroot);                          strbuf_sprintf(sb, "?cvsroot=%s", cvsweb_cvsroot);
729                  fprintf(out, "%s%s", quote_space, gen_href_begin_simple(strbuf_value(sb)));                  fputs(quote_space, out);
730                  fprintf(out, "%s[CVS]%s", cvslink_begin, cvslink_end);                  fputs(gen_href_begin_simple(strbuf_value(sb)), out);
731                  fprintf(out, "%s\n", gen_href_end());                  fputs(cvslink_begin, out);
732                    fputs("[CVS]", out);
733                    fputs(cvslink_end, out);
734                    fputs_nl(gen_href_end(), out);
735                  /* doesn't close string buffer */                  /* doesn't close string buffer */
736          }          }
737          fprintf(out, "%s\n", header_end);          fputs_nl(header_end, out);
738          fprintf(out, "%s/* ", comment_begin);          fputs(comment_begin, out);
739            fputs("/* ", out);
740    
741          fputs(link_format(anchor_getlinks(0)), out);          fputs(link_format(anchor_getlinks(0)), out);
742          if (show_position)          if (show_position)
743                  fprintf(out, "%s[+1 %s]%s", position_begin, src, position_end);                  fprintf(out, "%s[+1 %s]%s", position_begin, src, position_end);
744          fprintf(out, " */%s", comment_end);          fputs(" */", out);
745          fprintf(out, "\n%s\n", hr);          fputs_nl(comment_end, out);
746            fputs_nl(hr, out);
747          /*          /*
748           * It is not source file.           * It is not source file.
749           */           */
# Line 748  src2html(src, html, notsource) Line 751  src2html(src, html, notsource)
751                  STRBUF *sb = strbuf_open(0);                  STRBUF *sb = strbuf_open(0);
752                  char *_;                  char *_;
753    
754                  fprintf(out, "%s\n", verbatim_begin);                  fputs_nl(verbatim_begin, out);
755                  last_lineno = 0;                  last_lineno = 0;
756                  while ((_ = strbuf_fgets(sb, in, STRBUF_NOCRLF)) != NULL) {                  while ((_ = strbuf_fgets(sb, in, STRBUF_NOCRLF)) != NULL) {
757                          fputs(gen_name_number(++last_lineno), out);                          fputs(gen_name_number(++last_lineno), out);
# Line 766  src2html(src, html, notsource) Line 769  src2html(src, html, notsource)
769                          }                          }
770                          fputc('\n', out);                          fputc('\n', out);
771                  }                  }
772                  fprintf(out, "%s\n", verbatim_end);                  fputs_nl(verbatim_end, out);
773                  strbuf_close(sb);                  strbuf_close(sb);
774          }          }
775          /*          /*
# Line 822  src2html(src, html, notsource) Line 825  src2html(src, html, notsource)
825                          fputs(gen_href_begin_with_title(dir, file, suffix, key, title), out);                          fputs(gen_href_begin_with_title(dir, file, suffix, key, title), out);
826                          fputs(title_included_from, out);                          fputs(title_included_from, out);
827                          fputs(gen_href_end(), out);                          fputs(gen_href_end(), out);
828                          fprintf(out, "%s\n", header_end);                          fputs_nl(header_end, out);
829                          fprintf(out, "%s\n", hr);                          fputs_nl(hr, out);
830                  }                  }
831                  /*                  /*
832                   * DEFINITIONS index.                   * DEFINITIONS index.
# Line 844  src2html(src, html, notsource) Line 847  src2html(src, html, notsource)
847                  if (strbuf_getlen(define_index) > 0) {                  if (strbuf_getlen(define_index) > 0) {
848                          fputs(header_begin, out);                          fputs(header_begin, out);
849                          fputs(title_define_index, out);                          fputs(title_define_index, out);
850                          fprintf(out, "%s\n", header_end);                          fputs_nl(header_end, out);
851                          fputs("This source file includes following definitions.\n", out);                          fputs_nl("This source file includes following definitions.", out);
852                          fprintf(out, "%s\n", list_begin);                          fputs_nl(list_begin, out);
853                          fputs(strbuf_value(define_index), out);                          fputs(strbuf_value(define_index), out);
854                          fprintf(out, "%s\n", list_end);                          fputs_nl(list_end, out);
855                          fprintf(out, "%s\n", hr);                          fputs_nl(hr, out);
856                  }                  }
857                  /*                  /*
858                   * print source code                   * print source code
# Line 881  src2html(src, html, notsource) Line 884  src2html(src, html, notsource)
884                          while (ent->exec_proc())                          while (ent->exec_proc())
885                                  ;                                  ;
886                  }                  }
887                  fprintf(out, "%s\n", verbatim_end);                  fputs_nl(verbatim_end, out);
888          }          }
889          fprintf(out, "%s\n", hr);          fputs_nl(hr, out);
890          fprintf(out, "%s\n", gen_name_string("BOTTOM"));          fputs_nl(gen_name_string("BOTTOM"), out);
891          fprintf(out, "%s/* ", comment_begin);          fputs(comment_begin, out);
892            fputs("/* ", out);
893          fputs(link_format(anchor_getlinks(-1)), out);          fputs(link_format(anchor_getlinks(-1)), out);
894          if (show_position)          if (show_position)
895                  fprintf(out, "%s[+%d %s]%s", position_begin, last_lineno, src, position_end);                  fprintf(out, "%s[+%d %s]%s", position_begin, last_lineno, src, position_end);
896          fprintf(out, " */%s\n", comment_end);          fputs(" */", out);
897          fprintf(out, "%s\n", body_end);          fputs_nl(comment_end, out);
898          fprintf(out, "%s\n", gen_page_end());          fputs_nl(body_end, out);
899            fputs_nl(gen_page_end(), out);
900          if (!notsource)          if (!notsource)
901                  anchor_unload();                  anchor_unload();
902          close_output_file(out);          close_output_file(out);

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

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