leptonica: fix gcc2 build.

This commit is contained in:
Jerome Duval
2017-09-03 11:04:23 +02:00
parent db93321c5e
commit a94a1f82ca

View File

@@ -1,4 +1,4 @@
From 58df7954c3512064aa974a08056a64213ca0aafe Mon Sep 17 00:00:00 2001
From d6131f9798b5d923eb50479bed5d02a155583dd8 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 31 Mar 2015 10:55:28 +0300
Subject: Haiku patch
@@ -35,15 +35,35 @@ index 8142699..0761ee6 100644
#endif
--
2.13.1
2.7.0
From 42bba88459f0e568b205fa2ea07afed87ebec2ab Mon Sep 17 00:00:00 2001
From c412c6398e5352a074f5d88565aec1a313bc6c50 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Tue, 31 Mar 2015 10:56:57 +0300
Subject: gcc2 fixes
diff --git a/prog/recogtest1.c b/prog/recogtest1.c
index 55556cc..a301765 100644
--- a/prog/recogtest1.c
+++ b/prog/recogtest1.c
@@ -126,6 +126,7 @@ SARRAY *sa, *satext;
* requiring retention of 20% of templates in each class
* 0.9, 0.01 : remove most based on matching; saved 1 in each class */
fprintf(stderr, "Remove outliers\n");
+{
static const l_float32 MinScore[] = {0.6, 0.7, 0.9};
static const l_int32 MinTarget[] = {4, 5, 4};
static const l_int32 MinSize[] = {3, 2, 3};
@@ -140,6 +141,7 @@ SARRAY *sa, *satext;
pixaDestroy(&pixa3);
}
pixaDestroy(&pixa2);
+}
#endif
#if 1
diff --git a/src/compare.c b/src/compare.c
index 8a34b89..564dd38 100644
--- a/src/compare.c
@@ -135,6 +155,24 @@ index 4092b7d..4fa878d 100644
return n == NULL ? NULL : &n->value;
}
diff --git a/src/readbarcode.c b/src/readbarcode.c
index a2e6300..aa03767 100644
--- a/src/readbarcode.c
+++ b/src/readbarcode.c
@@ -733,11 +733,13 @@ NUMA *nas, *nax, *nay, *nad;
if (debugflag) {
lept_mkdir("lept/barcode");
+ {
GPLOT *gplot = gplotCreate("/tmp/lept/barcode/signal", GPLOT_PNG,
"Pixel values", "dist in pixels", "value");
gplotAddPlot(gplot, nax, nay, GPLOT_LINES, "plot 1");
gplotMakeOutput(gplot);
gplotDestroy(&gplot);
+ }
}
/* Locate the crossings. Run multiple times with different
diff --git a/src/recogident.c b/src/recogident.c
index 19d06dd..a621268 100644
--- a/src/recogident.c
@@ -156,5 +194,5 @@ index 19d06dd..a621268 100644
pixt2 = pixExpandReplicate(pixt1, 5);
snprintf(buf, sizeof(buf), "/tmp/lept/recog/junkbs_%d.png", debugflag);
--
2.13.1
2.7.0