From 96ac341ae79dae62b71f7969f7a89f9aeb230aaa Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Wed, 13 Sep 2017 21:44:44 +0200 Subject: [PATCH] xlat/gen.sh: add some rudimentary support for comments * xlat/gen.sh: Trim parts of the string abbreviated in "/*" and "*/" --- xlat/gen.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xlat/gen.sh b/xlat/gen.sh index d5286d10..6db06c51 100755 --- a/xlat/gen.sh +++ b/xlat/gen.sh @@ -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= -- 2.40.0