commit 84d0d59cbb7db532220871a597e424a67660b098
parent 164c79883b426968fa90613d6e0b15583d2049e0
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Thu, 4 Nov 2004 03:53:11 +0000
remove most redundant includes of sys/stat.h; it's included in nano.h,
so it doesn't need to be included in files that include nano.h
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2053 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
7 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -105,6 +105,9 @@ CVS code -
get_totals(); changes to write_marked(), do_int_spell_fix(),
do_alt_speller(), handle_sigwinch(), and do_replace_loop().
(DLR)
+ - Remove most redundant includes of sys/stat.h. It's included
+ in nano.h, so it doesn't need to be included in files that
+ include nano.h. (DLR)
- files.c:
do_insertfile()
- Simplify by reusing variables whereever possible, and add a
diff --git a/src/color.c b/src/color.c
@@ -25,7 +25,6 @@
#include <string.h>
#include <stdio.h>
#include <errno.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include "proto.h"
#include "nano.h"
diff --git a/src/files.c b/src/files.c
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>
-#include <sys/stat.h>
#include <utime.h>
#include <fcntl.h>
#include <errno.h>
diff --git a/src/global.c b/src/global.c
@@ -23,7 +23,6 @@
#include <stdlib.h>
#include <assert.h>
-#include <sys/stat.h>
#include "proto.h"
#include "nano.h"
diff --git a/src/nano.c b/src/nano.c
@@ -28,7 +28,6 @@
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
-#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <sys/wait.h>
diff --git a/src/proto.h b/src/proto.h
@@ -21,8 +21,8 @@
/* Externs. */
-#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/stat.h>
#ifdef HAVE_REGEX_H
#include <regex.h>
#endif
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -27,7 +27,6 @@
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include <pwd.h>
#include <ctype.h>