--- xds.h.in 2002/03/17 10:25:53 1.20
+++ xds.h.in 2003/02/17 12:27:51 1.21
@@ -62,7 +62,8 @@
XDS_ERR_UNKNOWN_ENGINE = -5,
XDS_ERR_INVALID_MODE = -6,
XDS_ERR_UNDERFLOW = -7,
- XDS_ERR_UNKNOWN = -8
+ XDS_ERR_UNKNOWN = -8,
+ XDS_ERR_SYSTEM = -9
};
typedef enum { XDS_ENCODE, XDS_DECODE } xds_mode_t;
@@ -75,8 +76,8 @@
void *buffer, size_t buffer_size, size_t *used_buffer_size,
va_list *args);
-xds_t *xds_init (xds_mode_t);
-void xds_destroy (xds_t *xds);
+int xds_init (xds_t **xds, xds_mode_t);
+int xds_destroy (xds_t *xds);
int xds_register (xds_t *xds, const char *name, xds_engine_t engine, void *engine_context);
int xds_unregister(xds_t *xds, const char *name);
int xds_setbuffer (xds_t *xds, xds_scope_t flag, void *buffer, size_t buffer_len);
@@ -91,7 +92,7 @@
assert(condition); \
if (!(condition)) \
return XDS_ERR_INVALID_ARG; \
- } while(XDS_FALSE)
+ } while (XDS_FALSE)
#define xds_init_encoding_engine(size) \
do { \
@@ -103,7 +104,7 @@
*used_buffer_size = size; \
if (buffer_size < size) \
return XDS_ERR_OVERFLOW; \
- } while(XDS_FALSE)
+ } while (XDS_FALSE)
#define xds_init_decoding_engine(size) \
do { \
@@ -115,7 +116,7 @@
*used_buffer_size = size; \
if (buffer_size < size) \
return XDS_ERR_UNDERFLOW; \
- } while(XDS_FALSE)
+ } while (XDS_FALSE)
#define xds_declare_formatting_engine(func) \
int func(xds_t *, void *, void *, size_t, size_t *, va_list *)
@@ -163,3 +164,4 @@
xds_declare_formatting_engine(xml_decode_string);
#endif /* __XDS_H__ */
+
|