Does anyone know why this is crashing??
Brian Fennell
fenn at wpi.WPI.EDU
Sun Jun 2 02:02:41 AEST 1991
In article <6240 at mahendo.Jpl.Nasa.Gov> robert at triton.JPL.NASA.GOV writes:
>I have this bit of code that works perfectly on a SPARC and crashes
>on a VMS (O/S- V5.3-A) system?!
>
>int
>init_files(startup_file,...)
> char *startup_file;
>{
>char buf[256];
>
>#define EOPEN "Unable to open %s file \"%s\"\n"
>(void) print_msg(PERROR,"init_files()",
> sprintf(buf,EOPEN,"startup",startup_file));
>
> - ------ - Robert Angelino
all sprintf's were not created equal (Thanks to the ANSI non-standard
standard) try changing:
sprintf(buf, ...... )
to
(sprintf(buf,.....) , buf)
Brian Fennell == fenn at wpi.wpi.edu
More information about the Comp.lang.c
mailing list