From 46cbddf465bd66ba1d5c4bcc780ae0d65abd7f73 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 11 Aug 2012 20:32:19 +0200 Subject: [PATCH] Rename source files which also exist as system headers. As pointed out by Daniel Richard G. some of the dss header files are named the same as system header files. This patch renames these headers as well as their corresponding .c files. Specifically, error.h, fd.h, signal.h, string.h and time.h become err.h, file.h, sig.h, str.h and tv.h. --- Makefile | 2 +- daemon.c | 4 ++-- df.c | 4 ++-- dss.c | 10 +++++----- error.h => err.h | 0 exec.c | 4 ++-- fd.c => file.c | 4 ++-- fd.h => file.h | 0 ipc.c | 4 ++-- signal.c => sig.c | 7 +++---- signal.h => sig.h | 2 -- snap.c | 8 ++++---- string.c => str.c | 4 ++-- string.h => str.h | 0 time.c => tv.c | 6 ++---- time.h => tv.h | 0 16 files changed, 27 insertions(+), 32 deletions(-) rename error.h => err.h (100%) rename fd.c => file.c (98%) rename fd.h => file.h (100%) rename signal.c => sig.c (97%) rename signal.h => sig.h (83%) rename string.c => str.c (99%) rename string.h => str.h (100%) rename time.c => tv.c (96%) rename time.h => tv.h (100%) diff --git a/Makefile b/Makefile index 1eb37af..bbe616a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -dss_objects := cmdline.o dss.o string.o fd.o exec.o signal.o daemon.o df.o time.o snap.o ipc.o +dss_objects := cmdline.o dss.o str.o file.o exec.o sig.o daemon.o df.o tv.o snap.o ipc.o all: dss man: dss.1 diff --git a/daemon.c b/daemon.c index d48e30c..2ea64ec 100644 --- a/daemon.c +++ b/daemon.c @@ -19,9 +19,9 @@ #include #include "gcc-compat.h" -#include "error.h" +#include "err.h" #include "log.h" -#include "string.h" +#include "str.h" /** * Do the usual stuff to become a daemon. diff --git a/df.c b/df.c index 513bd19..1356db2 100644 --- a/df.c +++ b/df.c @@ -12,8 +12,8 @@ #include "gcc-compat.h" #include "log.h" -#include "error.h" -#include "string.h" +#include "err.h" +#include "str.h" #include "df.h" int get_disk_space(const char *path, struct disk_space *result) diff --git a/dss.c b/dss.c index 745729f..d1a11e2 100644 --- a/dss.c +++ b/dss.c @@ -24,14 +24,14 @@ #include "gcc-compat.h" #include "cmdline.h" #include "log.h" -#include "string.h" -#include "error.h" -#include "fd.h" +#include "str.h" +#include "err.h" +#include "file.h" #include "exec.h" #include "daemon.h" -#include "signal.h" +#include "sig.h" #include "df.h" -#include "time.h" +#include "tv.h" #include "snap.h" #include "ipc.h" diff --git a/error.h b/err.h similarity index 100% rename from error.h rename to err.h diff --git a/exec.c b/exec.c index adfd24d..36602df 100644 --- a/exec.c +++ b/exec.c @@ -15,8 +15,8 @@ #include "gcc-compat.h" #include "log.h" -#include "error.h" -#include "string.h" +#include "err.h" +#include "str.h" /** * Spawn a new process using execvp(). diff --git a/fd.c b/file.c similarity index 98% rename from fd.c rename to file.c index 2b002c7..ea671b1 100644 --- a/fd.c +++ b/file.c @@ -15,8 +15,8 @@ #include "gcc-compat.h" -#include "error.h" -#include "string.h" +#include "err.h" +#include "str.h" /** * Call a function for each subdirectory of the current working directory. diff --git a/fd.h b/file.h similarity index 100% rename from fd.h rename to file.h diff --git a/ipc.c b/ipc.c index c438939..9889674 100644 --- a/ipc.c +++ b/ipc.c @@ -15,10 +15,10 @@ #include #include "gcc-compat.h" -#include "string.h" +#include "str.h" #include "log.h" #include "gcc-compat.h" -#include "error.h" +#include "err.h" #if (defined(__GNUC__) && defined(__i386__)) #define get16bits(d) (*((const uint16_t *) (d))) diff --git a/signal.c b/sig.c similarity index 97% rename from signal.c rename to sig.c index 8dc93a6..9694684 100644 --- a/signal.c +++ b/sig.c @@ -3,7 +3,6 @@ * * Licensed under the GPL v2. For licencing details see COPYING. */ -/** \file signal.c Signal handling functions. */ #include #include @@ -20,10 +19,10 @@ #include "gcc-compat.h" -#include "error.h" +#include "err.h" #include "log.h" -#include "string.h" -#include "fd.h" +#include "str.h" +#include "file.h" static int signal_pipe[2]; diff --git a/signal.h b/sig.h similarity index 83% rename from signal.h rename to sig.h index 0c5b3d8..dea7cde 100644 --- a/signal.h +++ b/sig.h @@ -4,8 +4,6 @@ * Licensed under the GPL v2. For licencing details see COPYING. */ -/** \file signal.h exported symbols from signal.c */ - int signal_init(void); int install_sighandler(int); int next_signal(void); diff --git a/snap.c b/snap.c index a9383c1..aef0c51 100644 --- a/snap.c +++ b/snap.c @@ -14,11 +14,11 @@ #include #include "gcc-compat.h" -#include "error.h" +#include "err.h" #include "snap.h" -#include "string.h" -#include "time.h" -#include "fd.h" +#include "str.h" +#include "tv.h" +#include "file.h" /** * Wrapper for isdigit. diff --git a/string.c b/str.c similarity index 99% rename from string.c rename to str.c index d340811..e2b7f30 100644 --- a/string.c +++ b/str.c @@ -17,8 +17,8 @@ #include "gcc-compat.h" #include "log.h" -#include "error.h" -#include "string.h" +#include "err.h" +#include "str.h" /** * Write a message to a dynamically allocated string. diff --git a/string.h b/str.h similarity index 100% rename from string.h rename to str.h diff --git a/time.c b/tv.c similarity index 96% rename from time.c rename to tv.c index 3cc1ad6..b0acc79 100644 --- a/time.c +++ b/tv.c @@ -4,8 +4,6 @@ * Licensed under the GPL v2. For licencing details see COPYING. */ -/** \file time.c Helper functions for dealing with time values. */ - #include #include #include @@ -13,8 +11,8 @@ #include #include "gcc-compat.h" -#include "error.h" -#include "string.h" +#include "err.h" +#include "str.h" #include "log.h" /** diff --git a/time.h b/tv.h similarity index 100% rename from time.h rename to tv.h -- 2.39.2