blob: e1ffbeb4ca3c5dd5b15a4ae38a4896da03d5e02f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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_ */
}
|