[brlcad-commits] CVS: brlcad/src/libbu bomb.c,14.24,14.25
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: Erik G. <eri...@us...> - 2007-08-30 19:04:46
|
Update of /cvsroot/brlcad/brlcad/src/libbu In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27472 Modified Files: bomb.c Log Message: change fprintf to fputs/fputc to further reduce allocation possibilities Index: bomb.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/libbu/bomb.c,v retrieving revision 14.24 retrieving revision 14.25 diff -w -u -r14.24 -r14.25 --- bomb.c 10 Jul 2007 18:35:54 -0000 14.24 +++ bomb.c 30 Aug 2007 19:04:44 -0000 14.25 @@ -129,9 +129,9 @@ * buffer allocations inside fprintf(). */ if (str && (strlen(str) > 0)) { - fprintf(stderr, "\n"); - fprintf(stderr, str); - fprintf(stderr, "\n"); + fputc('\n', stderr); + fputs(str, stderr); + fputc('\n', stderr); fflush(stderr); } @@ -178,9 +178,9 @@ { snprintf(tracefile, 512, "%s-%d-bomb.log", bu_getprogname(), bu_process_id()); - fprintf(stderr, "Saving stack trace to "); - fprintf(stderr, tracefile); - fprintf(stderr, "\n"); + fputs("Saving stack trace to ", stderr); + fputs(racefile, stderr); + fputc('\n', stderr, "\n"); fflush(stderr); bu_crashreport(tracefile); @@ -192,8 +192,8 @@ /* try to save a core dump */ if( bu_debug & BU_DEBUG_COREDUMP ) { - fprintf(stdout,"Causing intentional core dump due to debug flag\n"); - fprintf(stderr,"Causing intentional core dump due to debug flag\n"); + fputs("Causing intentional core dump due to debug flag\n", stdout); + fputs("Causing intentional core dump due to debug flag\n", stderr); fflush(stdout); fflush(stderr); fd = open("/dev/tty", 1); |