summaryrefslogtreecommitdiffstats
path: root/usr.bin/jot
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-06-15 11:26:25 +0000
committerjmallett <jmallett@FreeBSD.org>2002-06-15 11:26:25 +0000
commitfe733a8c21922843836af1c5fbd33d45be52dd6b (patch)
tree326c1f444529fa1528561de64522618c3a65b85e /usr.bin/jot
parentc492727786902abdde5e237dbc08484f2e0c903e (diff)
downloadFreeBSD-src-fe733a8c21922843836af1c5fbd33d45be52dd6b.zip
FreeBSD-src-fe733a8c21922843836af1c5fbd33d45be52dd6b.tar.gz
Protoize. Remove un-needed cast to char in switch of getopt(3)'s return value.
FBSDID.
Diffstat (limited to 'usr.bin/jot')
-rw-r--r--usr.bin/jot/jot.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c
index 86f8023..60125c5 100644
--- a/usr.bin/jot/jot.c
+++ b/usr.bin/jot/jot.c
@@ -41,9 +41,10 @@ static const char copyright[] =
#if 0
static char sccsid[] = "@(#)jot.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
+#endif
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* jot - print sequential or random data
@@ -90,9 +91,7 @@ int putdata(double, long);
static void usage(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char **argv)
{
double xd, yd;
long id;
@@ -104,7 +103,7 @@ main(argc, argv)
int ch;
while ((ch = getopt(argc, argv, "rb:w:cs:np:")) != -1)
- switch ((char)ch) {
+ switch (ch) {
case 'r':
randomize = 1;
break;
@@ -291,9 +290,7 @@ main(argc, argv)
}
int
-putdata(x, notlast)
- double x;
- long notlast;
+putdata(double x, long int notlast)
{
if (boring)
@@ -328,7 +325,7 @@ putdata(x, notlast)
}
static void
-usage()
+usage(void)
{
fprintf(stderr, "%s\n%s\n",
"usage: jot [-cnr] [-b word] [-w word] [-s string] [-p precision]",
@@ -337,8 +334,7 @@ usage()
}
int
-getprec(str)
- char *str;
+getprec(char *str)
{
char *p;
char *q;
@@ -355,7 +351,7 @@ getprec(str)
}
void
-getformat()
+getformat(void)
{
char *p, *p2;
int dot, hash, space, sign, numbers = 0;
OpenPOWER on IntegriCloud