updates to compile cleanly on redhat.

This commit is contained in:
Matt Wells 2014-05-24 23:58:12 -04:00
parent b33959191b
commit 3fe1d3f184
5 changed files with 25 additions and 20 deletions

2
Loop.h
View File

@ -11,7 +11,9 @@
#include <signal.h>
#include <fcntl.h> // fcntl()
#include <sys/poll.h> // POLLIN, POLLPRI, ...
#ifndef F_SETSIG
#define F_SETSIG 10 // F_SETSIG
#endif
#include "Mem.h" // mmalloc, mfree
#define QUERYPRIORITYWEIGHT 16
#define QUICKPOLL_INTERVAL 10

View File

@ -7138,7 +7138,7 @@ HashTableX *XmlDoc::getCountTable ( ) {
long numSlots = nw * 3 + 5000;
// only alloc for this one if not provided
if (!ct->set(8,4,numSlots,NULL,0,false,m_niceness,"xmlct"))
return false;
return (HashTableX *)NULL;
//char *ff = getFragVec ( ) ;
//if ( ! ff ) return false;
@ -7159,7 +7159,7 @@ HashTableX *XmlDoc::getCountTable ( ) {
// the first 80,000 words for performance reasons
if ( i < MAXFRAGWORDS && fv[i] == 0 ) continue;
// accumulate the wid with a score of 1 each time it occurs
if ( ! ct->addTerm ( &wids[i] ) ) return false;
if ( ! ct->addTerm ( &wids[i] ) ) return (HashTableX *)NULL;
// skip if word #i does not start a phrase
if ( ! pids [i] ) continue;
// if phrase score is less than 100% do not consider as a
@ -7169,7 +7169,7 @@ HashTableX *XmlDoc::getCountTable ( ) {
if ( wptrs[i+1][1] == ',' ) continue;
if ( wptrs[i+1][2] == ',' ) continue;
// put it in, accumulate, max score is 0x7fffffff
if ( ! ct->addTerm ( &pids[i] ) ) return false;
if ( ! ct->addTerm ( &pids[i] ) ) return (HashTableX *)NULL;
}
// now add each meta tag to the pot
@ -7191,7 +7191,8 @@ HashTableX *XmlDoc::getCountTable ( ) {
// skip if empty meta content
if ( wend - p <= 0 ) continue;
// our ouw hash
if ( ! hashString_ct ( ct , p , wend - p ) ) return false;
if ( ! hashString_ct ( ct , p , wend - p ) )
return (HashTableX *)NULL;
}
// add each incoming link text
for ( Inlink *k=NULL ; info1 && (k=info1->getNextInlink(k)) ; ) {
@ -7208,11 +7209,13 @@ HashTableX *XmlDoc::getCountTable ( ) {
k->ptr_urlBuf,m_firstUrl.m_url);
continue;
}
if ( ! hashString_ct ( ct , p , plen ) ) return false;
if ( ! hashString_ct ( ct , p , plen ) )
return (HashTableX *)NULL;
// hash this stuff (was hashPwids())
p = k-> ptr_surroundingText;
plen = k->size_surroundingText - 1;
if ( ! hashString_ct ( ct , p , plen ) ) return false;
if ( ! hashString_ct ( ct , p , plen ) )
return (HashTableX *)NULL;
}
// we got it

View File

@ -40,7 +40,7 @@ bool print128 ( key128_t *kp ) {
// . put all the maps here now
// . convert "c" to lower case
const char g_map_to_lower[] = {
const unsigned char g_map_to_lower[] = {
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ,
16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 ,
@ -77,7 +77,7 @@ bool print128 ( key128_t *kp ) {
// converts ascii chars and IS_O chars to their lower case versions
const char g_map_to_upper[] = {
const unsigned char g_map_to_upper[] = {
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ,
16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 ,
@ -112,7 +112,7 @@ bool print128 ( key128_t *kp ) {
216,217,218,219,220,221,222,255
};
const char g_map_to_ascii[] = {
const unsigned char g_map_to_ascii[] = {
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ,
8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ,
16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 ,

View File

@ -178,9 +178,9 @@ time_t getTimeSynced (); // synced with host #0's system clock
long stripHtml( char *content, long contentLen, long version, long strip );
extern const char g_map_is_vowel[];
extern const char g_map_to_lower[];
extern const char g_map_to_upper[];
extern const char g_map_to_ascii[];
extern const unsigned char g_map_to_lower[];
extern const unsigned char g_map_to_upper[];
extern const unsigned char g_map_to_ascii[];
extern const char g_map_is_upper[];
extern const char g_map_canBeInTagName[];
extern const char g_map_is_control[];

16
types.h
View File

@ -944,14 +944,14 @@ inline char *KEYMIN() { return "\0\0\0\0"
"\0\0\0\0"
"\0\0\0\0"
"\0\0\0\0"; };
static int s_foo[] = { 0xffffffff ,
0xffffffff ,
0xffffffff ,
0xffffffff ,
0xffffffff ,
0xffffffff ,
0xffffffff ,
0xffffffff };
static int s_foo[] = { (int)0xffffffff ,
(int)0xffffffff ,
(int)0xffffffff ,
(int)0xffffffff ,
(int)0xffffffff ,
(int)0xffffffff ,
(int)0xffffffff ,
(int)0xffffffff };
inline char *KEYMAX() { return (char *)s_foo; };