time_t	last,first,numaccess; int32 flg = (int32)*((char*)data->data + 3*sizeof(int32)); if (!displayHistoryItem((char*)key->data)) return; if (grdf != NULL) { HIST_COPY_INT32(&last, (time_t *)((char *)data->data)); HIST_COPY_INT32(&first, (time_t *)((char *)data->data + sizeof(int32))); HIST_COPY_INT32(&numaccess, (time_t *)((char *)data->data + 2*sizeof(int32)));  if (hostHash) collateOneHist(grdf, gNavCenter->RDF_History, (char*)key->data,                         ((char*)data->data + 4*sizeof(int32)),    last, first, numaccess, 0); if (ByDateOpened) collateOneHist(grdf, gNavCenter->RDF_History, (char*)key->data,                         ((char*)data->data + 4*sizeof(int32)),    last, first, numaccess, 1);
HASHINFO hash = { 4*1024, 0, 0, 0, 0, 0}; DBT key, data; time_t	last,first; uint32	numaccess; PRBool firstOne = 0; DB* db = CallDBOpenUsingFileURL(gGlobalHistoryURL,  O_RDONLY ,0600, DB_HASH, &hash); grdf = r; if (db != NULL)	{ if (!byDateFlag) { hostHash = PL_NewHashTable(500, idenHash, PL_CompareValues,  PL_CompareValues,  null, null); } else ByDateOpened = 1; while (0 ==   (*db->seq)(db, &key, &data, (firstOne ? R_NEXT : R_FIRST))) { char* title =    ((char*)data.data + 16);                 char* url =      (char*)key.data;                         int32 flag; HIST_COPY_INT32(&flag, (int8 *)data.data + 3 * sizeof(int32)); firstOne = 1; #ifdef XP_UNIX if (( displayHistoryItem((char*)key.data))) { #else if (1 == flag && displayHistoryItem((char*)key.data)) { #endif HIST_COPY_INT32(&last, (time_t *)((int8 *)data.data)); HIST_COPY_INT32(&first, (time_t *)((int8 *)data.data + sizeof(int32))); HIST_COPY_INT32(&numaccess, (time_t *)((int8 *)data.data + 2*sizeof(int32)));  collateOneHist(r, u,url,title, last, first, numaccess, byDateFlag); } } (*db->close)(db);
PR_PUBLIC_API(void)updateNewHistItem (DBT *key, DBT *data){  time_t	last,first,numaccess;  int32 flg = (int32)*((char*)data->data + 3*sizeof(int32));  if (!displayHistoryItem((char*)key->data)) return;  if (grdf != NULL) {    HIST_COPY_INT32(&last, (time_t *)((char *)data->data));    HIST_COPY_INT32(&first, (time_t *)((char *)data->data + sizeof(int32)));    HIST_COPY_INT32(&numaccess, (time_t *)((char *)data->data + 2*sizeof(int32)));        if (hostHash) collateOneHist(grdf, gNavCenter->RDF_History, 				 (char*)key->data,                        /* url */				 ((char*)data->data + 4*sizeof(int32)),   /* title */				 last, first, numaccess, 0);    if (ByDateOpened) collateOneHist(grdf, gNavCenter->RDF_History, 				     (char*)key->data,                        /* url */				     ((char*)data->data + 4*sizeof(int32)),   /* title */				     last, first, numaccess, 1);  }}