summaryrefslogtreecommitdiff
path: root/src/fl_call_main.c
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-07-01 20:14:08 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-07-01 20:14:08 +0000
commit526e94341d0a03bd99bbdbdeff7e446e437478c4 (patch)
tree1bb3b699e13ee2f94eb256f32712b41860906659 /src/fl_call_main.c
parent2d30a9e6fa5f7a328c942fe7b0b68908339c9076 (diff)
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
Diffstat (limited to 'src/fl_call_main.c')
-rw-r--r--src/fl_call_main.c16
1 files changed, 13 insertions, 3 deletions
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 $".
*/