diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 1999-08-19 21:45:34 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 1999-08-19 21:45:34 +0000 |
commit | 0552a13f738d09d770327b295fcee005f632af2a (patch) | |
tree | cfc746efb0ae563cb4bcf5d2334df8b97042e167 /include | |
parent | b5897a9db059f873d36ba25b965f1a858eb4549b (diff) | |
download | libapr-0552a13f738d09d770327b295fcee005f632af2a.tar.gz |
A couple of changes required to make things work nicer with Apache. Mainly
moving the lib*.a when they are all built into a common dir, and putting some
declarations in the right spots.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59166 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/apr_lib.h | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/include/apr_lib.h b/include/apr_lib.h index c0f30f31c..02294c4a5 100644 --- a/include/apr_lib.h +++ b/include/apr_lib.h @@ -125,6 +125,21 @@ typedef struct ap_array_header_t { char *elts; } ap_array_header_t; +typedef struct ap_table_entry_t { + char *key; /* maybe NULL in future; + * check when iterating thru table_elts + */ + char *val; +} ap_table_entry_t; + +/* XXX: these know about the definition of struct table in alloc.c. That + * definition is not here because it is supposed to be private, and by not + * placing it here we are able to get compile-time diagnostics from modules + * written which assume that a table is the same as an ap_array_header_t. -djg + */ +#define ap_table_elts(t) ((ap_array_header_t *)(t)) +#define ap_is_empty_table(t) (((t) == NULL)||(((ap_array_header_t *)(t))->nelts == 0)) + /* * Structure used by the variable-formatter routines. */ @@ -154,11 +169,28 @@ API_EXPORT_NONSTD(int) ap_execve(const char *c, const char *argv[], #define ap_create_mutex(x) (0) #define ap_release_mutex(x) (0) #define ap_acquire_mutex(x) (0) -#define ap_islower(x) (0) -#define ap_isalpha(x) (0) -#define ap_isdigit(x) (0) -#define apr_tolower(c) (tolower(((unsigned char)(c)))) +/* These macros allow correct support of 8-bit characters on systems which + * support 8-bit characters. Pretty dumb how the cast is required, but + * that's legacy libc for ya. These new macros do not support EOF like + * the standard macros do. Tough. + */ +#define ap_isalnum(c) (isalnum(((unsigned char)(c)))) +#define ap_isalpha(c) (isalpha(((unsigned char)(c)))) +#define ap_iscntrl(c) (iscntrl(((unsigned char)(c)))) +#define ap_isdigit(c) (isdigit(((unsigned char)(c)))) +#define ap_isgraph(c) (isgraph(((unsigned char)(c)))) +#define ap_islower(c) (islower(((unsigned char)(c)))) +#define ap_isprint(c) (isprint(((unsigned char)(c)))) +#define ap_ispunct(c) (ispunct(((unsigned char)(c)))) +#define ap_isspace(c) (isspace(((unsigned char)(c)))) +#define ap_isupper(c) (isupper(((unsigned char)(c)))) +#define ap_isxdigit(c) (isxdigit(((unsigned char)(c)))) +#define ap_tolower(c) (tolower(((unsigned char)(c)))) +#define ap_toupper(c) (toupper(((unsigned char)(c)))) + + + /* * Small utility macros to make things easier to read. Not usually a @@ -308,6 +340,8 @@ API_EXPORT(ap_table_t *) ap_overlay_tables(struct context_t *p, API_EXPORT(void) ap_table_do(int (*comp) (void *, const char *, const char *), void *rec, const ap_table_t *t, ...); +#define AP_OVERLAP_TABLES_SET (0) +#define AP_OVERLAP_TABLES_MERGE (1) API_EXPORT(void) ap_overlap_tables(ap_table_t *a, const ap_table_t *b, unsigned flags); API_EXPORT(void) ap_register_cleanup(struct context_t *p, void *data, |