From fd7b7223ab862d3708674d5cad26b01185e37763 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 28 Sep 2010 08:58:28 -0300 Subject: [PATCH] Move draw_circle from util.c to gui_util.c - solidify/util.h, solidify/util.c (draw_circle), solidify/gui_util.h, solidify/gui_util.c: moved draw_circle from util.c to gui_util.c - solidify/util.c: this file is now empty. Remove it. - solidify/level.c, solidify/overlap.c: include gui_util.h instead of util.h - solidify/Makefile: replace util.o with gui_util.o --- solidify/Makefile | 4 ++-- solidify/{util.c => gui_util.c} | 4 ++-- solidify/gui_util.h | 21 +++++++++++++++++++++ solidify/level.c | 2 +- solidify/overlap.c | 2 +- solidify/util.h | 4 ---- 6 files changed, 27 insertions(+), 10 deletions(-) rename solidify/{util.c => gui_util.c} (89%) create mode 100644 solidify/gui_util.h diff --git a/solidify/Makefile b/solidify/Makefile index 57f83f5..9fd526d 100644 --- a/solidify/Makefile +++ b/solidify/Makefile @@ -12,8 +12,8 @@ SHELL = /bin/bash -OBJS = array.o face.o histo.o level.o matrix.o overlap.o povray.o project.o \ - solidify.o style.o util.o +OBJS = array.o face.o gui_util.o histo.o level.o matrix.o overlap.o povray.o \ + project.o solidify.o style.o CFLAGS_WARN = -Wall -Wshadow -Wmissing-prototypes \ -Wmissing-declarations -Wno-format-zero-length diff --git a/solidify/util.c b/solidify/gui_util.c similarity index 89% rename from solidify/util.c rename to solidify/gui_util.c index 40206d1..25e6005 100644 --- a/solidify/util.c +++ b/solidify/gui_util.c @@ -1,5 +1,5 @@ /* - * util.c - Common utility functions + * gui_util.c - GUI helper functions * * Written 2010 by Werner Almesberger * Copyright 2010 by Werner Almesberger @@ -13,7 +13,7 @@ #include -#include "util.h" +#include "gui_util.h" void draw_circle(GdkDrawable *da, GdkGC *gc, int x, int y, int r) diff --git a/solidify/gui_util.h b/solidify/gui_util.h new file mode 100644 index 0000000..fe3d8e6 --- /dev/null +++ b/solidify/gui_util.h @@ -0,0 +1,21 @@ +/* + * gui_util.h - GUI helper functions + * + * Written 2009 by Werner Almesberger + * Copyright 2009 by Werner Almesberger + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef GUI_UTIL_H +#define GUI_UTIL_H + +#include + + +void draw_circle(GdkDrawable *da, GdkGC *gc, int x, int y, int r); + +#endif /* !GUI_UTIL_H */ diff --git a/solidify/level.c b/solidify/level.c index c8fb8b7..c0425a3 100644 --- a/solidify/level.c +++ b/solidify/level.c @@ -16,9 +16,9 @@ #include #include -#include "util.h" #include "array.h" #include "face.h" +#include "gui_util.h" #include "style.h" #include "level.h" diff --git a/solidify/overlap.c b/solidify/overlap.c index 22fab6e..b319d58 100644 --- a/solidify/overlap.c +++ b/solidify/overlap.c @@ -17,9 +17,9 @@ #include #include -#include "util.h" #include "face.h" #include "solid.h" +#include "gui_util.h" #include "style.h" #include "overlap.h" diff --git a/solidify/util.h b/solidify/util.h index 635f258..d4497b3 100644 --- a/solidify/util.h +++ b/solidify/util.h @@ -15,7 +15,6 @@ #include #include -#include #define alloc_size(s) \ @@ -32,7 +31,4 @@ abort(); \ stralloc_tmp; }) - -void draw_circle(GdkDrawable *da, GdkGC *gc, int x, int y, int r); - #endif /* !UTIL_H */