summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-07-12 15:30:03 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-07-12 15:30:03 +0200
commitfe63dfa5c0283b2e746c1ad6d887c721a1f22ab9 (patch)
tree299ec0cb30179fe3fc67a97c9dbf5fcc8bb64613 /src
parent3dd4cfe4a209ddadae861a2f71298ee8ed678b6c (diff)
downloadcmumble-fe63dfa5c0283b2e746c1ad6d887c721a1f22ab9.tar.gz
cmumble-fe63dfa5c0283b2e746c1ad6d887c721a1f22ab9.tar.bz2
cmumble-fe63dfa5c0283b2e746c1ad6d887c721a1f22ab9.zip
gen_messages.sed: Simplify rules
Diffstat (limited to 'src')
-rw-r--r--src/gen_messages.sed10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gen_messages.sed b/src/gen_messages.sed
index 0bc51f1..cf5a765 100644
--- a/src/gen_messages.sed
+++ b/src/gen_messages.sed
@@ -9,11 +9,11 @@ i\
# Duplicate & Seperate with ","
s/^.*$/\0, \0/
-# Lowercase and prefix uppercase characters that follow a lowercase one
-:a; s/^\([^,]*, .*[a-z]\)\([A-Z]\)/\1_\L\2\E/g; ta
-
-# Lowercase remaining uppercase characters
-s/\([^,]*, [a-z_]*\)\([A-Z]*\)/\1\L\2\E/g
+# Next two rules operate on substring after first the ","
+# Prefix uppercase characters that follow a lowercase one
+:a; s/\(, .*[a-z]\)\([A-Z]\)/\1_\2/g; ta
+# Lowercase uppercase characters
+s/,.*$/\L\0\E/
# Put template macro around
s/^.*$/\tMUMBLE_MSG(\0) \\/