fix to 4.2BSD sccstorcs

Geoffrey Collyer geoff at utcsstat.UUCP
Tue Apr 3 15:21:51 AEST 1984


The sccstorcs converter delivered with 4.2BSD exercises a long-standing
printf bug when used to convert an SCCS archive containing a long delta
commentary.  printf(3S) in the BUGS section says ``Very wide fields
(>128 characters) fail.''

For some inexplicable reason, the author of sccstorcs chose to use
fprintf to write unadorned strings.  He should have used fputs
instead.  Diffs follow (line numbers are approximate, as usual):
276c277
<     fprintf (pd, "%s", description ? description : "\n");
---
>     fputs(description ? description : "\n", pd);
313c314
< 		fprintf (pd, delta -> commentary);
---
> 		fputs(delta -> commentary, pd);

Geoff Collyer, U. of Toronto



More information about the Comp.unix.wizards mailing list