nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit e527e458f4401965a778b74069e4eb93247f42bb
parent ac71fdde97d36d4a3270f0dd59d589b816ab270a
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Fri, 15 Apr 2005 18:07:26 +0000

various #include fixes: since proto.h includes nano.h, only include the
former in source files; also add an #include guard to proto.h, and make
the config.h #include in nano.h match the config.h #includes everywhere
else


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2471 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 4++++
Msrc/chars.c | 1-
Msrc/color.c | 1-
Msrc/cut.c | 1-
Msrc/files.c | 1-
Msrc/global.c | 1-
Msrc/move.c | 1-
Msrc/nano.c | 1-
Msrc/nano.h | 7+++++--
Msrc/proto.h | 5+++++
Msrc/rcfile.c | 1-
Msrc/search.c | 1-
Msrc/utils.c | 1-
Msrc/winio.c | 1-
14 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,6 +1,10 @@ CVS code - - General: - Miscellaneous comment fixes. (DLR) + - Various #include fixes. Since proto.h includes nano.h, only + include the former in source files. Also add an #include + guard to proto.h, and make the config.h #include in nano.h + match the config.h #includes everywhere else. (DLR) - files.c: get_next_filename() - Use a long instead of an int for the number prepended to the diff --git a/src/chars.c b/src/chars.c @@ -28,7 +28,6 @@ #include <ctype.h> #include <assert.h> #include "proto.h" -#include "nano.h" #ifdef NANO_WIDE #ifdef HAVE_WCHAR_H diff --git a/src/color.c b/src/color.c @@ -29,7 +29,6 @@ #include <errno.h> #include <fcntl.h> #include "proto.h" -#include "nano.h" #ifdef ENABLE_COLOR diff --git a/src/cut.c b/src/cut.c @@ -28,7 +28,6 @@ #include <stdio.h> #include <assert.h> #include "proto.h" -#include "nano.h" static bool keep_cutbuffer = FALSE; /* Should we keep the contents of the cutbuffer? */ diff --git a/src/files.c b/src/files.c @@ -35,7 +35,6 @@ #include <pwd.h> #include <assert.h> #include "proto.h" -#include "nano.h" static file_format fmt = NIX_FILE; /* The format of the current file. */ diff --git a/src/global.c b/src/global.c @@ -26,7 +26,6 @@ #include <stdlib.h> #include <assert.h> #include "proto.h" -#include "nano.h" /* Global variables */ diff --git a/src/move.c b/src/move.c @@ -28,7 +28,6 @@ #include <ctype.h> #include <assert.h> #include "proto.h" -#include "nano.h" void do_first_line(void) { diff --git a/src/nano.c b/src/nano.c @@ -38,7 +38,6 @@ #include <locale.h> #include <assert.h> #include "proto.h" -#include "nano.h" #ifdef HAVE_TERMIOS_H #include <termios.h> diff --git a/src/nano.h b/src/nano.h @@ -22,8 +22,12 @@ #ifndef NANO_H #define NANO_H 1 +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #ifdef __TANDEM -/* Tandem NonStop Kernel */ +/* Tandem NonStop Kernel. */ #include <floss.h> #define NANO_ROOT_UID 65535 #else @@ -88,7 +92,6 @@ #include <stddef.h> #include <sys/types.h> #include <sys/stat.h> -#include "config.h" /* If no snprintf() or vsnprintf(), use the versions from glib. */ #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) diff --git a/src/proto.h b/src/proto.h @@ -19,6 +19,9 @@ * * **************************************************************************/ +#ifndef PROTO_H +#define PROTO_H 1 + /* Externs. */ #include <sys/types.h> @@ -696,3 +699,5 @@ void dump_buffer_reverse(void); #ifdef NANO_EXTRA void do_credits(void); #endif + +#endif /* !PROTO_H */ diff --git a/src/rcfile.c b/src/rcfile.c @@ -32,7 +32,6 @@ #include <ctype.h> #include <assert.h> #include "proto.h" -#include "nano.h" #ifdef ENABLE_NANORC diff --git a/src/search.c b/src/search.c @@ -31,7 +31,6 @@ #include <errno.h> #include <assert.h> #include "proto.h" -#include "nano.h" static bool search_last_line = FALSE; /* Have we gone past the last line while searching? */ diff --git a/src/utils.c b/src/utils.c @@ -32,7 +32,6 @@ #include <errno.h> #include <assert.h> #include "proto.h" -#include "nano.h" #ifdef HAVE_REGEX_H #ifdef BROKEN_REGEXEC diff --git a/src/winio.c b/src/winio.c @@ -30,7 +30,6 @@ #include <ctype.h> #include <assert.h> #include "proto.h" -#include "nano.h" static int *key_buffer = NULL; /* The default keystroke buffer,