diff --git a/eeshow/Makefile b/eeshow/Makefile index 1f858fe..56a294f 100644 --- a/eeshow/Makefile +++ b/eeshow/Makefile @@ -11,11 +11,13 @@ # NAME = eeshow -OBJS = main.o sch-parse.o sch-render.o lib-parse.o lib-render.o \ +OBJS = main.o \ + kicad/sch-parse.o kicad/sch-render.o kicad/lib-parse.o \ + kicad/lib-render.o kicad/dwg.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 dwg.o text.o misc.o diag.o + style.o fig.o record.o cro.o diff.o gfx.o text.o misc.o diag.o CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow \ -Wmissing-prototypes -Wmissing-declarations \ diff --git a/eeshow/delta.c b/eeshow/delta.c index 3fcd0ca..29b96d5 100644 --- a/eeshow/delta.c +++ b/eeshow/delta.c @@ -18,8 +18,8 @@ #include "util.h" #include "text.h" -#include "lib.h" -#include "sch.h" +#include "kicad/lib.h" +#include "kicad/sch.h" #include "delta.h" diff --git a/eeshow/delta.h b/eeshow/delta.h index 893825b..7e92092 100644 --- a/eeshow/delta.h +++ b/eeshow/delta.h @@ -14,7 +14,7 @@ #ifndef DELTA_H #define DELTA_H -#include "sch.h" +#include "kicad/sch.h" bool sheet_eq(const struct sheet *a, const struct sheet *b); diff --git a/eeshow/diff.c b/eeshow/diff.c index 923bde7..1ce1b35 100644 --- a/eeshow/diff.c +++ b/eeshow/diff.c @@ -24,8 +24,8 @@ #include "main.h" #include "cro.h" #include "file/file.h" -#include "sch.h" -#include "lib.h" +#include "kicad/sch.h" +#include "kicad/lib.h" #include "record.h" #include "diff.h" diff --git a/eeshow/gui/gui.c b/eeshow/gui/gui.c index caba2ec..36ddf81 100644 --- a/eeshow/gui/gui.c +++ b/eeshow/gui/gui.c @@ -34,10 +34,11 @@ #include "cro.h" #include "gfx.h" #include "file/git-hist.h" -#include "sch.h" +#include "kicad/lib.h" +#include "kicad/sch.h" #include "delta.h" #include "diff.h" -#include "dwg.h" +#include "kicad/dwg.h" #include "gui/fmt-pango.h" #include "gui/aoi.h" #include "gui/style.h" diff --git a/eeshow/dwg.c b/eeshow/kicad/dwg.c similarity index 99% rename from eeshow/dwg.c rename to eeshow/kicad/dwg.c index f48a8c2..9943775 100644 --- a/eeshow/dwg.c +++ b/eeshow/kicad/dwg.c @@ -1,5 +1,5 @@ /* - * dwg.c - Complex drawing functions + * kicad/dwg.c - Complex drawing functions for KiCad items * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -22,7 +22,7 @@ #include "style.h" #include "text.h" #include "gfx.h" -#include "dwg.h" +#include "kicad/dwg.h" /* ----- Helper functions -------------------------------------------------- */ diff --git a/eeshow/dwg.h b/eeshow/kicad/dwg.h similarity index 90% rename from eeshow/dwg.h rename to eeshow/kicad/dwg.h index 725da8b..d4039a7 100644 --- a/eeshow/dwg.h +++ b/eeshow/kicad/dwg.h @@ -1,5 +1,5 @@ /* - * dwg.h - Complex drawing functions + * kicad/dwg.h - Complex drawing functions for KiCad items * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -11,8 +11,8 @@ */ -#ifndef DWG_H -#define DWG_H +#ifndef KICAD_DWG_H +#define KICAD_DWG_H #include "fig.h" @@ -48,4 +48,4 @@ void dwg_line(int sx, int sy, int ex, int ey); void dwg_wire(int sx, int sy, int ex, int ey); void dwg_bus(int sx, int sy, int ex, int ey); -#endif /* !DWG_H */ +#endif /* !KICAD_DWG_H */ diff --git a/eeshow/lib-parse.c b/eeshow/kicad/lib-parse.c similarity index 99% rename from eeshow/lib-parse.c rename to eeshow/kicad/lib-parse.c index a8f90b4..a4c8d6f 100644 --- a/eeshow/lib-parse.c +++ b/eeshow/kicad/lib-parse.c @@ -1,5 +1,5 @@ /* - * lib.c - Parse Eeschema .lib file + * kicad/lib.c - Parse Eeschema .lib file * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -19,7 +19,7 @@ #include "diag.h" #include "text.h" #include "file/file.h" -#include "lib.h" +#include "kicad/lib.h" /* ----- Text -------------------------------------------------------------- */ diff --git a/eeshow/lib-render.c b/eeshow/kicad/lib-render.c similarity index 98% rename from eeshow/lib-render.c rename to eeshow/kicad/lib-render.c index 1bbb807..079d776 100644 --- a/eeshow/lib-render.c +++ b/eeshow/kicad/lib-render.c @@ -1,5 +1,5 @@ /* - * lib.c - Render component from library + * kicad/lib-render.c - Render component from library * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -21,8 +21,8 @@ #include "style.h" #include "gfx.h" #include "text.h" -#include "sch.h" -#include "lib.h" +#include "kicad/sch.h" +#include "kicad/lib.h" /* ----- Drawing ----------------------------------------------------------- */ diff --git a/eeshow/lib.h b/eeshow/kicad/lib.h similarity index 95% rename from eeshow/lib.h rename to eeshow/kicad/lib.h index c84e4ae..f0d418c 100644 --- a/eeshow/lib.h +++ b/eeshow/kicad/lib.h @@ -1,5 +1,5 @@ /* - * lib.h - Parse Eeschema .lib file + * kicad/lib.h - Parse Eeschema .lib file * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -11,8 +11,8 @@ */ -#ifndef LIB_H -#define LIB_H +#ifndef KICAD_LIB_H +#define KICAD_LIB_H #include @@ -131,4 +131,4 @@ bool lib_parse(struct lib *lib, const char *name, const struct file *related); void lib_init(struct lib *lib); void lib_free(struct lib *lib); -#endif /* !LIB_H */ +#endif /* !KICAD_LIB_H */ diff --git a/eeshow/sch-parse.c b/eeshow/kicad/sch-parse.c similarity index 99% rename from eeshow/sch-parse.c rename to eeshow/kicad/sch-parse.c index 6f38d72..c4b893f 100644 --- a/eeshow/sch-parse.c +++ b/eeshow/kicad/sch-parse.c @@ -1,5 +1,5 @@ /* - * sch-parse.c - Parse Eeschema .sch file + * kicad/sch-parse.c - Parse Eeschema .sch file * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -21,10 +21,10 @@ #include "util.h" #include "diag.h" -#include "dwg.h" +#include "kicad/dwg.h" #include "file/file.h" -#include "lib.h" -#include "sch.h" +#include "kicad/lib.h" +#include "kicad/sch.h" /* ----- (Global) Labels --------------------------------------------------- */ diff --git a/eeshow/sch-render.c b/eeshow/kicad/sch-render.c similarity index 97% rename from eeshow/sch-render.c rename to eeshow/kicad/sch-render.c index 517f884..34effb1 100644 --- a/eeshow/sch-render.c +++ b/eeshow/kicad/sch-render.c @@ -1,5 +1,5 @@ /* - * sch-render.c - Render schematics + * kicad/sch-render.c - Render schematics * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -18,9 +18,9 @@ #include "misc.h" #include "style.h" #include "gfx.h" -#include "dwg.h" -#include "lib.h" -#include "sch.h" +#include "kicad/dwg.h" +#include "kicad/lib.h" +#include "kicad/sch.h" /* ----- Rendering --------------------------------------------------------- */ diff --git a/eeshow/sch.h b/eeshow/kicad/sch.h similarity index 95% rename from eeshow/sch.h rename to eeshow/kicad/sch.h index f891d17..d7e82f1 100644 --- a/eeshow/sch.h +++ b/eeshow/kicad/sch.h @@ -1,5 +1,5 @@ /* - * sch.h - Parse Eeschema .sch file + * kicad/sch.h - Parse Eeschema .sch file * * Written 2016 by Werner Almesberger * Copyright 2016 by Werner Almesberger @@ -11,15 +11,15 @@ */ -#ifndef SCH_H -#define SCH_H +#ifndef KICAD_SCH_H +#define KICAD_SCH_H #include #include "dwg.h" #include "text.h" #include "file/file.h" -#include "lib.h" +#include "kicad/lib.h" enum sch_state { @@ -135,4 +135,4 @@ bool sch_parse(struct sch_ctx *ctx, struct file *file, const struct lib *lib, void sch_init(struct sch_ctx *ctx, bool recurse); void sch_free(struct sch_ctx *ctx); -#endif /* !SCH_H */ +#endif /* !KICAD_SCH_H */ diff --git a/eeshow/main.c b/eeshow/main.c index 1da3220..1ca8032 100644 --- a/eeshow/main.c +++ b/eeshow/main.c @@ -26,8 +26,8 @@ #include "diff.h" #include "gfx.h" #include "file/file.h" -#include "lib.h" -#include "sch.h" +#include "kicad/lib.h" +#include "kicad/sch.h" #include "gui/fmt-pango.h" #include "file/git-hist.h" #include "gui/gui.h"