[PATCH] bin/stdc: Case-insensitive standard

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

 



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>
---
 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
 c89)
 	libc_summ_c89 \
 	| grep_proto "$2";
-- 
2.39.2




[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