Lines 1-213
Link Here
|
1 |
=== modified file 'cuneiform_src/Kern/ccom/src/ccom_loc.c' |
|
|
2 |
--- cuneiform_src/Kern/ccom/src/ccom_loc.c 2008-07-29 09:38:01 +0000 |
3 |
+++ cuneiform_src/Kern/ccom/src/ccom_loc.c 2008-08-22 08:22:46 +0000 |
4 |
@@ -87,7 +87,7 @@ |
5 |
|
6 |
if (bChangeSize) // one should change a size of raster |
7 |
{ |
8 |
- for(line=linerep,wmax=len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((int)line+line->lth)) |
9 |
+ for(line=linerep,wmax=len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((intptr_t)line+line->lth)) |
10 |
{ |
11 |
for(inter = (CCOM_interval*)(line+1), i=0; i<line->h; i++, inter++) |
12 |
{ |
13 |
@@ -106,7 +106,7 @@ |
14 |
} |
15 |
else //bChangeSize==false one should not change a size of raster |
16 |
{ |
17 |
- for(line=linerep,wmax=len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((int)line+line->lth)) |
18 |
+ for(line=linerep,wmax=len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((intptr_t)line+line->lth)) |
19 |
{ |
20 |
for(inter = (CCOM_interval*)(line+1), i=0; i<line->h; i++, inter++) |
21 |
{ |
22 |
@@ -133,7 +133,7 @@ |
23 |
return FALSE; |
24 |
ww = REC_GW_WORD8(rec->lnPixWidth); |
25 |
|
26 |
-for(line=linerep,len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((int)line+line->lth)) |
27 |
+for(line=linerep,len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((intptr_t)line+line->lth)) |
28 |
{ |
29 |
for(inter = (CCOM_interval*)(line+1), i=0; i<line->h; i++, inter++) |
30 |
{ |
31 |
@@ -175,7 +175,7 @@ |
32 |
return FALSE; |
33 |
ww = REC_GW_WORD8(rec->lnPixWidth); |
34 |
|
35 |
-for(line=linerep,len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((int)line+line->lth)) |
36 |
+for(line=linerep,len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((intptr_t)line+line->lth)) |
37 |
{ |
38 |
for(inter = (CCOM_interval*)(line+1), i=0; i<line->h; i++, inter++) |
39 |
{ |
40 |
|
41 |
=== modified file 'cuneiform_src/Kern/cuneiform-cli.cpp' |
42 |
--- cuneiform_src/Kern/cuneiform-cli.cpp 2008-08-05 09:29:31 +0000 |
43 |
+++ cuneiform_src/Kern/cuneiform-cli.cpp 2008-08-22 13:58:24 +0000 |
44 |
@@ -41,8 +41,7 @@ |
45 |
const char *name; |
46 |
}; |
47 |
|
48 |
-/* Language codes according to ISO 639-2. Most of these don't seem to have |
49 |
- * corresponding data files. A bug? |
50 |
+/* Language codes according to ISO 639-2. |
51 |
*/ |
52 |
static const langlist langs[] = { |
53 |
{PUMA_LANG_ENGLISH, "eng"}, |
54 |
@@ -60,10 +59,10 @@ |
55 |
{PUMA_LANG_DANISH, "dan"}, |
56 |
{PUMA_LANG_PORTUGUESE,"por"}, |
57 |
{PUMA_LANG_DUTCH, "dut"}, |
58 |
- {PUMA_LANG_DIG, "dig"}, // What is this language? |
59 |
- {PUMA_LANG_UZBEK, "uzb"}, |
60 |
- {PUMA_LANG_KAZ, "kaz"}, |
61 |
- {PUMA_LANG_KAZ_ENG, "kazeng"}, |
62 |
+// {PUMA_LANG_DIG, "dig"}, // These four languages don't seem to have data files. |
63 |
+// {PUMA_LANG_UZBEK, "uzb"}, // Thus they are disabled. |
64 |
+// {PUMA_LANG_KAZ, "kaz"}, |
65 |
+// {PUMA_LANG_KAZ_ENG, "kazeng"}, |
66 |
{PUMA_LANG_CZECH, "cze"}, |
67 |
{PUMA_LANG_ROMAN, "rum"}, |
68 |
{PUMA_LANG_HUNGAR, "hun"}, |
69 |
@@ -160,6 +159,8 @@ |
70 |
char *dib; |
71 |
const char *infilename = NULL; |
72 |
Word32 langcode = PUMA_LANG_ENGLISH; // By default recognize plain english text. |
73 |
+ Bool32 dotmatrix = FALSE; |
74 |
+ Bool32 fax = FALSE; |
75 |
const char *defaulttextname = "cuneiform-out.txt"; |
76 |
const char *defaulthtmlname = "cuneiform-out.html"; |
77 |
const char *outfilename = NULL; |
78 |
@@ -170,6 +171,7 @@ |
79 |
for(int i=1; i<argc; i++) { |
80 |
/* Changing language. */ |
81 |
if(strcmp(argv[i], "-l") == 0) { |
82 |
+ langcode = -1; |
83 |
if(++i >= argc) { |
84 |
print_supported_languages(); |
85 |
return 1; |
86 |
@@ -193,6 +195,10 @@ |
87 |
outfilename = argv[i]; |
88 |
} else if(strcmp(argv[i], "--html") == 0) { |
89 |
outputformat = PUMA_TOHTML; |
90 |
+ } else if(strcmp(argv[i], "--dotmatrix") == 0) { |
91 |
+ dotmatrix = TRUE; |
92 |
+ } else if(strcmp(argv[i], "--fax") == 0) { |
93 |
+ fax = TRUE; |
94 |
} else { |
95 |
/* No switches, so set input file. */ |
96 |
infilename = argv[i]; |
97 |
@@ -208,7 +214,7 @@ |
98 |
} |
99 |
|
100 |
if(infilename == NULL) { |
101 |
- printf("Usage: %s [-l languagename --html -o result_file] imagefile\n", argv[0]); |
102 |
+ printf("Usage: %s [-l languagename --html --dotmatrix --fax -o result_file] imagefile\n", argv[0]); |
103 |
return 0; |
104 |
} |
105 |
|
106 |
@@ -224,6 +230,8 @@ |
107 |
|
108 |
// Set the language. |
109 |
PUMA_SetImportData(PUMA_Word32_Language, &langcode); |
110 |
+ PUMA_SetImportData(PUMA_Bool32_DotMatrix, &dotmatrix); |
111 |
+ PUMA_SetImportData(PUMA_Bool32_Fax100, &fax); |
112 |
|
113 |
if(!PUMA_XOpen(dib, "none.txt")) { |
114 |
printf("PUMA_Xopen failed.\n"); |
115 |
|
116 |
=== modified file 'cuneiform_src/Kern/rblock/sources/h/pic_n_table.h' |
117 |
--- cuneiform_src/Kern/rblock/sources/h/pic_n_table.h 2008-07-29 09:38:01 +0000 |
118 |
+++ cuneiform_src/Kern/rblock/sources/h/pic_n_table.h 2008-08-22 08:22:46 +0000 |
119 |
@@ -58,4 +58,4 @@ |
120 |
Bool32 DeleteRootsFromTables (void); |
121 |
Bool32 DeleteRootsFromPictures (void); |
122 |
Bool32 CarefulPicturesAllotment(Int32); |
123 |
-Bool32 SearchPicturesSecond (Int32 hCCOM, Bool32 BLOCKS, CCOM_comp * comp); |
124 |
+Bool32 SearchPicturesSecond (Handle hCCOM, Bool32 BLOCKS, CCOM_comp * comp); |
125 |
|
126 |
=== modified file 'cuneiform_src/Kern/rblock/sources/new_c/_loadroots.c' |
127 |
--- cuneiform_src/Kern/rblock/sources/new_c/_loadroots.c 2008-07-29 09:38:01 +0000 |
128 |
+++ cuneiform_src/Kern/rblock/sources/new_c/_loadroots.c 2008-08-22 08:22:46 +0000 |
129 |
@@ -223,7 +223,7 @@ |
130 |
//////////////////////////////////////////////////////////////////////////////// |
131 |
|
132 |
//////////////////////////////////////////////////////////////////////////////// |
133 |
-Bool32 PicturesSecondStage(Int32 hCCOM,Handle hCPAGE) |
134 |
+Bool32 PicturesSecondStage(Handle hCCOM,Handle hCPAGE) |
135 |
{ |
136 |
/************** final union all crossed and included pictures ******************/ |
137 |
|
138 |
@@ -527,9 +527,9 @@ |
139 |
return TRUE; |
140 |
} |
141 |
|
142 |
-Bool32 FillBigLetters (Int32 hCCOM,Handle hCPAGE) |
143 |
+Bool32 FillBigLetters (Handle hCCOM,Handle hCPAGE) |
144 |
{ |
145 |
- Word32 BlockType; |
146 |
+ Handle BlockType; |
147 |
Handle pBlock; |
148 |
RPIC_Comp_Rect CompRect; // òèïè÷íûé Rect16 |
149 |
|
150 |
@@ -557,7 +557,7 @@ |
151 |
} |
152 |
|
153 |
|
154 |
-Bool32 FillPicsInTables (Int32 hCCOM,Handle hCPAGE) |
155 |
+Bool32 FillPicsInTables (Handle hCCOM,Handle hCPAGE) |
156 |
{ |
157 |
//CCOM_comp common; |
158 |
POLY_ block; |
159 |
@@ -622,7 +622,7 @@ |
160 |
|
161 |
/************************************************************************/ |
162 |
|
163 |
-Bool32 ReadRoots(Int32 hCCOM, Bool32 BLOCKS) |
164 |
+Bool32 ReadRoots(Handle hCCOM, Bool32 BLOCKS) |
165 |
{ |
166 |
CCOM_comp * comp = NULL; |
167 |
Handle pPage; |
168 |
|
169 |
=== modified file 'cuneiform_src/Kern/rblock/sources/new_c/_pic_n_table.c' |
170 |
--- cuneiform_src/Kern/rblock/sources/new_c/_pic_n_table.c 2008-07-29 09:38:01 +0000 |
171 |
+++ cuneiform_src/Kern/rblock/sources/new_c/_pic_n_table.c 2008-08-22 08:22:46 +0000 |
172 |
@@ -202,7 +202,7 @@ |
173 |
return TRUE; |
174 |
} |
175 |
|
176 |
-Bool32 SearchPicturesSecond (Int32 hCCOM, Bool32 BLOCKS, CCOM_comp * comp) |
177 |
+Bool32 SearchPicturesSecond (Handle hCCOM, Bool32 BLOCKS, CCOM_comp * comp) |
178 |
{ |
179 |
return TRUE; |
180 |
} |
181 |
|
182 |
=== modified file 'cuneiform_src/Kern/rstr/src/p2_bold.c' |
183 |
--- cuneiform_src/Kern/rstr/src/p2_bold.c 2008-07-29 09:38:01 +0000 |
184 |
+++ cuneiform_src/Kern/rstr/src/p2_bold.c 2008-08-22 08:22:46 +0000 |
185 |
@@ -230,7 +230,7 @@ |
186 |
CCOM_interval * inter; |
187 |
int len,i,j; |
188 |
|
189 |
- for(line=linerep,len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((int)line+line->lth)) |
190 |
+ for(line=linerep,len=0; len<size && line->lth; len+=line->lth,line=(CCOM_lnhead *)((intptr_t)line+line->lth)) |
191 |
{ |
192 |
// íà÷àëî ëèíèè (line->row) - íàì íå âàæíî |
193 |
for(inter = (CCOM_interval*)(line+1), i=0; i<line->h; i++, inter++) |
194 |
|
195 |
=== modified file 'readme.txt' |
196 |
--- readme.txt 2008-08-21 12:09:05 +0000 |
197 |
+++ readme.txt 2008-08-22 13:01:28 +0000 |
198 |
@@ -54,7 +54,7 @@ |
199 |
|
200 |
After install you simply run. |
201 |
|
202 |
-cuneiform [-l language -o result_file --html] <image_file> |
203 |
+cuneiform [-l language -o result_file --html --dotmatrix --fax] <image_file> |
204 |
|
205 |
Output is written to pumaout.txt. Cuneiform assumes that your image contains |
206 |
only a single column of text. |
207 |
@@ -74,4 +74,4 @@ |
208 |
Contact information |
209 |
|
210 |
Project home page: https://launchpad.net/cuneiform-linux |
211 |
-Email: jpakkane at gmail |
212 |
+Mailing list: https://launchpad.net/~cuneiform |
213 |
|