updated on Fri Jan 13 20:02:10 UTC 2012
[aur-mirror.git] / animal / fix-compilation-errors.patch
blob7d88abe2b34073364b3ae4a66a5cb312ff61102e
1 diff -ur animal-0.15.0/animal/distmaps.c animal-0.15.0.ok/animal/distmaps.c
2 --- animal-0.15.0/animal/distmaps.c 2006-11-29 03:25:29.000000000 +0100
3 +++ animal-0.15.0.ok/animal/distmaps.c 2008-04-17 14:20:24.000000000 +0200
4 @@ -176,13 +176,14 @@
5 * squared distance transform.
6 *----------------------------------------------------------------------------*/
8 +static bool edt_maurer_2D_from_1D(ImgPUInt32 *im);
10 AnimalExport bool
11 edt_maurer2003(ImgPUInt32 *im)
13 char *fname="edt_maurer2003";
14 int i,r,c;
15 bool stat;
16 - inline bool edt_maurer_2D_from_1D(ImgPUInt32 *im);
17 puint32 infty;
19 assert(im->isbinary);
20 @@ -207,13 +208,14 @@
21 return true;
24 -inline bool
25 +static bool maurer_voronoi_edt_2D(ImgPUInt32 *im, puint32 *im_row, int *g, int *h);
27 +static bool
28 edt_maurer_2D_from_1D(ImgPUInt32 *im)
30 bool stat;
31 int i1, *g, *h; // same naming as in the paper
32 char *fname="edt_maurer_2D_from_1D";
33 - inline bool maurer_voronoi_edt_2D(ImgPUInt32 *im, puint32 *im_row, int *g, int *h);
35 unsigned ncols = im->cols;
36 unsigned nrows = im->rows;
37 @@ -248,10 +250,18 @@
38 return true;
41 -inline bool remove_edt(int du, int dv, int dw,
42 - int u, int v, int w);
43 +inline bool
44 +remove_edt(int du, int dv, int dw,
45 + int u, int v, int w)
47 + // 11 integer expressions
48 + int a = v - u,
49 + b = w - v,
50 + c = w - u;
51 + return ( (c * dv - b * du - a * dw) > (a * b * c) );
54 -inline bool
55 +static bool
56 maurer_voronoi_edt_2D(ImgPUInt32 *im, puint32 *im_row, int *g, int *h)
58 int l, i, ns, tmp0, tmp1, tmp2, r,c;
59 @@ -295,18 +305,6 @@
63 -inline bool
64 -remove_edt(int du, int dv, int dw,
65 - int u, int v, int w)
67 - // 11 integer expressions
68 - int a = v - u,
69 - b = w - v,
70 - c = w - u;
71 - return ( (c * dv - b * du - a * dw) > (a * b * c) );
75 /*
76 * ========================================
77 * ----------------------------------
78 @@ -840,13 +838,14 @@
79 * proc. of 5th Int. Conf. Mathematical Morphology and its Applications to
80 * Image and Signal Processing, 2000
82 +static bool edt_meijster_2D_from_1D(ImgPUInt32 *im);
84 AnimalExport bool
85 edt_meijster2000(ImgPUInt32 *im)
87 char *fname="edt_meijster2000";
88 int i,r,c;
89 bool stat;
90 - inline bool edt_meijster_2D_from_1D(ImgPUInt32 *im);
91 puint32 infty;
93 assert(im->isbinary);
94 @@ -872,7 +871,7 @@
96 #define meijster_f(x,i, im_value) ( ( (x) - (i))*((x) - (i) ) + (im_value) )
98 -inline bool
99 +static bool
100 edt_meijster_2D_from_1D(ImgPUInt32 *im)
102 char *fname="edt_meijster_2D_from_1D";