]> git.wh0rd.org Git - nano.git/commitdiff
since proto.h includes nano.h, and nano.h includes config.h first,
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Thu, 8 Dec 2005 02:47:10 +0000 (02:47 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Thu, 8 Dec 2005 02:47:10 +0000 (02:47 +0000)
include proto.h first and remove redundant includes of config.h in all
non-header source files

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

16 files changed:
ChangeLog
src/browser.c
src/chars.c
src/color.c
src/cut.c
src/files.c
src/global.c
src/help.c
src/move.c
src/nano.c
src/prompt.c
src/rcfile.c
src/search.c
src/text.c
src/utils.c
src/winio.c

index e87c958d661343163ddbc530814991713fd9c17b..751f85b9620b254e51dd2d6cd38af53a3003aa98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -124,6 +124,9 @@ CVS code -
          problems with its being defined as the wrong type aren't
          nano's fault.  Changes to handle_hupterm(), do_suspend(),
          do_continue(), handle_sigwinch(), and cancel_command(). (DLR)
+       - Since proto.h includes nano.h, and nano.h includes config.h
+         first, include proto.h first and remove redundant includes of
+         config.h in all non-header source files. (DLR)
 - browser.c:
   do_browser()
        - When setting the width of each file, use the "?" operator
index c6812f23cf540bdf5bc31595516a9ba49fd3977b..6be435969c723f9a25232ecb50bae3931186d876 100644 (file)
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
-#include "proto.h"
 
 #ifndef DISABLE_BROWSER
 
index a232fe1a51740210843eda23d329c7125d6180a5..1331fffdf4394cd8d484d325fe7a54abba3cfab3 100644 (file)
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <string.h>
 #include <ctype.h>
-#include "proto.h"
 
 #ifdef ENABLE_UTF8
 #ifdef HAVE_WCHAR_H
index 816560e9e608aad9fb804b1898d2e7a76eb910c7..32226e0920e4fe92f53cf1800e0d68fc320b5090 100644 (file)
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <stdio.h>
 #include <string.h>
-#include "proto.h"
 
 #ifdef ENABLE_COLOR
 
index 47c91d0e722e293c0732c9692061eb2712c36c2b..23e7b54acfe53e4a303c98e34cbba9190a0a5b0c 100644 (file)
--- a/src/cut.c
+++ b/src/cut.c
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <string.h>
 #include <stdio.h>
-#include "proto.h"
 
 static bool keep_cutbuffer = FALSE;
        /* Should we keep the contents of the cutbuffer? */
index c693a98d62ca8e46045e4c5bd6481a1472b45f8b..0c80e120d6ba172ef52b6f6844e9da4469cc2b78 100644 (file)
@@ -21,9 +21,7 @@
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -33,7 +31,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <pwd.h>
-#include "proto.h"
 
 /* Add an entry to the openfile openfilestruct.  This should only be
  * called from open_buffer(). */
index 155a2b435dbde03bc59df03bbdea0099cf89a66e..7f31f30c807defc767e5be30f679d674308e5236 100644 (file)
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "proto.h"
 
 /* Global variables */
index 574bbc9fa53f8dde697cd1fcfa5d2384c90f6ea6..1aa17659ac0dd7c21e6439469e302c334812c02f 100644 (file)
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
-#include "proto.h"
 
 #ifndef DISABLE_HELP
 
index f4615196d9b249cbd002cb026542930199c5c97c..fafe5da32140a3431edb33ec07c41f71476aaa28 100644 (file)
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <string.h>
 #include <ctype.h>
-#include "proto.h"
 
 void do_first_line(void)
 {
index c1c73402b998e0530d58049a2893e2ac9bd93099..647a354e0388dff6f0e6d1396a0b2308a91aca4f 100644 (file)
@@ -21,9 +21,7 @@
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <stdio.h>
 #include <stdarg.h>
 #include <errno.h>
 #include <ctype.h>
 #include <locale.h>
-#include "proto.h"
-
-#ifdef HAVE_TERMIOS_H
-#include <termios.h>
-#endif
 
 #ifdef HAVE_GETOPT_H
 #include <getopt.h>
 #endif
 
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+
 #ifndef NANO_TINY
 #include <setjmp.h>
 #endif
index 3c2c91c3bf04fa7d17c1106f28a006573b670f98..b4e06763c9439ba7b3ba333d95228b87e2208a1d 100644 (file)
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
-#include "proto.h"
 
 static char *prompt = NULL;
                                /* The prompt string for statusbar
index 656036dd33f2f101549187d2ac95b64fe5c59d6a..4e59de0ad26717babe12a6c54a2c076bbf66089c 100644 (file)
@@ -21,9 +21,7 @@
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <stdarg.h>
 #include <string.h>
@@ -31,7 +29,6 @@
 #include <errno.h>
 #include <unistd.h>
 #include <ctype.h>
-#include "proto.h"
 
 #ifdef ENABLE_NANORC
 
index be2b2dc398e00dba86247ca3a2157f1b312479b2..77dc5c19d3b584341e8c5ffa33a90d6771dcd7b0 100644 (file)
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <string.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <ctype.h>
 #include <errno.h>
-#include "proto.h"
 
 static bool search_last_line = FALSE;
        /* Have we gone past the last line while searching? */
index 83eacd4f23ddfbdd5e0a88406993f1d90a757b9a..9cd7944efaca40088cd65ad477d2ea03d6e87409 100644 (file)
@@ -21,9 +21,7 @@
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <stdio.h>
 #include <signal.h>
@@ -32,7 +30,6 @@
 #include <fcntl.h>
 #include <sys/wait.h>
 #include <errno.h>
-#include "proto.h"
 
 #ifndef NANO_TINY
 static pid_t pid = -1;
index a7ffc746e6616c0fb108f056aba12cc7d68394c7..33c92c226beefd9f3f6b97c9227bd6f5227d4a23 100644 (file)
@@ -21,9 +21,7 @@
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <string.h>
 #include <stdio.h>
@@ -31,7 +29,6 @@
 #include <pwd.h>
 #include <ctype.h>
 #include <errno.h>
-#include "proto.h"
 
 int digits(size_t n)
 {
index 794c8965e95bab6b9a95d6421e39c54454df137c..7b505614c33e54534f6eef3340733bdc4c57173c 100644 (file)
@@ -21,9 +21,7 @@
  *                                                                        *
  **************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
 
 #include <stdio.h>
 #include <stdarg.h>
@@ -31,7 +29,6 @@
 #include <unistd.h>
 #include <errno.h>
 #include <ctype.h>
-#include "proto.h"
 
 static int *key_buffer = NULL;
                                /* The default keystroke buffer,