home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / compress / zoosrc20.zoo / zoolist.c < prev    next >
C/C++ Source or Header  |  1989-07-25  |  19KB  |  596 lines

  1. #ifndef LINT
  2. /* @(#) zoolist.c 2.27 88/08/15 11:03:16 */
  3. static char sccsid[]="@(#) zoolist.c 2.27 88/08/15 11:03:16";
  4. #endif /* LINT */
  5.  
  6. /*
  7. If TRACE_LIST is defined, any list command may be followed
  8. by 'D' to show verbose information about each directory
  9. entry in the archive.   Do not define both TRACE_LIST and
  10. TRACE_IO else a symbol conflict will occur and in any case
  11. duplicate information will be dumped.
  12. */
  13.  
  14. /* #define TRACE_LIST */
  15.  
  16. /*
  17. Copyright (C) 1986, 1987 Rahul Dhesi -- All rights reserved
  18. (C) Copyright 1988 Rahul Dhesi -- All rights reserved
  19. */
  20. #include "options.h"
  21. #include "portable.h"
  22. #include "zoomem.h"  /* to get ZOOCOUNT */
  23.  
  24. /* Lists files in archive */
  25. #include "zoo.h"
  26. #include "errors.i"
  27. #include "zooio.h"
  28. #include "various.h"
  29. #include "zoofns.h"
  30.  
  31. #ifdef TRACE_LIST
  32. void show_dir PARMS ((struct direntry *direntry));
  33. static int trace_list = 0;
  34. #endif /* TRACE_LIST */
  35.  
  36. static char tot_fmt[] = "%8lu %3u%% %8lu  %4d file";
  37. static char tot_line[] =
  38.    /* "------------  --------  ---  --------  --------- --------\n"; */
  39.    "--------  --- --------  --------- --------\n";
  40.  
  41. static char dbl_percent[] = "Archive %s:  %s";
  42.  
  43. extern int quiet;                /* assumed initialized to zero */
  44.  
  45. #ifdef LINT_ARGS
  46. void show_comment (struct direntry *, ZOOFILE, int, char *);
  47. int ver_too_high (struct zoo_header *);
  48. int needed (char *, struct direntry *, struct zoo_header *);
  49. void printtz (int);
  50. #else
  51. void show_comment ();
  52. int ver_too_high ();
  53. int needed ();
  54. void printtz ();
  55. #endif
  56.  
  57. void zoolist (argv, option, argc)
  58. char **argv, *option;
  59. int argc;
  60. {
  61. char whichname[PATHSIZE];  /* which name to use */
  62. char *this_zoo;            /* currently matched archive name */
  63. register ZOOFILE zoo_file;
  64. char *flist[ZOOCOUNT];       /* list of ptrs to input archive names */
  65. int fptr;                  /* will point to within list of archive names */
  66.  
  67. struct direntry direntry;
  68. struct zoo_header zoo_header;
  69. int size_factor;
  70. unsigned long tot_org_siz = 0L, tot_siz_now = 0L;
  71. int   tot_sf;
  72. int file_count = 0;
  73. int del_count = 0;                  /* number of deleted entries */
  74. int bad_pack;                 /* 1 if packing method is unknown */
  75. static char *month_list="000JanFebMarAprMayJunJulAugSepOctNovDec";
  76. static char dashes[] = "------------\n";
  77. int year, month, day, hours, min, sec;
  78. int list_deleted = 0;         /* list deleted files too */
  79. int fast = 0;                 /* fast list */
  80. long fiz_ofs = 0;             /* offset where to start */
  81. long dat_ofs = 0;             /* ... data offset of file data */
  82. int verb_list = 0;            /* if verbose listing needed */
  83. int show_name = 0;            /* if archive name to be included in listing */
  84. int show_crc = 0;                    /* if crc should be listed */
  85. int zoocount = 1;             /* number of archives to list */
  86. int biglist = 0;              /* multiarchive listing */
  87. int one_col = 0;                    /* one column listing requested */
  88. int showdir = 0;                    /* show directory name in fast listing */
  89. int longest;                  /* length of longest archive name */
  90. int talking;                        /* opposite of quiet */
  91. int column = 0;               /* for column printing */
  92. int first_ever = 1;                /* first time ever -- very special case */
  93. int neednl = 0;                    /* whether to print a newline */
  94. int need_acmt = 0;                /* show archive comment */
  95. int show_gen = 0;                    /* show generation count */
  96. int genson = 1;                    /* enable/disable generations */
  97. #ifdef FATTR
  98. int show_mode = 0;                /* show file protection */
  99. #endif
  100. int first_dir = 1;                /* if first direntry -- to adjust dat_ofs */
  101.  
  102. while (*option) {
  103.    switch (*option) {
  104.       case 'a': show_name++; break;
  105. #ifdef TRACE_LIST
  106.         case 'D': trace_list++; break;
  107. #endif /* TRACE_LIST */
  108.       case 'd': list_deleted++; break;
  109.       case 'f': fast++; break;
  110.         case 'g': show_gen++; break;
  111.         case '/': showdir++; break;
  112.         case 'A':
  113.         case 'v': need_acmt++; break;
  114.       case 'V': need_acmt++; /* fall through */
  115.       case 'c': verb_list++; break;
  116.         case 'C': show_crc++; break;
  117.       case 'l': break;
  118.       case 'L': biglist++; zoocount = argc; break;
  119. #ifdef FATTR
  120.         case 'm': show_mode++; break;
  121. #endif
  122.         case '1': one_col++; break;
  123.         case '+': genson = 1; break;
  124.         case '-': genson = 0; break;
  125.         /* following code same as in zooext.c */
  126.       case '@':     /* if @m,n specified, fiz_ofs = m, dat_ofs = n */
  127.             {
  128.                 char *comma_pos;
  129.                 ++option;
  130.                 comma_pos = strchr(option, ',');
  131.                 if (comma_pos != NULL) {
  132.                     dat_ofs = calc_ofs (comma_pos + 1);
  133.                     *comma_pos = '\0';
  134.                 }
  135.                 fiz_ofs = calc_ofs(option); 
  136.                 goto no_more;
  137.             }
  138.         case 'q': quiet++; break;
  139.       default:
  140.          prterror ('w', option_ignored, *option);
  141.    }
  142.    option++;
  143. }
  144.  
  145. no_more:  /* come from exit from while loop above */
  146.  
  147. if (fast && show_name) {      /* don't allow 'a' with 'f' */
  148.    show_name = 0;
  149.    prterror ('w', option_ignored, 'a');
  150. }
  151.  
  152. talking = !quiet;                    /* for convenience */
  153.  
  154. #ifdef WILDCARD
  155.    /* For each archive name supplied, if it is not a char range and
  156.       does not contain a dot, append "*.zoo". */
  157.    {
  158.       int i;
  159.       for (i = 0; i < argc;  i++) {
  160.          if (strchr (nameptr (argv[i]), EXT_CH) == NULL && 
  161.                            !match_half (nameptr (argv[0]), "?-?"))
  162.             argv[i] = newcat (argv[i], "*.zoo");
  163.       }
  164.    }
  165. #endif
  166.  
  167. makelist (zoocount, argv, flist,        ZOOCOUNT-2,   (char *) NULL,".","..", &longest);
  168. /*        ^argc     ^argv ^list_pointer ^max_no_files   ^exclude */
  169.  
  170. for (fptr = 0;  (this_zoo = flist[fptr]) != NULL; fptr++) {
  171.    int ercount;                  /* count of errors */
  172.    int entrycount;               /* count of directory entries */
  173.    int expl_deleted;             /* explain what D means */
  174.    int expl_comment;             /* explain what comment means */
  175.    int expl_ver;                 /* Explain what V means */
  176.    int expl_star;                /* Explain what * means */
  177.    int first_time;               /* first time through loop for an archive */
  178.  
  179.    ercount = entrycount = del_count =
  180.       expl_deleted = expl_comment = expl_ver = expl_star = 0;
  181.  
  182.     if (talking)
  183.         column = 0;                        /* if quiet, names will run together */
  184.  
  185.    first_time = 1;
  186.  
  187. #ifndef WILDCARD
  188.    /* Add default extension if none supplied */
  189.    if (strchr (nameptr (this_zoo), EXT_CH) == NULL)
  190.       this_zoo = newcat (this_zoo, EXT_DFLT);
  191. #endif
  192.  
  193.    zoo_file = zooopen (this_zoo, Z_READ);
  194.  
  195.    if (zoo_file == NOFILE) {
  196.       prterror ('e', could_not_open, this_zoo);
  197.       continue;
  198.    } else if (!show_name && talking)
  199.       printf ("\nArchive %s:\n", this_zoo);
  200.    
  201. if (fiz_ofs != 0L) {                /* if offset specified, start there */
  202.     prterror ('m', start_ofs, fiz_ofs, dat_ofs);
  203.    zooseek (zoo_file, fiz_ofs, 0);
  204. } else {
  205.    if (frd_zooh (&zoo_header, zoo_file) == -1 ||
  206.                                              zoo_header.zoo_tag != ZOO_TAG) {
  207.       prterror ('e', dbl_percent, this_zoo, invalid_header);
  208.       goto loop_end;
  209.    }
  210. #if 0
  211.     if (talking && (!show_name || verb_list || need_acmt))
  212. #else
  213.     if (need_acmt && talking)
  214. #endif
  215.     {
  216.         void show_acmt PARMS ((struct zoo_header *, ZOOFILE, int));
  217.         show_acmt (&zoo_header, zoo_file, 0);        /* show archive comment */
  218.     }
  219.  
  220.    /* Seek to the beginning of the first directory entry */
  221.    if (zooseek (zoo_file, zoo_header.zoo_start, 0) != 0) {
  222.       ercount++;
  223.       prterror ('e', dbl_percent, this_zoo, bad_directory);
  224.       goto loop_end;
  225.    }
  226.    if (!show_name && ver_too_high (&zoo_header)) {
  227.       ercount++;
  228.       if (ercount < 2)
  229.          prterror ('M', wrong_version, 
  230.                                         zoo_header.major_ver, zoo_header.minor_ver);
  231.    }
  232. } /* end if (fiz_ofs !- 0L) */
  233.  
  234.    /* Now we print information about each file in the archive */
  235.    
  236.    if (!show_name) { /* initialize for each file only if not disk catalog */
  237.       tot_org_siz = 0L;  
  238.       tot_siz_now = 0L;
  239.       file_count = 0;
  240.       del_count = 0;
  241.    }
  242.  
  243.    while (1) {
  244.       if (readdir (&direntry, zoo_file, 0) == -1) {
  245.          prterror ('F', dbl_percent, this_zoo, bad_directory);
  246.          goto givesummary;
  247.       }
  248.       if (direntry.zoo_tag != ZOO_TAG) {
  249.          long currpos, zoolength;
  250.          prterror ('F', dbl_percent, this_zoo, invalid_header);
  251.          if ((currpos = zootell (zoo_file)) != -1L)
  252.             if (zooseek (zoo_file, 0L, 2) == 0)
  253.                if ((zoolength = zootell (zoo_file)) != -1L)
  254.                   printf (cant_process, zoolength - currpos);              
  255.          goto givesummary;
  256.       }
  257.    
  258.       if (direntry.next == 0L)      /* EXIT on end of chain */
  259.          break;                                 
  260.       else
  261.          entrycount++;              /* Number of directory entries */
  262.         /* first direntry read, change dat_ofs from abs. pos. to rel. offset */
  263.         if (first_dir && dat_ofs != 0) {
  264.             dat_ofs -= direntry.offset;
  265.             first_dir = 0;
  266.         }
  267.         direntry.next += dat_ofs;                /* allow for user-specified offset */
  268.         if (direntry.comment != 0L)
  269.             direntry.comment += dat_ofs;        /* so show_comment finds it */
  270.    
  271.       if (direntry.deleted)
  272.          ++del_count;
  273.  
  274. #ifdef TRACE_LIST
  275.         if (trace_list)
  276.             show_dir (&direntry);
  277. #endif /* TRACE_LIST */
  278.       
  279.         /* Into `whichname' put the filename to display. Use long filename if 
  280.         it exists, else use short filename.  */
  281.             strcpy (whichname, fullpath (&direntry));
  282.             if (zoo_header.vdata & VFL_ON)
  283.                 add_version (whichname, &direntry);    /* add version suffix */
  284. #ifdef DEBUG
  285.       printf("matching against [%s] and [%s]\n", 
  286.                nameptr(whichname), whichname);
  287. #endif
  288.  
  289.       if ( ( (list_deleted && direntry.deleted) ||
  290.                (list_deleted < 2 && !direntry.deleted)
  291.            ) 
  292.               && (biglist || needed(whichname, &direntry, &zoo_header))) {
  293.             /* if generations forced off, then strip added version field */
  294.             if (!genson) {    /* HORRENDOUSLY INEFFICIENT AND REPETITIOUS */
  295.                 char *ver_pos;
  296.                 ver_pos = findlast (whichname, VER_DISPLAY);
  297.                 if (ver_pos != NULL)
  298.                     *ver_pos = '\0';
  299.             }
  300.    
  301.          file_count++;
  302.    
  303.          if (direntry.packing_method > MAX_PACK) {
  304.             bad_pack = 1;
  305.             expl_ver = 1;
  306.          }  else
  307.             bad_pack = 0;
  308.       
  309.          size_factor = cfactor (direntry.org_size, direntry.size_now);
  310.    
  311.          year  =  ((unsigned int) direntry.date >> 9) & 0x7f;
  312.          month =  ((unsigned int) direntry.date >> 5) & 0x0f;
  313.          day   =  direntry.date        & 0x1f;
  314.    
  315.          hours =  ((unsigned int) direntry.time >> 11)& 0x1f;
  316.          min   =  ((unsigned int) direntry.time >> 5) & 0x3f;
  317.          sec   =  ((unsigned int) direntry.time & 0x1f) * 2;
  318.    
  319.             /* Alignment in columns is a horrendously complex undertaking. */
  320.  
  321.          if (fast) {
  322.                 int space_left;
  323.                 int namelen;
  324.                 int next_col;
  325. #if 0
  326.             if ( (quiet && !first_ever || !first_time) && one_col)
  327.                fputchar ('\n');
  328.                 first_ever = 0;
  329. #endif
  330.                 /* If we are showing directories, whichname already contains the
  331.                 full pathname string.  Else we only use the filename as follows:
  332.                 long filename if possible, else short filename */
  333.                 if (!showdir) {
  334.                    strcpy (whichname, 
  335.                       (direntry.namlen != 0) ? direntry.lfname : direntry.fname);
  336.                     if (genson && zoo_header.vdata & VFL_ON)
  337.                         add_version (whichname, &direntry);    /* add version suffix */
  338.                 }
  339.                 namelen = strlen (whichname);
  340.  
  341. #define MARGIN            78
  342. #define COL_WIDTH        16
  343. #if 1
  344.                 /* if not enough space left, move to next line */
  345.                 if (!one_col && column != 0) {
  346.                     space_left = MARGIN - column;
  347.                     if (namelen > space_left) {
  348.                         neednl = 1;
  349.                         column = 0;
  350.                     }
  351.                 }
  352. #endif
  353.             if ( (quiet && !first_ever || !first_time) && (neednl || one_col))
  354.                     printf ("\n");
  355.                 first_ever = 0;
  356.                 neednl = 0;
  357.  
  358.             printf("%s", whichname);
  359.                 fflush (stdout);
  360.                 /* move to next column stop */
  361.                 column += namelen;
  362.                 next_col = ((column + (COL_WIDTH - 1)) / COL_WIDTH) * COL_WIDTH;
  363.                 if (next_col - column < 2)        /* need at least 2 spaces */
  364.                     next_col += COL_WIDTH;
  365.                 if (next_col > MARGIN) {
  366.                     neednl = 1;
  367.                     column = 0;
  368.                 } else {
  369.                     if (!one_col)
  370.                         printf ("%*s", (next_col - column), " ");
  371.                     column = next_col;
  372.                 }
  373.    
  374.          } else {
  375.             if (talking && first_time && !show_name) {/*print archive header */
  376.                printf ("Length    CF  Size Now  Date      Time\n");
  377.                printf (tot_line);
  378.             }
  379.             printf ("%8lu %3u%% %8lu  %2d %-.3s %02d %02d:%02d:%02d",  
  380.                      direntry.org_size, 
  381.                      size_factor, direntry.size_now, 
  382.                      day, &month_list[month*3], 
  383.                      (day && month) ?  (year+80) % 100 : 0,
  384.                      hours, min, sec);
  385.                tot_org_siz += direntry.org_size;
  386.                tot_siz_now += direntry.size_now;
  387. #ifdef GETTZ
  388.                 printtz ((int) direntry.tz);    /* show timezone */
  389. #else
  390.                 printf (" ");
  391. #endif
  392.  
  393.                 if (show_crc)
  394.                     printf ("%04x ", direntry.file_crc);
  395.                 if (show_gen) {
  396.                     if (direntry.vflag & VFL_ON)
  397.                         printf ("%2dg ", direntry.vflag & VFL_GEN);
  398.                     else
  399.                         printf ("--g ");
  400.                 }
  401.    
  402.             if (direntry.cmt_size) {
  403.                expl_comment++;
  404.                printf ("C");
  405.             } else
  406.                printf (" ");
  407.    
  408.             if (direntry.deleted) {
  409.                expl_deleted++;
  410.                printf ("D");
  411.             }  else
  412.                printf (" ");
  413.             if (list_deleted)
  414.                printf (" ");
  415.             if (show_name)
  416.                printf ("%-*s ", longest, this_zoo);
  417.  
  418. #ifdef FATTR
  419.                 if (show_mode) {
  420.                     if (direntry.fattr == 0)
  421.                         printf ("--- ");
  422.                     else if ((direntry.fattr >> 22) == 1)
  423.                         printf ("%03o ", direntry.fattr & 0x1ff);
  424.                     else
  425.                         printf ("??? ");
  426.                 }
  427. #endif /* FATTR */
  428.  
  429.                 /* new code to get around a common compiler bug */
  430.                 printf ("%s", whichname);
  431.                 if (direntry.dir_crc != 0) {
  432.                     expl_star++;
  433.                     printf ("*");
  434.                 }
  435.  
  436.             if (bad_pack)
  437.                printf (" (V%d.%d)", direntry.major_ver, direntry.minor_ver);
  438.             printf ("\n");
  439.          }
  440.          first_time = 0;
  441.    
  442.          /* if verbose listing requested show any comment.  f overrrides v */
  443.          if (verb_list && !fast)
  444.             show_comment (&direntry, zoo_file, 0, (char *) NULL);
  445.       } /* end if (lots of conditions) */
  446.    
  447.         /* ..seek to next dir entry */
  448.       zooseek (zoo_file, direntry.next, 0);
  449.    } /* end while */
  450.    
  451.    givesummary:
  452.    
  453.     if (fast && talking) {
  454.        if (file_count) {
  455.            if (del_count || (show_gen && zoo_header.type > 0))
  456.               printf ("\n-----\n");
  457.             else
  458.               fputchar ('\n');
  459.         }
  460.         if (del_count)
  461.             printf ("%d deleted.\n", del_count);
  462.         if (show_gen && zoo_header.type > 0) {
  463.             printf ("Generation limit %u",
  464.                         zoo_header.vdata & VFL_GEN);
  465.             if ((zoo_header.vdata & VFL_ON) == 0)
  466.                 printf (" (off).\n");
  467.             else
  468.                 printf (".\n");
  469.         }
  470.     } /* end if (fast && talking) */
  471.  
  472.    if (talking && !show_name) {
  473.       if (!fast && file_count) {
  474.          tot_sf = cfactor (tot_org_siz, tot_siz_now);
  475.          printf (tot_line);
  476.       
  477.          printf (tot_fmt, tot_org_siz, tot_sf, tot_siz_now, file_count);
  478.             if (file_count > 1)
  479.                 printf ("s\n");
  480.             else
  481.                 printf ("\n");
  482.          
  483.          if (del_count || expl_ver || expl_deleted || expl_comment ||
  484.                     expl_star || (show_gen && (zoo_header.type > 0)))
  485.             printf (dashes);
  486.       }
  487.    
  488.       if (!fast) {
  489.          if (del_count) {
  490.             if (expl_deleted)
  491.                printf ("D: deleted file.\n");
  492.             else {
  493.                if (del_count == 1)
  494.                   printf ("There is 1 deleted file.\n");
  495.                else
  496.                   printf ("There are %d deleted files.\n", del_count);
  497.             }
  498.          }
  499.       }
  500.       if (expl_comment && !fast && !verb_list) 
  501.          printf ("C: file has attached comment.\n");
  502.       if (expl_ver && !fast)
  503.          printf ("V: minimum version of Zoo needed to extract this file.\n");
  504.       if (expl_star && !fast)
  505.          printf ("*: directory entry may be corrupted.\n");
  506.       if (!file_count)
  507.          printf ("Zoo:  %s", no_match);
  508.       
  509.       if (!entrycount && !fiz_ofs)
  510.          printf ("(The archive is empty.)\n");
  511.         if (show_gen && (zoo_header.type > 0) && !fast) {
  512.             printf ("Archive generation limit is %u",
  513.                         zoo_header.vdata & VFL_GEN);
  514.             if ((zoo_header.vdata & VFL_ON) == 0)
  515.                 printf (" (generations off).\n");
  516.             else
  517.                 printf (".\n");
  518.         }
  519.    } /* end if (talking && !show_name) */
  520. loop_end:            /* jump here on badly structured archive */
  521.    zooclose (zoo_file);
  522. } /* end for */
  523.  
  524. if (talking && show_name) {
  525.    if (file_count) {
  526.       tot_sf = cfactor (tot_org_siz, tot_siz_now);
  527.       printf (tot_line);
  528.       printf (tot_fmt, tot_org_siz, tot_sf, tot_siz_now, file_count);
  529.         if (file_count > 1)
  530.             printf ("s\n");
  531.         else
  532.             printf ("\n");
  533.    } 
  534. } else if (fast && quiet)
  535.     fputchar ('\n');
  536.     
  537.  
  538. if (!file_count)
  539.    zooexit (1);            /* Consider it an error if there were no files */
  540. } /* zoolist() */
  541.  
  542. #ifdef GETTZ
  543. void printtz (file_tz)
  544. int file_tz;
  545. {
  546.     long gettz();
  547.     int diff_tz;                /* timezone difference */
  548.     if (file_tz == NO_TZ)     /* if no timezone stored ..*/
  549.         printf ("   ");            /* .. just pad with blanks */
  550.     else {
  551.         diff_tz = (file_tz / 4) - (int) (gettz() / 3600);
  552.         if (diff_tz == 0)
  553.             printf ("   ");                    /* print nothing if same */
  554.         else if (diff_tz > 0)            /* else print signed difference */
  555.             printf ("+%1d ", diff_tz);
  556.         else
  557.             printf ("-%1d ", -diff_tz);
  558.     }
  559. }
  560. #endif
  561.  
  562. /*
  563. FOLLOWING CODE IS FOR DEBUGGING ONLY.  IT IS COMPILED IN ONLY
  564. IF THE SYMBOL TRACE_LIST IS DEFINED
  565. */
  566.  
  567. #ifdef TRACE_LIST
  568. /* code copied from portable.c near end */
  569. /* dump contents of directory entry */
  570. void show_dir (direntry)
  571. struct direntry *direntry;
  572. {
  573.    printf ("Directory entry for file [%s][%s]:\n",
  574.             direntry->fname, direntry->lfname);
  575.    printf ("tag = [%8lx] type = [%d] PM = [%d] Next = [%8lx] Offset = [%8lx]\n",
  576.             direntry->zoo_tag, (int) direntry->type, 
  577.             (int) direntry->packing_method, direntry->next, 
  578.             direntry->offset);
  579.    printf ("Orig size = [%ld] Size now = [%ld] dmaj_v.dmin_v = [%d.%d]\n",
  580.          direntry->org_size, direntry->size_now,
  581.          (int) direntry->major_ver, (int) direntry->minor_ver);
  582.    printf ("Struc = [%d] DEL = [%d] comment_offset = [%8lx] cmt_size = [%d]\n",
  583.          (int) direntry->struc, (int) direntry->deleted, direntry->comment,
  584.          direntry->cmt_size);
  585.    printf ("var_dir_len = [%d] TZ = [%d] dir_crc = [%4x]\n",
  586.             direntry->var_dir_len, (int) direntry->tz, direntry->dir_crc);
  587.    printf ("system_id = [%d]  dirlen = [%d]  namlen = [%d] fattr=[%24lx]\n", 
  588.         direntry->system_id, direntry->dirlen, direntry->namlen, direntry->fattr);
  589.     printf ("vflag = [%4x] version_no = [%4x]\n",
  590.                 direntry->vflag, direntry->version_no);
  591.    if (direntry->dirlen > 0)
  592.       printf ("dirname = [%s]\n", direntry->dirname);
  593.    printf ("---------\n");
  594. }
  595. #endif   /* TRACE_IO */
  596.