Re: italicizing pointer stars (was: [PATCH] getline.3: wfix.)

Alejandro Colomar
2022-08-05T19:40:20Z

[-- Attachment #1.1: Type: text/plain, Size: 1929 bytes --]

Hi Branden,

On 8/5/22 21:20, G. Branden Robinson wrote:
> At the risk of opening another typographical can of worms...
>
> At 2022-08-02T14:17:24-0700, enh wrote:
>> diff --git a/man3/getline.3 b/man3/getline.3
>> index 8b7357825..cb9e5b049 100644
>> --- a/man3/getline.3
>> +++ b/man3/getline.3
>> @@ -36,12 +36,12 @@ Feature Test Macro Requirements for glibc (see
>> .BR getline ()
>> reads an entire line from \fIstream\fP,
>> storing the address of the buffer containing the text into
>> -.IR "*lineptr" .
>> +.IR *lineptr .
> [several other instances in same page snipped]
>
> I'm wondering if we should really be setting the dereferencing operator
> in italics here.
>
> In declarations, the star is part of the _type_, not the identifier.
> Similarly, in expressions, the star is an operator, like "+", not part
> of the identifier.

Let me escape out of this a bit sideways :P

*foo, as a whole, is an expression, consisting of an operator and an
identifier. So I won't apply identifier rules for highlighting, but
expression rules. The rules for marking expressions up are:

man-pages(7):
Formatting conventions (general)
[...]

Expressions, if not written on a separate indented line,
should be specified in italics. Again, the use of non‐
breaking spaces may be appropriate if the expression is
inlined with normal text.

And the deep rationale why I would like to avoid having the star in a
different font is that it could be confused with the glob-like
expressions that we use for example to refer to SYS_* macros. (And,
BTW, I should apply some consistency fixes to those too, since they are
in many cases highlighted in bold, as the rest of the identifier --and
that is plain wrong--.)

Did I dodge the bullet?

Cheers,

Alex

--
Alejandro Colomar
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]