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
* *
**************************************************************************/
-#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
* *
**************************************************************************/
-#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
* *
**************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
#include <stdio.h>
#include <string.h>
-#include "proto.h"
#ifdef ENABLE_COLOR
* *
**************************************************************************/
-#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? */
* *
**************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
#include <stdio.h>
#include <string.h>
#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(). */
* *
**************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include "proto.h"
/* Global variables */
* *
**************************************************************************/
-#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
* *
**************************************************************************/
-#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)
{
* *
**************************************************************************/
-#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
* *
**************************************************************************/
-#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
* *
**************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <ctype.h>
-#include "proto.h"
#ifdef ENABLE_NANORC
* *
**************************************************************************/
-#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? */
* *
**************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
#include <stdio.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <errno.h>
-#include "proto.h"
#ifndef NANO_TINY
static pid_t pid = -1;
* *
**************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
#include <string.h>
#include <stdio.h>
#include <pwd.h>
#include <ctype.h>
#include <errno.h>
-#include "proto.h"
int digits(size_t n)
{
* *
**************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "proto.h"
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <errno.h>
#include <ctype.h>
-#include "proto.h"
static int *key_buffer = NULL;
/* The default keystroke buffer,