thommay 2002/07/06 12:44:50
Modified: . renames_pending
hooks apr_hooks.c
include apr_hooks.h apr_optional.h apr_uri.h apu_compat.h
uri apr_uri.c
Log:
Renames Pending:
This clears the list of renames pending in apr-util.
Parts of this list was alreadu done, but the pending list hadn't been updated.
apr_hook_debug_current from apr_current_hooking_module
apr_hook_debug_show from apr_show_hook
apr_hook_global_pool from apr_global_hook_pool
apr_hook_sort_all from apr_sort_hooks
apr_uri_port_of_scheme from apr_uri_default_port_for_scheme
apr_uri_unparse from apr_uri_unparse_components
apr_uri_parse from apr_uri_parse_components
apr_uri_parse_hostinfo from apr_uri_parse_hostinfo_components
apr_uri_t from apr_uri_components
All APR_URI_* from all APU_URI_* symbols
All APR_UNP_* from all UNP_* symbols
Revision Changes Path
1.3 +0 -19 apr-util/renames_pending
Index: renames_pending
===================================================================
RCS file: /home/cvs/apr-util/renames_pending,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- renames_pending 13 Jun 2001 22:57:29 -0000 1.2
+++ renames_pending 6 Jul 2002 19:44:50 -0000 1.3
@@ -1,21 +1,2 @@
Symbol renames pending for apr-util (keep ordered and complete, please!)
-apr_dynamic_fn_register from apr_register_optional_fn
-apr_dynamic_fn_retrieve from apr_retrieve_optional_fn
-
-apr_hook_debug_enabled from apr_debug_module_hooks
-apr_hook_debug_current from apr_current_hooking_module
-apr_hook_debug_show from apr_show_hook
-
-apr_hook_global_pool from apr_global_hook_pool
-apr_hook_sort_all from apr_sort_hooks
-
-apr_uri_port_of_scheme from apr_uri_default_port_for_scheme
-apr_uri_unparse from apr_uri_unparse_components
-apr_uri_parse from apr_uri_parse_components
-apr_uri_parse_hostinfo from apr_uri_parse_hostinfo_components
-
-apr_uri_t from apr_uri_components
-
-All APR_URI_* from all APU_URI_* symbols
-All APR_UNP_* from all UNP_* symbols
1.43 +55 -19 apr-util/hooks/apr_hooks.c
Index: apr_hooks.c
===================================================================
RCS file: /home/cvs/apr-util/hooks/apr_hooks.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- apr_hooks.c 13 Mar 2002 20:40:48 -0000 1.42
+++ apr_hooks.c 6 Jul 2002 19:44:50 -0000 1.43
@@ -71,8 +71,17 @@
#define apr_palloc(pool,size) malloc(size)
#endif
+APU_DECLARE_DATA apr_pool_t *apr_hook_global_pool = NULL;
+APU_DECLARE_DATA int apr_hook_debug_enabled = 0;
+APU_DECLARE_DATA const char *apr_hook_debug_current = NULL;
+
+/** @deprecated @see apr_hook_global_pool */
APU_DECLARE_DATA apr_pool_t *apr_global_hook_pool = NULL;
+
+/** @deprecated @see apr_hook_debug_enabled */
APU_DECLARE_DATA int apr_debug_module_hooks = 0;
+
+/** @deprecated @see apr_hook_debug_current */
APU_DECLARE_DATA const char *apr_current_hooking_module = NULL;
/* NB: This must echo the LINK_##name structure */
@@ -188,21 +197,21 @@
apr_array_header_t *pNew;
int n;
- apr_pool_create(&p, apr_global_hook_pool);
+ apr_pool_create(&p, apr_hook_global_pool);
pSort=prepare(p,(TSortData *)pHooks->elts,pHooks->nelts);
pSort=tsort(pSort,pHooks->nelts);
-
pNew=apr_array_make(apr_global_hook_pool,pHooks->nelts,sizeof(TSortData));
- if(apr_debug_module_hooks)
+
pNew=apr_array_make(apr_hook_global_pool,pHooks->nelts,sizeof(TSortData));
+ if(apr_hook_debug_enabled)
printf("Sorting %s:",szName);
for(n=0 ; pSort ; pSort=pSort->pNext,++n) {
TSortData *pHook;
assert(n < pHooks->nelts);
pHook=apr_array_push(pNew);
memcpy(pHook,pSort->pData,sizeof *pHook);
- if(apr_debug_module_hooks)
+ if(apr_hook_debug_enabled)
printf(" %s",pHook->szName);
}
- if(apr_debug_module_hooks)
+ if(apr_hook_debug_enabled)
fputc('\n',stdout);
return pNew;
}
@@ -220,13 +229,13 @@
HookSortEntry *pEntry;
if(!s_aHooksToSort)
-
s_aHooksToSort=apr_array_make(apr_global_hook_pool,1,sizeof(HookSortEntry));
+
s_aHooksToSort=apr_array_make(apr_hook_global_pool,1,sizeof(HookSortEntry));
pEntry=apr_array_push(s_aHooksToSort);
pEntry->szHookName=szHookName;
pEntry->paHooks=paHooks;
}
-APU_DECLARE(void) apr_sort_hooks()
+APU_DECLARE(void) apr_hook_sort_all()
{
int n;
@@ -235,7 +244,13 @@
*pEntry->paHooks=sort_hook(*pEntry->paHooks,pEntry->szHookName);
}
}
-
+
+/** @deprecated @see apr_hook_sort_all */
+APU_DECLARE(void) apr_sort_hooks()
+{
+ apr_hook_sort_all();
+}
+
static apr_hash_t *s_phOptionalHooks;
static apr_hash_t *s_phOptionalFunctions;
@@ -252,8 +267,9 @@
s_phOptionalFunctions=NULL;
}
-APU_DECLARE(void) apr_show_hook(const char *szName,const char * const
*aszPre,
- const char * const *aszSucc)
+APU_DECLARE(void) apr_hook_debug_show(const char *szName,
+ const char * const *aszPre,
+ const char * const *aszSucc)
{
int nFirst;
@@ -285,6 +301,13 @@
fputc('\n',stdout);
}
+/** @deprecated @see apr_hook_debug_show */
+APU_DECLARE(void) apr_show_hook(const char *szName,const char * const
*aszPre,
+ const char * const *aszSucc)
+{
+ apr_hook_debug_show(szName, aszPre, aszSucc);
+}
+
/* Optional hook support */
APR_DECLARE_EXTERNAL_HOOK(apr,APU,void,_optional,(void))
@@ -311,11 +334,11 @@
if(!pArray) {
apr_array_header_t **ppArray;
- pArray=apr_array_make(apr_global_hook_pool,1,
+ pArray=apr_array_make(apr_hook_global_pool,1,
sizeof(apr_LINK__optional_t));
if(!s_phOptionalHooks)
- s_phOptionalHooks=apr_hash_make(apr_global_hook_pool);
- ppArray=apr_palloc(apr_global_hook_pool,sizeof *ppArray);
+ s_phOptionalHooks=apr_hash_make(apr_hook_global_pool);
+ ppArray=apr_palloc(apr_hook_global_pool,sizeof *ppArray);
*ppArray=pArray;
apr_hash_set(s_phOptionalHooks,szName,strlen(szName),ppArray);
apr_hook_sort_register(szName,ppArray);
@@ -325,26 +348,39 @@
pHook->aszPredecessors=aszPre;
pHook->aszSuccessors=aszSucc;
pHook->nOrder=nOrder;
- pHook->szName=apr_current_hooking_module;
- if(apr_debug_module_hooks)
- apr_show_hook(szName,aszPre,aszSucc);
+ pHook->szName=apr_hook_debug_current;
+ if(apr_hook_debug_enabled)
+ apr_hook_debug_show(szName,aszPre,aszSucc);
}
/* optional function support */
-APU_DECLARE(apr_opt_fn_t *) apr_retrieve_optional_fn(const char *szName)
+APU_DECLARE(apr_opt_fn_t *) apr_dynamic_fn_retrieve(const char *szName)
{
if(!s_phOptionalFunctions)
return NULL;
return
(void(*)(void))apr_hash_get(s_phOptionalFunctions,szName,strlen(szName));
}
-APU_DECLARE_NONSTD(void) apr_register_optional_fn(const char *szName,
+/* Deprecated */
+APU_DECLARE(apr_opt_fn_t *) apr_retrieve_optional_fn(const char *szName)
+{
+ return apr_dynamic_fn_retrieve(szName);
+}
+
+APU_DECLARE_NONSTD(void) apr_dynamic_fn_register(const char *szName,
apr_opt_fn_t *pfn)
{
if(!s_phOptionalFunctions)
- s_phOptionalFunctions=apr_hash_make(apr_global_hook_pool);
+ s_phOptionalFunctions=apr_hash_make(apr_hook_global_pool);
apr_hash_set(s_phOptionalFunctions,szName,strlen(szName),(void *)pfn);
+}
+
+/* Deprecated */
+APU_DECLARE_NONSTD(void) apr_register_optional_fn(const char *szName,
+ apr_opt_fn_t *pfn)
+{
+ return apr_dynamic_fn_register(szName, pfn);
}
#if 0
1.45 +24 -6 apr-util/include/apr_hooks.h
Index: apr_hooks.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_hooks.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- apr_hooks.h 13 Mar 2002 20:40:48 -0000 1.44
+++ apr_hooks.h 6 Jul 2002 19:44:50 -0000 1.45
@@ -107,7 +107,7 @@
ns##_LINK_##name##_t *pHook; \
if(!_hooks.link_##name) \
{ \
-
_hooks.link_##name=apr_array_make(apr_global_hook_pool,1,sizeof(ns##_LINK_##name##_t));
\
+
_hooks.link_##name=apr_array_make(apr_hook_global_pool,1,sizeof(ns##_LINK_##name##_t));
\
apr_hook_sort_register(#name,&_hooks.link_##name); \
} \
pHook=apr_array_push(_hooks.link_##name); \
@@ -115,9 +115,9 @@
pHook->aszPredecessors=aszPre; \
pHook->aszSuccessors=aszSucc; \
pHook->nOrder=nOrder; \
- pHook->szName=apr_current_hooking_module; \
- if(apr_debug_module_hooks) \
- apr_show_hook(#name,aszPre,aszSucc); \
+ pHook->szName=apr_hook_debug_current; \
+ if(apr_hook_debug_enabled) \
+ apr_hook_debug_show(#name,aszPre,aszSucc); \
} \
APR_IMPLEMENT_HOOK_GET_PROTO(ns,link,name) \
{ \
@@ -240,15 +240,24 @@
*/
APU_DECLARE_DATA extern apr_pool_t *apr_global_hook_pool;
+/** @deprecated @see apr_hook_global_pool */
+APU_DECLARE_DATA extern apr_pool_t *apr_hook_global_pool;
+
/**
* A global variable to determine if debugging information about the
* hooks functions should be printed
*/
+APU_DECLARE_DATA extern int apr_hook_debug_enabled;
+
+/** @deprecated @see apr_hook_debug_enabled */
APU_DECLARE_DATA extern int apr_debug_module_hooks;
/**
* The name of the module that is currently registering a function
*/
+APU_DECLARE_DATA extern const char *apr_hook_debug_current;
+
+/** @deprecated @see apr_hook_debug_current */
APU_DECLARE_DATA extern const char *apr_current_hooking_module;
/**
@@ -261,6 +270,9 @@
/**
* Sort all of the registerd functions for a given hook
*/
+APU_DECLARE(void) apr_hook_sort_all(void);
+
+/** @deprecated @see apr_hook_sort_all */
APU_DECLARE(void) apr_sort_hooks(void);
/**
@@ -270,8 +282,14 @@
* @param aszPre All of the functions in the predecessor array
* @param aszSucc All of the functions in the successor array
*/
-APU_DECLARE(void) apr_show_hook(const char *szName,const char * const
*aszPre,
- const char * const *aszSucc);
+APU_DECLARE(void) apr_hook_debug_show(const char *szName,
+ const char * const *aszPre,
+ const char * const *aszSucc);
+
+/** @deprecated @see apr_hook_debug_show */
+APU_DECLARE(void) apr_show_hook(const char *szName,
+ const char * const *aszPre,
+ const char * const *aszSucc);
/**
* Remove all currently registered functions.
1.9 +9 -3 apr-util/include/apr_optional.h
Index: apr_optional.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_optional.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- apr_optional.h 13 Mar 2002 20:40:48 -0000 1.8
+++ apr_optional.h 6 Jul 2002 19:44:50 -0000 1.9
@@ -96,9 +96,12 @@
typedef void (apr_opt_fn_t)(void);
/** @internal */
-APU_DECLARE_NONSTD(void) apr_register_optional_fn(const char *szName,
+APU_DECLARE_NONSTD(void) apr_dynamic_fn_register(const char *szName,
apr_opt_fn_t *pfn);
+/** @deprecated @see apr_dynamic_fn_register */
+APU_DECLARE_NONSTD(void) apr_register_optional_fn(const char *szName,
+ apr_opt_fn_t *pfn);
/**
* Register an optional function. This can be later retrieved, type-safely,
by
@@ -108,11 +111,14 @@
*/
#define APR_REGISTER_OPTIONAL_FN(name) \
(((void (*)(const char *, APR_OPTIONAL_FN_TYPE(name) *)) \
- &apr_register_optional_fn)(#name,name))
+ &apr_dynamic_fn_register)(#name,name))
/** @internal
* Private function! DO NOT USE!
*/
+APU_DECLARE(apr_opt_fn_t *) apr_dynamic_fn_retrieve(const char *szName);
+
+/** @deprecated @see apr_dynamic_fn_retrieve */
APU_DECLARE(apr_opt_fn_t *) apr_retrieve_optional_fn(const char *szName);
/**
@@ -120,7 +126,7 @@
* @param name The name of the function
*/
#define APR_RETRIEVE_OPTIONAL_FN(name) \
- (APR_OPTIONAL_FN_TYPE(name) *)apr_retrieve_optional_fn(#name)
+ (APR_OPTIONAL_FN_TYPE(name) *)apr_dynamic_fn_retrieve(#name)
/** @} */
#ifdef __cplusplus
1.12 +3 -0 apr-util/include/apr_uri.h
Index: apr_uri.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_uri.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- apr_uri.h 3 Jun 2002 07:47:53 -0000 1.11
+++ apr_uri.h 6 Jul 2002 19:44:50 -0000 1.12
@@ -166,6 +166,9 @@
* @param scheme_str The string that contains the current scheme
* @return The default port for this scheme
*/
+APU_DECLARE(apr_port_t) apr_uri_port_of_scheme(const char *scheme_str);
+
+/** @deprecated @see apr_uri_port_of_scheme */
APU_DECLARE(apr_port_t) apr_uri_default_port_for_scheme(const char
*scheme_str);
/**
1.9 +2 -2 apr-util/include/apu_compat.h
Index: apu_compat.h
===================================================================
RCS file: /home/cvs/apr-util/include/apu_compat.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- apu_compat.h 13 Mar 2002 20:40:48 -0000 1.8
+++ apu_compat.h 6 Jul 2002 19:44:50 -0000 1.9
@@ -90,8 +90,8 @@
#define ap_hook_deregister_all apr_hook_deregister_all
/** @deprecated @see apr_hook_sort_register */
#define ap_hook_sort_register apr_hook_sort_register
-/** @deprecated @see apr_show_hook */
-#define ap_show_hook apr_show_hook
+/** @deprecated @see apr_hook_debug_show */
+#define ap_show_hook apr_hook_debug_show
/* --------------------------------------------------------------------
* the following symbols were moved from httpd-2.0/.../util_date.[ch]
1.14 +9 -3 apr-util/uri/apr_uri.c
Index: apr_uri.c
===================================================================
RCS file: /home/cvs/apr-util/uri/apr_uri.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- apr_uri.c 3 Jun 2002 07:47:53 -0000 1.13
+++ apr_uri.c 6 Jul 2002 19:44:50 -0000 1.14
@@ -108,7 +108,7 @@
{ NULL, 0xFFFF } /* unknown port */
};
-APU_DECLARE(apr_port_t) apr_uri_default_port_for_scheme(const char
*scheme_str)
+APU_DECLARE(apr_port_t) apr_uri_port_of_scheme(const char *scheme_str)
{
schemes_t *scheme;
@@ -121,6 +121,12 @@
return 0;
}
+/** @deprecated @see apr_uri_port_of_scheme */
+APU_DECLARE(apr_port_t) apr_uri_default_port_for_scheme(const char
*scheme_str)
+{
+ return apr_uri_port_of_scheme(scheme_str);
+}
+
/* Unparse a apr_uri_t structure to an URI string.
* Optionally suppress the password for security reasons.
*/
@@ -158,7 +164,7 @@
is_default_port =
(uptr->port_str == NULL ||
uptr->port == 0 ||
- uptr->port ==
apr_uri_default_port_for_scheme(uptr->scheme));
+ uptr->port == apr_uri_port_of_scheme(uptr->scheme));
ret = apr_pstrcat(p,
uptr->scheme, "://", ret,
@@ -332,7 +338,7 @@
/* Invalid characters after ':' found */
return APR_EGENERAL;
}
- uptr->port = apr_uri_default_port_for_scheme(uptr->scheme);
+ uptr->port = apr_uri_port_of_scheme(uptr->scheme);
goto deal_with_path;
}