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

Diff of /global/htags/fileindex.c

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

revision 1.52 by shigio, Tue Nov 8 06:41:31 2005 UTC revision 1.53 by h-iwamoto, Tue Nov 8 17:22:43 2005 UTC
# Line 465  delete_stack(struct dirstack *sp) Line 465  delete_stack(struct dirstack *sp)
465  /* Main procedure                                                       */  /* Main procedure                                                       */
466  /*----------------------------------------------------------------------*/  /*----------------------------------------------------------------------*/
467  /*  /*
  * Encode URL.  
  *  
  *      i)      url     URL  
  *      r)              encoded URL  
  */  
 static const char *  
 encode(const char *url)  
 {  
         STATIC_STRBUF(sb);  
         const char *p;  
   
         strbuf_clear(sb);  
         for (p = url; *p; p++) {  
                 int c = (unsigned char)*p;  
   
                 if (isalnum(c))  
                         strbuf_putc(sb, c);  
                 else  
                         strbuf_sprintf(sb, "%%%02x", c);  
         }  
   
         return strbuf_value(sb);  
 }  
 /*  
468   * extract_lastname: extract the last name of include line.   * extract_lastname: extract the last name of include line.
469   *   *
470   *      i)      image   source image of include   *      i)      image   source image of include
# Line 777  makefileindex(const char *file, STRBUF * Line 753  makefileindex(const char *file, STRBUF *
753                  strbuf_reset(sb);                  strbuf_reset(sb);
754                  if (!no_order_list)                  if (!no_order_list)
755                          strbuf_puts(sb, item_begin);                          strbuf_puts(sb, item_begin);
756                    strbuf_puts(sb, gen_href_begin_with_title_target(count_stack(dirstack) ? upperdir(SRCS) : SRCS, path2fid(_), HTML, NULL, _, target));
                 {  
                         char tmp[1024];  
                         const char *file, *suffix = NULL, *dir = NULL;  
   
                         if (gp->type == GPATH_OTHER && dynamic) {  
                                 if (!(*action == '/' || count_stack(dirstack) == 0))  
                                         dir = "..";  
                                 snprintf(tmp, sizeof(tmp), "%s?pattern=%s%stype=source",  
                                         action, encode(_), quote_amp);  
                                 file = tmp;  
                         } else {  
                                 dir = count_stack(dirstack) ? upperdir(SRCS) : SRCS;  
                                 file = path2fid(_);  
                                 suffix = HTML;  
                         }  
                         strbuf_puts(sb, gen_href_begin_with_title_target(dir, file, suffix, NULL, _, target));  
                 }  
757                  if (icon_list) {                  if (icon_list) {
758                          const char *lang, *suffix, *text_icon;                          const char *lang, *suffix, *text_icon;
759    

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

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