🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #207

va_list in stdio.h

#207
From: Andrew Walduck
Date: Mon, 13 Apr 1992 11:12
35 lines
1579 bytes
I'm currently developing a set of header files for ANSI C. 
One thing I noticed is that in stdio.h, there are several functions that
accept a parameter of type va_list (vprintf, vsprintf, vfprintf). Yet...nowhere
in the standard does it say that stdio.h defines the type va_list.
So I'm assuming that stdio.h does NOT define type va_list...
and I can just use my hidden type (__va_list) in its place...

This is my implemention...is it correct??

...in xximpl.h xx

typedef void* __va_list;

...in stdarg.h

#include <xximpl.h>
typedef __va_list va_list;

...in stdio.h

#include <xximpl.h>
int vfprintf(FILE*, const char*, __va_list);
int vprintf(const char*, __va_list);
int vsprintf(char*, const char*, __va_list);

Thanx
Andrew Walduck
P.S. Yes...I know...I do use the #ifndef #define #endif wrappers around my
     include files... to protect against multiple definitions and
inclusions! ;-)

Andrew Walduck -- OMRON Japan -- andrew@lsa.ncl.omron.co.jp 
-------------------------------------------------------------------------------
Henry Spencer says "Retch barf." 
-------------------------------------------------------------------------------
Technical Details
Message-ID: <1408@frf.omron.co.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!astemgw!relay-omron!frf!lsa.ncl.omron.co.jp!andrew

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!astemgw!relay-omron!frf!lsa.ncl.omron.co.jp!andrew
From: andrew@lsa.ncl.omron.co.jp (Andrew Walduck)
Newsgroups: comp.std.c
Subject: va_list in stdio.h
Keywords: standard interpretation
Message-ID: <1408@frf.omron.co.jp>
Date: 13 Apr 92 11:12:55 GMT
Sender: news@frf.omron.co.jp
Reply-To: andrew@lsa.ncl.omron.co.jp (Andrew Walduck)
Lines: 35