ossp-pkg/xds/internal.h 1.8 -> 1.9
--- internal.h 2001/08/01 15:25:47 1.8
+++ internal.h 2001/08/02 08:12:26 1.9
@@ -30,12 +30,8 @@
#ifndef __INTERNAL_H__
#define __INTERNAL_H__
-#include <assert.h>
#include "xds.h"
-#define XDS_TRUE (1==1)
-#define XDS_FALSE (1!=1)
-
#define XDS_INITIAL_BUFFER_CAPACITY 512
#define XDS_INITIAL_ENGINES_CAPACITY 32
@@ -64,41 +60,4 @@
int xds_find_engine(const engine_map_t* engines, size_t last, const char* name, size_t* pos);
int xds_set_capacity(void** array, size_t* array_capacity, size_t new_capacity, size_t elem_size, size_t initial_capacity);
-extern const char xds_xml_begin_text[];
-extern const char xds_xml_end_text[];
-
-#define xds_check_parameter(condition) \
- do \
- { \
- assert(condition); \
- if (!(condition)) \
- return XDS_ERR_INVALID_ARG; \
- } while(XDS_FALSE)
-
-#define xds_init_encoding_engine(size) \
- do \
- { \
- xds_check_parameter(xds != NULL); \
- xds_check_parameter(buffer != NULL); \
- xds_check_parameter(buffer_size != 0); \
- xds_check_parameter(used_buffer_size != NULL && *used_buffer_size == 0); \
- xds_check_parameter(args != NULL); \
- *used_buffer_size = size; \
- if (buffer_size < size) \
- return XDS_ERR_OVERFLOW; \
- } while(XDS_FALSE)
-
-#define xds_init_decoding_engine(size) \
- do \
- { \
- xds_check_parameter(xds != NULL); \
- xds_check_parameter(buffer != NULL); \
- xds_check_parameter(buffer_size != 0); \
- xds_check_parameter(used_buffer_size != NULL && *used_buffer_size == 0); \
- xds_check_parameter(args != NULL); \
- *used_buffer_size = size; \
- if (buffer_size < size) \
- return XDS_ERR_UNDERFLOW; \
- } while(XDS_FALSE)
-
#endif /* !defined(__INTERNAL_H__) */
|
|