summaryrefslogtreecommitdiff
path: root/sd_messages/messages.go.gen
diff options
context:
space:
mode:
Diffstat (limited to 'sd_messages/messages.go.gen')
-rwxr-xr-xsd_messages/messages.go.gen17
1 files changed, 17 insertions, 0 deletions
diff --git a/sd_messages/messages.go.gen b/sd_messages/messages.go.gen
new file mode 100755
index 0000000..423829b
--- /dev/null
+++ b/sd_messages/messages.go.gen
@@ -0,0 +1,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)