From: Daniel Carl <danielcarl@gmx.de>
Date: Sat, 12 Oct 2013 20:41:07 +0000 (+0200)
Subject: Don't use GNU extension in sed script.
X-Git-Url: https://git.owens.tech/projects.html/projects.html/git?a=commitdiff_plain;h=2132706ecafab0aeacd2d25577794f3f3a565ab3;p=vimb.git

Don't use GNU extension in sed script.

Simplified the rules to match only comments used in the hints scripts.
---

diff --git a/src/js2h.sh b/src/js2h.sh
index 95ff77a..0aa6c04 100755
--- a/src/js2h.sh
+++ b/src/js2h.sh
@@ -2,12 +2,10 @@
 
 echo -n '#define HINTS_JS "'
 cat $1 | \
-    sed -e "s|/\*[^*]*\*\+\([^/][^*]*\*\+\)*/||g" | \
     tr '\n\r\t' ' ' | \
-    sed -e "s| \+| |g" \
-    -e "s|^//.*$||" \
-    -e "s| \([-!?<>:=(){};+\&\"',\|]\)|\1|g" \
-    -e "s|\([-!?<>:=(){};+\&\"',\|]\) |\1|g" \
+    sed -e 's:/\*[^*]*\*/::g' \
+    -e 's|[ ]\{2,\}| |g' \
+    -e "s|[ ]\{0,\}\([-!?<>:=(){};+\&\"',\|]\)[ ]\{0,\}|\1|g" \
     -e 's|\\|\\\\|g' \
     -e 's|"|\\"|g'
 echo '"'