Bug in csh (history, "!a%100s"). Report and Fix.
Allyn Fratkin
allyn at hp-sdd.hp.com
Mon Jul 10 03:26:11 AEST 1989
In article <769 at sbsvax.UUCP>, greim at sbsvax.UUCP (Michael Greim) writes:
> This fix works like this:
> - in error only a string ending in "@" is passed as format string
> to printf.
> - only internal error messages needing arguments need format specifiers,
> so I add a trailing "@" to any such message
> - any string not ending with "@" is passed to printf with "%s" as first
> parameter.
nothing personal, but what a disgusting hack. you use @ as the *last*
character of the string to indicate the presence of a second parameter?
wouldn't it have been much easier to use the first char?
but why didn't you just change the calls
error(singlearg);
to
error("%s", singlearg);
seems like it would have been much cleaner.
(you could have done it with sed! but i won't get into that now :-) )
--
From the virtual mind of Allyn Fratkin allyn at sdd.hp.com
San Diego Division - or -
Hewlett-Packard Company uunet!ucsd!hp-sdd!allyn
More information about the Comp.sources.bugs
mailing list