Subversion Repositories SvarDOS

Rev

Rev 2202 | Rev 2204 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2202 Rev 2203
Line 692... Line 692...
692
  NEXT_ITER: /* re-entry point for /S recursing */
692
  NEXT_ITER: /* re-entry point for /S recursing */
693
 
693
 
694
  summary_fcount = 0;
694
  summary_fcount = 0;
695
  summary_totsz = 0;
695
  summary_totsz = 0;
696
 
696
 
-
 
697
  /* if dir: append a backslash (also get its len) */
-
 
698
  i = path_appendbkslash_if_dir(buf->path);
-
 
699
 
-
 
700
  /* if ends with a \ then append ????????.??? */
-
 
701
  if (buf->path[i - 1] == '\\') strcat(buf->path, "????????.???");
-
 
702
 
-
 
703
  /* ask DOS for list of files, but only with allowed attribs */
-
 
704
  i = findfirst(dta, buf->path, req.attrfilter_may);
-
 
705
 
-
 
706
  /* print "directory of" unless /B or /S mode with no match */
697
  if (req.format != DIR_OUTPUT_BARE) {
707
  if ((req.format != DIR_OUTPUT_BARE) && (((req.flags & DIR_FLAG_RECUR) == 0) || (i == 0))) {
-
 
708
    unsigned char t;
698
    sprintf(buf->buff64, svarlang_str(37,20)/*"Directory of %s"*/, buf->path);
709
    sprintf(buf->buff64, svarlang_str(37,20)/*"Directory of %s"*/, buf->path);
699
    /* trim at first '?', if any */
710
    /* trim at first '?', if any */
700
    for (i = 0; buf->buff64[i] != 0; i++) if (buf->buff64[i] == '?') buf->buff64[i] = 0;
711
    for (t = 0; buf->buff64[t] != 0; t++) if (buf->buff64[t] == '?') buf->buff64[t] = 0;
701
    outputnl(buf->buff64);
712
    outputnl(buf->buff64);
702
    outputnl("");
713
    outputnl("");
703
    if (req.flags & DIR_FLAG_PAUSE) {
714
    if (req.flags & DIR_FLAG_PAUSE) {
704
      dir_pagination(&availrows);
715
      dir_pagination(&availrows);
705
      dir_pagination(&availrows);
716
      dir_pagination(&availrows);
706
    }
717
    }
707
  }
718
  }
708
 
719
 
709
  /* if dir: append a backslash (also get its len) */
-
 
710
  i = path_appendbkslash_if_dir(buf->path);
-
 
711
 
-
 
712
  /* if ends with a \ then append ????????.??? */
720
  /* if no file match then abort */
713
  if (buf->path[i - 1] == '\\') strcat(buf->path, "????????.???");
-
 
714
 
-
 
715
  /* ask DOS for list of files, but only with allowed attribs */
-
 
716
  i = findfirst(dta, buf->path, req.attrfilter_may);
-
 
717
  if (i != 0) {
721
  if (i != 0) {
718
    if (req.flags & DIR_FLAG_RECUR) goto CHECK_RECURS;
722
    if (req.flags & DIR_FLAG_RECUR) goto CHECK_RECURS;
719
    nls_outputnl_doserr(i);
723
    nls_outputnl_doserr(i);
720
    goto FAIL;
724
    goto FAIL;
721
  }
725
  }
Line 879... Line 883...
879
  }
883
  }
880
 
884
 
881
  /* print out summary (unless bare output mode) */
885
  /* print out summary (unless bare output mode) */
882
  if (req.format != DIR_OUTPUT_BARE) {
886
  if (req.format != DIR_OUTPUT_BARE) {
883
    dir_print_summary_files(buf->buff64, uint32maxlen, summary_totsz, summary_fcount, &availrows, req.flags, &(buf->nls));
887
    dir_print_summary_files(buf->buff64, uint32maxlen, summary_totsz, summary_fcount, &availrows, req.flags, &(buf->nls));
-
 
888
    /* extra linefeed if /S mode */
-
 
889
    if (req.flags & DIR_FLAG_RECUR) {
-
 
890
      outputnl("");
-
 
891
      dir_pagination(&availrows);
-
 
892
    }
884
  }
893
  }
885
 
894
 
886
  /* update global counters in case /s is used */
895
  /* update global counters in case /s is used */
887
  summary_recurs_fcount += summary_fcount;
896
  summary_recurs_fcount += summary_fcount;
888
  summary_recurs_totsz += summary_totsz;
897
  summary_recurs_totsz += summary_totsz;