]> granicus.if.org Git - strace/commitdiff
xlat/gen.sh: cleanup
authorEugene Syromyatnikov <evgsyr@gmail.com>
Tue, 5 Feb 2019 23:49:47 +0000 (00:49 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 24 Feb 2019 23:37:00 +0000 (23:37 +0000)
* xlat/gen.sh: Export LC_ALL=C so it could be omitted from individual
invocations.
(cond_def): Remove LC_ALL=C from sed invocation.
(gen_header): Remove LC_COLLATE=C.

xlat/gen.sh

index ceb0e8fda2ed3057723ad85e480b8af1d1e87f6c..106e7d329e3449386f6ce2fb6d48b8281f9404cb 100755 (executable)
@@ -7,6 +7,8 @@
 #
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+export LC_ALL=C
+
 usage()
 {
        cat <<EOF
@@ -25,7 +27,7 @@ cond_def()
 
        local val
        val="$(printf %s "$line" |
-               LC_ALL=C sed -r -n 's/^([[:alpha:]_][[:alnum:]_]*).*$/\1/p')"
+               sed -r -n 's/^([[:alpha:]_][[:alnum:]_]*).*$/\1/p')"
 
        local def
        def="$(printf %s "${line}" |
@@ -128,7 +130,6 @@ gen_header()
        local unconditional= line
        # 1st pass: output directives.
        while read line; do
-               LC_COLLATE=C
                line=$(printf "%s" "$line" | \
                        sed "s|[[:space:]]*/\*.*\*/[[:space:]]*||")
 
@@ -198,7 +199,6 @@ gen_header()
        unconditional= val_type=
        # 2nd pass: output everything.
        while read line; do
-               LC_COLLATE=C
                line=$(printf "%s" "$line" | \
                        sed "s|[[:space:]]*/\*.*\*/[[:space:]]*||")