From 104ecc7e701fcec340ccc76d15bfc855f7786ced Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 11 May 2014 22:52:09 +0100 Subject: setterm: clean up includes Use klogctl(2) from sys/klog.h just like dmesg(1). The rest is just reordering, and indenting. Signed-off-by: Sami Kerola --- term-utils/setterm.c | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) (limited to 'term-utils/setterm.c') diff --git a/term-utils/setterm.c b/term-utils/setterm.c index 7a3131f5f..e6385ace6 100644 --- a/term-utils/setterm.c +++ b/term-utils/setterm.c @@ -92,48 +92,38 @@ * -store stores the terminal's current rendering options as the default * values. */ +#include +#include +#include #include #include -#include -#include -#include -#include #include -#include +#include +#include +#include /* for MAXPATHLEN */ +#include +#include +#include #ifndef NCURSES_CONST -#define NCURSES_CONST const /* define before including term.h */ +# define NCURSES_CONST const /* define before including term.h */ #endif #ifdef HAVE_NCURSES_H -#include +# include #elif defined(HAVE_NCURSES_NCURSES_H) -#include +# include #endif /* must include after ncurses.h */ #include -#include /* for MAXPATHLEN */ -#include -#include #ifdef HAVE_LINUX_TIOCL_H -#include +# include #endif #include "c.h" -#include "xalloc.h" -#include "nls.h" #include "closestream.h" - -#if defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ < 5 -#ifndef __alpha__ -# include -#define __NR_klogctl __NR_syslog -_syscall3(int, klogctl, int, type, char*, buf, int, len); -#else /* __alpha__ */ -#define klogctl syslog -#endif -#endif -extern int klogctl(int type, char *buf, int len); +#include "nls.h" +#include "xalloc.h" /* Constants. */ -- cgit v1.2.3-55-g7522