diff --git a/lib/libterm/termcap.c b/lib/libterm/termcap.c index 82bfc8e6b934..d4fcde759f04 100644 --- a/lib/libterm/termcap.c +++ b/lib/libterm/termcap.c @@ -1,4 +1,4 @@ -/* $NetBSD: termcap.c,v 1.47 2004/04/23 14:49:18 christos Exp $ */ +/* $NetBSD: termcap.c,v 1.48 2005/02/04 15:52:08 perry Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)termcap.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: termcap.c,v 1.47 2004/04/23 14:49:18 christos Exp $"); +__RCSID("$NetBSD: termcap.c,v 1.48 2005/02/04 15:52:08 perry Exp $"); #endif #endif /* not lint */ @@ -115,9 +115,7 @@ t_setinfo(struct tinfo **bp, const char *entry) */ int -t_getent(bp, name) - struct tinfo **bp; - const char *name; +t_getent(struct tinfo **bp, const char *name) { char *p; char *cp; @@ -273,9 +271,7 @@ out: * Get an entry for terminal name in buffer bp from the termcap file. */ int -tgetent(bp, name) - char *bp; - const char *name; +tgetent(char *bp, const char *name) { int i, plen, elen, c; char *ptrbuf = NULL; @@ -322,9 +318,7 @@ tgetent(bp, name) * Note that we handle octal numbers beginning with 0. */ int -t_getnum(info, id) - struct tinfo *info; - const char *id; +t_getnum(struct tinfo *info, const char *id) { long num; @@ -338,8 +332,7 @@ t_getnum(info, id) } int -tgetnum(id) - const char *id; +tgetnum(const char *id) { return fbuf ? t_getnum(fbuf, id) : -1; } @@ -350,9 +343,7 @@ tgetnum(id) * of the buffer. Return 1 if we find the option, or 0 if it is * not given. */ -int t_getflag(info, id) - struct tinfo *info; - const char *id; +int t_getflag(struct tinfo *info, const char *id) { _DIAGASSERT(info != NULL); _DIAGASSERT(id != NULL); @@ -361,8 +352,7 @@ int t_getflag(info, id) } int -tgetflag(id) - const char *id; +tgetflag(const char *id) { return fbuf ? t_getflag(fbuf, id) : 0; } @@ -377,11 +367,7 @@ tgetflag(id) * area, this is updated. */ char * -t_getstr(info, id, area, limit) - struct tinfo *info; - const char *id; - char **area; - size_t *limit; +t_getstr(struct tinfo *info, const char *id, char **area, size_t *limit) { char *s; int i; @@ -433,9 +419,7 @@ t_getstr(info, id, area, limit) * No checking on area overflow. */ char * -tgetstr(id, area) - const char *id; - char **area; +tgetstr(const char *id, char **area) { struct tinfo dummy; char ids[3]; @@ -516,8 +500,7 @@ t_agetstr(struct tinfo *info, const char *id) * */ void -t_freent(info) - struct tinfo *info; +t_freent(struct tinfo *info) { struct tbuf *tb, *wb; _DIAGASSERT(info != NULL); @@ -540,10 +523,7 @@ t_freent(info) * */ int -t_getterm(info, area, limit) - struct tinfo *info; - char **area; - size_t *limit; +t_getterm(struct tinfo *info, char **area, size_t *limit) { char *endp; size_t count; diff --git a/lib/libterm/termcap.h b/lib/libterm/termcap.h index d64705afdd81..c501a44bc0bf 100644 --- a/lib/libterm/termcap.h +++ b/lib/libterm/termcap.h @@ -1,4 +1,4 @@ -/* $NetBSD: termcap.h,v 1.14 2003/08/07 16:44:57 agc Exp $ */ +/* $NetBSD: termcap.h,v 1.15 2005/02/04 15:52:08 perry Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -40,28 +40,28 @@ #include __BEGIN_DECLS -int tgetent __P((char *, const char *)); -char *tgetstr __P((const char *, char **)); -int tgetflag __P((const char *)); -int tgetnum __P((const char *)); -char *tgoto __P((const char *, int, int)); -void tputs __P((const char *, int, int (*)(int))); +int tgetent(char *, const char *); +char *tgetstr(const char *, char **); +int tgetflag(const char *); +int tgetnum(const char *); +char *tgoto(const char *, int, int); +void tputs(const char *, int, int (*)(int)); /* * New interface */ struct tinfo; -int t_getent __P((struct tinfo **, const char *)); -int t_getnum __P((struct tinfo *, const char *)); -int t_getflag __P((struct tinfo *, const char *)); -char *t_getstr __P((struct tinfo *, const char *, char **, size_t *)); +int t_getent(struct tinfo **, const char *); +int t_getnum(struct tinfo *, const char *); +int t_getflag(struct tinfo *, const char *); +char *t_getstr(struct tinfo *, const char *, char **, size_t *); char *t_agetstr(struct tinfo *, const char *); int t_getterm(struct tinfo *, char **, size_t *); -int t_goto __P((struct tinfo *, const char *, int, int, char *, size_t)); -int t_puts __P((struct tinfo *, const char *, int, - void (*)(char, void *), void *)); -void t_freent __P((struct tinfo *)); +int t_goto(struct tinfo *, const char *, int, int, char *, size_t); +int t_puts(struct tinfo *, const char *, int, + void (*)(char, void *), void *); +void t_freent (struct tinfo *); int t_setinfo(struct tinfo **, const char *); extern char PC; diff --git a/lib/libterm/tgoto.c b/lib/libterm/tgoto.c index e44f5d17b0a5..46f7e7e973b2 100644 --- a/lib/libterm/tgoto.c +++ b/lib/libterm/tgoto.c @@ -1,4 +1,4 @@ -/* $NetBSD: tgoto.c,v 1.22 2003/08/07 16:44:57 agc Exp $ */ +/* $NetBSD: tgoto.c,v 1.23 2005/02/04 15:52:08 perry Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)tgoto.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tgoto.c,v 1.22 2003/08/07 16:44:57 agc Exp $"); +__RCSID("$NetBSD: tgoto.c,v 1.23 2005/02/04 15:52:08 perry Exp $"); #endif #endif /* not lint */ @@ -76,9 +76,7 @@ char *BC; * all other characters are ``self-inserting''. */ char * -tgoto(CM, destcol, destline) - const char *CM; - int destcol, destline; +tgoto(const char *CM, int destcol, int destline) { static char result[MAXRETURNSIZE]; @@ -95,13 +93,8 @@ tgoto(CM, destcol, destline) * returns 0 on success, -1 otherwise. */ int -t_goto(info, CM, destcol, destline, buffer, limit) - struct tinfo *info; - const char *CM; - int destcol; - int destline; - char *buffer; - size_t limit; +t_goto(struct tinfo *info, const char *CM, int destcol, int destline, + char *buffer, size_t limit) { char added[10]; const char *cp = CM; diff --git a/lib/libterm/tputs.c b/lib/libterm/tputs.c index 994a3bac6bf9..f2cb55a991ad 100644 --- a/lib/libterm/tputs.c +++ b/lib/libterm/tputs.c @@ -1,4 +1,4 @@ -/* $NetBSD: tputs.c,v 1.21 2003/08/07 16:44:57 agc Exp $ */ +/* $NetBSD: tputs.c,v 1.22 2005/02/04 15:52:08 perry Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)tputs.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tputs.c,v 1.21 2003/08/07 16:44:57 agc Exp $"); +__RCSID("$NetBSD: tputs.c,v 1.22 2005/02/04 15:52:08 perry Exp $"); #endif #endif /* not lint */ @@ -46,7 +46,7 @@ __RCSID("$NetBSD: tputs.c,v 1.21 2003/08/07 16:44:57 agc Exp $"); #undef ospeed /* internal functions */ -int _tputs_convert __P((const char **, int)); +int _tputs_convert(const char **, int); /* * The following array gives the number of tens of milliseconds per @@ -62,9 +62,7 @@ short ospeed; char PC; int -_tputs_convert(ptr, affcnt) - const char **ptr; - int affcnt; +_tputs_convert(const char **ptr, int affcnt) { int i = 0; @@ -107,10 +105,7 @@ _tputs_convert(ptr, affcnt) * used to output one character is outc. */ void -tputs(cp, affcnt, outc) - const char *cp; - int affcnt; - int (*outc) __P((int)); +tputs(const char *cp, int affcnt, int (*outc)(int)) { int i = 0; int mspc10; @@ -154,12 +149,8 @@ tputs(cp, affcnt, outc) int -t_puts(info, cp, affcnt, outc, args) - struct tinfo *info; - const char *cp; - int affcnt; - void (*outc) __P((char, void *)); - void *args; +t_puts(struct tinfo *info, const char *cp, int affcnt, + void (*outc)(char, void *), void *args) { int i = 0; size_t limit;