diff options
Diffstat (limited to 'src/gen_message_list.sed')
-rw-r--r-- | src/gen_message_list.sed | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gen_message_list.sed b/src/gen_message_list.sed index f927df4..17b2c16 100644 --- a/src/gen_message_list.sed +++ b/src/gen_message_list.sed @@ -6,6 +6,16 @@ i\ #define MUMBLE_MSGS \\ } +$ { +a\ +\ +#endif /* _MESSAGES_H_ */ +} + +# Isolate message name from .proto file +/^message/!d +s/message[ ]*\([^ ]*\).*$/\1/ + # This code attempts to generate "MUMBLE_MSG(FooBar, foo_bar)" from "FooBar" # Backup original message name @@ -18,9 +28,3 @@ y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ G # Put template macro around (delete newline between both msgs, swap order) s/^\(.*\)\n\(.*\)$/ MUMBLE_MSG(\2, \1) \\/ - -$ { -a\ -\ -#endif /* _MESSAGE_LIST_H_ */ -} |