aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tset
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2009-12-11 23:30:22 +0000
committerXin LI <delphij@FreeBSD.org>2009-12-11 23:30:22 +0000
commite87862f53a119884d2103da7ba52cf7d14426803 (patch)
treeaefcfd0dd28d25d858a8736b71b6e416b65f8925 /usr.bin/tset
parent3daadfc83361cf4f31017a7fed5a5910cd8c4ce9 (diff)
downloadsrc-e87862f53a119884d2103da7ba52cf7d14426803.tar.gz
src-e87862f53a119884d2103da7ba52cf7d14426803.zip
Remove unnecessary termcap.h includes inherited from extern.h and other
unneeded headers. While I'm there, make function definations ANSI prototypes.
Notes
Notes: svn path=/head/; revision=200419
Diffstat (limited to 'usr.bin/tset')
-rw-r--r--usr.bin/tset/extern.h2
-rw-r--r--usr.bin/tset/map.c10
-rw-r--r--usr.bin/tset/misc.c8
-rw-r--r--usr.bin/tset/set.c12
-rw-r--r--usr.bin/tset/term.c7
-rw-r--r--usr.bin/tset/tset.c1
-rw-r--r--usr.bin/tset/wrterm.c3
7 files changed, 16 insertions, 27 deletions
diff --git a/usr.bin/tset/extern.h b/usr.bin/tset/extern.h
index f02d0c50bd56..8ec3f20b285a 100644
--- a/usr.bin/tset/extern.h
+++ b/usr.bin/tset/extern.h
@@ -34,8 +34,6 @@
* $FreeBSD$
*/
-#include <termcap.h>
-
extern struct termios mode, oldmode;
extern int Columns, isreset, Lines;
extern int erasech, intrchar, killch;
diff --git a/usr.bin/tset/map.c b/usr.bin/tset/map.c
index d3db6b67e707..80a894f70f6f 100644
--- a/usr.bin/tset/map.c
+++ b/usr.bin/tset/map.c
@@ -75,9 +75,7 @@ MAP *cur, *maplist;
* The baud rate tests are: >, <, @, =, !
*/
void
-add_mapping(port, arg)
- const char *port;
- char *arg;
+add_mapping(const char *port, char *arg)
{
MAP *mapp;
char *copy, *p, *termp;
@@ -190,8 +188,7 @@ badmopt: errx(1, "illegal -m option format: %s", copy);
* 'type'.
*/
const char *
-mapped(type)
- const char *type;
+mapped(const char *type)
{
MAP *mapp;
int match;
@@ -240,8 +237,7 @@ SPEEDS speeds[] = {
};
speed_t
-tset_baudrate(rate)
- char *rate;
+tset_baudrate(char *rate)
{
SPEEDS *sp;
speed_t speed;
diff --git a/usr.bin/tset/misc.c b/usr.bin/tset/misc.c
index 52358e75a14c..16e0e1e00821 100644
--- a/usr.bin/tset/misc.c
+++ b/usr.bin/tset/misc.c
@@ -42,15 +42,12 @@ static const char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/9/93";
#include <err.h>
#include <fcntl.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <unistd.h>
#include "extern.h"
void
-cat(file)
- char *file;
+cat(char *file)
{
register int fd, nr, nw;
char buf[1024];
@@ -67,8 +64,7 @@ cat(file)
}
int
-outc(c)
- int c;
+outc(int c)
{
return putc(c, stderr);
}
diff --git a/usr.bin/tset/set.c b/usr.bin/tset/set.c
index 85965b38b991..39a0d960208b 100644
--- a/usr.bin/tset/set.c
+++ b/usr.bin/tset/set.c
@@ -40,6 +40,7 @@ static const char sccsid[] = "@(#)set.c 8.2 (Berkeley) 2/28/94";
#endif
#include <stdio.h>
+#include <termcap.h>
#include <termios.h>
#include <unistd.h>
@@ -54,7 +55,7 @@ int set_tabs(void);
* a child program dies in raw mode.
*/
void
-reset_mode()
+reset_mode(void)
{
tcgetattr(STDERR_FILENO, &mode);
@@ -155,7 +156,7 @@ reset_mode()
* entry and command line and update their values in 'mode'.
*/
void
-set_control_chars()
+set_control_chars(void)
{
char *bp, *p, bs_char, buf[1024];
@@ -192,8 +193,7 @@ set_control_chars()
* uppercase to internal lowercase.
*/
void
-set_conversions(usingupper)
- int usingupper;
+set_conversions(int usingupper)
{
if (tgetflag("UC") || usingupper) {
#ifdef IUCLC
@@ -238,7 +238,7 @@ set_conversions(usingupper)
/* Output startup string. */
void
-set_init()
+set_init(void)
{
char *bp, buf[1024];
int settle;
@@ -282,7 +282,7 @@ set_init()
* Return nonzero if we set any tab stops, zero if not.
*/
int
-set_tabs()
+set_tabs(void)
{
int c;
char *capsp, *clear_tabs;
diff --git a/usr.bin/tset/term.c b/usr.bin/tset/term.c
index 54a349e05f2b..16acb23f6eaf 100644
--- a/usr.bin/tset/term.c
+++ b/usr.bin/tset/term.c
@@ -45,6 +45,7 @@ static const char sccsid[] = "@(#)term.c 8.1 (Berkeley) 6/9/93";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <termcap.h>
#include <unistd.h>
#include <ttyent.h>
#include "extern.h"
@@ -59,8 +60,7 @@ char *ttys(char *);
* its termcap entry.
*/
const char *
-get_termcap_entry(userarg, tcapbufp)
- char *userarg, **tcapbufp;
+get_termcap_entry(char *userarg, char **tcapbufp)
{
struct ttyent *t;
int rval;
@@ -125,8 +125,7 @@ found: if ((p = getenv("TERMCAP")) != NULL && *p != '/')
/* Prompt the user for a terminal type. */
const char *
-askuser(dflt)
- const char *dflt;
+askuser(const char *dflt)
{
static char answer[256];
char *p;
diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c
index dc4c333e2f90..ddcc2dac8ff1 100644
--- a/usr.bin/tset/tset.c
+++ b/usr.bin/tset/tset.c
@@ -53,6 +53,7 @@ static const char sccsid[] = "@(#)tset.c 8.1 (Berkeley) 6/9/93";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <termcap.h>
#include <termios.h>
#include <unistd.h>
diff --git a/usr.bin/tset/wrterm.c b/usr.bin/tset/wrterm.c
index 9d149183e2f2..29b19218a19a 100644
--- a/usr.bin/tset/wrterm.c
+++ b/usr.bin/tset/wrterm.c
@@ -53,8 +53,7 @@ static const char sccsid[] = "@(#)wrterm.c 8.1 (Berkeley) 6/9/93";
* shell problems and omitting empty fields.
*/
void
-wrtermcap(bp)
- char *bp;
+wrtermcap(char *bp)
{
register int ch;
register char *p;