X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=man%2Fcurs_termcap.3x;h=94bed5beeefc8fd7ada66aa8863b16debce772f3;hp=7cf547d58d1b0cc608a02deb3214241addbf6060;hb=63d26709472433a4660c88461162252bf0e5fde8;hpb=54d0d62f0eb759e3c623a215d98ddebccca64488 diff --git a/man/curs_termcap.3x b/man/curs_termcap.3x index 7cf547d5..94bed5be 100644 --- a/man/curs_termcap.3x +++ b/man/curs_termcap.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2019,2020 Thomas E. Dickey * +.\" Copyright 2018-2020,2021 Thomas E. Dickey * .\" Copyright 1998-2017,2018 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_termcap.3x,v 1.44 2020/05/17 01:20:13 tom Exp $ +.\" $Id: curs_termcap.3x,v 1.49 2021/04/03 21:17:09 tom Exp $ .TH curs_termcap 3X "" .ie \n(.g .ds `` \(lq .el .ds `` `` @@ -50,7 +50,7 @@ \fBtgetnum\fR, \fBtgetstr\fR, \fBtgoto\fR, -\fBtputs\fR \- direct \fBcurses\fR interface to the terminfo capability database +\fBtputs\fR \- \fBcurses\fR emulation of termcap .ad .hy .SH SYNOPSIS @@ -66,22 +66,22 @@ .br \fBextern @NCURSES_OSPEED@ ospeed;\fR .sp -\fBint tgetent(char *bp, const char *name);\fR +\fBint tgetent(char *\fP\fIbp\fP\fB, const char *\fP\fIname\fP\fB);\fR .br -\fBint tgetflag(const char *id);\fR +\fBint tgetflag(const char *\fP\fIid\fP\fB);\fR .br -\fBint tgetnum(const char *id);\fR +\fBint tgetnum(const char *\fP\fIid\fP\fB);\fR .br -\fBchar *tgetstr(const char *id, char **area);\fR +\fBchar *tgetstr(const char *\fP\fIid\fP\fB, char **\fP\fIarea\fP\fB);\fR .br -\fBchar *tgoto(const char *cap, int col, int row);\fR +\fBchar *tgoto(const char *\fP\fIcap\fP\fB, int \fP\fIcol\fP\fB, int \fP\fIrow\fP\fB);\fR .br -\fBint tputs(const char *str, int affcnt, int (*putc)(int));\fR +\fBint tputs(const char *\fP\fIstr\fP\fB, int \fP\fIaffcnt\fP\fB, int (*\fP\fIputc\fP\fB)(int));\fR .br .SH DESCRIPTION These routines are included as a conversion aid for programs that use the \fItermcap\fR library. -Their parameters are the same and the +Their parameters are the same, but the routines are emulated using the \fIterminfo\fR database. Thus, they can only be used to query the capabilities of entries for which a @@ -218,12 +218,23 @@ if the string is indeed terminfo-style by looking for "%p" parameters or appear to be terminfo). .PP Because terminfo conventions for representing padding in string capabilities -differ from termcap's, \fBtputs("50");\fR will put out a literal \*(``50\*('' rather -than busy-waiting for 50 milliseconds. -Cope with it. +differ from termcap's, +users can be surprised: +.bP +\fBtputs("50")\fR in a terminfo system will put out a literal \*(``50\*('' +rather than busy-waiting for 50 milliseconds. +.bP +However, if ncurses is configured to support termcap, +it may also have been configured to support the BSD-style padding. +.IP +In that case, \fBtputs\fP inspects strings passed to it, +looking for digits at the beginning of the string. +.IP +\fBtputs("50")\fR in a termcap system may wait for 50 milliseconds +rather than put out a literal \*(``50\*('' .PP Note that termcap has nothing analogous to terminfo's \fBsgr\fR string. -One consequence of this is that termcap applications assume \fRme\fR +One consequence of this is that termcap applications assume \fBme\fR (terminfo \fBsgr0\fR) does not reset the alternate character set. This implementation checks for, and modifies the data shown to the termcap interface to accommodate termcap's limitation in this respect. @@ -331,8 +342,8 @@ which must be taken into account by programs which can work with all termcap library interfaces. .SH SEE ALSO \fBcurses\fR(3X), -\fBterminfo\fR(\*n), +\fBputc\fR(3), \fBterm_variables\fR(3X), -\fBputc\fR(3). +\fBterminfo\fR(\*n). .sp https://invisible-island.net/ncurses/tctest.html