summaryrefslogtreecommitdiffstats
path: root/usr.bin/tput
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-09-04 23:29:10 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-09-04 23:29:10 +0000
commitb4339b74aded4c38ebcfe3a2a9b37b900abb8874 (patch)
treefb230419005f211ecea1e667385bde9886dbf0d8 /usr.bin/tput
parent228b93ce829543fee06561687a63c17a7e821dfd (diff)
downloadFreeBSD-src-b4339b74aded4c38ebcfe3a2a9b37b900abb8874.zip
FreeBSD-src-b4339b74aded4c38ebcfe3a2a9b37b900abb8874.tar.gz
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
Diffstat (limited to 'usr.bin/tput')
-rw-r--r--usr.bin/tput/tput.c13
1 files changed, 4 insertions, 9 deletions
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);
OpenPOWER on IntegriCloud