Win32: add the --win32log option to log stdout and stderr to files

Adding --win32log as the first command line option on Windows
will now log all stdout and stderr output to the files
subsurface_err.log and subsurface_out.log in the working directory.

This change required a new argument 'bool logfile' to be added to:
subsurface_console_init() which is defined in all platform files
(linux.c, macos.c, etc.)

Example usage:
subsurface.exe --win32log -v -v -v

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-02-02 21:50:47 +02:00 committed by Dirk Hohndel
parent 7c8461a328
commit 4a894e0713
7 changed files with 29 additions and 12 deletions

View file

@ -730,7 +730,7 @@ extern void *subsurface_opendir(const char *path);
extern int subsurface_access(const char *path, int mode);
extern struct zip *subsurface_zip_open_readonly(const char *path, int flags, int *errorp);
extern int subsurface_zip_close(struct zip *zip);
extern void subsurface_console_init(bool dedicated);
extern void subsurface_console_init(bool dedicated, bool logfile);
extern void subsurface_console_exit(void);
extern bool subsurface_user_is_root(void);