Console I/O for stdin, stdout, and stderr can be configured in many different ways. The easiest way to configure console I/O is to have it turned off completely. When EWL_CONSOLE_SUPPORT is defined as 0, EWL does not generate source code to construct the stdin, stdout, and stderr streams. Also, calls such as printf() are not placed in the standard C library.
When EWL_CONSOLE_SUPPORT is 1, the console access can be provided in the following ways:
| Macro | Behavior |
|---|---|
| EWL_CONSOLE_SUPPORT | Defined to 1 if the EWL platform supports console I/O. Defined to 0 if the EWL platform does not support console I/O. Default value is 1. |
| EWL_BUFFERED_CONSOLE | Defined to 1 if the EWL platform console I/O is buffered. Defined to 0 if the EWL platform console I/O is not buffered. Default value is 1. |
| EWL_CONSOLE_FILE_IS_DISK_FILE | Defined to 1 if the EWL platform has console I/O, but it is really in a file. Defined to 0 if the EWL platform has traditional console I/O. Default value is 0. |
| EWL_CONSOLE_FILE_IS_DISK_FILE | Defined to 1 if the EWL platform does not perform console I/O. Defined to 0 if the EWL platform performs console I/O. This flag may be set independently of EWL_CONSOLE_SUPPORT. However, when EWL_CONSOLE_SUPPORT is defined as 0, EWL_NULL_CONSOLE_ROUTINES must always be defined as 1. When EWL_CONSOLE_SUPPORT is 1 and EWL_NULL_CONSOLE_ROUTINES is also 1, all console I/O is ignored. Default value is 0. |
| EWL_FILE_CONSOLE_ROUTINES | Defined to 1 if the EWL platform uses the file I/O read/write/close routines for console I/O instead of using the special console read/write/close routines. Define to 0 if the EWL platform uses the special console read/write/close routines. When EWL_CONSOLE_FILE_IS_DISK_FILE is 1, EWL_FILE_CONSOLE_ROUTINES must always be 1. Default value is 0. |