From 526e94341d0a03bd99bbdbdeff7e446e437478c4 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 1 Jul 2002 20:14:08 +0000 Subject: Some patches from Ori Berger to plug some resource leaks and use a different WIN32 message for threading under Windows. (didn't include the cleanup or release changes) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2336 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_call_main.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/fl_call_main.c') diff --git a/src/fl_call_main.c b/src/fl_call_main.c index 4aa26c026..1921d98da 100644 --- a/src/fl_call_main.c +++ b/src/fl_call_main.c @@ -1,5 +1,5 @@ /* - * "$Id: fl_call_main.c,v 1.1.2.11.2.2 2002/06/29 00:10:04 matthiaswm Exp $" + * "$Id: fl_call_main.c,v 1.1.2.11.2.3 2002/07/01 20:14:08 easysw Exp $" * * Copyright 1998-2002 by Bill Spitzak and others. * @@ -63,6 +63,8 @@ extern int main(int, char *[]); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { + int rc; + #ifdef _DEBUG /* * If we are using compiling in debug mode, open a console window so @@ -81,7 +83,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, #endif /* _DEBUG */ /* Run the standard main entry point function... */ - return main(__argc, __argv); + rc = main(__argc, __argv); + +#ifdef _DEBUG + fclose(stdin); + fclose(stdout); + fclose(stderr); +#endif /* _DEBUG */ + + return rc; } #else @@ -90,6 +100,6 @@ static void dummy(void) {dummy();} #endif /* - * End of "$Id: fl_call_main.c,v 1.1.2.11.2.2 2002/06/29 00:10:04 matthiaswm Exp $". + * End of "$Id: fl_call_main.c,v 1.1.2.11.2.3 2002/07/01 20:14:08 easysw Exp $". */ -- cgit v1.2.3