=================================================================== RCS file: /home/cvs/OpenXM_contrib/gnuplot/win/Attic/winmain.c,v retrieving revision 1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1 -r1.1.1.2 --- OpenXM_contrib/gnuplot/win/Attic/winmain.c 2000/01/09 17:01:19 1.1 +++ OpenXM_contrib/gnuplot/win/Attic/winmain.c 2000/01/22 14:16:33 1.1.1.2 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: winmain.c,v 1.1 2000/01/09 17:01:19 maekawa Exp $"; +static char *RCSid = "$Id: winmain.c,v 1.1.1.2 2000/01/22 14:16:33 maekawa Exp $"; #endif /* GNUPLOT - win/winmain.c */ @@ -146,7 +146,13 @@ WinExit(void) int CALLBACK WINEXPORT ShutDown(void) { +#if 0 /* HBB 19990505: try to avoid crash on clicking 'close' */ + /* Problem was that WinExit was called *twice*, once directly, + * and again via 'atexit'. This caused problems by double-freeing + * of GlobalAlloc-ed memory inside TextClose() */ + /* Caveat: relies on atexit() working properly */ WinExit(); +#endif exit(0); return 0; } @@ -448,8 +454,6 @@ size_t MyFRead(void *ptr, size_t size, size_t n, FILE #define MAX_PRT_LEN 256 static char win_prntmp[MAX_PRT_LEN+1]; -extern GW graphwin; - FILE * open_printer() {