Re: [PATCH] bin/stdc: Case-insensitive standard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Oskari,

On 3/30/23 04:10, Oskari Pirhonen wrote:
> Perform a case-insensitive match on the standard given on the cli so
> that the following works as expected:
> 
>     $ stdc c89 printf
>              int printf(const char *format, ...);
>     $ stdc C89 printf
>              int printf(const char *format, ...);
> 
> Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@xxxxxxxxx>

Patch applied.  Thanks!

> ---
>  bin/stdc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/bin/stdc b/bin/stdc
> index 1067cf8..5630825 100755
> --- a/bin/stdc
> +++ b/bin/stdc
> @@ -43,7 +43,7 @@ case $# in
>  	;;
>  esac;
>  
> -case "$1" in
> +case "$(printf "%s" "$1" | tr "[:upper:]" "[:lower:]")" in

I changed this slightly, to use single quotes when possible.

Cheers,
Alex

>  c89)
>  	libc_summ_c89 \
>  	| grep_proto "$2";

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux