Allow for non-GUI win32 apps.
This commit is contained in:
parent
26f0a6e88e
commit
4a731dfda9
1
examples/email/Makefile.win32.defines
Normal file
1
examples/email/Makefile.win32.defines
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DEFINES = WITH_GUI
|
1
examples/ftp/Makefile.win32.defines
Normal file
1
examples/ftp/Makefile.win32.defines
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DEFINES = WITH_GUI
|
1
examples/irc/Makefile.win32.defines
Normal file
1
examples/irc/Makefile.win32.defines
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DEFINES = WITH_GUI
|
1
examples/webbrowser/Makefile.win32.defines
Normal file
1
examples/webbrowser/Makefile.win32.defines
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DEFINES = WITH_GUI
|
|
@ -54,9 +54,15 @@
|
||||||
#include "program-handler.h"
|
#include "program-handler.h"
|
||||||
#endif /* PLATFORM_BUILD */
|
#endif /* PLATFORM_BUILD */
|
||||||
|
|
||||||
|
#if WITH_GUI
|
||||||
|
#define CTK_PROCESS &ctk_process,
|
||||||
|
#else /* WITH_GUI */
|
||||||
|
#define CTK_PROCESS
|
||||||
|
#endif /* WITH_GUI */
|
||||||
|
|
||||||
PROCINIT(&etimer_process,
|
PROCINIT(&etimer_process,
|
||||||
&wpcap_process,
|
&wpcap_process,
|
||||||
&ctk_process,
|
CTK_PROCESS
|
||||||
&tcpip_process,
|
&tcpip_process,
|
||||||
&resolv_process);
|
&resolv_process);
|
||||||
|
|
||||||
|
@ -71,7 +77,11 @@ debug_printf(char *format, ...)
|
||||||
vsprintf(buffer, format, argptr);
|
vsprintf(buffer, format, argptr);
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
|
|
||||||
|
#if WITH_GUI
|
||||||
OutputDebugString(buffer);
|
OutputDebugString(buffer);
|
||||||
|
#else /* WITH_GUI */
|
||||||
|
fputs(buffer, stderr);
|
||||||
|
#endif /* WITH_GUI */
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
|
@ -130,9 +140,11 @@ main(void)
|
||||||
/* Allow user-mode APC to execute. */
|
/* Allow user-mode APC to execute. */
|
||||||
SleepEx(10, TRUE);
|
SleepEx(10, TRUE);
|
||||||
|
|
||||||
|
#if WITH_GUI
|
||||||
if(console_resize()) {
|
if(console_resize()) {
|
||||||
ctk_restore();
|
ctk_restore();
|
||||||
}
|
}
|
||||||
|
#endif /* WITH_GUI */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
|
Loading…
Reference in a new issue