From dbf522b750e8d4cd5c57fb7b19ffb5eab3e6cc5f Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 6 Dec 2020 11:49:37 +0100 Subject: [PATCH] tweaks: reshuffle some lines, to have most #includes near the beginning --- src/definitions.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/definitions.h b/src/definitions.h index 012e2f0a..6841c7de 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -41,22 +41,21 @@ #include #endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -/* In UTF-8 a character is at most six bytes long. */ -#ifdef ENABLE_UTF8 -#define MAXCHARLEN 6 -#else -#define MAXCHARLEN 1 -#endif - /* Set a default value for PATH_MAX if there isn't one. */ #ifndef PATH_MAX #define PATH_MAX 4096 #endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif + +#include +#include +#include +#include +#include + /* Prefer wide ncurses over normal ncurses over curses. */ #if defined(HAVE_NCURSESW_NCURSES_H) #include @@ -66,8 +65,8 @@ #include #endif -#ifdef ENABLE_NLS /* Native language support. */ +#ifdef ENABLE_NLS #ifdef HAVE_LIBINTL_H #include #endif @@ -77,18 +76,12 @@ #define _(string) (string) #define P_(singular, plural, number) (number == 1 ? singular : plural) #endif +/* For marking a string on which gettext() will be called later. */ #define gettext_noop(string) (string) #define N_(string) gettext_noop(string) - /* Mark a string that will be sent to gettext() later. */ -#include -#include -#include -#include -#include - -/* If we aren't using an ncurses with mouse support, exclude any - * mouse routines, as they are useless then. */ +/* If we aren't using an ncurses with mouse support, then + * exclude the mouse routines, as they are useless then. */ #ifndef NCURSES_MOUSE_VERSION #undef ENABLE_MOUSE #endif @@ -118,6 +111,13 @@ #define REPLACING 1 #define INREGION 2 +/* In UTF-8 a character is at most six bytes long. */ +#ifdef ENABLE_UTF8 +#define MAXCHARLEN 6 +#else +#define MAXCHARLEN 1 +#endif + #ifdef ENABLE_COLOR #define THE_DEFAULT -1 #define BAD_COLOR -2