From fe63dfa5c0283b2e746c1ad6d887c721a1f22ab9 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 12 Jul 2011 15:30:03 +0200 Subject: gen_messages.sed: Simplify rules --- src/gen_messages.sed | 10 +++++----- 1 file 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) \\/ -- cgit