Can ANYONE tell me why this code snippet doesn't work??

Thomas Hameenaho thomas at uplog.se
Wed Oct 19 07:02:59 AEST 1988


In article <982 at mina.liu.se> mikpe at mina.liu.se (Mikael Pettersson) writes:
>Noooo!
>The great advantage in using varargs(3) is PORTABILITY. It's guaranteed
>to work in any conforming ANSI C implementation (where it's called <stdarg.h>)
>and it will work in virtually all existing UNIX C compilers as well.
>Assumptions about stack layout, parameter passing and order of evaluation
>will only lead to bugprone and non-portable code.

I agree fully with you. However not THAT many systems have v{sf}printf()
(BSD systems doesn't, at least not 4.3) and my response was an attempt 
to explain what was wrong with the code.
I would definately NOT try to manipulate the sp.
-- 
Real life:	Thomas Hameenaho		Email:	thomas at uplog.{se,uucp}
Snail mail:	TeleLOGIC Uppsala AB		Phone:	+46 18 189406
		Box 1218			Fax:	+46 18 132039
		S - 751 42 Uppsala, Sweden



More information about the Comp.lang.c mailing list