/[global]/global/htags-refkit/htags_path2url.c
ViewVC logotype

Diff of /global/htags-refkit/htags_path2url.c

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

revision 1.4 by shigio, Wed Aug 31 14:55:53 2005 UTC revision 1.5 by shigio, Tue Oct 4 07:59:04 2005 UTC
# Line 72  static char global_htmldir[MAXPATHLEN+1] Line 72  static char global_htmldir[MAXPATHLEN+1]
72   *              -4: cannot read FILEMAP.   *              -4: cannot read FILEMAP.
73   */   */
74  static int  static int
75  load_filemap_contents(file, area, size)  load_filemap_contents(const char *file, char **area, int *size)
         const char *file;  
         char **area;  
         int *size;  
76  {  {
77          struct stat st;          struct stat st;
78          char *p = NULL;          char *p = NULL;
# Line 111  err: Line 108  err:
108   * comparison function for bsearch().   * comparison function for bsearch().
109   */   */
110  static int  static int
111  cmp(s1, s2)  cmp(const void *s1, const void *s2)
         const void *s1;  
         const void *s2;  
112  {  {
113          return strcmp(((struct map *)s1)->name, ((struct map *)s2)->name);          return strcmp(((struct map *)s1)->name, ((struct map *)s2)->name);
114  }  }
# Line 129  cmp(s1, s2) Line 124  cmp(s1, s2)
124   *              -5: illegal format.   *              -5: illegal format.
125   */   */
126  static int  static int
127  create_filemap_index(area, size, map, lines)  create_filemap_index(char *area, int size, struct map **map, int *lines)
         char *area;  
         int size;  
         struct map **map;  
         int *lines;  
128  {  {
129          char *p, *endp = area + size;          char *p, *endp = area + size;
130          struct map *m;          struct map *m;
# Line 183  ferr: Line 174  ferr:
174   * unloads FILEMAP.   * unloads FILEMAP.
175   */   */
176  static void  static void
177  unload_filemap()  unload_filemap(void)
178  {  {
179          (void)free(global_map);          (void)free(global_map);
180          global_map = NULL;          global_map = NULL;
# Line 209  unload_filemap() Line 200  unload_filemap()
200   *                      -5: format error.   *                      -5: format error.
201   */   */
202  int  int
203  htags_load_filemap(dir)  htags_load_filemap(const char *dir)
         const char *dir;  
204  {  {
205          int status = 0;          int status = 0;
206          char *area;          char *area;
# Line 237  htags_load_filemap(dir) Line 227  htags_load_filemap(dir)
227   * unloads FILEMAP.   * unloads FILEMAP.
228   */   */
229  void  void
230  htags_unload_filemap()  htags_unload_filemap(void)
231  {  {
232          unload_filemap();          unload_filemap();
233  }  }
# Line 260  htags_unload_filemap() Line 250  htags_unload_filemap()
250   * URL: <html dir>/S/<file id>.html#<line number>   * URL: <html dir>/S/<file id>.html#<line number>
251   */   */
252  int  int
253  htags_path2url(path, line, url, size)  htags_path2url(const char *path, int line, char *url, int size)
         const char *path;  
         int line;  
         char *url;  
         int size;  
254  {  {
255          struct map tmp;          struct map tmp;
256          struct map *result;          struct map *result;
# Line 292  htags_path2url(path, line, url, size) Line 278  htags_path2url(path, line, url, size)
278   * $ _   * $ _
279   */   */
280  int  int
281  main(argc, argv)  main(int argc, char **argv)
         int argc;  
         char **argv;  
282  {  {
283          char url[MAXPATHLEN];          char url[MAXPATHLEN];
284          char *path, *html;          char *path, *html;

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