/[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.18 by shigio, Thu Mar 31 14:57:48 2005 UTC revision 1.19 by shigio, Sat Apr 2 01:27:52 2005 UTC
# Line 195  gen_page_begin(title, subdir) Line 195  gen_page_begin(title, subdir)
195          char *title;          char *title;
196          int subdir;          int subdir;
197  {  {
198          static STRBUF *sb = NULL;          STATIC_STRBUF(sb);
199          char *dir = subdir ? "../" : "";          char *dir = subdir ? "../" : "";
200    
201          if (sb == NULL)          strbuf_init(sb);
                 sb = strbuf_open(0);  
         else  
                 strbuf_reset(sb);  
202          if (enable_xhtml) {          if (enable_xhtml) {
203                  strbuf_puts(sb, "<?xml version='1.0' encoding='ISO-8859-1'?>\n");                  strbuf_puts(sb, "<?xml version='1.0' encoding='ISO-8859-1'?>\n");
204                  strbuf_sprintf(sb, "<?xml-stylesheet type='text/css' href='%sstyle.css'?>\n", dir);                  strbuf_sprintf(sb, "<?xml-stylesheet type='text/css' href='%sstyle.css'?>\n", dir);
# Line 306  gen_href_begin_with_title_target(dir, fi Line 303  gen_href_begin_with_title_target(dir, fi
303          const char *title;          const char *title;
304          const char *target;          const char *target;
305  {  {
306          static STRBUF *sb = NULL;          STATIC_STRBUF(sb);
307    
308          if (sb == NULL)          strbuf_init(sb);
                 sb = strbuf_open(0);  
         else  
                 strbuf_reset(sb);  
309          /*          /*
310           * Construct URL.           * Construct URL.
311           * href='dir/file.suffix#key'           * href='dir/file.suffix#key'
# Line 421  gen_list_body(srcdir, string) Line 415  gen_list_body(srcdir, string)
415          char *srcdir;          char *srcdir;
416          char *string;          char *string;
417  {  {
418          static STRBUF *sb = NULL;          STATIC_STRBUF(sb);
419          char *name, *lno, *filename, *line, *fid;          char *name, *lno, *filename, *line, *fid;
420          char *p;          char *p;
421          SPLIT ptable;          SPLIT ptable;
422    
423          if (sb == NULL)          strbuf_init(sb);
                 sb = strbuf_open(0);  
         else  
                 strbuf_reset(sb);  
424          if (split(string, 4, &ptable) < 4) {          if (split(string, 4, &ptable) < 4) {
425                  recover(&ptable);                  recover(&ptable);
426                  die("too small number of parts in list_body().\n'%s'", string);                  die("too small number of parts in list_body().\n'%s'", string);
# Line 585  char * Line 576  char *
576  encode(url)  encode(url)
577          char *url;          char *url;
578  {  {
579          static STRBUF *sb = NULL;          STATIC_STRBUF(sb);
580          char *p;          char *p;
581    
582          if (sb)          strbuf_init(sb);
                 strbuf_reset(sb);  
         else  
                 sb = strbuf_open(0);  
583          for (p = url; *p; p++) {          for (p = url; *p; p++) {
584                  int c = (unsigned char)*p;                  int c = (unsigned char)*p;
585    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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