www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2004/01/06/01:15:58

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Date: 06 Jan 2004 08:14:02 +0200
Message-Id: <uwu85d2ol.fsf@elta.co.il>
From: Eli Zaretskii <eliz AT elta DOT co DOT il>
To: Esa A E Peuha <peuha AT cc DOT helsinki DOT fi>
CC: djgpp-workers AT delorie DOT com
In-reply-to: <Pine.OSF.4.58.0401051334160.4628@sirppi.helsinki.fi> (message
from Esa A E Peuha on Mon, 5 Jan 2004 13:39:45 +0200 (EET))
Subject: Re: Use of FILE in sprintf/sscanf
References: <Pine DOT OSF DOT 4 DOT 58 DOT 0401051334160 DOT 4628 AT sirppi DOT helsinki DOT fi>
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

> Date: Mon, 5 Jan 2004 13:39:45 +0200 (EET)
> From: Esa A E Peuha <peuha AT cc DOT helsinki DOT fi>
> 
> The sprintf and sscanf funcion families use FILE objects to point to
> strings.  However, there is no reason why these functions should know
> what is inside FILE

True, although hiding FILE from library internals is IMHO not a very
important goal.

> RCS file: /cvs/djgpp/djgpp/include/libc/file.h,v
> retrieving revision 1.11
> diff -c -r1.11 file.h
> *** include/libc/file.h	4 Feb 2003 20:24:58 -0000	1.11
> --- include/libc/file.h	5 Jan 2004 11:34:05 -0000
> ***************
> *** 104,109 ****
> --- 104,132 ----
>     return __putc_raw(x,p);
>   }
> 
> + static __inline__ void __sopenw(FILE *p, char *str, int len)

I'd prefer not to have this on a header file.  I don't like included
files that define executable code; for one, they make debugging
harder.

I'm sure a way can be found to use your code without putting it on a
header file, though.

- Raw text -


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