windows interface.

This commit is contained in:
U-WIN-ENP104VVO3U\Vítor Santos Costa
2011-06-06 19:03:20 +01:00
parent d685b8891f
commit a0748c7c10
5 changed files with 19 additions and 13 deletions

View File

@@ -76,13 +76,13 @@ main(int argc, char **argv)
SetConsoleCtrlHandler((PHANDLER_ROUTINE)consoleHandlerRoutine, TRUE);
#endif
if ( !PL_initialise(argc, argv) )
PL_halt(1);
#if O_ANSI_COLORS
PL_w32_wrap_ansi_console(); /* decode ANSI color sequences (ESC[...m) */
#endif
if ( !PL_initialise(argc, argv) )
PL_halt(1);
PL_halt(PL_toplevel() ? 0 : 1);
return 0;

View File

@@ -1,4 +1,4 @@
/* $Id$
/* $Id$
Part of SWI-Prolog
@@ -433,6 +433,8 @@ PL_w32_wrap_ansi_console(void)
HANDLE hError = GetStdHandle(STD_ERROR_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO info;
fprintf(stderr,"main=%p %p\n",Sinput, Sinput->functions);
if ( hIn == INVALID_HANDLE_VALUE ||
hOut == INVALID_HANDLE_VALUE ||
hError == INVALID_HANDLE_VALUE ||