diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-23 11:45:39 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-23 11:48:28 +0200 |
commit | 061c169d277db5611a9d3ea8351f0d4d0d613b0a (patch) | |
tree | 0204b9fc722e4ca5a2abe467bd6c9fec1f0b1fc1 /src/gen_message_list.sed | |
parent | d1fac4d941aaa9dbf9e72540f97d928af241cb5e (diff) | |
download | cmumble-061c169d277db5611a9d3ea8351f0d4d0d613b0a.tar.gz cmumble-061c169d277db5611a9d3ea8351f0d4d0d613b0a.tar.bz2 cmumble-061c169d277db5611a9d3ea8351f0d4d0d613b0a.zip |
Rename message.h to message_list.h
Diffstat (limited to 'src/gen_message_list.sed')
-rw-r--r-- | src/gen_message_list.sed | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gen_message_list.sed b/src/gen_message_list.sed new file mode 100644 index 0000000..e1ffbeb --- /dev/null +++ b/src/gen_message_list.sed @@ -0,0 +1,24 @@ +1 { +i\ +#ifndef _MESSAGE_LIST_H_ \ +#define _MESSAGE_LIST_H_ \ +\ +#define MUMBLE_MSGS \\ +} + +# Backup original message name +h +# Prefix uppercase characters that follow a lowercase one +s/\([a-z]\)\([A-Z]\)/\1_\2/g +# Lowercase uppercase characters +y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ +# Append backup to lowercase underscored message +G +# Put template macro around (delete newline between both msgs, swap order) +s/^\(.*\)\n\(.*\)$/\tMUMBLE_MSG(\2, \1) \\/ + +$ { +a\ +\ +#endif /* _MESSAGE_LIST_H_ */ +} |