summaryrefslogtreecommitdiff
path: root/src/ICElibint.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ICElibint.h')
-rw-r--r--src/ICElibint.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ICElibint.h b/src/ICElibint.h
index b64795f..3794085 100644
--- a/src/ICElibint.h
+++ b/src/ICElibint.h
@@ -180,6 +180,20 @@ typedef struct {
/*
+ * SEND FOO - write to connection instead of buffer
+ */
+#define SEND_STRING(_iceConn, _string) \
+{ \
+ char _padding[3] = { 0 }; \
+ CARD16 _len = (CARD16) strlen (_string); \
+ IceWriteData32 (_iceConn, 2, &_len); \
+ if (_len) \
+ IceSendData (_iceConn, _len, (char *) _string); \
+ if (PAD32 (2 + _len)) \
+ IceSendData (_iceConn, PAD32 (2 + _len), _padding); \
+}
+
+/*
* EXTRACT FOO
*/