/[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.4 by h-iwamoto, Wed Sep 8 14:10:40 2004 UTC revision 1.5 by shigio, Sat Oct 16 04:25:23 2004 UTC
# Line 80  char *quote_space; Line 80  char *quote_space;
80  char *hr;  char *hr;
81  char *br;  char *br;
82  /*  /*
83   * HTML tag.   * Set up HTML tags.
84   */   */
85  void  void
86  setup_html()  setup_html()
# Line 122  setup_html() Line 122  setup_html()
122          br              = "<BR>";          br              = "<BR>";
123  }  }
124  /*  /*
125   * XHTML tag.   * Set up XHTML tags.
126     * (under construction)
127   */   */
128  void  void
129  setup_xhtml()  setup_xhtml()
# Line 130  setup_xhtml() Line 131  setup_xhtml()
131          setup_html();          setup_html();
132  }  }
133  /*  /*
134   * TEX tag.   * Set up TEX tags.
135     * (under construction)
136   */   */
137  void  void
138  setup_tex()  setup_tex()
139  {  {
140          setup_html();          setup_html();
141  }  }
142  char *  /*
143  header_record(title)   * Generate meta record.
144          char *title;   */
 {  
         static char buf[1024];  
   
         snprintf(buf, sizeof(buf), "%s\n%s%s%s\n%s%s\n",  
                 head_begin, title_begin, title, title_end, meta_record(), head_end);  
         return buf;  
 }  
145  char *  char *
146  meta_record()  meta_record()
147  {  {
# Line 157  meta_record() Line 152  meta_record()
152          snprintf(buf, sizeof(buf), "<%s>\n<%s CONTENT='GLOBAL-%s'>\n", s1, s2, get_version());          snprintf(buf, sizeof(buf), "<%s>\n<%s CONTENT='GLOBAL-%s'>\n", s1, s2, get_version());
153          return buf;          return buf;
154  }  }
155    /*
156     * Generate <Hn> ... </Hn> tag.
157     */
158  char *  char *
159  Hn(n, label)  Hn(n, label)
160          int n;          int n;
# Line 170  Hn(n, label) Line 168  Hn(n, label)
168          snprintf(buf, sizeof(buf), "<H%d>%s</H%d>", n, label, n);          snprintf(buf, sizeof(buf), "<H%d>%s</H%d>", n, label, n);
169          return buf;          return buf;
170  }  }
171    /*
172     * Generate anchor tag.
173     */
174  char *  char *
175  anchor(label, link)  anchor(label, link)
176          char *label;          char *label;
# Line 191  edit_buffer() Line 192  edit_buffer()
192          return sb;          return sb;
193  }  }
194    
195    /*
196     * Generate header tag.
197     */
198  char *  char *
199  set_header(title)  set_header(title)
200          char *title;          char *title;
# Line 207  set_header(title) Line 211  set_header(title)
211          return strbuf_value(sb);          return strbuf_value(sb);
212  }  }
213    
   
214  /*  /*
215   * list_begin:   * Generate list begin tag.
216   */   */
217  char *  char *
218  gen_list_begin()  gen_list_begin()
# Line 229  gen_list_begin() Line 232  gen_list_begin()
232          return strbuf_value(sb);          return strbuf_value(sb);
233  }  }
234  /*  /*
235   * list_body:   * Generate list body.
236   *   *
237   * s must be choped.   * s must be choped.
238   */   */
# Line 308  gen_list_body(srcdir, string) Line 311  gen_list_body(srcdir, string)
311          return p;          return p;
312  }  }
313  /*  /*
314   * list_end:   * Generate list end tag.
315   */   */
316  char *  char *
317  gen_list_end()  gen_list_end()
# Line 322  gen_list_end() Line 325  gen_list_end()
325          return strbuf_value(sb);          return strbuf_value(sb);
326  }  }
327    
328    /*
329     * Decide whether or not the path is binary file.
330     *
331     *      i)      path
332     *      r)      0: is not binary, 1: is binary
333     */
334  int  int
335  is_binary(path)  is_binary(path)
336          char *path;          char *path;
# Line 346  is_binary(path) Line 355  is_binary(path)
355          }          }
356          return 0;          return 0;
357  }  }
358    /*
359     * Encode URL.
360     *
361     *      i)      url     URL
362     *      r)              encoded URL
363     */
364  char *  char *
365  encode(url)  encode(url)
366          char *url;          char *url;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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