From 097192b7b45a7825d0b9db55e5884d8c18709605 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 17 Aug 2016 21:07:13 -0300 Subject: [PATCH] eeshow/: move file and history access to file/ --- eeshow/Makefile | 3 ++- eeshow/diff.c | 2 +- eeshow/{ => file}/file.c | 6 +++--- eeshow/{ => file}/file.h | 8 ++++---- eeshow/{ => file}/git-file.c | 8 ++++---- eeshow/{ => file}/git-file.h | 8 ++++---- eeshow/{ => file}/git-hist.c | 8 ++++---- eeshow/{ => file}/git-hist.h | 8 ++++---- eeshow/{ => file}/git-util.c | 4 ++-- eeshow/{ => file}/git-util.h | 8 ++++---- eeshow/gui/gui.c | 2 +- eeshow/lib-parse.c | 2 +- eeshow/lib.h | 2 +- eeshow/main.c | 4 ++-- eeshow/sch-parse.c | 2 +- eeshow/sch.h | 2 +- 16 files changed, 39 insertions(+), 38 deletions(-) rename eeshow/{ => file}/file.c (98%) rename eeshow/{ => file}/file.h (92%) rename eeshow/{ => file}/git-file.c (98%) rename eeshow/{ => file}/git-file.h (87%) rename eeshow/{ => file}/git-hist.c (97%) rename eeshow/{ => file}/git-hist.h (87%) rename eeshow/{ => file}/git-util.c (96%) rename eeshow/{ => file}/git-util.h (79%) diff --git a/eeshow/Makefile b/eeshow/Makefile index 05e9cf9..1f858fe 100644 --- a/eeshow/Makefile +++ b/eeshow/Makefile @@ -13,7 +13,8 @@ NAME = eeshow OBJS = main.o sch-parse.o sch-render.o lib-parse.o lib-render.o \ gui/gui.o gui/over.o gui/style.o gui/aoi.o gui/fmt-pango.o \ - file.o git-util.o git-file.o git-hist.o delta.o \ + file/file.o file/git-util.o file/git-file.o file/git-hist.o \ + delta.o \ style.o fig.o record.o cro.o diff.o gfx.o dwg.o text.o misc.o diag.o CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow \ diff --git a/eeshow/diff.c b/eeshow/diff.c index ac31b0f..923bde7 100644 --- a/eeshow/diff.c +++ b/eeshow/diff.c @@ -23,7 +23,7 @@ #include "diag.h" #include "main.h" #include "cro.h" -#include "file.h" +#include "file/file.h" #include "sch.h" #include "lib.h" #include "record.h" diff --git a/eeshow/file.c b/eeshow/file/file.c similarity index 98% rename from eeshow/file.c rename to eeshow/file/file.c index 8d84f6c..8782e58 100644 --- a/eeshow/file.c +++ b/eeshow/file/file.c @@ -1,5 +1,5 @@ /* - * file.c - Open and read a file + * file/file.c - Open and read a file * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -18,8 +18,8 @@ #include "util.h" #include "diag.h" -#include "git-file.h" -#include "file.h" +#include "file/git-file.h" +#include "file/file.h" void *file_oid(const struct file *file) diff --git a/eeshow/file.h b/eeshow/file/file.h similarity index 92% rename from eeshow/file.h rename to eeshow/file/file.h index 4d5f886..8f6c855 100644 --- a/eeshow/file.h +++ b/eeshow/file/file.h @@ -1,5 +1,5 @@ /* - * file.h - Open and read a file + * file/file.h - Open and read a file * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -10,8 +10,8 @@ * (at your option) any later version. */ -#ifndef FILE_H -#define FILE_H +#ifndef FILE_FILE_H +#define FILE_FILE_H #include #include @@ -42,4 +42,4 @@ bool file_read(struct file *file, void *user); void file_close(struct file *file); -#endif /* !FILE_H */ +#endif /* !FILE_FILE_H */ diff --git a/eeshow/git-file.c b/eeshow/file/git-file.c similarity index 98% rename from eeshow/git-file.c rename to eeshow/file/git-file.c index fe590fb..6a78c9c 100644 --- a/eeshow/git-file.c +++ b/eeshow/file/git-file.c @@ -1,5 +1,5 @@ /* - * git-file.c - Open and read a file from git version control system + * file/git-file.c - Open and read a file from git version control system * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -22,9 +22,9 @@ #include "util.h" #include "diag.h" -#include "file.h" -#include "git-util.h" -#include "git-file.h" +#include "file/file.h" +#include "file/git-util.h" +#include "file/git-file.h" struct vcs_git { diff --git a/eeshow/git-file.h b/eeshow/file/git-file.h similarity index 87% rename from eeshow/git-file.h rename to eeshow/file/git-file.h index 973aedb..4369b0e 100644 --- a/eeshow/git-file.h +++ b/eeshow/file/git-file.h @@ -1,5 +1,5 @@ /* - * git-file.h - Open and read a file from git version control system + * file/git-file.h - Open and read a file from git version control system * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -10,8 +10,8 @@ * (at your option) any later version. */ -#ifndef GIT_FILE_H -#define GIT_FILE_H +#ifndef FILE_GIT_FILE_H +#define FILE_GIT_FILE_H #include @@ -42,4 +42,4 @@ bool vcs_git_read(void *ctx, struct file *file, void *user); void vcs_git_close(void *ctx); -#endif /* !GIT_FILE_H */ +#endif /* !FILE_GIT_FILE_H */ diff --git a/eeshow/git-hist.c b/eeshow/file/git-hist.c similarity index 97% rename from eeshow/git-hist.c rename to eeshow/file/git-hist.c index 6f18fa8..1826b9f 100644 --- a/eeshow/git-hist.c +++ b/eeshow/file/git-hist.c @@ -1,5 +1,5 @@ /* - * git-hist.c - Retrieve revision history from GIT repo + * file/git-hist.c - Retrieve revision history from GIT repo * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -18,9 +18,9 @@ #include "util.h" #include "diag.h" -#include "git-util.h" -#include "git-file.h" -#include "git-hist.h" +#include "file/git-util.h" +#include "file/git-file.h" +#include "file/git-hist.h" /* diff --git a/eeshow/git-hist.h b/eeshow/file/git-hist.h similarity index 87% rename from eeshow/git-hist.h rename to eeshow/file/git-hist.h index c26cf5d..f528816 100644 --- a/eeshow/git-hist.h +++ b/eeshow/file/git-hist.h @@ -1,5 +1,5 @@ /* - * git-hist.h - Retrieve revision history from GIT repo + * file/git-hist.h - Retrieve revision history from GIT repo * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -10,8 +10,8 @@ * (at your option) any later version. */ -#ifndef GIT_HIST_H -#define GIT_HIST_H +#ifndef FILE_GIT_HIST_H +#define FILE_GIT_HIST_H #include @@ -41,4 +41,4 @@ void hist_iterate(struct hist *h, void (*fn)(void *user, struct hist *h), void *user); void dump_hist(struct hist *h); -#endif /* !GIT_HIST_H */ +#endif /* !FILE_GIT_HIST_H */ diff --git a/eeshow/git-util.c b/eeshow/file/git-util.c similarity index 96% rename from eeshow/git-util.c rename to eeshow/file/git-util.c index e3bd2af..7abf5cf 100644 --- a/eeshow/git-util.c +++ b/eeshow/file/git-util.c @@ -1,5 +1,5 @@ /* - * git-util.c - Git utility functions + * file/git-util.c - Git utility functions * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -15,7 +15,7 @@ #include -#include "git-util.h" +#include "file/git-util.h" /* diff --git a/eeshow/git-util.h b/eeshow/file/git-util.h similarity index 79% rename from eeshow/git-util.h rename to eeshow/file/git-util.h index 54641e5..4c7e329 100644 --- a/eeshow/git-util.h +++ b/eeshow/file/git-util.h @@ -1,5 +1,5 @@ /* - * git-util.h - Git utility functions + * file/git-util.h - Git utility functions * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -10,8 +10,8 @@ * (at your option) any later version. */ -#ifndef GIT_UTIL_H -#define GIT_UTIL_H +#ifndef FILE_GIT_UTIL_H +#define FILE_GIT_UTIL_H #include @@ -21,4 +21,4 @@ bool git_repo_is_dirty(git_repository *repo); void git_init_once(void); -#endif /* !GIT_UTIL_H */ +#endif /* !FILE_GIT_UTIL_H */ diff --git a/eeshow/gui/gui.c b/eeshow/gui/gui.c index 8bde583..caba2ec 100644 --- a/eeshow/gui/gui.c +++ b/eeshow/gui/gui.c @@ -33,7 +33,7 @@ #include "style.h" #include "cro.h" #include "gfx.h" -#include "git-hist.h" +#include "file/git-hist.h" #include "sch.h" #include "delta.h" #include "diff.h" diff --git a/eeshow/lib-parse.c b/eeshow/lib-parse.c index 814087d..a8f90b4 100644 --- a/eeshow/lib-parse.c +++ b/eeshow/lib-parse.c @@ -18,7 +18,7 @@ #include "util.h" #include "diag.h" #include "text.h" -#include "file.h" +#include "file/file.h" #include "lib.h" diff --git a/eeshow/lib.h b/eeshow/lib.h index adc703e..c84e4ae 100644 --- a/eeshow/lib.h +++ b/eeshow/lib.h @@ -16,7 +16,7 @@ #include -#include "file.h" +#include "file/file.h" enum lib_state { diff --git a/eeshow/main.c b/eeshow/main.c index e88f0f1..1da3220 100644 --- a/eeshow/main.c +++ b/eeshow/main.c @@ -25,11 +25,11 @@ #include "cro.h" #include "diff.h" #include "gfx.h" -#include "file.h" +#include "file/file.h" #include "lib.h" #include "sch.h" #include "gui/fmt-pango.h" -#include "git-hist.h" +#include "file/git-hist.h" #include "gui/gui.h" #include "main.h" diff --git a/eeshow/sch-parse.c b/eeshow/sch-parse.c index 1b5b689..6f38d72 100644 --- a/eeshow/sch-parse.c +++ b/eeshow/sch-parse.c @@ -22,7 +22,7 @@ #include "util.h" #include "diag.h" #include "dwg.h" -#include "file.h" +#include "file/file.h" #include "lib.h" #include "sch.h" diff --git a/eeshow/sch.h b/eeshow/sch.h index 3eeb75a..f891d17 100644 --- a/eeshow/sch.h +++ b/eeshow/sch.h @@ -18,7 +18,7 @@ #include "dwg.h" #include "text.h" -#include "file.h" +#include "file/file.h" #include "lib.h"