Message-ID: <38A4D3B0.6C292ED8@sgi.net> From: John & Susie X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: __file_tree_walk problem?? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 121 Date: Fri, 11 Feb 2000 22:29:52 -0500 NNTP-Posting-Host: 209.166.131.95 X-Complaints-To: abuse AT stargate DOT net X-Trace: news.sgi.net 950326226 209.166.131.95 (Fri, 11 Feb 2000 22:30:26 EST) NNTP-Posting-Date: Fri, 11 Feb 2000 22:30:26 EST Organization: Stargate Industries, LLC To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com The following short program is lifted out Rhide's libc help (headers added) and compiled in Rhide with GCC: /******* filewalk.c *********/ #include #include #include #include #include int ff_walker(const char *path, const struct ffblk *ff) { printf("%s:\t%lu\t", path, ff->ff_fsize); if (ff->ff_attrib & 1) printf("R"); if (ff->ff_attrib & 2) printf("H"); if (ff->ff_attrib & 4) printf("S"); if (ff->ff_attrib & 8) printf("V"); if (ff->ff_attrib & 0x10) printf("D"); if (ff->ff_attrib & 0x20) printf("A"); printf("\n"); if (strcmp(ff->ff_name, "XXXXX") == 0) return 42; return 0; } int main(int argc, char *argv[]) { char msg[80]; if (argc > 1) { sprintf(msg, "__file_tree_walk: %d", __file_tree_walk(argv[1], ff_walker)); if (errno) perror(msg); else puts(msg); } else printf("Usage: %s dir\n", argv[0]); return 0; } /***** end filewalker.c ******/ This is a sampling of the output (tmp.txt) run in DOS 6.x (d: is a 450~ MB FAT16 partition) from the command line as follows: filewalk d:\ >tmp.txt d:./C___TU~1/HTML/CONTAI~1/Bf: 4294967295 RHSV <<----- ???? d:./C___TU~1/HTML/CONTAI~1/i: 6881383 RHSV <<----- ???? d:./C___TU~1/HTML/CONTAI~1/INSERT~1.GIF: 20981 A d:./C___TU~1/HTML/CONTAI~1/DELLIST.GIF: 2676 A d:./C___TU~1/HTML/CONTAI~1/QUEUE.GIF: 2034 A d:./C___TU~1/HTML/CONTAI~1/STACK: 0 D d:./C___TU~1/HTML/CONTAI~1/STACK/STACK.GIF: 2424 A d:./C___TU~1/HTML/Be: 4294967295 RHSV <<<---- ???? d:./C___TU~1/HTML/t: 7536755 RHSV <<<---- ???? d:./C___TU~1/HTML/TEMPLA~1: 0 D d:./C___TU~1/HTML/TEMPLA~1/TREE.GIF: 2999 A d:./C___TU~1/PDF: 0 D d:./C___TU~1/PDF/B.: 4294967295 RHSV <<---- ???? d:./C___TU~1/PDF/c: 6684772 RHSV <<---- ???? d:./C___TU~1/PDF/CPLUSP~1.ZIP: 1786956 A d:./RG_QSORT.C: 7036 A d:./LL_QSORT.C: 2498 A d:./SNIPSORT.H: 1461 A d:./LL_MSORT.C: 2122 A d:./RG_ISORT.C: 1150 A d:./UNTITLED.TXT: 626 A d:./Bg: 4294967295 RHSV <<---------------???? d:./f: 7340138 RHSV <<---------------------???? d:./FLOPPY~1.JPG: 52079 A __file_tree_walk: 0 The problem: The files flagged <<------- ??? don't exist! In fact about 1/3 of the files reported don't exist. How do I separate the wheat from the chaff?