blob: 423829b9306187882f345b47d597f0c545c7c4cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/sed -rnf
1apackage foo
1aconst (
/^#define\s+SD_MESSAGE_/ {
s/^#define\s+SD_MESSAGE_(\S*)/\1 =/
s/SD_ID128_MAKE\(/ID128{0x/
s/,/,0x/g
s/\)/}/
s/(^|_)([A-Z])([A-Z]*)/\U\2\L\3/g
p
}
/^$/p
$a)
|