Hello community,
here is the log from the commit of package potrace
checked in at Wed Nov 15 17:53:45 CET 2006.
--------
--- potrace/potrace.changes 2006-07-19 11:20:43.000000000 +0200
+++ /mounts/work_src_done/STABLE/potrace/potrace.changes 2006-11-15 15:54:04.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Nov 15 15:27:29 CET 2006 - jw@suse.de
+
+- replaced wrong_allocation.patch by official
+ io.patch -- more bugs fixed.
+
+-------------------------------------------------------------------
Old:
----
potrace-wrong_allocation.patch
New:
----
potrace-1.7-io.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ potrace.spec ++++++
--- /var/tmp/diff_new_pack.fN7nZG/_old 2006-11-15 17:53:02.000000000 +0100
+++ /var/tmp/diff_new_pack.fN7nZG/_new 2006-11-15 17:53:02.000000000 +0100
@@ -13,14 +13,14 @@
Name: potrace
Summary: Utility for Tracing a Bitmap to Scalable Outline Image
Version: 1.7
-Release: 15
-License: GPL
+Release: 32
+License: GNU General Public License (GPL)
Group: Productivity/Graphics/Convertors
Autoreqprov: on
Provides: bitmap_tracing
URL: http://potrace.sourceforge.net/
Source: %{name}-%{version}.tar.bz2
-Patch: potrace-wrong_allocation.patch
+Patch: %{name}-%{version}-io.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -40,7 +40,7 @@
%prep
%setup
-%patch
+%patch -p1
%build
%{?suse_update_config:%{suse_update_config -f}}
@@ -63,6 +63,9 @@
%{_mandir}/man?/*.*
%changelog -n potrace
+* Wed Nov 15 2006 - jw@suse.de
+- replaced wrong_allocation.patch by official
+ io.patch -- more bugs fixed.
* Wed Jul 19 2006 - pnemec@suse.cz
- fixed wrong memory allocation in potracelib.c
(added potrace-wrong_allocation.patch)
++++++ potrace-1.7-io.patch ++++++
diff -Naur potrace-1.7/ChangeLog potrace-1.7x/ChangeLog
--- potrace-1.7/ChangeLog 2005-03-06 02:32:06.000000000 -0400
+++ potrace-1.7x/ChangeLog 2005-11-11 21:15:58.000000000 -0400
@@ -1,5 +1,15 @@
ChangeLog
+ (2005/11/11) PS1 - portability: use binary file i/o in Cygwin.
+ (2005/06/24) PS1 - potracelib: fixed allocation bug. Thanks to
+ Jung Shin for reporting this bug.
+ (2005/06/23) PS1 - potracelib_demo.c: free resources properly.
+ (2005/06/23) PS1 - initialize unused private state to 0.
+ (2005/06/23) PS1 - decompose.c: improved memory allocation scheme.
+ (2005/05/06) PS1 - added "alphacurve" field to private curve
+ structure, so that backends that don't use the public interface
+ (such as the EPS backend) can be warned of non-conforming curves.
+
v1.7 2005/03/06
(2005/03/05) PS1 - fixed progress bar subrange bug.
diff -Naur potrace-1.7/check/pgmdiff.c potrace-1.7x/check/pgmdiff.c
--- potrace-1.7/check/pgmdiff.c 2005-02-22 17:31:23.000000000 -0400
+++ potrace-1.7x/check/pgmdiff.c 2005-11-11 22:30:31.000000000 -0400
@@ -24,6 +24,8 @@
double diff;
int x, y, d;
+ platform_init();
+
if (ac != 3) {
fprintf(stderr, "pgmdiff: wrong number of arguments\n");
fprintf(stderr, "Usage: pgmdiff file1 file2\n");
@@ -38,7 +40,7 @@
if (strcmp(file1, "-")==0) {
r = gm_read(stdin, &g1);
} else {
- f = fopen(file1, "r");
+ f = fopen(file1, "rb");
if (!f) {
fprintf(stderr, "pgmdiff: %s: %s\n", file1, strerror(errno));
return 2;
@@ -57,7 +59,7 @@
if (strcmp(file2, "-")==0) {
r = gm_read(stdin, &g2);
} else {
- f = fopen(file2, "r");
+ f = fopen(file2, "rb");
if (!f) {
fprintf(stderr, "pgmdiff: %s: %s\n", file2, strerror(errno));
return 2;
diff -Naur potrace-1.7/src/backend_eps.c potrace-1.7x/src/backend_eps.c
--- potrace-1.7/src/backend_eps.c 2005-02-22 17:31:23.000000000 -0400
+++ potrace-1.7x/src/backend_eps.c 2005-11-11 20:44:07.000000000 -0400
@@ -305,10 +305,10 @@
}
static int eps_path(privcurve_t *curve) {
- if (info.longcoding) {
- return eps_path_long(curve);
- } else {
+ if (info.longcoding==0 && curve->alphacurve) {
return eps_path_short(curve);
+ } else {
+ return eps_path_long(curve);
}
}
diff -Naur potrace-1.7/src/curve.h potrace-1.7x/src/curve.h
--- potrace-1.7/src/curve.h 2005-02-20 18:55:31.000000000 -0400
+++ potrace-1.7x/src/curve.h 2005-11-11 20:44:08.000000000 -0400
@@ -20,6 +20,10 @@
int *tag; /* tag[n]: POTRACE_CORNER or POTRACE_CURVETO */
dpoint_t (*c)[3]; /* c[n][i]: control points.
c[n][0] is unused for tag[n]=POTRACE_CORNER */
+ /* the remainder of this structure is special to privcurve, and is
+ used in EPS debug output and special EPS "short coding". These
+ fields are valid only if "alphacurve" is set. */
+ int alphacurve; /* have the following fields been initialized? */
dpoint_t *vertex; /* for POTRACE_CORNER, this equals c[1] */
double *alpha; /* only for POTRACE_CURVETO */
double *alpha0; /* "uncropped" alpha parameter - for debug output only */
diff -Naur potrace-1.7/src/decompose.c potrace-1.7x/src/decompose.c
--- potrace-1.7/src/decompose.c 2005-03-06 02:35:51.000000000 -0400
+++ potrace-1.7x/src/decompose.c 2005-11-11 20:35:42.000000000 -0400
@@ -194,6 +194,7 @@
/* add point to path */
if (len>=size) {
size+=100;
+ size*=1.3;
pt1 = (point_t *)realloc(pt, size * sizeof(point_t));
if (!pt1) {
goto error;
diff -Naur potrace-1.7/src/main.c potrace-1.7x/src/main.c
--- potrace-1.7/src/main.c 2005-02-22 17:31:23.000000000 -0400
+++ potrace-1.7x/src/main.c 2005-11-11 22:30:31.000000000 -0400
@@ -1024,7 +1024,7 @@
if (filename == NULL || strcmp(filename, "-") == 0) {
return stdin;
}
- return fopen(filename, "r");
+ return fopen(filename, "rb");
}
/* open a file for writing. Return stdout if filename is NULL or "-" */
@@ -1032,7 +1032,7 @@
if (filename == NULL || strcmp(filename, "-") == 0) {
return stdout;
}
- return fopen(filename, "w");
+ return fopen(filename, "wb");
}
/* close a file, but do nothing is filename is NULL or "-" */
@@ -1172,6 +1172,10 @@
int i;
char *outfile;
+ /* platform-specific initializations, e.g., set file i/o to binary */
+ platform_init();
+
+ /* process options */
dopts(ac, av);
b = info.backend;
diff -Naur potrace-1.7/src/mkbitmap.c potrace-1.7x/src/mkbitmap.c
--- potrace-1.7/src/mkbitmap.c 2005-02-20 18:55:33.000000000 -0400
+++ potrace-1.7x/src/mkbitmap.c 2005-11-11 21:12:48.000000000 -0400
@@ -583,7 +583,7 @@
if (filename == NULL || strcmp(filename, "-") == 0) {
return stdin;
}
- return fopen(filename, "r");
+ return fopen(filename, "rb");
}
/* open a file for writing. Return stdout if filename is NULL or "-" */
@@ -591,7 +591,7 @@
if (filename == NULL || strcmp(filename, "-") == 0) {
return stdout;
}
- return fopen(filename, "w");
+ return fopen(filename, "wb");
}
/* close a file, but do nothing is filename is NULL or "-" */
@@ -639,6 +639,9 @@
int i;
char *outfile;
+ /* platform-specific initializations, e.g., set file i/o to binary */
+ platform_init();
+
/* process options */
dopts(ac, av);
diff -Naur potrace-1.7/src/platform.h potrace-1.7x/src/platform.h
--- potrace-1.7/src/platform.h 2005-02-20 18:55:33.000000000 -0400
+++ potrace-1.7x/src/platform.h 2005-11-11 22:07:13.000000000 -0400
@@ -13,4 +13,17 @@
unsigned int _CRT_fmode = _O_BINARY;
#endif
+#ifdef __CYGWIN__
+#include