summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--delta.c2
-rw-r--r--gfx/cro.c (renamed from cro.c)12
-rw-r--r--gfx/cro.h (renamed from cro.h)10
-rw-r--r--gfx/diff.c (renamed from diff.c)8
-rw-r--r--gfx/diff.h (renamed from diff.h)12
-rw-r--r--gfx/fig.c (renamed from fig.c)8
-rw-r--r--gfx/fig.h (renamed from fig.h)10
-rw-r--r--gfx/gfx.c (renamed from gfx.c)8
-rw-r--r--gfx/gfx.h (renamed from gfx.h)10
-rw-r--r--gfx/record.c (renamed from record.c)10
-rw-r--r--gfx/record.h (renamed from record.h)10
-rw-r--r--gfx/style.c (renamed from style.c)4
-rw-r--r--gfx/style.h (renamed from style.h)8
-rw-r--r--gfx/text.c (renamed from text.c)8
-rw-r--r--gfx/text.h (renamed from text.h)8
-rw-r--r--gui/gui.c8
-rw-r--r--kicad/dwg.c6
-rw-r--r--kicad/lib-parse.c2
-rw-r--r--kicad/lib-render.c6
-rw-r--r--kicad/lib.h2
-rw-r--r--kicad/sch-render.c4
-rw-r--r--kicad/sch.h4
-rw-r--r--main.c8
24 files changed, 87 insertions, 85 deletions
diff --git a/Makefile b/Makefile
index 56a294f..96791ee 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,9 @@ OBJS = main.o \
gui/gui.o gui/over.o gui/style.o gui/aoi.o gui/fmt-pango.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 text.o misc.o diag.o
+ gfx/style.o gfx/fig.o gfx/record.o gfx/cro.o gfx/diff.o gfx/gfx.o \
+ gfx/text.o \
+ misc.o diag.o
CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow \
-Wmissing-prototypes -Wmissing-declarations \
diff --git a/delta.c b/delta.c
index 29b96d5..46c76df 100644
--- a/delta.c
+++ b/delta.c
@@ -17,7 +17,7 @@
#include <string.h>
#include "util.h"
-#include "text.h"
+#include "gfx/text.h"
#include "kicad/lib.h"
#include "kicad/sch.h"
#include "delta.h"
diff --git a/cro.c b/gfx/cro.c
index 0b66eb2..e3e1658 100644
--- a/cro.c
+++ b/gfx/cro.c
@@ -1,5 +1,5 @@
/*
- * cro.c - Cairo graphics back-end
+ * gfx/cro.c - Cairo graphics back-end
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -24,12 +24,12 @@
#include "util.h"
#include "diag.h"
-#include "style.h"
-#include "text.h"
-#include "gfx.h"
-#include "record.h"
+#include "gfx/style.h"
+#include "gfx/text.h"
+#include "gfx/gfx.h"
+#include "gfx/record.h"
#include "main.h"
-#include "cro.h"
+#include "gfx/cro.h"
/*
diff --git a/cro.h b/gfx/cro.h
index 8c3fd97..954a3d7 100644
--- a/cro.h
+++ b/gfx/cro.h
@@ -1,5 +1,5 @@
/*
- * cro.h - Cairo graphics back-end
+ * gfx/cro.h - Cairo graphics back-end
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -11,14 +11,14 @@
*/
-#ifndef CRO_H
-#define CRO_H
+#ifndef GFX_CRO_H
+#define GFX_CRO_H
#include <stdint.h>
#include <cairo/cairo.h>
-#include "gfx.h"
+#include "gfx/gfx.h"
struct cro_ctx;
@@ -47,4 +47,4 @@ uint32_t *cro_img(struct cro_ctx *ctx, int x0, int yo, int w, int h,
int xe, int ye,
float scale, cairo_t **res_cr, int *res_stride);
-#endif /* !CRO_H */
+#endif /* !GFX_CRO_H */
diff --git a/diff.c b/gfx/diff.c
index 1ce1b35..9544693 100644
--- a/diff.c
+++ b/gfx/diff.c
@@ -1,5 +1,5 @@
/*
- * diff.c - Schematics difference
+ * gfx/diff.c - Schematics difference
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -22,12 +22,12 @@
#include "util.h"
#include "diag.h"
#include "main.h"
-#include "cro.h"
+#include "gfx/cro.h"
#include "file/file.h"
#include "kicad/sch.h"
#include "kicad/lib.h"
-#include "record.h"
-#include "diff.h"
+#include "gfx/record.h"
+#include "gfx/diff.h"
#define DEFAULT_FRAME_RADIUS 30
diff --git a/diff.h b/gfx/diff.h
index 786fb70..4042ccc 100644
--- a/diff.h
+++ b/gfx/diff.h
@@ -1,5 +1,5 @@
/*
- * diff.h - Schematics difference
+ * gfx/diff.h - Schematics difference
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -11,13 +11,13 @@
*/
-#ifndef DIFF_H
-#define DIFF_H
+#ifndef GFX_DIFF_H
+#define GFX_DIFF_H
#include <cairo/cairo.h>
-#include "gfx.h"
-#include "cro.h"
+#include "gfx/gfx.h"
+#include "gfx/cro.h"
extern const struct gfx_ops diff_ops;
@@ -26,4 +26,4 @@ extern const struct gfx_ops diff_ops;
void diff_to_canvas(cairo_t *cr, int cx, int cy, float scale,
struct cro_ctx *old, struct cro_ctx *new);
-#endif /* !DIFF_H */
+#endif /* !GFX_DIFF_H */
diff --git a/fig.c b/gfx/fig.c
index 4735c5c..0b1cbcc 100644
--- a/fig.c
+++ b/gfx/fig.c
@@ -1,5 +1,5 @@
/*
- * fig.c - Generate FIG output for Eeschema items
+ * gfx/fig.c - Generate FIG output for Eeschema items
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -21,10 +21,10 @@
#include "util.h"
#include "diag.h"
-#include "style.h"
-#include "text.h"
+#include "gfx/style.h"
+#include "gfx/text.h"
#include "main.h"
-#include "fig.h"
+#include "gfx/fig.h"
/*
diff --git a/fig.h b/gfx/fig.h
index 6e6a361..06701e1 100644
--- a/fig.h
+++ b/gfx/fig.h
@@ -1,5 +1,5 @@
/*
- * fig.h - Generate FIG output for Eeschema items
+ * gfx/fig.h - Generate FIG output for Eeschema items
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -11,12 +11,12 @@
*/
-#ifndef FIG_H
-#define FIG_H
+#ifndef GFX_FIG_H
+#define GFX_FIG_H
-#include "gfx.h"
+#include "gfx/gfx.h"
extern const struct gfx_ops fig_ops;
-#endif /* !FIG_H */
+#endif /* !GFX_FIG_H */
diff --git a/gfx.c b/gfx/gfx.c
index ba88134..a0ac9bd 100644
--- a/gfx.c
+++ b/gfx/gfx.c
@@ -1,5 +1,5 @@
/*
- * gfx.c - Generate graphical output for Eeschema items
+ * gfx/gfx.c - Generate graphical output for Eeschema items
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -13,9 +13,9 @@
#include <stdbool.h>
-#include "style.h"
-#include "text.h"
-#include "gfx.h"
+#include "gfx/style.h"
+#include "gfx/text.h"
+#include "gfx/gfx.h"
void *gfx_ctx;
diff --git a/gfx.h b/gfx/gfx.h
index 94425c0..327a963 100644
--- a/gfx.h
+++ b/gfx/gfx.h
@@ -1,5 +1,5 @@
/*
- * gfx.h - Generate graphical output for Eeschema items
+ * gfx/gfx.h - Generate graphical output for Eeschema items
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -11,12 +11,12 @@
*/
-#ifndef GFX_H
-#define GFX_H
+#ifndef GFX_GFX_H
+#define GFX_GFX_H
#include <stdbool.h>
-#include "text.h"
+#include "gfx/text.h"
struct gfx_ops {
@@ -69,4 +69,4 @@ void gfx_new_sheet(void);
bool gfx_multi_sheet(void);
void gfx_end(void);
-#endif /* !GFX_H */
+#endif /* !GFX_GFX_H */
diff --git a/record.c b/gfx/record.c
index 03cf90c..91a2652 100644
--- a/record.c
+++ b/gfx/record.c
@@ -1,5 +1,5 @@
/*
- * record.c - Record graphics operations by layers and replay
+ * gfx/record.c - Record graphics operations by layers and replay
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -16,10 +16,10 @@
#include <math.h>
#include "util.h"
-#include "style.h"
-#include "gfx.h"
-#include "text.h"
-#include "record.h"
+#include "gfx/style.h"
+#include "gfx/gfx.h"
+#include "gfx/text.h"
+#include "gfx/record.h"
struct record_obj {
diff --git a/record.h b/gfx/record.h
index 3ff26f8..85e44b2 100644
--- a/record.h
+++ b/gfx/record.h
@@ -1,5 +1,5 @@
/*
- * record.h - Record graphics operations by layers and replay
+ * gfx/record.h - Record graphics operations by layers and replay
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -11,10 +11,10 @@
*/
-#ifndef RECORD_H
-#define RECORD_H
+#ifndef GFX_RECORD_H
+#define GFX_RECORD_H
-#include "gfx.h"
+#include "gfx/gfx.h"
struct record_obj;
@@ -55,4 +55,4 @@ void record_replay(const struct record *rec);
void record_bbox(const struct record *rec, int *x, int *y, int *w, int *h);
void record_destroy(struct record *rec);
-#endif /* !RECORD_H */
+#endif /* !GFX_RECORD_H */
diff --git a/style.c b/gfx/style.c
index 9bd0790..5628b41 100644
--- a/style.c
+++ b/gfx/style.c
@@ -1,5 +1,5 @@
/*
- * style.c - Drawing style
+ * gfx/style.c - Drawing style
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -13,7 +13,7 @@
#include <stdint.h>
#include "util.h"
-#include "style.h"
+#include "gfx/style.h"
uint32_t color_rgb[] = {
diff --git a/style.h b/gfx/style.h
index 4a090ef..15c4d8b 100644
--- a/style.h
+++ b/gfx/style.h
@@ -1,5 +1,5 @@
/*
- * style.h - Drawing style
+ * gfx/style.h - Drawing style
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -10,8 +10,8 @@
* (at your option) any later version.
*/
-#ifndef STYLE_H
-#define STYLE_H
+#ifndef GFX_STYLE_H
+#define GFX_STYLE_H
#include <stdint.h>
@@ -100,4 +100,4 @@
extern uint32_t color_rgb[];
extern unsigned n_color_rgb;
-#endif /* !STYLE_H */
+#endif /* !GFX_STYLE_H */
diff --git a/text.c b/gfx/text.c
index 4c7d94d..bc9625d 100644
--- a/text.c
+++ b/gfx/text.c
@@ -1,5 +1,5 @@
/*
- * text.c - FIG text object
+ * gfx/text.c - FIG text object
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -18,9 +18,9 @@
#include "util.h"
#include "misc.h"
-#include "style.h"
-#include "gfx.h"
-#include "text.h"
+#include "gfx/style.h"
+#include "gfx/gfx.h"
+#include "gfx/text.h"
void text_init(struct text *txt)
diff --git a/text.h b/gfx/text.h
index febca34..e6327fd 100644
--- a/text.h
+++ b/gfx/text.h
@@ -1,5 +1,5 @@
/*
- * text.h - FIG text object
+ * gfx/text.h - FIG text object
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
@@ -11,8 +11,8 @@
*/
-#ifndef TEXT_H
-#define TEXT_H
+#ifndef GFX_TEXT_H
+#define GFX_TEXT_H
/* use constants of FIG text sub_type */
@@ -56,4 +56,4 @@ int text_rel_x(const struct text *txt, enum text_align xr, enum text_align yr,
int text_rel_y(const struct text *txt, enum text_align xr, enum text_align yr,
int dx, int dy);
-#endif /* !TEXT_H */
+#endif /* !GFX_TEXT_H */
diff --git a/gui/gui.c b/gui/gui.c
index 36ddf81..47ee87f 100644
--- a/gui/gui.c
+++ b/gui/gui.c
@@ -30,14 +30,14 @@
#include "util.h"
#include "diag.h"
-#include "style.h"
-#include "cro.h"
-#include "gfx.h"
+#include "gfx/style.h"
+#include "gfx/cro.h"
+#include "gfx/gfx.h"
#include "file/git-hist.h"
#include "kicad/lib.h"
#include "kicad/sch.h"
#include "delta.h"
-#include "diff.h"
+#include "gfx/diff.h"
#include "kicad/dwg.h"
#include "gui/fmt-pango.h"
#include "gui/aoi.h"
diff --git a/kicad/dwg.c b/kicad/dwg.c
index 9943775..d9f4b1a 100644
--- a/kicad/dwg.c
+++ b/kicad/dwg.c
@@ -19,9 +19,9 @@
#include "util.h"
#include "misc.h"
-#include "style.h"
-#include "text.h"
-#include "gfx.h"
+#include "gfx/style.h"
+#include "gfx/text.h"
+#include "gfx/gfx.h"
#include "kicad/dwg.h"
diff --git a/kicad/lib-parse.c b/kicad/lib-parse.c
index a4c8d6f..edd429f 100644
--- a/kicad/lib-parse.c
+++ b/kicad/lib-parse.c
@@ -17,7 +17,7 @@
#include "util.h"
#include "diag.h"
-#include "text.h"
+#include "gfx/text.h"
#include "file/file.h"
#include "kicad/lib.h"
diff --git a/kicad/lib-render.c b/kicad/lib-render.c
index 079d776..d4e8caf 100644
--- a/kicad/lib-render.c
+++ b/kicad/lib-render.c
@@ -18,9 +18,9 @@
#include "util.h"
#include "diag.h"
#include "misc.h"
-#include "style.h"
-#include "gfx.h"
-#include "text.h"
+#include "gfx/style.h"
+#include "gfx/gfx.h"
+#include "gfx/text.h"
#include "kicad/sch.h"
#include "kicad/lib.h"
diff --git a/kicad/lib.h b/kicad/lib.h
index 7bf07ac..c9b1a00 100644
--- a/kicad/lib.h
+++ b/kicad/lib.h
@@ -17,7 +17,7 @@
#include <stdbool.h>
#include "file/file.h"
-#include "text.h"
+#include "gfx/text.h"
enum lib_state {
diff --git a/kicad/sch-render.c b/kicad/sch-render.c
index 34effb1..9d56d54 100644
--- a/kicad/sch-render.c
+++ b/kicad/sch-render.c
@@ -16,8 +16,8 @@
#include <assert.h>
#include "misc.h"
-#include "style.h"
-#include "gfx.h"
+#include "gfx/style.h"
+#include "gfx/gfx.h"
#include "kicad/dwg.h"
#include "kicad/lib.h"
#include "kicad/sch.h"
diff --git a/kicad/sch.h b/kicad/sch.h
index d7e82f1..29ecc83 100644
--- a/kicad/sch.h
+++ b/kicad/sch.h
@@ -16,8 +16,8 @@
#include <stdbool.h>
-#include "dwg.h"
-#include "text.h"
+#include "kicad/dwg.h"
+#include "gfx/text.h"
#include "file/file.h"
#include "kicad/lib.h"
diff --git a/main.c b/main.c
index 1ca8032..1e85b71 100644
--- a/main.c
+++ b/main.c
@@ -21,10 +21,10 @@
#include "util.h"
#include "diag.h"
-#include "fig.h"
-#include "cro.h"
-#include "diff.h"
-#include "gfx.h"
+#include "gfx/fig.h"
+#include "gfx/cro.h"
+#include "gfx/diff.h"
+#include "gfx/gfx.h"
#include "file/file.h"
#include "kicad/lib.h"
#include "kicad/sch.h"