Re: [PATCH] ed: add support for -p command-line option as mandated by POSIX

2021-11-21 Thread Kang-Che Sung
On Sunday, November 21, 2021, Harald van Dijk wrote: > On 21/11/2021 07:12, Kang-Che Sung wrote: >> >> On Sunday, November 21, 2021, David Laight mailto:david.lai...@aculab.com>> wrote: >> > >> > You shouldn't need the strdup(). >> > I think you can even do: >> > if (!(opt & 1)) >> >

[PATCH v2] ed: add support for -p command-line option as mandated by POSIX

2021-11-21 Thread soeren
From: Sören Tempel The POSIX.1-2008 specification of ed(1) mandates two command-line options: -p (for specifying a prompt string) and -s (to suppress writing of byte counts). This commit adds support for the former. Furthermore, it also changes the default prompt string to an empty string