doas needs doas.conf

2021-02-19 Thread Jan Stary
Say explicitly that doas needs doas.conf to exist, and point to the example one. Jan Index: doas.1 === RCS file: /cvs/src/usr.bin/doas/doas.1,v retrieving revision 1.25 diff -u -p -r1.25 doas.1 --- doas.1 16 Jan 2021

Re: extern int optreset not needed

2020-12-27 Thread Jan Stary
On Dec 26 23:24:57, h...@stare.cz wrote: > ftpd doesn't need to declare extern int optreset > as that is already done in the included unistd.h Here's more for usr.sbin/, if desirable. Jan Index: usr.sbin//amd/amd/get_args.c

extern int optreset not needed

2020-12-26 Thread Jan Stary
ftpd doesn't need to declare extern int optreset as that is already done in the included unistd.h Jan Index: popen.c === RCS file: /cvs/src/libexec/ftpd/popen.c,v retrieving revision 1.29 diff -u -p -r1.29 popen.c ---

Re: mixerctl names

2020-10-17 Thread Jan Stary
On Oct 17 11:12:28, cpb_t...@bennettconstruction.us wrote: > On Sat, Oct 17, 2020 at 05:52:58PM +0200, Jan Stary wrote: > > Currently, mixerctl.conf(5) says > > > > Most devices have a number of digital to analogue converters > > (DACs), used for sound

mixerctl names

2020-10-17 Thread Jan Stary
Currently, mixerctl.conf(5) says Most devices have a number of digital to analogue converters (DACs), used for sound playback, and each DAC has a corresponding output mixer. The mixers are labelled “mix” or “sel”. That doesn't seem to be the case, at least not universaly

Re: acpicpu(4) and ACPI0007

2020-08-01 Thread Jan Stary
On Aug 01 18:23:08, jonat...@d14n.org wrote: > Much better theory: the acpicpu_sc array has MAXCPUS elements, but on this > system (and all R6415s, as far as I can tell) we have more acpicpu devices > than that. I suppose we should just make acpicpu_match fail if cf->cf_unit > is >= MAXCPUS as we

Re: LOCALE_HOME for strtime(3)

2020-08-01 Thread Jan Stary
ping On Jul 16 09:23:22, h...@stare.cz wrote: > On Jul 15 15:48:41, mill...@openbsd.org wrote: > > Upstream tzcode removed the LOCALE_HOME bits in 2014. There's no > > reason for us to keep it. > > With that removed, the header file can go too. > > Jan > > > Index:

LC_MESSAGES in xargs(1)

2020-07-16 Thread Jan Stary
Does xargs need to set LC_MESSAGES? Jan Index: usr.bin/xargs/xargs.c === RCS file: /cvs/src/usr.bin/xargs/xargs.c,v retrieving revision 1.34 diff -u -p -r1.34 xargs.c --- usr.bin/xargs/xargs.c 12 Jun 2018 15:24:31

Re: LOCALE_HOME for strtime(3)

2020-07-16 Thread Jan Stary
On Jul 15 15:48:41, mill...@openbsd.org wrote: > Upstream tzcode removed the LOCALE_HOME bits in 2014. There's no > reason for us to keep it. With that removed, the header file can go too. Jan Index: lib/libc/time/strftime.c

LOCALE_HOME for strtime(3)

2020-07-15 Thread Jan Stary
The OpenBSD libc tends to ignore the LC_* except LC_CTYPE. However, strftime(3) seems to support a LOCALE_HOME thing, where the user overrides LC_TIME with his own names of months etc. Looking at http://cvsweb.openbsd.org/src/lib/libc/time/strftime.c , it has been there since the beginning. The

no need for "extern optind" etc

2020-07-15 Thread Jan Stary
This is in the vein of https://marc.info/?l=openbsd-cvs=158170787221615=2 declares "extern int optind" and friends, so there is no need to declare them again. Still builds on current/amd64. Leaving out gnu, nsd, unbound (third party) and tic (is that third party)? Also leaving out pr and rcs

dd bs= supercede ibs= and obs=

2020-02-15 Thread Jan Stary
On Feb 14 17:04:51, schwa...@usta.de wrote: > Jason McIntyre wrote on Fri, Feb 14, 2020 at 07:28:59AM +: > > On Thu, Feb 13, 2020 at 11:25:07PM +0100, Jan Stary wrote: > >> * Fix a factual error in the description of bs: it does not > >> supersede ibs/obs,

Re: dd(1) wording and style

2020-02-15 Thread Jan Stary
Hi, On Feb 14 17:37:27, schwa...@usta.de wrote: > Hi, > > Jason McIntyre wrote on Fri, Feb 14, 2020 at 07:28:59AM +: > > On Thu, Feb 13, 2020 at 11:25:07PM +0100, Jan Stary wrote: > > >> -.It Cm seek= Ns Ar n > >> +.It Cm seek Ns = Ns Ar n >

Re: extern already declared

2020-02-13 Thread Jan Stary
-u -p -r1.15 fmt_test.c > --- regress/lib/libutil/fmt_scaled/fmt_test.c 16 Mar 2017 02:42:31 - > 1.15 > +++ regress/lib/libutil/fmt_scaled/fmt_test.c 9 Feb 2020 16:23:49 - > @@ -36,8 +36,6 @@ __dead static void usage(int stat) > int > main(int argc, char **argv)

Re: remove needless #ifdef

2020-02-13 Thread Jan Stary
On Feb 10 09:28:38, yasu...@openbsd.org wrote: > Hi, > > On Sun, 09 Feb 2020 19:28:50 +0100 > Jeremie Courreges-Anglas wrote: > > On Sun, Feb 09 2020, Jan Stary wrote: > >> Currently, sys/net/pipex_local.h asks #ifdef __OpenBSD__ > >> and if so, defines &qu

Re: dd(1) wording and style

2020-02-13 Thread Jan Stary
On Feb 13 23:25:07, h...@stare.cz wrote: > This diff changes the dd(1) manpage in the following ways: > > * Replace "It Cm if= Ns Ar file" with "It Cm if Ns = Ns Ar file" > and similarly for others. The operand is "if", not "if="; > the "Ns = Ns" might be a slightly excessive markup, > but

dd(1) wording and style

2020-02-13 Thread Jan Stary
This diff changes the dd(1) manpage in the following ways: * Replace "It Cm if= Ns Ar file" with "It Cm if Ns = Ns Ar file" and similarly for others. The operand is "if", not "if="; the "Ns = Ns" might be a slightly excessive markup, but common: grep -Fr 'Ns = Ns' /usr/share/man | wc -l

Re: Audio control API, part 1: libsndio, sndiod bits

2020-02-12 Thread Jan Stary
On Feb 12 21:38:56, a...@caoua.org wrote: > On Wed, Feb 12, 2020 at 09:22:20PM +0100, Jan Stary wrote: > > Hi, > > > > On Feb 09 13:13:02, a...@caoua.org wrote: > > > cd /usr/src > > > patch -p0 <1.diff > > > patch -p0 <2.diff > >

Re: Audio control API, part 1: libsndio, sndiod bits

2020-02-12 Thread Jan Stary
Hi, On Feb 09 13:13:02, a...@caoua.org wrote: > cd /usr/src > patch -p0 <1.diff > patch -p0 <2.diff > patch -p0 <3.diff > cd /usr/src/include && doas make includes > cd /usr/src/lib/libsndio && make obj && make && doas make install > cd /usr/src/lib/libossaudio && make obj && make && doas make

Re: Audio control API, part 1: libsndio, sndiod bits

2020-02-12 Thread Jan Stary
Hi, On Feb 09 13:13:02, a...@caoua.org wrote: > cd /usr/src > patch -p0 <1.diff > patch -p0 <2.diff > patch -p0 <3.diff > cd /usr/src/include && doas make includes > cd /usr/src/lib/libsndio && make obj && make && doas make install > cd /usr/src/lib/libossaudio && make obj && make && doas make

Re: don't try to signal with newsyslog -r

2020-02-10 Thread Jan Stary
On Feb 10 14:53:33, mill...@openbsd.org wrote: > On Mon, 10 Feb 2020 17:12:53 +0100, Jan Stary wrote: > > > The -r option of newsyslog(8) removes the requirement > > that newsyslog runs as root. Would it also make sense > > to not try to send the SIGHUP to syslogd in th

Re: don't try to signal with newsyslog -r

2020-02-10 Thread Jan Stary
Hi Ingo, On Feb 10 22:40:20, schwa...@usta.de wrote: > > The -r option of newsyslog(8) removes the requirement > > that newsyslog runs as root. Would it also make sense > > to not try to send the SIGHUP to syslogd in that case? > > While i'm not sure that i want to take care of this patch, >

don't try to signal with newsyslog -r

2020-02-10 Thread Jan Stary
The -r option of newsyslog(8) removes the requirement that newsyslog runs as root. Would it also make sense to not try to send the SIGHUP to syslogd in that case? Jan Index: newsyslog.8 === RCS file:

setlocale() in cron

2020-02-10 Thread Jan Stary
Why does cron(8) and crontab(1) need to setlocale()? Jan Index: cron.c === RCS file: /cvs/src/usr.sbin/cron/cron.c,v retrieving revision 1.77 diff -u -p -r1.77 cron.c --- cron.c 23 Oct 2017 15:15:22 - 1.77 +++

cp.c and rm.c embedded in mv(1)

2020-02-10 Thread Jan Stary
mv code contains copies of cp.c and rm.c - is that so that mv can avoid the fork+exec (and call the relevant cp/rm code itself)? If so, is it so that mv can be pledged? It isn't. There must be something worth the duplication ... Jan

Re: Add -R alias to -r for scp(1)

2020-02-09 Thread Jan Stary
On Jan 02 11:30:35, es...@nerim.net wrote: > Once in three times, I type scp -R and go "oh fuck" when it doesn't work. Same here with 'ssh -p' vs 'scp -P'.

remove the 'support' for troff fonts in lp[rd]

2020-02-09 Thread Jan Stary
(Replying to an old thread) On Jan 28 12:06:42, chrisbenn...@bennettconstruction.us wrote: > #define _PATH_VFONT "/usr/libdata/vfont/" > #define _PATH_VFONTB"/usr/libdata/vfont/B" > #define _PATH_VFONTI"/usr/libdata/vfont/I" > #define

Re: extern already declared

2020-02-09 Thread Jan Stary
On Feb 09 09:49:35, mill...@openbsd.org wrote: > On Sun, 09 Feb 2020 17:46:51 +0100, Jan Stary wrote: > > > Whenever unistd.h declares getopt(3), it also declares > > the extern optind and optarg, so files including unistd.h > > don't need to declare those themselves, ri

afile.h not wav.h

2020-02-09 Thread Jan Stary
The afile.h include has been so named for some time but the corresponding #define has not been changed from WAV_H - not that it matters much of course. Jan Index: afile.h === RCS file: /cvs/src/usr.bin/aucat/afile.h,v

extern already declared

2020-02-09 Thread Jan Stary
Whenever unistd.h declares getopt(3), it also declares the extern optind and optarg, so files including unistd.h don't need to declare those themselves, right? Jan Index: games/fortune/strfile/strfile.c === RCS file:

remove needless #ifdef

2020-02-09 Thread Jan Stary
Currently, sys/net/pipex_local.h asks #ifdef __OpenBSD__ and if so, defines "Static" to be nothing, to use it later. That can go away, right? Jan Index: sys/net/pipex_local.h === RCS file: /cvs/src/sys/net/pipex_local.h,v

EC_POINT_new.3 glitch

2019-03-18 Thread Jan Stary
This seems to be a missed newline. Jan Index: EC_POINT_new.3 === RCS file: /cvs/src/lib/libcrypto/man/EC_POINT_new.3,v retrieving revision 1.9 diff -u -p -r1.9 EC_POINT_new.3 --- EC_POINT_new.3 29 Mar 2018 20:56:49

zic(8) unneeded header

2019-01-11 Thread Jan Stary
zic.c does not need to include Jan Index: zic.c === RCS file: /cvs/src/usr.sbin/zic/zic.c,v retrieving revision 1.22 diff -u -p -r1.22 zic.c --- zic.c 15 Mar 2016 19:50:47 - 1.22 +++ zic.c 11 Jan 2019

locale in locate(1)

2019-01-10 Thread Jan Stary
Does locate(1) need to setlocale(3)? Jan Index: locate/locate.c === RCS file: /cvs/src/usr.bin/locate/locate/locate.c,v retrieving revision 1.31 diff -u -p -r1.31 locate.c --- locate/locate.c 19 Nov 2015 21:46:05 -

locale in comm(1)

2019-01-10 Thread Jan Stary
Does comm(1) need to setlocale(3)? It uses strcoll(3) by default, which ignores the locale and does what strcmp(3) does, or strcasecmp(3) with -f, which ignores the locale too. So remove the setlocale(3), remove the header, the LC_ that have been commented out since the initial revision in 1995,

LC_TIME in calendar(1)

2019-01-10 Thread Jan Stary
calendar imho doesn't need to setlocale(LC_TIME, ...) before and after strftime(3), as LC_TIME is ignored. Jan Index: day.c === RCS file: /cvs/src/usr.bin/calendar/day.c,v retrieving revision 1.34 diff -u -p -r1.34 day.c ---

Re: LC_NUMERIC in wprintf(3)

2019-01-10 Thread Jan Stary
On Jan 10 14:43:39, h...@stare.cz wrote: > The wprintf(3) manpage says > > The decimal point character is defined > in the program's locale (category LC_NUMERIC) > > but LC_NUMERIC is ignored in OpenBSD's C library, > as explained in setlocale(3). > > Would it be an improvement to

LC_NUMERIC in wprintf(3)

2019-01-10 Thread Jan Stary
The wprintf(3) manpage says The decimal point character is defined in the program's locale (category LC_NUMERIC) but LC_NUMERIC is ignored in OpenBSD's C library, as explained in setlocale(3). Would it be an improvement to remove that sentence? (Removing a needless newline while

Re: pcap_dispatch() returning zero

2018-12-20 Thread Jan Stary
No really, it reads 20 packets and returns zero. On Dec 08 13:56:09, h...@stare.cz wrote: > The return value of pcap_dispatch() is described in pcap.3 as follows: > > The number of packets read is returned. > Zero is returned when EOF is reached in a savefile. > A return of -1 indicates an

Re: pcap_dispatch() returning zero

2018-12-14 Thread Jan Stary
ping On Dec 08 13:56:09, h...@stare.cz wrote: > The return value of pcap_dispatch() is described in pcap.3 as follows: > > The number of packets read is returned. > Zero is returned when EOF is reached in a savefile. > A return of -1 indicates an error in which case ... > > It will also

[no subject]

2018-12-10 Thread Jan Stary
Currently, pcap_setdirection() is described in pcap.3 as follows: pcap_setdirection() is used to limit the direction that packets must be flowing in order to be captured. The "direction" is not described, except in pcap.h. Should the constants be mentioned in the manpage? Also, the direction

pcap_dump() arguments

2018-12-10 Thread Jan Stary
pcap_dump() is described in pcap.3 as follows: pcap_dump() outputs a packet to the savefile opened with pcap_dump_open(). Note that its calling arguments are suitable for use with pcap_dispatch(). That formulation is imho not entirely clear, as the arguments mention no "savefile". (Looking

pcap_dispatch() returning zero

2018-12-08 Thread Jan Stary
The return value of pcap_dispatch() is described in pcap.3 as follows: The number of packets read is returned. Zero is returned when EOF is reached in a savefile. A return of -1 indicates an error in which case ... It will also return zero on the last short read (as "EOF is reached"). So

ifconfig DIAGNOSTICS

2018-10-22 Thread Jan Stary
The wording of ifconfig DIAGNOSTICS can possibly baffle a non-native speaker (such as me) with Messages indicating the specified interface does not exist, namely, only after parsing the (non)sentence does one realize that the diagnostics consists of messages indicating THAT the interface does

interpolation -> interpretation

2018-04-11 Thread Jan Stary
I am not a native speaker, but printf(3) "interprets" the conversion specifiers, it does not "interpolate" them, right? Jan Index: printf.3 === RCS file: /cvs/src/lib/libc/stdio/printf.3,v retrieving revision 1.78 diff -u -p

/usr/local/sbin in default PATH?

2017-12-06 Thread Jan Stary
Both _PATH_DEFPATH and _PATH_STDPATH, as defined in paths.h, include /usr/local/bin but not /usr/local/sbin, as opposed to /usr/bin:/bin:/usr/sbin:/sbin. Is that intentional? Jan Index: include/paths.h === RCS file:

Re: Sh FILES without Pa

2017-11-09 Thread Jan Stary
On Nov 09 12:36:29, h...@stare.cz wrote: > Question: > > static int > child_an(const struct roff_node *n) > { > for (n = n->child; n != NULL; n = n->next) > if ((n->tok == MDOC_An && n->child != NULL) || child_an(n)) > return 1; > return 0; > } > >

Sh FILES without Pa

2017-11-09 Thread Jan Stary
Hi Ingo, currently, mandoc DIAGNOSTICS recognizes an AUTHORS section without An. Would it be similarly useful to recognize a FILES section without Pa? I left the empty lines after the opening { in case they are intended, just like child_an() and post_sh_authors() have them, but feel free to

Re: optind and friends are already declared

2017-11-06 Thread Jan Stary
If there is any interest in this at all, there's a similar diff for usr.bin/ and usr.sbin/ Jan > On Nov 03 18:34:11, h...@stare.cz wrote: > > Including when using getopt(3) also makes > > extern int opterr, optind, optopt, optreset; > > and friends declared, but many utils redeclare

Re: ieee80211: disable wpa/wep when changing nwid

2017-11-06 Thread Jan Stary
On Nov 05 17:57:25, phess...@openbsd.org wrote: > Changing nwid on a wifi network means it is a new network. By definition > the WPA crypto keys use the nwid as part of the crypto hash. And it is > super unlikely that a differently named network will have the same WEP > key. In that case, you

Re: optind and friends are already declared

2017-11-03 Thread Jan Stary
> On Nov 03 18:34:11, h...@stare.cz wrote: > > Including when using getopt(3) also makes > > extern int opterr, optind, optopt, optreset; > > and friends declared, but many utils redeclare them again. Here is a diff for regress/ Jan Index: lib/libc/db/dbtest.c

Re: optind and friends are already declared

2017-11-03 Thread Jan Stary
> On Nov 03 18:34:11, h...@stare.cz wrote: > > Including when using getopt(3) also makes > > extern int opterr, optind, optopt, optreset; > > and friends declared, but many utils redeclare them again. > > > > Is there a reason for that, or can those be removed? > > As a harmless example, here's

Re: optind and friends are already declared

2017-11-03 Thread Jan Stary
(Sorry for the missing Subject.) On Nov 03 18:34:11, h...@stare.cz wrote: > Including when using getopt(3) also makes > extern int opterr, optind, optopt, optreset; > and friends declared, but many utils redeclare them again. > > Is there a reason for that, or can those be removed? > As a

[no subject]

2017-11-03 Thread Jan Stary
Including when using getopt(3) also makes extern int opterr, optind, optopt, optreset; and friends declared, but many utils redeclare them again. Is there a reason for that, or can those be removed? As a harmless example, here's a diff to games. Jan Index: fortune/strfile/strfile.c

xargs doesn't need to setlocale()

2017-11-03 Thread Jan Stary
It seems that xargs(1) sets LC_MESSAGE in case someone would like to give a 'y' response to xargs -p in their native tongue. Is that so, and is that intended? I never new locale(1) is also supposed to specify what "an affirmative response, ‘y’ in the POSIX locale" is, as the current manpage puts

pr(1) - ignore LC_TIME

2017-11-01 Thread Jan Stary
Doesn't OpenBSD strftime() ignore LC_TIME anyway? Jan Index: pr.c === RCS file: /cvs/src/usr.bin/pr/pr.c,v retrieving revision 1.39 diff -u -p -r1.39 pr.c --- pr.c11 Nov 2015 02:52:46 - 1.39 +++ pr.c

zic.c does not need locale.h

2017-11-01 Thread Jan Stary
Index: zic.c === RCS file: /cvs/src/usr.sbin/zic/zic.c,v retrieving revision 1.22 diff -u -p -r1.22 zic.c --- zic.c 15 Mar 2016 19:50:47 - 1.22 +++ zic.c 1 Nov 2017 15:52:04 - @@ -11,7 +11,6 @@ #include

awk setlocale(LC_NUMERIC)

2017-11-01 Thread Jan Stary
Why does awk need to fiddle with LC_NUMERIC? Jan Index: main.c === RCS file: /cvs/src/usr.bin/awk/main.c,v retrieving revision 1.21 diff -u -p -r1.21 main.c --- main.c 9 Oct 2017 14:51:31 - 1.21 +++ main.c

rm exits 0

2017-10-27 Thread Jan Stary
"rm exits 0" does not seem right (though I'm not a native speaker). Jan Index: rm.1 === RCS file: /cvs/src/bin/rm/rm.1,v retrieving revision 1.42 diff -u -p -r1.42 rm.1 --- rm.128 Jun 2017 06:24:39 - 1.42

Re: bc(1) examples

2017-10-08 Thread Jan Stary
On Oct 08 11:31:16, o...@drijf.net wrote: > On Fri, Oct 06, 2017 at 02:12:01PM +0200, Jan Stary wrote: > > > Isn't "4 * a(1)" a more natural incarnation of pi than "2 * a(2^1)"? > > The point of this example is to (also) show that a() works on very >

bc -l wording

2017-10-06 Thread Jan Stary
Currently, the bc(1) manpage describes "-l" as Allow specification of an arbitrary precision math library I am not a native speaker, but "specification of a library" seems unclear here. It loads /usr/share/misc/bc.library, not that the user could "specify" some other library to load.

bc(1) examples

2017-10-06 Thread Jan Stary
Isn't "4 * a(1)" a more natural incarnation of pi than "2 * a(2^1)"? Jan Index: bc.1 === RCS file: /cvs/src/usr.bin/bc/bc.1,v retrieving revision 1.32 diff -u -p -r1.32 bc.1 --- bc.117 Nov 2015 05:45:35 -

int32_t float word of M_PI_4

2017-09-26 Thread Jan Stary
The int32_t float word of M_PI_4 is 0x3f490fdb, not 0x3f490fd8. Jan On Sep 26 11:57:29, i...@darwinsys.com wrote: > On 2017-09-26 11:41 AM, Jan Stary wrote: > >double 0.785398, high word 0x3fe921fb > >float 0.785398, float word 0x3f490fdb > > > &

Xr cos(3) in sin(3)

2017-09-26 Thread Jan Stary
Every trigonometric function's manpage references every other, with a single exception: sin(3) does not Xr cos 3. Jan Index: sin.3 === RCS file: /cvs/src/lib/libm/man/sin.3,v retrieving revision 1.16 diff -u -p -r1.16 sin.3

Re: sin() implementation

2017-09-26 Thread Jan Stary
On Sep 26 17:41:17, h...@stare.cz wrote: > > > s_sin.c normalizes the argument to [-pi/4, +pi/4]. > > > This is how |x| <= pi/4 is tested: > > > > > > GET_HIGH_WORD(ix,x); > > > ix &= 0x7fff; > > > if(ix <= 0x3fe921fb) return __kernel_sin(x,z,0); > > > > > > Why is it done like that?

Re: sin() implementation

2017-09-26 Thread Jan Stary
These (diff below) seem to be obvious typos in k_sin.c, but only in comments. The comment that says if x < 2^-27 (hx<0x3e40), return x with inexact if x!=0 also puzzles me a bit: what the code does is GET_HIGH_WORD(ix,x); ix &= 0x7fff; /*

Re: sin() implementation

2017-09-26 Thread Jan Stary
> > s_sin.c normalizes the argument to [-pi/4, +pi/4]. > > This is how |x| <= pi/4 is tested: > > > > GET_HIGH_WORD(ix,x); > > ix &= 0x7fff; > > if(ix <= 0x3fe921fb) return __kernel_sin(x,z,0); > > > > Why is it done like that? Is it faster or more portable > > or in any way

Re: sin() implementation

2017-09-26 Thread Jan Stary
On Sep 26 13:27:52, h...@stare.cz wrote: > I picked sin() as an example while trying to walk though the implementation > of (pieces of) libm. If someone has the time for it, I have some questions. > > I understand the implementation originaly stems from Sun's libm of 1993. > (As does that of

sin() implementation

2017-09-26 Thread Jan Stary
I picked sin() as an example while trying to walk though the implementation of (pieces of) libm. If someone has the time for it, I have some questions. I understand the implementation originaly stems from Sun's libm of 1993. (As does that of FreeBSD and NetBSD.) It has been tweaked over the

calendar vs KOI8

2017-07-26 Thread Jan Stary
Is 5.9 out yet? Index: io.c === RCS file: /cvs/src/usr.bin/calendar/io.c,v retrieving revision 1.44 diff -u -p -r1.44 io.c --- io.c31 Aug 2016 09:38:47 - 1.44 +++ io.c26 Jul 2017 20:21:09 - @@ -89,13

LC_NUMERIC in awk

2017-07-26 Thread Jan Stary
Does awk really need to set and reset LC_NUMERIC? Does it need to set locale at all? Jan Index: main.c === RCS file: /cvs/src/usr.bin/awk/main.c,v retrieving revision 1.19 diff -u -p -r1.19 main.c --- main.c 22 Oct

Re: kern.allowkmem in examples?

2017-05-22 Thread Jan Stary
> On Mon, May 22, 2017 at 02:00:51PM +0200, Jan Stary wrote: > > acpidump(8) wants kern.allowkmem. > > Does it make sense to put that into examples sysctl.conf? On May 22 09:06:51, dera...@openbsd.org wrote: > No, in fact I want to kill that sysctl eventual

kern.allowkmem in examples?

2017-05-22 Thread Jan Stary
acpidump(8) wants kern.allowkmem. Does it make sense to put that into examples sysctl.conf? Jan Index: sysctl.conf === RCS file: /cvs/src/etc/examples/sysctl.conf,v retrieving revision 1.4 diff -u -p -r1.4 sysctl.conf ---

Re: AUDIO_DEV_SOUND

2017-05-15 Thread Jan Stary
On May 15 16:36:41, a...@caoua.org wrote: > On Mon, May 15, 2017 at 10:14:48AM +0200, Jan Stary wrote: > > While /dev/sound is no more, the > > > > #define AUDIO_DEV_SOUND 0 /* minor of /dev/sound0 */ > > > > apparently cannot

AUDIO_DEV_SOUND

2017-05-15 Thread Jan Stary
While /dev/sound is no more, the #define AUDIO_DEV_SOUND 0 /* minor of /dev/sound0 */ apparently cannot be just removed from dev/audio.c - with the diff below, all audio applications complain that the default audio device cannot be opened. Why is that? That comment seems

/dev/sound

2017-03-26 Thread Jan Stary
Now that /dev/sound is gone, should AUDIO_DEV_SOUND be removed from audio.c ? Jan Index: audio.c === RCS file: /cvs/src/sys/dev/audio.c,v retrieving revision 1.161 diff -u -p -r1.161 audio.c --- audio.c 11 Mar 2017

xdm in afterboot

2017-03-01 Thread Jan Stary
The transition from xdm to xenodm is not reflected in afterboot(8). Jan Index: share/man/man8/afterboot.8 === RCS file: /cvs/src/share/man/man8/afterboot.8,v retrieving revision 1.157 diff -u -p -u -p -r1.157 afterboot.8 ---

ntpd.conf

2016-12-29 Thread Jan Stary
Markup a forgotten keyword. Jan Index: ntpd.conf.5 === RCS file: /cvs/src/usr.sbin/ntpd/ntpd.conf.5,v retrieving revision 1.33 diff -u -p -r1.33 ntpd.conf.5 --- ntpd.conf.5 23 Oct 2015 14:52:20 - 1.33 +++

does cron/crontab need locale?

2016-11-05 Thread Jan Stary
Index: cron.c === RCS file: /cvs/src/usr.sbin/cron/cron.c,v retrieving revision 1.74 diff -u -p -r1.74 cron.c --- cron.c 11 Jan 2016 14:23:50 - 1.74 +++ cron.c 5 Nov 2016 13:12:49 - @@ -28,7 +28,6 @@ #include

zic(8) does not need locale.h

2016-11-05 Thread Jan Stary
Index: zic.c === RCS file: /cvs/src/usr.sbin/zic/zic.c,v retrieving revision 1.22 diff -u -p -r1.22 zic.c --- zic.c 15 Mar 2016 19:50:47 - 1.22 +++ zic.c 5 Nov 2016 13:07:52 - @@ -11,7 +11,6 @@ #include

Re: newlines in unexpand(1)

2016-11-05 Thread Jan Stary
ping On Oct 10 22:02:20, h...@stare.cz wrote: > On Oct 10 15:22:01, t...@tedunangst.com wrote: > > Jan Stary wrote: > > > Why do we need to trim the newlines in unexpand(1)? > > > The result seems to be the same without it. > > > > > >

remove useless extern declaration

2016-10-19 Thread Jan Stary
extern char *optarg is already declared in unistd.h This is the only occurence in src/sbin and src/bin; others will follow in separate mails. Jan Index: bioctl.c === RCS file: /cvs/src/sbin/bioctl/bioctl.c,v retrieving

Re: usb disk dirty after every reboot

2016-10-19 Thread Jan Stary
On Oct 16 10:14:14, s...@sfritsch.de wrote: > [moving to tech@] > > On Tuesday, 20 September 2016 08:03:32 CEST Stefan Fritsch wrote: > > On Tue, 20 Sep 2016, Darren Tucker wrote: > > > On Tue, Sep 20, 2016 at 1:43 AM, Jan Stary <h...@stare.cz> wrote: > > &g

Re: iwm: rts for long frames only

2016-10-19 Thread Jan Stary
On Oct 06 17:56:50, s...@stsp.name wrote: > Stop using RTS for every data frame sent by iwm(4). > RTS adds unneccessary overhead if small data frames are sent. > > The USE_RTS flag in iwm's LQ command enables RTS unconditionally, so only > set it while the AP is enforcing protection. The flag

Re: drop unused locale junk from sort(1)

2016-10-19 Thread Jan Stary
ping On Oct 11 15:37:03, schwa...@usta.de wrote: > Jan Stary wrote on Tue, Oct 11, 2016 at 11:26:50AM +0200: > > > Feeling encouraged by Ingo's ok to remove locale from cp/rm, > > here's a diff that removes the locale stuff we don't actually do > > from the code and

Re: remove unused flags from the cp.c inside mv(1)

2016-10-14 Thread Jan Stary
ping On Oct 10 21:39:16, h...@stare.cz wrote: > The embedded cpmain() will never have _any_ flags set, > as mv.c calls it as > > argv[0] = from; > argv[1] = to; > argv[2] = NULL; > cpmain(2, argv); > > There is probably more code that could be romoved > form the embedded

remove KOI8 after 5.9 is out

2016-10-14 Thread Jan Stary
Index: io.c === RCS file: /cvs/src/usr.bin/calendar/io.c,v retrieving revision 1.44 diff -u -p -r1.44 io.c --- io.c31 Aug 2016 09:38:47 - 1.44 +++ io.c14 Oct 2016 07:27:52 - @@ -89,13 +89,9 @@ cal(void)

Re: let head(1) understand `-' as stdin

2016-10-12 Thread Jan Stary
On Oct 12 23:23:18, t...@math.ethz.ch wrote: > > Let me clarify the idea. > > If a filter recognizes '-' as a name for stdin, > > then stdin can be one of the _multiple_ files being processed. > > Filters that do not recognize '-' as a name, on the other hand, > > only process stdin if it is the

Re: let head(1) understand `-' as stdin

2016-10-12 Thread Jan Stary
> > > The diff below makes head(1) recognize `-' > > > as a name for the standard input, > > > as many other utilities do. On Oct 11 23:55:26, schwa...@usta.de wrote: > > Do standards permit that extension? > > POSIX neither requires nor forbids it, but encourages consistency > among all the

Re: enforce zero options

2016-10-12 Thread Jan Stary
On Oct 12 15:00:23, j...@wxcvbn.org wrote: > Jan Stary <h...@stare.cz> writes: > > > Some programs in bin/ and usr.bin/ use the following idiom > > to make sure that there are no options present: > > > > while ((ch = getopt(argc, argv, &q

enforce zero options

2016-10-12 Thread Jan Stary
Some programs in bin/ and usr.bin/ use the following idiom to make sure that there are no options present: while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': default: usage();

remove locale from logname(1)

2016-10-12 Thread Jan Stary
Why does logname(1) need to setlocale? Jan Index: logname.c === RCS file: /cvs/src/usr.bin/logname/logname.c,v retrieving revision 1.9 diff -u -p -r1.9 logname.c --- logname.c 9 Oct 2015 01:37:08 - 1.9 +++

Re: hide iwn firmware error log

2016-10-11 Thread Jan Stary
On Oct 06 12:46:21, s...@stsp.name wrote: > Disable the detailed fatal firmware error log in iwn(4) by default. These are my iwm errors of today on a Dell Latitude E5570. Oct 11 16:26:56 dell /bsd: iwm0: fatal firmware error Oct 11 16:26:56 dell /bsd: iwm0: device timeout Oct 11 16:26:56 dell

Re: let head(1) understand `-' as stdin

2016-10-11 Thread Jan Stary
On Oct 11 13:35:34, dera...@openbsd.org wrote: > This is command used in scripts. Scripts are often portable. If one > operating system has an extension, but others don't, then those > scripts become unportable to use use of these extensions. GNU head(1) has it, Solaris does not. (I don't have

Re: let head(1) understand `-' as stdin

2016-10-11 Thread Jan Stary
On Oct 11 21:27:54, j...@wxcvbn.org wrote: > Jan Stary <h...@stare.cz> writes: > > > The diff below makes head(1) recognize `-' > > as a name for the standard input, > > as many other utilities do. > > Makes sense to me. The following points could

Re: drop unused locale junk from sort(1)

2016-10-11 Thread Jan Stary
On Oct 11 15:37:03, schwa...@usta.de wrote: > > and change /var/tmp to /tmp. > > No, according to file.c, the program still writes to /var/tmp, > not to /tmp. Before changing that in the manual, we would have > to change it in the code. I sent that in a separate email; this is a leftover,

let head(1) understand `-' as stdin

2016-10-11 Thread Jan Stary
The diff below makes head(1) recognize `-' as a name for the standard input, as many other utilities do. Jan Index: head.1 === RCS file: /cvs/src/usr.bin/head/head.1,v retrieving revision 1.23 diff -u -p -r1.23 head.1 ---

drop unused locale junk from sort(1)

2016-10-11 Thread Jan Stary
Feeling encouraged by Ingo's ok to remove locale from cp/rm, here's a diff that removes the locale stuff we don't actually do from the code and documentation of sort(1). Leave just LC_CTYPE which determines isblank() and case conversions. Annotate a missed -z flag while there, and change /var/tmp

Re: setlocale in cp/rm/mv

2016-10-11 Thread Jan Stary
On Oct 11 10:31:38, schwa...@usta.de wrote: > > cp(1) and rm(1) call setlocale(LC_ALL, "") but mv(1) does not. > > Why do they do that, and why mv doesn't? > > That is useless and wasteful. > > I think it comes from a time when people still thought that doing > more and more and more might bring

cp.c and rm.c embedded in mv(1)

2016-10-11 Thread Jan Stary
mv's copies of cp.c and rm.c were imported about 10 months ago so that mv can avoid the fork+exec; instead, mv just calls the relevant cp/rm code itself. What was the motivation for that? Was that a step needed to have a stricter pledge() for mv (no forking and execing)? Currently, mv does not

  1   2   >