From a6ecac95e1ff73a79fb6e476ee4a2e0b6d302227 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Wed, 14 Aug 2019 01:15:29 +0300 Subject: [PATCH] Rename fs*.c -> os*.c I planned to put just the file system routines into these files, but there are starting to be so many of them that I don't want to duplicate the same set for networking, subprocesses etc. --- c/builtins.c | 2 +- c/env_unix.c | 2 +- c/equalhash.c | 2 +- c/flisp.c | 2 +- c/flmain.c | 2 +- c/iostream.c | 2 +- c/libraries.c | 2 +- c/{fs.h => os.h} | 0 c/{fs_darwin.c => os_darwin.c} | 2 +- c/{fs_dragonfly.c => os_dragonfly.c} | 2 +- c/{fs_freebsd.c => os_freebsd.c} | 2 +- c/{fs_minix.c => os_haiku.c} | 2 +- c/{fs_linux.c => os_linux.c} | 2 +- c/{fs_sunos.c => os_minix.c} | 2 +- c/{fs_netbsd.c => os_netbsd.c} | 2 +- c/{fs_openbsd.c => os_openbsd.c} | 2 +- c/{fs_haiku.c => os_sunos.c} | 2 +- c/{fs_unix.c => os_unix.c} | 2 +- c/{fs_windows.c => os_windows.c} | 2 +- c/string.c | 2 +- c/table.c | 2 +- scripts/build.sh | 8 ++++---- 22 files changed, 24 insertions(+), 24 deletions(-) rename c/{fs.h => os.h} (100%) rename c/{fs_darwin.c => os_darwin.c} (92%) rename c/{fs_dragonfly.c => os_dragonfly.c} (93%) rename c/{fs_freebsd.c => os_freebsd.c} (93%) rename c/{fs_minix.c => os_haiku.c} (87%) rename c/{fs_linux.c => os_linux.c} (97%) rename c/{fs_sunos.c => os_minix.c} (87%) rename c/{fs_netbsd.c => os_netbsd.c} (93%) rename c/{fs_openbsd.c => os_openbsd.c} (99%) rename c/{fs_haiku.c => os_sunos.c} (87%) rename c/{fs_unix.c => os_unix.c} (95%) rename c/{fs_windows.c => os_windows.c} (97%) diff --git a/c/builtins.c b/c/builtins.c index 3b0f07a..4cfff47 100644 --- a/c/builtins.c +++ b/c/builtins.c @@ -27,7 +27,7 @@ #include "htable.h" #include "htableh_inc.h" #include "bitvector.h" -#include "fs.h" +#include "os.h" #include "random.h" #include "llt.h" diff --git a/c/env_unix.c b/c/env_unix.c index 0f56502..6dea63c 100644 --- a/c/env_unix.c +++ b/c/env_unix.c @@ -26,7 +26,7 @@ #include "htable.h" #include "htableh_inc.h" #include "bitvector.h" -#include "fs.h" +#include "os.h" #include "random.h" #include "llt.h" diff --git a/c/equalhash.c b/c/equalhash.c index b94d60f..640c385 100644 --- a/c/equalhash.c +++ b/c/equalhash.c @@ -18,7 +18,7 @@ #include "htable.h" #include "htableh_inc.h" #include "bitvector.h" -#include "fs.h" +#include "os.h" #include "random.h" #include "llt.h" diff --git a/c/flisp.c b/c/flisp.c index 1495e2c..fa6df66 100644 --- a/c/flisp.c +++ b/c/flisp.c @@ -55,7 +55,7 @@ #include "htable.h" #include "htableh_inc.h" #include "bitvector.h" -#include "fs.h" +#include "os.h" #include "random.h" #include "llt.h" diff --git a/c/flmain.c b/c/flmain.c index cf0886f..e841677 100644 --- a/c/flmain.c +++ b/c/flmain.c @@ -17,7 +17,7 @@ #include "htable.h" #include "htableh_inc.h" #include "bitvector.h" -#include "fs.h" +#include "os.h" #include "random.h" #include "llt.h" diff --git a/c/iostream.c b/c/iostream.c index 7a20945..bdef145 100644 --- a/c/iostream.c +++ b/c/iostream.c @@ -19,7 +19,7 @@ #include "htable.h" #include "htableh_inc.h" #include "bitvector.h" -#include "fs.h" +#include "os.h" #include "random.h" #include "llt.h" diff --git a/c/libraries.c b/c/libraries.c index 93aafed..c851c57 100644 --- a/c/libraries.c +++ b/c/libraries.c @@ -27,7 +27,7 @@ #include "htable.h" #include "htableh_inc.h" #include "bitvector.h" -#include "fs.h" +#include "os.h" #include "random.h" #include "llt.h" diff --git a/c/fs.h b/c/os.h similarity index 100% rename from c/fs.h rename to c/os.h diff --git a/c/fs_darwin.c b/c/os_darwin.c similarity index 92% rename from c/fs_darwin.c rename to c/os_darwin.c index da8f2db..1c5f598 100644 --- a/c/fs_darwin.c +++ b/c/os_darwin.c @@ -1,6 +1,6 @@ #include -#include "fs.h" +#include "os.h" char *get_exename(char *buf, size_t size) { diff --git a/c/fs_dragonfly.c b/c/os_dragonfly.c similarity index 93% rename from c/fs_dragonfly.c rename to c/os_dragonfly.c index 91c545e..c835ab2 100644 --- a/c/fs_dragonfly.c +++ b/c/os_dragonfly.c @@ -2,7 +2,7 @@ #include -#include "fs.h" +#include "os.h" char *get_exename(char *buf, size_t size) { diff --git a/c/fs_freebsd.c b/c/os_freebsd.c similarity index 93% rename from c/fs_freebsd.c rename to c/os_freebsd.c index 91c545e..c835ab2 100644 --- a/c/fs_freebsd.c +++ b/c/os_freebsd.c @@ -2,7 +2,7 @@ #include -#include "fs.h" +#include "os.h" char *get_exename(char *buf, size_t size) { diff --git a/c/fs_minix.c b/c/os_haiku.c similarity index 87% rename from c/fs_minix.c rename to c/os_haiku.c index ea07c71..51320d6 100644 --- a/c/fs_minix.c +++ b/c/os_haiku.c @@ -1,6 +1,6 @@ #include -#include "fs.h" +#include "os.h" char *get_exename(char *buf, size_t size) { diff --git a/c/fs_linux.c b/c/os_linux.c similarity index 97% rename from c/fs_linux.c rename to c/os_linux.c index 40c887b..83fdcad 100644 --- a/c/fs_linux.c +++ b/c/os_linux.c @@ -2,7 +2,7 @@ #include #include -#include "fs.h" +#include "os.h" char *get_exename(char *buf, size_t size) { diff --git a/c/fs_sunos.c b/c/os_minix.c similarity index 87% rename from c/fs_sunos.c rename to c/os_minix.c index ea07c71..51320d6 100644 --- a/c/fs_sunos.c +++ b/c/os_minix.c @@ -1,6 +1,6 @@ #include -#include "fs.h" +#include "os.h" char *get_exename(char *buf, size_t size) { diff --git a/c/fs_netbsd.c b/c/os_netbsd.c similarity index 93% rename from c/fs_netbsd.c rename to c/os_netbsd.c index de93cfa..1256376 100644 --- a/c/fs_netbsd.c +++ b/c/os_netbsd.c @@ -2,7 +2,7 @@ #include -#include "fs.h" +#include "os.h" char *get_exename(char *buf, size_t size) { diff --git a/c/fs_openbsd.c b/c/os_openbsd.c similarity index 99% rename from c/fs_openbsd.c rename to c/os_openbsd.c index b87ab13..de08e6a 100644 --- a/c/fs_openbsd.c +++ b/c/os_openbsd.c @@ -10,7 +10,7 @@ #include #include -#include "fs.h" +#include "os.h" char *get_exename(char *buf, size_t size) { diff --git a/c/fs_haiku.c b/c/os_sunos.c similarity index 87% rename from c/fs_haiku.c rename to c/os_sunos.c index ea07c71..51320d6 100644 --- a/c/fs_haiku.c +++ b/c/os_sunos.c @@ -1,6 +1,6 @@ #include -#include "fs.h" +#include "os.h" char *get_exename(char *buf, size_t size) { diff --git a/c/fs_unix.c b/c/os_unix.c similarity index 95% rename from c/fs_unix.c rename to c/os_unix.c index 4415a39..7c3d5f4 100644 --- a/c/fs_unix.c +++ b/c/os_unix.c @@ -1,7 +1,7 @@ #include #include -#include "fs.h" +#include "os.h" void path_to_dirname(char *path) { diff --git a/c/fs_windows.c b/c/os_windows.c similarity index 97% rename from c/fs_windows.c rename to c/os_windows.c index cc51c96..e10c894 100644 --- a/c/fs_windows.c +++ b/c/os_windows.c @@ -1,6 +1,6 @@ #include -#include "fs.h" +#include "os.h" void path_to_dirname(char *path) { diff --git a/c/string.c b/c/string.c index de55831..a544725 100644 --- a/c/string.c +++ b/c/string.c @@ -28,7 +28,7 @@ #include "htable.h" #include "htableh_inc.h" #include "bitvector.h" -#include "fs.h" +#include "os.h" #include "random.h" #include "llt.h" diff --git a/c/table.c b/c/table.c index f5a2057..e17a6cc 100644 --- a/c/table.c +++ b/c/table.c @@ -19,7 +19,7 @@ #include "htable.h" #include "htableh_inc.h" #include "bitvector.h" -#include "fs.h" +#include "os.h" #include "random.h" #include "llt.h" diff --git a/scripts/build.sh b/scripts/build.sh index d29292b..4e38b05 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -11,8 +11,8 @@ o_files="$o_files env_unix.o" o_files="$o_files equalhash.o" o_files="$o_files flisp.o" o_files="$o_files flmain.o" -o_files="$o_files fs_$os.o" -o_files="$o_files fs_unix.o" +o_files="$o_files os_$os.o" +o_files="$o_files os_unix.o" o_files="$o_files hashing.o" o_files="$o_files htable.o" o_files="$o_files int2str.o" @@ -89,8 +89,8 @@ $CC $CFLAGS -c ../c/dump.c $CC $CFLAGS -c ../c/env_unix.c $CC $CFLAGS -c ../c/equalhash.c $CC $CFLAGS -c ../c/flisp.c -$CC $CFLAGS -c ../c/fs_"$os".c -$CC $CFLAGS -c ../c/fs_unix.c +$CC $CFLAGS -c ../c/os_"$os".c +$CC $CFLAGS -c ../c/os_unix.c $CC $CFLAGS -c ../c/hashing.c $CC $CFLAGS -c ../c/htable.c $CC $CFLAGS -c ../c/int2str.c