mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtsr: Resolve all -Wformat-security warnings.
This commit is contained in:
parent
b14d6d0b68
commit
fd3a620a68
5 changed files with 26 additions and 26 deletions
|
@ -224,7 +224,7 @@ static int change_max_wordsize (char *new_size)
|
||||||
|
|
||||||
/* Give user a final warning about large word sizes */
|
/* Give user a final warning about large word sizes */
|
||||||
if (maxwordsz > STANDARD_MAXWORD && language != DtSrLaDEU && !quiet_mode)
|
if (maxwordsz > STANDARD_MAXWORD && language != DtSrLaDEU && !quiet_mode)
|
||||||
printf (catgets (dtsearch_catd, MS_initausd, 10,
|
printf ("%s", catgets (dtsearch_catd, MS_initausd, 10,
|
||||||
PROGNAME" Specifying large maximum word sizes may "
|
PROGNAME" Specifying large maximum word sizes may "
|
||||||
"significantly\n increase storage requirements.\n"));
|
"significantly\n increase storage requirements.\n"));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -262,7 +262,7 @@ static int change_min_wordsize (char *new_size)
|
||||||
|
|
||||||
/* give user a warning about short word sizes */
|
/* give user a warning about short word sizes */
|
||||||
if (minwordsz < DEFAULT_MINWORD)
|
if (minwordsz < DEFAULT_MINWORD)
|
||||||
printf (catgets (dtsearch_catd, MS_initausd, 9,
|
printf ("%s", catgets (dtsearch_catd, MS_initausd, 9,
|
||||||
PROGNAME " Specifying small minimum word sizes"
|
PROGNAME " Specifying small minimum word sizes"
|
||||||
" may require extensive\n"
|
" may require extensive\n"
|
||||||
" editing of stopword file to prevent significantly\n"
|
" editing of stopword file to prevent significantly\n"
|
||||||
|
@ -800,7 +800,7 @@ DBD_OKAY:
|
||||||
printf ("060*** fillnew dbrec.\n");
|
printf ("060*** fillnew dbrec.\n");
|
||||||
d_fillnew (OR_DBREC, &dbrec, 0);
|
d_fillnew (OR_DBREC, &dbrec, 0);
|
||||||
if (db_status != S_OKAY) {
|
if (db_status != S_OKAY) {
|
||||||
printf (catgets (dtsearch_catd, MS_initausd, 509,
|
printf ("%s", catgets (dtsearch_catd, MS_initausd, 509,
|
||||||
PROGNAME "509 Could not initialize database header record.\n"));
|
PROGNAME "509 Could not initialize database header record.\n"));
|
||||||
puts (vista_msg (PROGNAME "510"));
|
puts (vista_msg (PROGNAME "510"));
|
||||||
DtSearchExit (3);
|
DtSearchExit (3);
|
||||||
|
|
|
@ -112,7 +112,7 @@ void print_dbrec (char *dbname, struct or_dbrec * dbrec)
|
||||||
"Maximum object key size (sizeof(objkey)) is %ld bytes.\n"),
|
"Maximum object key size (sizeof(objkey)) is %ld bytes.\n"),
|
||||||
DtSrMAX_DB_KEYSIZE);
|
DtSrMAX_DB_KEYSIZE);
|
||||||
if (ORD_USEHUGEKEYS & dbrec->or_dbflags)
|
if (ORD_USEHUGEKEYS & dbrec->or_dbflags)
|
||||||
printf (catgets (dtsearch_catd, MS_dbrec, 4,
|
printf ("%s", catgets (dtsearch_catd, MS_dbrec, 4,
|
||||||
"Optional 'Huge' keys enabled.\n"));
|
"Optional 'Huge' keys enabled.\n"));
|
||||||
|
|
||||||
printf (catgets (dtsearch_catd, MS_dbrec, 12,
|
printf (catgets (dtsearch_catd, MS_dbrec, 12,
|
||||||
|
|
|
@ -339,7 +339,7 @@ void open_outfile ()
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 3,
|
printf ( catgets(dtsearch_catd, MS_chandel, 3,
|
||||||
"Output file '%s' already exists.\n") ,
|
"Output file '%s' already exists.\n") ,
|
||||||
outfile);
|
outfile);
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 4,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 4,
|
||||||
"Append, overwrite, or quit? [a,o,q] ") );
|
"Append, overwrite, or quit? [a,o,q] ") );
|
||||||
i = tolower (getchar ());
|
i = tolower (getchar ());
|
||||||
|
|
||||||
|
@ -1366,17 +1366,17 @@ BAD_ABSTR:
|
||||||
/*---- Process tables, and check for identifiers referenced ----*/
|
/*---- Process tables, and check for identifiers referenced ----*/
|
||||||
if (!top_defined && !bot_defined) {
|
if (!top_defined && !bot_defined) {
|
||||||
bad_profile = TRUE;
|
bad_profile = TRUE;
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 49,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 49,
|
||||||
"Error - delimiter not defined.\n") );
|
"Error - delimiter not defined.\n") );
|
||||||
}
|
}
|
||||||
if (!key_defined) {
|
if (!key_defined) {
|
||||||
bad_profile = TRUE;
|
bad_profile = TRUE;
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 50,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 50,
|
||||||
"Error - key-type character never defined.\n") );
|
"Error - key-type character never defined.\n") );
|
||||||
}
|
}
|
||||||
if (!key_pos_defined) {
|
if (!key_pos_defined) {
|
||||||
bad_profile = TRUE;
|
bad_profile = TRUE;
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 51,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 51,
|
||||||
"Error - key never defined.\n") );
|
"Error - key never defined.\n") );
|
||||||
}
|
}
|
||||||
if (bad_profile)
|
if (bad_profile)
|
||||||
|
@ -2223,7 +2223,7 @@ static void user_arg_processor (int argc, char **argv)
|
||||||
|
|
||||||
case 'w':
|
case 'w':
|
||||||
if ((screen_width = atoi (argptr + 2)) == 0) {
|
if ((screen_width = atoi (argptr + 2)) == 0) {
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 72,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 72,
|
||||||
"Invalid screen width specified.\n") );
|
"Invalid screen width specified.\n") );
|
||||||
bad_parm = TRUE;
|
bad_parm = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -2255,7 +2255,7 @@ static void user_arg_processor (int argc, char **argv)
|
||||||
} /*--while--*/
|
} /*--while--*/
|
||||||
|
|
||||||
if (argc-- <= 0) {
|
if (argc-- <= 0) {
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 77,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 77,
|
||||||
"Missing required profile-file name.\n") );
|
"Missing required profile-file name.\n") );
|
||||||
bad_parm = TRUE;
|
bad_parm = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -2272,7 +2272,7 @@ static void user_arg_processor (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc-- <= 0) {
|
if (argc-- <= 0) {
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 78,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 78,
|
||||||
"Missing required input-file name.\n") );
|
"Missing required input-file name.\n") );
|
||||||
bad_parm = TRUE;
|
bad_parm = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -2290,7 +2290,7 @@ static void user_arg_processor (int argc, char **argv)
|
||||||
strcat(outfile,EXT_FZKEY);
|
strcat(outfile,EXT_FZKEY);
|
||||||
*****************/
|
*****************/
|
||||||
if (strcmp (infile, "-") == 0) {
|
if (strcmp (infile, "-") == 0) {
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 79, "Error - using "
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 79, "Error - using "
|
||||||
"stdin as input, output filename is required!\n") );
|
"stdin as input, output filename is required!\n") );
|
||||||
exit (FILE_ERROR);
|
exit (FILE_ERROR);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2341,13 +2341,13 @@ static void user_arg_processor (int argc, char **argv)
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 83,
|
printf ( catgets(dtsearch_catd, MS_chandel, 83,
|
||||||
" Profile file: %s\n") , profile);
|
" Profile file: %s\n") , profile);
|
||||||
if (strcmp (infile, "-") == 0)
|
if (strcmp (infile, "-") == 0)
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 84,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 84,
|
||||||
" Input file: stdin\n") );
|
" Input file: stdin\n") );
|
||||||
else
|
else
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 85,
|
printf ( catgets(dtsearch_catd, MS_chandel, 85,
|
||||||
" Input file: %s\n") , infile);
|
" Input file: %s\n") , infile);
|
||||||
if (strcmp (outfile, "-") == 0)
|
if (strcmp (outfile, "-") == 0)
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 86,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 86,
|
||||||
" Output file: stdout\n") );
|
" Output file: stdout\n") );
|
||||||
else
|
else
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 87,
|
printf ( catgets(dtsearch_catd, MS_chandel, 87,
|
||||||
|
@ -2405,13 +2405,13 @@ int main (int argc, char **argv)
|
||||||
oops = fclose (outstream);
|
oops = fclose (outstream);
|
||||||
fclose (instream);
|
fclose (instream);
|
||||||
if (oops < 0) {
|
if (oops < 0) {
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 90,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 90,
|
||||||
"\nError closing output file - disk full?\n") );
|
"\nError closing output file - disk full?\n") );
|
||||||
exit (FILE_ERROR);
|
exit (FILE_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf ( catgets(dtsearch_catd, MS_chandel, 91,
|
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 91,
|
||||||
"Quitting due to errors in profile file.\n") );
|
"Quitting due to errors in profile file.\n") );
|
||||||
exit (BAD_PROFILE);
|
exit (BAD_PROFILE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,14 +265,14 @@ static int build_tree (void)
|
||||||
* tree level, quit.
|
* tree level, quit.
|
||||||
*/
|
*/
|
||||||
if (hctree1[i].sort > MAX_BITLEN) {
|
if (hctree1[i].sort > MAX_BITLEN) {
|
||||||
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 30,
|
fprintf (stderr, "%s", catgets(dtsearch_catd, MS_huff, 30,
|
||||||
"\n183 Bit strings have grown too large. You probably "
|
"\n183 Bit strings have grown too large. You probably "
|
||||||
"have literals\n turned off with grossly unbalanced "
|
"have literals\n turned off with grossly unbalanced "
|
||||||
"character counts.\n\7"));
|
"character counts.\n\7"));
|
||||||
exit (2);
|
exit (2);
|
||||||
}
|
}
|
||||||
if (hctree1[curr].count >= total_count) {
|
if (hctree1[curr].count >= total_count) {
|
||||||
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 31,
|
fprintf (stderr, "%s", catgets(dtsearch_catd, MS_huff, 31,
|
||||||
"\n191 Programming Error: Still trying to build\n"
|
"\n191 Programming Error: Still trying to build\n"
|
||||||
" Huffman Code Tree after root created.\n\7"));
|
" Huffman Code Tree after root created.\n\7"));
|
||||||
exit (2);
|
exit (2);
|
||||||
|
@ -583,7 +583,7 @@ static void huffman_code (time_t idstamp)
|
||||||
bit_string + 1, /* hop over LAST_BIT */
|
bit_string + 1, /* hop over LAST_BIT */
|
||||||
hctree1[i].count,
|
hctree1[i].count,
|
||||||
char_label (i));
|
char_label (i));
|
||||||
fprintf (outstream_huf, sprintbuf);
|
fprintf (outstream_huf, "%s", sprintbuf);
|
||||||
|
|
||||||
} /* end forloop printing out each tree base entry */
|
} /* end forloop printing out each tree base entry */
|
||||||
|
|
||||||
|
@ -669,7 +669,7 @@ static void user_args_processor (int argc, char **argv)
|
||||||
|
|
||||||
/* test for required tree file name */
|
/* test for required tree file name */
|
||||||
if (argc <= 0) {
|
if (argc <= 0) {
|
||||||
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 37,
|
fprintf (stderr, "%s", catgets(dtsearch_catd, MS_huff, 37,
|
||||||
"576 Missing Huffman Code file names prefix.\n"));
|
"576 Missing Huffman Code file names prefix.\n"));
|
||||||
print_usage ();
|
print_usage ();
|
||||||
exit (2);
|
exit (2);
|
||||||
|
@ -735,7 +735,7 @@ int main (int argc, char *argv[])
|
||||||
/* initialize tree table, using the table file if it exists */
|
/* initialize tree table, using the table file if it exists */
|
||||||
init_treebase ();
|
init_treebase ();
|
||||||
if (total_count == 0L)
|
if (total_count == 0L)
|
||||||
printf (catgets(dtsearch_catd, MS_huff, 41,
|
printf ("%s", catgets(dtsearch_catd, MS_huff, 41,
|
||||||
"Huffman Code Tables will be newly created.\n"));
|
"Huffman Code Tables will be newly created.\n"));
|
||||||
else
|
else
|
||||||
printf (catgets(dtsearch_catd, MS_huff, 42,
|
printf (catgets(dtsearch_catd, MS_huff, 42,
|
||||||
|
|
|
@ -196,7 +196,7 @@ static int change_database (char *newname)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* If browsing, tell user his options */
|
/* If browsing, tell user his options */
|
||||||
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 5,
|
fprintf (aa_stderr, "%s", catgets(dtsearch_catd, MS_tomita, 5,
|
||||||
"Available choices are:") );
|
"Available choices are:") );
|
||||||
for (db = usrblk.dblist; db != NULL; db = db->link)
|
for (db = usrblk.dblist; db != NULL; db = db->link)
|
||||||
fprintf (aa_stderr, " '%s'", db->name);
|
fprintf (aa_stderr, " '%s'", db->name);
|
||||||
|
@ -422,7 +422,7 @@ static int browser (void)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf (catgets(dtsearch_catd, MS_tomita, 16, "...what?\n"));
|
printf ("%s", catgets(dtsearch_catd, MS_tomita, 16, "...what?\n"));
|
||||||
continue;
|
continue;
|
||||||
} /* end switch */
|
} /* end switch */
|
||||||
|
|
||||||
|
@ -471,7 +471,7 @@ DISPLAY_RECORD:
|
||||||
if (pausing && *ptr == '\n') {
|
if (pausing && *ptr == '\n') {
|
||||||
if (++pause_counter >= PAUSE_ROWS) {
|
if (++pause_counter >= PAUSE_ROWS) {
|
||||||
/* Msg 21 is used in two places */
|
/* Msg 21 is used in two places */
|
||||||
printf ( catgets(dtsearch_catd, MS_tomita, 21,
|
printf ( "%s", catgets(dtsearch_catd, MS_tomita, 21,
|
||||||
"\n...push ENTER to continue... ") );
|
"\n...push ENTER to continue... ") );
|
||||||
|
|
||||||
*userbuf = '\0';
|
*userbuf = '\0';
|
||||||
|
@ -500,7 +500,7 @@ DISPLAY_RECORD:
|
||||||
if (pausing && *ptr == '\n')
|
if (pausing && *ptr == '\n')
|
||||||
if (++pause_counter >= PAUSE_ROWS) {
|
if (++pause_counter >= PAUSE_ROWS) {
|
||||||
/* Msg 21 is used in two places */
|
/* Msg 21 is used in two places */
|
||||||
printf ( catgets(dtsearch_catd, MS_tomita, 21,
|
printf ( "%s", catgets(dtsearch_catd, MS_tomita, 21,
|
||||||
"\n...push ENTER to continue... ") );
|
"\n...push ENTER to continue... ") );
|
||||||
|
|
||||||
*userbuf = '\0';
|
*userbuf = '\0';
|
||||||
|
@ -920,7 +920,7 @@ BAD_ARGS:
|
||||||
|
|
||||||
usrblk.request = OE_SHUTDOWN;
|
usrblk.request = OE_SHUTDOWN;
|
||||||
Opera_Engine ();
|
Opera_Engine ();
|
||||||
printf ( catgets(dtsearch_catd, MS_tomita, 36,
|
printf ( "%s", catgets(dtsearch_catd, MS_tomita, 36,
|
||||||
"Normal engine shutdown.\n") );
|
"Normal engine shutdown.\n") );
|
||||||
DtSearchExit (0);
|
DtSearchExit (0);
|
||||||
} /* main() */
|
} /* main() */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue