-/* $NetBSD: caesar.c,v 1.22 2008/07/20 01:03:21 lukem Exp $ */
+/* $NetBSD: caesar.c,v 1.23 2021/05/01 20:21:25 rillig Exp $ */
/*
* Copyright (c) 1989, 1993
#if 0
static char sccsid[] = "@(#)caesar.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: caesar.c,v 1.22 2008/07/20 01:03:21 lukem Exp $");
+__RCSID("$NetBSD: caesar.c,v 1.23 2021/05/01 20:21:25 rillig Exp $");
#endif
#endif /* not lint */
static void
-init_rottbl(int rot)
+init_rottbl(unsigned int rot)
{
size_t i;
}
}
-static int
+static unsigned int
get_rotation(const char *arg)
{
long rot;
errno = ERANGE;
if (errno)
err(EXIT_FAILURE, "Bad rotation value `%s'", arg);
- return (int)rot;
+ return (unsigned int)rot;
}
static void
unsigned int obs[NCHARS];
size_t i, nread;
double dot, winnerdot;
- int try, winner;
+ unsigned int try, winner;
int ch;
/* adjust frequency table to weight low probs REAL low */