X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: 06 Jan 2004 08:14:02 +0200 Message-Id: From: Eli Zaretskii To: Esa A E Peuha CC: djgpp-workers AT delorie DOT com In-reply-to: (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: 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 Precedence: bulk > Date: Mon, 5 Jan 2004 13:39:45 +0200 (EET) > From: Esa A E Peuha > > 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.