cleanup all warning when not using -m32

This commit is contained in:
Matt
2014-11-12 14:11:27 -08:00
parent 4c19453ea9
commit a68d9be856
12 changed files with 109 additions and 78 deletions

@ -1064,7 +1064,7 @@ bool Addresses::set ( Sections *sections ,
try { m_msg2c = new (Msg2c); }
catch ( ... ) {
g_errno = ENOMEM;
log("addr: msg2c: new(%i): %s", sizeof(Msg2c),
log("addr: msg2c: new(%"INT32"): %s", (int32_t)sizeof(Msg2c),
mstrerror(g_errno));
// return true on error with g_errno set
return true;
@ -12756,7 +12756,7 @@ int32_t Address::print2 ( int32_t i , SafeBuf *pbuf , int64_t uh64 ) {
int64_t strh = 0LL;
if ( m_street ) strh = m_street->m_hash;
pbuf->safePrintf("<td><nobr>"
"k.n1=0x%16llx n0=0x%16llx "
"k.n1=0x%16"XINT64" n0=0x%16"XINT64" "
//"addrhash=0x%"XINT64" "
"bigHash64=0x%016"XINT64" "
"docId=%"UINT64" "
@ -16460,7 +16460,7 @@ void handleRequest2c ( UdpSlot *slot , int32_t nicenessWTF ) {
try { st = new (State2c); }
catch ( ... ) {
g_errno = ENOMEM;
log("msg2c: new(%i): %s", sizeof(State2c), mstrerror(g_errno));
log("msg2c: new(%"INT32"): %s", (int32_t)sizeof(State2c), mstrerror(g_errno));
return g_udpServer.sendErrorReply ( slot, g_errno );
}
mnew ( st , sizeof(State2c) , "hndl2c" );

@ -415,8 +415,8 @@ bool CatRec::set ( Url *site ,
// sanity check
if ( p - m_data != m_dataSize ) {
log ( "catrec: Serialized datasize %i != %"INT32"",
p - m_data, m_dataSize );
log ( "catrec: Serialized datasize %"INT32" != %"INT32"",
(int32_t)(p - m_data), (int32_t)m_dataSize );
char *xx = NULL; *xx = 0;
}
// set our member vars correctly in addition to the site rec

@ -2104,10 +2104,10 @@ void Date::addPtr ( Date *ptr , int32_t i , class Dates *parent ) {
//if ( m_b - m_a > 50 ) { char *xx=NULL;*xx=0; }
// ptr hash
if ( m_numPtrs == 0 ) m_ptrHash = (uint32_t)ptr;
if ( m_numPtrs == 0 ) m_ptrHash = (uint32_t)(PTRTYPE)ptr;
else {
m_ptrHash *= 439523;
m_ptrHash ^= (uint32_t)ptr;
m_ptrHash ^= (uint32_t)(PTRTYPE)ptr;
if ( m_ptrHash == 0 ) m_ptrHash = 1234567;
}
@ -9079,7 +9079,7 @@ bool Dates::setPart2 ( Addresses *aa , int32_t minPubDate , int32_t maxPubDate ,
//if ( dp->m_flags & DF_IN_VERTICAL_LIST )
// break;
uint64_t key = (uint32_t)di;
uint64_t key = (uint32_t)(PTRTYPE)di;
// shift up
key <<= 32LL;
// need DD now, if there
@ -9135,9 +9135,9 @@ bool Dates::setPart2 ( Addresses *aa , int32_t minPubDate , int32_t maxPubDate ,
// then do not allow it
uint32_t key2;
if ( DD ) key2 = (uint32_t)DD->m_ptrHash;
else key2 = (uint32_t)di;
else key2 = (uint32_t)(PTRTYPE)di;
key2 *= 439523;
key2 ^= (uint32_t)dp;
key2 ^= (uint32_t)(PTRTYPE)dp;
// if this would be a date we have already
// added, then skip it!
if ( comboTable.isInTable ( &key2 ) ) {
@ -9182,7 +9182,7 @@ bool Dates::setPart2 ( Addresses *aa , int32_t minPubDate , int32_t maxPubDate ,
// they are brother sections. maybe instead the
// fix relies on adding better implied sections
// around such beasties!!
if ( pp->m_mark == (int32_t)di &&
if ( pp->m_mark == (int32_t)(PTRTYPE)di &&
// store hours can always skip over
// this section to fix thewoodencow.com
! storeHoursCount &&
@ -9219,7 +9219,7 @@ bool Dates::setPart2 ( Addresses *aa , int32_t minPubDate , int32_t maxPubDate ,
// make sure we always grab a date from section "pp"
// from now on, now that we know it has a date that
// is compatible with us
pp->m_mark = (int32_t)di;
pp->m_mark = (int32_t)(PTRTYPE)di;
// . do not repeat this guy in another parent sec
// . no, only the last date in the telescope should
// have this set for our MULTIPLE HEADER algo
@ -15136,7 +15136,7 @@ Date **Dates::getDateElements ( Date *di , int32_t *ne ) {
// get the ending offset after adding the date ptrs
int32_t endOffset = m_cbuf.length();
// set length
*ne = (endOffset - startOffset)/4;
*ne = (endOffset - startOffset)/sizeof(Date *);
// set that
di->m_numFlatPtrs = *ne;
// must be > 0
@ -15161,7 +15161,7 @@ Date **Dates::getDateElements ( Date *di , int32_t *ne ) {
bool Dates::addPtrToArray ( Date *dp ) {
// only add base types
if ( dp->m_numPtrs == 0 ) {
if ( ! m_cbuf.pushLong((int32_t)dp) ) return false;
if ( ! m_cbuf.pushPtr(dp) ) return false;
return true;
}
// recursive otherwise
@ -16703,7 +16703,8 @@ void Date::print ( SafeBuf *sbArg ,
if ( m_flags & DF_EXACT_TOD )
sb->safePrintf("exacttod ");
if ( m_tableCell ) {
sb->safePrintf("tablesec=0x%"XINT32" ",(int32_t)m_tableCell->m_tableSec);
sb->safePrintf("tablesec=0x%"PTRFMT" ",
(PTRTYPE)m_tableCell->m_tableSec);
sb->safePrintf("row=%"INT32" ",m_tableCell->m_rowNum);
sb->safePrintf("col=%"INT32" ",m_tableCell->m_colNum);
}

@ -1194,7 +1194,7 @@ void Images::thumbStart_r ( bool amThread ) {
log( LOG_DEBUG, "image: Thumbnail size: %"INT32" bytes.", m_imgDataSize );
log( LOG_DEBUG, "image: Thumbnail dx=%"INT32" dy=%"INT32".", m_tdx,m_tdy );
log( LOG_DEBUG, "image: Thumbnail generated in %lldms.", stop-start );
log( LOG_DEBUG, "image: Thumbnail generated in %"INT64"ms.", stop-start );
}
// . *it is the image type

@ -38,7 +38,8 @@ void IndexList::print() {
(int64_t)getCurrentDocId() );
continue;
}
logf(LOG_DEBUG,"db: %04"INT32") %020lli %03"INT32" %020lli" ,
logf(LOG_DEBUG,"db: %04"INT32") %020"INT64" "
"%03"INT32" %020"INT64"" ,
i++ ,
(int64_t)getCurrentTermId12() ,
(int32_t)getCurrentScore(),

@ -476,7 +476,7 @@ void handleRequest36 ( UdpSlot *slot , int32_t netnice ) {
// at this point we should not have anyone waiting in line
// because we are the first, so just send an error reply back
// sanity check. BUT, we have to remove from request table...
s_requestTableServer36.m_htable.removeKey(requestHash);
s_requestTableServer36.m_htable.removeKey(&requestHash);
g_udpServer.sendErrorReply ( slot , g_errno );
return;
}

@ -189,7 +189,7 @@ bool Msge0::sendMsg8a ( int32_t i ) {
//TagRec *m = &m_tagRecs[i];
// save state into Msg8a
m->m_state2 = this;
m->m_state3 = (void *)i;
m->m_state3 = (void *)(PTRTYPE)i;
// how big are all the tags we got for this url
int32_t need = sizeof(TagRec);

@ -288,7 +288,7 @@ bool Msge1::sendMsgC ( int32_t i , char *host , int32_t hlen ) {
MsgC *m = &m_msgCs[i];
// save i and this in the msgC itself
m->m_state2 = this;
m->m_state3 = (void *)i;
m->m_state3 = (void *)(PTRTYPE)i;
// note it
//if ( g_conf.m_logDebugSpider )
@ -408,7 +408,7 @@ bool Msge1::addTag ( int32_t i ) {
MsgC *m = &m_msgCs[i];
// save i and this in the msgC itself
m->m_state2 = this;
m->m_state3 = (void *)i;
m->m_state3 = (void *)(PTRTYPE)i;
// store the domain here
//char *domBuf = m->m_request;
// get the domain

@ -3,7 +3,7 @@
RequestTable::RequestTable ( ) {
m_bufSize = 2 * HT_BUF_SIZE;
m_htable.set ( 50 , m_buf, m_bufSize, true ); // allow dup keys?
//m_htable.set ( 50 , m_buf, m_bufSize, true ); // allow dup keys?
m_processHash = 0;
}
@ -22,8 +22,15 @@ int32_t RequestTable::addRequest ( int64_t requestHash , void *state2 ) {
char *xx = NULL; *xx = 0;
}
if ( m_htable.m_ks == 0 ) {
//HashTableT <int64_t,int32_t> m_htable;
// allow dups!
m_htable.set(8,sizeof(char *),50,m_buf,m_bufSize,
true,0,"rqstbl");
}
// check if we have the state already in the hashtable
/*int32_t n = m_htable.getOccupiedSlotNum ( requestHash );
/*int32_t n = m_htable.getSlot ( requestHash );
while ( m_htable.m_keys[n] ){
// count if same key
if ( m_htable.m_keys[n] == requestHash &&
@ -35,12 +42,12 @@ int32_t RequestTable::addRequest ( int64_t requestHash , void *state2 ) {
}*/
// returns false and set g_errno on error, so we should return -1
if ( ! m_htable.addKey(requestHash, (int32_t)state2) ) return -1;
if ( ! m_htable.addKey(&requestHash, &state2) ) return -1;
//log ( "requesttable: added hash=%"INT64" state2=%"XINT32"", requestHash,
// (int32_t) state2 );
// count the slots that have this key
int32_t n = m_htable.getOccupiedSlotNum ( requestHash );
int32_t n = m_htable.getSlot ( &requestHash );
// sanity check
if ( n < 0 ) { char *xx = NULL; *xx = 0; }
@ -52,9 +59,10 @@ int32_t RequestTable::addRequest ( int64_t requestHash , void *state2 ) {
// count how many of our key are in the table, since we allow dup keys
int32_t count = 0;
while ( m_htable.m_keys[n] ){
while ( m_htable.m_flags[n]) { // m_keys[n] ){
// count if same key
if ( m_htable.m_keys[n] == requestHash ) count++;
if ( *(int64_t *)m_htable.getValueFromSlot(n) == requestHash )
count++;
// advance n, wrapping if necessary
if ( ++n >= m_htable.m_numSlots ) n = 0;
}
@ -82,13 +90,14 @@ void RequestTable::gotReply ( int64_t requestHash ,
// save g_errno in case callback resets it
int32_t saved = g_errno;
int32_t n = m_htable.getOccupiedSlotNum ( requestHash );
int32_t n = m_htable.getSlot ( &requestHash );
while ( n >= 0 ) {
// restore it before returning
g_errno = saved;
// state2 is in the table
void *state2 = (void *)m_htable.m_vals[n];
//void *state2 = (void *)m_htable.m_vals[n];
void *state2 = *(void **)m_htable.getValueFromSlot(n);
// remove from table BEFORE calling callback in case callback
// somehow alters the table!
//m_htable.removeKey ( requestHash );
@ -101,7 +110,7 @@ void RequestTable::gotReply ( int64_t requestHash ,
// otherwise, it is, call callback
callback ( reply , replySize , state1 , state2 );
// get next
n = m_htable.getOccupiedSlotNum ( requestHash );
n = m_htable.getSlot ( &requestHash );
}
// all done, unlock the hash table.
m_processHash = 0;
@ -110,17 +119,18 @@ void RequestTable::gotReply ( int64_t requestHash ,
void RequestTable::cancelRequest ( int64_t requestHash , void *state2 ) {
// there should only be one request for this request hash
int32_t n = m_htable.getOccupiedSlotNum ( requestHash );
int32_t n = m_htable.getSlot ( &requestHash );
if ( n < 0 ){
char *xx = NULL; *xx = 0;
}
m_htable.removeKey(requestHash);
m_htable.removeKey(&requestHash);
// check if there is any other remaining. core if there is
n = m_htable.getOccupiedSlotNum ( requestHash );
n = m_htable.getSlot ( &requestHash );
if ( n >= 0 ){
char *xx = NULL; *xx = 0;
}
log( LOG_INFO, "reqtable: cancelled request hash=%"INT64" state2=%"XINT32"",
requestHash, (int32_t) state2 );
log( LOG_INFO, "reqtable: cancelled "
"request hash=%"INT64" state2=%"PTRFMT"",
requestHash, (PTRTYPE) state2 );
return;
}

@ -28,7 +28,8 @@ class RequestTable {
void cancelRequest ( int64_t requestHash , void *state2 );
// . key of each slot is "requestHash"
// . value of each slot is "state2" from call to addRequest above
HashTableT <int64_t,int32_t> m_htable;
//HashTableT <int64_t,int32_t> m_htable;
HashTableX m_htable;
// . hash table buffer
char m_buf[HT_BUF_SIZE];

@ -85,8 +85,8 @@ bool saveUnicodeTable(UCPropTable *table, char *filename) {
size_t tableSize = table->getStoredSize();
char *buf = (char*)mmalloc(tableSize,"UP1");
if (!buf){
log(LOG_WARN, "uni: Couldn't allocate %d bytes "
"for storing %s", tableSize,filename);
log(LOG_WARN, "uni: Couldn't allocate %"INT32" bytes "
"for storing %s", (int32_t)tableSize,filename);
return false;
}
@ -331,8 +331,8 @@ bool saveKDecompTable(char *baseDir) {
size_t nwrite = fwrite(s_ucKDData, fileSize, 1, fp);
if (nwrite != 1) {
log(LOG_WARN, "uni: Error writing %s "
"(filesize: %d)",
filename, fileSize);
"(filesize: %"INT32")",
filename, (int32_t)fileSize);
fclose(fp);
return false;
}
@ -362,8 +362,8 @@ bool saveCDecompTable(char *baseDir) {
size_t nwrite = fwrite(s_ucCDData, fileSize, 1, fp);
if (nwrite != 1) {
log(LOG_WARN, "uni: Error writing %s "
"(filesize: %d)",
filename, fileSize);
"(filesize: %"INT32")",
filename, (int32_t)fileSize);
fclose(fp);
return false;
}

@ -3692,7 +3692,7 @@ int main2 ( int argc , char *argv[] ) {
if ( argc != cmdarg + 2 ) goto printHelp;
int64_t starttime = gettimeofdayInMilliseconds();
QuerySerializeTest( argv[cmdarg + 1] );
log(LOG_INFO, "query: took %lldmsecs for query serialize" \
log(LOG_INFO, "query: took %"INT64"msecs for query serialize" \
"test on %s", gettimeofdayInMilliseconds() - starttime,
argv[cmdarg + 1]);
return 0;
@ -8648,7 +8648,7 @@ void dumpDups ( char *coll ) {
scores = (char *) mmalloc ( numSlots, "main-dumpDups");
if(!slots || !scores) {
if(!slots)
log(LOG_INFO,"admin: Could not allocate %lld "
log(LOG_INFO,"admin: Could not allocate %"INT64" "
"bytes for dumpDups" ,
(int64_t) numSlots * 8 );
else mfree(slots, numSlots * 8, "main-dumpDups" );
@ -8836,7 +8836,7 @@ void dumpDups ( char *coll ) {
//is this tid the same as we process in the last run
if(tid == -1 && tempTid == lastTid) {
log(LOG_INFO,"admin: We broke termlist of "
"termid=%lld. Some "
"termid=%"INT64". Some "
"docids may be repeated in this termlist and "
"we will not know.",
tempTid);
@ -8987,7 +8987,7 @@ void dumpDups ( char *coll ) {
sprintf(buff,"%08"XINT32" %016"XINT64"\n",
k.n1, k.n0);
f.write(buff,gbstrlen(buff), -1);
sprintf(buff,"%lld\n",d);
sprintf(buff,"%"INT64"\n",d);
f2.write(buff, gbstrlen(buff), -1);
k.n0 &= 0xfffffffffffffffeLL;
@ -9045,7 +9045,7 @@ void dumpDups ( char *coll ) {
}
// watch out for wrap around
logf(LOG_INFO,"db: Done generating missing docids. Parsed %lld"
logf(LOG_INFO,"db: Done generating missing docids. Parsed %"INT64""
" indexdb records", indexdbCount);
mfree ( slots, numSlots * 8, "main-dumpDups");
mfree ( scores, numSlots, "main-dumpDups");
@ -10551,7 +10551,7 @@ bool bucketstest ( char* dbname ) {
if(strcmp(dbname, "indexdb") == 0) keySize = 12;
RdbBuckets rdbb;
rdbb.set (0,
LONG_MAX ,
0x7fffffff, // LONG_MAX ,
false ,//own data
"buckets-test",
RDB_INDEXDB,
@ -10570,7 +10570,7 @@ bool bucketstest ( char* dbname ) {
RdbBuckets rdbb;
char keySize = 12;
rdbb.set (0,
LONG_MAX ,
0x7fffffff,//LONG_MAX ,
false ,//own data
"buckets-test",
RDB_INDEXDB,
@ -11503,7 +11503,8 @@ skip:
//int pid;
for ( int32_t i = 0 ; i < s_numThreads ; i++ ) {
//int err = pthread_create ( &tid1,&s_attr,startUp,(void *)i) ;
if (!g_threads.call(GENERIC_THREAD,0,(void *)i,NULL,startUp)){
if (!g_threads.call(GENERIC_THREAD,0,
(void *)(PTRTYPE)i,NULL,startUp)){
log("test: Thread launch failed."); return; }
//pid = clone ( startUp , buf + stksize * i ,
// CLONE_FS | CLONE_FILES | CLONE_VM | //CLONE_SIGHAND |
@ -12804,11 +12805,11 @@ void dumpIndexdbFile ( int32_t fn , int64_t off , char *ff , int32_t ks ,
memcpy ( tmp + ks-6 , top , 6 );
// print the key
if ( ks == 12 )
fprintf(stdout,"%08lli) %08"XINT32" %016"XINT64"\n",
fprintf(stdout,"%08"INT64") %08"XINT32" %016"XINT64"\n",
off + (p - buf) ,
*(int32_t *)(tmp+8),*(int64_t *)tmp );
else
fprintf(stdout,"%08lli) %016"XINT64" %016"XINT64"\n",
fprintf(stdout,"%08"INT64") %016"XINT64" %016"XINT64"\n",
off + (p - buf) ,
*(int64_t *)(tmp+8),*(int64_t *)tmp );
// go to next key
@ -12892,7 +12893,8 @@ void dumpIndexdb (char *coll,int32_t startFileNum,int32_t numFiles,bool includeT
uint8_t dh = g_titledb.getDomHash8FromDocId(d);
if ( termId < 0 )
printf("k.n1=%08"XINT32" k.n0=%016"XINT64" "
"tid=%015llu score=%03"INT32" docId=%012"INT64" dh=0x%02"XINT32"%s\n" ,
"tid=%015"UINT64" score=%03"INT32" "
"docId=%012"INT64" dh=0x%02"XINT32"%s\n" ,
k.n1, k.n0, (int64_t)g_indexdb.getTermId(k),
(int32_t)g_indexdb.getScore(k) ,
d , (int32_t)dh, dd );
@ -13062,7 +13064,7 @@ void dumpPosdb (char *coll,int32_t startFileNum,int32_t numFiles,bool includeTre
if ( termId < 0 )
printf(
"k=%s "
"tid=%015llu "
"tid=%015"UINT64" "
"docId=%012"INT64" "
"siterank=%02"INT32" "
@ -13102,7 +13104,7 @@ void dumpPosdb (char *coll,int32_t startFileNum,int32_t numFiles,bool includeTre
else
printf(
"k=%s "
"tid=%015llu "
"tid=%015"UINT64" "
"docId=%012"INT64" "
"siterank=%02"INT32" "
@ -13265,7 +13267,7 @@ void dumpDatedb (char *coll,int32_t startFileNum,int32_t numFiles,bool includeTr
char *ss = "";
if ( isTagTerm ) ss = " tagterm";
printf("k.n1=%016"XINT64" k.n0=%016"XINT64" "
"tid=%015llu "
"tid=%015"UINT64" "
//"date=%010"UINT32" "
"eidrng=%"INT32"-%"INT32" "
"score=%03"INT32" docId=%012"INT64"%s%s\n" ,
@ -13321,7 +13323,7 @@ void dumpDatedb (char *coll,int32_t startFileNum,int32_t numFiles,bool includeTr
// otherwise a lat/lon/time key
printf("k.n1=%016"XINT64" "
"k.n0=%016"XINT64" "
"tid=%015llu "
"tid=%015"UINT64" "
"%s=%.06f "
"eventId=%03"INT32" docId=%012"INT64"%s\n" ,
KEY1((char *)k,16),
@ -13891,7 +13893,7 @@ void dumpLinkdb ( char *coll,
//char *ipString = iptoa(ip);
printf("k=%s "
"linkeesitehash32=0x%08"XINT32" "
"linkeeurlhash=0x%012llx "
"linkeeurlhash=0x%012"XINT64" "
"linkspam=%"INT32" "
"siterank=%02"INT32" "
//"hopcount=%03hhu "
@ -15153,15 +15155,15 @@ bool memTest() {
log(LOG_INIT, "memtest: Testing 8KB L1 cache.");
membustest ( 8000 , 100000 , true );
log(LOG_INIT, "memtest: Allocating up to %lld bytes",g_mem.m_maxMem);
log(LOG_INIT, "memtest: Allocating up to %"INT64" bytes",g_mem.m_maxMem);
for (i=0;i<4096;i++) {
ptrs[numPtrs] = mmalloc(1024*1024, "memtest");
if (!ptrs[numPtrs]) break;
numPtrs++;
}
log(LOG_INIT, "memtest: Was able to allocate %lld bytes of a total of "
"%lld bytes of memory attempted.",
log(LOG_INIT, "memtest: Was able to allocate %"INT64" bytes of a total of "
"%"INT64" bytes of memory attempted.",
g_mem.m_used,g_mem.m_maxMem);
log(LOG_INIT, "memtest: Dumping core to test max core file size.");
char *xx = NULL;
@ -16182,7 +16184,7 @@ void countdomains( char* coll, int32_t numRecs, int32_t verbosity, int32_t outpu
fprintf(fhndl,
"<rec1>\n\t<domain>%s</domain>\n"
"\t<pages>%"INT32"</pages>\n"
//"\t<quality>%lld</quality>\n"
//"\t<quality>%"INT64"</quality>\n"
"\t<block>\n",
buf, tmpdomi->pages
//,(tmpdomi->quality/tmpdomi->pages)
@ -16227,7 +16229,7 @@ void countdomains( char* coll, int32_t numRecs, int32_t verbosity, int32_t outpu
fprintf(fhndl,
"<rec2>\n\t<ip>%s</ip>\n"
"\t<pages>%"INT32"</pages>\n"
//"\t<quality>%lld</quality>\n"
//"\t<quality>%"INT64"</quality>\n"
"\t<block>\n",
buf, tmpipi->pages);
//(tmpipi->quality/tmpipi->pages));
@ -16376,9 +16378,9 @@ void countdomains( char* coll, int32_t numRecs, int32_t verbosity, int32_t outpu
"<tr><th align=\"left\">Number of Failed Attempts</th>"
"<td>%"INT32"</td></tr><tr></tr><tr>\n"
"<tr><th align=\"left\">Number of Documents in Index"
"</th><td>%lld</td></tr>\n"
"</th><td>%"INT64"</td></tr>\n"
"<tr><th align=\"left\">Estimated Domains in index</th>"
"<td>%lld</td></tr>"
"<td>%"INT64"</td></tr>"
"</table><br><br><br>\n"
,countDom,countIp,
countDocs, attempts-countDocs,total,
@ -16408,9 +16410,9 @@ void countdomains( char* coll, int32_t numRecs, int32_t verbosity, int32_t outpu
fprintf( fhndl, "<tr bgcolor=\"%s\"><td>"
"<a href=\"%s%s\" target=\"_blank\">%s</a>"
"</td><td>%"INT32"</td>"
//"<td>%lld</td>"
//"<td>%"INT64"</td>"
"<td>%"INT32"</td>"
"<td>%lld</td><td>",
"<td>%"INT64"</td><td>",
color, link_dom,
buf, buf, tmpdomi->lnkCnt,
//(tmpdomi->quality/tmpdomi->pages),
@ -16436,7 +16438,7 @@ void countdomains( char* coll, int32_t numRecs, int32_t verbosity, int32_t outpu
buf[len] = '\0';
fprintf( fhndl, "\t\t<tr bgcolor=\"green\"><td>"
"</td><td></td><td>%s</td><td></td><td>"
"%"INT32"</td><td>%lld</td></tr>\n", buf,
"%"INT32"</td><td>%"INT64"</td></tr>\n", buf,
tmplnk->pages,
((tmplnk->pages*total)/countDocs) );
}
@ -16482,9 +16484,9 @@ void countdomains( char* coll, int32_t numRecs, int32_t verbosity, int32_t outpu
"</td>"
"<td>%"INT32"</td>"
"<td>%"INT32"</td>"
//"<td>%lld</td>"
//"<td>%"INT64"</td>"
"<td>%"INT32"</td>"
"<td>%lld</td></tr>\n",
"<td>%"INT64"</td></tr>\n",
color,
link_ip, buf, buf, tmpipi->numDom, linked,
//(tmpipi->quality/tmpipi->pages),
@ -16502,8 +16504,8 @@ void countdomains( char* coll, int32_t numRecs, int32_t verbosity, int32_t outpu
else color = clr3;
fprintf( fhndl, "<tr bgcolor=\"%s\"><td>"
"</td><td><a href=\"%s%s\">%s</a></td>"
"<td>%"INT32"</td><td>%lld"
"</td><td>%"INT32"</td><td> %lld</td></tr>"
"<td>%"INT32"</td><td>%"INT64""
"</td><td>%"INT32"</td><td> %"INT64"</td></tr>"
"\n", color, link_dom, buf,
buf, tmpdomi->lnkCnt,
(tmpdomi->quality/tmpdomi->pages),
@ -16582,7 +16584,7 @@ void countdomains( char* coll, int32_t numRecs, int32_t verbosity, int32_t outpu
mfree( dom_table, numRecs * sizeof(struct dom_info *), "main-dcfdt" );
int64_t time_end = gettimeofdayInMilliseconds();
log( LOG_INFO, "cntDm: Took %lldms to count domains in %"INT32" recs.",
log( LOG_INFO, "cntDm: Took %"INT64"ms to count domains in %"INT32" recs.",
time_end-time_start, countDocs );
log( LOG_INFO, "cntDm: %"INT32" bytes of Total Memory Used.",
ima + dma + (8 * numRecs) );
@ -16635,7 +16637,10 @@ int ip_hcmp (const void *p1, const void *p2) {
// Sort by IP frequency in pages 9->0
int ip_fcmp (const void *p1, const void *p2) {
int32_t n1, n2;
//int32_t n1, n2;
// break this! need to fix later MDW 11/12/14
char *n1 ;
char *n2 ;
struct ip_info *ii1;
struct ip_info *ii2;
@ -16657,7 +16662,11 @@ int ip_fcmp (const void *p1, const void *p2) {
// Sort by number of domains linked to IP, descending
int ip_dcmp (const void *p1, const void *p2) {
int32_t n1, n2;
//int32_t n1, n2;
// break this! need to fix later MDW 11/12/14
char *n1 ;
char *n2 ;
struct ip_info *ii1;
struct ip_info *ii2;
@ -16707,7 +16716,10 @@ int dom_hcmp (const void *p1, const void *p2) {
// Sort by page frequency in titlerec 9->0
int dom_fcmp (const void *p1, const void *p2) {
int32_t n1, n2;
//int32_t n1, n2;
// break this! need to fix later MDW 11/12/14
char *n1 ;
char *n2 ;
struct dom_info *di1;
struct dom_info *di2;
@ -16730,7 +16742,10 @@ int dom_fcmp (const void *p1, const void *p2) {
// Sort by quantity of outgoing links 9-0
int dom_lcmp (const void *p1, const void *p2) {
int32_t n1, n2;
//int32_t n1, n2;
// break this! need to fix later MDW 11/12/14
char *n1 ;
char *n2 ;
struct dom_info *di1;
struct dom_info *di2;
@ -16784,7 +16799,10 @@ int lnk_hcmp (const void *p1, const void *p2) {
#if 0
// Sort by frequency of link use, 9-0
int lnk_fcmp (const void *p1, const void *p2) {
int32_t n1, n2;
//int32_t n1, n2;
// break this! need to fix later MDW 11/12/14
char *n1 ;
char *n2 ;
struct lnk_info *li1;
struct lnk_info *li2;