From f66371517932054e09e088e49a76da69fc27cb7e Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 10 Sep 2003 23:26:02 +0000 Subject: [PATCH] * Allocate a DOS command window under Win32. git-svn-id: svn://svn.zoy.org/elk/trunk@141 55e467fa-43c5-0310-a8a2-de718669efc6 --- src/main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 3515639..2a164f8 100644 --- a/src/main.c +++ b/src/main.c @@ -30,10 +30,20 @@ #include "config.h" +#ifdef WIN32 +# include +#endif + #include -int main(int ac, char **av) { - Elk_Init(ac, av, 1, ""); +int main (int ac, char **av) { +#ifdef WIN32 + AllocConsole (); + freopen ("CONIN$", "r", stdin); + freopen ("CONOUT$", "w", stdout); + freopen ("CONOUT$", "w", stderr); +#endif + Elk_Init (ac, av, 1, ""); return 0; }