summarylogtreecommitdiffstats
path: root/k2pdfopt.patch
blob: 4f72522c854a3a22d8eabe655bac5c5320f33b19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
diff -aur k2_old/k2pdfopt_v2.33/willuslib/array.c k2_new/k2pdfopt_v2.33/willuslib/array.c
--- k2_old/k2pdfopt_v2.33/willuslib/array.c	2014-12-01 13:24:25.000000000 -0300
+++ k2_new/k2pdfopt_v2.33/willuslib/array.c	2015-10-13 16:15:48.231007819 -0300
@@ -1072,7 +1072,7 @@
 void arrayf_sort(float *a,int n)
 
     {
-    sort(a,(long)n);
+    willus_sort(a,(long)n);
     }
 
 
diff -aur k2_old/k2pdfopt_v2.33/willuslib/math.c k2_new/k2pdfopt_v2.33/willuslib/math.c
--- k2_old/k2pdfopt_v2.33/willuslib/math.c	2013-08-15 21:33:50.000000000 -0300
+++ k2_new/k2pdfopt_v2.33/willuslib/math.c	2015-10-13 16:15:48.237007819 -0300
@@ -532,7 +532,7 @@
 
 
 
-void sort(float *x,int n)
+void willus_sort(float *x,int n)
 
     {
     int top,n1;
diff -aur k2_old/k2pdfopt_v2.33/willuslib/ocrjocr.c k2_new/k2pdfopt_v2.33/willuslib/ocrjocr.c
--- k2_old/k2pdfopt_v2.33/willuslib/ocrjocr.c	2012-11-12 13:09:42.000000000 -0300
+++ k2_new/k2pdfopt_v2.33/willuslib/ocrjocr.c	2015-10-13 16:15:48.247007818 -0300
@@ -29,6 +29,8 @@
 #ifdef HAVE_GOCR_LIB
 #include <gocr.h>
 
+job_t *JOB;
+
 /*
 ** bmp8 must be grayscale
 ** (x1,y1) and (x2,y2) from top left of bitmap
@@ -66,6 +68,7 @@
     h=y2-y1+1;
     dh=h+bw*2;
     job=&_job;
+    JOB=job;
     job_init(job);
     job_init_image(job);
     // willus_mem_alloc_warn((void **)&job->src.p.p,w*h,funcname,10);
diff -aur k2_old/k2pdfopt_v2.33/willuslib/string.c k2_new/k2pdfopt_v2.33/willuslib/string.c
--- k2_old/k2pdfopt_v2.33/willuslib/string.c	2014-12-05 11:52:04.000000000 -0300
+++ k2_new/k2pdfopt_v2.33/willuslib/string.c	2015-10-13 16:15:48.242007819 -0300
@@ -81,7 +81,7 @@
 ** Returns NULL if EOF, otherwise returns pointer to the string.
 **
 */
-char *get_line(char *buf,int max,FILE *f)
+char *willus_get_line(char *buf,int max,FILE *f)
 
     {
     int     i;
diff -aur k2_old/k2pdfopt_v2.33/willuslib/willus.h k2_new/k2pdfopt_v2.33/willuslib/willus.h
--- k2_old/k2pdfopt_v2.33/willuslib/willus.h	2015-09-26 23:26:35.000000000 -0300
+++ k2_new/k2pdfopt_v2.33/willuslib/willus.h	2015-10-13 16:15:48.226007820 -0300
@@ -227,9 +227,6 @@
 ** CMAKE handles the defines, not this source
 ** (Mod from Dirk Thierbach, 31-Dec-2013)
 */
-#ifdef USE_CMAKE
-#include "config.h"
-#else /* USE_CMAKE */
 
 #ifndef HAVE_Z_LIB
 #define HAVE_Z_LIB
@@ -281,7 +278,7 @@
 #undef HAVE_GSL_LIB
 #endif
 
-#endif /* USE_CMAKE */
+
 /*
 ** Consistency check
 */
@@ -553,7 +550,7 @@
                       int *n,FILE *err);
 int    readxyz_ex    (char *filename,double **x,double **y,double **z,
                       int *n,FILE *err,int ignore_after_semicolon);
-void   sort          (float *x,int n);
+void willus_sort (float *x,int n);
 void   sortd         (double *x,int n);
 void   sorti         (int *x,int n);
 void   sortxy        (float *x,float *y,int n);
@@ -622,7 +619,7 @@
 /* string.c */
 void   clean_line    (char *buf);
 void   clean_line_end(char *buf);
-char  *get_line      (char *buf,int max,FILE *f);
+char *willus_get_line (char *buf,int max,FILE *f);
 char  *get_line_cf   (char *buf,int max,FILE *f);
 int   mem_get_line_cf(char *buf,int maxlen,char *cptr,long *cindex,long csize);
 int    in_string     (char *buffer,char *pattern);