Date: Mon, 24 Nov 1997 21:37:31 -0500 (EST) Message-Id: <199711250237.VAA28621@delorie.com> From: DJ Delorie To: randym AT acm DOT org CC: djgpp-workers AT delorie DOT com In-reply-to: <3.0.1.32.19971124145854.007b56c0@yacker.xiotech.com> (message from Randy Maas on Mon, 24 Nov 1997 14:58:54 -0600) Subject: Re: some proposed "new" fsext c files Precedence: bulk > /* > Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details > Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details > Modified: 1997, Randall Maas. based on the _open example, and the > majority of code here is from DJ Delorie's copy code from _link. > */ Wrong format. > #ifdef __DJGPP__ > #include > #else > #include "fsext.h" > #endif Of course, __DJGPP__ is always defined, so this is redundant. > int _copy(const char* path1, const char* path2) What's the purpose of this? > # if defined(S_ISREG) > /* Fail if path1 is not a regular file -- assume it is on platforms without S_ISREG concept*/ This test is pointless, since you know you're using DJGPP. > int > _dup2(int fd, int newfd) Why can't this just be dup()? Why add the overhead of an extra function call? > /* > Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details > Written 1997, Randall Maas. > */ > #include > #include > > int _FSEXT_nop(int handle) What's the purpose of this? I can't see anyone purposefully calling it. > int _link(const char* src, const char* dest) Why can't this code just be in link() in the first place? > off_t > _lseek(int handle, off_t offset, int whence) Same here. > int > _unlink(const char *fn) Same here.