diff options
author | Björn Gustavsson <[email protected]> | 2010-04-03 10:47:12 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-04-30 06:16:01 +0200 |
commit | 8ebf6ffa5da382dee33fd062785056986bdcf6f2 (patch) | |
tree | 8e1551a39d34eace1f9ea24171728689348d2629 /erts/emulator/sys/win32/sys.c | |
parent | ccc18513ab58762d2ba857ff88b22f6633afa4af (diff) | |
download | otp-8ebf6ffa5da382dee33fd062785056986bdcf6f2.tar.gz otp-8ebf6ffa5da382dee33fd062785056986bdcf6f2.tar.bz2 otp-8ebf6ffa5da382dee33fd062785056986bdcf6f2.zip |
emulator: Eliminate #ifdef for sys_tty_reset()
In the erts/emulator/beam sources
#ifdef SOME_OPERATING_SYSTEM
should be avoided. Instead, call a function implemented in
sys/OPERATING_SYSTEM/sys.c.
Diffstat (limited to 'erts/emulator/sys/win32/sys.c')
-rw-r--r-- | erts/emulator/sys/win32/sys.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c index 3194493ac8..cfdfc6192a 100644 --- a/erts/emulator/sys/win32/sys.c +++ b/erts/emulator/sys/win32/sys.c @@ -187,6 +187,17 @@ erts_sys_misc_mem_sz(void) return res; } +/* + * Reset the terminal to the original settings on exit + */ +void sys_tty_reset(int exit_code) +{ + if (exit_code > 0) + ConWaitForExit(); + else + ConNormalExit(); +} + void erl_sys_args(int* argc, char** argv) { char *event_name; |