From owner-svn-src-head@FreeBSD.ORG Fri Dec 11 23:30:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FF2C1065676; Fri, 11 Dec 2009 23:30:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E93A8FC0C; Fri, 11 Dec 2009 23:30:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBBNUN4x023573; Fri, 11 Dec 2009 23:30:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBBNUN77023564; Fri, 11 Dec 2009 23:30:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200912112330.nBBNUN77023564@svn.freebsd.org> From: Xin LI Date: Fri, 11 Dec 2009 23:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200419 - head/usr.bin/tset X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 23:30:23 -0000 Author: delphij Date: Fri Dec 11 23:30:22 2009 New Revision: 200419 URL: http://svn.freebsd.org/changeset/base/200419 Log: Remove unnecessary termcap.h includes inherited from extern.h and other unneeded headers. While I'm there, make function definations ANSI prototypes. Modified: head/usr.bin/tset/extern.h head/usr.bin/tset/map.c head/usr.bin/tset/misc.c head/usr.bin/tset/set.c head/usr.bin/tset/term.c head/usr.bin/tset/tset.c head/usr.bin/tset/wrterm.c Modified: head/usr.bin/tset/extern.h ============================================================================== --- head/usr.bin/tset/extern.h Fri Dec 11 23:23:57 2009 (r200418) +++ head/usr.bin/tset/extern.h Fri Dec 11 23:30:22 2009 (r200419) @@ -34,8 +34,6 @@ * $FreeBSD$ */ -#include - extern struct termios mode, oldmode; extern int Columns, isreset, Lines; extern int erasech, intrchar, killch; Modified: head/usr.bin/tset/map.c ============================================================================== --- head/usr.bin/tset/map.c Fri Dec 11 23:23:57 2009 (r200418) +++ head/usr.bin/tset/map.c Fri Dec 11 23:30:22 2009 (r200419) @@ -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 for * '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; Modified: head/usr.bin/tset/misc.c ============================================================================== --- head/usr.bin/tset/misc.c Fri Dec 11 23:23:57 2009 (r200418) +++ head/usr.bin/tset/misc.c Fri Dec 11 23:30:22 2009 (r200419) @@ -42,15 +42,12 @@ static const char sccsid[] = "@(#)misc.c #include #include #include -#include -#include #include #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); } Modified: head/usr.bin/tset/set.c ============================================================================== --- head/usr.bin/tset/set.c Fri Dec 11 23:23:57 2009 (r200418) +++ head/usr.bin/tset/set.c Fri Dec 11 23:30:22 2009 (r200419) @@ -40,6 +40,7 @@ static const char sccsid[] = "@(#)set.c #endif #include +#include #include #include @@ -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; Modified: head/usr.bin/tset/term.c ============================================================================== --- head/usr.bin/tset/term.c Fri Dec 11 23:23:57 2009 (r200418) +++ head/usr.bin/tset/term.c Fri Dec 11 23:30:22 2009 (r200419) @@ -45,6 +45,7 @@ static const char sccsid[] = "@(#)term.c #include #include #include +#include #include #include #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")) != NU /* Prompt the user for a terminal type. */ const char * -askuser(dflt) - const char *dflt; +askuser(const char *dflt) { static char answer[256]; char *p; Modified: head/usr.bin/tset/tset.c ============================================================================== --- head/usr.bin/tset/tset.c Fri Dec 11 23:23:57 2009 (r200418) +++ head/usr.bin/tset/tset.c Fri Dec 11 23:30:22 2009 (r200419) @@ -53,6 +53,7 @@ static const char sccsid[] = "@(#)tset.c #include #include #include +#include #include #include Modified: head/usr.bin/tset/wrterm.c ============================================================================== --- head/usr.bin/tset/wrterm.c Fri Dec 11 23:23:57 2009 (r200418) +++ head/usr.bin/tset/wrterm.c Fri Dec 11 23:30:22 2009 (r200419) @@ -53,8 +53,7 @@ static const char sccsid[] = "@(#)wrterm * shell problems and omitting empty fields. */ void -wrtermcap(bp) - char *bp; +wrtermcap(char *bp) { register int ch; register char *p;