summaryrefslogtreecommitdiff
path: root/sd_messages/messages.go.gen
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-15 18:56:00 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-15 18:59:56 -0400
commitf3d1d66387ea8eb9b0c2977315c771a5704604a6 (patch)
tree27b7cf1e16f6c2558465b5a012adaeb5650393ff /sd_messages/messages.go.gen
parenta7ff2e2b1448e978dc17a8e213a8b88ebdbecedb (diff)
Implement sd_messages
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)