Commit e527e458 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 14 additions and 13 deletions
+14 -13
CVS code - CVS code -
- General: - General:
- Miscellaneous comment fixes. (DLR) - 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: - files.c:
get_next_filename() get_next_filename()
- Use a long instead of an int for the number prepended to the - Use a long instead of an int for the number prepended to the
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <ctype.h> #include <ctype.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
#ifdef NANO_WIDE #ifdef NANO_WIDE
#ifdef HAVE_WCHAR_H #ifdef HAVE_WCHAR_H
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
static bool keep_cutbuffer = FALSE; static bool keep_cutbuffer = FALSE;
/* Should we keep the contents of the cutbuffer? */ /* Should we keep the contents of the cutbuffer? */
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <pwd.h> #include <pwd.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
static file_format fmt = NIX_FILE; static file_format fmt = NIX_FILE;
/* The format of the current file. */ /* The format of the current file. */
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
/* Global variables */ /* Global variables */
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <ctype.h> #include <ctype.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
void do_first_line(void) void do_first_line(void)
{ {
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include <locale.h> #include <locale.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
#ifdef HAVE_TERMIOS_H #ifdef HAVE_TERMIOS_H
#include <termios.h> #include <termios.h>
......
...@@ -22,8 +22,12 @@ ...@@ -22,8 +22,12 @@
#ifndef NANO_H #ifndef NANO_H
#define NANO_H 1 #define NANO_H 1
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef __TANDEM #ifdef __TANDEM
/* Tandem NonStop Kernel */ /* Tandem NonStop Kernel. */
#include <floss.h> #include <floss.h>
#define NANO_ROOT_UID 65535 #define NANO_ROOT_UID 65535
#else #else
...@@ -88,7 +92,6 @@ ...@@ -88,7 +92,6 @@
#include <stddef.h> #include <stddef.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include "config.h"
/* If no snprintf() or vsnprintf(), use the versions from glib. */ /* If no snprintf() or vsnprintf(), use the versions from glib. */
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifndef PROTO_H
#define PROTO_H 1
/* Externs. */ /* Externs. */
#include <sys/types.h> #include <sys/types.h>
...@@ -696,3 +699,5 @@ void dump_buffer_reverse(void); ...@@ -696,3 +699,5 @@ void dump_buffer_reverse(void);
#ifdef NANO_EXTRA #ifdef NANO_EXTRA
void do_credits(void); void do_credits(void);
#endif #endif
#endif /* !PROTO_H */
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <ctype.h> #include <ctype.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
static bool search_last_line = FALSE; static bool search_last_line = FALSE;
/* Have we gone past the last line while searching? */ /* Have we gone past the last line while searching? */
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
#ifdef HAVE_REGEX_H #ifdef HAVE_REGEX_H
#ifdef BROKEN_REGEXEC #ifdef BROKEN_REGEXEC
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <ctype.h> #include <ctype.h>
#include <assert.h> #include <assert.h>
#include "proto.h" #include "proto.h"
#include "nano.h"
static int *key_buffer = NULL; static int *key_buffer = NULL;
/* The default keystroke buffer, /* The default keystroke buffer,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment