Path: utzoo!mnetor!uunet!husc6!bbn!rochester!cornell!batcomputer!sun.soe.clarkson.edu!nelson From: nelson@sun.soe.clarkson.edu (Russ Nelson) Newsgroups: comp.binaries.ibm.pc Subject: Re: Yet another directory lister, part 1 of 2 Message-ID: <704@sun.soe.clarkson.edu> Date: 11 Apr 88 03:20:39 GMT References: <2605@saturn.ucsc.edu> Reply-To: nelson@sun.soe.clarkson.edu.UUCP (Russ Nelson) Distribution: na Organization: Clarkson University, Potsdam, NY Lines: 32 In article <2605@saturn.ucsc.edu> spcecdt@ucscb.UCSC.EDU (Space Cadet) writes: >Who knows, maybe it does something the others don't... >it does recursive listings, various sorts, searches for files >with specific attributes, etc. Yeah, and it does it slowly, too. I made the following patch and it runs as fast as the built-in dir and it does all the neat gizzies, too. Now if only someone could modify it to use getswitchar() so that it works if you use switchar=-. *** bak/dimain.c --- dimain.c ************** *** 39,44 EntryListType EntryList; /* Matching files found in a dir */ char *Vars[80]; /* Value of env var */ setcbrk(1); /* Turn on cntrl-brk checking at all DOS interupts */ More(-1); /* Initialize More() to disabled */ Files = NULL; /* Initialize Files to null list */ --- 39,45 ----- EntryListType EntryList; /* Matching files found in a dir */ char *Vars[80]; /* Value of env var */ + setvbuf(stdout, NULL, _IOLBF, 0x200); setcbrk(1); /* Turn on cntrl-brk checking at all DOS interupts */ More(-1); /* Initialize More() to disabled */ Files = NULL; /* Initialize Files to null list */ -- -russ AT&T: (315)268-6591 BITNET: NELSON@CLUTX Internet: nelson@clutx.clarkson.edu GEnie: BH01 Compu$erve: 70441,205