--- xds_engine_xml.c 2001/08/09 20:59:05 1.4
+++ xds_engine_xml.c 2001/08/09 21:05:18 1.5
@@ -33,6 +33,10 @@
#include "xds.h"
+/*
+ * Encode/decode XML document framework
+ */
+
static const char xds_xml_begin_text[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\">\n"
"<!DOCTYPE xds SYSTEM \"http://www.ossp.org/pkg/xds/xds-xml.dtd\">\n"
@@ -81,6 +85,10 @@
return XDS_OK;
}
+/*
+ * Encode/decode signed 32-bit integer values.
+ */
+
int xml_encode_int32(xds_t *xds, void *engine_context,
void *buffer, size_t buffer_size,
size_t *used_buffer_size, va_list *args)
@@ -167,6 +175,10 @@
return XDS_OK;
}
+/*
+ * Encode/decode unsigned 32-bit integer values.
+ */
+
int xml_encode_uint32(xds_t *xds, void *engine_context,
void *buffer, size_t buffer_size,
size_t *used_buffer_size, va_list *args)
@@ -237,6 +249,10 @@
#ifdef XDS_HAVE_64_BIT_SUPPORT
+/*
+ * Encode/decode signed 64-bit integer values.
+ */
+
int xml_encode_int64(xds_t *xds, void *engine_context,
void *buffer, size_t buffer_size,
size_t *used_buffer_size, va_list *args)
@@ -323,6 +339,10 @@
return XDS_OK;
}
+/*
+ * Encode/decode unsigned 64-bit integer values.
+ */
+
int xml_encode_uint64(xds_t *xds, void *engine_context,
void *buffer, size_t buffer_size,
size_t *used_buffer_size, va_list *args)
@@ -393,6 +413,10 @@
#endif /* XDS_HAVE_64_BIT_SUPPORT */
+/*
+ * Encode/decode double-precision floating point values.
+ */
+
int xml_encode_double(xds_t *xds, void *engine_context,
void *buffer, size_t buffer_size,
size_t *used_buffer_size, va_list *args)
@@ -409,6 +433,10 @@
return -1;
}
+/*
+ * Encode/decode NUL-terminated character strings.
+ */
+
#define bits(c) (0x80 | ((c) & 0x3F))
#define put(c) *strptr++ = (c);
#define putbits(c) put(bits(c))
@@ -724,6 +752,10 @@
return XDS_OK;
}
+/*
+ * Encode/decode octet streams.
+ */
+
static const char xds_base64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const char xds_pad64 = '=';
|