Commit 115b6df5 authored by deuce's avatar deuce
Browse files

Fix sprintf() type warnings/errors.

parent 62e52288
......@@ -315,7 +315,7 @@ channel name.
k=0;
sprintf(opt[k++],"%-27.27s%s","Name",cfg.chan[i]->name);
sprintf(opt[k++],"%-27.27s%s","Internal Code",cfg.chan[i]->code);
sprintf(opt[k++],"%-27.27s%lu","Cost in Credits",cfg.chan[i]->cost);
sprintf(opt[k++],"%-27.27s%"PRIu32,"Cost in Credits",cfg.chan[i]->cost);
sprintf(opt[k++],"%-27.27s%.40s","Access Requirements"
,cfg.chan[i]->arstr);
sprintf(opt[k++],"%-27.27s%s","Password Protection"
......
......@@ -34,6 +34,7 @@
****************************************************************************/
#include "scfg.h"
#include "strwrap.h" /* itoa() */
char *utos(char *str)
{
......@@ -503,7 +504,7 @@ export the current message group into.
,cfg.sub[j]->post_arstr
,cfg.sub[j]->op_arstr
);
fprintf(stream,"%lX\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n"
fprintf(stream,"%"PRIX32"\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n"
,cfg.sub[j]->misc
,cfg.sub[j]->tagline
,cfg.sub[j]->origline
......@@ -511,7 +512,7 @@ export the current message group into.
,cfg.sub[j]->newsgroup
,smb_faddrtoa(&cfg.sub[j]->faddr,tmp)
);
fprintf(stream,"%lu\r\n%lu\r\n%u\r\n%u\r\n%s\r\n"
fprintf(stream,"%"PRIu32"\r\n%"PRIu32"\r\n%u\r\n%u\r\n%s\r\n"
,cfg.sub[j]->maxmsgs
,cfg.sub[j]->maxcrcs
,cfg.sub[j]->maxage
......@@ -780,7 +781,7 @@ void msg_opts()
sprintf(opt[i++],"%-33.33s%u seconds"
,"Maximum Retry Time",cfg.smb_retry_time);
if(cfg.max_qwkmsgs)
sprintf(str,"%lu",cfg.max_qwkmsgs);
sprintf(str,"%"PRIu32,cfg.max_qwkmsgs);
else
sprintf(str,"Unlimited");
sprintf(opt[i++],"%-33.33s%s"
......@@ -803,7 +804,7 @@ void msg_opts()
strcpy(str,"Daily");
sprintf(opt[i++],"%-33.33s%s","Purge Deleted E-mail",str);
if(cfg.mail_maxcrcs)
sprintf(str,"Enabled (%lu mail CRCs)",cfg.mail_maxcrcs);
sprintf(str,"Enabled (%"PRIu32" mail CRCs)",cfg.mail_maxcrcs);
else
strcpy(str,"Disabled");
sprintf(opt[i++],"%-33.33s%s","Duplicate E-mail Checking",str);
......@@ -1177,7 +1178,7 @@ day.
}
break;
case 8:
sprintf(str,"%lu",cfg.mail_maxcrcs);
sprintf(str,"%"PRIu32,cfg.mail_maxcrcs);
SETHELP(WHERE);
/*
`Maximum Number of Mail CRCs:`
......
......@@ -295,7 +295,7 @@ outgoing network packets and must be accurate.
sprintf(opt[i++],"%-27.27s%s"
,"Kill NetMail After Sent"
,cfg.netmail_misc&NMAIL_KILL ? "Yes":"No");
sprintf(opt[i++],"%-27.27s%lu"
sprintf(opt[i++],"%-27.27s%"PRIu32
,"Cost to Send NetMail",cfg.netmail_cost);
opt[i][0]=0;
SETHELP(WHERE);
......@@ -666,7 +666,7 @@ If you want the sending of NetMail to be free, set this value to `0`.
i=0;
strcpy(opt[i++],"Network Hubs...");
sprintf(opt[i++],"%-20.20s%-12s","Site Name",cfg.sys_psname);
sprintf(opt[i++],"%-20.20s%-lu","Site Number",cfg.sys_psnum);
sprintf(opt[i++],"%-20.20s%-"PRIu32,"Site Number",cfg.sys_psnum);
opt[i][0]=0;
SETHELP(WHERE);
/*
......@@ -808,7 +808,7 @@ This is the Site Name of this hub. It is used for only for reference.
sprintf(opt[i++],"%-27.27s%s"
,"Send E-mail Using Alias"
,cfg.inetmail_misc&NMAIL_ALIAS ? "Yes":"No");
sprintf(opt[i++],"%-27.27s%lu"
sprintf(opt[i++],"%-27.27s%"PRIu32
,"Cost to Send E-mail",cfg.inetmail_cost);
opt[i][0]=0;
SETHELP(WHERE);
......
......@@ -263,7 +263,7 @@ If you want to delete all the messages for this sub-board, select `Yes`.
,cfg.sub[i]->op_arstr);
sprintf(opt[n++],"%-27.27s%.40s","Moderated Posting User"
,cfg.sub[i]->mod_arstr);
sprintf(opt[n++],"%-27.27s%lu","Maximum Messages"
sprintf(opt[n++],"%-27.27s%"PRIu32,"Maximum Messages"
,cfg.sub[i]->maxmsgs);
if(cfg.sub[i]->maxage)
sprintf(str,"Enabled (%u days old)",cfg.sub[i]->maxage);
......@@ -271,7 +271,7 @@ If you want to delete all the messages for this sub-board, select `Yes`.
strcpy(str,"Disabled");
sprintf(opt[n++],"%-27.27s%s","Purge by Age",str);
if(cfg.sub[i]->maxcrcs)
sprintf(str,"Enabled (%lu message CRCs)",cfg.sub[i]->maxcrcs);
sprintf(str,"Enabled (%"PRIu32" message CRCs)",cfg.sub[i]->maxcrcs);
else
strcpy(str,"Disabled");
sprintf(opt[n++],"%-27.27s%s","Duplicate Checking",str);
......@@ -384,7 +384,7 @@ sub-board's name and group name.
getar(str,cfg.sub[i]->mod_arstr);
break;
case 10:
sprintf(str,"%lu",cfg.sub[i]->maxmsgs);
sprintf(str,"%"PRIu32,cfg.sub[i]->maxmsgs);
SETHELP(WHERE);
/*
`Maximum Number of Messages:`
......@@ -414,7 +414,7 @@ the sub-board.
cfg.sub[i]->misc|=SUB_HDRMOD;
break;
case 12:
sprintf(str,"%lu",cfg.sub[i]->maxcrcs);
sprintf(str,"%"PRIu32,cfg.sub[i]->maxcrcs);
SETHELP(WHERE);
/*
`Maximum Number of CRCs:`
......
......@@ -1134,7 +1134,7 @@ user.
else
strcpy(str,"None");
sprintf(opt[i++],"%-27.27s%s","Mail Database Backups",str);
sprintf(opt[i++],"%-27.27s%lX","Control Key Pass-through"
sprintf(opt[i++],"%-27.27s%"PRIX32,"Control Key Pass-through"
,cfg.ctrlkey_passthru);
opt[i][0]=0;
SETHELP(WHERE);
......@@ -1312,7 +1312,7 @@ convert credits into minutes. A sysop can add minutes to a user's
account regardless of this maximum. If this value is set to `0`, users
will have no limit on the total number of minutes they can have.
*/
sprintf(str,"%lu",cfg.max_minutes);
sprintf(str,"%"PRIu32,cfg.max_minutes);
uifc.input(WIN_MID|WIN_SAV,0,0
,"Maximum Number of Minutes a User Can Have "
"(0=No Limit)"
......@@ -1414,7 +1414,7 @@ use of a hexadecimal calculator.
If unsure, leave this value set to `0`, the default.
*/
sprintf(str,"%lX",cfg.ctrlkey_passthru);
sprintf(str,"%"PRIX32,cfg.ctrlkey_passthru);
uifc.input(WIN_MID|WIN_SAV,0,0
,"Control Key Pass-through"
,str,8,K_UPPER|K_EDIT);
......@@ -1836,7 +1836,7 @@ user's security values with very few key-strokes.
,ltoaf(cfg.val_rest[i],tmp));
sprintf(opt[j++],"%-22.22s%u days","Extend Expiration"
,cfg.val_expire[i]);
sprintf(opt[j++],"%-22.22s%lu","Additional Credits"
sprintf(opt[j++],"%-22.22s%u","Additional Credits"
,cfg.val_cdt[i]);
opt[j][0]=0;
j=uifc.list(WIN_RHT|WIN_SAV|WIN_ACT,2,1,0,&k,0
......
......@@ -440,7 +440,7 @@ export to.
,cfg.dir[j]->dl_arstr
,cfg.dir[j]->op_arstr
);
fprintf(stream,"%s\r\n%s\r\n%u\r\n%s\r\n%lX\r\n%u\r\n"
fprintf(stream,"%s\r\n%s\r\n%u\r\n%s\r\n%"PRIX32"\r\n%u\r\n"
"%u\r\n"
,cfg.dir[j]->path
,cfg.dir[j]->upload_sem
......@@ -666,7 +666,7 @@ command: `DIR /ON /AD /B > DIRS.RAW`
}
fclose(stream);
uifc.pop(0);
sprintf(str,"%lu File Areas Imported Successfully (%u added)",ported, added);
sprintf(str,"%lu File Areas Imported Successfully (%lu added)",ported, added);
uifc.msg(str);
break;
......
......@@ -904,7 +904,7 @@ online program name.
sprintf(opt[k++],"%-27.27s%.40s","Command Line",cfg.xtrn[i]->cmd);
sprintf(opt[k++],"%-27.27s%.40s","Clean-up Command Line",cfg.xtrn[i]->clean);
if(cfg.xtrn[i]->cost)
sprintf(str,"%lu credits",cfg.xtrn[i]->cost);
sprintf(str,"%"PRIu32" credits",cfg.xtrn[i]->cost);
else
strcpy(str,"None");
sprintf(opt[k++],"%-27.27s%s","Execution Cost",str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment