This commit was manufactured by cvs2svn to create tag 'APU_1_0_0'.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/tags/APU_1_0_0@59123 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/.cvsignore b/.cvsignore
index e5a9cf7..b3a7f82 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -11,10 +11,9 @@
libaprutil*.la
aprutil.exp
exports.c
-export_vars.[ch]
+export_vars.h
export_vars.sh
apu-config
-apu-*-config
apu-config.out
Debug
Release
@@ -37,5 +36,4 @@
autom4te.cache
build-outputs.mk
.make.dirs
-apr-util*.pc
-apr-util.spec
+apr-util.pc
diff --git a/include/apr_buckets.h b/include/apr_buckets.h
index 81c29b2..e0bb5bf 100644
--- a/include/apr_buckets.h
+++ b/include/apr_buckets.h
@@ -701,6 +701,17 @@
apr_off_t point,
apr_bucket **after_point);
+#if APR_NOT_DONE_YET
+/**
+ * consume nbytes from beginning of b -- call apr_bucket_destroy as
+ * appropriate, and/or modify start on last element
+ * @param b The brigade to consume data from
+ * @param nbytes The number of bytes to consume
+ */
+APU_DECLARE(void) apr_brigade_consume(apr_bucket_brigade *b,
+ apr_off_t nbytes);
+#endif
+
/**
* Return the total length of the brigade.
* @param bb The brigade to compute the length of
diff --git a/include/apr_xml.h b/include/apr_xml.h
index 6ff4c88..6c9ea41 100644
--- a/include/apr_xml.h
+++ b/include/apr_xml.h
@@ -29,9 +29,6 @@
#include "apr_file_io.h"
#include "apu.h"
-#if APR_CHARSET_EBCDIC
-#include "apr_xlate.h"
-#endif
#ifdef __cplusplus
extern "C" {
@@ -335,19 +332,6 @@
/** Get the URI item for this XML element */
#define APR_XML_GET_URI_ITEM(ary, i) (((const char * const *)(ary)->elts)[i])
-#if APR_CHARSET_EBCDIC
-/**
- * Convert parsed tree in EBCDIC
- * @param p The pool to allocate out of
- * @param pdoc The apr_xml_doc to convert.
- * @param xlate The translation handle to use.
- * @return Any errors found during conversion.
- */
-APU_DECLARE(apr_status_t) apr_xml_parser_convert_doc(apr_pool_t *p,
- apr_xml_doc *pdoc,
- apr_xlate_t *convset);
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/include/apu_version.h b/include/apu_version.h
index cc2229c..4a33488 100644
--- a/include/apu_version.h
+++ b/include/apu_version.h
@@ -62,14 +62,7 @@
#define APU_MINOR_VERSION 0
/** patch level */
-#define APU_PATCH_VERSION 1
-
-/**
- * This symbol is defined for internal, "development" copies of APU. This
- * symbol will be #undef'd for releases.
- */
-#define APU_IS_DEV_VERSION
-
+#define APU_PATCH_VERSION 0
/** The formatted string of APU's version */
#define APU_VERSION_STRING \
diff --git a/renames_pending b/renames_pending
deleted file mode 100644
index 0ebcfe2..0000000
--- a/renames_pending
+++ /dev/null
@@ -1,2 +0,0 @@
-Symbol renames pending for apr-util (keep ordered and complete, please!)
-
diff --git a/test/testrmm.c b/test/testrmm.c
index 8203be1..c4dc989 100644
--- a/test/testrmm.c
+++ b/test/testrmm.c
@@ -51,7 +51,7 @@
}
/* We're going to want 10 blocks of data from our target rmm. */
- size = SHARED_SIZE + apr_rmm_overhead_get(FRAG_COUNT + 1);
+ size = SHARED_SIZE + apr_rmm_overhead_get(FRAG_COUNT);
printf("Creating anonymous shared memory (%"
APR_SIZE_T_FMT " bytes).....", size);
rv = apr_shm_create(&shm, size, NULL, pool);
@@ -87,24 +87,6 @@
else {
return APR_EGENERAL;
}
-
- printf("Checking each fragment for address alignment.....");
- for (i = 0; i < FRAG_COUNT; i++) {
- char *c = apr_rmm_addr_get(rmm, off[i]);
- apr_size_t sc = (apr_size_t)c;
-
- if (off[i] == 0) {
- printf("allocation failed for offset %d\n", i);
- return APR_ENOMEM;
- }
-
- if (sc & 7) {
- printf("Bad alignment for fragment %d; %p not %p!\n",
- i, c, (void *)APR_ALIGN_DEFAULT((apr_size_t)c));
- return APR_EGENERAL;
- }
- }
- fprintf(stdout, "OK\n");
printf("Setting each fragment to a unique value..........");
for (i = 0; i < FRAG_COUNT; i++) {
diff --git a/xlate/xlate.c b/xlate/xlate.c
index 4a4f6b5..b75c15d 100644
--- a/xlate/xlate.c
+++ b/xlate/xlate.c
@@ -178,10 +178,9 @@
else {
/* reset the iconv descriptor, since it's now in an undefined
* state. */
- apr_iconv_close(convset->ich, convset->pool);
- rv = apr_iconv_open(convset->topage, convset->frompage,
- convset->pool, &convset->ich);
- }
+ apr_iconv_close(convset->ich);
+ convset->ich = apr_iconv_open(convset->topage, convset->frompage);
+ }
}
#endif /* APU_HAVE_APR_ICONV */
diff --git a/xml/apr_xml.c b/xml/apr_xml.c
index 4520e8d..f7484ac 100644
--- a/xml/apr_xml.c
+++ b/xml/apr_xml.c
@@ -32,19 +32,15 @@
#define DEBUG_CR "\r\n"
-static const char APR_KW_xmlns[] = { 0x78, 0x6D, 0x6C, 0x6E, 0x73, '\0' };
-static const char APR_KW_xmlns_lang[] = { 0x78, 0x6D, 0x6C, 0x3A, 0x6C, 0x61, 0x6E, 0x67, '\0' };
-static const char APR_KW_DAV[] = { 0x44, 0x41, 0x56, 0x3A, '\0' };
-
/* errors related to namespace processing */
#define APR_XML_NS_ERROR_UNKNOWN_PREFIX (-1000)
#define APR_XML_NS_ERROR_INVALID_DECL (-1001)
/* test for a namespace prefix that begins with [Xx][Mm][Ll] */
#define APR_XML_NS_IS_RESERVED(name) \
- ( (name[0] == 0x58 || name[0] == 0x78) && \
- (name[1] == 0x4D || name[1] == 0x6D) && \
- (name[2] == 0x4C || name[2] == 0x6C) )
+ ( (name[0] == 'X' || name[0] == 'x') && \
+ (name[1] == 'M' || name[1] == 'm') && \
+ (name[2] == 'L' || name[2] == 'l') )
/* the real (internal) definition of the parser context */
@@ -171,12 +167,12 @@
for (prev = NULL, attr = elem->attr;
attr;
attr = attr->next) {
- if (strncmp(attr->name, APR_KW_xmlns, 5) == 0) {
+ if (strncmp(attr->name, "xmlns", 5) == 0) {
const char *prefix = &attr->name[5];
apr_xml_ns_scope *ns_scope;
/* test for xmlns:foo= form and xmlns= form */
- if (*prefix == 0x3A) {
+ if (*prefix == ':') {
/* a namespace prefix declaration must have a
non-empty value. */
if (attr->value[0] == '\0') {
@@ -210,7 +206,7 @@
/* Note: prev will not be advanced since we just removed "attr" */
}
- else if (strcmp(attr->name, APR_KW_xmlns_lang) == 0) {
+ else if (strcmp(attr->name, "xml:lang") == 0) {
/* save away the language (in quoted form) */
elem->lang = apr_xml_quote_string(parser->p, attr->value, 1);
@@ -238,7 +234,7 @@
elem->lang = elem->parent->lang;
/* adjust the element's namespace */
- colon = strchr(elem_name, 0x3A);
+ colon = strchr(elem_name, ':');
if (colon == NULL) {
/*
* The element is using the default namespace, which will always
@@ -270,7 +266,7 @@
*/
char *attr_name = (char *)attr->name;
- colon = strchr(attr_name, 0x3A);
+ colon = strchr(attr_name, ':');
if (colon == NULL) {
/*
* Attributes do NOT use the default namespace. Therefore,
@@ -352,7 +348,7 @@
parser->doc->namespaces = apr_array_make(pool, 5, sizeof(const char *));
/* ### is there a way to avoid hard-coding this? */
- apr_xml_insert_uri(parser->doc->namespaces, APR_KW_DAV);
+ apr_xml_insert_uri(parser->doc->namespaces, "DAV:");
parser->xp = XML_ParserCreate(NULL);
if (parser->xp == NULL) {
@@ -886,90 +882,3 @@
*pelt = uri; /* assume uri is const or in a pool */
return uri_array->nelts - 1;
}
-
-/* convert the element to EBCDIC */
-#if APR_CHARSET_EBCDIC
-static apr_status_t apr_xml_parser_convert_elem(apr_xml_elem *e,
- apr_xlate_t *convset)
-{
- apr_xml_attr *a;
- apr_xml_elem *ec;
- apr_text *t;
- apr_size_t inbytes_left, outbytes_left;
- apr_status_t status;
-
- inbytes_left = outbytes_left = strlen(e->name);
- status = apr_xlate_conv_buffer(convset, e->name, &inbytes_left, (char *) e->name, &outbytes_left);
- if (status) {
- return status;
- }
-
- for (t = e->first_cdata.first; t != NULL; t = t->next) {
- inbytes_left = outbytes_left = strlen(t->text);
- status = apr_xlate_conv_buffer(convset, t->text, &inbytes_left, (char *) t->text, &outbytes_left);
- if (status) {
- return status;
- }
- }
-
- for (t = e->following_cdata.first; t != NULL; t = t->next) {
- inbytes_left = outbytes_left = strlen(t->text);
- status = apr_xlate_conv_buffer(convset, t->text, &inbytes_left, (char *) t->text, &outbytes_left);
- if (status) {
- return status;
- }
- }
-
- for (a = e->attr; a != NULL; a = a->next) {
- inbytes_left = outbytes_left = strlen(a->name);
- status = apr_xlate_conv_buffer(convset, a->name, &inbytes_left, (char *) a->name, &outbytes_left);
- if (status) {
- return status;
- }
- inbytes_left = outbytes_left = strlen(a->value);
- status = apr_xlate_conv_buffer(convset, a->value, &inbytes_left, (char *) a->value, &outbytes_left);
- if (status) {
- return status;
- }
- }
-
- for (ec = e->first_child; ec != NULL; ec = ec->next) {
- status = apr_xml_parser_convert_elem(ec, convset);
- if (status) {
- return status;
- }
- }
- return APR_SUCCESS;
-}
-
-/* convert the whole document to EBCDIC */
-APU_DECLARE(apr_status_t) apr_xml_parser_convert_doc(apr_pool_t *pool,
- apr_xml_doc *pdoc,
- apr_xlate_t *convset)
-{
- apr_status_t status;
- /* Don't convert the namespaces: they are constant! */
- if (pdoc->namespaces != NULL) {
- int i;
- apr_array_header_t *namespaces;
- namespaces = apr_array_make(pool, pdoc->namespaces->nelts, sizeof(const char *));
- if (namespaces == NULL)
- return APR_ENOMEM;
- for (i = 0; i < pdoc->namespaces->nelts; i++) {
- apr_size_t inbytes_left, outbytes_left;
- char *ptr = (char *) APR_XML_GET_URI_ITEM(pdoc->namespaces, i);
- ptr = apr_pstrdup(pool, ptr);
- if ( ptr == NULL)
- return APR_ENOMEM;
- inbytes_left = outbytes_left = strlen(ptr);
- status = apr_xlate_conv_buffer(convset, ptr, &inbytes_left, ptr, &outbytes_left);
- if (status) {
- return status;
- }
- apr_xml_insert_uri(namespaces, ptr);
- }
- pdoc->namespaces = namespaces;
- }
- return apr_xml_parser_convert_elem(pdoc->root, convset);
-}
-#endif