From: <and...@us...> - 2009-05-07 12:44:06
|
Revision: 9935 http://plplot.svn.sourceforge.net/plplot/?rev=9935&view=rev Author: andrewross Date: 2009-05-07 12:43:52 +0000 (Thu, 07 May 2009) Log Message: ----------- Consistently replace calls to exit() with calls to plexit() for drivers. Modified Paths: -------------- trunk/drivers/tkwin.c trunk/drivers/wxwidgets.cpp trunk/drivers/xwin.c Modified: trunk/drivers/tkwin.c =================================================================== --- trunk/drivers/tkwin.c 2009-05-07 08:22:15 UTC (rev 9934) +++ trunk/drivers/tkwin.c 2009-05-07 12:43:52 UTC (rev 9935) @@ -364,8 +364,7 @@ * abort operations now */ if (pls->plPlotterPtr == NULL) { - fprintf(stderr, "No tk plframe widget to connect to\n"); - exit(1); + plexit("No tk plframe widget to connect to"); } /* Old version for MacOS Tk8.0 */ /* @@ -389,8 +388,7 @@ tkwd->display = XOpenDisplay(pls->FileName); #endif if (tkwd->display == NULL) { - fprintf(stderr, "Can't open display\n"); - exit(1); + plexit( "Can't open display"); } tkwd->displayName = pls->FileName; tkwd->screen = DefaultScreen(tkwd->display); Modified: trunk/drivers/wxwidgets.cpp =================================================================== --- trunk/drivers/wxwidgets.cpp 2009-05-07 08:22:15 UTC (rev 9934) +++ trunk/drivers/wxwidgets.cpp 2009-05-07 12:43:52 UTC (rev 9935) @@ -360,8 +360,7 @@ break; } if( dev == NULL) { - fprintf( stderr, "Insufficient memory\n" ); - exit( 0 ); + plexit( "Insufficient memory" ); } pls->dev = (void*)dev; @@ -1215,7 +1214,7 @@ wxTRY { wxPLGetApp().CallOnInit(); } - wxCATCH_ALL( wxPLGetApp().OnUnhandledException(); fprintf(stderr, "Can't init wxWidgets!\n"); exit(0); ) + wxCATCH_ALL( wxPLGetApp().OnUnhandledException(); plexit( "Can't init wxWidgets!"); ) initApp=true; } @@ -1301,7 +1300,7 @@ wxPLGetApp().OnRun(); /* start wxWidgets application */ callOnExit.exit=false; } - wxCATCH_ALL( wxPLGetApp().OnUnhandledException(); fprintf(stderr, "Problem running wxWidgets!\n"); exit(0); ) + wxCATCH_ALL( wxPLGetApp().OnUnhandledException(); plexit("Problem running wxWidgets!"); ) if( dev->exit ) { wxPLGetApp().OnExit(); Modified: trunk/drivers/xwin.c =================================================================== --- trunk/drivers/xwin.c 2009-05-07 08:22:15 UTC (rev 9934) +++ trunk/drivers/xwin.c 2009-05-07 12:43:52 UTC (rev 9935) @@ -925,12 +925,11 @@ #ifdef HAVE_PTHREAD if (usepthreads) if (! XInitThreads()) - plexit("xwin: XInitThreads() not successful.\n"); + plexit("xwin: XInitThreads() not successful."); #endif xwd->display = XOpenDisplay(pls->FileName); if (xwd->display == NULL) { - fprintf(stderr, "Can't open display\n"); - exit(1); + plexit("Can't open display"); } xwd->displayName = pls->FileName; xwd->screen = DefaultScreen(xwd->display); @@ -2453,8 +2452,7 @@ } } if (!found) { - printf( "Unable to get a StaticColor visual.\n" ); - exit(1); + plexit( "Unable to get a StaticColor visual." ); } printf( "Found StaticColor visual, depth=%d\n", xwd->depth ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |