/[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.27 by shigio, Wed Mar 30 02:02:00 2005 UTC revision 1.28 by shigio, Sat Apr 2 01:27:52 2005 UTC
# Line 118  get_lang_entry(lang) Line 118  get_lang_entry(lang)
118  static FILE *out;  static FILE *out;
119  static FILE *in;  static FILE *in;
120    
121  static STRBUF *outbuf;  STATIC_STRBUF(outbuf);
122  static char *curpfile;  static char *curpfile;
123  static int warned;  static int warned;
124  static int last_lineno;  static int last_lineno;
# Line 177  open_output_file(file) Line 177  open_output_file(file)
177                  if (!op)                  if (!op)
178                          die("cannot create file '%s'.", file);                          die("cannot create file '%s'.", file);
179          }          }
180          if (!outbuf)          strbuf_init(outbuf);
                 outbuf = strbuf_open(0);  
         else  
                 strbuf_reset(outbuf);  
181          return op;          return op;
182  }  }
183  /*  /*
# Line 234  fill_anchor(root, path) Line 231  fill_anchor(root, path)
231          char *root;          char *root;
232          char *path;          char *path;
233  {  {
234          static STRBUF *sb = NULL;          STATIC_STRBUF(sb);
235          char buf[MAXBUFLEN], *limit, *p;          char buf[MAXBUFLEN], *limit, *p;
236    
237          if (sb)          strbuf_init(sb);
                 strbuf_reset(sb);  
         else  
                 sb = strbuf_open(0);  
238          strlimcpy(buf, path, sizeof(buf));          strlimcpy(buf, path, sizeof(buf));
239          for (p = buf; *p; p++)          for (p = buf; *p; p++)
240                  if (*p == sep)                  if (*p == sep)
# Line 282  char * Line 276  char *
276  link_format(ref)  link_format(ref)
277          int ref[A_SIZE];          int ref[A_SIZE];
278  {  {
279          static STRBUF *sb = NULL;          STATIC_STRBUF(sb);
280          char **label = icon_list ? anchor_comment : anchor_label;          char **label = icon_list ? anchor_comment : anchor_label;
281          char **icons = anchor_icons;          char **icons = anchor_icons;
282          int i;          int i;
283    
284          if (sb)          strbuf_init(sb);
                 strbuf_reset(sb);  
         else  
                 sb = strbuf_open(0);  
285          for (i = 0; i < A_LIMIT; i++) {          for (i = 0; i < A_LIMIT; i++) {
286                  if (i == A_INDEX) {                  if (i == A_INDEX) {
287                          strbuf_puts(sb, gen_href_begin("..", "mains", normal_suffix, NULL));                          strbuf_puts(sb, gen_href_begin("..", "mains", normal_suffix, NULL));
# Line 329  char * Line 320  char *
320  generate_guide(lineno)  generate_guide(lineno)
321          int lineno;          int lineno;
322  {  {
323          static STRBUF *sb = NULL;          STATIC_STRBUF(sb);
324          int i = 0;          int i = 0;
325    
326          if (!sb)          strbuf_init(sb);
                 sb = strbuf_open(0);  
         else  
                 strbuf_reset(sb);  
327          if (definition_header == RIGHT_HEADER)          if (definition_header == RIGHT_HEADER)
328                  i = 4;                  i = 4;
329          else if (nflag)          else if (nflag)
# Line 366  tooltip(type, lno, opt) Line 354  tooltip(type, lno, opt)
354          int lno;          int lno;
355          char *opt;          char *opt;
356  {  {
357          static STRBUF *sb = NULL;          STATIC_STRBUF(sb);
358    
359          if (!sb)          strbuf_init(sb);
                 sb = strbuf_open(0);  
         else  
                 strbuf_reset(sb);  
360          if (lno > 0) {          if (lno > 0) {
361                  if (type == 'I')                  if (type == 'I')
362                          strbuf_puts(sb, "Included from");                          strbuf_puts(sb, "Included from");
# Line 728  src2html(src, html, notsource) Line 713  src2html(src, html, notsource)
713          fputs(header_begin, out);          fputs(header_begin, out);
714          fputs(fill_anchor(indexlink, src), out);          fputs(fill_anchor(indexlink, src), out);
715          if (cvsweb_url) {          if (cvsweb_url) {
716                  static STRBUF *sb = NULL;                  STATIC_STRBUF(sb);
717                  char *p;                  char *p;
718    
719                  if (sb)                  strbuf_init(sb);
                         strbuf_reset(sb);  
                 else  
                         sb = strbuf_open(0);  
720                  strbuf_puts(sb, cvsweb_url);                  strbuf_puts(sb, cvsweb_url);
721                  for (p = src; *p; p++) {                  for (p = src; *p; p++) {
722                          int c = (unsigned char)*p;                          int c = (unsigned char)*p;
# Line 794  src2html(src, html, notsource) Line 776  src2html(src, html, notsource)
776                  char *basename;                  char *basename;
777                  struct data *incref;                  struct data *incref;
778                  struct anchor *ancref;                  struct anchor *ancref;
779                  static STRBUF *define_index = NULL;                  STATIC_STRBUF(define_index);
780    
781                  /*                  /*
782                   * INCLUDED FROM index.                   * INCLUDED FROM index.
# Line 846  src2html(src, html, notsource) Line 828  src2html(src, html, notsource)
828                  /*                  /*
829                   * DEFINITIONS index.                   * DEFINITIONS index.
830                   */                   */
831                  if (define_index)                  strbuf_init(define_index);
                         strbuf_reset(define_index);  
                 else  
                         define_index = strbuf_open(0);  
832                  for (ancref = anchor_first(); ancref; ancref = anchor_next()) {                  for (ancref = anchor_first(); ancref; ancref = anchor_next()) {
833                          if (ancref->type == 'D') {                          if (ancref->type == 'D') {
834                                  char tmp[32];                                  char tmp[32];

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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