summaryrefslogtreecommitdiff
path: root/common/spio.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-11-26 23:03:27 +0000
committerStef Walter <stef@memberwebs.com>2004-11-26 23:03:27 +0000
commit12c4436a96a3b4fb76b60c21b1819ba883ab9296 (patch)
tree0f47f57dbfd99e8d1b38404c73b254efa15e61fa /common/spio.c
parentf07d5b4338ba88c340569d273382a9c846811dff (diff)
- Add XCLIENT support
- Ignore XCLIENT/XFORWARD commands coming from clients.
Diffstat (limited to 'common/spio.c')
-rw-r--r--common/spio.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/common/spio.c b/common/spio.c
index e8425bf..f43988a 100644
--- a/common/spio.c
+++ b/common/spio.c
@@ -510,6 +510,23 @@ int spio_write_data(spctx_t* ctx, spio_t* io, const char* data)
return spio_write_data_raw(ctx, io, (unsigned char*)data, len);
}
+int spio_write_dataf(struct spctx* ctx, spio_t* io, const char* fmt, ...)
+{
+ char buf[SP_LINE_LENGTH];
+ va_list ap;
+ ASSERT(ctx && io && fmt);
+
+ buf[0] = 0;
+
+ va_start(ap, fmt);
+ vsnprintf(buf, SP_LINE_LENGTH, fmt, ap);
+ va_end(ap);
+
+ buf[SP_LINE_LENGTH - 1] = 0;
+
+ return spio_write_data(ctx, io, buf);
+}
+
int spio_write_data_raw(spctx_t* ctx, spio_t* io, unsigned char* buf, int len)
{
int r;