From: Simon Wilkinson Date: Thu, 24 Mar 2011 21:08:35 +0000 (+0000) Subject: gtx: Tidy header includes X-Git-Tag: openafs-devel-1_7_1~703 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=8608ca6771c9d254488f2929a4713b0f3f2f6c18 gtx: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I444a8a325cca8da76f410185949103ccd873c743 Reviewed-on: http://gerrit.openafs.org/4329 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/gtx/X11windows.c b/src/gtx/X11windows.c index 419655d..951a607 100644 --- a/src/gtx/X11windows.c +++ b/src/gtx/X11windows.c @@ -18,13 +18,10 @@ #include #include +#include #include "gtxX11win.h" /*Interface definition */ -#include /*Standard I/O package */ -#if !defined(NeXT) -extern int errno; /*System error number */ -#endif /* NeXT */ int X11_debug; /*Is debugging turned on? */ static char mn[] = "gator_X11windows"; /*Module name */ diff --git a/src/gtx/cb_test.c b/src/gtx/cb_test.c index 53868b2..1d0a032 100644 --- a/src/gtx/cb_test.c +++ b/src/gtx/cb_test.c @@ -14,10 +14,10 @@ #include #include +#include #include "gtxtextcb.h" /*Module interface */ - #include "AFS_component_version_number.c" main(argc, argv) diff --git a/src/gtx/curses_test.c b/src/gtx/curses_test.c index 4b3f32d..808b628 100644 --- a/src/gtx/curses_test.c +++ b/src/gtx/curses_test.c @@ -14,6 +14,8 @@ #include #include +#include + #if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES) # define __HP_CURSES #endif diff --git a/src/gtx/curseswindows.c b/src/gtx/curseswindows.c index 1d28040..7ac8fb1 100644 --- a/src/gtx/curseswindows.c +++ b/src/gtx/curseswindows.c @@ -18,18 +18,11 @@ #include #include +#include - -#include -#include #if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD80_ENV) #include #endif -#include -#include -#include -#include -#include #include @@ -37,8 +30,6 @@ #include "gtxobjects.h" #include "gtxframe.h" - - int curses_debug; /*Is debugging turned on? */ static char mn[] = "gator_curseswindows"; /*Module name */ diff --git a/src/gtx/dumbwindows.c b/src/gtx/dumbwindows.c index 3237de4..56af6cf 100644 --- a/src/gtx/dumbwindows.c +++ b/src/gtx/dumbwindows.c @@ -16,10 +16,9 @@ #include #include +#include #include "gtxdumbwin.h" /*Interface definition */ -#include /*Standard I/O package */ -#include int dumb_debug; /*Is debugging turned on? */ static char mn[] = "gator_dumbwindows"; /*Module name */ diff --git a/src/gtx/frame.c b/src/gtx/frame.c index 620be0a..b755b5b 100644 --- a/src/gtx/frame.c +++ b/src/gtx/frame.c @@ -11,16 +11,10 @@ #include #include -#ifdef AFS_HPUX_ENV -#include -#endif +#include + #include -#include -#include -#ifdef HAVE_STDINT_H -#include -#endif #include "gtxobjects.h" #include "gtxwindows.h" #include "gtxcurseswin.h" diff --git a/src/gtx/gtxtest.c b/src/gtx/gtxtest.c index 29fabf5..fef3703 100644 --- a/src/gtx/gtxtest.c +++ b/src/gtx/gtxtest.c @@ -10,11 +10,8 @@ #include #include +#include -#include -#ifdef HAVE_STDINT_H -#include -#endif #include "gtxwindows.h" #include "gtxobjects.h" #include "gtxtextobj.h" diff --git a/src/gtx/input.c b/src/gtx/input.c index 4fa7d33..932ce85 100644 --- a/src/gtx/input.c +++ b/src/gtx/input.c @@ -10,12 +10,10 @@ #include #include -#include +#include -#ifdef AFS_HPUX_ENV -#include -#endif #include + #include "gtxobjects.h" #include "gtxwindows.h" #include "gtxcurseswin.h" diff --git a/src/gtx/keymap.c b/src/gtx/keymap.c index 0cc8beb..db4a99d 100644 --- a/src/gtx/keymap.c +++ b/src/gtx/keymap.c @@ -10,9 +10,7 @@ #include #include - -#include -#include +#include #include "gtxkeymap.h" diff --git a/src/gtx/lightobject.c b/src/gtx/lightobject.c index 71df8b2..cc51f2b 100644 --- a/src/gtx/lightobject.c +++ b/src/gtx/lightobject.c @@ -16,12 +16,9 @@ #include #include +#include #include "gtxlightobj.h" /*Interface for this module */ -#include /*Standard I/O stuff */ -#include -#include -#include /*Externally-advertised array of light onode operations*/ struct onodeops gator_light_ops = { diff --git a/src/gtx/objdict.c b/src/gtx/objdict.c index c2ded9c..da39db7 100644 --- a/src/gtx/objdict.c +++ b/src/gtx/objdict.c @@ -16,9 +16,9 @@ #include #include +#include #include "gtxobjdict.h" /*Interface for this module */ -#include /*Standard I/O package */ static char mn[] = "gator_objdict"; /*Module name */ static int objdict_debug; /*Is debugging turned on? */ diff --git a/src/gtx/object_test.c b/src/gtx/object_test.c index e06c344..95beaa5 100644 --- a/src/gtx/object_test.c +++ b/src/gtx/object_test.c @@ -14,6 +14,9 @@ #include #include +#include + +#include /*Command interpretation library */ #include "gtxscreenobj.h" /*Gator screen object interface */ #include "gtxtextobj.h" /*Gator text object interface */ @@ -22,9 +25,6 @@ #include "gtxcurseswin.h" /*Gator curses window package */ #include "gtxdumbwin.h" /*Gator dumb terminal window package */ #include "gtxX11win.h" /*Gator X11 window package */ -#include -#include /*Standard I/O stuff */ -#include /*Command interpretation library */ /* diff --git a/src/gtx/objects.c b/src/gtx/objects.c index 1dfcf95..4023a70 100644 --- a/src/gtx/objects.c +++ b/src/gtx/objects.c @@ -16,16 +16,12 @@ #include #include +#include #include "gtxobjects.h" /*Interface for this module */ #include "gtxtextobj.h" /*Text object interface */ #include "gtxlightobj.h" /*Light object interface */ #include "gtxobjdict.h" /*Object dictionary module */ -#include /*Standard I/O stuff */ -#include - -#include -#include /* * Number of known gator object types. diff --git a/src/gtx/screen_test.c b/src/gtx/screen_test.c index ac9c858..f94e650 100644 --- a/src/gtx/screen_test.c +++ b/src/gtx/screen_test.c @@ -14,13 +14,14 @@ #include #include +#include + +#include /*Command interpretation library */ #include "gtxwindows.h" /*Generalized window interface */ #include "gtxcurseswin.h" /*Curses window interface */ #include "gtxdumbwin.h" /*Dumb terminal window interface */ #include "gtxX11win.h" /*X11 window interface */ -#include /*Command interpretation library */ -#include /* diff --git a/src/gtx/textcb.c b/src/gtx/textcb.c index 0f15d72..857e153 100644 --- a/src/gtx/textcb.c +++ b/src/gtx/textcb.c @@ -16,12 +16,9 @@ #include #include +#include #include "gtxtextcb.h" /*Module interface */ -#include /*Standard I/O stuff */ -#include -#include -#include static int gator_textcb_debug; /*Is debugging output turned on? */ diff --git a/src/gtx/textobject.c b/src/gtx/textobject.c index ffe0042..e7464fd 100644 --- a/src/gtx/textobject.c +++ b/src/gtx/textobject.c @@ -14,16 +14,13 @@ #include #include +#include #include "gtxtextobj.h" /*Interface for this module */ #include "gtxwindows.h" /*Gator window interface */ #include "gtxcurseswin.h" /*Gator curses window interface */ #include "gtxdumbwin.h" /*Gator dumb terminal window interface */ #include "gtxX11win.h" /*Gator X11 window interface */ -#include /*Standard I/O stuff */ -#include -#include -#include /*Externally-advertised array of text onode operations*/ struct onodeops gator_text_ops = { diff --git a/src/gtx/windows.c b/src/gtx/windows.c index 45c391e..b9fd4e9 100644 --- a/src/gtx/windows.c +++ b/src/gtx/windows.c @@ -18,6 +18,7 @@ #include #include +#include /* On DUX "IN" is a variable in curses.h, so this can be a bit of a problem */ #ifdef IN