From: Karel Zak Date: Thu, 15 Oct 2009 23:40:58 +0000 (+0200) Subject: setterm: use c.h, remove tailing whitespace X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6e899d9346ef550e1253d8f9168208c5d5f67f0;p=util-linux setterm: use c.h, remove tailing whitespace Signed-off-by: Karel Zak --- diff --git a/misc-utils/setterm.c b/misc-utils/setterm.c index 2646fc38..2601ffc6 100644 --- a/misc-utils/setterm.c +++ b/misc-utils/setterm.c @@ -102,10 +102,10 @@ #define NCURSES_CONST const /* define before including term.h */ #endif #include - + #ifdef HAVE_NCURSES_H #include -#elif defined(HAVE_NCURSES_NCURSES_H) +#elif defined(HAVE_NCURSES_NCURSES_H) #include #endif @@ -115,6 +115,8 @@ #ifdef HAVE_LINUX_TIOCL_H #include #endif + +#include "c.h" #include "nls.h" #if __GNU_LIBRARY__ < 5 @@ -130,12 +132,6 @@ extern int klogctl(int type, char *buf, int len); /* Constants. */ -/* General constants. */ -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - /* Keyboard types. */ #define PC 0 #define OLIVETTI 1 @@ -304,9 +300,9 @@ par_color(int argc, char **argv, int *option, int *opt_color, int *bad_arg) { *opt_color = DEFAULT; else if (isdigit(argv[0][0])) *opt_color = atoi(argv[0]); - else + else *bad_arg = TRUE; - + if(*opt_color < 0 || *opt_color > 9 || *opt_color == 8) *bad_arg = TRUE; } @@ -361,7 +357,7 @@ par_color2(int argc, char **argv, int *option, int *opt_color, int *bad_arg) { *opt_color |= WHITE; else if (isdigit(argv[argc-1][0])) *opt_color = atoi(argv[argc-1]); - else + else *bad_arg = TRUE; if(*opt_color < 0 || *opt_color > 15) *bad_arg = TRUE; @@ -1138,7 +1134,7 @@ perform_sequence(int vcterm) { if (opt_blength && vcterm) { printf("\033[11;%d]", opt_blength_l); } - + /* -bfreq freqnumber */ if (opt_bfreq && vcterm) { printf("\033[10;%d]", opt_bfreq_f); @@ -1221,7 +1217,7 @@ main(int argc, char **argv) { setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - + if (argc < 2) bad_arg = TRUE;