Hi Ralph,
Ralph Corderoy wrote on Mon, Dec 30, 2019 at 06:31:34PM +:
> Ingo Schwarze wrote:
>> * line 1896, while (*form):
>>Testing char as if it were boolean seems dubious style to me;
>>"while (*form != '\0')" would seem clearer because it makes the
>>data type obvious on firs
Hi Doug,
Doug McIlroy wrote on Tue, Dec 31, 2019 at 10:39:53AM -0500:
> It looks like Ralph has turned up a really strange bug in pic
> that suppresses pic's usual diagnosis of a bare % in a format.
>
> The example can be boiled down to
> sprintf("%g% %",1)
> which produces
> 1%
> Getting back on topic, are we sure we want to deviate from GNU pic's
> current behaviour without checking historical norms of other pics?
>
> $ printf '%s\n' \
> .PS 'print sprintf("%.17g %.0f% % %%", 3.14, 42, 99)' .PE |
> > pic >/dev/null
> 3.1401 42% % %%
>
> Th
On Mon, Dec 30, 2019 at 06:31:34PM +, Ralph Corderoy wrote:
> It's idiomatic in C to write just `foo' to test it against its `zero
> value' whether it's an int, pointer, etc.
This argument holds less well in this case because do_sprintf has
several other comparisons to '\0'; so I'd be inclined
Hi Ingo,
> * line 1896, while (*form):
>Testing char as if it were boolean seems dubious style to me;
>"while (*form != '\0')" would seem clearer because it makes the
>data type obvious on first sight.
It's idiomatic in C to write just `foo' to test it against its `zero
value' whethe
On Mon, Dec 30, 2019 at 01:39:38PM +0100, Ingo Schwarze wrote:
> An extremely small number of tests (14 tests grand total) is scattered
> all around the groff source tree, for example:
>
> - contrib/gdiffmk/tests/gdiffmk_tests.sh
> - contrib/hdtbl/examples/test-hdtbl.sh.in
> - contrib/mom/examp
Hi Larry,
Larry McVoy wrote on Sun, Dec 29, 2019 at 03:23:33PM -0800:
> On a different topic, is there any sort of test suite for pic
> and the other parts of roff?
I'm not aware of any tests for pic(1), anywhere.
An extremely small number of tests (14 tests grand total) is scattered
all around
Hi Colin and Larry,
Colin Watson wrote on Sun, Dec 29, 2019 at 11:17:26PM +:
> LGTM as far as it goes.
thanks to both of you for checking, i have put it in.
> If I were doing it I think I'd take the opportunity to simplify it
> a little further into this sort of structure:
As i said, i dis
On Sun, Dec 29, 2019 at 11:17:26PM +, Colin Watson wrote:
> if (*form == '%') {
> form++;
> result += '%';
> }
> else {
> ...
> snprintf(sprintf_buf, sizeof(sprintf_buf),
> one_format.contents(), v[i++]);
> result += sprintf_buf;
> }
> one_format.clear
On Sun, Dec 29, 2019 at 04:33:59PM +0100, Ingo Schwarze wrote:
> Regarding the bugfix in the code, thanks to Larry McVoy for
> providing feedback directly to me. In particular, he suggested
> that while my fix wasn't incorrect, the two lines immediately
> following it can be simplified, making the
Hi,
i pushed the documentation improvements because they were ready
and esr@ OK'ed them.
Regarding the bugfix in the code, thanks to Larry McVoy for
providing feedback directly to me. In particular, he suggested
that while my fix wasn't incorrect, the two lines immediately
following it can be si
Hello Federico, hello (again) Doug,
This isn't a manual page that I maintain. See
http://man7.org/linux/man-pages/man1/pic.1.html#COLOPHON.
I suspect "3. An error in pic itself".
Thanks,
Michael
On Fri, 27 Dec 2019 at 19:31, Federico Lucifredi wrote:
>
> Hello Doug,
> for (1), I am CCing Mi
Hi Ralph,
Ralph Corderoy wrote on Sat, Dec 28, 2019 at 11:48:19AM +:
> Ingo Schwarze wrote:
>> +Only the flags
>> +.RB ' # ',
>> +.RB ' \- ',
>> +.RB ' + ',
> Why use an ASCII quote on both sides?
My bad, i'm no longer used to writing with the 1979 UNIX v7 man(7)
macros; but now that you as
Hi Ingo,
> +Only the flags
> +.RB ' # ',
> +.RB ' \- ',
> +.RB ' + ',
Why use an ASCII quote on both sides?
pic(1) uses Unicode's ‘’ in similar context.
--
Cheers, Ralph.
Ingo Schwarze :
> Hi Eric,
>
> Eric S. Raymond wrote on Fri, Dec 27, 2019 at 09:48:16PM -0500:
>
> > Yeah, that was a typo or markup error on my part. I intended %%.
> > Whoever takes on the pic bug is encouraged to fix this in the same
> > commit.
> >
> > I apologize for not being able to take
Hi Eric,
Eric S. Raymond wrote on Fri, Dec 27, 2019 at 09:48:16PM -0500:
> Yeah, that was a typo or markup error on my part. I intended %%.
> Whoever takes on the pic bug is encouraged to fix this in the same
> commit.
>
> I apologize for not being able to take this one myself. I like
> pic wel
Doug McIlroy :
> The description of sprintf in the man page pic(1) does not
> reveal that only a few format codes are permitted.
>
> Eric Raymond's "Making Pictures With GNU PIC" says only
> %,%e,%f,%g are permitted. But what does a bare % mean?
>
> In fact pic rejects a bare %. However it does
My bad — I should have checked the ownership of the page itself. Maintaining
man (1) makes me the recipient of many similar bug reports that need
redirection, and I have a fast trigger finger as a result.
Thanks for setting me straight.
Best-F
Sent from my iPhone.
> On Dec 27, 2019, at 2:18
Ingo Schwarze wrote in <20191227212705.gi66...@athene.usta.de>:
|Hi Doug,
|
|Steffen Nurpmeso wrote on Fri, Dec 27, 2019 at 06:45:23PM +0100:
|
|> Should be handled by [...]
|
|I believe the first patch that got sent to the list is incorrect.
|
|The parser in src/pre-pic/pic.y already pars
Hi Doug,
Steffen Nurpmeso wrote on Fri, Dec 27, 2019 at 06:45:23PM +0100:
> Should be handled by [...]
I believe the first patch that got sent to the list is incorrect.
The parser in src/pre-pic/pic.y already parses '%%' correctly, so
there is no need to change the parsing. Only the assignment
Hi Federico,
Federico Lucifredi wrote on Fri, Dec 27, 2019 at 01:31:00PM -0500:
> for (1), I am CCing Michael Kerrisk
fortunately, you forgot to, unless you used Bcc:.
> and the procedure to report issues on the man pages is tracked here
> https://www.kernel.org/doc/man-pages/reporting_bugs.htm
Hello Doug,
for (1), I am CCing Michael Kerrisk — and the procedure to report issues on
the man pages is tracked here
https://www.kernel.org/doc/man-pages/reporting_bugs.html (In brief: email
mtk.manpa...@gmail.com and CC linux-...@vger.kernel.org).
Best -Federico
> On Dec 27, 2019, at 1
Doug McIlroy wrote in <201912271608.xbrg84jr128...@tahoe.cs.dartmouth.edu>:
|The description of sprintf in the man page pic(1) does not
|reveal that only a few format codes are permitted.
|
|Eric Raymond's "Making Pictures With GNU PIC" says only
|%,%e,%f,%g are permitted. But what does a bar
23 matches
Mail list logo