summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-17 21:07:13 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-17 21:07:13 -0300
commit265b34fd1c1e5771adae3052b3e459d5eac597c7 (patch)
treebfd27907916e3605f2b5d9d4ae13acaaa82ec797
parentbf8cc205a5a7fc21f139f23c6462519f9d4eb192 (diff)
downloadeeshow-265b34fd1c1e5771adae3052b3e459d5eac597c7.tar.gz
eeshow-265b34fd1c1e5771adae3052b3e459d5eac597c7.tar.bz2
eeshow-265b34fd1c1e5771adae3052b3e459d5eac597c7.zip
eeshow/: move file and history access to file/
-rw-r--r--Makefile3
-rw-r--r--diff.c2
-rw-r--r--file/file.c (renamed from file.c)6
-rw-r--r--file/file.h (renamed from file.h)8
-rw-r--r--file/git-file.c (renamed from git-file.c)8
-rw-r--r--file/git-file.h (renamed from git-file.h)8
-rw-r--r--file/git-hist.c (renamed from git-hist.c)8
-rw-r--r--file/git-hist.h (renamed from git-hist.h)8
-rw-r--r--file/git-util.c (renamed from git-util.c)4
-rw-r--r--file/git-util.h (renamed from git-util.h)8
-rw-r--r--gui/gui.c2
-rw-r--r--lib-parse.c2
-rw-r--r--lib.h2
-rw-r--r--main.c4
-rw-r--r--sch-parse.c2
-rw-r--r--sch.h2
16 files changed, 39 insertions, 38 deletions
diff --git a/Makefile b/Makefile
index 05e9cf9..1f858fe 100644
--- a/Makefile
+++ b/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/diff.c b/diff.c
index ac31b0f..923bde7 100644
--- a/diff.c
+++ b/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/file.c b/file/file.c
index 8d84f6c..8782e58 100644
--- a/file.c
+++ b/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/file.h b/file/file.h
index 4d5f886..8f6c855 100644
--- a/file.h
+++ b/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 <stdbool.h>
#include <stdio.h>
@@ -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/git-file.c b/file/git-file.c
index fe590fb..6a78c9c 100644
--- a/git-file.c
+++ b/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/git-file.h b/file/git-file.h
index 973aedb..4369b0e 100644
--- a/git-file.h
+++ b/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 <stdbool.h>
@@ -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/git-hist.c b/file/git-hist.c
index 6f18fa8..1826b9f 100644
--- a/git-hist.c
+++ b/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/git-hist.h b/file/git-hist.h
index c26cf5d..f528816 100644
--- a/git-hist.h
+++ b/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 <stdbool.h>
@@ -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/git-util.c b/file/git-util.c
index e3bd2af..7abf5cf 100644
--- a/git-util.c
+++ b/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 <git2.h>
-#include "git-util.h"
+#include "file/git-util.h"
/*
diff --git a/git-util.h b/file/git-util.h
index 54641e5..4c7e329 100644
--- a/git-util.h
+++ b/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 <stdbool.h>
@@ -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/gui/gui.c b/gui/gui.c
index 8bde583..caba2ec 100644
--- a/gui/gui.c
+++ b/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/lib-parse.c b/lib-parse.c
index 814087d..a8f90b4 100644
--- a/lib-parse.c
+++ b/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/lib.h b/lib.h
index adc703e..c84e4ae 100644
--- a/lib.h
+++ b/lib.h
@@ -16,7 +16,7 @@
#include <stdbool.h>
-#include "file.h"
+#include "file/file.h"
enum lib_state {
diff --git a/main.c b/main.c
index e88f0f1..1da3220 100644
--- a/main.c
+++ b/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/sch-parse.c b/sch-parse.c
index 1b5b689..6f38d72 100644
--- a/sch-parse.c
+++ b/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/sch.h b/sch.h
index 3eeb75a..f891d17 100644
--- a/sch.h
+++ b/sch.h
@@ -18,7 +18,7 @@
#include "dwg.h"
#include "text.h"
-#include "file.h"
+#include "file/file.h"
#include "lib.h"