Re: CVS commit: src/bin/echo

2024-05-14 Thread Robert Elz
Date:Wed, 15 May 2024 02:33:23 +0300 From:Valery Ushakov Message-ID: | I vaguely remember I read somewhere that printf(1) was specifically | conceived to take no options, but that can be planted memories. May | be it's indeed induced by the old state of affair

Re: CVS commit: src/bin/echo

2024-05-14 Thread Valery Ushakov
On Wed, May 15, 2024 at 05:22:25 +0700, Robert Elz wrote: > | Unfortunately that advice is not true without further caveats. > > That you have to actually write a valid printf(1) command, and not > simply s/echo/printf/ ? Does that really need saying? > > > | netbsd$ sh -c "printf '-V\n'"

Re: CVS commit: src/bin/echo

2024-05-14 Thread Robert Elz
Date:Tue, 14 May 2024 12:41:51 +0300 From:Valery Ushakov Message-ID: | Unfortunately that advice is not true without further caveats. That you have to actually write a valid printf(1) command, and not simply s/echo/printf/ ? Does that really need saying? | n

Re: CVS commit: src/bin/echo

2024-05-14 Thread Valery Ushakov
On Tue, May 14, 2024 at 01:32:25 +, David H. Gutteridge wrote: > Log Message: > echo.1: borrow advice about printf(1) from the OpenBSD man page Unfortunately that advice is not true without further caveats. netbsd$ sh -c "printf '-V\n'" -V $ busybox sh -c "printf '-V\n'" -V ubuntu$ $ dash

Re: CVS commit: src/bin/echo

2021-11-10 Thread Valery Ushakov
On Thu, Nov 11, 2021 at 05:03:41 +0700, Robert Elz wrote: > Date:Wed, 10 Nov 2021 22:17:05 +0300 > From:Valery Ushakov > Message-ID: > > | > in the sense that simply falling out of main() is exit(0)? > | > | Surprisingly - yes. > > That's appalling, but perha

Re: CVS commit: src/bin/echo

2021-11-10 Thread Robert Elz
Date:Wed, 10 Nov 2021 22:17:05 +0300 From:Valery Ushakov Message-ID: | > in the sense that simply falling out of main() is exit(0)? | | Surprisingly - yes. That's appalling, but perhaps not surprising. It breaks code which believed what was promised, and did

Re: CVS commit: src/bin/echo

2021-11-10 Thread Valery Ushakov
On Wed, Nov 10, 2021 at 17:35:45 +, Robert Elz wrote: > And second, does C99 really promise: > Remove unnecessary call to exit(0); returning from main is equivalent > since C99. > in the sense that simply falling out of main() is exit(0)? Surprisingly - yes. Derek M. Jones in his