delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2012/05/06/13:59:51

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Date: Sun, 06 May 2012 20:41:30 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: NULL pointer support for freopen
In-reply-to: <201205061806.08510.juan.guerrero@gmx.de>
X-012-Sender: halo1 AT inter DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-id: <83397d4379.fsf@gnu.org>
References: <201205061806 DOT 08510 DOT juan DOT guerrero AT gmx DOT de>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
> Date: Sun, 6 May 2012 18:06:08 +0200
> 
> I have tried to implement the case when a NULL pointer is passed as filename.
> Because DOS does not allow to change file descriptor flags of open files, only
> the change of textmode using setmode() is supported.  Any other function call
> with a NULL pointer as filename argument will fail with EBADF.
> Please note that a different file acces mode will make the call fail,
> e.g.: if the new mode is O_WRONLY but the old mode was O_RDWR then the call
> will fail.  No file access mode is allowed.
> Suggestions, objections, comments are welcome.

Thanks, this looks good to me.  Just one comment: you call the mode
"textmode", but the documentation of 'setmode' calls it just "mode".
I suggest to do the same for consistency.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019