Skip to content

Commit 96b8197

Browse files
committed
now it compiles with -m32
1 parent e7dd8f7 commit 96b8197

File tree

453 files changed

+39433
-39314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

453 files changed

+39433
-39314
lines changed

Abbreviations.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,16 @@ static HashTableX s_abbrTable;
228228
static bool s_abbrInitialized = false;
229229

230230
/*
231-
static bool initTable ( HashTableX *table, char *words[], long size ) {
231+
static bool initTable ( HashTableX *table, char *words[], int32_t size ) {
232232
// set up the hash table
233233
if ( ! table->set ( 8 , 4 , size * 2,NULL,0,false,MAX_NICENESS,
234234
"abbrtbl") )
235235
return log("build: Could not init abbreviation table.");
236236
// now add in all the stop words
237-
long n = (long)size/ sizeof(char *);
238-
for ( long i = 0 ; i < n ; i++ ) {
237+
int32_t n = (int32_t)size/ sizeof(char *);
238+
for ( int32_t i = 0 ; i < n ; i++ ) {
239239
char *sw = words[i];
240-
//long swlen = gbstrlen ( sw );
240+
//int32_t swlen = gbstrlen ( sw );
241241
int64_t swh = hash64Lower_utf8 ( sw );
242242
if ( ! table->addTerm (&swh,i+1) ) return false;
243243
}
@@ -247,28 +247,28 @@ static bool initTable ( HashTableX *table, char *words[], long size ) {
247247

248248
bool isAbbr ( int64_t h , bool *hasWordAfter ) {
249249
if ( ! s_abbrInitialized ) {
250-
// shortcut
250+
// int16_tcut
251251
HashTableX *t = &s_abbrTable;
252252
// set up the hash table
253-
long n = ((long)sizeof(s_abbrs99))/ ((long)sizeof(Abbr));
253+
int32_t n = ((int32_t)sizeof(s_abbrs99))/ ((int32_t)sizeof(Abbr));
254254
if ( ! t->set ( 8,4,n*4, NULL,0,false,MAX_NICENESS,"abbrtbl"))
255255
return log("build: Could not init abbrev table.");
256256
// now add in all the stop words
257-
for ( long i = 0 ; i < n ; i++ ) {
257+
for ( int32_t i = 0 ; i < n ; i++ ) {
258258
char *sw = s_abbrs99[i].m_str;
259259
int64_t swh = hash64Lower_utf8 ( sw );
260-
long val = i + 1;
260+
int32_t val = i + 1;
261261
if ( ! t->addKey (&swh,&val) ) return false;
262262
}
263263
s_abbrInitialized = true;
264264
// test it
265265
int64_t h = hash64Lower_utf8("St");
266266
if ( ! t->isInTable(&h) ) { char *xx=NULL;*xx=0; }
267-
long sc = s_abbrTable.getScore ( &h );
267+
int32_t sc = s_abbrTable.getScore ( &h );
268268
if ( sc >= n ) { char *xx=NULL;*xx=0; }
269269
}
270270
// get from table
271-
long sc = s_abbrTable.getScore ( &h );
271+
int32_t sc = s_abbrTable.getScore ( &h );
272272
if ( sc <= 0 ) return false;
273273
if ( hasWordAfter ) *hasWordAfter = s_abbrs99[sc-1].m_hasWordAfter;
274274
return true;

0 commit comments

Comments
 (0)