diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-05-29 15:10:27 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-29 15:10:27 -0700 |
commit | 5d3abcf64d586bb6d9aa586bb41ba6397d3efdc0 (patch) | |
tree | 4eda50284fd25f2923aa7c7b92ec4b7578aec42c /com32/libutil | |
parent | df747e62a44f675d3be5cd07a04db188e6cc8818 (diff) | |
download | syslinux-5d3abcf64d586bb6d9aa586bb41ba6397d3efdc0.tar.gz syslinux-5d3abcf64d586bb6d9aa586bb41ba6397d3efdc0.tar.xz syslinux-5d3abcf64d586bb6d9aa586bb41ba6397d3efdc0.zip |
Run Nindent on com32/libutil/ansiraw.c
Automatically reformat com32/libutil/ansiraw.c using Nindent.
Do this for all files except HDT, gPXE and externally maintained
libraries (zlib, tinyjpeg, libpng).
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/libutil')
-rw-r--r-- | com32/libutil/ansiraw.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/com32/libutil/ansiraw.c b/com32/libutil/ansiraw.c index c55a82ea..2afd48a7 100644 --- a/com32/libutil/ansiraw.c +++ b/com32/libutil/ansiraw.c @@ -40,7 +40,7 @@ void console_ansi_raw(void) { - openconsole(&dev_rawcon_r, &dev_ansiserial_w); + openconsole(&dev_rawcon_r, &dev_ansiserial_w); } #else @@ -50,37 +50,36 @@ void console_ansi_raw(void) static struct termios original_termios_settings; -static void __attribute__((constructor)) console_init(void) +static void __attribute__ ((constructor)) console_init(void) { - tcgetattr(0, &original_termios_settings); + tcgetattr(0, &original_termios_settings); } -static void __attribute__((destructor)) console_cleanup(void) +static void __attribute__ ((destructor)) console_cleanup(void) { - tcsetattr(0, TCSANOW, &original_termios_settings); + tcsetattr(0, TCSANOW, &original_termios_settings); } - void console_ansi_raw(void) { - struct termios tio; + struct termios tio; - /* Disable stdio buffering */ - setbuf(stdin, NULL); - setbuf(stdout, NULL); - setbuf(stderr, NULL); + /* Disable stdio buffering */ + setbuf(stdin, NULL); + setbuf(stdout, NULL); + setbuf(stderr, NULL); - /* Set the termios flag so we behave the same as libcom32 */ - tcgetattr(0, &tio); - tio.c_iflag &= ~ICRNL; - tio.c_iflag |= IGNCR; - tio.c_lflag &= ~(ISIG|ICANON|ECHO); - if (!tio.c_oflag & OPOST) - tio.c_oflag = 0; - tio.c_oflag |= OPOST|ONLCR; - tio.c_cc[VMIN] = 0; - tio.c_cc[VTIME] = 1; /* Don't 100% busy-wait in Linux */ - tcsetattr(0, TCSAFLUSH, &tio); + /* Set the termios flag so we behave the same as libcom32 */ + tcgetattr(0, &tio); + tio.c_iflag &= ~ICRNL; + tio.c_iflag |= IGNCR; + tio.c_lflag &= ~(ISIG | ICANON | ECHO); + if (!tio.c_oflag & OPOST) + tio.c_oflag = 0; + tio.c_oflag |= OPOST | ONLCR; + tio.c_cc[VMIN] = 0; + tio.c_cc[VTIME] = 1; /* Don't 100% busy-wait in Linux */ + tcsetattr(0, TCSAFLUSH, &tio); } #endif |