]> granicus.if.org Git - strace/commitdiff
xlat/gen.sh: add some rudimentary support for comments
authorEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 13 Sep 2017 19:44:44 +0000 (21:44 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 25 Jan 2018 07:18:38 +0000 (07:18 +0000)
* xlat/gen.sh: Trim parts of the string abbreviated in "/*" and "*/"

xlat/gen.sh

index d5286d105591c49d92073e78a1bba00ee72a5124..6db06c517c90ab8a69b8de9440fcc263244002d9 100755 (executable)
@@ -135,6 +135,9 @@ gen_header()
        # 1st pass: output directives.
        while read line; do
                LC_COLLATE=C
+               line=$(printf "%s" "$line" | \
+                       sed "s|[[:space:]]*/\*.*\*/[[:space:]]*||")
+
                case $line in
                '#stop')
                        exit 0
@@ -196,6 +199,9 @@ gen_header()
        # 2nd pass: output everything.
        while read line; do
                LC_COLLATE=C
+               line=$(printf "%s" "$line" | \
+                       sed "s|[[:space:]]*/\*.*\*/[[:space:]]*||")
+
                case ${line} in
                '#conditional')
                        unconditional=