SCCS-vsn: games/factor/factor.c 8.3
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)factor.c 8.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)factor.c 8.3 (Berkeley) %G%";
- (void)printf("%ld:", val);
+ (void)printf("%lu:", val);
for (fact = &prime[0]; val > 1; ++fact) {
/* Look for the smallest factor. */
do {
for (fact = &prime[0]; val > 1; ++fact) {
/* Look for the smallest factor. */
do {
/* Watch for primes larger than the table. */
if (fact > pr_limit) {
/* Watch for primes larger than the table. */
if (fact > pr_limit) {
- (void)printf(" %ld", val);
+ (void)printf(" %lu", val);
break;
}
/* Divide factor out until none are left. */
do {
break;
}
/* Divide factor out until none are left. */
do {
- (void)printf(" %ld", *fact);
+ (void)printf(" %lu", *fact);
val /= (long)*fact;
} while ((val % (long)*fact) == 0);
val /= (long)*fact;
} while ((val % (long)*fact) == 0);