Date:2010-09-28 13:58:28 (8 years 2 months ago)
Author:Werner Almesberger
Commit:fd7b7223ab862d3708674d5cad26b01185e37763
Message: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
Files: solidify/Makefile (1 diff)
solidify/gui_util.c (1 diff)
solidify/gui_util.h (1 diff)
solidify/level.c (1 diff)
solidify/overlap.c (1 diff)
solidify/util.c (1 diff)
solidify/util.h (2 diffs)

Change Details

solidify/Makefile
1212
1313SHELL = /bin/bash
1414
15OBJS = array.o face.o histo.o level.o matrix.o overlap.o povray.o project.o \
16       solidify.o style.o util.o
15OBJS = array.o face.o gui_util.o histo.o level.o matrix.o overlap.o povray.o \
16       project.o solidify.o style.o
1717
1818CFLAGS_WARN = -Wall -Wshadow -Wmissing-prototypes \
1919          -Wmissing-declarations -Wno-format-zero-length
solidify/gui_util.c
1/*
2 * gui_util.c - GUI helper functions
3 *
4 * Written 2010 by Werner Almesberger
5 * Copyright 2010 by Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#include <gtk/gtk.h>
15
16#include "gui_util.h"
17
18
19void draw_circle(GdkDrawable *da, GdkGC *gc, int x, int y, int r)
20{
21    gdk_draw_arc(da, gc, FALSE, x-r, y-r, 2*r, 2*r, 0, 360*64);
22}
solidify/gui_util.h
1/*
2 * gui_util.h - GUI helper functions
3 *
4 * Written 2009 by Werner Almesberger
5 * Copyright 2009 by Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef GUI_UTIL_H
14#define GUI_UTIL_H
15
16#include <gtk/gtk.h>
17
18
19void draw_circle(GdkDrawable *da, GdkGC *gc, int x, int y, int r);
20
21#endif /* !GUI_UTIL_H */
solidify/level.c
1616#include <math.h>
1717#include <gtk/gtk.h>
1818
19#include "util.h"
2019#include "array.h"
2120#include "face.h"
21#include "gui_util.h"
2222#include "style.h"
2323#include "level.h"
2424
solidify/overlap.c
1717#include <limits.h>
1818#include <gtk/gtk.h>
1919
20#include "util.h"
2120#include "face.h"
2221#include "solid.h"
22#include "gui_util.h"
2323#include "style.h"
2424#include "overlap.h"
2525
solidify/util.c
1/*
2 * util.c - Common utility functions
3 *
4 * Written 2010 by Werner Almesberger
5 * Copyright 2010 by Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#include <gtk/gtk.h>
15
16#include "util.h"
17
18
19void draw_circle(GdkDrawable *da, GdkGC *gc, int x, int y, int r)
20{
21    gdk_draw_arc(da, gc, FALSE, x-r, y-r, 2*r, 2*r, 0, 360*64);
22}
solidify/util.h
1515
1616#include <stdlib.h>
1717#include <string.h>
18#include <gtk/gtk.h>
1918
2019
2120#define alloc_size(s) \
...... 
3231        abort(); \
3332    stralloc_tmp; })
3433
35
36void draw_circle(GdkDrawable *da, GdkGC *gc, int x, int y, int r);
37
3834#endif /* !UTIL_H */

Archive Download the corresponding diff file

Branches:
master



interactive