Re: [PATCH 22/24] membarrier.2: Note that glibc does not provide a wrapper

G. Branden Robinson
2020-09-28T13:48:37Z

[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]

At 2020-09-28T15:33:21+0200, Alejandro Colomar wrote:
> On 2020-09-28 14:52, G. Branden Robinson wrote:
> > At 2020-09-27T22:05:14+0200, Alejandro Colomar wrote:
> >> 2)
> >>
> >>> .EX
> >>> .BI "int fstat(int " fd ", struct stat *" statbuf );
> >>> .EE
> >>
> >> 3)
> >>
> >>> .EX
> >>> .BI "int fstat(int\~" fd ", struct stat *" statbuf );
> >>> .EE
> >>
> >> I'd say number 2 is best. Rationale: grep :)
> >> I agree it's visually somewhat harder, but grepping is way easier.
> >
> > I don't see how (2) is any tougher to grep than (3)...?
[...]
> > $ grep 'fstat.*fd.*statbuf' man2/*
>
> There are a few cases: if I want to find declarations of type int,
> I'd start with:
>
> $ grep -rn "int\s"
>
> or something like that. "int\~" would break the ability to do that.

That would, among more obscure cases, miss the style of function
declaration used by people who get along without ctags:

static int
my_little_function(int foo, char bar)

So I would tend to use grep 'int\>' to match a word boundary instead of
a whitespace character.

Regards,
Branden

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]