Subversion Repositories SvarDOS

Rev

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

Rev 2206 Rev 2207
Line 792... Line 792...
792
 
792
 
793
    do {
793
    do {
794
      /* filter out files with uninteresting attributes */
794
      /* filter out files with uninteresting attributes */
795
      if (filter_attribs(dta, req.attrfilter_must, req.attrfilter_may) == 0) continue;
795
      if (filter_attribs(dta, req.attrfilter_must, req.attrfilter_may) == 0) continue;
796
 
796
 
-
 
797
      /* /B hides . and .. entries */
-
 
798
      if ((req.format == DIR_OUTPUT_BARE) && (dta->fname[0] == '.')) continue;
-
 
799
 
797
      /* normalize "size" of directories to zero because kernel returns garbage
800
      /* normalize "size" of directories to zero because kernel returns garbage
798
       * sizes for directories which might confuse the sorting routine later */
801
       * sizes for directories which might confuse the sorting routine later */
799
      if (dta->attr & DOS_ATTR_DIR) dta->size = 0;
802
      if (dta->attr & DOS_ATTR_DIR) dta->size = 0;
800
 
803
 
801
      _fmemcpy(&(dtabuf[dtabufcount]), ((char *)dta) + 22, sizeof(struct TINYDTA));
804
      _fmemcpy(&(dtabuf[dtabufcount]), ((char *)dta) + 22, sizeof(struct TINYDTA));
Line 814... Line 817...
814
    } while (findnext(dta) == 0);
817
    } while (findnext(dta) == 0);
815
 
818
 
816
    /* no match? kein gluck! (this can happen when filtering attribs with /A:xxx
819
    /* no match? kein gluck! (this can happen when filtering attribs with /A:xxx
817
     * because while findfirst() succeeds, all entries can be rejected) */
820
     * because while findfirst() succeeds, all entries can be rejected) */
818
    if (dtabufcount == 0) {
821
    if (dtabufcount == 0) {
-
 
822
      if (req.flags & DIR_FLAG_RECUR) goto CHECK_RECURS;
819
      nls_outputnl_doserr(2); /* "File not found" */
823
      nls_outputnl_doserr(2); /* "File not found" */
820
      goto GAMEOVER;
824
      goto GAMEOVER;
821
    }
825
    }
822
 
826
 
823
    /* sort the list - the tricky part is that my array is a far address while
827
    /* sort the list - the tricky part is that my array is a far address while
Line 837... Line 841...
837
  for (;;) {
841
  for (;;) {
838
 
842
 
839
    /* filter out attributes (skip if entry comes from buffer, then it was already veted) */
843
    /* filter out attributes (skip if entry comes from buffer, then it was already veted) */
840
    if (filter_attribs(dta, req.attrfilter_must, req.attrfilter_may) == 0) goto NEXT_ENTRY;
844
    if (filter_attribs(dta, req.attrfilter_must, req.attrfilter_may) == 0) goto NEXT_ENTRY;
841
 
845
 
-
 
846
    /* /B hides . and .. entries */
-
 
847
    if ((req.format == DIR_OUTPUT_BARE) && (dta->fname[0] == '.')) continue;
-
 
848
 
842
    /* turn string lcase (/L) */
849
    /* turn string lcase (/L) */
843
    if (req.flags & DIR_FLAG_LCASE) _strlwr(dta->fname); /* OpenWatcom extension, probably does not care about NLS so results may be odd with non-A-Z characters... */
850
    if (req.flags & DIR_FLAG_LCASE) _strlwr(dta->fname); /* OpenWatcom extension, probably does not care about NLS so results may be odd with non-A-Z characters... */
844
 
851
 
845
    summary_fcount++;
852
    summary_fcount++;
846
    if ((dta->attr & DOS_ATTR_DIR) == 0) summary_totsz += dta->size;
853
    if ((dta->attr & DOS_ATTR_DIR) == 0) summary_totsz += dta->size;