[gnu.gcc] twm vs. gcc, writable strings and sscanf.

paul@UUNET.UU.NET (Paul Hudson) (04/05/89)

Many implementations of sscanf do write into the format string,
although they always write what's already there. This is because
historically the string variants of printf and scanf have been done by
faking a FILE struct to have the string as the buffer contents (yuk!),
and ungetc when called in the bowels of the functions writes the
character back into the buffer.

The better way of doing it is to pass function pointers for
get-a-character, put-back-a-characer.

Paul Hudson 

Snail mail: Monotype ADG	Email:	...!ukc!acorn!moncam!paul
	    Science Park,		paul@moncam.co.uk
	    Milton Road,	"Sun Microsysytems:
	    Cambridge,		 The Company is Arrogant (TM)"
	    CB4 4FQ