/[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.45 by shigio, Wed Sep 7 04:21:54 2005 UTC revision 1.46 by shigio, Tue Oct 4 07:59:04 2005 UTC
# Line 75  static SLIST_HEAD(, file) file_q; Line 75  static SLIST_HEAD(, file) file_q;
75   * You can get file pointer any time using select_file_queue() with path.   * You can get file pointer any time using select_file_queue() with path.
76   */   */
77  static FILE *  static FILE *
78  open_file_queue(path)  open_file_queue(const char *path)
         const char *path;  
79  {  {
80          struct file *file = (struct file *)malloc(sizeof(struct file));          struct file *file = (struct file *)malloc(sizeof(struct file));
81    
# Line 110  open_file_queue(path) Line 109  open_file_queue(path)
109   *                      NULL: path not found.   *                      NULL: path not found.
110   */   */
111  static FILE *  static FILE *
112  select_file_queue(path)  select_file_queue(const char *path)
         const char *path;  
113  {  {
114          struct file *file;          struct file *file;
115    
# Line 127  select_file_queue(path) Line 125  select_file_queue(path)
125   *      i)      path    path name   *      i)      path    path name
126   */   */
127  static void  static void
128  close_file_queue(path)  close_file_queue(const char *path)
         const char *path;  
129  {  {
130          struct file *file;          struct file *file;
131    
# Line 215  settrace(void) Line 212  settrace(void)
212   *      i)      sp      stack descriptor   *      i)      sp      stack descriptor
213   */   */
214  void  void
215  static dump_stack(sp, label)  static dump_stack(struct dirstack *sp, const char *label)
         struct dirstack *sp;  
         const char *label;  
216  {  {
217          char *start = sp->start;          char *start = sp->start;
218          char *last = sp->last - 1;          char *last = sp->last - 1;
# Line 239  static dump_stack(sp, label) Line 234  static dump_stack(sp, label)
234   *      r)              stack descriptor   *      r)              stack descriptor
235   */   */
236  static struct dirstack *  static struct dirstack *
237  make_stack(name)  make_stack(const char *name)
         const char *name;  
238  {  {
239          struct dirstack *sp = (struct dirstack *)malloc(sizeof(struct dirstack));          struct dirstack *sp = (struct dirstack *)malloc(sizeof(struct dirstack));
240          if (!sp)          if (!sp)
# Line 269  make_stack(name) Line 263  make_stack(name)
263   *   *
264   */   */
265  static void  static void
266  set_stack(sp, path)  set_stack(struct dirstack *sp, const char *path)
         struct dirstack *sp;  
         const char *path;  
267  {  {
268          int length = strlen(path) + 1;          int length = strlen(path) + 1;
269          char *p;          char *p;
# Line 304  set_stack(sp, path) Line 296  set_stack(sp, path)
296   *      i)      s       string   *      i)      s       string
297   */   */
298  static void  static void
299  push_stack(sp, s)  push_stack(struct dirstack *sp, const char *s)
         struct dirstack *sp;  
         const char *s;  
300  {  {
301          int length = strlen(s) + 1;          int length = strlen(s) + 1;
302    
# Line 332  push_stack(sp, s) Line 322  push_stack(sp, s)
322   *      r)              string   *      r)              string
323   */   */
324  static const char *  static const char *
325  top_stack(sp)  top_stack(struct dirstack *sp)
         struct dirstack *sp;  
326  {  {
327          char *start = sp->start;          char *start = sp->start;
328          char *last = sp->last;          char *last = sp->last;
# Line 361  top_stack(sp) Line 350  top_stack(sp)
350   *      r)              string   *      r)              string
351   */   */
352  static const char *  static const char *
353  next_stack(sp, cur)  next_stack(struct dirstack *sp, const char *cur)
         struct dirstack *sp;  
         const char *cur;  
354  {  {
355          char *last = sp->last;          char *last = sp->last;
356    
# Line 383  next_stack(sp, cur) Line 370  next_stack(sp, cur)
370   *      r)              string   *      r)              string
371   */   */
372  static const char *  static const char *
373  pop_stack(sp)  pop_stack(struct dirstack *sp)
         struct dirstack *sp;  
374  {  {
375          char *last = (char *)top_stack(sp);          char *last = (char *)top_stack(sp);
376          int length = strlen(last) + 1;          int length = strlen(last) + 1;
# Line 405  pop_stack(sp) Line 391  pop_stack(sp)
391   *      r)              string   *      r)              string
392   */   */
393  static const char *  static const char *
394  shift_stack(sp)  shift_stack(struct dirstack *sp)
         struct dirstack *sp;  
395  {  {
396          char *start = sp->start;          char *start = sp->start;
397          char *last = sp->last;          char *last = sp->last;
# Line 433  shift_stack(sp) Line 418  shift_stack(sp)
418   *      i)      from    stack descriptor   *      i)      from    stack descriptor
419   */   */
420  static void  static void
421  copy_stack(to, from)  copy_stack(struct dirstack *to, struct dirstack *from)
         struct dirstack *to;  
         struct dirstack *from;  
422  {  {
423          char *start = from->start;          char *start = from->start;
424          char *last = from->last;          char *last = from->last;
# Line 455  copy_stack(to, from) Line 438  copy_stack(to, from)
438   *      r)              path name   *      r)              path name
439   */   */
440  static const char *  static const char *
441  join_stack(sp)  join_stack(struct dirstack *sp)
         struct dirstack *sp;  
442  {  {
443          char *start = sp->start;          char *start = sp->start;
444          char *last = sp->last - 1;          char *last = sp->last - 1;
# Line 475  join_stack(sp) Line 457  join_stack(sp)
457   *      i)      sp      stack descriptor   *      i)      sp      stack descriptor
458   */   */
459  static void  static void
460  delete_stack(sp)  delete_stack(struct dirstack *sp)
         struct dirstack *sp;  
461  {  {
462          free(sp);          free(sp);
463  }  }
# Line 490  delete_stack(sp) Line 471  delete_stack(sp)
471   *      r)              encoded URL   *      r)              encoded URL
472   */   */
473  static const char *  static const char *
474  encode(url)  encode(const char *url)
         const char *url;  
475  {  {
476          STATIC_STRBUF(sb);          STATIC_STRBUF(sb);
477          const char *p;          const char *p;
# Line 516  encode(url) Line 496  encode(url)
496   *      r)              last name   *      r)              last name
497   */   */
498  static const char *  static const char *
499  extract_lastname(image, is_php)  extract_lastname(const char *image, int is_php)
         const char *image;  
         int is_php;  
500  {  {
501          static char buf[MAXBUFLEN];          static char buf[MAXBUFLEN];
502          const char *p;          const char *p;
# Line 604  extract_lastname(image, is_php) Line 582  extract_lastname(image, is_php)
582   *      o)      files   *      o)      files
583   */   */
584  int  int
585  makefileindex(file, files)  makefileindex(const char *file, STRBUF *files)
         const char *file;  
         STRBUF *files;  
586  {  {
587          FILE *FIND, *FILEMAP, *FILES, *STDOUT, *op = NULL;          FILE *FIND, *FILEMAP, *FILES, *STDOUT, *op = NULL;
588          char *_;          char *_;

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

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