Remove unnecessary termcap.h includes inherited from extern.h and other
unneeded headers. While I'm there, make function definations ANSI prototypes.
This commit is contained in:
parent
3daadfc833
commit
e87862f53a
@ -34,8 +34,6 @@
|
|||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <termcap.h>
|
|
||||||
|
|
||||||
extern struct termios mode, oldmode;
|
extern struct termios mode, oldmode;
|
||||||
extern int Columns, isreset, Lines;
|
extern int Columns, isreset, Lines;
|
||||||
extern int erasech, intrchar, killch;
|
extern int erasech, intrchar, killch;
|
||||||
|
@ -75,9 +75,7 @@ MAP *cur, *maplist;
|
|||||||
* The baud rate tests are: >, <, @, =, !
|
* The baud rate tests are: >, <, @, =, !
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
add_mapping(port, arg)
|
add_mapping(const char *port, char *arg)
|
||||||
const char *port;
|
|
||||||
char *arg;
|
|
||||||
{
|
{
|
||||||
MAP *mapp;
|
MAP *mapp;
|
||||||
char *copy, *p, *termp;
|
char *copy, *p, *termp;
|
||||||
@ -190,8 +188,7 @@ badmopt: errx(1, "illegal -m option format: %s", copy);
|
|||||||
* 'type'.
|
* 'type'.
|
||||||
*/
|
*/
|
||||||
const char *
|
const char *
|
||||||
mapped(type)
|
mapped(const char *type)
|
||||||
const char *type;
|
|
||||||
{
|
{
|
||||||
MAP *mapp;
|
MAP *mapp;
|
||||||
int match;
|
int match;
|
||||||
@ -240,8 +237,7 @@ SPEEDS speeds[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
speed_t
|
speed_t
|
||||||
tset_baudrate(rate)
|
tset_baudrate(char *rate)
|
||||||
char *rate;
|
|
||||||
{
|
{
|
||||||
SPEEDS *sp;
|
SPEEDS *sp;
|
||||||
speed_t speed;
|
speed_t speed;
|
||||||
|
@ -42,15 +42,12 @@ static const char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/9/93";
|
|||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
cat(file)
|
cat(char *file)
|
||||||
char *file;
|
|
||||||
{
|
{
|
||||||
register int fd, nr, nw;
|
register int fd, nr, nw;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
@ -67,8 +64,7 @@ cat(file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
outc(c)
|
outc(int c)
|
||||||
int c;
|
|
||||||
{
|
{
|
||||||
return putc(c, stderr);
|
return putc(c, stderr);
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@ static const char sccsid[] = "@(#)set.c 8.2 (Berkeley) 2/28/94";
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <termcap.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@ -54,7 +55,7 @@ int set_tabs(void);
|
|||||||
* a child program dies in raw mode.
|
* a child program dies in raw mode.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
reset_mode()
|
reset_mode(void)
|
||||||
{
|
{
|
||||||
tcgetattr(STDERR_FILENO, &mode);
|
tcgetattr(STDERR_FILENO, &mode);
|
||||||
|
|
||||||
@ -155,7 +156,7 @@ reset_mode()
|
|||||||
* entry and command line and update their values in 'mode'.
|
* entry and command line and update their values in 'mode'.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
set_control_chars()
|
set_control_chars(void)
|
||||||
{
|
{
|
||||||
char *bp, *p, bs_char, buf[1024];
|
char *bp, *p, bs_char, buf[1024];
|
||||||
|
|
||||||
@ -192,8 +193,7 @@ set_control_chars()
|
|||||||
* uppercase to internal lowercase.
|
* uppercase to internal lowercase.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
set_conversions(usingupper)
|
set_conversions(int usingupper)
|
||||||
int usingupper;
|
|
||||||
{
|
{
|
||||||
if (tgetflag("UC") || usingupper) {
|
if (tgetflag("UC") || usingupper) {
|
||||||
#ifdef IUCLC
|
#ifdef IUCLC
|
||||||
@ -238,7 +238,7 @@ set_conversions(usingupper)
|
|||||||
|
|
||||||
/* Output startup string. */
|
/* Output startup string. */
|
||||||
void
|
void
|
||||||
set_init()
|
set_init(void)
|
||||||
{
|
{
|
||||||
char *bp, buf[1024];
|
char *bp, buf[1024];
|
||||||
int settle;
|
int settle;
|
||||||
@ -282,7 +282,7 @@ set_init()
|
|||||||
* Return nonzero if we set any tab stops, zero if not.
|
* Return nonzero if we set any tab stops, zero if not.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
set_tabs()
|
set_tabs(void)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
char *capsp, *clear_tabs;
|
char *capsp, *clear_tabs;
|
||||||
|
@ -45,6 +45,7 @@ static const char sccsid[] = "@(#)term.c 8.1 (Berkeley) 6/9/93";
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <termcap.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <ttyent.h>
|
#include <ttyent.h>
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
@ -59,8 +60,7 @@ char *ttys(char *);
|
|||||||
* its termcap entry.
|
* its termcap entry.
|
||||||
*/
|
*/
|
||||||
const char *
|
const char *
|
||||||
get_termcap_entry(userarg, tcapbufp)
|
get_termcap_entry(char *userarg, char **tcapbufp)
|
||||||
char *userarg, **tcapbufp;
|
|
||||||
{
|
{
|
||||||
struct ttyent *t;
|
struct ttyent *t;
|
||||||
int rval;
|
int rval;
|
||||||
@ -125,8 +125,7 @@ found: if ((p = getenv("TERMCAP")) != NULL && *p != '/')
|
|||||||
|
|
||||||
/* Prompt the user for a terminal type. */
|
/* Prompt the user for a terminal type. */
|
||||||
const char *
|
const char *
|
||||||
askuser(dflt)
|
askuser(const char *dflt)
|
||||||
const char *dflt;
|
|
||||||
{
|
{
|
||||||
static char answer[256];
|
static char answer[256];
|
||||||
char *p;
|
char *p;
|
||||||
|
@ -53,6 +53,7 @@ static const char sccsid[] = "@(#)tset.c 8.1 (Berkeley) 6/9/93";
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <termcap.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@ -53,8 +53,7 @@ static const char sccsid[] = "@(#)wrterm.c 8.1 (Berkeley) 6/9/93";
|
|||||||
* shell problems and omitting empty fields.
|
* shell problems and omitting empty fields.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
wrtermcap(bp)
|
wrtermcap(char *bp)
|
||||||
char *bp;
|
|
||||||
{
|
{
|
||||||
register int ch;
|
register int ch;
|
||||||
register char *p;
|
register char *p;
|
||||||
|
Loading…
Reference in New Issue
Block a user