|
Lines 401-407
Link Here
|
| 401 |
register int i, percent; |
401 |
register int i, percent; |
| 402 |
register char *sp; |
402 |
register char *sp; |
| 403 |
|
403 |
|
| 404 |
if (file_cnt == 0) |
404 |
if (file_cnt == 0) { |
| 405 |
if (Find_files) { |
405 |
if (Find_files) { |
| 406 |
Fortunes_only = TRUE; |
406 |
Fortunes_only = TRUE; |
| 407 |
i = add_file(NO_PROB, FORTDIR, NULL, &File_list, |
407 |
i = add_file(NO_PROB, FORTDIR, NULL, &File_list, |
|
Lines 411-416
Link Here
|
| 411 |
} else |
411 |
} else |
| 412 |
return add_file(NO_PROB, "fortunes", FORTDIR, |
412 |
return add_file(NO_PROB, "fortunes", FORTDIR, |
| 413 |
&File_list, &File_tail, NULL); |
413 |
&File_list, &File_tail, NULL); |
|
|
414 |
} |
| 414 |
for (i = 0; i < file_cnt; i++) { |
415 |
for (i = 0; i < file_cnt; i++) { |
| 415 |
percent = NO_PROB; |
416 |
percent = NO_PROB; |
| 416 |
if (!isdigit((unsigned char)files[i][0])) |
417 |
if (!isdigit((unsigned char)files[i][0])) |
|
Lines 918-924
Link Here
|
| 918 |
exit(1); |
919 |
exit(1); |
| 919 |
} |
920 |
} |
| 920 |
percent = 100 - percent; |
921 |
percent = 100 - percent; |
| 921 |
if (Equal_probs) |
922 |
if (Equal_probs) { |
| 922 |
if (num_noprob != 0) { |
923 |
if (num_noprob != 0) { |
| 923 |
if (num_noprob > 1) { |
924 |
if (num_noprob > 1) { |
| 924 |
frac = percent / num_noprob; |
925 |
frac = percent / num_noprob; |
|
Lines 932-937
Link Here
|
| 932 |
last->percent = percent; |
933 |
last->percent = percent; |
| 933 |
DPRINTF(1, (stderr, ", residual = %d%%", percent)); |
934 |
DPRINTF(1, (stderr, ", residual = %d%%", percent)); |
| 934 |
} |
935 |
} |
|
|
936 |
} |
| 935 |
else { |
937 |
else { |
| 936 |
DPRINTF(1, (stderr, |
938 |
DPRINTF(1, (stderr, |
| 937 |
", %d%% distributed over remaining fortunes\n", |
939 |
", %d%% distributed over remaining fortunes\n", |