Commit 034b994e authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 8befda64
Showing with 21 additions and 64 deletions
+21 -64
...@@ -124,6 +124,9 @@ CVS code - ...@@ -124,6 +124,9 @@ CVS code -
problems with its being defined as the wrong type aren't problems with its being defined as the wrong type aren't
nano's fault. Changes to handle_hupterm(), do_suspend(), nano's fault. Changes to handle_hupterm(), do_suspend(),
do_continue(), handle_sigwinch(), and cancel_command(). (DLR) 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: - browser.c:
do_browser() do_browser()
- When setting the width of each file, use the "?" operator - When setting the width of each file, use the "?" operator
......
...@@ -21,15 +21,12 @@ ...@@ -21,15 +21,12 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include "proto.h"
#ifndef DISABLE_BROWSER #ifndef DISABLE_BROWSER
......
...@@ -21,13 +21,10 @@ ...@@ -21,13 +21,10 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "proto.h"
#ifdef ENABLE_UTF8 #ifdef ENABLE_UTF8
#ifdef HAVE_WCHAR_H #ifdef HAVE_WCHAR_H
......
...@@ -21,13 +21,10 @@ ...@@ -21,13 +21,10 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "proto.h"
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
......
...@@ -21,13 +21,10 @@ ...@@ -21,13 +21,10 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include "proto.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? */
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -33,7 +31,6 @@ ...@@ -33,7 +31,6 @@
#include <errno.h> #include <errno.h>
#include <ctype.h> #include <ctype.h>
#include <pwd.h> #include <pwd.h>
#include "proto.h"
/* Add an entry to the openfile openfilestruct. This should only be /* Add an entry to the openfile openfilestruct. This should only be
* called from open_buffer(). */ * called from open_buffer(). */
......
...@@ -21,10 +21,6 @@ ...@@ -21,10 +21,6 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "proto.h" #include "proto.h"
/* Global variables */ /* Global variables */
......
...@@ -21,14 +21,11 @@ ...@@ -21,14 +21,11 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "proto.h"
#ifndef DISABLE_HELP #ifndef DISABLE_HELP
......
...@@ -21,13 +21,10 @@ ...@@ -21,13 +21,10 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "proto.h"
void do_first_line(void) void do_first_line(void)
{ {
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -36,16 +34,15 @@ ...@@ -36,16 +34,15 @@
#include <errno.h> #include <errno.h>
#include <ctype.h> #include <ctype.h>
#include <locale.h> #include <locale.h>
#include "proto.h"
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#ifdef HAVE_GETOPT_H #ifdef HAVE_GETOPT_H
#include <getopt.h> #include <getopt.h>
#endif #endif
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#ifndef NANO_TINY #ifndef NANO_TINY
#include <setjmp.h> #include <setjmp.h>
#endif #endif
......
...@@ -21,14 +21,11 @@ ...@@ -21,14 +21,11 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <string.h>
#include "proto.h"
static char *prompt = NULL; static char *prompt = NULL;
/* The prompt string for statusbar /* The prompt string for statusbar
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <string.h>
...@@ -31,7 +29,6 @@ ...@@ -31,7 +29,6 @@
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <ctype.h> #include <ctype.h>
#include "proto.h"
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
......
...@@ -21,16 +21,13 @@ ...@@ -21,16 +21,13 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include "proto.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? */
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
...@@ -32,7 +30,6 @@ ...@@ -32,7 +30,6 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <errno.h> #include <errno.h>
#include "proto.h"
#ifndef NANO_TINY #ifndef NANO_TINY
static pid_t pid = -1; static pid_t pid = -1;
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
...@@ -31,7 +29,6 @@ ...@@ -31,7 +29,6 @@
#include <pwd.h> #include <pwd.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include "proto.h"
int digits(size_t n) int digits(size_t n)
{ {
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
* * * *
**************************************************************************/ **************************************************************************/
#ifdef HAVE_CONFIG_H #include "proto.h"
#include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -31,7 +29,6 @@ ...@@ -31,7 +29,6 @@
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <ctype.h> #include <ctype.h>
#include "proto.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