compat32 status

2025-01-08 Thread Valery Ushakov
https://man.netbsd.org/compat_netbsd32.8 seems to hint that /emul is a thing of the past, but doesn't elaborate. The guide doesn't seem to cover this topic either. Do we have this documented somewhere besides RTFS? We now build compat32 libs for the base system as part of the build. Are those li

Re: fgets(3) man page clarity on when NUL appended

2024-12-13 Thread Valery Ushakov
[summoning kre@] On Thu, Dec 12, 2024 at 13:58:06 -0600, J. Lewis Muir wrote: > fgets() reads EOF right away, it does not append a NUL character. (I > confirmed this behavior on NetBSD 9.3 release.) I think it would be > helpful to clarify this in the man page. If it reads EOF right away, it r

Re: `ls -1s` doesn't print "total"

2024-11-03 Thread Valery Ushakov
On Sun, Nov 03, 2024 at 14:37:11 -0500, Jan Schaumann wrote: > The fix is trivial (see attached), but I wanted to > check whether perhaps this was done by intent and > there's a reason why we're not printing the total when > using `-1`? If I had to guess (I'm too lazy to look and it's more fun th

Re: Use of feature test macros

2024-11-03 Thread Valery Ushakov
On Sun, Nov 03, 2024 at 02:02:59 +0100, Roland Illig wrote: > Am 03.11.2024 um 00:52 schrieb Robert Elz: > > Date:Sat, 2 Nov 2024 22:36:10 +0100 > > From:Roland Illig > > > > | Is the "- 0" in the first expression really necessary? If so, for which > > | cases? > > > >

Re: ls.1: incorrect -O flag description

2024-10-11 Thread Valery Ushakov
Hi, Thor. Do you remember what was the original intention behind ls -O? On Fri, Oct 11, 2024 at 13:16:32 +0200, tlaro...@kergis.com wrote: > On Fri, Oct 11, 2024 at 05:35:11AM +0300, Valery Ushakov wrote: > > On Thu, Oct 10, 2024 at 21:37:15 +0200, tlaro...@kergis.com wrote: > >

Re: ls.1: incorrect -O flag description

2024-10-10 Thread Valery Ushakov
On Thu, Oct 10, 2024 at 21:37:15 +0200, tlaro...@kergis.com wrote: > The -O (not a POSIX one) flag seems incorrectly described in the manual > page. > > What it does (from a cursory look at the sources, matching the result > of testing), is simply not displaying a supplementary information > abou

postinstall vs. obsolete libs

2024-09-26 Thread Valery Ushakov
Martin's bin/58697 made me look at postinstall again, which reminded me that _obsolete_libs has an awk script that is unnecessarily opaque (with variable names like "res", "result", "line", a function "digit" that actually returns a number, not necessarily single-digit, etc). Since I had to dig int

Re: interactive shell detection in shrc

2024-09-23 Thread Valery Ushakov
On Tue, Sep 24, 2024 at 05:01:18 +0700, Robert Elz wrote: > | sh .shrc allows you to check that .shrc has no failures, but you cannot > | test how it affected the shell (as opposed to sourcing it). > > That's the point, to test what would happen if it were sourced, > to prevent undesired acti

Re: ed(1) as default editor in sh(1)

2024-09-23 Thread Valery Ushakov
On Mon, Sep 23, 2024 at 22:59:42 +0200, tlaro...@kergis.com wrote: > In commit 684f0c282018583d8983ab6b3218c03da6841159, uwe writes: > > TBH, I was a bit incredulous, but sh's own fc _does_ use ed if EDITOR > is not set, though it seems to be the only program in base to do > thi

Re: interactive shell detection in shrc

2024-09-23 Thread Valery Ushakov
On Tue, Sep 24, 2024 at 00:06:22 +0700, Robert Elz wrote: > Date:Mon, 23 Sep 2024 12:16:10 +0300 > From: Valery Ushakov > Message-ID: > > | I'd like to switch this to the "early return" style, something like > | > | # the

interactive shell detection in shrc

2024-09-23 Thread Valery Ushakov
Our skel files use case "$-" in *i*) # interactive mode settings go here ;; esac which, IMO, is horrible for readability/usability as it suggests that you add your changes to your shrc nested inside a case. I'd like to switch this to the "early return" style, something like #

Re: [PATCH] link.2: NetBSD doesn't allow link(2) to a directory, ever

2024-07-20 Thread Valery Ushakov
On Sat, Jul 20, 2024 at 01:54:49 +0200, наб wrote: > This happens before any call to the VFS, so NetBSD simply refuses links > to directories (this is legal, but the manual needs to be updated). Done. Thanks! -uwe

Re: compilers and unused args in functions

2024-07-04 Thread Valery Ushakov
On Fri, Jul 05, 2024 at 11:36:06 +0700, Robert Elz wrote: > So, now I have all these functions (but one) with an arg they don't > need, and have no use for. > > I could add something stupid like > arg = arg; > or something to use the value (but then the compiler is likely to > warn about ar

Re: awk gensub documentation

2024-06-19 Thread Valery Ushakov
On Wed, Jun 19, 2024 at 10:26:33 -0700, Alistair Crooks wrote: > > I assume what it means to say is \ backreferences, not the 0xa NL > > character, but I wanted to ask the audience. > > > > In src/external/historical/nawk/dist/run.c around line 2137, this is the > definition of gensub(), which do

awk gensub documentation

2024-06-18 Thread Valery Ushakov
My eye accidentally caught this phrase in awk(1), that says in the description of gensub(): Note that the ‘\n’ sequences within replacement string s supported by GNU awk are not supported at this moment. I assume what it means to say is \ backreferences, not the 0xa NL character, but I wanted

Re: new tool: nbupgrade(8)

2024-05-04 Thread Valery Ushakov
On Fri, May 03, 2024 at 22:25:38 +, nia wrote: > Here is an updated version based on the feedback received so far - > thanks for the attention and fixes. In post_install explicitly calling "postinstall check" is redundant. It's the last thing etcupdate does automatically. -uwe

Re: mkcsmapper.1 manpage and NOMAN

2024-05-03 Thread Valery Ushakov
On Fri, May 03, 2024 at 22:56:50 +, Jeremy C. Reed wrote: > manpage was added to source in > > revision 1.1 > date: 2016-06-27 20:07:26 +; author: maya; state: Exp; commitid: > 6ZGENVNUdTQBU8cz; > Add man page for mkcsmapper. > Imported from FreeBSD. > > And it has updates since the

Re: new tool: nbupgrade(8)

2024-05-02 Thread Valery Ushakov
On Thu, May 02, 2024 at 06:52:13 +, nia wrote: > hey, I wrote this script to replace sysupgrade (but maintainable and > not using a weird shell library), would be nice to import it. Just a quick drive-by question: [how] can one use it for self-compiled sets? -uwe

Re: CVS commit: src/tests/lib/libc/gen

2024-04-13 Thread Valery Ushakov
On Sat, Apr 13, 2024 at 14:02:51 +, Roland Illig wrote: > Module Name: src > Committed By: rillig > Date: Sat Apr 13 14:02:51 UTC 2024 > > Modified Files: > src/tests/lib/libc/gen: t_fmtcheck.c > > Log Message: > tests/fmtcheck: show that fmtcheck does not support "%2$s" Quit

Re: Lua binding for curses

2023-08-07 Thread Valery Ushakov
On Mon, Aug 07, 2023 at 23:04:17 +, Charlotte Koch wrote: > I didn't realize that prior art actually mattered... > > I say this because our SQLite bindings in src/lib/lua/sqlite were > homegrown, despite the fact that official Lua-SQLite bindings > have always existed upstream: > > http://lu

Re: Lua binding for curses

2023-08-06 Thread Valery Ushakov
On Mon, Aug 07, 2023 at 07:52:10 +0930, Brett Lymn wrote: > > It would be nice to be able to use the same lua binding with both our > > curses and ncurses. I have a simple screen grabber based on a > > rumpified wsvt25 that I wrote to test and debug the kernel terminal > > emulator(*) and it migh

Re: Lua binding for curses

2023-08-05 Thread Valery Ushakov
On Sat, Aug 05, 2023 at 20:46:58 +, Charlotte Koch wrote: > I've been (slowly) working on a Lua binding for NetBSD curses, with the > intention of adding it to src alongside our other Lua libs (sqlite, > gpio, etc.) > > https://github.com/dressupgeekout/netbsd-lua-curses > > I finally have a

old style tail(1) options and bin/57483

2023-06-30 Thread Valery Ushakov
bin/57483 reports that tail(1) doesn't correctly handle old style options in all cases. The current approach taken by tail is to massage the command line to convert old style options into the new style options and then use getopt to parse only the new style. Unfortunately the code that does the co

mtree(8) vs mtree(5)

2023-06-01 Thread Valery Ushakov
We have mtree(8) man page for our mtree that documents the format of the mtree spec. We also have an mtree(5) page that documents the format of the mtree spec, but that pages comes from libarchive. This is kinda confusing. What is the relationship between the two? (libarchive borrowed bsd code?

mailx (Re: CVS commit: src/usr.bin/tip)

2023-04-25 Thread Valery Ushakov
On Tue, Apr 25, 2023 at 01:48:37 +, David H. Gutteridge wrote: > Module Name: src > Committed By: gutteridge > Date: Tue Apr 25 01:48:37 UTC 2023 > > Modified Files: > src/usr.bin/tip: tip.1 > > Log Message: > tip.1: s/Mail.1/mail.1/ ("Mail" was removed in 9) We still install

Re: style: clean up mentions of old-style C

2023-04-15 Thread Valery Ushakov
On Sat, Apr 15, 2023 at 19:48:04 +0700, Robert Elz wrote: > So, what I think this is saying, in about the most obscure way possible, > is that the '{' for a function block goes on a line by itself, after > the function name & arg list, This is how I read it too. -uwe

Re: Rationale for some rules in style guide

2023-04-12 Thread Valery Ushakov
On Wed, Apr 12, 2023 at 07:53:23 +0930, Brett Lymn wrote: > > > then in alphabetical order > > > > Why does it make sense to sort variables in the order 'bottom, left, > > right, top' instead of the natural pronunciation order 'top, left, > > bottom, right', for example? Or 'height, width, x, y'

Re: style(5) proposal: forbid extern in .c

2023-03-15 Thread Valery Ushakov
On Wed, Mar 15, 2023 at 11:23:05 +, Taylor R Campbell wrote: > Proposal: Forbid extern declarations in .c files. > > extern declarations in .c files invite easily avoided bugs where the > definition and use have mismatched types, because the compiler doesn't > have an opportunity to check the

mail(1) editline defaults to vi mode?

2023-02-17 Thread Valery Ushakov
I had to use mail(1) recently (after ~30 years break :). To my surp^Wconfusion its editline inits itself to vi mode. I think no program should ever init editline to vi mode, unless specifically instructed too. :) PS: I had EDITOR=emacsclient on that system. But even EDITOR=vi is not an excuse t

Re: split(1): add '-c' to continue creating files

2023-02-14 Thread Valery Ushakov
On Tue, Feb 14, 2023 at 17:31:36 +0100, Martin Husemann wrote: > On Sun, Feb 12, 2023 at 04:05:20PM -0500, Jan Schaumann wrote: > > The attached diff adds a flag "-c" (mnemonic "create, > > don't overwrite" or "continue where you left off"): > > > > $ split file; ls > > xaa xab xac xad > > $ spli

Re: strftime(3) oddities with %s, %z

2022-11-02 Thread Valery Ushakov
On Tue, Nov 01, 2022 at 05:20:17 +0700, Robert Elz wrote: > How are you proposing that a portable implementation of strftime() > done today, before the next posix standard is released (maybe next > year, but perhaps not until 2024) would achieve what you're requesting? I think this is the point o

Re: strftime(3) oddities with %s, %z

2022-10-25 Thread Valery Ushakov
On Tue, Oct 25, 2022 at 23:07:56 +0700, Robert Elz wrote: > The standard is going to (as it should) say what works now, and what > applications and users can expect. In this case it is that > strftime("%s") gives the same thing as printf("%ld", mktime()) > when applied to the same tm. [...] > Th

Re: strftime(3) oddities with %s, %z

2022-10-25 Thread Valery Ushakov
On Tue, Oct 25, 2022 at 14:56:23 +0700, Robert Elz wrote: > Date:Tue, 25 Oct 2022 04:08:13 +0300 > From: Valery Ushakov > Message-ID: > > | strftime(3) %s format is not in ISO C or POSIX, though the rumor is > | that it will be in the next POSI

Re: strftime(3) oddities with %s, %z

2022-10-24 Thread Valery Ushakov
On Tue, Oct 25, 2022 at 04:08:13 +0300, Valery Ushakov wrote: > musl seems to do the right thing. Its mktime obeys the "expressed as > local time" requirement and ignores tz-related state in tm, but %s > gets you the original time_t back from the > > time_t -&g

strftime(3) oddities with %s, %z

2022-10-24 Thread Valery Ushakov
strftime(3) %s format is not in ISO C or POSIX, though the rumor is that it will be in the next POSIX version. Our man page and Solaris man page both just say it's the number of seconds since the Epoch. glibc says (ubuntu 22.04): The number of seconds since the Epoch, 1970-01-01 00:00:00 +

Re: mkdir -p, autoconf

2022-10-08 Thread Valery Ushakov
On Sat, Oct 08, 2022 at 02:45:39 +, David Holland wrote: > On Fri, Oct 07, 2022 at 02:31:28PM -0400, Greg Troxel wrote: > > The point is not that they exist, but that the program is robust against > > something else creating them. Given autoconf macros have concerns about > > parallel exec

Re: alloca again

2022-10-05 Thread Valery Ushakov
On Wed, Oct 05, 2022 at 12:06:10 +, nia wrote: > On Tue, Oct 04, 2022 at 12:21:08AM +0200, Joerg Sonnenberger wrote: > > On Mon, Oct 03, 2022 at 12:31:42PM +, nia wrote: > > > I'd argue that providing alloca(3) as anything except a compiler > > > builtin is a bug, and that kind of thing sh

Re: alloca again

2022-10-03 Thread Valery Ushakov
On Mon, Oct 03, 2022 at 18:32:47 +, David Holland wrote: > On Mon, Oct 03, 2022 at 03:45:06PM +0200, Roland Illig wrote: > > > This is the current alloca definition in the libc headers: > > > > > > #if defined(_NETBSD_SOURCE) > > > #if defined(alloca) && (alloca == __builtin_alloca) && \

Re: clang man pages

2022-09-15 Thread Valery Ushakov
On Wed, Sep 14, 2022 at 20:59:06 +0300, niko.nasto...@icloud.com wrote: > Not sure if this is the correct list, but here it is. > > When I install clang with pkgin, the package does not install man pages. > Is this expected behaviour? > I am running 9.3_STABLE on arm64. It's a package, so it's b

Re: Permissions of the root dot files

2022-08-30 Thread Valery Ushakov
[the bsd.link.mk part diverted to tech-toolchain] On Tue, Aug 30, 2022 at 02:27:34 +0300, Valery Ushakov wrote: > Is there any particular reason why /root/.profile and /root/.cshrc > (that have hard links in / too, for the single user mode i guess) are > not writable? So apparently

Re: Permissions of the root dot files

2022-08-30 Thread Valery Ushakov
On Tue, Aug 30, 2022 at 08:38:02 +0700, Robert Elz wrote: > Date:Tue, 30 Aug 2022 02:27:33 +0300 > From: Valery Ushakov > Message-ID: > > | Is there any particular reason why /root/.profile and /root/.cshrc > | (that have hard links in / too, f

Permissions of the root dot files

2022-08-29 Thread Valery Ushakov
Is there any particular reason why /root/.profile and /root/.cshrc (that have hard links in / too, for the single user mode i guess) are not writable? -uwe

Re: sh(1) and ksh(1) default PATH

2022-08-15 Thread Valery Ushakov
On Sun, Aug 14, 2022 at 09:13:23 +0700, Robert Elz wrote: > The normal default path for sh comes from sysctl user.cs_path As you do the caretaking of our sh(1), please, can you drop a small note in syspath() as to why it uses sysctl() directly instead of confstr(). (I'm not sure I can properly s

Re: Libc support for old BSD-style "sigcontext" signal handlers is broken, let's just kill it.

2021-10-26 Thread Valery Ushakov
On Tue, Oct 26, 2021 at 06:56:54 -0700, Jason Thorpe wrote: > However, as I was adding an #ifdef conditional to the sigcontext > handling in the new unified __sigaction14_sigtramp.c (because new > architectures added after ?siginfo? support was added never really > needed it, and didn?t define a ?

Re: proposal: remove traditional C support from lint

2021-03-17 Thread Valery Ushakov
On Wed, Mar 17, 2021 at 00:55:03 +0100, Roland Illig wrote: > when I run lint with the -t flag for traditional C (which means before > C90), I always get these warnings: > > $ >empty.c > $ lint -t empty.c > (1): warning: 'long double' is illegal in traditional C [266] > (1): warning: function pro

Re: Summary of man-page formatting

2021-03-13 Thread Valery Ushakov
On Sat, Mar 13, 2021 at 10:39:08 +0100, Anders Magnusson wrote: > Den 2021-03-13 kl. 10:03, skrev Valery Ushakov: > > On Fri, Mar 12, 2021 at 10:54:46 +0100, Reinoud Zandijk wrote: > > > > > Well, there is lout to consider. > > [...] > > > I've n

Re: Summary of man-page formatting

2021-03-13 Thread Valery Ushakov
On Fri, Mar 12, 2021 at 10:54:46 +0100, Reinoud Zandijk wrote: > Well, there is lout to consider. [...] > I've never used it for manpage rendering though! A simple `awk' > script could indeed do it as its format is quite easy. Uwe has > experience with it :) Right, and in my experience it would b

Re: text layout in sysinst

2021-02-07 Thread Valery Ushakov
On Sun, Feb 07, 2021 at 14:26:47 +0100, Roland Illig wrote: > On 07.02.2021 05:25, Valery Ushakov wrote: > > What's wrong is that for addstr we call _cursesi_addwchar with a > > pointer to a dummy variable, but for addch we call it with a pointer > > to win->curx, so

Re: text layout in sysinst

2021-02-06 Thread Valery Ushakov
On Sat, Feb 06, 2021 at 20:58:49 +0100, Roland Illig wrote: > On 05.02.2021 21:12, Roland Illig wrote: > > > when I run sysinst from a boot CD, after pressing Enter 3 times in a > > row, I get the screen "You have chosen". This screen presents a menu. > > The items of the menu are indented with 1

Re: Convention in the output of service rcvar

2020-12-20 Thread Valery Ushakov
Rocky Hotas wrote: > On dic 17 21:12, David Holland wrote: > >> My guess: someone was thinking in perl by accident and nobody's >> noticed it since, so it hasn't been fixed. > > It's probable, then. Thanks for your feedback, David and Jeremy. > > I would suggest, if possible and if you agree,

Re: Convention in the output of service rcvar

2020-12-19 Thread Valery Ushakov
Valery Ushakov wrote: > David Holland wrote: > >> On Wed, Dec 16, 2020 at 07:43:20PM +0100, Rocky Hotas wrote: >> > # food >> > $food=YES >> >: >> > >> > Is there any reason for that? What do you think? >> >> My gu

Re: Convention in the output of service rcvar

2020-12-19 Thread Valery Ushakov
David Holland wrote: > On Wed, Dec 16, 2020 at 07:43:20PM +0100, Rocky Hotas wrote: > > # food > > $food=YES > >: > > > > Is there any reason for that? What do you think? > > My guess: someone was thinking in perl by accident and nobody's > noticed it since, so it hasn't been fixed. M

Re: Summary of man-page formatting

2020-11-15 Thread Valery Ushakov
On Sun, Nov 15, 2020 at 03:10:08 +0100, Kamil Rytarowski wrote: > 10. I've suggested a MANWIDTH patch, which looked fine for upstream, but > it is not guaranteed to land upstream at all or in that form. > > http://netbsd.org/~kamil/patch-00287-mandoc-MANWIDTH.txt mandoc may support MANWIDTH as a

Re: Proposal to remove catman(8)

2020-11-13 Thread Valery Ushakov
On Wed, Nov 11, 2020 at 18:00:02 +0300, Valery Ushakov wrote: > - change a line in man.conf to obey MANWIDTH/COLUMNS: > > _build .[1-9ln] /usr/bin/mandoc ${COLUMNS+-Owidth=${MANWIDTH:-$COLUMNS}} > %s > And just for the record, the nroff equivalent for setting the width with

Re: Proposal to remove catman(8)

2020-11-11 Thread Valery Ushakov
On Wed, Nov 11, 2020 at 14:42:04 +0100, Kamil Rytarowski wrote: > On 11.11.2020 06:33, Valery Ushakov wrote: > > Kamil, you keep confusing mechanism and policy. > > I note that some people still missed that after marking the MKCATPAGES > files obsolete, every NetBSD/z80 users r

Re: Proposal to remove catman(8)

2020-11-10 Thread Valery Ushakov
On Tue, Nov 10, 2020 at 23:31:12 +0100, Kamil Rytarowski wrote: > On 10.11.2020 23:04, Robert Elz wrote: > > Date:Tue, 10 Nov 2020 19:28:41 +0100 > > From:Kamil Rytarowski > > Message-ID: > > So you just confirmed to have a lot of opinions and just started to > (re)l

Re: Proposal to remove catman(8)

2020-11-09 Thread Valery Ushakov
On Mon, Nov 09, 2020 at 21:12:10 +0100, Tobias Nygren wrote: > mandoc is used for everything that is in pkgsrc. For example: > $ mandoc /usr/pkg/man/man1/bash.1 | more > > If you want to make the argument that it cannot render certain > third-party manual pages in way that makes the content intell

Complete removal of support for cat-pages (Was: catman)

2020-11-09 Thread Valery Ushakov
On Mon, Nov 09, 2020 at 09:56:33 +0100, Thomas Klausner wrote: > On Mon, Nov 09, 2020 at 04:55:14AM +0300, Valeriy E. Ushakov wrote: > > > Hold your horses! This started with MKCATPAGES which is ability to > > pre-generate cat pages as part of the build. > > > > Now it's suddenly about eliminati

Re: catman (Was: CVS commit: src/games/fortune/datfiles)

2020-11-08 Thread Valery Ushakov
On Mon, Nov 09, 2020 at 01:18:25 +0100, Kamil Rytarowski wrote: > On 08.11.2020 23:20, Valery Ushakov wrote: > > It's (partially) past-tensed, which looks stupid and cripples the > > joke. > > catman has zero to do with current UNIX or any other standard I checked >

Re: catman (Was: CVS commit: src/games/fortune/datfiles)

2020-11-08 Thread Valery Ushakov
On Mon, Nov 09, 2020 at 01:05:02 +0100, Thomas Klausner wrote: > On Mon, Nov 09, 2020 at 12:46:42AM +0300, Valeriy E. Ushakov wrote: > > Also, come to think of it... Removing catman (i.e. user's ability to > > generate cat pages) is rather different from removing MKCATPAGES, > > what's going on he

Re: catman (Was: CVS commit: src/games/fortune/datfiles)

2020-11-08 Thread Valery Ushakov
On Sun, Nov 08, 2020 at 22:58:11 +0100, Kamil Rytarowski wrote: > On 08.11.2020 22:46, Valery Ushakov wrote: > > On Sun, Nov 08, 2020 at 17:37:30 +, Kamil Rytarowski wrote: > > > >> Module Name: src > >> Committed By: kamil > >> Date:

catman (Was: CVS commit: src/games/fortune/datfiles)

2020-11-08 Thread Valery Ushakov
On Sun, Nov 08, 2020 at 17:37:30 +, Kamil Rytarowski wrote: > Module Name: src > Committed By: kamil > Date: Sun Nov 8 17:37:30 UTC 2020 > > Modified Files: > src/games/fortune/datfiles: fortunes > > Log Message: > catman(8) is a past thing Please, revert this. It's complet

Re: Proposal to import window(1) into the base

2020-10-25 Thread Valery Ushakov
Christos Zoulas wrote: > In article , > Valery Ushakov wrote: >>Alistair Crooks wrote: >> >>> If it comes back, it needs to be modified to use curses - the hardcoded >>> terminal escapes for a bunch of 1970s terminals is kinda cute in a retro >>>

Re: Proposal to import window(1) into the base

2020-10-22 Thread Valery Ushakov
Alistair Crooks wrote: > If it comes back, it needs to be modified to use curses - the hardcoded > terminal escapes for a bunch of 1970s terminals is kinda cute in a retro > way; it's also kinda embarassing. >From a very quick look half of window sources (tt* and ww* files) are its homebrew curs

Re: style change: explicitly permit braces for single statements

2020-07-11 Thread Valery Ushakov
Luke Mewburn wrote: > I propose that the NetBSD C style guide in to /usr/share/misc/style > is reworded to more explicitly permit braces around single statements, > instead of the current discourgement. > > IMHO, permitting braces to be consistently used: > - Adds to clarity of intent. > - Aids

Re: Weekday abbreviations in output of cal(1)

2020-07-02 Thread Valery Ushakov
Valery Ushakov wrote: > Wolfgang Solfrank wrote: > >>> "first $WEEKDAY of next month". I am at a loss how to do this with >>> NetBSD's date(1). >> >> Thanks for the explanation. >> >> Ok, let's try with a double invocatio

Re: Weekday abbreviations in output of cal(1)

2020-07-02 Thread Valery Ushakov
Wolfgang Solfrank wrote: >> "first $WEEKDAY of next month". I am at a loss how to do this with >> NetBSD's date(1). > > Thanks for the explanation. > > Ok, let's try with a double invocation: > > $ date -d "$(date -d '+1 month' '+%m/01/%C%y') sat" > Sat Aug 1 00:00:00 CEST 2020 Alas... for

Re: Weekday abbreviations in output of cal(1)

2020-06-29 Thread Valery Ushakov
Michael Siegel wrote: > So, in the output of NetBSD's cal(1), days are abbreviated with one > letter, except for Tuesday and Thursday. > > I'd say this is: > > * inconsistent > * potentially misleading (Saturday and Sunday are both just "S".) > * unnecessarily cryptic [...] > So, I'd say

Re: cgrep for basesystem?

2020-06-10 Thread Valery Ushakov
Simon Burge wrote: >> I find this program useful, however it should be refreshed or rewritten >> for modern times. Its switches and usage is not compatible with modern >> grep(1) and the implementation is pretty simplistic. >> >> If someone would be interested to pick this project it would be gre

Re: Add curses_version() in curses(3)

2019-09-02 Thread Valery Ushakov
On Mon, Sep 02, 2019 at 12:32:51 +0300, Valery Ushakov wrote: > Why would we ever want to report this completely random and unrelated > fact?! > > There were years when curses in the tree was unchanged. In the mean > time we have churned through dozens of netbsd versions. > &

Re: Add curses_version() in curses(3)

2019-09-02 Thread Valery Ushakov
[copying here my reply from source-changes-d] On Fri, Aug 30, 2019 at 18:22:37 +0100, Roy Marples wrote: > On 30/08/2019 18:09, Kamil Rytarowski wrote: > > On 30.08.2019 18:55, Roy Marples wrote: > > > return "NetBSD-Curses " CURSES_VERSION > > > > I propose to go for: > > > > return "NetBSD-"

Re: stdio.h's P_tmpdir definition - make it /tmp?

2019-08-30 Thread Valery Ushakov
Greg Troxel wrote: > It seems that long long ago, /tmp was small and on /, and /var was often > bigger, and people used /var/tmp for larger stuff. Also I remember a > notion of clearing /tmp on boot and not clearing /var/tmp. Now, /tmp > is a tmpfs and large/fast, and the right place for thin

Re: EV_SET() better C++ compat with alternative implementations

2019-08-18 Thread Valery Ushakov
Joerg Sonnenberger wrote: > On Sun, Aug 18, 2019 at 05:05:33PM +0200, Kamil Rytarowski wrote: >> Ping? Can we switch from intptr_t to void*? > > Can we just go back to the original state? Anything wrong with the templated solution for c++11 I posted a few days ago, keeping the original state fo

Re: EV_SET() better C++ compat with alternative implementations

2019-08-13 Thread Valery Ushakov
On Wed, Aug 14, 2019 at 06:06:18 +0300, Valery Ushakov wrote: > static inline void > EV_SET_(struct kevent *_kevp, uintptr_t _ident, uint32_t _filter, > uint32_t _flags, uint32_t _fflags, int64_t _data, > uintptr_t _udata) > { > _kevp->ident = _ident;

Re: EV_SET() better C++ compat with alternative implementations

2019-08-13 Thread Valery Ushakov
On Sun, Aug 11, 2019 at 03:57:50 +0200, Kamil Rytarowski wrote: > On 11.08.2019 02:56, Valery Ushakov wrote: > > Kamil Rytarowski wrote: > > > >> Cast of udata from void* to intptr_t shall be done with > >> reinterpret_cast<> otherwise a

Re: EV_SET() better C++ compat with alternative implementations

2019-08-12 Thread Valery Ushakov
On Mon, Aug 12, 2019 at 03:43:56 +, m...@netbsd.org wrote: > So, this is when we changed to intptr_t. We also went through a > "int64_t udata" revision at some point, later. > > Module Name:syssrc > Committed By: jdolecek > Date: Wed Oct 2 19:09:37 UTC 2002 > > Modified File

Re: EV_SET() better C++ compat with alternative implementations

2019-08-10 Thread Valery Ushakov
Kamil Rytarowski wrote: > Cast of udata from void* to intptr_t shall be done with > reinterpret_cast<> otherwise a C++ compiler errors. > > Defining __REINTERPRET_CAST [1] and using it, did not work as a compiler > protested for NULL argument "warning: passing NULL to non-pointer argument". > >

Re: find and limits

2019-04-04 Thread Valery Ushakov
co...@sdf.org wrote: > I understand the need for correctness, but the limits for find ... -exec > are really low, and it's quite unclear why things fail when they do. What limits? Limits inside find(1)? Global limit on the maximum length of a command line? > cd /cvs/pkgsrc/fonts/urbanrenewal-

Re: Detecting keypress on console

2019-03-28 Thread Valery Ushakov
On Thu, Mar 28, 2019 at 13:54:21 +, Emmanuel Dreyfus wrote: > On Sat, Mar 23, 2019 at 02:23:19PM -0000, Valery Ushakov wrote: > > Alternatively you should also be able re-inject wsevents you are not > > interested in back into the wsmux (instead of doing that at tty(4) &

Re: Detecting keypress on console

2019-03-23 Thread Valery Ushakov
Emmanuel Dreyfus wrote: > I would like to execute a scipt when a function key is pressed on the > console. Is there a mechanism to detect keypresses on wscons? If I > make a daemon that opens /dev/console it will steal the input from > getty/login/sh, which is not what I intend. May be abuse p

Re: namespace pollution by curses

2019-03-12 Thread Valery Ushakov
On Tue, Mar 12, 2019 at 15:21:49 -, Christos Zoulas wrote: > In article <20190312134722.ga1...@netbsd.org>, > David Holland wrote: > >On Tue, Mar 12, 2019 at 01:25:13PM +0300, Valery Ushakov wrote: > > > Admittedly, I'm not sure about the usage. E.g. in w

Re: namespace pollution by curses

2019-03-12 Thread Valery Ushakov
On Tue, Mar 12, 2019 at 11:41:39 +1030, Brett Lymn wrote: > I am happy with either the rename of the static definition or > including the state variable in _cursesi_screen which already holds > the tty information anyway.  Mind you, if you put the state variable > into _cursesi_screen then you may

Re: namespace pollution by curses

2019-03-08 Thread Valery Ushakov
Rin Okuyama wrote: > I would like to propose renaming "state" into "_cursesi_state": > http://www.netbsd.org/~rin/curses_state_20190308.patch > > Can I commit the patch? In that case, should I bump libcurses minor? > (That is, no matter to pull-up if minor version is bumped?) I wonder if state

Re: colorls in base

2019-02-15 Thread Valery Ushakov
Christian Groessler wrote: > On 2/15/19 10:28 PM, m...@netbsd.org wrote: >> On Fri, Feb 15, 2019 at 10:17:55PM +0100, Christian Groessler wrote: >>> On 2/15/19 8:15 PM, m...@netbsd.org wrote: For the record I support the change. I don't think it's very hard not to turn on colors. You ca

Re: colorls in base

2019-02-15 Thread Valery Ushakov
Kamil Rytarowski wrote: > On 16.02.2019 03:03, Christian Groessler wrote: >> On 2/16/19 2:35 AM, Kamil Rytarowski wrote: >>> On 16.02.2019 02:14, m...@netbsd.org wrote: There's a topic on peace-keeping in a large project. There are two types of feedback: - "this change ma

Re: cu(1) / tip(1) : recognize newline as end-of-line

2019-01-28 Thread Valery Ushakov
Rin Okuyama wrote: > Currently, cu(1) and tip(1) do not recognize a newline as end-of-line. > This means that an escape character (~) does not work after ^J (dislike ^M). > > It seems like a bug for me. But, are there some reasons for this behavior? tip(1) clears ICRNL from terminal settings, s

Re: Lua shared object asymmetry loading Xlib.

2019-01-04 Thread Valery Ushakov
On Wed, Dec 26, 2018 at 09:44:53 -0900, Phil Rulon wrote: > msd$ /usr/bin/lua -v test.lua > Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio > table > function > [1] Segmentation fault (core dumped) /usr/bin/lua -v test.lua > > msd$ gdb -q /usr/bin/lua lua.core > Reading symbols from /usr/bi

Re: Definitions of types also as macros

2018-11-06 Thread Valery Ushakov
On Tue, Nov 06, 2018 at 23:20:16 +0100, Rhialto wrote: > On Tue 06 Nov 2018 at 23:19:08 +0300, Valery Ushakov wrote: > > Also your change breaks redefining intN_t types with the preprocessor. > > E.g. > > > > #define uint32_t unsigned long long > > #inc

Re: Definitions of types also as macros

2018-11-06 Thread Valery Ushakov
[I missed this thread, so I'm reposting my reply that I originally sent to source-changes-d] On Tue, Nov 06, 2018 at 16:38:06 +, co...@sdf.org wrote: > On Tue, Nov 06, 2018 at 08:11:03AM -0800, John Nemeth wrote: > > On Nov 6, 3:07pm, co...@sdf.org wrote: > > } > > } I wanna do this, looks g

Re: Help needed with understanding of config(1) debug output

2018-09-27 Thread Valery Ushakov
On Thu, Sep 27, 2018 at 16:20:50 +0800, Paul Goyette wrote: > I've got a problem where something I've changed over the last six months > (or more) on the [pgoyette-compat] branch has broken the release build > for at least ``build.sh -m algor'' port. For some unknown reason it is > defining COMPA

Re: Weirdness in /bin/sh of 8.0

2018-08-15 Thread Valery Ushakov
Izaac wrote: > On Thu, Jul 13, 2017 at 09:01:26AM -0400, Izaac wrote: >> On Thu, Jul 13, 2017 at 07:46:39AM +0700, Robert Elz wrote: >> > So, opinions? >> >> Stop. >> >> Leave /bin/sh alone. > > And here we are. If you want SCO Unix you know where to find it. -uwe

Re: shell (/bin/sh) pattern matching bugs

2018-06-24 Thread Valery Ushakov
Rhialto wrote: > On Mon 25 Jun 2018 at 01:58:25 +0700, Robert Elz wrote: >> Date:Sun, 24 Jun 2018 19:09:58 +0200 >> From:Rhialto >> Message-ID: <20180624170958.gj8...@falu.nl> >> >> | Are we to assume that NetBSD's sh(1) manual page is correct? >> >> Well, yes an

Re: Auxiliary header and macros for sanitizers in userland programs

2018-06-06 Thread Valery Ushakov
On Wed, Jun 06, 2018 at 09:09:17 +0200, Kamil Rytarowski wrote: > >>> So the issue is that libc is compiled without sanitizer and > >>> allocations done inside libc are not known to a sanitizer? For libc > >>> functions that return allocated memory I guess you mark it in the > >>> sanitizer's int

Re: Auxiliary header and macros for sanitizers in userland programs

2018-06-05 Thread Valery Ushakov
On Tue, Jun 05, 2018 at 22:04:37 +0200, Kamil Rytarowski wrote: > On 05.06.2018 20:47, Valery Ushakov wrote: > > Kamil Rytarowski wrote: > > > >> On 05.06.2018 18:14, Valery Ushakov wrote: > >>> Kamil Rytarowski wrote: > >>> > >>&g

Re: Auxiliary header and macros for sanitizers in userland programs

2018-06-05 Thread Valery Ushakov
Kamil Rytarowski wrote: > On 05.06.2018 18:14, Valery Ushakov wrote: >> Kamil Rytarowski wrote: >> >>> We've faced a problem with sanitizing part of the NetBSD userland, as we >>> need to use helper functions to make sanitization possible in some

Re: Auxiliary header and macros for sanitizers in userland programs

2018-06-05 Thread Valery Ushakov
Kamil Rytarowski wrote: > We've faced a problem with sanitizing part of the NetBSD userland, as we > need to use helper functions to make sanitization possible in some > narrow cases that aren't clear for sanitizers. > > The current problem is the usage of callback functions defined in > program

Re: missing-prototypes enabled in bsd.sys.mk

2018-05-28 Thread Valery Ushakov
Sevan Janiyan wrote: > -Wmissing-prototypes was enabled over 20 years ago in r1.9 of > bsd.sys.mk, is the necessity for enabling this a relic from the > transition from K&R to ANSI-C or is it still a necessary and useful > check to have enabled by default? This is not only a transition relic. I

Re: _UC_MACHINE_BP

2018-02-07 Thread Valery Ushakov
Kamil Rytarowski wrote: > I propose to add a definition of _UC_MACHINE_BP() across the ports in > /usr/include/*/mcontext.h. > > BP stands for Base Pointer / Frame Pointer. Please, s/BP/FP/. "Frame pointer" is an esablished name and several assemblers use "fp" as a register name/alias (e.g. va

Re: Add static local vars to sh(1) ?

2018-01-29 Thread Valery Ushakov
On Mon, Jan 29, 2018 at 23:33:25 +0700, Robert Elz wrote: > From: u...@stderr.spb.ru (Valery Ushakov) > Subject: Re: Add static local vars to sh(1) ? > Date: Mon, 29 Jan 2018 13:38:25 + (UTC) > > | This doesn't seem to mention what happens when the >

Re: Add static local vars to sh(1) ?

2018-01-29 Thread Valery Ushakov
Robert Elz wrote: > The -S flag causes the local variable to be static. When a > function containing such variables returns, then just before the > previous values are restored, the current value and attributes of > each such variable are saved. When the ``local -S variable'' A

  1   2   >