summaryrefslogtreecommitdiffstats
path: root/util/getenum
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xutil/getenum4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/getenum b/util/getenum
index 343ce76..b28236a 100755
--- a/util/getenum
+++ b/util/getenum
@@ -3,9 +3,9 @@
set -e
-sed '1,/^\s*enum\s\+'"$1"'\b/d' | \
+sed '1,/^[[:space:]]*enum[[:space:]]\{1,\}'"$1"'\([^A-Za-z0-9_]\|$\)/d' | \
tr '\n' '\0' | cut -d \; -f 1 | tr '\0' '\n' | \
-sed -n 's/^\s*\([A-Z0-9_]\+\)\(\s*=[^,]*\)\?\s*,\?\s*\(\/.*\)\?/\1\2/p' | \
+sed -n 's/^[[:space:]]*\([A-Z0-9_]\{1,\}\)\([[:space:]]*=[^,]*\)\{0,1\}[[:space:]]*,\{0,1\}[[:space:]]*\(\/.*\)\{0,1\}/\1\2/p' | \
sed 's/=/ /g' | \
(
prev=-1