OpenBSD CVS

CVS log for src/usr.bin/tput/tput.c


[BACK] Up to [local] / src / usr.bin / tput

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.30 / (download) - annotate - [select for diffs], Tue Oct 17 09:52:11 2023 UTC (7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.29: +472 -331 lines
Diff to previous 1.29 (colored)

Update ncurses and associated libraries (form, panel, menu) to
6.4-20230826 (from 5.7-20081102).

Based on result from Thomas Dickey's ncu2openbsd script and then
modified. Switches to the upstream tput. Major bump for the ncurses
libraries and for libedit and libreadline.

Help from tb, millert.

ok deraadt sthen

Revision 1.29 / (download) - annotate - [select for diffs], Wed Sep 6 05:04:07 2023 UTC (8 months, 1 week ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

remove unused variable

Revision 1.28 / (download) - annotate - [select for diffs], Wed Feb 8 15:56:32 2023 UTC (15 months, 1 week ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.27: +20 -50 lines
Diff to previous 1.27 (colored)

Use _nc_tparm_analyze() instead of trying to do it ourselves in process().
This fixes tput when used with a capability that uses push/pop.
OK gkoehler@

Revision 1.27 / (download) - annotate - [select for diffs], Fri Feb 3 15:55:59 2023 UTC (15 months, 2 weeks ago) by tb
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

Fix tput when compiled with clang-15 -O2

For some reason clang-15 doesn't like passing the uninitialized array of
pointers nargv[] to the vararg function tparm(). With -O2 it optimizes the
for loop preceding the tparm() call strangely, with the result that the
argv[i] == NULL error is hit in most real-world usage. This broke naddy's
fancy shell prompt among other things. Initialize nargv[] to appease the
insatiable undefined behavior exploiter.

ok jca millert

Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 22 19:53:24 2022 UTC (16 months, 3 weeks ago) by kn
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Denote multiple arguments with 'arg ...' not 'args'

A few programs used the plural in their synopsis which doesn't read as
clear as the obvious triple-dot notation.

mdoc(7) .Ar defaults to "file ..." if no arguments are given and consistent
use of 'arg ...' matches that behaviour.

Cleanup a few markups of the same argument so the text keeps reading
naturally;  omit unhelpful parts like 'if optional arguments are given,
they are passed along' for tools like time(1) and timeout(1) that obviously
execute commands with whatever arguments where given -- just like doas(1)
which doesn't mention arguments in its DESCRIPTION in the first place.

For expr(1) the difference between 'expressions' and 'expression ...' is
crucial, as arguments must be passed as individual words.

Feedback millert jmc schwarze deraadt
OK jmc

Revision 1.25 / (download) - annotate - [select for diffs], Sun Dec 4 23:50:49 2022 UTC (17 months, 2 weeks ago) by cheloha
Branch: MAIN
Changes since 1.24: +1 -2 lines
Diff to previous 1.24 (colored)

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.  We can
handle this case with the "default" failure case with no loss of
legibility.  Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@.  With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2

ok naddy@ millert@ dlg@

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jan 25 00:19:27 2019 UTC (5 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

I am retiring my old email address;  replace it with my OpenBSD one.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Aug 21 21:41:13 2017 UTC (6 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.22: +8 -3 lines
Diff to previous 1.22 (colored)

Use waitpid()/EINTR idiom for the specific pid, rather than generic wait(),
in case the parent process was started with a dangling child.  This style
ensures any potential parent:child interlock isn't disrupted due to the
"wrong" child being waited on first.  Then the other other childs can safely
zombie.
ok millert jca brynet

Revision 1.22 / (download) - annotate - [select for diffs], Mon Nov 16 03:03:28 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.21: +4 -1 lines
Diff to previous 1.21 (colored)

pledge "stdio rpath wpath tty"

Revision 1.21 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:13 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.20: +5 -4 lines
Diff to previous 1.20 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.20 / (download) - annotate - [select for diffs], Wed Oct 8 04:10:47 2014 UTC (9 years, 7 months ago) by doug
Branch: MAIN
Changes since 1.19: +3 -2 lines
Diff to previous 1.19 (colored)

userland reallocarray audit.

Replace malloc() and realloc() calls that may have integer overflow in the
multiplication of the size argument with reallocarray().

ok deraadt@

Revision 1.19 / (download) - annotate - [select for diffs], Wed Nov 27 15:23:01 2013 UTC (10 years, 5 months ago) by yasuoka
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

unsigned char cast was on a wrong place.

ok okan

Revision 1.18 / (download) - annotate - [select for diffs], Wed Nov 27 00:13:24 2013 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +5 -3 lines
Diff to previous 1.17 (colored)

unsigned char for ctype
ok okan

Revision 1.17 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:46 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.16: +1 -14 lines
Diff to previous 1.16 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.16 / (download) - annotate - [select for diffs], Tue Oct 5 14:46:11 2004 UTC (19 years, 7 months ago) by jaredy
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.15: +9 -9 lines
Diff to previous 1.15 (colored)

fix an overflow in the handling of -S

ok millert

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jun 17 21:56:26 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.14: +9 -9 lines
Diff to previous 1.14 (colored)

Sync with share/misc/license.template and add missing DARPA credit
where applicable.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:53 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +8 -11 lines
Diff to previous 1.13 (colored)

mostly ansi cleanup; pval ok

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 3 01:52:41 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.12: +13 -28 lines
Diff to previous 1.12 (colored)

Use an ISC-tyle license for all my code; it is simpler and more permissive.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:55 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.11: +7 -7 lines
Diff to previous 1.11 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jul 9 07:04:56 2001 UTC (22 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

correct type on last arg to execl(); nordin@cse.ogi.edu

Revision 1.10 / (download) - annotate - [select for diffs], Sun Sep 12 10:29:01 1999 UTC (24 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.9: +3 -6 lines
Diff to previous 1.9 (colored)

correct exit value; noted by shinobi@monkey.org

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 2 16:00:13 1999 UTC (24 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.8: +55 -9 lines
Diff to previous 1.8 (colored)

For "tput init" set margins and 8 character tabs, for "tput reset" set margins

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jun 29 19:39:40 1999 UTC (24 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.7: +251 -127 lines
Diff to previous 1.7 (colored)

Heavily modified to support both terminfo and termcap attributes.
Now links with -lcurses (ncurses), not -locurses.
TODO: set tabs/margins for init/reset pseudo-attributes.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Mar 6 20:27:42 1999 UTC (25 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.6: +37 -59 lines
Diff to previous 1.6 (colored)

back out changes that should not have escaped my local tree

Revision 1.6 / (download) - annotate - [select for diffs], Sat Mar 6 20:19:22 1999 UTC (25 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.5: +61 -39 lines
Diff to previous 1.5 (colored)

add missing reference to infocmp

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jun 24 02:40:15 1997 UTC (26 years, 11 months ago) by dgregor
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.4: +3 -2 lines
Diff to previous 1.4 (colored)

Add #include for string.h to get declaration for strrchr()

Revision 1.4 / (download) - annotate - [select for diffs], Fri Mar 7 21:54:48 1997 UTC (27 years, 2 months ago) by gene
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.3: +12 -3 lines
Diff to previous 1.3 (colored)

Integrate clear into tput itself with silly argv munching.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jan 15 23:43:23 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:41:47 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:46:26 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:46:26 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.