Index: ossp-pkg/xds/destroy.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/destroy.c,v rcsdiff -q -kk '-r1.7' '-r1.7.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/destroy.c,v' 2>/dev/null --- destroy.c 2001/07/31 06:33:55 1.7 +++ destroy.c 2001/08/01 13:26:29 1.7.2.1 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" void xds_destroy(xds_t* xds) Index: ossp-pkg/xds/find-engine.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/find-engine.c,v co -q -kk -p'1.3.2.1' '/v/ossp/cvs/ossp-pkg/xds/Attic/find-engine.c,v' | diff -u - /dev/null -L'ossp-pkg/xds/find-engine.c' 2>/dev/null --- ossp-pkg/xds/find-engine.c +++ /dev/null 2024-05-14 05:30:35.000000000 +0200 @@ -1,67 +0,0 @@ -/* - XDS - OSSP Extensible Data Serialization Library - Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) - Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) - - This file is part of OSSP XDS, an extensible data serialization - library which can be found at http://www.ossp.com/pkg/xds/. - - Permission to use, copy, modify, and distribute this software for - any purpose with or without fee is hereby granted, provided that - the above copyright notice and this permission notice appear in all - copies. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ - -#include -#include -#include "internal.h" - -int xds_find_engine(const engine_map_t* engines, size_t last, const char* name, size_t* pos) - { - size_t first; - - /* Sanity checks. */ - - xds_check_parameter(engines != NULL || last == 0); - xds_check_parameter(name != NULL); - xds_check_parameter(pos != NULL); - - /* Use binary search to find "name" in "engines". */ - - for (first = 0; (last - first) > 0; ) - { - size_t half = first + ((last - first) / 2); - int rc = strcmp(engines[half].name, name); - - if (rc < 0) - { - first = half + 1; - } - else if(rc == 0) - { /* found it */ - *pos = half; - return XDS_TRUE; - } - else - { - last = half; - } - assert(first <= last); - } - - *pos = first; - return XDS_FALSE; - } Index: ossp-pkg/xds/getbuffer.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/getbuffer.c,v co -q -kk -p'1.2.2.1' '/v/ossp/cvs/ossp-pkg/xds/Attic/getbuffer.c,v' | diff -u - /dev/null -L'ossp-pkg/xds/getbuffer.c' 2>/dev/null --- ossp-pkg/xds/getbuffer.c +++ /dev/null 2024-05-14 05:30:35.000000000 +0200 @@ -1,53 +0,0 @@ -/* - XDS - OSSP Extensible Data Serialization Library - Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) - Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) - - This file is part of OSSP XDS, an extensible data serialization - library which can be found at http://www.ossp.com/pkg/xds/. - - Permission to use, copy, modify, and distribute this software for - any purpose with or without fee is hereby granted, provided that - the above copyright notice and this permission notice appear in all - copies. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ - -#include "assert.h" -#include "internal.h" - -int xds_getbuffer(xds_t* xds, xds_scope_t flag, void** buffer, size_t* buffer_len) - { - /* Sanity checks. */ - - xds_check_parameter(xds != NULL); - xds_check_parameter(flag == XDS_GIFT || flag == XDS_LOAN); - xds_check_parameter(buffer != NULL); - xds_check_parameter(buffer_len != NULL); - - /* Return the buffer to the caller. */ - - *buffer = xds->buffer; - *buffer_len = xds->buffer_len; - if (flag == XDS_GIFT) - { - xds->buffer = NULL; - xds->buffer_capacity = xds->buffer_len = 0; - } - else - xds->buffer_len = 0; - - return XDS_OK; - } Index: ossp-pkg/xds/init.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/init.c,v rcsdiff -q -kk '-r1.5' '-r1.5.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/init.c,v' 2>/dev/null --- init.c 2001/08/01 09:22:50 1.5 +++ init.c 2001/08/01 13:26:29 1.5.2.1 @@ -27,7 +27,6 @@ #include #include -#include #include "internal.h" xds_t* xds_init(xds_mode_t mode) Index: ossp-pkg/xds/register.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/register.c,v rcsdiff -q -kk '-r1.6.2.1' '-r1.6.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/register.c,v' 2>/dev/null --- register.c 2001/08/01 09:55:58 1.6.2.1 +++ register.c 2001/08/01 13:26:29 1.6.2.2 @@ -28,7 +28,6 @@ #include #include #include -#include #include "internal.h" int xds_register(xds_t* xds, const char* name, xds_engine_t engine, void* engine_context) Index: ossp-pkg/xds/regression-tests/xds-mystruct.c RCS File: /v/ossp/cvs/ossp-pkg/xds/regression-tests/Attic/xds-mystruct.c,v co -q -kk -p'1.5.2.2' '/v/ossp/cvs/ossp-pkg/xds/regression-tests/Attic/xds-mystruct.c,v' | diff -u - /dev/null -L'ossp-pkg/xds/regression-tests/xds-mystruct.c' 2>/dev/null --- ossp-pkg/xds/regression-tests/xds-mystruct.c +++ /dev/null 2024-05-14 05:30:35.000000000 +0200 @@ -1,169 +0,0 @@ -/* - XDS - OSSP Extensible Data Serialization Library - Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) - Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) - - This file is part of OSSP XDS, an extensible data serialization - library which can be found at http://www.ossp.com/pkg/xds/. - - Permission to use, copy, modify, and distribute this software for - any purpose with or without fee is hereby granted, provided that - the above copyright notice and this permission notice appear in all - copies. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ - -#include -#include -#include -#include "../internal.h" - -struct mystruct - { - xds_int32_t small; - xds_int64_t big; - xds_uint32_t positive; - }; - -static int encode_mystruct_engine(xds_t* xds, void* engine_context, - void* buffer, size_t buffer_size, size_t* used_buffer_size, - va_list* args) - { - struct mystruct* ms; - - assert(xds != NULL); - assert(buffer != NULL); - assert(buffer_size != 0); - assert(used_buffer_size != NULL); - assert(args != NULL); - - ms = va_arg(*args, struct mystruct*); - return xds_encode(xds, "int32 int64 uint32", ms->small, ms->big, ms->positive); - } - -static int decode_mystruct_engine(xds_t* xds, void* engine_context, - void* buffer, size_t buffer_size, size_t* used_buffer_size, - va_list* args) - { - struct mystruct* ms; - - assert(xds != NULL); - assert(buffer != NULL); - assert(buffer_size != 0); - assert(used_buffer_size != NULL); - assert(args != NULL); - - ms = va_arg(*args, struct mystruct*); - return xds_decode(xds, "int32 int64 uint32", &(ms->small), &(ms->big), &(ms->positive)); - } - -int main() - { - xds_t* xds; - char* buffer; - size_t buffer_size; - - struct mystruct ms, new_ms; - ms.small = -0x1234567; - ms.big = -0x1234567890abcdeLL; - ms.positive = 42; - - /* Encode our copy of mystruct using our encoding callback. Then - get a the buffer and destroy the context again. */ - - xds = xds_init(XDS_ENCODE); - if (xds == NULL) - { - printf("Failed to initialize XDS context.\n"); - return 1; - } - if (xds_register(xds, "mystruct", &encode_mystruct_engine, NULL) != XDS_OK || - xds_register(xds, "int32", &xdr_encode_int32, NULL) != XDS_OK || - xds_register(xds, "int64", &xdr_encode_int64, NULL) != XDS_OK || - xds_register(xds, "uint32", &xdr_encode_uint32, NULL) != XDS_OK) - { - printf("Failed to register my encoding engines.\n"); - return 1; - } - buffer_size = 4; - buffer = malloc(buffer_size); - if (buffer == NULL) - { - printf("Failed to allocate memory for buffer.\n"); - return 1; - } - if (xds_setbuffer(xds, XDS_GIFT, buffer, buffer_size) != XDS_OK) - { - printf("xds_setbuffer() failed!\n"); - return 1; - } - if (xds_encode(xds, "mystruct", &ms) != XDS_OK) - { - printf("xds_encode() failed!\n"); - return 1; - } - if (xds->buffer_capacity <= buffer_size) - { - printf("Buffer should have been enlarged after xds_encode()!\n"); - return 1; - } - if (xds_getbuffer(xds, XDS_GIFT, (void**)&buffer, &buffer_size) != XDS_OK) - { - printf("xds_getbuffer() failed!\n"); - return 1; - } - xds_destroy(xds); - printf("The encoded representation is %u bytes long.\n", buffer_size); - - /* Now create a decoding context and decode the whole thing again. */ - - xds = xds_init(XDS_DECODE); - if (xds == NULL) - { - printf("Failed to initialize XDS context.\n"); - return 1; - } - if (xds_register(xds, "mystruct", &decode_mystruct_engine, NULL) != XDS_OK || - xds_register(xds, "int32", &xdr_decode_int32, NULL) != XDS_OK || - xds_register(xds, "int64", &xdr_decode_int64, NULL) != XDS_OK || - xds_register(xds, "uint32", &xdr_decode_uint32, NULL) != XDS_OK) - { - printf("Failed to register my decoding engines.\n"); - return 1; - } - if (xds_setbuffer(xds, XDS_GIFT, buffer, buffer_size) != XDS_OK) - { - printf("xds_setbuffer() failed!\n"); - return 1; - } - if (xds_decode(xds, "mystruct", &new_ms) != XDS_OK) - { - printf("xds_decode() failed!\n"); - return 1; - } - xds_destroy(xds); - - /* Both structures must be identical. */ - - if (ms.small != new_ms.small || ms.big != new_ms.big || ms.positive != new_ms.positive) - { - printf("Decoded data does not match the original!\n"); - return 1; - } - - /* Everything went fine. */ - - return 0; - } Index: ossp-pkg/xds/regression-tests/xds-register.c RCS File: /v/ossp/cvs/ossp-pkg/xds/regression-tests/Attic/xds-register.c,v co -q -kk -p'1.6.2.1' '/v/ossp/cvs/ossp-pkg/xds/regression-tests/Attic/xds-register.c,v' | diff -u - /dev/null -L'ossp-pkg/xds/regression-tests/xds-register.c' 2>/dev/null --- ossp-pkg/xds/regression-tests/xds-register.c +++ /dev/null 2024-05-14 05:30:35.000000000 +0200 @@ -1,145 +0,0 @@ -/* - XDS - OSSP Extensible Data Serialization Library - Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) - Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) - - This file is part of OSSP XDS, an extensible data serialization - library which can be found at http://www.ossp.com/pkg/xds/. - - Permission to use, copy, modify, and distribute this software for - any purpose with or without fee is hereby granted, provided that - the above copyright notice and this permission notice appear in all - copies. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ - -#include -#include -#include -#include "../internal.h" - -static int dummy_engine(xds_t* xds, void* engine_context, - void* buffer, size_t buffer_size, size_t* used_buffer_size, - va_list* args) - { - return 0; - } - -int main() - { - const char* test_names[] = - { - "foo", - "bar", - "zarah", - "caesar", - "claus", - "heinz", - }; - size_t test_names_len = sizeof(test_names) / sizeof(char*); - xds_t* xds; - size_t i; - - /* Create context. */ - - xds = xds_init(XDS_ENCODE); - if (xds == NULL) - { - printf("Failed to initialize XDS context.\n"); - return 1; - } - - /* Register the dummy callback under an invalid name to see - whether the routine fails correctly. */ - - if (xds_register(xds, "abcdefh1230#", &dummy_engine, NULL) != XDS_ERR_INVALID_ARG) - { - printf("xds_register() illegally accepted an invalid name for the engine.\n"); - return 1; - } - - /* Register the dummy callback under multiple names. */ - - for(i = 0; i < test_names_len; ++i) - { - if (xds_register(xds, test_names[i], &dummy_engine, NULL) != XDS_OK) - { - printf("Failed to register engine for '%s'.\n", test_names[i]); - return 1; - } - } - - /* Register the callback again, overwriting an existing entry. */ - - if (xds_register(xds, "claus", &dummy_engine, NULL) != XDS_OK) - { - printf("Failed to re-register engine for 'claus'.\n"); - return 1; - } - - /* Ensure that everything is in alphabetical order. */ - - for (i = 1; i < xds->engines_len; ++i) - { - assert(xds->engines[i-1].name != NULL); - assert(xds->engines[i].name != NULL); - if (strcmp(xds->engines[i-1].name, xds->engines[i].name) >= 0) - { - printf("xds->engines is not in alphabetical order!\n"); - exit(1); - } - } - - /* Try to remove an unknown entry. */ - - if (xds_unregister(xds, "abacadabra") != XDS_ERR_UNKNOWN_ENGINE) - { - printf("xds_unregister() succeeded at removing 'abacadabra' even though it is not there.\n"); - exit(1); - } - - /* Remove an entry from the middle. */ - - if (xds_unregister(xds, test_names[test_names_len/2]) != XDS_OK) - { - printf("xds_unregister() failed to remove '%s'.\n", test_names[test_names_len/2]); - exit(1); - } - - /* Remove the last entry. */ - - assert(test_names_len > 0); - if (xds_unregister(xds, test_names[test_names_len-1]) != XDS_OK) - { - printf("xds_unregister() failed to remove '%s'.\n", test_names[test_names_len-1]); - exit(1); - } - - /* Remove the first entry. */ - - if (xds_unregister(xds, test_names[0]) != XDS_OK) - { - printf("xds_unregister() failed to remove '%s'.\n", test_names[0]); - exit(1); - } - - /* Clean up. */ - - xds_destroy(xds); - - /* Everything went fine. */ - - return 0; - } Index: ossp-pkg/xds/regression-tests/xds-setbuffer.c RCS File: /v/ossp/cvs/ossp-pkg/xds/regression-tests/Attic/xds-setbuffer.c,v co -q -kk -p'1.3.2.2' '/v/ossp/cvs/ossp-pkg/xds/regression-tests/Attic/xds-setbuffer.c,v' | diff -u - /dev/null -L'ossp-pkg/xds/regression-tests/xds-setbuffer.c' 2>/dev/null --- ossp-pkg/xds/regression-tests/xds-setbuffer.c +++ /dev/null 2024-05-14 05:30:35.000000000 +0200 @@ -1,135 +0,0 @@ -/* - XDS - OSSP Extensible Data Serialization Library - Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) - Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) - - This file is part of OSSP XDS, an extensible data serialization - library which can be found at http://www.ossp.com/pkg/xds/. - - Permission to use, copy, modify, and distribute this software for - any purpose with or without fee is hereby granted, provided that - the above copyright notice and this permission notice appear in all - copies. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ - -#include -#include -#include -#include "../internal.h" - -static int dummy_engine(xds_t* xds, void* engine_context, - void* buffer, size_t buffer_size, size_t* used_buffer_size, - va_list* args) - { - assert(xds != NULL); - assert(buffer != NULL); - assert(buffer_size != 0); - assert(used_buffer_size != NULL); - assert(args != NULL); - if (buffer_size < 64) - return XDS_ERR_OVERFLOW; - else - *used_buffer_size = 64; - memset(buffer, 'a', 64); - return XDS_OK; - } - -int main() - { - xds_t* xds; - char* buffer; - size_t buffer_size; - - /* Create XDS context. */ - - xds = xds_init(XDS_ENCODE); - if (xds == NULL) - { - printf("Failed to initialize XDS context.\n"); - return 1; - } - - /* Register the callback. */ - - if (xds_register(xds, "dummy", &dummy_engine, NULL) != XDS_OK) - { - printf("Failed to register my encoding engine.\n"); - return 1; - } - - /* Give the library a buffer of 32 byte, call the engine once, get - the buffer back and see whether it has been enlarged or not. */ - - buffer_size = 32; - buffer = malloc(buffer_size); - if (buffer == NULL) - { - printf("Failed to allocate my memory.\n"); - return 1; - } - if (xds_setbuffer(xds, XDS_GIFT, buffer, buffer_size) != XDS_OK) - { - printf("xds_setbuffer() failed!\n"); - return 1; - } - if (xds_encode(xds, "dummy") != XDS_OK) - { - printf("xds_encode() failed!\n"); - return 1; - } - if (xds_getbuffer(xds, XDS_GIFT, (void**)&buffer, &buffer_size) != XDS_OK) - { - printf("xds_getbuffer() failed!\n"); - return 1; - } - if (buffer_size < 64) - { - printf("xds_encode() did not enlarge the buffer after processing the callback\n"); - printf("even though all capacity was used up!\n"); - return 1; - } - - /* Loan the library a buffer we own, call the engine once to - exceed the buffer's capacity and check, whether the library - returns the correct error code. */ - - buffer = malloc(32); - if (buffer == NULL) - { - printf("Failed to allocate my memory.\n"); - return 1; - } - buffer_size = 32; - if (xds_setbuffer(xds, XDS_LOAN, buffer, buffer_size) != XDS_OK) - { - printf("xds_setbuffer() failed!\n"); - return 1; - } - if (xds_encode(xds, "dummy") != XDS_ERR_OVERFLOW) - { - printf("xds_encode() was supposed to fail with XDS_ERR_OVERFLOW!\n"); - return 1; - } - free(buffer); - - /* Clean up. */ - - xds_destroy(xds); - - /* Everything went fine. */ - - return 0; - } Index: ossp-pkg/xds/set-capacity.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/set-capacity.c,v rcsdiff -q -kk '-r1.3.2.1' '-r1.3.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/set-capacity.c,v' 2>/dev/null --- set-capacity.c 2001/08/01 09:55:58 1.3.2.1 +++ set-capacity.c 2001/08/01 13:26:29 1.3.2.2 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" int xds_set_capacity(void** array, size_t* array_capacity, size_t new_capacity, size_t elem_size, size_t initial_capacity) Index: ossp-pkg/xds/setbuffer.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/setbuffer.c,v co -q -kk -p'1.6.2.1' '/v/ossp/cvs/ossp-pkg/xds/Attic/setbuffer.c,v' | diff -u - /dev/null -L'ossp-pkg/xds/setbuffer.c' 2>/dev/null --- ossp-pkg/xds/setbuffer.c +++ /dev/null 2024-05-14 05:30:35.000000000 +0200 @@ -1,62 +0,0 @@ -/* - XDS - OSSP Extensible Data Serialization Library - Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) - Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) - - This file is part of OSSP XDS, an extensible data serialization - library which can be found at http://www.ossp.com/pkg/xds/. - - Permission to use, copy, modify, and distribute this software for - any purpose with or without fee is hereby granted, provided that - the above copyright notice and this permission notice appear in all - copies. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ - -#include "assert.h" -#include "internal.h" - -int xds_setbuffer(xds_t* xds, xds_scope_t flag, void* buffer, size_t buffer_len) - { - /* Sanity checks. */ - - xds_check_parameter(xds != NULL); - xds_check_parameter(flag == XDS_GIFT || flag == XDS_LOAN); - xds_check_parameter((buffer != NULL && buffer_len != 0) || flag == XDS_GIFT); - - /* Free the old buffer if there is one. */ - - if (xds->buffer != NULL && xds->we_own_buffer) - free(xds->buffer); - xds->buffer_len = 0; - - if (flag == XDS_GIFT) - { - xds->buffer = buffer; - if (buffer == NULL) - xds->buffer_capacity = 0; - else - xds->buffer_capacity = buffer_len; - xds->we_own_buffer = XDS_TRUE; - } - else - { - xds->buffer = buffer; - xds->buffer_capacity = buffer_len; - xds->we_own_buffer = XDS_FALSE; - } - - return XDS_OK; - } Index: ossp-pkg/xds/unregister.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/unregister.c,v rcsdiff -q -kk '-r1.4.2.1' '-r1.4.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/unregister.c,v' 2>/dev/null --- unregister.c 2001/08/01 09:55:58 1.4.2.1 +++ unregister.c 2001/08/01 13:26:29 1.4.2.2 @@ -28,7 +28,6 @@ #include #include #include -#include #include "internal.h" int xds_unregister(xds_t* xds, const char* name) Index: ossp-pkg/xds/vdecode.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/vdecode.c,v rcsdiff -q -kk '-r1.4.2.2' '-r1.4.2.3' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/vdecode.c,v' 2>/dev/null --- vdecode.c 2001/08/01 11:26:16 1.4.2.2 +++ vdecode.c 2001/08/01 13:26:29 1.4.2.3 @@ -27,7 +27,6 @@ #include #include -#include #include "internal.h" int xds_vdecode(xds_t* xds, const char* fmt_arg, va_list args) Index: ossp-pkg/xds/vencode.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/vencode.c,v rcsdiff -q -kk '-r1.12.2.3' '-r1.12.2.4' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/vencode.c,v' 2>/dev/null --- vencode.c 2001/08/01 12:01:32 1.12.2.3 +++ vencode.c 2001/08/01 13:26:29 1.12.2.4 @@ -27,7 +27,6 @@ #include #include -#include #include "internal.h" int xds_vencode(xds_t* xds, const char* fmt_arg, va_list args) Index: ossp-pkg/xds/xdr-decode-int64.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-int64.c,v rcsdiff -q -kk '-r1.3.2.1' '-r1.3.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-int64.c,v' 2>/dev/null --- xdr-decode-int64.c 2001/08/01 11:26:56 1.3.2.1 +++ xdr-decode-int64.c 2001/08/01 13:26:29 1.3.2.2 @@ -25,7 +25,6 @@ SUCH DAMAGE. */ -#include #include "internal.h" int xdr_decode_int64(xds_t* xds, void* engine_context, Index: ossp-pkg/xds/xdr-decode-octetstream.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-octetstream.c,v rcsdiff -q -kk '-r1.3.2.1' '-r1.3.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-octetstream.c,v' 2>/dev/null --- xdr-decode-octetstream.c 2001/08/01 11:26:56 1.3.2.1 +++ xdr-decode-octetstream.c 2001/08/01 13:26:29 1.3.2.2 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" int xdr_decode_octetstream(xds_t* xds, void* engine_context, Index: ossp-pkg/xds/xdr-decode-string.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-string.c,v rcsdiff -q -kk '-r1.4.2.1' '-r1.4.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-string.c,v' 2>/dev/null --- xdr-decode-string.c 2001/08/01 11:26:56 1.4.2.1 +++ xdr-decode-string.c 2001/08/01 13:26:29 1.4.2.2 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" int xdr_decode_string(xds_t* xds, void* engine_context, Index: ossp-pkg/xds/xdr-decode-uint32.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-uint32.c,v rcsdiff -q -kk '-r1.3.2.1' '-r1.3.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-uint32.c,v' 2>/dev/null --- xdr-decode-uint32.c 2001/08/01 11:26:56 1.3.2.1 +++ xdr-decode-uint32.c 2001/08/01 13:26:29 1.3.2.2 @@ -25,7 +25,6 @@ SUCH DAMAGE. */ -#include #include "internal.h" int xdr_decode_uint32(xds_t* xds, void* engine_context, Index: ossp-pkg/xds/xdr-decode-uint64.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-uint64.c,v rcsdiff -q -kk '-r1.3.2.2' '-r1.3.2.3' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-decode-uint64.c,v' 2>/dev/null --- xdr-decode-uint64.c 2001/08/01 11:51:59 1.3.2.2 +++ xdr-decode-uint64.c 2001/08/01 13:26:29 1.3.2.3 @@ -25,7 +25,6 @@ SUCH DAMAGE. */ -#include #include "internal.h" int xdr_decode_uint64(xds_t* xds, void* engine_context, Index: ossp-pkg/xds/xdr-encode-int32.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-int32.c,v rcsdiff -q -kk '-r1.3.2.2' '-r1.3.2.3' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-int32.c,v' 2>/dev/null --- xdr-encode-int32.c 2001/08/01 11:26:56 1.3.2.2 +++ xdr-encode-int32.c 2001/08/01 13:26:29 1.3.2.3 @@ -25,7 +25,6 @@ SUCH DAMAGE. */ -#include #include "internal.h" int xdr_encode_int32(xds_t* xds, void* engine_context, Index: ossp-pkg/xds/xdr-encode-int64.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-int64.c,v rcsdiff -q -kk '-r1.3.2.1' '-r1.3.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-int64.c,v' 2>/dev/null --- xdr-encode-int64.c 2001/08/01 11:26:56 1.3.2.1 +++ xdr-encode-int64.c 2001/08/01 13:26:29 1.3.2.2 @@ -25,7 +25,6 @@ SUCH DAMAGE. */ -#include #include "internal.h" int xdr_encode_int64(xds_t* xds, void* engine_context, Index: ossp-pkg/xds/xdr-encode-octetstream.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-octetstream.c,v rcsdiff -q -kk '-r1.4.2.1' '-r1.4.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-octetstream.c,v' 2>/dev/null --- xdr-encode-octetstream.c 2001/08/01 11:26:56 1.4.2.1 +++ xdr-encode-octetstream.c 2001/08/01 13:26:29 1.4.2.2 @@ -25,7 +25,6 @@ SUCH DAMAGE. */ -#include #include #include "internal.h" Index: ossp-pkg/xds/xdr-encode-string.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-string.c,v rcsdiff -q -kk '-r1.5.2.1' '-r1.5.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-string.c,v' 2>/dev/null --- xdr-encode-string.c 2001/08/01 11:26:56 1.5.2.1 +++ xdr-encode-string.c 2001/08/01 13:26:29 1.5.2.2 @@ -25,7 +25,6 @@ SUCH DAMAGE. */ -#include #include #include "internal.h" Index: ossp-pkg/xds/xdr-encode-uint32.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-uint32.c,v rcsdiff -q -kk '-r1.3.2.1' '-r1.3.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-uint32.c,v' 2>/dev/null --- xdr-encode-uint32.c 2001/08/01 11:26:56 1.3.2.1 +++ xdr-encode-uint32.c 2001/08/01 13:26:29 1.3.2.2 @@ -25,7 +25,6 @@ SUCH DAMAGE. */ -#include #include "internal.h" int xdr_encode_uint32(xds_t* xds, void* engine_context, Index: ossp-pkg/xds/xdr-encode-uint64.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-uint64.c,v rcsdiff -q -kk '-r1.3.2.1' '-r1.3.2.2' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xdr-encode-uint64.c,v' 2>/dev/null --- xdr-encode-uint64.c 2001/08/01 11:26:56 1.3.2.1 +++ xdr-encode-uint64.c 2001/08/01 13:26:29 1.3.2.2 @@ -25,7 +25,6 @@ SUCH DAMAGE. */ -#include #include "internal.h" int xdr_encode_uint64(xds_t* xds, void* engine_context, Index: ossp-pkg/xds/xml-decode-begin.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-begin.c,v rcsdiff -q -kk '-r1.1' '-r1.1.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-begin.c,v' 2>/dev/null --- xml-decode-begin.c 2001/07/31 15:27:45 1.1 +++ xml-decode-begin.c 2001/08/01 13:26:29 1.1.2.1 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" int xml_decode_begin(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args) Index: ossp-pkg/xds/xml-decode-end.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-end.c,v rcsdiff -q -kk '-r1.1' '-r1.1.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-end.c,v' 2>/dev/null --- xml-decode-end.c 2001/07/31 15:28:14 1.1 +++ xml-decode-end.c 2001/08/01 13:26:29 1.1.2.1 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" int xml_decode_end(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args) Index: ossp-pkg/xds/xml-decode-int32.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-int32.c,v rcsdiff -q -kk '-r1.2' '-r1.2.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-int32.c,v' 2>/dev/null --- xml-decode-int32.c 2001/07/24 13:52:41 1.2 +++ xml-decode-int32.c 2001/08/01 13:26:29 1.2.2.1 @@ -27,7 +27,6 @@ #include #include -#include #include "internal.h" int xml_decode_int32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args) Index: ossp-pkg/xds/xml-decode-int64.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-int64.c,v rcsdiff -q -kk '-r1.3' '-r1.3.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-int64.c,v' 2>/dev/null --- xml-decode-int64.c 2001/07/24 13:52:41 1.3 +++ xml-decode-int64.c 2001/08/01 13:26:29 1.3.2.1 @@ -27,7 +27,6 @@ #include #include -#include #include "internal.h" int xml_decode_int64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args) Index: ossp-pkg/xds/xml-decode-uint32.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-uint32.c,v rcsdiff -q -kk '-r1.2' '-r1.2.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-uint32.c,v' 2>/dev/null --- xml-decode-uint32.c 2001/07/24 13:52:41 1.2 +++ xml-decode-uint32.c 2001/08/01 13:26:29 1.2.2.1 @@ -27,7 +27,6 @@ #include #include -#include #include "internal.h" int xml_decode_uint32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args) Index: ossp-pkg/xds/xml-decode-uint64.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-uint64.c,v rcsdiff -q -kk '-r1.3' '-r1.3.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-decode-uint64.c,v' 2>/dev/null --- xml-decode-uint64.c 2001/07/24 13:52:41 1.3 +++ xml-decode-uint64.c 2001/08/01 13:26:29 1.3.2.1 @@ -27,7 +27,6 @@ #include #include -#include #include "internal.h" int xml_decode_uint64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args) Index: ossp-pkg/xds/xml-encode-begin.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-begin.c,v rcsdiff -q -kk '-r1.1' '-r1.1.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-begin.c,v' 2>/dev/null --- xml-encode-begin.c 2001/07/31 15:27:45 1.1 +++ xml-encode-begin.c 2001/08/01 13:26:29 1.1.2.1 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" const char xds_xml_begin_text[] = \ Index: ossp-pkg/xds/xml-encode-end.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-end.c,v rcsdiff -q -kk '-r1.1' '-r1.1.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-end.c,v' 2>/dev/null --- xml-encode-end.c 2001/07/31 15:28:14 1.1 +++ xml-encode-end.c 2001/08/01 13:26:29 1.1.2.1 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" const char xds_xml_end_text[] = "\n"; Index: ossp-pkg/xds/xml-encode-int32.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-int32.c,v rcsdiff -q -kk '-r1.3' '-r1.3.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-int32.c,v' 2>/dev/null --- xml-encode-int32.c 2001/07/24 13:52:41 1.3 +++ xml-encode-int32.c 2001/08/01 13:26:30 1.3.2.1 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" int xml_encode_int32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args) Index: ossp-pkg/xds/xml-encode-int64.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-int64.c,v rcsdiff -q -kk '-r1.3' '-r1.3.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-int64.c,v' 2>/dev/null --- xml-encode-int64.c 2001/07/24 13:52:41 1.3 +++ xml-encode-int64.c 2001/08/01 13:26:30 1.3.2.1 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" int xml_encode_int64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args) Index: ossp-pkg/xds/xml-encode-uint32.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-uint32.c,v rcsdiff -q -kk '-r1.2' '-r1.2.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-uint32.c,v' 2>/dev/null --- xml-encode-uint32.c 2001/07/24 13:52:41 1.2 +++ xml-encode-uint32.c 2001/08/01 13:26:30 1.2.2.1 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" int xml_encode_uint32(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args) Index: ossp-pkg/xds/xml-encode-uint64.c RCS File: /v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-uint64.c,v rcsdiff -q -kk '-r1.3' '-r1.3.2.1' -u '/v/ossp/cvs/ossp-pkg/xds/Attic/xml-encode-uint64.c,v' 2>/dev/null --- xml-encode-uint64.c 2001/07/24 13:52:41 1.3 +++ xml-encode-uint64.c 2001/08/01 13:26:30 1.3.2.1 @@ -26,7 +26,6 @@ */ #include -#include #include "internal.h" int xml_encode_uint64(xds_t* xds, void* engine_context, void* buffer, size_t buffer_size, va_list* args)