updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / stardict-tools / stardict-tools.patch
blobf28f0b88182e3f58262fe62c1aa8a1f2325bf856
1 diff -urN stardict-tools-3.0.1/src/bgl2txt.cpp stardict-tools-3.0.1.new/src/bgl2txt.cpp
2 --- stardict-tools-3.0.1/src/bgl2txt.cpp 2007-08-01 11:00:02.000000000 +0800
3 +++ stardict-tools-3.0.1.new/src/bgl2txt.cpp 2011-12-09 11:57:23.405957135 +0800
4 @@ -1,3 +1,5 @@
5 +#include <stdio.h>
6 +#include <string.h>
7 #include "libbgl2txt.h"
9 int main(int argc, char * argv[])
10 diff -urN stardict-tools-3.0.1/src/bgl_babylon.cpp stardict-tools-3.0.1.new/src/bgl_babylon.cpp
11 --- stardict-tools-3.0.1/src/bgl_babylon.cpp 2007-08-16 13:14:35.000000000 +0800
12 +++ stardict-tools-3.0.1.new/src/bgl_babylon.cpp 2011-12-09 11:57:23.405957135 +0800
13 @@ -20,10 +20,12 @@
15 #include "bgl_babylon.h"
17 -#include<stdlib.h>
18 -#include<stdio.h>
19 +#include <stdlib.h>
20 +#include <string.h>
21 +#include <stdio.h>
22 #include <glib/gstdio.h>
23 #include <iconv.h>
24 +#include <zlib.h>
26 #ifdef _WIN32
27 #include <io.h>
28 diff -urN stardict-tools-3.0.1/src/bgl_stardictbuilder.cpp stardict-tools-3.0.1.new/src/bgl_stardictbuilder.cpp
29 --- stardict-tools-3.0.1/src/bgl_stardictbuilder.cpp 2007-09-05 11:48:06.000000000 +0800
30 +++ stardict-tools-3.0.1.new/src/bgl_stardictbuilder.cpp 2011-12-09 11:57:23.406957213 +0800
31 @@ -20,6 +20,8 @@
33 #include "bgl_stardictbuilder.h"
35 +#include <string.h>
37 #include <iostream>
38 #include <glib.h>
40 diff -urN stardict-tools-3.0.1/src/dictbuilder.cpp stardict-tools-3.0.1.new/src/dictbuilder.cpp
41 --- stardict-tools-3.0.1/src/dictbuilder.cpp 2007-07-10 15:16:06.000000000 +0800
42 +++ stardict-tools-3.0.1.new/src/dictbuilder.cpp 2011-12-09 11:57:23.406957213 +0800
43 @@ -14,6 +14,7 @@
45 #include "dictbuilder-tree.h"
47 +#include <string.h>
48 struct sectionEntry
50 char sign;
51 diff -urN stardict-tools-3.0.1/src/KangXi.cpp stardict-tools-3.0.1.new/src/KangXi.cpp
52 --- stardict-tools-3.0.1/src/KangXi.cpp 2007-07-10 15:16:06.000000000 +0800
53 +++ stardict-tools-3.0.1.new/src/KangXi.cpp 2011-12-09 11:57:23.406957213 +0800
54 @@ -58,7 +58,7 @@
55 gint n = g_unichar_to_utf8(uc, utf8);
56 utf8[n] = '\0';
57 char *p;
58 - p = strchr(line, '\t');
59 + p = (char *) strchr(line, '\t');
60 if (!p) {
61 g_print("Error: %s\n", line);
62 return;
63 diff -urN stardict-tools-3.0.1/src/libbgl2txt.cpp stardict-tools-3.0.1.new/src/libbgl2txt.cpp
64 --- stardict-tools-3.0.1/src/libbgl2txt.cpp 2007-08-01 11:01:10.000000000 +0800
65 +++ stardict-tools-3.0.1.new/src/libbgl2txt.cpp 2011-12-09 11:57:23.406957213 +0800
66 @@ -1,3 +1,5 @@
67 +#include <string.h>
69 #include "libbgl2txt.h"
70 #include "bgl_babylonreader.h"
71 #include "bgl_stardictbuilder.h"
72 diff -urN stardict-tools-3.0.1/src/Makefile.am stardict-tools-3.0.1.new/src/Makefile.am
73 --- stardict-tools-3.0.1/src/Makefile.am 2007-11-07 15:55:24.000000000 +0800
74 +++ stardict-tools-3.0.1.new/src/Makefile.am 2011-12-09 11:57:41.536357294 +0800
75 @@ -8,6 +8,7 @@
76 noinst_LIBRARIES = libbgl2txt.a
78 libbgl2txt_a_SOURCES = libbgl2txt.h libbgl2txt.cpp bgl_babylon.h bgl_babylon.cpp bgl_dictreader.h bgl_dictbuilder.h bgl_babylonreader.h bgl_babylonreader.cpp bgl_stardictbuilder.h bgl_stardictbuilder.cpp
79 +libbgl2txt_a_LDFLAGS = -lz
81 INCLUDES = $(STARDICT_CFLAGS)
83 @@ -154,7 +155,7 @@
84 stardict2txt_LDADD = $(STARDICT_LIBS)
85 stardict2txt_SOURCES = stardict2txt.cpp libstardict2txt.cpp libstardict2txt.h libcommon.cpp libcommon.h
87 -stardict_dict_update_LDFLAGS =
88 +stardict_dict_update_LDFLAGS = -lz
89 stardict_dict_update_LDADD = $(STARDICT_LIBS)
90 stardict_dict_update_SOURCES = stardict_dict_update.cpp
92 @@ -216,7 +217,7 @@
94 bgl2txt_DEPENDENCIES = libbgl2txt.a
95 bgl2txt_LDFLAGS =
96 -bgl2txt_LDADD = $(STARDICT_LIBS) -lz libbgl2txt.a
97 +bgl2txt_LDADD = $(STARDICT_LIBS) libbgl2txt.a -lz
98 bgl2txt_SOURCES = bgl2txt.cpp
100 stardict_verify_LDFLAGS =
101 @@ -225,7 +226,7 @@
103 stardict_editor_DEPENDENCIES = libbgl2txt.a
104 stardict_editor_LDFLAGS =
105 -stardict_editor_LDADD = $(STARDICT_LIBS) -lz libbgl2txt.a
106 +stardict_editor_LDADD = $(STARDICT_LIBS) libbgl2txt.a -lz
107 stardict_editor_SOURCES = stardict-editor.cpp libtabfile.cpp libtabfile.h libcommon.cpp libcommon.h libbabylonfile.cpp libbabylonfile.h libstardict2txt.cpp libstardict2txt.h libstardictverify.cpp libstardictverify.h
109 EXTRA_DIST = example.ifo example_treedict.tar.bz2 hanzim2dict.py jm2stardict.py uyghur2dict.py ncce2stardict.pl parse-oxford.perl dictgen.php DeKDic.exe KSDrip.exe Po2Tab.zip dictd2dic.sh ooo.sh myspell.sh exc.sh i2e.sh dictbuilder.readme dictbuilder.example KangXiZiDian-djvu2tiff.py \
110 diff -urN stardict-tools-3.0.1/src/tabfile2sql.cpp stardict-tools-3.0.1.new/src/tabfile2sql.cpp
111 --- stardict-tools-3.0.1/src/tabfile2sql.cpp 2007-08-15 13:56:06.000000000 +0800
112 +++ stardict-tools-3.0.1.new/src/tabfile2sql.cpp 2011-12-09 11:57:23.406957213 +0800
113 @@ -8,6 +8,7 @@
114 #include <mysql.h>
116 #include <string>
117 +#include <string.h>
119 void print_info(const char *info)
121 diff -urN stardict-tools-3.0.1/src/Unihan.cpp stardict-tools-3.0.1.new/src/Unihan.cpp
122 --- stardict-tools-3.0.1/src/Unihan.cpp 2007-07-10 15:16:06.000000000 +0800
123 +++ stardict-tools-3.0.1.new/src/Unihan.cpp 2011-12-09 11:57:23.406957213 +0800
124 @@ -58,7 +58,7 @@
125 const char *han = line+2;
127 char *p;
128 - p = strchr(han, '\t');
129 + p = (char *)strchr(han, '\t');
130 if (!p) {
131 g_print("Error: %s\n", line);
132 return;
133 @@ -67,7 +67,7 @@
134 p++;
135 const char *key = p;
137 - p = strchr(key, '\t');
138 + p = (char*) strchr(key, '\t');
139 if (!p) {
140 g_print("Error: %s\n", line);
141 return;
142 diff -urN stardict-tools-3.0.1/src/wordnet.cpp stardict-tools-3.0.1.new/src/wordnet.cpp
143 --- stardict-tools-3.0.1/src/wordnet.cpp 2007-09-10 15:49:15.000000000 +0800
144 +++ stardict-tools-3.0.1.new/src/wordnet.cpp 2011-12-09 11:57:23.406957213 +0800
145 @@ -2,6 +2,7 @@
146 #include <stdlib.h>
147 #include <glib.h>
148 #include <string>
149 +#include <string.h>
152 static int hexalpha_to_int(int c)
153 diff -urN stardict-tools-3.0.1/src/wubi.cpp stardict-tools-3.0.1.new/src/wubi.cpp
154 --- stardict-tools-3.0.1/src/wubi.cpp 2007-07-10 15:16:06.000000000 +0800
155 +++ stardict-tools-3.0.1.new/src/wubi.cpp 2011-12-09 11:57:23.406957213 +0800
156 @@ -5,6 +5,7 @@
157 #include <unistd.h>
158 #include <glib.h>
159 #include <string>
160 +#include <string.h>
162 void convert(const char *filename)