lkml.org 
[lkml]   [2020]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 22/24] membarrier.2: Note that glibc does not provide a wrapper
From
Date


On 2020-09-28 15:48, G. Branden Robinson wrote:
>> 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
>

On 2020-09-28 16:31, David Laight wrote:
> From: Alejandro Colomar
>> Sent: 28 September 2020 14:33
> ...
>> 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.
>
> The 'word markers' \< and \> are your friends; look for "\<int\>".
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>


Thank you both, I didn't know about those.

Regards,

Alex

\
 
 \ /
  Last update: 2020-09-28 16:43    [W:0.073 / U:1.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site