2 ms·
I've used a C compiler[1] that implements old K&R semantics without "...". In fact, I used it to write a printf just last week[2]. All you need to do is make a
by philwelch 17y ago
I've used a C compiler[1] that implements old K&R semantics without "...". In fact, I used it to write a printf just last week[2]. All you need to do is make a pointer to one of the arguments and increment the pointer to take in variable arguments--which is exactly what this code does. The difference is, the compiler I used didn't require any parameters except fmt to be explicitly declared.
[1] http://linux.die.net/man/1/bcc http://linux.die.net/man/1/bcc
[2] http://philwelch.net/io.c http://philwelch.net/io.c
(Why do I have experience with strange, non-compliant 16 bit C compilers? Because I have an eccentric professor for my operating systems class, apparently.)