mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	libDtSearch: Resolve 38 -Wformat warnings
This commit is contained in:
		
							parent
							
								
									a10520c43c
								
							
						
					
					
						commit
						9040256676
					
				
					 8 changed files with 37 additions and 37 deletions
				
			
		| 
						 | 
				
			
			@ -221,7 +221,7 @@ BAD_DBA:
 | 
			
		|||
	if (debugging_boolsrch) {
 | 
			
		||||
	    fprintf (aa_stderr,
 | 
			
		||||
		PROGNAME"434 Invalid dba %ld.  "
 | 
			
		||||
		"recno=%ld bitvec[%d]=%02x  db_status=%d.\n",
 | 
			
		||||
		"recno=%ld bitvec[%ld]=%02x  db_status=%d.\n",
 | 
			
		||||
		objrecdba, recno, recno>>3, 1<<(recno%8), db_status);
 | 
			
		||||
	    fflush (aa_stderr);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -270,7 +270,7 @@ static void	calculate_idfs (void)
 | 
			
		|||
	    if (debugging_boolsrch)
 | 
			
		||||
		fprintf (aa_stderr,
 | 
			
		||||
		    PROGNAME"733 IDF[%d]  numdocs=%5ld  idf=%lf\n",
 | 
			
		||||
		    i, or_wordrecs[i].or_hwaddrs, idf[i]);
 | 
			
		||||
		    i, (long) or_wordrecs[i].or_hwaddrs, idf[i]);
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
    return;
 | 
			
		||||
| 
						 | 
				
			
			@ -356,9 +356,9 @@ static int	load_or_wordrecs (void)
 | 
			
		|||
	    }
 | 
			
		||||
	    if (debugging_boolsrch)
 | 
			
		||||
		fprintf (aa_stderr, "ofs=%ld addrs=%ld free=%ld\n",
 | 
			
		||||
		    wordrec->or_hwoffset,
 | 
			
		||||
		    wordrec->or_hwaddrs,
 | 
			
		||||
		    wordrec->or_hwfree);
 | 
			
		||||
		    (long) wordrec->or_hwoffset,
 | 
			
		||||
		    (long) wordrec->or_hwaddrs,
 | 
			
		||||
		    (long) wordrec->or_hwfree);
 | 
			
		||||
	    if (wordrec->or_hwaddrs > OE_words_hitlimit) {
 | 
			
		||||
		sprintf (msgbuf, catgets (dtsearch_catd, MS_boolsrch, 14,
 | 
			
		||||
		    "%s '%s' has more than %ld hits.\n"
 | 
			
		||||
| 
						 | 
				
			
			@ -1373,7 +1373,7 @@ DONE_READING:
 | 
			
		|||
    if (debugging_boolsrch) {
 | 
			
		||||
	int	i;
 | 
			
		||||
	if (debugging_boolsrch)
 | 
			
		||||
	    fprintf (aa_stderr, PROGNAME"313 BITVEC[%ld]:\n", save_stemno);
 | 
			
		||||
	    fprintf (aa_stderr, PROGNAME"313 BITVEC[%d]:\n", save_stemno);
 | 
			
		||||
	for  (i=0; i<bitveclen; i++) {
 | 
			
		||||
	    fprintf (aa_stderr, " %02x", bitvecs[save_stemno][i]);
 | 
			
		||||
	    if (i > 22)
 | 
			
		||||
| 
						 | 
				
			
			@ -1489,7 +1489,7 @@ void	boolean_search (void)
 | 
			
		|||
	    ,need_zero_permute
 | 
			
		||||
	    ,do_stat_sort
 | 
			
		||||
	    ,aa_maxhits
 | 
			
		||||
	    ,usrblk.dblk->dbrec.or_maxdba
 | 
			
		||||
	    ,(long) usrblk.dblk->dbrec.or_maxdba
 | 
			
		||||
	    ,or_reccount
 | 
			
		||||
	    ,or_recslots
 | 
			
		||||
	    ,tot_addr_count
 | 
			
		||||
| 
						 | 
				
			
			@ -1520,16 +1520,16 @@ void	boolean_search (void)
 | 
			
		|||
    allocsz_needed = bitveclen * (saveusr.stemcount + 1);
 | 
			
		||||
    if (debugging_boolsrch)
 | 
			
		||||
	fprintf (aa_stderr, PROGNAME"430 "
 | 
			
		||||
	    "bitvecs[] alloc needed=%ld (bvln=%ld stems=%d+1), have=%ld.\n",
 | 
			
		||||
	    allocsz_needed, bitveclen, saveusr.stemcount, bitvec_allocsz);
 | 
			
		||||
	    "bitvecs[] alloc needed=%lu (bvln=%ld stems=%d+1), have=%lu.\n",
 | 
			
		||||
	    (unsigned long) allocsz_needed, bitveclen, saveusr.stemcount, (unsigned long) bitvec_allocsz);
 | 
			
		||||
    if (bitvec_allocsz < allocsz_needed) {
 | 
			
		||||
	if (bitvec_allocp)
 | 
			
		||||
	    free (bitvec_allocp);
 | 
			
		||||
	bitvec_allocp = austext_malloc (allocsz_needed + 16,
 | 
			
		||||
	    PROGNAME"508", NULL);
 | 
			
		||||
	if (debugging_boolsrch)
 | 
			
		||||
	    fprintf (aa_stderr, PROGNAME"432 bitvecs[] realloc %ld-->%ld.\n",
 | 
			
		||||
		bitvec_allocsz, allocsz_needed);
 | 
			
		||||
	    fprintf (aa_stderr, PROGNAME"432 bitvecs[] realloc %lu-->%lu.\n",
 | 
			
		||||
		(unsigned long) bitvec_allocsz, (unsigned long) allocsz_needed);
 | 
			
		||||
	bitvec_allocsz = allocsz_needed;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -258,7 +258,7 @@ int	oe_unblob (LLIST *bloblist)
 | 
			
		|||
    if (usrblk.debug & USRDBG_RETRVL)
 | 
			
		||||
	fprintf (aa_stderr, PROGNAME "256 "
 | 
			
		||||
	    "oe_unblob: actual decompressed length = %ld.\n",
 | 
			
		||||
	    targ - (UCHAR *) usrblk.cleartext);
 | 
			
		||||
	    (long) (targ - (UCHAR *) usrblk.cleartext));
 | 
			
		||||
    return OE_OK;
 | 
			
		||||
}  /* oe_unblob() */
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -816,7 +816,7 @@ NO_TEXT:
 | 
			
		|||
		fprintf (aa_stderr, PROGNAME "1089 RECKEY2DBA: "
 | 
			
		||||
		    "retncode=%d, reckey='%s' ->\tdba=%ld:%ld\n",
 | 
			
		||||
		    usrblk.retncode, usrblk.query,
 | 
			
		||||
		    (usrblk.dba) >> 24, (usrblk.dba) & 0xffffff);
 | 
			
		||||
		     (long) ((usrblk.dba) >> 24), (long) ((usrblk.dba) & 0xffffff));
 | 
			
		||||
	    break;
 | 
			
		||||
 | 
			
		||||
	case OE_DELETE_RECID:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -228,8 +228,8 @@ char           *get_hitlist_text (int maxlen)
 | 
			
		|||
 | 
			
		||||
    if (usrblk.debug & USRDBG_UTIL)
 | 
			
		||||
	fprintf (aa_stderr, PROGNAME "160 "
 | 
			
		||||
	    "get_hitlist_text(): mallocsz=%ld textlen=%ld\n",
 | 
			
		||||
	    mallocsz, strlen (text));
 | 
			
		||||
	    "get_hitlist_text(): mallocsz=%lu textlen=%lu\n",
 | 
			
		||||
	    (unsigned long) mallocsz, (unsigned long) strlen (text));
 | 
			
		||||
    return text;
 | 
			
		||||
}  /* get_hitlist_text() */
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -272,10 +272,10 @@ int             ve_initialize (void)
 | 
			
		|||
	    fprintf (aa_stderr,
 | 
			
		||||
		"\tvers='%s' reccount=%ld maxdba=%ld fzkeysz=%d\n"
 | 
			
		||||
		"\tdbflags=x%lx maxwordsz=%d hufid=%ld abstrsz=%d\n",
 | 
			
		||||
		db->dbrec.or_version, db->dbrec.or_reccount,
 | 
			
		||||
		db->dbrec.or_maxdba, db->dbrec.or_fzkeysz,
 | 
			
		||||
		db->dbrec.or_dbflags, db->dbrec.or_maxwordsz,
 | 
			
		||||
		db->dbrec.or_hufid, db->dbrec.or_abstrsz);
 | 
			
		||||
		db->dbrec.or_version, (long) db->dbrec.or_reccount,
 | 
			
		||||
		(long) db->dbrec.or_maxdba, db->dbrec.or_fzkeysz,
 | 
			
		||||
		(unsigned long) db->dbrec.or_dbflags, db->dbrec.or_maxwordsz,
 | 
			
		||||
		(long) db->dbrec.or_hufid, db->dbrec.or_abstrsz);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/*-------------- OPEN D97 and D98 FILES ----------------
 | 
			
		||||
| 
						 | 
				
			
			@ -888,8 +888,8 @@ LLIST          *ve_getblobs (DtSrINT32 dba, int vistano)
 | 
			
		|||
	fprintf (aa_stderr, PROGNAME "792 ve_getblobs: "
 | 
			
		||||
	    "db='%s'[v#%d] dba=%ld:%ld v#=%d sz=%ld: '%s'\n",
 | 
			
		||||
	    usrblk.dblk->name, usrblk.dblk->vistano,
 | 
			
		||||
	    dba >> 24, dba % 0xffffff, vistano,
 | 
			
		||||
	    myobjbuf.or_objsize, myobjbuf.or_objkey);
 | 
			
		||||
	    (long) (dba >> 24), (long) (dba % 0xffffff), vistano,
 | 
			
		||||
	    (long) myobjbuf.or_objsize, myobjbuf.or_objkey);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* Retrieve blobs and append to end of growing list.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -153,7 +153,7 @@ long	hilite_cleartext (int parse_type, char *stems, int stemcount)
 | 
			
		|||
		hitwords_size += hitwords_size >> 1;	/* 1.5 times */
 | 
			
		||||
		if (debugging_hilite || (usrblk.debug & USRDBG_RETRVL))
 | 
			
		||||
		    fprintf (aa_stderr,
 | 
			
		||||
			PROGNAME"098 realloc for %ld hitwords.\n",
 | 
			
		||||
			PROGNAME"098 realloc for %d hitwords.\n",
 | 
			
		||||
			hitwords_size);
 | 
			
		||||
		hitwords = realloc (hitwords,
 | 
			
		||||
		    hitwords_size * sizeof(DtSrHitword) + 16);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -455,7 +455,7 @@ static UCHAR	*kanji_compounder (void)
 | 
			
		|||
	    if (debugging_jpn)
 | 
			
		||||
		fprintf (aa_stderr,
 | 
			
		||||
		    "knjcompdr: subofs=%2ld totofs=%3ld \"%s\"\n",
 | 
			
		||||
		    mysubstrp - substrbuf, *offsetp, outbuf);
 | 
			
		||||
		    (long) (mysubstrp - substrbuf), *offsetp, outbuf);
 | 
			
		||||
	    return outbuf;
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -633,7 +633,7 @@ static UCHAR	*parse_substring (void)
 | 
			
		|||
	if (debugging_jpn) {
 | 
			
		||||
	    int		i;
 | 
			
		||||
	    fprintf (aa_stderr, "jpnsubstr: js=%s len=%ld str='",
 | 
			
		||||
		display_jstate(last_jstate), substrlen);
 | 
			
		||||
		display_jstate(last_jstate), (long) substrlen);
 | 
			
		||||
	    for (i = 0;  i < substrlen;  i++)
 | 
			
		||||
		fputc ((substrbuf[i] < 32)? '~' : substrbuf[i],
 | 
			
		||||
		    aa_stderr);
 | 
			
		||||
| 
						 | 
				
			
			@ -824,7 +824,7 @@ char	*jpn_parser (PARG *parg)
 | 
			
		|||
	if (debugging_jpn) {
 | 
			
		||||
	    fprintf (aa_stderr,
 | 
			
		||||
		"jpnparser: start text block, substrbufsz=%ld.\n",
 | 
			
		||||
		substrbufsz);
 | 
			
		||||
		(long) substrbufsz);
 | 
			
		||||
	    fflush (aa_stderr);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -886,9 +886,9 @@ FILL_ANOTHER_SUBSTRING:
 | 
			
		|||
		size_t	curlen = substrp - substrbuf;
 | 
			
		||||
		if (debugging_jpn) {
 | 
			
		||||
		    fprintf (aa_stderr,
 | 
			
		||||
			"jpnparser: curr substr len %ld, "
 | 
			
		||||
			"new substrbufsz %ld.\n",
 | 
			
		||||
			curlen, substrbufsz<<1);
 | 
			
		||||
			"jpnparser: curr substr len %lu, "
 | 
			
		||||
			"new substrbufsz %lu.\n",
 | 
			
		||||
			(unsigned long) curlen, (unsigned long) substrbufsz<<1);
 | 
			
		||||
		    fflush (aa_stderr);
 | 
			
		||||
		}
 | 
			
		||||
		substrbufsz <<= 1;	/* double its size */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -261,7 +261,7 @@ static int	search_wordtree (WORDTREE *wordtree, UCHAR *wordstring)
 | 
			
		|||
	/* Descend left or right depending on word */
 | 
			
		||||
	if (debugging_search_wordtree)
 | 
			
		||||
	    fprintf (aa_stderr, "  %c '%s'\n",
 | 
			
		||||
		(direction < 0) ? 'L' : 'R', node->word);
 | 
			
		||||
		(direction < 0) ? 'L' : 'R', (char *) node->word);
 | 
			
		||||
	if (direction < 0)
 | 
			
		||||
	    node = node->llink;
 | 
			
		||||
	else
 | 
			
		||||
| 
						 | 
				
			
			@ -380,8 +380,8 @@ char	*teskey_parser (PARG *parg)
 | 
			
		|||
	endmaxword = outbuf + maxwordsz;
 | 
			
		||||
	if (debugging_teskey)
 | 
			
		||||
	    fprintf (aa_stderr,
 | 
			
		||||
		"teskey: start of text block, maxwsz=%ld outbufsz=%ld\n",
 | 
			
		||||
		maxwordsz, outbufsz);
 | 
			
		||||
		"teskey: start of text block, maxwsz=%d outbufsz=%lu\n",
 | 
			
		||||
		maxwordsz, (unsigned long) outbufsz);
 | 
			
		||||
	readcount = 0L;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -193,7 +193,7 @@ static int      delete_addrs (void)
 | 
			
		|||
	printf (PROGNAME "80 "
 | 
			
		||||
	    "fseek failed on '%s%s.d99'.  Offset=%ld.  Word='%s'.\n",
 | 
			
		||||
	    usrblk.dblk->path, usrblk.dblk->name,
 | 
			
		||||
	    got_hword.or_hwoffset, keyptr);
 | 
			
		||||
	    (long) got_hword.or_hwoffset, keyptr);
 | 
			
		||||
	DtSearchExit (99);
 | 
			
		||||
    }
 | 
			
		||||
    write_offset = ftell (dtbs_addr_fp);
 | 
			
		||||
| 
						 | 
				
			
			@ -276,9 +276,9 @@ static int      delete_addrs (void)
 | 
			
		|||
		ncopy, dtbs_addr_fp);
 | 
			
		||||
	    if (num_writes != ncopy) {
 | 
			
		||||
		printf (PROGNAME "283 fwrite at pos %ld failed on '%s%s.d99'.\n"
 | 
			
		||||
		    "  Wrote %ld dba's instead of %ld dba's.\n",
 | 
			
		||||
		    "  Wrote %lu dba's instead of %lu dba's.\n",
 | 
			
		||||
		    write_offset, usrblk.dblk->path, usrblk.dblk->name,
 | 
			
		||||
		    num_writes, ncopy);
 | 
			
		||||
		    (unsigned long) num_writes, (unsigned long) ncopy);
 | 
			
		||||
		DtSearchExit (99);
 | 
			
		||||
	    }
 | 
			
		||||
	    write_offset = ftell (dtbs_addr_fp);
 | 
			
		||||
| 
						 | 
				
			
			@ -496,7 +496,7 @@ NOTHING_TO_DO:
 | 
			
		|||
    /*--------- Gendler's SWORD Loop ---------*/
 | 
			
		||||
    /* every database has short words */
 | 
			
		||||
    fprintf (aa_stderr, PROGNAME "368 "
 | 
			
		||||
	"Entering SHORT word loop.  Each dot = %ld words.\n",
 | 
			
		||||
	"Entering SHORT word loop.  Each dot = %d words.\n",
 | 
			
		||||
	WORDS_PER_DOT);
 | 
			
		||||
    fflush (aa_stderr);
 | 
			
		||||
    word_count = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -530,7 +530,7 @@ NOTHING_TO_DO:
 | 
			
		|||
 | 
			
		||||
    /*--------- Gendler's LWORD Loop ---------*/
 | 
			
		||||
    fprintf (aa_stderr, PROGNAME "398 "
 | 
			
		||||
	"Entering LONG word loop.  Each dot = %ld words.\n",
 | 
			
		||||
	"Entering LONG word loop.  Each dot = %d words.\n",
 | 
			
		||||
	WORDS_PER_DOT);
 | 
			
		||||
    fflush (aa_stderr);
 | 
			
		||||
    word_count = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -562,7 +562,7 @@ NOTHING_TO_DO:
 | 
			
		|||
 | 
			
		||||
    /*--------- Gendler's HWORD Loop --------- */
 | 
			
		||||
    fprintf (aa_stderr, PROGNAME "429 "
 | 
			
		||||
	"Entering HUGE word loop.  Each dot = %ld words.\n",
 | 
			
		||||
	"Entering HUGE word loop.  Each dot = %d words.\n",
 | 
			
		||||
	WORDS_PER_DOT);
 | 
			
		||||
    fflush (aa_stderr);
 | 
			
		||||
    word_count = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue