diff --git a/ChangeLog b/ChangeLog index 8998ca5f2b7f04bfe7042c3ef570087830f034bb..f06987b40a9bd35dfe458cdecd13ff505d071560 100644 --- 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 index 5d2ba8f4f8f0421b4ec3c318ef1c28561b1b3282..3b60b6cf941028a43e89ab156212eba263ac1a69 100644 --- 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 index 69f114f6628bb35166a812134d09cbd349d20578..bb838a8f4a90fd5846b35fd9d1177ae732fb2e38 100644 --- 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 index a6ef0b6204c3b4f97af7fe51907514bf367c537c..8e539da907e7f2a73b58f649749ae2f0971a8502 100644 --- 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 index 25784f34b1120b580c798b82fc8965a0f7a047d0..db601ada6fc99e6c3658b2450b264ff60a12c2de 100644 --- 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 index 396a6dadb7a3f43209fbf72397d302ab12e3de36..dd6e8e6072feecf779e283fc30709eeb130546a8 100644 --- 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 index c07162d4a09d4038b4bc403c894dcbf54acae624..f513010590e52d3c2674bda27224b56ccf40cd37 100644 --- 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>