summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-11-05 13:39:23 +0100
committerAlejandro Colomar <alx@kernel.org>2023-11-05 17:13:52 +0100
commite0a3f7648f73cd9327e260a8416e7c5cb0804754 (patch)
treef2fa7e83f46ac70ce0a8a7f2108e19f3e3aa1d16
parentbebb11c38f6ef3644c7b4a1af61c3b890249c59c (diff)
bin/grepc: srcfix (Compact single-line cases)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rwxr-xr-xbin/grepc76
1 files changed, 19 insertions, 57 deletions
diff --git a/bin/grepc b/bin/grepc
index 1174bc0..af6b600 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -47,42 +47,22 @@ grepc_parse_cmd()
{
while getopts "A:B:C:chiklnrt:" opt; do
case "$opt" in
- A)
- A="-A$OPTARG";
- ;;
- B)
- B="-B$OPTARG";
- ;;
- C)
- C="-C$OPTARG";
- ;;
- c)
- c='-c';
- ;;
- h)
- h='-h';
- ;;
- i)
- i='-i';
- ;;
- k)
- k='yes';
- ;;
+ A) A="-A$OPTARG"; ;;
+ B) B="-B$OPTARG"; ;;
+ C) C="-C$OPTARG"; ;;
+ c) c='-c'; ;;
+ h) h='-h'; ;;
+ i) i='-i'; ;;
+ k) k='yes'; ;;
l)
l='-l';
k='yes';
;;
- n)
- n='-n';
- ;;
- r)
- r='yes';
- ;;
+ n) n='-n'; ;;
+ r) r='yes'; ;;
t)
case "$OPTARG" in
- e)
- t_e='yes';
- ;;
+ e) t_e='yes'; ;;
f)
t_fp='yes';
t_fd='yes';
@@ -92,30 +72,20 @@ grepc_parse_cmd()
t_fgd_libm='yes';
t_fgd_libio='yes';
;;
- fp)
- t_fp='yes';
- ;;
- fd)
- t_fd='yes';
- ;;
+ fp) t_fp='yes'; ;;
+ fd) t_fd='yes'; ;;
fl)
t_flp='yes';
t_fld='yes';
;;
- flp)
- t_flp='yes';
- ;;
- fld)
- t_fld='yes';
- ;;
+ flp) t_flp='yes'; ;;
+ fld) t_fld='yes'; ;;
fg)
t_fgp='yes';
t_fgd_libm='yes';
t_fgd_libio='yes';
;;
- fgp)
- t_fgp='yes';
- ;;
+ fgp) t_fgp='yes'; ;;
fgd)
t_fgd_libm='yes';
t_fgd_libio='yes';
@@ -124,12 +94,8 @@ grepc_parse_cmd()
t_mf='yes';
t_mo='yes';
;;
- mf)
- t_mf='yes';
- ;;
- mo)
- t_mo='yes';
- ;;
+ mf) t_mf='yes'; ;;
+ mo) t_mo='yes'; ;;
t)
t_t_braced='yes';
t_t_td_simple='yes';
@@ -145,16 +111,12 @@ grepc_parse_cmd()
t_ut_td_simple='yes';
t_ut_td_su='yes';
;;
- ue)
- t_ue='yes';
- ;;
+ ue) t_ue='yes'; ;;
uf)
t_uf_def='yes';
t_uf_linux_def='yes';
;;
- um)
- t_um='yes';
- ;;
+ um) t_um='yes'; ;;
ut)
t_ut_su='yes';
t_ut_td_simple='yes';