From b6e899d9346ef550e1253d8f9168208c5d5f67f0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 16 Oct 2009 01:40:58 +0200 Subject: [PATCH] setterm: use c.h, remove tailing whitespace Signed-off-by: Karel Zak --- misc-utils/setterm.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) 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; -- 2.39.5