History log of /openbsd-current/usr.bin/nl/nl.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.8 04-Dec-2022 cheloha

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 tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.7 21-Apr-2019 deraadt

pledge "stdio" after opening file and before doing operations
from Rafael Neves


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.6 09-Oct-2015 deraadt

Change all tame callers to namechange to pledge(2).


# 1.5 07-Oct-2015 deraadt

tame "stdio rpath". could go crazy and handle the non-filename case,
but i am feeling some fatigue.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.4 21-Jan-2015 deraadt

Do not need sys/cdefs.h


Revision tags: OPENBSD_5_6_BASE
# 1.3 20-May-2014 guenther

Use errc/warnc to simplify code.
Also, in 'ftp', always put the error message last, after the hostname/ipaddr.

ok jsing@ krw@ millert@


Revision tags: OPENBSD_5_5_BASE
# 1.2 15-Nov-2013 millert

Include unistd.h as it is the standard location for getopt().


# 1.1 08-Sep-2013 jca

Import nl(1) from the NetBSD source tree, with local changes discussed
on tech@, among which `-' syntax for stdin, multibyte delimiter support
(based on FreeBSD) and various code simplifications. Original diffs
from pascal@ and later Arto Jonsson (ajonsson at kapsi dot fi),
comments and work by others, especially millert@.
"That looks good to me." millert@


# 1.7 21-Apr-2019 deraadt

pledge "stdio" after opening file and before doing operations
from Rafael Neves


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.6 09-Oct-2015 deraadt

Change all tame callers to namechange to pledge(2).


# 1.5 07-Oct-2015 deraadt

tame "stdio rpath". could go crazy and handle the non-filename case,
but i am feeling some fatigue.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.4 21-Jan-2015 deraadt

Do not need sys/cdefs.h


Revision tags: OPENBSD_5_6_BASE
# 1.3 20-May-2014 guenther

Use errc/warnc to simplify code.
Also, in 'ftp', always put the error message last, after the hostname/ipaddr.

ok jsing@ krw@ millert@


Revision tags: OPENBSD_5_5_BASE
# 1.2 15-Nov-2013 millert

Include unistd.h as it is the standard location for getopt().


# 1.1 08-Sep-2013 jca

Import nl(1) from the NetBSD source tree, with local changes discussed
on tech@, among which `-' syntax for stdin, multibyte delimiter support
(based on FreeBSD) and various code simplifications. Original diffs
from pascal@ and later Arto Jonsson (ajonsson at kapsi dot fi),
comments and work by others, especially millert@.
"That looks good to me." millert@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.6 09-Oct-2015 deraadt

Change all tame callers to namechange to pledge(2).


# 1.5 07-Oct-2015 deraadt

tame "stdio rpath". could go crazy and handle the non-filename case,
but i am feeling some fatigue.


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.4 21-Jan-2015 deraadt

Do not need sys/cdefs.h


Revision tags: OPENBSD_5_6_BASE
# 1.3 20-May-2014 guenther

Use errc/warnc to simplify code.
Also, in 'ftp', always put the error message last, after the hostname/ipaddr.

ok jsing@ krw@ millert@


Revision tags: OPENBSD_5_5_BASE
# 1.2 15-Nov-2013 millert

Include unistd.h as it is the standard location for getopt().


# 1.1 08-Sep-2013 jca

Import nl(1) from the NetBSD source tree, with local changes discussed
on tech@, among which `-' syntax for stdin, multibyte delimiter support
(based on FreeBSD) and various code simplifications. Original diffs
from pascal@ and later Arto Jonsson (ajonsson at kapsi dot fi),
comments and work by others, especially millert@.
"That looks good to me." millert@