Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!rutgers!gatech!hubcap!ncrcae!ncr-sd!hp-sdd!ucsdhub!jack!man!nusdhub!rwhite From: rwhite@nusdhub.UUCP (Robert C. White Jr.) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: Re: Determining the names of devices installed in DOS Message-ID: <134@nusdhub.UUCP> Date: Fri, 16-Oct-87 15:41:22 EDT Article-I.D.: nusdhub.134 Posted: Fri Oct 16 15:41:22 1987 Date-Received: Sun, 18-Oct-87 08:33:35 EDT References: <1801@killer.UUCP> <4717@iucs.UUCP> Organization: National University, San Diego Lines: 17 Summary: only sort of redundant Xref: mnetor comp.sys.ibm.pc:9160 comp.lang.c:4973 In article <4717@iucs.UUCP>, bobmon@iucs.UUCP (RAMontante [condition that I not be identified]) writes: > TurboC's doc. for stat and fstat indicate that they return (among other > things) a bitmask which includes and S_IFREG flag for ordinary files; fstat > also returns S_IFCHR to (redundantly?) indicate a device. I think they did this to make testing easier, or at least more obvious to the less machine-guts-aware programmers [to whom the price of turbo-C would allow possibly the first hope of a C compiler with documentation.] If you did a little testing, I think you would find that these two flags are complements of eachother. [That is, I can't think when they would not be] Rob.