Prototypes (PR#1103).
This commit is contained in:
parent
c0ccf6bd8a
commit
41621edd10
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: termcap.3,v 1.4 1995/02/27 10:18:47 cgd Exp $
|
||||
.\" $NetBSD: termcap.3,v 1.5 1995/06/05 19:45:48 pk Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -56,6 +56,7 @@
|
||||
.Fn tgetstr "char *id" "char **area"
|
||||
.Ft char *
|
||||
.Fn tgoto "char *cm" destcol destline
|
||||
.Ft void
|
||||
.Fn tputs "register char *cp" "int affcnt" "int (*outc)()"
|
||||
.Sh DESCRIPTION
|
||||
These functions extract and use capabilities from a terminal capability data
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: termcap.c,v 1.6 1995/02/27 10:18:54 cgd Exp $ */
|
||||
/* $NetBSD: termcap.c,v 1.7 1995/06/05 19:45:52 pk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -37,7 +37,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)termcap.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: termcap.c,v 1.6 1995/02/27 10:18:54 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: termcap.c,v 1.7 1995/06/05 19:45:52 pk Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -48,6 +48,7 @@ static char rcsid[] = "$NetBSD: termcap.c,v 1.6 1995/02/27 10:18:54 cgd Exp $";
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <curses.h>
|
||||
#include "pathnames.h"
|
||||
|
||||
/*
|
||||
@ -100,10 +101,11 @@ tgetent(bp, name)
|
||||
* becomes "$HOME/.termcap /etc/termcap" if no TERMPATH exists.
|
||||
*/
|
||||
if (!cp || *cp != '/') { /* no TERMCAP or it holds an entry */
|
||||
if (termpath = getenv("TERMPATH"))
|
||||
if ((termpath = getenv("TERMPATH")) != NULL)
|
||||
strncpy(pathbuf, termpath, PBUFSIZ);
|
||||
else {
|
||||
if (home = getenv("HOME")) { /* set up default */
|
||||
if ((home = getenv("HOME")) != NULL) {
|
||||
/* set up default */
|
||||
p += strlen(home); /* path, looking in */
|
||||
strcpy(pathbuf, home); /* $HOME first */
|
||||
*p++ = '/';
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tgoto.c,v 1.4 1995/02/27 10:18:59 cgd Exp $ */
|
||||
/* $NetBSD: tgoto.c,v 1.5 1995/06/05 19:45:54 pk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -37,11 +37,12 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tgoto.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: tgoto.c,v 1.4 1995/02/27 10:18:59 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: tgoto.c,v 1.5 1995/06/05 19:45:54 pk Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include <string.h>
|
||||
#include <curses.h>
|
||||
|
||||
#define CTRL(c) ((c) & 037)
|
||||
|
||||
@ -95,7 +96,7 @@ toohard:
|
||||
return ("OOPS");
|
||||
}
|
||||
added[0] = 0;
|
||||
while (c = *cp++) {
|
||||
while ((c = *cp++) != '\0') {
|
||||
if (c != '%') {
|
||||
*dp++ = c;
|
||||
continue;
|
||||
@ -146,7 +147,6 @@ setwhich:
|
||||
/* fall into... */
|
||||
|
||||
case '.':
|
||||
casedot:
|
||||
/*
|
||||
* This code is worth scratching your head at for a
|
||||
* while. The idea is that various weird things can
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tputs.c,v 1.3 1995/02/27 10:19:03 cgd Exp $ */
|
||||
/* $NetBSD: tputs.c,v 1.4 1995/06/05 19:45:56 pk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -37,12 +37,14 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tputs.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: tputs.c,v 1.3 1995/02/27 10:19:03 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: tputs.c,v 1.4 1995/06/05 19:45:56 pk Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sgtty.h>
|
||||
#include <ctype.h>
|
||||
#include <curses.h>
|
||||
#undef ospeed
|
||||
|
||||
/*
|
||||
* The following array gives the number of tens of milliseconds per
|
||||
@ -62,10 +64,11 @@ char PC;
|
||||
* The number of affected lines is affcnt, and the routine
|
||||
* used to output one character is outc.
|
||||
*/
|
||||
void
|
||||
tputs(cp, affcnt, outc)
|
||||
register char *cp;
|
||||
int affcnt;
|
||||
int (*outc)();
|
||||
int (*outc) __P((int));
|
||||
{
|
||||
register int i = 0;
|
||||
register int mspc10;
|
||||
|
Loading…
Reference in New Issue
Block a user