over-riding printf() in VM

Tim Rowledge tim at sumeru.stanford.edu
Mon Jun 16 00:03:42 UTC 2003


In various places in interp.c we have uses of printf() and putchar().
Since they go to the bit-bucket on my OS this is a bit pointless.

I'd like to over-ride printf() so I can do something more useful. I
could possibly change the VM code to use sprintf() to a string buffer
and then pass to a platform specific macro but that means spreading the
hassle (small though it be) to everyone playing with VM code. I feel
sure there should be some way to use var-args and vfprintf() etc to work
around this but damned if I can find anything actually helpful right
now. Has anyone actually done this and do yo uave a code snippet I can
borrow from? 

tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: TIO: Take It Over



More information about the Squeak-dev mailing list