Commit Graph

94 Commits

Author SHA1 Message Date
roy 1535311f47 Whitespace 2013-06-07 13:16:18 +00:00
njoly 40b41484a6 Fix c&p error in string descriptions. 2013-03-15 14:27:41 +00:00
roy 40e555b80b Provide a disabled implentation of tlparm and ti_tlparm for completeness.
This also improves the readability of _ti_tiparm.
2013-01-25 17:28:50 +00:00
roy 943df88df1 Add descriptions for terminfo keys to term.h
These are extracted by genman and placed into the compiled terminfo.5
Fixes PR lib/47090
2013-01-25 12:52:45 +00:00
roy 57755c0fa8 For platforms where we cannot fit a char * into a long, return NULL
and set errno to ENOTSUPP.
2013-01-25 12:30:05 +00:00
roy b05cdd2b82 Fix building our terminals with a non standard NETBSDSRCDIR, PR lib/46793.
Thanks to Bernd Ernesti.
2013-01-24 14:17:40 +00:00
roy a17592c001 Move the strings vs long analysis to a private function, but allow
tput(1) to use it so we can work with string parameters to capabilities.
2013-01-24 10:41:28 +00:00
roy 77e0da2e1e As tparm accepts longs we should treat them as long during expansion.
Also, fix the ~ and ! logic.
2013-01-24 10:28:28 +00:00
roy cf892bbeee Fix %t logic and don't output any %; or %e parts.
Fixes PR lib/47490 thanks to Julien Oster
2013-01-23 13:06:18 +00:00
msaitoh f1f8803538 Fix off by one error. 2012-11-30 10:14:18 +00:00
joerg 11b4a6201b Add tic dependency only for the USETOOLS case. 2012-08-20 15:44:02 +00:00
joerg 2f2f99b48a Relax consistency to make it possible to match valid entries. 2012-06-06 13:36:58 +00:00
wiz 1728003ef9 Bump date for previous. 2012-06-05 17:22:01 +00:00
joerg fc67b0cd11 Switch terminfo(3) to cdb(5). 2012-06-03 23:19:09 +00:00
roy b7ddb5da20 Ensure that we request a buffer big enough, although with the current
terminfo specification this should never happen.
Correctly return NULL when realloc(3) fails.
2012-06-02 19:10:33 +00:00
joerg 68a65e1a02 Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.
2012-06-01 12:08:40 +00:00
joerg 5fafac093e Use memcmp in place of strncmp, since length is known to no longer than
either of the arguments.
2012-06-01 12:02:36 +00:00
dholland 6e357ed2e2 Add cdefs.h per PR 46492. 2012-05-29 00:27:59 +00:00
matt fa835e8c8b These directories default to WARNS?=5 2012-03-21 05:37:42 +00:00
christos 968af0c9f3 PR/46075: Asau: fix typo set_color_paid -> set_color_pair 2012-02-22 23:11:20 +00:00
joerg 93a30e6d6f Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.
2011-11-28 12:44:18 +00:00
christos b9c2e08099 make use we don't touch memory past the end of the buffer. Pointed out
by tnozaki.
2011-11-13 15:24:04 +00:00
joerg 5b270365fe Fix dependencies on generated files. 2011-11-03 07:19:39 +00:00
yamt e2d8d702cb use the tools version of utilities for other scripts, too 2011-11-02 20:39:41 +00:00
christos 76151da247 use the tools version. 2011-11-02 20:30:00 +00:00
christos 474f83c4ae Separate the generators out, so that they can be re-used by tools, and
don't play games with curdir/objdir.
2011-11-02 17:48:53 +00:00
roy 9e5def586b Now that nbperf can generate the same file using the -p option,
there is no longer a need to store these files in CVS.
2011-11-02 12:09:25 +00:00
roy 62480e1c72 There is no standard way of getting a list of aliases for the
terminal. However, some applications such as telnet want to know this.
ncurses dumps the terminfo header into an undefined variable ttytype
and these applications then parse it to work out the aliases.
We should do the same for now, until a standard mechanism for getting
the information is available or the need for it goes away.
2011-10-05 10:46:08 +00:00
roy 64afaacce6 Move longname(3) from curses to terminfo, pre-cursor to fix PR/43386. 2011-10-04 11:01:13 +00:00
roy 2f9b6d37f2 Fix tparm.
As we now go via tiparm, store nums as int to conserve memory.
2011-10-03 20:13:48 +00:00
roy 91ab69b0df Remove _ti_freeterm as consumers should just use del_curterm. 2011-10-03 19:18:55 +00:00
roy 7fc83a7d87 Correct args 2011-10-03 19:15:03 +00:00
roy 44e794b040 Install correct man page links. 2011-10-03 13:10:58 +00:00
roy 39aae097d0 Correctly use ti_ instead of t_ for our extensions as per the man page.
Replace vtparm with tiparm.
tiparm is also non standard, but has been proposed at least.
2011-10-03 12:31:51 +00:00
roy fd2d10c6b0 Add termname(3) as defined by POSIX. 2011-10-02 19:24:25 +00:00
christos cc9ecc5e39 PR/45370: Takehiko NOZAKI: termcap emulation tget{flag,num,str} should
work with non-NUL terminated strings.
2011-09-16 18:51:44 +00:00
christos 5353040f23 document non-literal format strings 2011-08-16 10:35:03 +00:00
roy 3a520e5e78 Make new compiled terms for our updated terminfo. 2011-06-19 16:36:04 +00:00
roy ed684e08ea Clean up some compile warnings 2011-04-11 21:37:19 +00:00
roy 9a92225ded POSIX says that term.h should define tgetstr and friends
Fixes PR lib/43941
2011-04-11 21:13:09 +00:00
roy f42fd8d0f1 Simplify some conversion by usig pre formatted strings and a function
to print a parameter.
2011-03-18 10:42:54 +00:00
christos 50f9c0a390 OOPS has been reverted. 2011-03-14 11:44:20 +00:00
christos 29ba757a34 revert OOPS change now that most of the reasons for tgoto to return NULL
have been eliminated.
2011-03-11 13:28:52 +00:00
roy df504c6413 Do our best to process invalid terminfo strings instead of just
returning NULL.
2011-03-10 13:39:26 +00:00
roy 9d7b5f143f Fix two other off-by-one errors when processing %P and %g commands. 2011-03-10 10:46:33 +00:00
roy 40109496d4 Add support for translating the following termcap commands into terminfo:
%B %D %r %2 %3 %d %+ %> %.
Fixes PR bin/44692.
2011-03-10 10:17:19 +00:00
roy 74cdc55234 Fix an off-by-one error when processing embedded values. 2011-03-10 09:45:32 +00:00
christos 959ab2631c Restore historical behavior of tgoto() to return "OOPS" on failure. This is
best for now because there are too many programs that don't check the return
value of it. Of course cursor motion commands from $TERMCAP have 0 chance
of working now, since their % escapes are not translated to terminfo. In
the window case %+ expects one param from the stack in the termcap case
and two in the terminfo so we barf. We need proper captoinfo handling for
the % escapes, like the one in ncurses. Hi Roy :-)
2011-03-07 00:27:51 +00:00
christos f207e61c08 replace `` with $(). Hopefully with enough examples around people will
forget about ``.
2010-10-12 12:57:51 +00:00
christos e6dabc3c76 PR/43961: YAMAMOTO Takashi: uninitialized variable in termcap.c
Remove dead code.
2010-10-12 12:49:27 +00:00