[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] tweaks: remove includes that seem to be superfluous
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] [PATCH] tweaks: remove includes that seem to be superfluous |
Date: |
Sun, 30 Jul 2017 19:56:14 +0200 |
Without them, nano still compiles for me, with everything enabled,
even when using --enable-debug, --enable-utf8, and --with-slang.
---
src/browser.c | 1 -
src/color.c | 1 -
src/cut.c | 1 -
src/files.c | 3 ---
src/global.c | 1 -
src/help.c | 2 --
src/move.c | 1 -
src/nano.c | 3 ---
src/prompt.c | 2 --
src/rcfile.c | 2 --
src/search.c | 5 -----
src/text.c | 2 --
src/utils.c | 2 --
src/winio.c | 3 ---
14 files changed, 29 deletions(-)
diff --git a/src/browser.c b/src/browser.c
index fa11e423..b5cfa80f 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -22,7 +22,6 @@
#include "proto.h"
#include <stdint.h>
-#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
diff --git a/src/color.c b/src/color.c
index 4793974c..fe925866 100644
--- a/src/color.c
+++ b/src/color.c
@@ -21,7 +21,6 @@
#include "proto.h"
-#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
diff --git a/src/cut.c b/src/cut.c
index b1b3fb58..8c141b94 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -23,7 +23,6 @@
#include "proto.h"
#include <string.h>
-#include <stdio.h>
static bool keep_cutbuffer = FALSE;
/* Should we keep the contents of the cutbuffer? */
diff --git a/src/files.c b/src/files.c
index d2a97182..4ad0dc6c 100644
--- a/src/files.c
+++ b/src/files.c
@@ -21,13 +21,10 @@
#include "proto.h"
-#include <stdarg.h>
-#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
-#include <ctype.h>
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
diff --git a/src/global.c b/src/global.c
index a399e548..dca4c653 100644
--- a/src/global.c
+++ b/src/global.c
@@ -24,7 +24,6 @@
#include <ctype.h>
#include <string.h>
#include <strings.h>
-#include "assert.h"
/* Global variables. */
#ifndef NANO_TINY
diff --git a/src/help.c b/src/help.c
index 338fa30e..85ba6b51 100644
--- a/src/help.c
+++ b/src/help.c
@@ -22,9 +22,7 @@
#include "proto.h"
-#include <stdio.h>
#include <string.h>
-#include <ctype.h>
#include <errno.h>
#ifdef ENABLE_HELP
diff --git a/src/move.c b/src/move.c
index 719aa263..85159a1f 100644
--- a/src/move.c
+++ b/src/move.c
@@ -22,7 +22,6 @@
#include "proto.h"
#include <string.h>
-#include <ctype.h>
/* Move to the first line of the file. */
void do_first_line(void)
diff --git a/src/nano.c b/src/nano.c
index 8bfa6d75..2266c543 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -22,14 +22,11 @@
#include "proto.h"
#include "revision.h"
-#include <stdio.h>
-#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <ctype.h>
-#include <locale.h>
#ifdef ENABLE_UTF8
#include <langinfo.h>
#endif
diff --git a/src/prompt.c b/src/prompt.c
index 280dc7ca..ab2f4031 100644
--- a/src/prompt.c
+++ b/src/prompt.c
@@ -21,8 +21,6 @@
#include "proto.h"
-#include <stdio.h>
-#include <stdarg.h>
#include <string.h>
static char *prompt = NULL;
diff --git a/src/rcfile.c b/src/rcfile.c
index 069c3e27..beb17420 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -23,9 +23,7 @@
#include "proto.h"
#include <glob.h>
-#include <stdarg.h>
#include <string.h>
-#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <ctype.h>
diff --git a/src/search.c b/src/search.c
index 4c7ec5c1..9fb5f184 100644
--- a/src/search.c
+++ b/src/search.c
@@ -22,11 +22,6 @@
#include "proto.h"
#include <string.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <errno.h>
-#include <time.h>
static bool came_full_circle = FALSE;
/* Have we reached the starting line again while searching? */
diff --git a/src/text.c b/src/text.c
index 0222b2de..f79410c6 100644
--- a/src/text.c
+++ b/src/text.c
@@ -24,8 +24,6 @@
#include "proto.h"
-#include <stdio.h>
-#include <signal.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
diff --git a/src/utils.c b/src/utils.c
index 8a5a1aac..f3000e5c 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -22,12 +22,10 @@
#include "proto.h"
#include <string.h>
-#include <stdio.h>
#include <unistd.h>
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
-#include <ctype.h>
#include <errno.h>
/* Return the user's home directory. We use $HOME, and if that fails,
diff --git a/src/winio.c b/src/winio.c
index 6b727dc7..73da1928 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -26,10 +26,7 @@
#include <sys/ioctl.h>
#endif
-#include <stdio.h>
-#include <stdarg.h>
#include <string.h>
-#include <unistd.h>
#include <ctype.h>
#ifdef REVISION
--
2.13.2
- [Nano-devel] [PATCH] tweaks: remove includes that seem to be superfluous,
Benno Schulenberg <=