diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2000-05-27 05:31:34 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2000-05-27 05:31:34 +0000 |
commit | d7af515fb887055d92898ab280e13db95b1851f9 (patch) | |
tree | c561e67b6ad64a173abf9e0aa1045ec13932fcf2 /hooks | |
parent | ff0d1c040f6cc33f0a410254a4aba68d5debbcbf (diff) | |
download | libapr-util-d7af515fb887055d92898ab280e13db95b1851f9.tar.gz |
A really simple change for readability:
ap_pool_t *g_pHookPool; becomes ap_global_hook_pool
int g_bDebugHooks; becomes ap_debug_module_hooks
const char *g_szCurrentHookName; becomes ap_debug_module_name
Just as a reminder, these are now declared in ap_hooks.c
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@57806 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'hooks')
-rw-r--r-- | hooks/ap_hooks.c | 18 | ||||
-rw-r--r-- | hooks/apr_hooks.c | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/hooks/ap_hooks.c b/hooks/ap_hooks.c index e99a6e09..1b340332 100644 --- a/hooks/ap_hooks.c +++ b/hooks/ap_hooks.c @@ -6,9 +6,9 @@ #define ap_palloc(pool,size) malloc(size) #endif -AP_EXPORT_VAR ap_pool_t *g_pHookPool = NULL; -AP_EXPORT_VAR int g_bDebugHooks = FALSE; -AP_EXPORT_VAR const char *g_szCurrentHookName = NULL; +AP_EXPORT_VAR ap_pool_t *ap_global_hook_pool = NULL; +AP_EXPORT_VAR int ap_debug_module_hooks = FALSE; +AP_EXPORT_VAR const char *ap_debug_module_name = NULL; /* NB: This must echo the LINK_##name structure */ typedef struct @@ -122,21 +122,21 @@ static ap_array_header_t *sort_hook(ap_array_header_t *pHooks,const char *szName ap_array_header_t *pNew; int n; - ap_create_pool(&p, g_pHookPool); + ap_create_pool(&p, ap_global_hook_pool); pSort=prepare(p,(TSortData *)pHooks->elts,pHooks->nelts); pSort=tsort(pSort,pHooks->nelts); - pNew=ap_make_array(g_pHookPool,pHooks->nelts,sizeof(TSortData)); - if(g_bDebugHooks) + pNew=ap_make_array(ap_global_hook_pool,pHooks->nelts,sizeof(TSortData)); + if(ap_debug_module_hooks) printf("Sorting %s:",szName); for(n=0 ; pSort ; pSort=pSort->pNext,++n) { TSortData *pHook; assert(n < pHooks->nelts); pHook=ap_push_array(pNew); memcpy(pHook,pSort->pData,sizeof *pHook); - if(g_bDebugHooks) + if(ap_debug_module_hooks) printf(" %s",pHook->szName); } - if(g_bDebugHooks) + if(ap_debug_module_hooks) fputc('\n',stdout); return pNew; } @@ -154,7 +154,7 @@ AP_EXPORT(void) ap_hook_sort_register(const char *szHookName, HookSortEntry *pEntry; if(!s_aHooksToSort) - s_aHooksToSort=ap_make_array(g_pHookPool,1,sizeof(HookSortEntry)); + s_aHooksToSort=ap_make_array(ap_global_hook_pool,1,sizeof(HookSortEntry)); pEntry=ap_push_array(s_aHooksToSort); pEntry->szHookName=szHookName; pEntry->paHooks=paHooks; diff --git a/hooks/apr_hooks.c b/hooks/apr_hooks.c index e99a6e09..1b340332 100644 --- a/hooks/apr_hooks.c +++ b/hooks/apr_hooks.c @@ -6,9 +6,9 @@ #define ap_palloc(pool,size) malloc(size) #endif -AP_EXPORT_VAR ap_pool_t *g_pHookPool = NULL; -AP_EXPORT_VAR int g_bDebugHooks = FALSE; -AP_EXPORT_VAR const char *g_szCurrentHookName = NULL; +AP_EXPORT_VAR ap_pool_t *ap_global_hook_pool = NULL; +AP_EXPORT_VAR int ap_debug_module_hooks = FALSE; +AP_EXPORT_VAR const char *ap_debug_module_name = NULL; /* NB: This must echo the LINK_##name structure */ typedef struct @@ -122,21 +122,21 @@ static ap_array_header_t *sort_hook(ap_array_header_t *pHooks,const char *szName ap_array_header_t *pNew; int n; - ap_create_pool(&p, g_pHookPool); + ap_create_pool(&p, ap_global_hook_pool); pSort=prepare(p,(TSortData *)pHooks->elts,pHooks->nelts); pSort=tsort(pSort,pHooks->nelts); - pNew=ap_make_array(g_pHookPool,pHooks->nelts,sizeof(TSortData)); - if(g_bDebugHooks) + pNew=ap_make_array(ap_global_hook_pool,pHooks->nelts,sizeof(TSortData)); + if(ap_debug_module_hooks) printf("Sorting %s:",szName); for(n=0 ; pSort ; pSort=pSort->pNext,++n) { TSortData *pHook; assert(n < pHooks->nelts); pHook=ap_push_array(pNew); memcpy(pHook,pSort->pData,sizeof *pHook); - if(g_bDebugHooks) + if(ap_debug_module_hooks) printf(" %s",pHook->szName); } - if(g_bDebugHooks) + if(ap_debug_module_hooks) fputc('\n',stdout); return pNew; } @@ -154,7 +154,7 @@ AP_EXPORT(void) ap_hook_sort_register(const char *szHookName, HookSortEntry *pEntry; if(!s_aHooksToSort) - s_aHooksToSort=ap_make_array(g_pHookPool,1,sizeof(HookSortEntry)); + s_aHooksToSort=ap_make_array(ap_global_hook_pool,1,sizeof(HookSortEntry)); pEntry=ap_push_array(s_aHooksToSort); pEntry->szHookName=szHookName; pEntry->paHooks=paHooks; |