OSSP CVS Repository

ossp - Difference in ossp-pkg/xds/xml-encode-begin.c versions 1.1.2.1 and 1.1.2.2
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/xds/xml-encode-begin.c 1.1.2.1 -> 1.1.2.2

--- xml-encode-begin.c   2001/08/01 13:26:29     1.1.2.1
+++ xml-encode-begin.c   2001/08/01 15:08:02     1.1.2.2
@@ -33,19 +33,11 @@
     "<!DOCTYPE xds SYSTEM \"http://www.ossp.org/pkg/xds/xds-xml.dtd\">\n" \
     "<xds>\n";
 
-int xml_encode_begin(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args)
+int xml_encode_begin(xds_t* xds, void* engine_context,
+                     void* buffer, size_t buffer_size, size_t* used_buffer_size,
+                     va_list* args)
     {
-    /* Consistency checks. */
-
-    assert(xds != NULL);
-    assert(buffer != NULL);
-    assert(buffer_size != 0);
-    assert(args != NULL);
-    if (xds == NULL || buffer == NULL || buffer_size == 0 || args == NULL)
-        return XDS_ERR_INVALID_ARG;
-
-    if (buffer_size >= strlen(xds_xml_begin_text))
-        memmove(buffer, xds_xml_begin_text, strlen(xds_xml_begin_text));
-
-    return strlen(xds_xml_begin_text);
+    xds_init_encoding_engine(strlen(xds_xml_begin_text));
+    memmove(buffer, xds_xml_begin_text, strlen(xds_xml_begin_text));
+    return XDS_OK;
     }

CVSTrac 2.0.1