From b4339b74aded4c38ebcfe3a2a9b37b900abb8874 Mon Sep 17 00:00:00 2001 From: dwmalone Date: Wed, 4 Sep 2002 23:29:10 +0000 Subject: ANSIify function definitions. Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5 --- usr.bin/tput/tput.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'usr.bin/tput') diff --git a/usr.bin/tput/tput.c b/usr.bin/tput/tput.c index 99bb903..a74e36a 100644 --- a/usr.bin/tput/tput.c +++ b/usr.bin/tput/tput.c @@ -62,9 +62,7 @@ static void usage(void); static char **process(const char *, char *, char **); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { int ch, exitval, n; char *cptr, *term, buf[1024], tbuf[1024]; @@ -120,8 +118,7 @@ errx(2, "no terminal type specified and no TERM environmental variable."); } static void -prlongname(buf) - char *buf; +prlongname(char *buf) { int savech; char *p, *savep; @@ -134,9 +131,7 @@ prlongname(buf) } static char ** -process(cap, str, argv) - const char *cap; - char *str, **argv; +process(const char *cap, char *str, char **argv) { static const char errfew[] = "not enough arguments (%d) for capability `%s'"; @@ -211,7 +206,7 @@ process(cap, str, argv) } static void -usage() +usage(void) { (void)fprintf(stderr, "usage: tput [-T term] attribute ...\n"); exit(2); -- cgit v1.1