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
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
#include <ctype.h>
#include <assert.h>
#include "proto.h"
-#include "nano.h"
#ifdef NANO_WIDE
#ifdef HAVE_WCHAR_H
#include <errno.h>
#include <fcntl.h>
#include "proto.h"
-#include "nano.h"
#ifdef ENABLE_COLOR
#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? */
#include <pwd.h>
#include <assert.h>
#include "proto.h"
-#include "nano.h"
static file_format fmt = NIX_FILE;
/* The format of the current file. */
#include <stdlib.h>
#include <assert.h>
#include "proto.h"
-#include "nano.h"
/* Global variables */
#include <ctype.h>
#include <assert.h>
#include "proto.h"
-#include "nano.h"
void do_first_line(void)
{
#include <locale.h>
#include <assert.h>
#include "proto.h"
-#include "nano.h"
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#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
#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)
* *
**************************************************************************/
+#ifndef PROTO_H
+#define PROTO_H 1
+
/* Externs. */
#include <sys/types.h>
#ifdef NANO_EXTRA
void do_credits(void);
#endif
+
+#endif /* !PROTO_H */
#include <ctype.h>
#include <assert.h>
#include "proto.h"
-#include "nano.h"
#ifdef ENABLE_NANORC
#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? */
#include <errno.h>
#include <assert.h>
#include "proto.h"
-#include "nano.h"
#ifdef HAVE_REGEX_H
#ifdef BROKEN_REGEXEC
#include <ctype.h>
#include <assert.h>
#include "proto.h"
-#include "nano.h"
static int *key_buffer = NULL;
/* The default keystroke buffer,