Skip to content

Commit 0a26ee1

Browse files
committed
Move/remove files used only in minimal example
Rename utils.c to write_ppm.c, move to examples dir, remove utils.h. Move the include-all libmypaint.c to examples folder, replace its use for top-dir identification in autogen.sh with mypaint-config.h
1 parent f0f2c6f commit 0a26ee1

File tree

6 files changed

+5
-14
lines changed

6 files changed

+5
-14
lines changed

Makefile.am

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ if HAVE_INTROSPECTION
4343
introspection_sources = \
4444
$(MyPaint_introspectable_headers) \
4545
brushmodes.c \
46-
libmypaint.c \
4746
mypaint-brush-settings.c \
4847
mypaint-rectangle.c \
4948
operationqueue.c \
50-
utils.c \
5149
fifo.c \
5250
mypaint-mapping.c \
5351
mypaint.c \
@@ -125,8 +123,7 @@ LIBMYPAINT_SOURCES = \
125123
mypaint-tiled-surface.c \
126124
operationqueue.c \
127125
rng-double.c \
128-
tilemap.c \
129-
utils.c
126+
tilemap.c
130127

131128
libmypaint_@LIBMYPAINT_API_PLATFORM_VERSION@_la_SOURCES = $(libmypaint_public_HEADERS) $(LIBMYPAINT_SOURCES)
132129

@@ -144,12 +141,10 @@ EXTRA_DIST = \
144141
fifo.h \
145142
generate.py \
146143
helpers.h \
147-
libmypaint.c \
148144
operationqueue.h \
149145
rng-double.h \
150146
tiled-surface-private.h \
151147
tilemap.h \
152-
utils.h \
153148
glib/mypaint-brush.c
154149

155150
if HAVE_I18N

autogen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ LIBTOOL_WIN32_REQUIRED_VERSION=2.2
2424

2525
PROJECT="libmypaint"
2626
TEST_TYPE=-f
27-
FILE=libmypaint.c
27+
FILE=mypaint-config.h
2828

2929

3030
srcdir=`dirname $0`

libmypaint.c renamed to examples/libmypaint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "fifo.c"
99
#include "operationqueue.c"
1010
#include "rng-double.c"
11-
#include "utils.c"
11+
#include "write_ppm.c"
1212
#include "tilemap.c"
1313

1414
#include "mypaint.c"

examples/minimal.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include "libmypaint.c"
22
#include "mypaint-fixed-tiled-surface.h"
33

4-
#include "utils.h" /* Not public API, just used for write_ppm to demonstrate */
5-
64
void
75
stroke_to(MyPaintBrush *brush, MyPaintSurface *surf, float x, float y)
86
{

utils.c renamed to examples/write_ppm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ iterate_over_line_chunks(MyPaintTiledSurface * tiled_surface, int height, int wi
5959
const int tiles_per_row = (width / tile_size) + 1*(width % tile_size != 0);
6060

6161
MyPaintTileRequest *requests = (MyPaintTileRequest *)malloc(tiles_per_row * sizeof(MyPaintTileRequest));
62-
62+
6363
for (int ty = 0; ty < number_of_tile_rows; ty++) {
6464

6565
// Fetch all horizontal tiles in current tile row
@@ -121,7 +121,7 @@ void write_ppm(MyPaintFixedTiledSurface *fixed_surface, char *filepath)
121121
const int width = mypaint_fixed_tiled_surface_get_width(fixed_surface);
122122
const int height = mypaint_fixed_tiled_surface_get_height(fixed_surface);
123123
fprintf(data.fp, "P3\n#Handwritten\n%d %d\n255\n", width, height);
124-
124+
125125
iterate_over_line_chunks((MyPaintTiledSurface *)fixed_surface,
126126
height, width,
127127
write_ppm_chunk, &data);

utils.h

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)