summaryrefslogtreecommitdiffstats
path: root/contrib/tcsh/vms.termcap.c
diff options
context:
space:
mode:
authormp <mp@FreeBSD.org>2005-04-24 19:41:08 +0000
committermp <mp@FreeBSD.org>2005-04-24 19:41:08 +0000
commit94a109bd814074f290affa8f7698847719d55833 (patch)
tree6daeb0464a7bc8705c0246b7fd98e212b6beed09 /contrib/tcsh/vms.termcap.c
parentbbd1addf8f9452690ad13ce5b875ee4cc9633958 (diff)
downloadFreeBSD-src-94a109bd814074f290affa8f7698847719d55833.zip
FreeBSD-src-94a109bd814074f290affa8f7698847719d55833.tar.gz
Import of tcsh-6.14.00
Diffstat (limited to 'contrib/tcsh/vms.termcap.c')
-rw-r--r--contrib/tcsh/vms.termcap.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/contrib/tcsh/vms.termcap.c b/contrib/tcsh/vms.termcap.c
index deef66f..7876690 100644
--- a/contrib/tcsh/vms.termcap.c
+++ b/contrib/tcsh/vms.termcap.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/vms.termcap.c,v 1.6 2000/06/10 23:32:42 kim Exp $ */
+/* $Header: /src/pub/tcsh/vms.termcap.c,v 1.8 2005/03/03 16:49:16 kim Exp $ */
/*
* termcap.c 1.1 20/7/87 agc Joypace Ltd
*
@@ -9,7 +9,7 @@
* A public domain implementation of the termcap(3) routines.
*/
#include "sh.h"
-RCSID("$Id: vms.termcap.c,v 1.6 2000/06/10 23:32:42 kim Exp $")
+RCSID("$Id: vms.termcap.c,v 1.8 2005/03/03 16:49:16 kim Exp $")
#if defined(_VMS_POSIX) || defined(_OSD_POSIX)
/* efth 1988-Apr-29
@@ -34,7 +34,9 @@ RCSID("$Id: vms.termcap.c,v 1.6 2000/06/10 23:32:42 kim Exp $")
char *capab; /* the capability itself */
extern char *getenv(); /* new, improved getenv */
+#ifndef fopen
extern FILE *fopen(); /* old fopen */
+#endif
/*
* tgetent - get the termcap entry for terminal name, and put it
@@ -271,7 +273,7 @@ char *cm;
int destcol;
int destline;
{
- register char *rp;
+ char *rp;
static char ret[24];
int incr = 0;
int argno = 0, numval;
@@ -323,15 +325,22 @@ int destline;
*/
int
tputs(cp, affcnt, outc)
-register char *cp;
+char *cp;
int affcnt;
int (*outc)();
{
+ unsigned long delay = 0;
+
if (cp == NULL)
return(1);
/* do any padding interpretation - left null for MINIX just now */
+ for (delay = 0; *cp && ISDIGIT(*cp) ; cp++)
+ delay = delay * 10 + *cp - '0';
while (*cp)
(*outc)(*cp++);
+#ifdef _OSD_POSIX
+ usleep(delay*100); /* strictly spoken, it should be *1000 */
+#endif
return(1);
}
#endif /* _VMS_POSIX || _OSD_POSIX */
OpenPOWER on IntegriCloud