delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2012/12/21/11:02:23

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Authenticated: #27081556
X-Provags-ID: V01U2FsdGVkX1+oChIX1Puo9qU3IUe8Fe9DBZxbbrrMHjj1Emcg+7
k5tV9/XRAMr+gE
Message-ID: <50D48246.7010706@gmx.de>
Date: Fri, 21 Dec 2012 16:37:42 +0100
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Question about va_* macros
X-Y-GMX-Trusted: 0
Reply-To: djgpp AT delorie DOT com

I am interesting in recognize the end of the argument list of functions like
printf and scanf when they are accessed using va_* macros.  I have traversed
the list (stack) using va_arg and observed that the list seems to end with a
NULL pointer.  The question arises if the finalizing of the list with a NULL
pointer can be taken for granted or not.  Please note that I am aware that
info doc of the va_* macros tells that the user must provide a mechanism to
determinate the end of the list usually either by a NULL pointer or by some
counter or something else.  I am especially interested in how it works for
_doprnt and _doscan.

TIA

Juan M. Guerrero

- Raw text -


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