mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-30 08:19:09 +00:00
Fixed printf format errors.
This commit is contained in:
parent
f69be53719
commit
e13d2860b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37309
@ -96,7 +96,7 @@ char *argv[];
|
||||
{
|
||||
if (count++ % LINE == 0)
|
||||
printf("\n\t");
|
||||
printf("0x%02x,", ('\t' ^ random()) & 0xFF);
|
||||
printf("0x%02lx,", ('\t' ^ random()) & 0xFF);
|
||||
while ((c = getc(infile)) == ' ' && c != EOF);
|
||||
/* Drop the non-whitespace character through */
|
||||
linestart = NO;
|
||||
@ -112,7 +112,7 @@ char *argv[];
|
||||
}
|
||||
if (count++ % LINE == 0)
|
||||
printf("\n\t");
|
||||
printf("0x%02x,", (c ^ random()) & 0xFF);
|
||||
printf("0x%02lx,", (c ^ random()) & 0xFF);
|
||||
}
|
||||
puts("\n\t0\n};");
|
||||
fclose(infile);
|
||||
|
@ -109,8 +109,7 @@ main(ac, av)
|
||||
av++;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unknown option '%c'\n", *ptr,
|
||||
name);
|
||||
fprintf(stderr, "Unknown option '%c'\n", *ptr);
|
||||
f_usage++;
|
||||
break;
|
||||
}
|
||||
|
@ -136,14 +136,14 @@ printuser(pw, printfail)
|
||||
printf("* Losses for %-10s*\n", pw->pw_name);
|
||||
printf("*======================*\n");
|
||||
printf("|Costs Total |\n");
|
||||
printf("| Hands %8d |\n", total.hand);
|
||||
printf("| Inspections %8d |\n", total.inspection);
|
||||
printf("| Games %8d |\n", total.game);
|
||||
printf("| Runs %8d |\n", total.runs);
|
||||
printf("| Information %8d |\n", total.information);
|
||||
printf("| Think time %8d |\n", total.thinktime);
|
||||
printf("|Total Costs %8d |\n", total.wins - total.worth);
|
||||
printf("|Winnings %8d |\n", total.wins);
|
||||
printf("|Net Worth %8d |\n", total.worth);
|
||||
printf("| Hands %8ld |\n", total.hand);
|
||||
printf("| Inspections %8ld |\n", total.inspection);
|
||||
printf("| Games %8ld |\n", total.game);
|
||||
printf("| Runs %8ld |\n", total.runs);
|
||||
printf("| Information %8ld |\n", total.information);
|
||||
printf("| Think time %8ld |\n", total.thinktime);
|
||||
printf("|Total Costs %8ld |\n", total.wins - total.worth);
|
||||
printf("|Winnings %8ld |\n", total.wins);
|
||||
printf("|Net Worth %8ld |\n", total.worth);
|
||||
printf("*----------------------*\n\n");
|
||||
}
|
||||
|
@ -130,11 +130,11 @@ mailbill()
|
||||
exit(0);
|
||||
while (*cp != NULL) {
|
||||
if (*cp[0] == '1') {
|
||||
sprintf(buf, "\n%d gold pieces back with you from your journey. As the",
|
||||
sprintf(buf, "\n%ld gold pieces back with you from your journey. As the",
|
||||
(long)c[GOLD]);
|
||||
write(fd, buf, strlen(buf));
|
||||
} else if (*cp[0] == '2') {
|
||||
sprintf(buf, "\nin preparing your tax bill. You owe %d gold pieces as", (long)c[GOLD]*TAXRATE);
|
||||
sprintf(buf, "\nin preparing your tax bill. You owe %ld gold pieces as", (long)c[GOLD]*TAXRATE);
|
||||
write(fd, buf, strlen(buf));
|
||||
} else
|
||||
write(fd, *cp, strlen(*cp));
|
||||
|
@ -256,7 +256,7 @@ primes(start, stop)
|
||||
for (p = &prime[0], factor = prime[0];
|
||||
factor < stop && p <= pr_limit; factor = *(++p)) {
|
||||
if (factor >= start) {
|
||||
printf("%u\n", factor);
|
||||
printf("%lu\n", factor);
|
||||
}
|
||||
}
|
||||
/* return early if we are done */
|
||||
@ -319,7 +319,7 @@ primes(start, stop)
|
||||
*/
|
||||
for (q = table; q < tab_lim; ++q, start+=2) {
|
||||
if (*q) {
|
||||
printf("%u\n", start);
|
||||
printf("%lu\n", start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -180,5 +180,6 @@ show_score()
|
||||
inf = 1;
|
||||
for (scp = Top; scp < &Top[MAXSCORES]; scp++)
|
||||
if (scp->s_score >= 0)
|
||||
printf("%d\t%d\t%.*s\n", inf++, scp->s_score, sizeof scp->s_name, scp->s_name);
|
||||
printf("%d\t%d\t%.*s\n", inf++, scp->s_score,
|
||||
(int)sizeof(scp->s_name), scp->s_name);
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ object *monster;
|
||||
}
|
||||
}
|
||||
}
|
||||
sprintf(buf, "%2d %6d %s: ", rank+1, rogue.gold, login_name);
|
||||
sprintf(buf, "%2d %6ld %s: ", rank+1, rogue.gold, login_name);
|
||||
|
||||
if (other) {
|
||||
switch(other) {
|
||||
|
@ -116,8 +116,9 @@ double speed;
|
||||
evtime = Now.eventptr[E_LRTB]->date - Now.date;
|
||||
# ifdef xTRACE
|
||||
if (Trace)
|
||||
printf("E.ep = %u, ->evcode = %d, ->date = %.2f, evtime = %.2f\n",
|
||||
Now.eventptr[E_LRTB], Now.eventptr[E_LRTB]->evcode,
|
||||
printf("E.ep = %p, ->evcode = %d, ->date = %.2f, evtime = %.2f\n",
|
||||
(void *)Now.eventptr[E_LRTB],
|
||||
Now.eventptr[E_LRTB]->evcode,
|
||||
Now.eventptr[E_LRTB]->date, evtime);
|
||||
# endif
|
||||
if (time > evtime && Etc.nkling < 3)
|
||||
|
Loading…
Reference in New Issue
Block a user