OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.45 / (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.44: +248 -611 lines
Diff to previous 1.44 (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.44 / (download) - annotate - [select for diffs], Sun Dec 4 23:50:49 2022 UTC (17 months, 2 weeks ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.43: +1 -2 lines
Diff to previous 1.43 (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.43 / (download) - annotate - [select for diffs], Tue Jun 22 18:33:48 2021 UTC (2 years, 10 months ago) by tb
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
Changes since 1.42: +3 -22 lines
Diff to previous 1.42 (colored)

Reduce verbosity in tset/reset usage()

from jmc, ok kn

Revision 1.42 / (download) - annotate - [select for diffs], Tue Jun 22 18:32:24 2021 UTC (2 years, 10 months ago) by tb
Branch: MAIN
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored)

Hoist initialization of _nc_progname to start of main()

This way early calls to err(), failed() and usage() show "reset"
instead of "tset" if the program was invoked as reset(1).

Issue noted by jmc
ok kn

Revision 1.41 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:05 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: 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
Changes since 1.40: +14 -13 lines
Diff to previous 1.40 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Mar 12 11:01:25 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

Almost all terminals now support hardware tabs so default to OXTABS
off.

This makes three changes: adds the ht capability to the standard lines
in gettytab(5); removes OXTABS from TTYDEF_OFLAG in ttydefaults.h (the
defaults used by pty(4) - diff from martijn); and only sets OXTABS on
terminals which lack hts and tbc in tset(1) (from Thomas Dickey
upstream).

Addresses problems reported by tedu.

ok millert

Revision 1.39 / (download) - annotate - [select for diffs], Mon Nov 16 03:02:40 2015 UTC (8 years, 6 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, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.38: +4 -1 lines
Diff to previous 1.38 (colored)

pledge "stdio rpath wpath tty"

Revision 1.38 / (download) - annotate - [select for diffs], Sun Nov 15 14:14:20 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.37: +8 -30 lines
Diff to previous 1.37 (colored)

Simplify TIOCGWINSZ codeblock by removing support for SCO Unix.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Aug 20 22:28:58 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

Do not need to cast malloc().  stdlib.h is brought in via a local .h file.
ok millert

Revision 1.36 / (download) - annotate - [select for diffs], Wed Sep 18 16:21:30 2013 UTC (10 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.35: +3 -58 lines
Diff to previous 1.35 (colored)

Remove "tset -S" compatibility I added years ago.  Most converted
terminfo entries for most terminals are too large to fit within the
1023 bytes allowed for termcap.  We're better off without it.
OK espie@ jmc@

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jan 12 23:22:14 2010 UTC (14 years, 4 months ago) by nicm
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.34: +242 -123 lines
Diff to previous 1.34 (colored)

Update to ncurses 5.7, with local changes reapplied.

This is around eight years worth of changes (previously we were around ncurses
5.2), too many to list - many bug fixes and also a few new functions.

A major bump for libcurses, libpanel, libform and libmenu.

ok deraadt

Revision 1.34 / (download) - annotate - [select for diffs], Wed Nov 11 23:49:01 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Fix memory leaks found by parfait.

ok deraadt@ jsg@

Revision 1.33 / (download) - annotate - [select for diffs], Wed May 6 21:07:01 2009 UTC (15 years ago) by sobrado
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.32: +4 -3 lines
Diff to previous 1.32 (colored)

add missing flags to the output of usage() and sort them as usual
in BSD operating systems; while here, indent source code in a way it
fits on 80-column displays.

ok jmc@

Revision 1.32 / (download) - annotate - [select for diffs], Mon Oct 15 02:16:35 2007 UTC (16 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

specifying int instead of just unsigned is better style

Revision 1.31 / (download) - annotate - [select for diffs], Fri Sep 14 14:29:20 2007 UTC (16 years, 8 months ago) by chl
Branch: MAIN
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

remove some warnings:
unused variable `variable'
`variable' might be used uninitialized in this function

ok gilles@ ray@

Revision 1.30 / (download) - annotate - [select for diffs], Tue Sep 11 15:47:17 2007 UTC (16 years, 8 months ago) by gilles
Branch: MAIN
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

use strcspn to properly overwrite '\n' in fgets returned buffer

ok pyr@, ray@, millert@, moritz@, chl@

Revision 1.29 / (download) - annotate - [select for diffs], Tue Feb 20 01:52:01 2007 UTC (17 years, 3 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Change hard coded numbers to sizeof(buf).  Also change some
sizeof(buf) - 1 to sizeof(buf), since fgets takes the whole buffer size.

Based on diff from Charles Longeau <chl at tuxfamily dot org> long ago.

OK millert@.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Oct 10 21:38:16 2006 UTC (17 years, 7 months ago) by cloder
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

fgets(3) returns NULL on error, not 0. No functional change, but it makes
the code easier to read.
OK deraadt

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jun 12 20:58:11 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: 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, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

de-register and ansification; millert ok

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:20 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.25: +2 -6 lines
Diff to previous 1.25 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:17 2001 UTC (22 years, 6 months ago) by mpech
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.24: +2 -2 lines
Diff to previous 1.24 (colored)

kill more registers

millert@ ok

Revision 1.24 / (download) - annotate - [select for diffs], Mon Jul 16 06:14:31 2001 UTC (22 years, 10 months ago) by pvalchev
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

-Wall cleanup; ok millert

Revision 1.23 / (download) - annotate - [select for diffs], Wed Feb 28 22:58:52 2001 UTC (23 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.22: +7 -7 lines
Diff to previous 1.22 (colored)

ncurses-5.2-20010224

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jan 29 01:58:24 2001 UTC (23 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.21: +2 -0 lines
Diff to previous 1.21 (colored)

$OpenBSD$

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jan 22 18:02:20 2001 UTC (23 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Update to ncurses-5.2-20010114

Revision 1.20 / (download) - annotate - [select for diffs], Sun Oct 8 22:47:11 2000 UTC (23 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.19: +36 -38 lines
Diff to previous 1.19 (colored)

update to ncurses-5.1-20001007

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jul 24 04:06:12 2000 UTC (23 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.18: +18 -10 lines
Diff to previous 1.18 (colored)

Update to ncurses-5.1-20000722

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jul 7 21:15:23 2000 UTC (23 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +1 -1 lines
Diff to previous 1.17 (colored)

avoid non-formatter printf, use fputs

Revision 1.17 / (download) - annotate - [select for diffs], Mon Mar 13 23:53:41 2000 UTC (24 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.16: +8 -5 lines
Diff to previous 1.16 (colored)

update to ncurses-5.0-20000311

Revision 1.16 / (download) - annotate - [select for diffs], Fri Mar 10 01:35:06 2000 UTC (24 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.15: +728 -733 lines
Diff to previous 1.15 (colored)

Update to ncurses-5.0-20000304

Revision 1.15 / (download) - annotate - [select for diffs], Sat Dec 4 22:25:02 1999 UTC (24 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Avoid an oflow in failed().  There's really no need to make a temporary
copy of the string since we are just printing to stderr.

Revision 1.14 / (download) - annotate - [select for diffs], Sun May 23 17:19:21 1999 UTC (25 years ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored)

getopt(3) returns -1, not EOF

Revision 1.13 / (download) - annotate - [select for diffs], Mon Mar 15 19:00:19 1999 UTC (25 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.12: +3 -10 lines
Diff to previous 1.12 (colored)

ncurses-4.2-990314

Revision 1.12 / (download) - annotate - [select for diffs], Tue Mar 2 06:23:56 1999 UTC (25 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.11: +2 -3 lines
Diff to previous 1.11 (colored)

ncurses-4.2-990301

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jan 18 18:57:36 1999 UTC (25 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.10: +8 -8 lines
Diff to previous 1.10 (colored)

updates from ncurses-4.2-990116

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jan 11 20:11:16 1999 UTC (25 years, 4 months ago) by tholo
Branch: MAIN
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored)

Move break statement so that -Q really works

Revision 1.9 / (download) - annotate - [select for diffs], Sat Dec 5 14:12:44 1998 UTC (25 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.8: +1 -0 lines
Diff to previous 1.8 (colored)

Add missing printf

Revision 1.8 / (download) - annotate - [select for diffs], Tue Nov 17 03:25:15 1998 UTC (25 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

preserve ncruses module id

Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 16 03:08:41 1998 UTC (25 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.6: +1102 -162 lines
Diff to previous 1.6 (colored)

ncurses tset plus hacks to make $TERMCAP still get set

Revision 1.6 / (download) - annotate - [select for diffs], Fri Oct 16 18:51:21 1998 UTC (25 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.5: +21 -8 lines
Diff to previous 1.5 (colored)

don't dump core when linked against ncurses

Revision 1.5 / (download) - annotate - [select for diffs], Sat Apr 25 04:30:39 1998 UTC (26 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

fix some minor nits:
    o no need to flush stderr as it is not buffered
    o use putc to print a newline, not fprintf
    o set histchars to be null when we set noglob (and undo of course).

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jul 25 22:13:25 1997 UTC (26 years, 10 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.3: +5 -4 lines
Diff to previous 1.3 (colored)

user err(3)

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jan 15 23:43:25 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
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:58 1996 UTC (27 years, 11 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:27 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:27 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.