You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by do...@apache.org on 2001/02/08 08:45:35 UTC
cvs commit: httpd-2.0/test test_find.c test_parser.c
dougm 01/02/07 23:45:34
Modified: include ap_mmn.h
modules/aaa mod_access.c mod_auth.c mod_auth_db.c
mod_auth_dbm.c mod_auth_digest.c
modules/cache mod_file_cache.c
modules/dav/fs dbm.c lock.c repos.c
modules/dav/main liveprop.c mod_dav.c providers.c util.c
modules/experimental mod_case_filter.c mod_charset_lite.c
mod_disk_cache.c mod_example.c mod_ext_filter.c
modules/filters mod_include.c mod_include.h
modules/generators mod_asis.c mod_autoindex.c mod_cgi.c
mod_cgid.c mod_info.c mod_status.c
modules/http error_bucket.c http_core.c http_protocol.c
http_request.c mod_mime.c
modules/loggers mod_log_config.c
modules/mappers mod_actions.c mod_alias.c mod_dir.c
mod_negotiation.c mod_rewrite.c mod_so.c
mod_speling.c mod_userdir.c
modules/metadata mod_cern_meta.c mod_env.c mod_expires.c
mod_headers.c mod_mime_magic.c mod_setenvif.c
mod_unique_id.c mod_usertrack.c
modules/proxy mod_proxy.c proxy_cache.c proxy_connect.c
proxy_ftp.c proxy_http.c proxy_util.c
modules/test mod_autoindex.c mod_test_util_uri.c
os/beos os.c
os/bs2000 os.c
os/os2 util_os2.c
os/tpf os.c
os/unix unixd.c
os/win32 mod_isapi.c util_win32.c
server config.c connection.c listen.c log.c main.c
mpm_common.c rfc1413.c scoreboard.c util.c
util_filter.c util_md5.c util_script.c util_xml.c
vhost.c
server/mpm/beos beos.c
server/mpm/dexter dexter.c
server/mpm/mpmt_beos mpmt_beos.c
server/mpm/mpmt_pthread mpmt_pthread.c
server/mpm/perchild perchild.c
server/mpm/prefork prefork.c
server/mpm/spmt_os2 spmt_os2.c
server/mpm/winnt mpm_winnt.c registry.c
dso/aix dso.c
dso/beos dso.c
dso/os2 dso.c
dso/os390 dso.c
dso/unix dso.c
dso/win32 dso.c
file_io/os2 dir.c filedup.c filestat.c flock.c open.c pipe.c
readwrite.c seek.c
file_io/unix dir.c fileacc.c filedup.c filestat.c flock.c
fullrw.c open.c pipe.c readwrite.c seek.c
file_io/win32 dir.c filedup.c filestat.c flock.c open.c
pipe.c readwrite.c seek.c
i18n/unix xlate.c
include apr_compat.h apr_file_io.h apr_getopt.h apr_hash.h
apr_lib.h apr_lock.h apr_md5.h apr_network_io.h
apr_pools.h apr_portable.h apr_shmem.h apr_tables.h
apr_thread_proc.h apr_time.h apr_uuid.h
include/arch/win32 fileio.h
lib apr_pools.c
locks/beos crossproc.c intraproc.c locks.c
locks/os2 locks.c
locks/unix crossproc.c intraproc.c locks.c
locks/win32 locks.c
misc/unix getopt.c getuuid.c otherchild.c start.c uuid.c
misc/win32 getuuid.c
mmap/unix mmap.c
mmap/win32 mmap.c
network_io/beos poll.c
network_io/os2 poll.c sockets.c
network_io/unix poll.c sa_common.c sockets.c
network_io/win32 poll.c sockets.c
passwd apr_getpass.c apr_md5.c
shmem/os2 shmem.c
shmem/unix shmem.c
strings apr_snprintf.c
tables apr_hash.c apr_tables.c
test abc.c client.c sendfile.c server.c testargs.c
testcontext.c testdso.c testfile.c testflock.c
testmd5.c testmmap.c testoc.c testpipe.c testproc.c
testshmem.c testsock.c testsockopt.c testthread.c
testtime.c testuuid.c
threadproc/beos proc.c thread.c threadpriv.c
threadproc/os2 proc.c signals.c thread.c threadpriv.c
threadproc/unix proc.c procsup.c signals.c thread.c
threadpriv.c
threadproc/win32 proc.c signals.c thread.c threadpriv.c
time/unix time.c
time/win32 time.c
buckets apr_brigade.c apr_buckets.c apr_buckets_eos.c
apr_buckets_file.c apr_buckets_flush.c
apr_buckets_heap.c apr_buckets_mmap.c
apr_buckets_pipe.c apr_buckets_pool.c
apr_buckets_refcount.c apr_buckets_simple.c
apr_buckets_socket.c
crypto apr_sha1.c
dbm apr_dbm.c
dbm/sdbm sdbm.c sdbm_lock.c
encoding apr_base64.c
hooks apr_hooks.c
include apr_base64.h apr_buckets.h apr_generic_hook.h
apr_hooks.h apr_sha1.h apu_compat.h
test testdbm.c
support ab.c htdigest.c htpasswd.c logresolve.c
test test_find.c test_parser.c
Log:
renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
Revision Changes Path
1.9 +11 -11 httpd-2.0/include/ap_mmn.h
Index: ap_mmn.h
===================================================================
RCS file: /home/cvs/httpd-2.0/include/ap_mmn.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ap_mmn.h 2001/01/19 07:04:12 1.8
+++ ap_mmn.h 2001/02/08 07:43:57 1.9
@@ -168,7 +168,7 @@
* added limit_req_body to core_dir_config and
* ap_get_limit_req_body() to get its value.
* 19980812 (1.3.2-dev) - split off MODULE_MAGIC_NUMBER
- * 19980812.2 - add apr_overlap_tables()
+ * 19980812.2 - add apr_table_overlap()
* 19980816 (1.3.2-dev) - change proxy to use tables for headers, change
* struct cache_req to typedef cache_req.
* Delete ap_proxy_get_header(), ap_proxy_add_header(),
@@ -205,8 +205,8 @@
* - reordered entries in request_rec that were waiting
* for a non-binary-compatible release.
* (1.3.5-dev)
- * 19990108.1 - add apr_MD5Encode() for MD5 password handling.
- * 19990108.2 - add apr_validate_password() and change apr_MD5Encode()
+ * 19990108.1 - add apr_md5_encode() for MD5 password handling.
+ * 19990108.2 - add apr_password_validate() and change apr_md5_encode()
* to use a stronger algorithm.
* 19990108.4 - add ap_size_list_item(), ap_get_list_item(), and
* ap_find_list_item()
@@ -221,11 +221,11 @@
* 19990320.3 - add ap_regexec() and ap_regerror()
* 19990320.4 - add ap_field_noparam()
* 19990320.5 - add local_ip/host to conn_rec for mass-vhost
- * 19990320.6 - add apr_SHA1Final(), apr_SHA1Init(),
- * apr_SHA1Update_binary(), apr_SHA1Update(),
- * apr_base64encode(), apr_base64encode_binary(),
- * apr_base64encode_len(), apr_base64decode(),
- * apr_base64decode_binary(), apr_base64decode_len(),
+ * 19990320.6 - add apr_sha1_final(), apr_sha1_init(),
+ * apr_sha1_update_binary(), apr_sha1_update(),
+ * apr_base64_encode(), apr_base64_encode_binary(),
+ * apr_base64_encode_len(), apr_base64_decode(),
+ * apr_base64_decode_binary(), apr_base64_decode_len(),
* ap_pbase64decode(), ap_pbase64encode()
*/
@@ -242,13 +242,13 @@
* specified value.
* <PRE>
* Useful for testing for features.
- * For example, suppose you wish to use the apr_overlap_tables
+ * For example, suppose you wish to use the apr_table_overlap
* function. You can do this:
*
* #if MODULE_MAGIC_AT_LEAST(19980812,2)
- * ... use apr_overlap_tables()
+ * ... use apr_table_overlap()
* #else
- * ... alternative code which doesn't use apr_overlap_tables()
+ * ... alternative code which doesn't use apr_table_overlap()
* #endif
* </PRE>
* @param major The major module magic number
1.26 +3 -3 httpd-2.0/modules/aaa/mod_access.c
Index: mod_access.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_access.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- mod_access.c 2001/01/19 07:04:14 1.25
+++ mod_access.c 2001/02/08 07:43:58 1.26
@@ -127,8 +127,8 @@
for (i = 0; i < METHODS; ++i)
conf->order[i] = DENY_THEN_ALLOW;
- conf->allows = apr_make_array(p, 1, sizeof(allowdeny));
- conf->denys = apr_make_array(p, 1, sizeof(allowdeny));
+ conf->allows = apr_array_make(p, 1, sizeof(allowdeny));
+ conf->denys = apr_array_make(p, 1, sizeof(allowdeny));
return (void *) conf;
}
@@ -172,7 +172,7 @@
if (strcasecmp(from, "from"))
return "allow and deny must be followed by 'from'";
- a = (allowdeny *) apr_push_array(cmd->info ? d->allows : d->denys);
+ a = (allowdeny *) apr_array_push(cmd->info ? d->allows : d->denys);
a->x.from = where;
a->limited = cmd->limited;
1.28 +4 -4 httpd-2.0/modules/aaa/mod_auth.c
Index: mod_auth.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_auth.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- mod_auth.c 2001/01/19 07:04:14 1.27
+++ mod_auth.c 2001/02/08 07:43:58 1.28
@@ -153,7 +153,7 @@
static apr_table_t *groups_for_user(apr_pool_t *p, char *user, char *grpfile)
{
configfile_t *f;
- apr_table_t *grps = apr_make_table(p, 15);
+ apr_table_t *grps = apr_table_make(p, 15);
apr_pool_t *sp;
char l[MAX_STRING_LEN];
const char *group_name, *ll, *w;
@@ -165,7 +165,7 @@
return NULL;
}
- apr_create_pool(&sp, p);
+ apr_pool_create(&sp, p);
while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) {
if ((l[0] == '#') || (!l[0]))
@@ -184,7 +184,7 @@
}
}
ap_cfg_closefile(f);
- apr_destroy_pool(sp);
+ apr_pool_destroy(sp);
return grps;
}
@@ -225,7 +225,7 @@
ap_note_basic_auth_failure(r);
return HTTP_UNAUTHORIZED;
}
- invalid_pw = apr_validate_password(sent_pw, real_pw);
+ invalid_pw = apr_password_validate(sent_pw, real_pw);
if (invalid_pw != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"user %s: authentication failure for \"%s\": "
1.24 +1 -1 httpd-2.0/modules/aaa/mod_auth_db.c
Index: mod_auth_db.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_auth_db.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mod_auth_db.c 2001/01/19 07:04:15 1.23
+++ mod_auth_db.c 2001/02/08 07:43:58 1.24
@@ -319,7 +319,7 @@
*colon_pw = '\0';
}
- invalid_pw = apr_validate_password(sent_pw, real_pw);
+ invalid_pw = apr_password_validate(sent_pw, real_pw);
if (invalid_pw != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
1.26 +1 -1 httpd-2.0/modules/aaa/mod_auth_dbm.c
Index: mod_auth_dbm.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_auth_dbm.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- mod_auth_dbm.c 2001/01/19 07:04:15 1.25
+++ mod_auth_dbm.c 2001/02/08 07:43:58 1.26
@@ -259,7 +259,7 @@
if (colon_pw) {
*colon_pw = '\0';
}
- invalid_pw = apr_validate_password(sent_pw, real_pw);
+ invalid_pw = apr_password_validate(sent_pw, real_pw);
if (invalid_pw != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"DBM user %s: authentication failure for \"%s\": "
1.32 +29 -29 httpd-2.0/modules/aaa/mod_auth_digest.c
Index: mod_auth_digest.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_auth_digest.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- mod_auth_digest.c 2001/01/19 07:04:15 1.31
+++ mod_auth_digest.c 2001/02/08 07:43:58 1.32
@@ -139,13 +139,13 @@
apr_status_t apr_shm_free(apr_shmem_t *shared, void *free) {
return APR_ENOTIMPL;
}
-apr_status_t apr_get_shm_name(apr_shmem_t *c, apr_shm_name_t **name) {
+apr_status_t apr_shm_name_get(apr_shmem_t *c, apr_shm_name_t **name) {
return APR_ENOTIMPL;
}
-apr_status_t apr_set_shm_name(apr_shmem_t *c, apr_shm_name_t *name) {
+apr_status_t apr_shm_name_set(apr_shmem_t *c, apr_shm_name_t *name) {
return APR_ENOTIMPL;
}
-apr_status_t apr_open_shmem(apr_shmem_t *c) {
+apr_status_t apr_shm_open(apr_shmem_t *c) {
return APR_ENOTIMPL;
}
apr_status_t apr_shm_avail(apr_shmem_t *c, apr_size_t *avail) {
@@ -280,12 +280,12 @@
}
if (client_lock) {
- apr_destroy_lock(client_lock);
+ apr_lock_destroy(client_lock);
client_lock = NULL;
}
if (opaque_lock) {
- apr_destroy_lock(opaque_lock);
+ apr_lock_destroy(opaque_lock);
opaque_lock = NULL;
}
@@ -348,7 +348,7 @@
client_list->num_entries = 0;
tmpnam(client_lock_name);
- sts = apr_create_lock(&client_lock, APR_READWRITE, APR_LOCKALL,
+ sts = apr_lock_create(&client_lock, APR_READWRITE, APR_LOCKALL,
client_lock_name, ctx);
if (sts != APR_SUCCESS) {
log_error_and_cleanup("failed to create lock", sts, s);
@@ -366,7 +366,7 @@
*opaque_cntr = 1UL;
tmpnam(opaque_lock_name);
- sts = apr_create_lock(&opaque_lock, APR_MUTEX, APR_LOCKALL,
+ sts = apr_lock_create(&opaque_lock, APR_MUTEX, APR_LOCKALL,
opaque_lock_name, ctx);
if (sts != APR_SUCCESS) {
log_error_and_cleanup("failed to create lock", sts, s);
@@ -418,7 +418,7 @@
* creating a creeping memory leak.
*/
initialize_tables(s, p);
- apr_register_cleanup(p, NULL, cleanup_tables, apr_null_cleanup);
+ apr_pool_cleanup_register(p, NULL, cleanup_tables, apr_pool_cleanup_null);
#endif /* APR_HAS_SHARED_MEMORY */
}
@@ -429,9 +429,9 @@
if (!client_shm)
return;
- if ((sts = apr_child_init_lock(&client_lock, client_lock_name, p))
+ if ((sts = apr_lock_child_init(&client_lock, client_lock_name, p))
!= APR_SUCCESS
- || (sts = apr_child_init_lock(&opaque_lock, opaque_lock_name, p))
+ || (sts = apr_lock_child_init(&opaque_lock, opaque_lock_name, p))
!= APR_SUCCESS) {
log_error_and_cleanup("failed to create lock", sts, s);
return;
@@ -475,9 +475,9 @@
* the host:port would be too, but that varies for .htaccess files
* and directives outside a virtual host section)
*/
- apr_SHA1Init(&conf->nonce_ctx);
- apr_SHA1Update_binary(&conf->nonce_ctx, secret, sizeof(secret));
- apr_SHA1Update_binary(&conf->nonce_ctx, (const unsigned char *) realm,
+ apr_sha1_init(&conf->nonce_ctx);
+ apr_sha1_update_binary(&conf->nonce_ctx, secret, sizeof(secret));
+ apr_sha1_update_binary(&conf->nonce_ctx, (const unsigned char *) realm,
strlen(realm));
return DECLINE_CMD;
@@ -721,7 +721,7 @@
bucket = key % client_list->tbl_len;
entry = client_list->table[bucket];
- apr_lock(client_lock /*, MM_LOCK_RD */);
+ apr_lock_aquire(client_lock /*, MM_LOCK_RD */);
while(entry && key != entry->key) {
prev = entry;
@@ -734,7 +734,7 @@
client_list->table[bucket] = entry;
}
- apr_unlock(client_lock);
+ apr_lock_release(client_lock);
if (entry)
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, r,
@@ -798,7 +798,7 @@
bucket = key % client_list->tbl_len;
entry = client_list->table[bucket];
- apr_lock(client_lock /*, MM_LOCK_RW */);
+ apr_lock_aquire(client_lock /*, MM_LOCK_RW */);
/* try to allocate a new entry */
@@ -824,7 +824,7 @@
client_list->num_created++;
client_list->num_entries++;
- apr_unlock(client_lock);
+ apr_lock_release(client_lock);
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, s,
"allocated new client %lu", key);
@@ -992,16 +992,16 @@
memcpy(&ctx, &conf->nonce_ctx, sizeof(ctx));
/*
- apr_SHA1Update_binary(&ctx, (const unsigned char *) server->server_hostname,
+ apr_sha1_update_binary(&ctx, (const unsigned char *) server->server_hostname,
strlen(server->server_hostname));
- apr_SHA1Update_binary(&ctx, (const unsigned char *) &server->port,
+ apr_sha1_update_binary(&ctx, (const unsigned char *) &server->port,
sizeof(server->port));
*/
- apr_SHA1Update_binary(&ctx, (const unsigned char *) timestr, strlen(timestr));
+ apr_sha1_update_binary(&ctx, (const unsigned char *) timestr, strlen(timestr));
if (opaque)
- apr_SHA1Update_binary(&ctx, (const unsigned char *) opaque,
+ apr_sha1_update_binary(&ctx, (const unsigned char *) opaque,
strlen(opaque));
- apr_SHA1Final(sha1, &ctx);
+ apr_sha1_final(sha1, &ctx);
for (idx=0; idx<APR_SHA1_DIGESTSIZE; idx++) {
*hash++ = hex[sha1[idx] >> 4];
@@ -1031,7 +1031,7 @@
t.time = (*otn_counter)++;
else
t.time = 42;
- len = apr_base64encode_binary(nonce, t.arr, sizeof(t.arr));
+ len = apr_base64_encode_binary(nonce, t.arr, sizeof(t.arr));
gen_nonce_hash(nonce+NONCE_TIME_LEN, nonce, opaque, server, conf);
return nonce;
@@ -1053,9 +1053,9 @@
if (!opaque_cntr) return NULL;
- apr_lock(opaque_lock /*, MM_LOCK_RW */);
+ apr_lock_aquire(opaque_lock /*, MM_LOCK_RW */);
op = (*opaque_cntr)++;
- apr_unlock(opaque_lock);
+ apr_lock_release(opaque_lock);
if (!(entry = add_client(op, &new_entry, r->server))) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
@@ -1408,7 +1408,7 @@
tmp = resp->nonce[NONCE_TIME_LEN];
resp->nonce[NONCE_TIME_LEN] = '\0';
- len = apr_base64decode_binary(nonce_time.arr, resp->nonce);
+ len = apr_base64_decode_binary(nonce_time.arr, resp->nonce);
gen_nonce_hash(hash, resp->nonce, resp->opaque, r->server, conf);
resp->nonce[NONCE_TIME_LEN] = tmp;
resp->nonce_time = nonce_time.time;
@@ -1768,7 +1768,7 @@
const char *grpfile)
{
configfile_t *f;
- apr_table_t *grps = apr_make_table(r->pool, 15);
+ apr_table_t *grps = apr_table_make(r->pool, 15);
apr_pool_t *sp;
char l[MAX_STRING_LEN];
const char *group_name, *ll, *w;
@@ -1780,7 +1780,7 @@
return NULL;
}
- if (apr_create_pool(&sp, r->pool) != APR_SUCCESS)
+ if (apr_pool_create(&sp, r->pool) != APR_SUCCESS)
return NULL;
while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) {
@@ -1801,7 +1801,7 @@
}
ap_cfg_closefile(f);
- apr_destroy_pool(sp);
+ apr_pool_destroy(sp);
return grps;
}
1.44 +10 -10 httpd-2.0/modules/cache/mod_file_cache.c
Index: mod_file_cache.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/cache/mod_file_cache.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- mod_file_cache.c 2001/01/27 21:28:25 1.43
+++ mod_file_cache.c 2001/02/08 07:43:59 1.44
@@ -153,7 +153,7 @@
{
a_server_config *sconf = apr_palloc(p, sizeof(*sconf));
- sconf->files = apr_make_array(p, 20, sizeof(a_file));
+ sconf->files = apr_array_make(p, 20, sizeof(a_file));
return sconf;
}
@@ -173,7 +173,7 @@
else
#endif
#if APR_HAS_SENDFILE
- apr_close(file->file);
+ apr_file_close(file->file);
#endif
++file;
--n;
@@ -212,7 +212,7 @@
return NULL;
}
- rc = apr_open(&fd, filename, APR_READ | APR_XTHREAD, APR_OS_DEFAULT, cmd->pool);
+ rc = apr_file_open(&fd, filename, APR_READ | APR_XTHREAD, APR_OS_DEFAULT, cmd->pool);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
"mod_file_cache: unable to open(%s, O_RDONLY), skipping", filename);
@@ -221,11 +221,11 @@
tmp.file = fd;
tmp.filename = apr_pstrdup(cmd->pool, filename);
sconf = ap_get_module_config(cmd->server->module_config, &file_cache_module);
- new_file = apr_push_array(sconf->files);
+ new_file = apr_array_push(sconf->files);
*new_file = tmp;
if (sconf->files->nelts == 1) {
/* first one, register the cleanup */
- apr_register_cleanup(cmd->pool, sconf, cleanup_file_cache, apr_null_cleanup);
+ apr_pool_cleanup_register(cmd->pool, sconf, cleanup_file_cache, apr_pool_cleanup_null);
}
new_file->is_mmapped = FALSE;
@@ -261,7 +261,7 @@
"mod_file_cache: %s isn't a regular file, skipping", filename);
return NULL;
}
- if ((rc = apr_open(&fd, fspec, APR_READ, APR_OS_DEFAULT,
+ if ((rc = apr_file_open(&fd, fspec, APR_READ, APR_OS_DEFAULT,
cmd->temp_pool)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
"mod_file_cache: unable to open %s, skipping",
@@ -269,19 +269,19 @@
return NULL;
}
if ((rc = apr_mmap_create(&tmp.mm, fd, 0, tmp.finfo.size, APR_MMAP_READ, cmd->pool)) != APR_SUCCESS) {
- apr_close(fd);
+ apr_file_close(fd);
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
"mod_file_cache: unable to mmap %s, skipping", filename);
return NULL;
}
- apr_close(fd);
+ apr_file_close(fd);
tmp.filename = fspec;
sconf = ap_get_module_config(cmd->server->module_config, &file_cache_module);
- new_file = apr_push_array(sconf->files);
+ new_file = apr_array_push(sconf->files);
*new_file = tmp;
if (sconf->files->nelts == 1) {
/* first one, register the cleanup */
- apr_register_cleanup(cmd->pool, sconf, cleanup_file_cache, apr_null_cleanup);
+ apr_pool_cleanup_register(cmd->pool, sconf, cleanup_file_cache, apr_pool_cleanup_null);
}
new_file->is_mmapped = TRUE;
1.15 +1 -1 httpd-2.0/modules/dav/fs/dbm.c
Index: dbm.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/fs/dbm.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- dbm.c 2001/01/24 10:24:03 1.14
+++ dbm.c 2001/02/08 07:43:59 1.15
@@ -128,7 +128,7 @@
/* ### do we need to deal with the umask? */
/* just try to make it, ignoring any resulting errors */
- (void) apr_make_dir(pathname, APR_OS_DEFAULT, p);
+ (void) apr_dir_make(pathname, APR_OS_DEFAULT, p);
}
/* dav_dbm_open_direct: Opens a *dbm database specified by path.
1.14 +11 -11 httpd-2.0/modules/dav/fs/lock.c
Index: lock.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/fs/lock.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- lock.c 2001/01/20 21:42:17 1.13
+++ lock.c 2001/02/08 07:43:59 1.14
@@ -258,7 +258,7 @@
if (locktoken == NULL) {
comb->pub.locktoken = &comb->token;
- apr_get_uuid(&comb->token.uuid);
+ apr_uuid_get(&comb->token.uuid);
}
else {
comb->pub.locktoken = locktoken;
@@ -288,7 +288,7 @@
char_token += 16;
locktoken = apr_pcalloc(p, sizeof(*locktoken));
- if (apr_parse_uuid(&locktoken->uuid, char_token)) {
+ if (apr_uuid_parse(&locktoken->uuid, char_token)) {
return dav_new_error(p, HTTP_BAD_REQUEST, DAV_ERR_LOCK_PARSE_TOKEN,
"The opaquelocktoken has an incorrect format "
"and could not be parsed.");
@@ -309,7 +309,7 @@
{
char buf[APR_UUID_FORMATTED_LENGTH + 1];
- apr_format_uuid(buf, &locktoken->uuid);
+ apr_uuid_format(buf, &locktoken->uuid);
return apr_pstrcat(p, "opaquelocktoken:", buf, NULL);
}
@@ -828,12 +828,12 @@
/* reset this in case we leave w/o reading into the buffer */
pbuf->cur_len = 0;
- if (apr_open(&file, pbuf->buf, APR_READ | APR_BINARY, APR_OS_DEFAULT,
+ if (apr_file_open(&file, pbuf->buf, APR_READ | APR_BINARY, APR_OS_DEFAULT,
p) != APR_SUCCESS) {
return NULL;
}
- if (apr_getfileinfo(&finfo, APR_FINFO_NORM, file) != APR_SUCCESS) {
+ if (apr_file_info_get(&finfo, APR_FINFO_NORM, file) != APR_SUCCESS) {
err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
apr_psprintf(p,
"Opened but could not stat file %s",
@@ -843,7 +843,7 @@
dav_set_bufsize(p, pbuf, finfo.size);
amt = finfo.size;
- if (apr_read(file, pbuf->buf, &amt) != APR_SUCCESS
+ if (apr_file_read(file, pbuf->buf, &amt) != APR_SUCCESS
|| amt != finfo.size) {
err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
apr_psprintf(p,
@@ -856,7 +856,7 @@
}
loaderror:
- apr_close(file);
+ apr_file_close(file);
return err;
}
@@ -884,7 +884,7 @@
if (pbuf->cur_len == 0) {
/* delete the file if cur_len == 0 */
- if (apr_remove_file(pathname, p) != 0) {
+ if (apr_file_remove(pathname, p) != 0) {
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
apr_psprintf(p,
"Error removing %s", pathname));
@@ -892,7 +892,7 @@
return NULL;
}
- if (apr_open(&file, pathname,
+ if (apr_file_open(&file, pathname,
APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BINARY,
APR_OS_DEFAULT, p) != APR_SUCCESS) {
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
@@ -902,7 +902,7 @@
}
amt = pbuf->cur_len;
- if (apr_write(file, pbuf->buf, &amt) != APR_SUCCESS
+ if (apr_file_write(file, pbuf->buf, &amt) != APR_SUCCESS
|| amt != pbuf->cur_len) {
err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
apr_psprintf(p,
@@ -910,7 +910,7 @@
pbuf->cur_len, pathname));
}
- apr_close(file);
+ apr_file_close(file);
return err;
}
1.49 +29 -29 httpd-2.0/modules/dav/fs/repos.c
Index: repos.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/fs/repos.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- repos.c 2001/02/07 12:33:16 1.48
+++ repos.c 2001/02/08 07:43:59 1.49
@@ -306,7 +306,7 @@
dav_set_bufsize(p, pbuf, DAV_FS_COPY_BLOCKSIZE);
- if ((apr_open(&inf, src, APR_READ | APR_BINARY, APR_OS_DEFAULT, p))
+ if ((apr_file_open(&inf, src, APR_READ | APR_BINARY, APR_OS_DEFAULT, p))
!= APR_SUCCESS) {
/* ### use something besides 500? */
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
@@ -314,9 +314,9 @@
}
/* ### do we need to deal with the umask? */
- if ((apr_open(&outf, dst, APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BINARY,
+ if ((apr_file_open(&outf, dst, APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BINARY,
APR_OS_DEFAULT, p)) != APR_SUCCESS) {
- apr_close(inf);
+ apr_file_close(inf);
/* ### use something besides 500? */
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
@@ -327,12 +327,12 @@
apr_ssize_t len = DAV_FS_COPY_BLOCKSIZE;
apr_status_t status;
- status = apr_read(inf, pbuf->buf, &len);
+ status = apr_file_read(inf, pbuf->buf, &len);
if (status != APR_SUCCESS && status != APR_EOF) {
- apr_close(inf);
- apr_close(outf);
+ apr_file_close(inf);
+ apr_file_close(outf);
- if (apr_remove_file(dst, p) != APR_SUCCESS) {
+ if (apr_file_remove(dst, p) != APR_SUCCESS) {
/* ### ACK! Inconsistent state... */
/* ### use something besides 500? */
@@ -348,13 +348,13 @@
}
/* write any bytes that were read (applies to APR_EOF, too) */
- if (apr_full_write(outf, pbuf->buf, len, NULL) != APR_SUCCESS) {
+ if (apr_file_write_full(outf, pbuf->buf, len, NULL) != APR_SUCCESS) {
int save_errno = errno;
- apr_close(inf);
- apr_close(outf);
+ apr_file_close(inf);
+ apr_file_close(outf);
- if (apr_remove_file(dst, p) != 0) {
+ if (apr_file_remove(dst, p) != 0) {
/* ### ACK! Inconsistent state... */
/* ### use something besides 500? */
@@ -379,8 +379,8 @@
break;
}
- apr_close(inf);
- apr_close(outf);
+ apr_file_close(inf);
+ apr_file_close(outf);
if (is_move && remove(src) != 0) {
dav_error *err;
@@ -437,7 +437,7 @@
/* ### do we need to deal with the umask? */
/* ensure that it exists */
- rv = apr_make_dir(dst, APR_OS_DEFAULT, p);
+ rv = apr_dir_make(dst, APR_OS_DEFAULT, p);
if (rv != APR_SUCCESS) {
if (!APR_STATUS_IS_EEXIST(rv)) {
/* ### use something besides 500? */
@@ -468,7 +468,7 @@
/* copy/move the file now */
if (is_move && src_finfo.device == dst_state_finfo.device) {
/* simple rename is possible since it is on the same device */
- if (apr_rename_file(src, dst, p) != APR_SUCCESS) {
+ if (apr_file_rename(src, dst, p) != APR_SUCCESS) {
/* ### use something besides 500? */
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
"Could not move state file.");
@@ -817,7 +817,7 @@
ds->p = p;
ds->pathname = resource->info->pathname;
- if (apr_open(&ds->f, ds->pathname, flags, APR_OS_DEFAULT,
+ if (apr_file_open(&ds->f, ds->pathname, flags, APR_OS_DEFAULT,
ds->p) != APR_SUCCESS) {
/* ### use something besides 500? */
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
@@ -832,10 +832,10 @@
static dav_error * dav_fs_close_stream(dav_stream *stream, int commit)
{
- apr_close(stream->f);
+ apr_file_close(stream->f);
if (!commit) {
- if (apr_remove_file(stream->pathname, stream->p) != 0) {
+ if (apr_file_remove(stream->pathname, stream->p) != 0) {
/* ### use a better description? */
return dav_new_error(stream->p, HTTP_INTERNAL_SERVER_ERROR, 0,
"There was a problem removing (rolling "
@@ -850,7 +850,7 @@
static dav_error * dav_fs_read_stream(dav_stream *stream,
void *buf, apr_size_t *bufsize)
{
- if (apr_read(stream->f, buf, (apr_ssize_t *)bufsize) != APR_SUCCESS) {
+ if (apr_file_read(stream->f, buf, (apr_ssize_t *)bufsize) != APR_SUCCESS) {
/* ### use something besides 500? */
return dav_new_error(stream->p, HTTP_INTERNAL_SERVER_ERROR, 0,
"An error occurred while reading from a "
@@ -864,7 +864,7 @@
{
apr_status_t status;
- status = apr_full_write(stream->f, buf, bufsize, NULL);
+ status = apr_file_write_full(stream->f, buf, bufsize, NULL);
if (status == APR_ENOSPC) {
return dav_new_error(stream->p, HTTP_INSUFFICIENT_STORAGE, 0,
"There is not enough storage to write to "
@@ -881,8 +881,8 @@
static dav_error * dav_fs_seek_stream(dav_stream *stream, apr_off_t abs_pos)
{
- if (apr_seek(stream->f, APR_SET, &abs_pos) != APR_SUCCESS) {
- /* ### should check whether apr_seek set abs_pos was set to the
+ if (apr_file_seek(stream->f, APR_SET, &abs_pos) != APR_SUCCESS) {
+ /* ### should check whether apr_file_seek set abs_pos was set to the
* correct position? */
/* ### use something besides 500? */
return dav_new_error(stream->p, HTTP_INTERNAL_SERVER_ERROR, 0,
@@ -940,7 +940,7 @@
dav_resource_private *ctx = resource->info;
apr_status_t status;
- status = apr_make_dir(ctx->pathname, APR_OS_DEFAULT, ctx->pool);
+ status = apr_dir_make(ctx->pathname, APR_OS_DEFAULT, ctx->pool);
if (status == ENOSPC) {
return dav_new_error(ctx->pool, HTTP_INSUFFICIENT_STORAGE, 0,
"There is not enough storage to create "
@@ -977,7 +977,7 @@
}
else {
/* copy/move of a collection. Create the new, target collection */
- if (apr_make_dir(dstinfo->pathname, APR_OS_DEFAULT,
+ if (apr_dir_make(dstinfo->pathname, APR_OS_DEFAULT,
ctx->pool) != APR_SUCCESS) {
/* ### assume it was a permissions problem */
/* ### need a description here */
@@ -1174,7 +1174,7 @@
*response = NULL;
/* ### APR has no rename? */
- if (apr_rename_file(srcinfo->pathname, dstinfo->pathname,
+ if (apr_file_rename(srcinfo->pathname, dstinfo->pathname,
srcinfo->pool) != APR_SUCCESS) {
/* ### should have a better error than this. */
return dav_new_error(srcinfo->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
@@ -1194,7 +1194,7 @@
}
/* error occurred during properties move; try to put resource back */
- if (apr_rename_file(dstinfo->pathname, srcinfo->pathname,
+ if (apr_file_rename(dstinfo->pathname, srcinfo->pathname,
srcinfo->pool) != APR_SUCCESS) {
/* couldn't put it back! */
return dav_push_error(srcinfo->pool,
@@ -1937,7 +1937,7 @@
if (value)
perms |= APR_UEXECUTE;
- if (apr_setfileperms(resource->info->pathname, perms) != APR_SUCCESS) {
+ if (apr_file_perms_set(resource->info->pathname, perms) != APR_SUCCESS) {
return dav_new_error(resource->info->pool,
HTTP_INTERNAL_SERVER_ERROR, 0,
"Could not set the executable flag of the "
@@ -1973,7 +1973,7 @@
if (value)
perms |= APR_UEXECUTE;
- if (apr_setfileperms(resource->info->pathname, perms) != APR_SUCCESS) {
+ if (apr_file_perms_set(resource->info->pathname, perms) != APR_SUCCESS) {
return dav_new_error(resource->info->pool,
HTTP_INTERNAL_SERVER_ERROR, 0,
"After a failure occurred, the resource's "
@@ -2010,7 +2010,7 @@
void dav_fs_gather_propsets(apr_array_header_t *uris)
{
#ifndef WIN32
- *(const char **)apr_push_array(uris) =
+ *(const char **)apr_array_push(uris) =
"<http://apache.org/dav/propset/fs/1>";
#endif
}
1.8 +2 -2 httpd-2.0/modules/dav/main/liveprop.c
Index: liveprop.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/main/liveprop.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- liveprop.c 2001/01/17 15:52:04 1.7
+++ liveprop.c 2001/02/08 07:43:59 1.8
@@ -76,8 +76,8 @@
int value;
if (dav_liveprop_uris == NULL) {
- dav_liveprop_uris = apr_make_hash(p);
- apr_register_cleanup(p, NULL, dav_cleanup_liveprops, apr_null_cleanup);
+ dav_liveprop_uris = apr_hash_make(p);
+ apr_pool_cleanup_register(p, NULL, dav_cleanup_liveprops, apr_pool_cleanup_null);
}
value = (int)apr_hash_get(dav_liveprop_uris, uri, APR_HASH_KEY_STRING);
1.44 +8 -8 httpd-2.0/modules/dav/main/mod_dav.c
Index: mod_dav.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- mod_dav.c 2001/02/07 12:33:16 1.43
+++ mod_dav.c 2001/02/08 07:43:59 1.44
@@ -180,7 +180,7 @@
conf->dir = d;
}
- conf->d_params = apr_make_table(p, 1);
+ conf->d_params = apr_table_make(p, 1);
return conf;
}
@@ -215,8 +215,8 @@
newconf->allow_depthinfinity = DAV_INHERIT_VALUE(parent, child,
allow_depthinfinity);
- newconf->d_params = apr_copy_table(p, parent->d_params);
- apr_overlap_tables(newconf->d_params, child->d_params,
+ newconf->d_params = apr_table_copy(p, parent->d_params);
+ apr_table_overlap(newconf->d_params, child->d_params,
APR_OVERLAP_TABLES_SET);
return newconf;
@@ -1517,7 +1517,7 @@
char *s;
apr_array_header_t *arr;
apr_table_entry_t *elts;
- apr_table_t *methods = apr_make_table(r->pool, 12);
+ apr_table_t *methods = apr_table_make(r->pool, 12);
ap_text_header vsn_options = { 0 };
ap_text_header body = { 0 };
ap_text *t;
@@ -1581,7 +1581,7 @@
** and generate a separate DAV header for each URI, to avoid
** problems with long header lengths.
*/
- uri_ary = apr_make_array(r->pool, 5, sizeof(const char *));
+ uri_ary = apr_array_make(r->pool, 5, sizeof(const char *));
dav_run_gather_propsets(uri_ary);
for (i = 0; i < uri_ary->nelts; ++i) {
if (((char **)uri_ary->elts)[i] != NULL)
@@ -2193,7 +2193,7 @@
/* ### validate "live" properties */
/* set up an array to hold property operation contexts */
- ctx_list = apr_make_array(r->pool, 10, sizeof(dav_prop_ctx));
+ ctx_list = apr_array_make(r->pool, 10, sizeof(dav_prop_ctx));
/* do a first pass to ensure that all "remove" properties exist */
for (child = doc->root->first_child; child; child = child->next) {
@@ -2222,7 +2222,7 @@
for (one_prop = prop_group->first_child; one_prop;
one_prop = one_prop->next) {
- ctx = (dav_prop_ctx *)apr_push_array(ctx_list);
+ ctx = (dav_prop_ctx *)apr_array_push(ctx_list);
ctx->propdb = propdb;
ctx->operation = is_remove ? DAV_PROP_OP_DELETE : DAV_PROP_OP_SET;
ctx->prop = one_prop;
@@ -3335,7 +3335,7 @@
href = dav_xml_get_cdata(child, r->pool,
1 /* strip_white */);
- *(const char **)apr_push_array(activities) = href;
+ *(const char **)apr_array_push(activities) = href;
}
}
1.6 +2 -2 httpd-2.0/modules/dav/main/providers.c
Index: providers.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/main/providers.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- providers.c 2001/01/17 15:52:04 1.5
+++ providers.c 2001/02/08 07:44:00 1.6
@@ -70,8 +70,8 @@
const dav_provider *provider)
{
if (dav_repos_providers == NULL) {
- dav_repos_providers = apr_make_hash(p);
- apr_register_cleanup(p, NULL, dav_cleanup_providers, apr_null_cleanup);
+ dav_repos_providers = apr_hash_make(p);
+ apr_pool_cleanup_register(p, NULL, dav_cleanup_providers, apr_pool_cleanup_null);
}
/* just set it. no biggy if it was there before. */
1.19 +1 -1 httpd-2.0/modules/dav/main/util.c
Index: util.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/main/util.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- util.c 2001/02/07 12:33:17 1.18
+++ util.c 2001/02/08 07:44:00 1.19
@@ -215,7 +215,7 @@
the port, must match our port.
the URI must not have a query (args) or a fragment
*/
- apr_get_port(&port, r->connection->local_addr);
+ apr_sockaddr_port_get(&port, r->connection->local_addr);
if (strcasecmp(comp.scheme, scheme) != 0 ||
comp.port != port) {
result.err.status = HTTP_BAD_GATEWAY;
1.3 +2 -2 httpd-2.0/modules/experimental/mod_case_filter.c
Index: mod_case_filter.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_case_filter.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mod_case_filter.c 2001/01/19 07:04:18 1.2
+++ mod_case_filter.c 2001/02/08 07:44:00 1.3
@@ -54,7 +54,7 @@
if(APR_BUCKET_IS_EOS(pbktIn))
{
// XXX: why can't I reuse pbktIn???
- apr_bucket *pbktEOS=apr_bucket_create_eos();
+ apr_bucket *pbktEOS=apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(pbbOut,pbktEOS);
break;
}
@@ -69,7 +69,7 @@
// XXX: should we use a heap bucket instead? Or a transient (in
// which case we need a separate brigade for each bucket)?
- pbktOut=apr_bucket_create_pool(buf,len,f->r->pool);
+ pbktOut=apr_bucket_pool_create(buf,len,f->r->pool);
APR_BRIGADE_INSERT_TAIL(pbbOut,pbktOut);
}
1.39 +4 -4 httpd-2.0/modules/experimental/mod_charset_lite.c
Index: mod_charset_lite.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_charset_lite.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- mod_charset_lite.c 2001/01/19 07:04:18 1.38
+++ mod_charset_lite.c 2001/02/08 07:44:00 1.39
@@ -86,7 +86,7 @@
#define OUTPUT_XLATE_BUF_SIZE (16*1024) /* size of translation buffer used on output */
#define INPUT_XLATE_BUF_SIZE (8*1024) /* size of translation buffer used on input */
-/* XXX this works around an issue with the heap bucket: apr_bucket_create_heap will
+/* XXX this works around an issue with the heap bucket: apr_bucket_heap_create will
* copy only the first 4096 bytes
*/
#undef INPUT_XLATE_BUF_SIZE /* XXX */
@@ -461,7 +461,7 @@
apr_status_t rv;
bb = apr_brigade_create(f->r->pool);
- b = apr_bucket_create_transient(tmp, len);
+ b = apr_bucket_transient_create(tmp, len);
APR_BRIGADE_INSERT_TAIL(bb, b);
rv = ap_pass_brigade(f->next, bb);
if (rv != APR_SUCCESS) {
@@ -478,7 +478,7 @@
apr_status_t rv;
bb = apr_brigade_create(f->r->pool);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
rv = ap_pass_brigade(f->next, bb);
if (rv != APR_SUCCESS) {
@@ -1075,7 +1075,7 @@
if (buffer_size < INPUT_XLATE_BUF_SIZE) { /* do we have output? */
apr_bucket *e;
- e = apr_bucket_create_heap(ctx->tmp,
+ e = apr_bucket_heap_create(ctx->tmp,
INPUT_XLATE_BUF_SIZE - buffer_size, 1,
NULL);
/* make sure we insert at the head, because there may be
1.5 +8 -8 httpd-2.0/modules/experimental/mod_disk_cache.c
Index: mod_disk_cache.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_disk_cache.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mod_disk_cache.c 2001/01/19 07:04:18 1.4
+++ mod_disk_cache.c 2001/02/08 07:44:00 1.5
@@ -78,14 +78,14 @@
filename = ap_server_root_relative(r->pool,
apr_pstrcat(r->pool, "proxy", r->uri, NULL));
- if ((rv = apr_open(&fd, filename, APR_READ,
+ if ((rv = apr_file_open(&fd, filename, APR_READ,
APR_UREAD, r->connection->pool)) != APR_SUCCESS) {
return DECLINED;
}
/* skip the cached headers. */
do {
- apr_fgets(str, 256, fd);
+ apr_file_gets(str, 256, fd);
offset += strlen(str);
} while (strcmp(str, CRLF));
@@ -98,10 +98,10 @@
}
}
- e = apr_bucket_create_file(fd, offset, r->finfo.size);
+ e = apr_bucket_file_create(fd, offset, r->finfo.size);
APR_BRIGADE_INSERT_HEAD(bb, e);
- e = apr_bucket_create_eos();
+ e = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, e);
ap_pass_brigade(r->output_filters, bb);
@@ -124,14 +124,14 @@
}
if (ctx->filename == NULL) {
apr_status_t rv;
- apr_make_dir(ap_server_root_relative(r->pool, "proxy"), APR_UREAD | APR_UWRITE | APR_UEXECUTE | APR_GREAD | APR_GWRITE, r->pool);
+ apr_dir_make(ap_server_root_relative(r->pool, "proxy"), APR_UREAD | APR_UWRITE | APR_UEXECUTE | APR_GREAD | APR_GWRITE, r->pool);
/* currently, we are using the uri as the cache key. This is
* probably wrong, but it is much better than a hard-coded filename.
*/
ctx->filename = ap_server_root_relative(r->pool,
apr_pstrcat(r->pool, "proxy", r->uri, NULL));
- if ((rv = apr_open(&ctx->fd, ctx->filename,
+ if ((rv = apr_file_open(&ctx->fd, ctx->filename,
APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BUFFERED,
APR_UREAD | APR_UWRITE, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
@@ -145,10 +145,10 @@
apr_ssize_t length;
apr_bucket_read(e, &str, &length, 0);
- apr_write(ctx->fd, str, &length);
+ apr_file_write(ctx->fd, str, &length);
}
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
- apr_close(ctx->fd);
+ apr_file_close(ctx->fd);
}
return OK;
}
1.18 +5 -5 httpd-2.0/modules/experimental/mod_example.c
Index: mod_example.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_example.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- mod_example.c 2001/01/19 07:04:18 1.17
+++ mod_example.c 2001/02/08 07:44:00 1.18
@@ -298,14 +298,14 @@
* If we haven't already allocated our module-private pool, do so now.
*/
if (example_pool == NULL) {
- apr_create_pool(&example_pool, NULL);
+ apr_pool_create(&example_pool, NULL);
};
/*
* Likewise for the apr_table_t of routine/environment pairs we visit outside of
* request context.
*/
if (static_calls_made == NULL) {
- static_calls_made = apr_make_table(example_pool, 16);
+ static_calls_made = apr_table_make(example_pool, 16);
};
}
@@ -363,7 +363,7 @@
* Make a new sub-pool and copy any existing trace to it. Point the
* trace cell at the copied value.
*/
- apr_create_pool(&p, example_pool);
+ apr_pool_create(&p, example_pool);
if (trace != NULL) {
trace = apr_pstrdup(p, trace);
}
@@ -372,7 +372,7 @@
* the one we just allocated.
*/
if (example_subpool != NULL) {
- apr_destroy_pool(example_subpool);
+ apr_pool_destroy(example_subpool);
}
example_subpool = p;
trace_copy = trace;
@@ -708,7 +708,7 @@
note = apr_pstrcat(p, "example_child_init(", sname, ")", NULL);
trace_add(s, NULL, NULL, note);
- apr_register_cleanup(p, s, example_child_exit, example_child_exit);
+ apr_pool_cleanup_register(p, s, example_child_exit, example_child_exit);
}
/*
1.8 +29 -29 httpd-2.0/modules/experimental/mod_ext_filter.c
Index: mod_ext_filter.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_ext_filter.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- mod_ext_filter.c 2001/01/19 07:04:19 1.7
+++ mod_ext_filter.c 2001/02/08 07:44:00 1.8
@@ -131,7 +131,7 @@
conf = (ef_server_t *)apr_pcalloc(p, sizeof(ef_server_t));
conf->p = p;
- conf->h = apr_make_hash(conf->p);
+ conf->h = apr_hash_make(conf->p);
return conf;
}
@@ -351,15 +351,15 @@
apr_status_t rv;
#ifdef RLIMIT_CPU
- rv = apr_setprocattr_limit(procattr, APR_LIMIT_CPU, conf->limit_cpu);
+ rv = apr_procattr_limit_set(procattr, APR_LIMIT_CPU, conf->limit_cpu);
ap_assert(rv == APR_SUCCESS); /* otherwise, we're out of sync with APR */
#endif
#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
- rv = apr_setprocattr_limit(procattr, APR_LIMIT_MEM, conf->limit_mem);
+ rv = apr_procattr_limit_set(procattr, APR_LIMIT_MEM, conf->limit_mem);
ap_assert(rv == APR_SUCCESS); /* otherwise, we're out of sync with APR */
#endif
#ifdef RLIMIT_NPROC
- rv = apr_setprocattr_limit(procattr, APR_LIMIT_NPROC, conf->limit_nproc);
+ rv = apr_procattr_limit_set(procattr, APR_LIMIT_NPROC, conf->limit_nproc);
ap_assert(rv == APR_SUCCESS); /* otherwise, we're out of sync with APR */
#endif
@@ -370,7 +370,7 @@
static apr_status_t ef_close_file(void *vfile)
{
- return apr_close(vfile);
+ return apr_file_close(vfile);
}
/* init_ext_filter_process: get the external filter process going
@@ -384,10 +384,10 @@
ctx->proc = apr_pcalloc(ctx->p, sizeof(*ctx->proc));
- rc = apr_createprocattr_init(&ctx->procattr, ctx->p);
+ rc = apr_procattr_create(&ctx->procattr, ctx->p);
ap_assert(rc == APR_SUCCESS);
- rc = apr_setprocattr_io(ctx->procattr,
+ rc = apr_procattr_io_set(ctx->procattr,
APR_CHILD_BLOCK,
APR_CHILD_BLOCK,
APR_CHILD_BLOCK);
@@ -397,13 +397,13 @@
ap_assert(rc == APR_SUCCESS);
if (dc->log_stderr > 0) {
- rc = apr_setprocattr_childerr(ctx->procattr,
+ rc = apr_procattr_child_err_set(ctx->procattr,
f->r->server->error_log, /* stderr in child */
NULL);
ap_assert(rc == APR_SUCCESS);
}
- rc = apr_create_process(ctx->proc,
+ rc = apr_proc_create(ctx->proc,
ctx->filter->command,
(const char * const *)ctx->filter->args,
NULL, /* environment */
@@ -416,7 +416,7 @@
return rc;
}
- apr_note_subprocess(ctx->p, ctx->proc, kill_after_timeout);
+ apr_pool_note_subprocess(ctx->p, ctx->proc, kill_after_timeout);
/* We don't want the handle to the child's stdin inherited by any
* other processes created by httpd. Otherwise, when we close our
@@ -424,23 +424,23 @@
* be open.
*/
- apr_register_cleanup(ctx->p, ctx->proc->in,
- apr_null_cleanup, /* other mechanism */
+ apr_pool_cleanup_register(ctx->p, ctx->proc->in,
+ apr_pool_cleanup_null, /* other mechanism */
ef_close_file);
#if APR_FILES_AS_SOCKETS
{
apr_socket_t *newsock;
- rc = apr_setup_poll(&ctx->pollset, 2, ctx->p);
+ rc = apr_poll_setup(&ctx->pollset, 2, ctx->p);
ap_assert(rc == APR_SUCCESS);
rc = apr_socket_from_file(&newsock, ctx->proc->in);
ap_assert(rc == APR_SUCCESS);
- rc = apr_add_poll_socket(ctx->pollset, newsock, APR_POLLOUT);
+ rc = apr_poll_socket_add(ctx->pollset, newsock, APR_POLLOUT);
ap_assert(rc == APR_SUCCESS);
rc = apr_socket_from_file(&newsock, ctx->proc->out);
ap_assert(rc == APR_SUCCESS);
- rc = apr_add_poll_socket(ctx->pollset, newsock, APR_POLLIN);
+ rc = apr_poll_socket_add(ctx->pollset, newsock, APR_POLLIN);
ap_assert(rc == APR_SUCCESS);
}
#endif
@@ -541,20 +541,20 @@
while (1) {
len = sizeof(buf);
- rv = apr_read(ctx->proc->out,
+ rv = apr_file_read(ctx->proc->out,
buf,
&len);
if ((rv && !APR_STATUS_IS_EAGAIN(rv)) ||
dc->debug >= DBGLVL_GORY) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, f->r,
- "apr_read(child output), len %" APR_SIZE_T_FMT,
+ "apr_file_read(child output), len %" APR_SIZE_T_FMT,
!rv ? len : -1);
}
if (rv != APR_SUCCESS) {
return rv;
}
bb = apr_brigade_create(f->r->pool);
- b = apr_bucket_create_transient(buf, len);
+ b = apr_bucket_transient_create(buf, len);
APR_BRIGADE_INSERT_TAIL(bb, b);
if ((rv = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
@@ -579,13 +579,13 @@
do {
tmplen = len - bytes_written;
- rv = apr_write(ctx->proc->in,
+ rv = apr_file_write(ctx->proc->in,
(const char *)data + bytes_written,
&tmplen);
bytes_written += tmplen;
if (rv != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(rv)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
- "apr_write(child input), len %" APR_SIZE_T_FMT,
+ "apr_file_write(child input), len %" APR_SIZE_T_FMT,
tmplen);
return rv;
}
@@ -680,32 +680,32 @@
/* close the child's stdin to signal that no more data is coming;
* that will cause the child to finish generating output
*/
- if ((rv = apr_close(ctx->proc->in)) != APR_SUCCESS) {
+ if ((rv = apr_file_close(ctx->proc->in)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
- "apr_close(child input)");
+ "apr_file_close(child input)");
return rv;
}
/* since we've seen eos and closed the child's stdin, set the proper pipe
- * timeout; we don't care if we don't return from apr_read() for a while...
+ * timeout; we don't care if we don't return from apr_file_read() for a while...
*/
- rv = apr_set_pipe_timeout(ctx->proc->out,
+ rv = apr_file_pipe_timeout_set(ctx->proc->out,
f->r->server->timeout * APR_USEC_PER_SEC);
if (rv) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
- "apr_set_pipe_timeout(child output)");
+ "apr_file_pipe_timeout_set(child output)");
return rv;
}
}
do {
len = sizeof(buf);
- rv = apr_read(ctx->proc->out,
+ rv = apr_file_read(ctx->proc->out,
buf,
&len);
if ((rv && !APR_STATUS_IS_EOF(rv) && !APR_STATUS_IS_EAGAIN(rv)) ||
dc->debug >= DBGLVL_GORY) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, f->r,
- "apr_read(child output), len %" APR_SIZE_T_FMT,
+ "apr_file_read(child output), len %" APR_SIZE_T_FMT,
!rv ? len : -1);
}
if (APR_STATUS_IS_EAGAIN(rv)) {
@@ -718,7 +718,7 @@
if (rv == APR_SUCCESS) {
bb = apr_brigade_create(f->r->pool);
- b = apr_bucket_create_transient(buf, len);
+ b = apr_bucket_transient_create(buf, len);
APR_BRIGADE_INSERT_TAIL(bb, b);
if ((rv = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
@@ -735,7 +735,7 @@
if (eos) {
/* pass down eos */
bb = apr_brigade_create(f->r->pool);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
if ((rv = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
1.95 +16 -16 httpd-2.0/modules/filters/mod_include.c
Index: mod_include.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- mod_include.c 2001/02/06 15:55:06 1.94
+++ mod_include.c 2001/02/08 07:44:02 1.95
@@ -884,10 +884,10 @@
}
e_len = strlen(echo_text);
- tmp_buck = apr_bucket_create_heap(echo_text, e_len, 1, &e_wrt);
+ tmp_buck = apr_bucket_heap_create(echo_text, e_len, 1, &e_wrt);
}
else {
- tmp_buck = apr_bucket_create_immortal("(none)", sizeof("none"));
+ tmp_buck = apr_bucket_immortal_create("(none)", sizeof("none"));
}
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
if (*inserted_head == NULL) {
@@ -1126,7 +1126,7 @@
s_len = pos;
}
- tmp_buck = apr_bucket_create_heap(buff, s_len, 1, &s_wrt);
+ tmp_buck = apr_bucket_heap_create(buff, s_len, 1, &s_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
if (*inserted_head == NULL) {
*inserted_head = tmp_buck;
@@ -1171,7 +1171,7 @@
t_val = ap_ht_time(r->pool, finfo.mtime, ctx->time_str, 0);
t_len = strlen(t_val);
- tmp_buck = apr_bucket_create_heap(t_val, t_len, 1, &t_wrt);
+ tmp_buck = apr_bucket_heap_create(t_val, t_len, 1, &t_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
if (*inserted_head == NULL) {
*inserted_head = tmp_buck;
@@ -1403,7 +1403,7 @@
return (0);
}
root = current = (struct parse_node *) NULL;
- if (apr_create_pool(&expr_pool, r->pool) != APR_SUCCESS)
+ if (apr_pool_create(&expr_pool, r->pool) != APR_SUCCESS)
return 0;
/* Create Parse Tree */
@@ -1968,7 +1968,7 @@
retval = (root == (struct parse_node *) NULL) ? 0 : root->value;
RETURN:
- apr_destroy_pool(expr_pool);
+ apr_pool_destroy(expr_pool);
return (retval);
}
@@ -1987,7 +1987,7 @@
cond_txt[31] = '1'; \
} \
memcpy(&cond_txt[5], tag_text, sizeof(tag_text)); \
- t_buck = apr_bucket_create_heap(cond_txt, sizeof(cond_txt), 1, &c_wrt); \
+ t_buck = apr_bucket_heap_create(cond_txt, sizeof(cond_txt), 1, &c_wrt); \
APR_BUCKET_INSERT_BEFORE(h_ptr, t_buck); \
\
if (ins_head == NULL) { \
@@ -1998,7 +1998,7 @@
{ \
apr_size_t b_wrt; \
if (d_buf[0] != '\0') { \
- t_buck = apr_bucket_create_heap(d_buf, strlen(d_buf), 1, &b_wrt); \
+ t_buck = apr_bucket_heap_create(d_buf, strlen(d_buf), 1, &b_wrt); \
APR_BUCKET_INSERT_BEFORE(h_ptr, t_buck); \
\
if (ins_head == NULL) { \
@@ -2067,7 +2067,7 @@
if (1) {
apr_size_t d_len = 0, d_wrt = 0;
d_len = sprintf(debug_buf, "**** if expr=\"%s\"\n", expr);
- tmp_buck = apr_bucket_create_heap(debug_buf, d_len, 1, &d_wrt);
+ tmp_buck = apr_bucket_heap_create(debug_buf, d_len, 1, &d_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
if (*inserted_head == NULL) {
@@ -2140,7 +2140,7 @@
if (1) {
apr_size_t d_len = 0, d_wrt = 0;
d_len = sprintf(debug_buf, "**** elif expr=\"%s\"\n", expr);
- tmp_buck = apr_bucket_create_heap(debug_buf, d_len, 1, &d_wrt);
+ tmp_buck = apr_bucket_heap_create(debug_buf, d_len, 1, &d_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
if (*inserted_head == NULL) {
@@ -2289,19 +2289,19 @@
v_len = strlen(val_text);
/* Key_text */
- tmp_buck = apr_bucket_create_heap(key_text, k_len, 1, &t_wrt);
+ tmp_buck = apr_bucket_heap_create(key_text, k_len, 1, &t_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
if (*inserted_head == NULL) {
*inserted_head = tmp_buck;
}
/* = */
- tmp_buck = apr_bucket_create_immortal("=", 1);
+ tmp_buck = apr_bucket_immortal_create("=", 1);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
/* Value_text */
- tmp_buck = apr_bucket_create_heap(val_text, v_len, 1, &t_wrt);
+ tmp_buck = apr_bucket_heap_create(val_text, v_len, 1, &t_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
/* newline... */
- tmp_buck = apr_bucket_create_immortal("\n", 1);
+ tmp_buck = apr_bucket_immortal_create("\n", 1);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
}
return 0;
@@ -2352,7 +2352,7 @@
if ((do_cleanup) && (!APR_BRIGADE_EMPTY(ctx->ssi_tag_brigade))) {
apr_bucket *tmp_bkt;
- tmp_bkt = apr_bucket_create_immortal(STARTING_SEQUENCE, cleanup_bytes);
+ tmp_bkt = apr_bucket_immortal_create(STARTING_SEQUENCE, cleanup_bytes);
APR_BRIGADE_INSERT_HEAD(*bb, tmp_bkt);
while (!APR_BRIGADE_EMPTY(ctx->ssi_tag_brigade)) {
@@ -2749,7 +2749,7 @@
static void include_post_config(apr_pool_t *p, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s)
{
- include_hash = apr_make_hash(p);
+ include_hash = apr_hash_make(p);
ssi_pfn_register = APR_RETRIEVE_OPTIONAL_FN(ap_register_include_handler);
1.11 +1 -1 httpd-2.0/modules/filters/mod_include.h
Index: mod_include.h
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mod_include.h 2001/02/06 15:55:05 1.10
+++ mod_include.h 2001/02/08 07:44:02 1.11
@@ -173,7 +173,7 @@
#define CREATE_ERROR_BUCKET(cntx, t_buck, h_ptr, ins_head) \
{ \
apr_size_t e_wrt; \
- t_buck = apr_bucket_create_heap(cntx->error_str, \
+ t_buck = apr_bucket_heap_create(cntx->error_str, \
ctx->error_length, 1, &e_wrt); \
APR_BUCKET_INSERT_BEFORE(h_ptr, t_buck); \
\
1.32 +3 -3 httpd-2.0/modules/generators/mod_asis.c
Index: mod_asis.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_asis.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- mod_asis.c 2001/01/31 22:45:15 1.31
+++ mod_asis.c 2001/02/08 07:44:02 1.32
@@ -87,7 +87,7 @@
return HTTP_NOT_FOUND;
}
- if ((status = apr_open(&f, r->filename, APR_READ,
+ if ((status = apr_file_open(&f, r->filename, APR_READ,
APR_OS_DEFAULT, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
"file permissions deny server access: %s", r->filename);
@@ -100,7 +100,7 @@
if (location && location[0] == '/' &&
((r->status == HTTP_OK) || ap_is_HTTP_REDIRECT(r->status))) {
- apr_close(f);
+ apr_file_close(f);
/* Internal redirect -- fake-up a pseudo-request */
r->status = HTTP_OK;
@@ -120,7 +120,7 @@
ap_send_fd(f, r, 0, r->finfo.size, &nbytes);
}
- apr_close(f);
+ apr_file_close(f);
return OK;
}
1.56 +26 -26 httpd-2.0/modules/generators/mod_autoindex.c
Index: mod_autoindex.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_autoindex.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- mod_autoindex.c 2001/01/31 22:45:16 1.55
+++ mod_autoindex.c 2001/02/08 07:44:02 1.56
@@ -212,7 +212,7 @@
static void push_item(apr_array_header_t *arr, char *type, const char *to,
const char *path, const char *data)
{
- struct item *p = (struct item *) apr_push_array(arr);
+ struct item *p = (struct item *) apr_array_push(arr);
if (!to) {
to = "";
@@ -316,7 +316,7 @@
ai_desc_t *desc_entry;
char *prefix = "";
- desc_entry = (ai_desc_t *) apr_push_array(dcfg->desc_list);
+ desc_entry = (ai_desc_t *) apr_array_push(dcfg->desc_list);
desc_entry->full_path = (ap_strchr_c(to, '/') == NULL) ? 0 : 1;
desc_entry->wildcards = (WILDCARDS_REQUIRED
|| desc_entry->full_path
@@ -596,12 +596,12 @@
new->icon_height = 0;
new->name_width = DEFAULT_NAME_WIDTH;
new->name_adjust = K_UNSET;
- new->icon_list = apr_make_array(p, 4, sizeof(struct item));
- new->alt_list = apr_make_array(p, 4, sizeof(struct item));
- new->desc_list = apr_make_array(p, 4, sizeof(ai_desc_t));
- new->ign_list = apr_make_array(p, 4, sizeof(struct item));
- new->hdr_list = apr_make_array(p, 4, sizeof(struct item));
- new->rdme_list = apr_make_array(p, 4, sizeof(struct item));
+ new->icon_list = apr_array_make(p, 4, sizeof(struct item));
+ new->alt_list = apr_array_make(p, 4, sizeof(struct item));
+ new->desc_list = apr_array_make(p, 4, sizeof(ai_desc_t));
+ new->ign_list = apr_array_make(p, 4, sizeof(struct item));
+ new->hdr_list = apr_array_make(p, 4, sizeof(struct item));
+ new->rdme_list = apr_array_make(p, 4, sizeof(struct item));
new->opts = 0;
new->incremented_opts = 0;
new->decremented_opts = 0;
@@ -622,12 +622,12 @@
new->icon_height = add->icon_height ? add->icon_height : base->icon_height;
new->icon_width = add->icon_width ? add->icon_width : base->icon_width;
- new->alt_list = apr_append_arrays(p, add->alt_list, base->alt_list);
- new->ign_list = apr_append_arrays(p, add->ign_list, base->ign_list);
- new->hdr_list = apr_append_arrays(p, add->hdr_list, base->hdr_list);
- new->desc_list = apr_append_arrays(p, add->desc_list, base->desc_list);
- new->icon_list = apr_append_arrays(p, add->icon_list, base->icon_list);
- new->rdme_list = apr_append_arrays(p, add->rdme_list, base->rdme_list);
+ new->alt_list = apr_array_append(p, add->alt_list, base->alt_list);
+ new->ign_list = apr_array_append(p, add->ign_list, base->ign_list);
+ new->hdr_list = apr_array_append(p, add->hdr_list, base->hdr_list);
+ new->desc_list = apr_array_append(p, add->desc_list, base->desc_list);
+ new->icon_list = apr_array_append(p, add->icon_list, base->icon_list);
+ new->rdme_list = apr_array_append(p, add->rdme_list, base->rdme_list);
if (add->opts & NO_OPTIONS) {
/*
* If the current directory says 'no options' then we also
@@ -916,10 +916,10 @@
apr_status_t stat;
ap_rputs("<PRE>\n", r);
- while (!apr_eof(f)) {
+ while (!apr_file_eof(f)) {
do {
n = sizeof(char) * IOBUFSIZE;
- stat = apr_read(f, buf, &n);
+ stat = apr_file_read(f, buf, &n);
}
while (stat != APR_SUCCESS && APR_STATUS_IS_EINTR(stat));
if (n == -1 || n == 0) {
@@ -1011,12 +1011,12 @@
* the file's contents, any HTML header it had won't end up
* where it belongs.
*/
- if (apr_open(&f, rr->filename, APR_READ,
+ if (apr_file_open(&f, rr->filename, APR_READ,
APR_OS_DEFAULT, r->pool) == APR_SUCCESS) {
emit_preamble(r, title);
emit_amble = 0;
do_emit_plain(r, f);
- apr_close(f);
+ apr_file_close(f);
emit_H1 = 0;
}
}
@@ -1079,10 +1079,10 @@
/*
* If we can open the file, suppress the signature.
*/
- if (apr_open(&f, rr->filename, APR_READ,
+ if (apr_file_open(&f, rr->filename, APR_READ,
APR_OS_DEFAULT, r->pool) == APR_SUCCESS) {
do_emit_plain(r, f);
- apr_close(f);
+ apr_file_close(f);
suppress_sig = 1;
}
}
@@ -1116,14 +1116,14 @@
"text/html")
|| !strcmp(r->content_type, INCLUDES_MAGIC_TYPE))
&& !r->content_encoding) {
- if (apr_open(&thefile, r->filename, APR_READ,
+ if (apr_file_open(&thefile, r->filename, APR_READ,
APR_OS_DEFAULT, r->pool) != APR_SUCCESS) {
return NULL;
}
n = sizeof(char) * (MAX_STRING_LEN - 1);
- apr_read(thefile, titlebuf, &n);
+ apr_file_read(thefile, titlebuf, &n);
if (n <= 0) {
- apr_close(thefile);
+ apr_file_close(thefile);
return NULL;
}
titlebuf[n] = '\0';
@@ -1144,7 +1144,7 @@
}
}
}
- apr_close(thefile);
+ apr_file_close(thefile);
return apr_pstrdup(r->pool, &titlebuf[x]);
}
}
@@ -1152,7 +1152,7 @@
p = 0;
}
}
- apr_close(thefile);
+ apr_file_close(thefile);
}
return NULL;
}
@@ -1308,7 +1308,7 @@
char *name_scratch;
char *pad_scratch;
- apr_create_pool(&scratch, r->pool);
+ apr_pool_create(&scratch, r->pool);
if (name[0] == '\0') {
name = "/";
}
1.85 +59 -59 httpd-2.0/modules/generators/mod_cgi.c
Index: mod_cgi.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgi.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- mod_cgi.c 2001/02/06 16:21:12 1.84
+++ mod_cgi.c 2001/02/08 07:44:02 1.85
@@ -216,22 +216,22 @@
((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname),
APR_FINFO_SIZE, r->pool) == APR_SUCCESS)
&& (finfo.size > conf->logbytes)) ||
- (apr_open(&f, ap_server_root_relative(r->pool, conf->logname),
+ (apr_file_open(&f, ap_server_root_relative(r->pool, conf->logname),
APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool)
!= APR_SUCCESS)) {
return ret;
}
/* "%% [Wed Jun 19 10:53:21 1996] GET /cgi-bin/printenv HTTP/1.0" */
- apr_ctime(time_str, apr_now());
- apr_fprintf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
+ apr_ctime(time_str, apr_time_now());
+ apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
r->args ? "?" : "", r->args ? r->args : "", r->protocol);
/* "%% 500 /usr/local/apache/cgi-bin */
- apr_fprintf(f, "%%%% %d %s\n", ret, r->filename);
+ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename);
- apr_fprintf(f, "%%error\n%s\n", error);
+ apr_file_printf(f, "%%error\n%s\n", error);
- apr_close(f);
+ apr_file_close(f);
return ret;
}
@@ -242,7 +242,7 @@
char argsbuffer[HUGE_STRING_LEN];
char *newline;
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_err) == 0) {
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == 0) {
newline = strchr(argsbuffer, '\n');
if (newline) {
*newline = '\0';
@@ -268,10 +268,10 @@
((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname),
APR_FINFO_SIZE, r->pool) == APR_SUCCESS)
&& (finfo.size > conf->logbytes)) ||
- (apr_open(&f, ap_server_root_relative(r->pool, conf->logname),
+ (apr_file_open(&f, ap_server_root_relative(r->pool, conf->logname),
APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
/* Soak up script output */
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)
continue;
log_script_err(r, script_err);
@@ -279,56 +279,56 @@
}
/* "%% [Wed Jun 19 10:53:21 1996] GET /cgi-bin/printenv HTTP/1.0" */
- apr_ctime(time_str, apr_now());
- apr_fprintf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
+ apr_ctime(time_str, apr_time_now());
+ apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
r->args ? "?" : "", r->args ? r->args : "", r->protocol);
/* "%% 500 /usr/local/apache/cgi-bin" */
- apr_fprintf(f, "%%%% %d %s\n", ret, r->filename);
+ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename);
- apr_puts("%request\n", f);
+ apr_file_puts("%request\n", f);
for (i = 0; i < hdrs_arr->nelts; ++i) {
if (!hdrs[i].key)
continue;
- apr_fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
+ apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
}
if ((r->method_number == M_POST || r->method_number == M_PUT)
&& *dbuf) {
- apr_fprintf(f, "\n%s\n", dbuf);
+ apr_file_printf(f, "\n%s\n", dbuf);
}
- apr_puts("%response\n", f);
+ apr_file_puts("%response\n", f);
hdrs_arr = apr_table_elts(r->err_headers_out);
hdrs = (apr_table_entry_t *) hdrs_arr->elts;
for (i = 0; i < hdrs_arr->nelts; ++i) {
if (!hdrs[i].key)
continue;
- apr_fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
+ apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
}
if (sbuf && *sbuf)
- apr_fprintf(f, "%s\n", sbuf);
+ apr_file_printf(f, "%s\n", sbuf);
- if (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_in) == 0) {
- apr_puts("%stdout\n", f);
- apr_puts(argsbuffer, f);
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)
- apr_puts(argsbuffer, f);
- apr_puts("\n", f);
+ if (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_in) == 0) {
+ apr_file_puts("%stdout\n", f);
+ apr_file_puts(argsbuffer, f);
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)
+ apr_file_puts(argsbuffer, f);
+ apr_file_puts("\n", f);
}
- if (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_err) == 0) {
- apr_puts("%stderr\n", f);
- apr_puts(argsbuffer, f);
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_err) == 0)
- apr_puts(argsbuffer, f);
- apr_puts("\n", f);
+ if (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == 0) {
+ apr_file_puts("%stderr\n", f);
+ apr_file_puts(argsbuffer, f);
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == 0)
+ apr_file_puts(argsbuffer, f);
+ apr_file_puts("\n", f);
}
- apr_close(script_in);
- apr_close(script_err);
+ apr_file_close(script_in);
+ apr_file_close(script_err);
- apr_close(f);
+ apr_file_close(f);
return ret;
}
@@ -415,23 +415,23 @@
/* Transmute ourselves into the script.
* NB only ISINDEX scripts get decoded arguments.
*/
- if (((rc = apr_createprocattr_init(&procattr, p)) != APR_SUCCESS) ||
- ((rc = apr_setprocattr_io(procattr,
+ if (((rc = apr_procattr_create(&procattr, p)) != APR_SUCCESS) ||
+ ((rc = apr_procattr_io_set(procattr,
e_info->in_pipe,
e_info->out_pipe,
e_info->err_pipe)) != APR_SUCCESS) ||
- ((rc = apr_setprocattr_dir(procattr,
+ ((rc = apr_procattr_dir_set(procattr,
ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) ||
#ifdef RLIMIT_CPU
- ((rc = apr_setprocattr_limit(procattr, APR_LIMIT_CPU, conf->limit_cpu)) != APR_SUCCESS) ||
+ ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_CPU, conf->limit_cpu)) != APR_SUCCESS) ||
#endif
#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
- ((rc = apr_setprocattr_limit(procattr, APR_LIMIT_MEM, conf->limit_mem)) != APR_SUCCESS) ||
+ ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_MEM, conf->limit_mem)) != APR_SUCCESS) ||
#endif
#ifdef RLIMIT_NPROC
- ((rc = apr_setprocattr_limit(procattr, APR_LIMIT_NPROC, conf->limit_nproc)) != APR_SUCCESS) ||
+ ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_NPROC, conf->limit_nproc)) != APR_SUCCESS) ||
#endif
- ((rc = apr_setprocattr_cmdtype(procattr, e_info->cmd_type)) != APR_SUCCESS)) {
+ ((rc = apr_procattr_cmdtype_set(procattr, e_info->cmd_type)) != APR_SUCCESS)) {
/* Something bad happened, tell the world. */
ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
"couldn't set child process attributes: %s", r->filename);
@@ -450,23 +450,23 @@
"couldn't create child process: %d: %s", rc, r->filename);
}
else {
- apr_note_subprocess(p, procnew, kill_after_timeout);
+ apr_pool_note_subprocess(p, procnew, kill_after_timeout);
*script_in = procnew->out;
if (!script_in)
return APR_EBADF;
- apr_set_pipe_timeout(*script_in, (int)(r->server->timeout * APR_USEC_PER_SEC));
+ apr_file_pipe_timeout_set(*script_in, (int)(r->server->timeout * APR_USEC_PER_SEC));
if (e_info->prog_type == RUN_AS_CGI) {
*script_out = procnew->in;
if (!*script_out)
return APR_EBADF;
- apr_set_pipe_timeout(*script_out, (int)(r->server->timeout * APR_USEC_PER_SEC));
+ apr_file_pipe_timeout_set(*script_out, (int)(r->server->timeout * APR_USEC_PER_SEC));
*script_err = procnew->err;
if (!*script_err)
return APR_EBADF;
- apr_set_pipe_timeout(*script_err, (int)(r->server->timeout * APR_USEC_PER_SEC));
+ apr_file_pipe_timeout_set(*script_err, (int)(r->server->timeout * APR_USEC_PER_SEC));
}
}
}
@@ -709,7 +709,7 @@
bytes_written = 0;
do {
bytes_to_write = len_read - bytes_written;
- rv = apr_write(script_out, argsbuffer + bytes_written,
+ rv = apr_file_write(script_out, argsbuffer + bytes_written,
&bytes_to_write);
bytes_written += bytes_to_write;
} while (rv == APR_SUCCESS && bytes_written < len_read);
@@ -721,10 +721,10 @@
break;
}
}
- apr_flush(script_out);
+ apr_file_flush(script_out);
}
- apr_close(script_out);
+ apr_file_close(script_out);
/* Handle script return... */
if (script_in && !nph) {
@@ -741,7 +741,7 @@
if (location && location[0] == '/' && r->status == 200) {
/* Soak up all the script output */
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_in) == 0) {
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_in) == 0) {
continue;
}
log_script_err(r, script_err);
@@ -770,22 +770,22 @@
ap_send_http_header(r);
if (!r->header_only) {
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_pipe(script_in);
+ b = apr_bucket_pipe_creat(script_in);
APR_BRIGADE_INSERT_TAIL(bb, b);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
}
log_script_err(r, script_err);
- apr_close(script_err);
+ apr_file_close(script_err);
}
if (script_in && nph) {
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_pipe(script_in);
+ b = apr_bucket_pipe_creat(script_in);
APR_BRIGADE_INSERT_TAIL(bb, b);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
}
@@ -840,15 +840,15 @@
location = ap_escape_html(rr->pool, location);
len_loc = strlen(location);
- tmp_buck = apr_bucket_create_immortal("<A HREF=\"", sizeof("<A HREF=\""));
+ tmp_buck = apr_bucket_immortal_create("<A HREF=\"", sizeof("<A HREF=\""));
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
- tmp2_buck = apr_bucket_create_heap(location, len_loc, 1, &h_wrt);
+ tmp2_buck = apr_bucket_heap_create(location, len_loc, 1, &h_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
- tmp2_buck = apr_bucket_create_immortal("\">", sizeof("\">"));
+ tmp2_buck = apr_bucket_immortal_create("\">", sizeof("\">"));
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
- tmp2_buck = apr_bucket_create_heap(location, len_loc, 1, &h_wrt);
+ tmp2_buck = apr_bucket_heap_create(location, len_loc, 1, &h_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
- tmp2_buck = apr_bucket_create_immortal("</A>", sizeof("</A>"));
+ tmp2_buck = apr_bucket_immortal_create("</A>", sizeof("</A>"));
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
if (*inserted_head == NULL) {
@@ -896,7 +896,7 @@
}
bcgi = apr_brigade_create(r->pool);
- b = apr_bucket_create_pipe(script_in);
+ b = apr_bucket_pipe_creat(script_in);
APR_BRIGADE_INSERT_TAIL(bcgi, b);
ap_pass_brigade(f->next, bcgi);
1.69 +68 -68 httpd-2.0/modules/generators/mod_cgid.c
Index: mod_cgid.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgid.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- mod_cgid.c 2001/02/06 16:21:14 1.68
+++ mod_cgid.c 2001/02/08 07:44:02 1.69
@@ -227,12 +227,12 @@
case APR_OC_REASON_LOST:
/* stop gap to make sure everything else works. In the end,
* we'll just restart the cgid server. */
- apr_destroy_pool(pcgi);
+ apr_pool_destroy(pcgi);
kill(getppid(), SIGWINCH);
break;
case APR_OC_REASON_RESTART:
case APR_OC_REASON_UNREGISTER:
- apr_destroy_pool(pcgi);
+ apr_pool_destroy(pcgi);
kill(*sd, SIGHUP);
break;
}
@@ -328,7 +328,7 @@
* to actually fill this out, but for now we just don't want suexec to
* seg fault.
*/
- r->notes = apr_make_table(r->pool, 1);
+ r->notes = apr_table_make(r->pool, 1);
}
@@ -510,14 +510,14 @@
continue;
}
- apr_create_pool(&p, pcgi);
+ apr_pool_create(&p, pcgi);
r = apr_pcalloc(p, sizeof(request_rec));
procnew = apr_pcalloc(p, sizeof(*procnew));
r->pool = p;
get_req(sd2, r, &filename, &argv0, &env, &req_type);
- apr_put_os_file(&r->server->error_log, &errfileno, r->pool);
- apr_put_os_file(&inout, &sd2, r->pool);
+ apr_os_file_put(&r->server->error_log, &errfileno, r->pool);
+ apr_os_file_put(&inout, &sd2, r->pool);
if (req_type == SSI_REQ) {
in_pipe = APR_NO_PIPE;
@@ -526,18 +526,18 @@
cmd_type = APR_SHELLCMD;
}
- if (((rc = apr_createprocattr_init(&procattr, p)) != APR_SUCCESS) ||
+ if (((rc = apr_procattr_create(&procattr, p)) != APR_SUCCESS) ||
((req_type == CGI_REQ) &&
- (((rc = apr_setprocattr_io(procattr,
+ (((rc = apr_procattr_io_set(procattr,
in_pipe,
out_pipe,
err_pipe)) != APR_SUCCESS) ||
- ((rc = apr_setprocattr_childerr(procattr, r->server->error_log, NULL)) != APR_SUCCESS) ||
- ((rc = apr_setprocattr_childin(procattr, inout, NULL)) != APR_SUCCESS))) ||
- ((rc = apr_setprocattr_childout(procattr, inout, NULL)) != APR_SUCCESS) ||
- ((rc = apr_setprocattr_dir(procattr,
+ ((rc = apr_procattr_child_err_set(procattr, r->server->error_log, NULL)) != APR_SUCCESS) ||
+ ((rc = apr_procattr_child_in_set(procattr, inout, NULL)) != APR_SUCCESS))) ||
+ ((rc = apr_procattr_child_out_set(procattr, inout, NULL)) != APR_SUCCESS) ||
+ ((rc = apr_procattr_dir_set(procattr,
ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) ||
- ((rc = apr_setprocattr_cmdtype(procattr, cmd_type)) != APR_SUCCESS)) {
+ ((rc = apr_procattr_cmdtype_set(procattr, cmd_type)) != APR_SUCCESS)) {
/* Something bad happened, tell the world. */
ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
"couldn't set child process attributes: %s", r->filename);
@@ -569,15 +569,15 @@
const char *userdata_key = "cgid_init";
module **m;
- apr_get_userdata(&data, userdata_key, main_server->process->pool);
+ apr_pool_userdata_get(&data, userdata_key, main_server->process->pool);
if (!data) {
first_time = 1;
- apr_set_userdata((const void *)1, userdata_key,
- apr_null_cleanup, main_server->process->pool);
+ apr_pool_userdata_set((const void *)1, userdata_key,
+ apr_pool_cleanup_null, main_server->process->pool);
}
if (!first_time) {
- apr_create_pool(&pcgi, p);
+ apr_pool_create(&pcgi, p);
total_modules = 0;
for (m = ap_preloaded_modules; *m != NULL; m++)
@@ -595,9 +595,9 @@
procnew = apr_pcalloc(p, sizeof(*procnew));
procnew->pid = pid;
procnew->err = procnew->in = procnew->out = NULL;
- apr_note_subprocess(p, procnew, kill_after_timeout);
+ apr_pool_note_subprocess(p, procnew, kill_after_timeout);
#if APR_HAS_OTHER_CHILD
- apr_register_other_child(procnew, cgid_maint, &procnew->pid, NULL, p);
+ apr_proc_other_child_register(procnew, cgid_maint, &procnew->pid, NULL, p);
#endif
cgid_pfn_reg_with_ssi = APR_RETRIEVE_OPTIONAL_FN(ap_register_include_handler);
@@ -700,21 +700,21 @@
if (!conf->logname ||
((stat(ap_server_root_relative(r->pool, conf->logname), &finfo) == 0)
&& (finfo.st_size > conf->logbytes)) ||
- (apr_open(&f, ap_server_root_relative(r->pool, conf->logname),
+ (apr_file_open(&f, ap_server_root_relative(r->pool, conf->logname),
APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
return ret;
}
/* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */
- apr_ctime(time_str, apr_now());
- apr_fprintf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
+ apr_ctime(time_str, apr_time_now());
+ apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
r->args ? "?" : "", r->args ? r->args : "", r->protocol);
/* "%% 500 /usr/local/apache/cgid-bin */
- apr_fprintf(f, "%%%% %d %s\n", ret, r->filename);
+ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename);
- apr_fprintf(f, "%%error\n%s\n", error);
+ apr_file_printf(f, "%%error\n%s\n", error);
- apr_close(f);
+ apr_file_close(f);
return ret;
}
@@ -732,73 +732,73 @@
if (!conf->logname ||
((stat(ap_server_root_relative(r->pool, conf->logname), &finfo) == 0)
&& (finfo.st_size > conf->logbytes)) ||
- (apr_open(&f, ap_server_root_relative(r->pool, conf->logname),
+ (apr_file_open(&f, ap_server_root_relative(r->pool, conf->logname),
APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
/* Soak up script output */
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)
continue;
if (script_err) {
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_err) == 0)
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == 0)
continue;
}
return ret;
}
/* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */
- apr_ctime(time_str, apr_now());
- apr_fprintf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
+ apr_ctime(time_str, apr_time_now());
+ apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
r->args ? "?" : "", r->args ? r->args : "", r->protocol);
/* "%% 500 /usr/local/apache/cgid-bin" */
- apr_fprintf(f, "%%%% %d %s\n", ret, r->filename);
+ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename);
- apr_puts("%request\n", f);
+ apr_file_puts("%request\n", f);
for (i = 0; i < hdrs_arr->nelts; ++i) {
if (!hdrs[i].key)
continue;
- apr_fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
+ apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
}
if ((r->method_number == M_POST || r->method_number == M_PUT)
&& *dbuf) {
- apr_fprintf(f, "\n%s\n", dbuf);
+ apr_file_printf(f, "\n%s\n", dbuf);
}
- apr_puts("%response\n", f);
+ apr_file_puts("%response\n", f);
hdrs_arr = apr_table_elts(r->err_headers_out);
hdrs = (apr_table_entry_t *) hdrs_arr->elts;
for (i = 0; i < hdrs_arr->nelts; ++i) {
if (!hdrs[i].key)
continue;
- apr_fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
+ apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
}
if (sbuf && *sbuf)
- apr_fprintf(f, "%s\n", sbuf);
+ apr_file_printf(f, "%s\n", sbuf);
- if (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_in) == 0) {
- apr_puts("%stdout\n", f);
- apr_puts(argsbuffer, f);
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)
- apr_puts(argsbuffer, f);
- apr_puts("\n", f);
+ if (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_in) == 0) {
+ apr_file_puts("%stdout\n", f);
+ apr_file_puts(argsbuffer, f);
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_in) == 0)
+ apr_file_puts(argsbuffer, f);
+ apr_file_puts("\n", f);
}
if (script_err) {
- if (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_err) == 0) {
- apr_puts("%stderr\n", f);
- apr_puts(argsbuffer, f);
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, script_err) == 0)
- apr_puts(argsbuffer, f);
- apr_puts("\n", f);
+ if (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == 0) {
+ apr_file_puts("%stderr\n", f);
+ apr_file_puts(argsbuffer, f);
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == 0)
+ apr_file_puts(argsbuffer, f);
+ apr_file_puts("\n", f);
}
}
- apr_close(script_in);
+ apr_file_close(script_in);
if (script_err) {
- apr_close(script_err);
+ apr_file_close(script_err);
}
- apr_close(f);
+ apr_file_close(f);
return ret;
}
@@ -897,7 +897,7 @@
/* We are putting the tempsock variable into a file so that we can use
* a pipe bucket to send the data to the client.
*/
- apr_put_os_file(&tempsock, &sd, r->pool);
+ apr_os_file_put(&tempsock, &sd, r->pool);
if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))
return retval;
@@ -932,7 +932,7 @@
dbpos += dbsize;
}
nbytes = len_read;
- apr_write(tempsock, argsbuffer, &nbytes);
+ apr_file_write(tempsock, argsbuffer, &nbytes);
if (nbytes < len_read) {
/* silly script stopped reading, soak up remaining message */
while (ap_get_client_block(r, argsbuffer, HUGE_STRING_LEN) > 0) {
@@ -959,7 +959,7 @@
if (location && location[0] == '/' && r->status == 200) {
/* Soak up all the script output */
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, tempsock) > 0) {
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, tempsock) > 0) {
continue;
}
/* This redirect needs to be a GET no matter what the original
@@ -987,9 +987,9 @@
ap_send_http_header(r);
if (!r->header_only) {
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_pipe(tempsock);
+ b = apr_bucket_pipe_creat(tempsock);
APR_BRIGADE_INSERT_TAIL(bb, b);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
}
@@ -997,14 +997,14 @@
if (nph) {
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_pipe(tempsock);
+ b = apr_bucket_pipe_creat(tempsock);
APR_BRIGADE_INSERT_TAIL(bb, b);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
}
- apr_close(tempsock);
+ apr_file_close(tempsock);
return OK; /* NOT r->status, even if it has changed. */
}
@@ -1059,15 +1059,15 @@
location = ap_escape_html(rr->pool, location);
len_loc = strlen(location);
- tmp_buck = apr_bucket_create_immortal("<A HREF=\"", sizeof("<A HREF=\""));
+ tmp_buck = apr_bucket_immortal_create("<A HREF=\"", sizeof("<A HREF=\""));
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
- tmp2_buck = apr_bucket_create_heap(location, len_loc, 1, &h_wrt);
+ tmp2_buck = apr_bucket_heap_create(location, len_loc, 1, &h_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
- tmp2_buck = apr_bucket_create_immortal("\">", sizeof("\">"));
+ tmp2_buck = apr_bucket_immortal_create("\">", sizeof("\">"));
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
- tmp2_buck = apr_bucket_create_heap(location, len_loc, 1, &h_wrt);
+ tmp2_buck = apr_bucket_heap_create(location, len_loc, 1, &h_wrt);
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
- tmp2_buck = apr_bucket_create_immortal("</A>", sizeof("</A>"));
+ tmp2_buck = apr_bucket_immortal_create("</A>", sizeof("</A>"));
APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck);
if (*inserted_head == NULL) {
@@ -1147,7 +1147,7 @@
/* We are putting the tempsock variable into a file so that we can use
* a pipe bucket to send the data to the client.
*/
- apr_put_os_file(&tempsock, &sd, r->pool);
+ apr_os_file_put(&tempsock, &sd, r->pool);
if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))
return retval;
@@ -1158,7 +1158,7 @@
char argsbuffer[HUGE_STRING_LEN];
/* Soak up all the script output */
- while (apr_fgets(argsbuffer, HUGE_STRING_LEN, tempsock) > 0) {
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, tempsock) > 0) {
continue;
}
/* This redirect needs to be a GET no matter what the original
@@ -1186,7 +1186,7 @@
ap_send_http_header(r);
if (!r->header_only) {
bcgi = apr_brigade_create(r->pool);
- b = apr_bucket_create_pipe(tempsock);
+ b = apr_bucket_pipe_creat(tempsock);
APR_BRIGADE_INSERT_TAIL(bcgi, b);
ap_pass_brigade(f->next, bcgi);
}
1.24 +3 -3 httpd-2.0/modules/generators/mod_info.c
Index: mod_info.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_info.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mod_info.c 2001/01/19 07:04:20 1.23
+++ mod_info.c 2001/02/08 07:44:02 1.24
@@ -114,7 +114,7 @@
{
info_svr_conf *conf = (info_svr_conf *) apr_pcalloc(p, sizeof(info_svr_conf));
- conf->more_info = apr_make_array(p, 20, sizeof(info_entry));
+ conf->more_info = apr_array_make(p, 20, sizeof(info_entry));
return conf;
}
@@ -124,7 +124,7 @@
info_svr_conf *base = (info_svr_conf *) basev;
info_svr_conf *overrides = (info_svr_conf *) overridesv;
- new->more_info = apr_append_arrays(p, overrides->more_info, base->more_info);
+ new->more_info = apr_array_append(p, overrides->more_info, base->more_info);
return new;
}
@@ -452,7 +452,7 @@
server_rec *s = cmd->server;
info_svr_conf *conf = (info_svr_conf *) ap_get_module_config(s->module_config,
&info_module);
- info_entry *new = apr_push_array(conf->more_info);
+ info_entry *new = apr_array_push(conf->more_info);
new->name = name;
new->info = info;
1.23 +1 -1 httpd-2.0/modules/generators/mod_status.c
Index: mod_status.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_status.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- mod_status.c 2001/02/04 03:12:48 1.22
+++ mod_status.c 2001/02/08 07:44:02 1.23
@@ -228,7 +228,7 @@
static int status_handler(request_rec *r)
{
const char *loc;
- apr_time_t nowtime = apr_now();
+ apr_time_t nowtime = apr_time_now();
time_t up_time;
int j, i, res;
int ready = 0;
1.4 +3 -3 httpd-2.0/modules/http/error_bucket.c
Index: error_bucket.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/error_bucket.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- error_bucket.c 2001/01/28 03:36:02 1.3
+++ error_bucket.c 2001/02/08 07:44:03 1.4
@@ -98,7 +98,7 @@
"ERROR", 5,
free,
error_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_notimpl,
- apr_bucket_copy_notimpl
+ apr_bucket_notimpl_setaside,
+ apr_bucket_notimpl_split,
+ apr_bucket_notimpl_copy
};
1.255 +44 -44 httpd-2.0/modules/http/http_core.c
Index: http_core.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_core.c,v
retrieving revision 1.254
retrieving revision 1.255
diff -u -r1.254 -r1.255
--- http_core.c 2001/02/05 18:28:47 1.254
+++ http_core.c 2001/02/08 07:44:03 1.255
@@ -155,7 +155,7 @@
conf->limit_req_body = 0;
conf->limit_xml_body = AP_LIMIT_UNSET;
- conf->sec = apr_make_array(a, 2, sizeof(void *));
+ conf->sec = apr_array_make(a, 2, sizeof(void *));
#ifdef WIN32
conf->script_interpreter_source = INTERPRETER_SOURCE_UNSET;
#endif
@@ -165,8 +165,8 @@
conf->add_default_charset = ADD_DEFAULT_CHARSET_UNSET;
conf->add_default_charset_name = DEFAULT_ADD_DEFAULT_CHARSET_NAME;
- conf->output_filters = apr_make_array(a, 2, sizeof(void *));
- conf->input_filters = apr_make_array(a, 2, sizeof(void *));
+ conf->output_filters = apr_array_make(a, 2, sizeof(void *));
+ conf->input_filters = apr_array_make(a, 2, sizeof(void *));
return (void *)conf;
}
@@ -284,7 +284,7 @@
else
conf->limit_xml_body = base->limit_xml_body;
- conf->sec = apr_append_arrays(a, base->sec, new->sec);
+ conf->sec = apr_array_append(a, base->sec, new->sec);
if (new->satisfy != SATISFY_NOSPEC) {
conf->satisfy = new->satisfy;
@@ -306,9 +306,9 @@
conf->add_default_charset_name = new->add_default_charset_name;
}
}
- conf->output_filters = apr_append_arrays(a, base->output_filters,
+ conf->output_filters = apr_array_append(a, base->output_filters,
new->output_filters);
- conf->input_filters = apr_append_arrays(a, base->input_filters,
+ conf->input_filters = apr_array_append(a, base->input_filters,
new->input_filters);
return (void*)conf;
@@ -325,8 +325,8 @@
#endif
conf->access_name = is_virtual ? NULL : DEFAULT_ACCESS_FNAME;
conf->ap_document_root = is_virtual ? NULL : DOCUMENT_LOCATION;
- conf->sec = apr_make_array(a, 40, sizeof(void *));
- conf->sec_url = apr_make_array(a, 40, sizeof(void *));
+ conf->sec = apr_array_make(a, 40, sizeof(void *));
+ conf->sec_url = apr_array_make(a, 40, sizeof(void *));
return (void *)conf;
}
@@ -345,8 +345,8 @@
if (!conf->ap_document_root) {
conf->ap_document_root = base->ap_document_root;
}
- conf->sec = apr_append_arrays(p, base->sec, virt->sec);
- conf->sec_url = apr_append_arrays(p, base->sec_url, virt->sec_url);
+ conf->sec = apr_array_append(p, base->sec, virt->sec);
+ conf->sec_url = apr_array_append(p, base->sec_url, virt->sec_url);
return conf;
}
@@ -359,7 +359,7 @@
{
core_server_config *sconf = ap_get_module_config(s->module_config,
&core_module);
- void **new_space = (void **)apr_push_array(sconf->sec);
+ void **new_space = (void **)apr_array_push(sconf->sec);
*new_space = dir_config;
}
@@ -368,14 +368,14 @@
{
core_server_config *sconf = ap_get_module_config(s->module_config,
&core_module);
- void **new_space = (void **)apr_push_array(sconf->sec_url);
+ void **new_space = (void **)apr_array_push(sconf->sec_url);
*new_space = url_config;
}
AP_CORE_DECLARE(void) ap_add_file_conf(core_dir_config *conf, void *url_config)
{
- void **new_space = (void **)apr_push_array(conf->sec);
+ void **new_space = (void **)apr_array_push(conf->sec);
*new_space = url_config;
}
@@ -465,7 +465,7 @@
elts = (void **)sec->elts;
/* we have to allocate tmp space to do a stable sort */
- apr_create_pool(&tmp, p);
+ apr_pool_create(&tmp, p);
sortbin = apr_palloc(tmp, sec->nelts * sizeof(*sortbin));
for (i = 0; i < nelts; ++i) {
sortbin[i].orig_index = i;
@@ -479,7 +479,7 @@
elts[i] = sortbin[i].elt;
}
- apr_destroy_pool(tmp);
+ apr_pool_destroy(tmp);
}
/*****************************************************************
@@ -598,7 +598,7 @@
conn->double_reverse = -1;
return;
}
- rv = apr_getaddrinfo(&sa, conn->remote_host, APR_UNSPEC, 0, 0, conn->pool);
+ rv = apr_sockaddr_info_get(&sa, conn->remote_host, APR_UNSPEC, 0, 0, conn->pool);
if (rv == APR_SUCCESS) {
while (sa) {
if (sa->ipaddr_len == conn->remote_addr->ipaddr_len &&
@@ -638,7 +638,7 @@
|| hostname_lookups != HOSTNAME_LOOKUP_OFF)) {
apr_sockaddr_t *remote_addr;
- apr_get_sockaddr(&remote_addr, APR_REMOTE, conn->client_socket);
+ apr_socket_addr_get(&remote_addr, APR_REMOTE, conn->client_socket);
if (apr_getnameinfo(&conn->remote_host, remote_addr, 0) == APR_SUCCESS) {
ap_str_tolower(conn->remote_host);
@@ -727,7 +727,7 @@
if (conn->local_host == NULL) {
apr_sockaddr_t *local_addr;
- apr_get_sockaddr(&local_addr, APR_LOCAL, conn->client_socket);
+ apr_socket_addr_get(&local_addr, APR_LOCAL, conn->client_socket);
if (apr_getnameinfo(&conn->local_host, local_addr, 0) != APR_SUCCESS)
conn->local_host = apr_pstrdup(conn->pool, r->server->server_hostname);
else {
@@ -753,8 +753,8 @@
if (r->hostname) {
apr_sockaddr_t *localsa;
- apr_get_sockaddr(&localsa, APR_LOCAL, r->connection->client_socket);
- apr_get_port(&port, localsa);
+ apr_socket_addr_get(&localsa, APR_LOCAL, r->connection->client_socket);
+ apr_sockaddr_port_get(&port, localsa);
}
}
/* default */
@@ -1430,9 +1430,9 @@
core_dir_config *c=c_;
if (!c->ap_requires) {
- c->ap_requires = apr_make_array(cmd->pool, 2, sizeof(require_line));
+ c->ap_requires = apr_array_make(cmd->pool, 2, sizeof(require_line));
}
- r = (require_line *)apr_push_array(c->ap_requires);
+ r = (require_line *)apr_array_push(c->ap_requires);
r->requirement = apr_pstrdup(cmd->pool, arg);
r->method_mask = cmd->limited;
return NULL;
@@ -1466,10 +1466,10 @@
*/
if (!tog) {
if (cmd->limited_xmethods == NULL) {
- cmd->limited_xmethods = apr_make_array(cmd->pool, 2,
+ cmd->limited_xmethods = apr_array_make(cmd->pool, 2,
sizeof(char *));
}
- xmethod = (char **) apr_push_array(cmd->limited_xmethods);
+ xmethod = (char **) apr_array_push(cmd->limited_xmethods);
*xmethod = apr_pstrdup(cmd->pool, method);
}
/*
@@ -1868,10 +1868,10 @@
while (*arg) {
char **item, *name = ap_getword_conf(cmd->pool, &arg);
if (ap_is_matchexp(name)) {
- item = (char **)apr_push_array(cmd->server->wild_names);
+ item = (char **)apr_array_push(cmd->server->wild_names);
}
else {
- item = (char **)apr_push_array(cmd->server->names);
+ item = (char **)apr_array_push(cmd->server->names);
}
*item = name;
}
@@ -1883,7 +1883,7 @@
core_dir_config *conf = dummy;
char **newfilter;
- newfilter = (char **)apr_push_array(conf->output_filters);
+ newfilter = (char **)apr_array_push(conf->output_filters);
*newfilter = apr_pstrdup(cmd->pool, arg);
return NULL;
}
@@ -1893,7 +1893,7 @@
core_dir_config *conf = dummy;
char **newfilter;
- newfilter = (char **)apr_push_array(conf->input_filters);
+ newfilter = (char **)apr_array_push(conf->input_filters);
*newfilter = apr_pstrdup(cmd->pool, arg);
return NULL;
}
@@ -2270,8 +2270,8 @@
* we are adding the original SERVER_BASEVERSION string.
*/
if (server_version == NULL) {
- apr_register_cleanup(pconf, NULL, reset_version,
- apr_null_cleanup);
+ apr_pool_cleanup_register(pconf, NULL, reset_version,
+ apr_pool_cleanup_null);
server_version = apr_pstrdup(pconf, component);
}
else {
@@ -2677,7 +2677,7 @@
/* Seek the file to 'offset' */
if (offset != 0 && rv == APR_SUCCESS) {
- rv = apr_seek(fd, APR_SET, &offset);
+ rv = apr_file_seek(fd, APR_SET, &offset);
}
/* Send the file, making sure to handle partial writes */
@@ -2685,7 +2685,7 @@
while (rv == APR_SUCCESS && togo) {
sendlen = togo > sizeof(buffer) ? sizeof(buffer) : togo;
o = 0;
- rv = apr_read(fd, buffer, &sendlen);
+ rv = apr_file_read(fd, buffer, &sendlen);
while (rv == APR_SUCCESS && sendlen) {
bytes_sent = sendlen;
rv = apr_send(c->client_socket, &buffer[o], &bytes_sent);
@@ -3006,7 +3006,7 @@
return HTTP_METHOD_NOT_ALLOWED;
}
- if ((status = apr_open(&fd, r->filename, APR_READ | APR_BINARY, 0, r->connection->pool)) != APR_SUCCESS) {
+ if ((status = apr_file_open(&fd, r->filename, APR_READ | APR_BINARY, 0, r->connection->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
"file permissions deny server access: %s", r->filename);
return HTTP_FORBIDDEN;
@@ -3017,7 +3017,7 @@
apr_table_setn(r->headers_out, "Accept-Ranges", "bytes");
ap_set_content_length(r, r->finfo.size);
if ((errstatus = ap_meets_conditions(r)) != OK) {
- apr_close(fd);
+ apr_file_close(fd);
return errstatus;
}
@@ -3027,10 +3027,10 @@
}
bb = apr_brigade_create(r->pool);
- e = apr_bucket_create_file(fd, 0, r->finfo.size);
+ e = apr_bucket_file_create(fd, 0, r->finfo.size);
APR_BRIGADE_INSERT_HEAD(bb, e);
- e = apr_bucket_create_eos();
+ e = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, e);
return ap_pass_brigade(r->output_filters, bb);
@@ -3139,7 +3139,7 @@
if (pass_the_brigade) {
/* Insert ctx->buf into the correct spot in the brigade */
- e = apr_bucket_create_pool(ctx->buf, ctx->cnt, p);
+ e = apr_bucket_pool_create(ctx->buf, ctx->cnt, p);
if (insert_first) {
APR_BRIGADE_INSERT_HEAD(b, e);
}
@@ -3245,14 +3245,14 @@
hdr_len = apr_snprintf(chunk_hdr, sizeof(chunk_hdr),
"%qx" CRLF, (apr_uint64_t)bytes);
ap_xlate_proto_to_ascii(chunk_hdr, hdr_len);
- e = apr_bucket_create_transient(chunk_hdr, hdr_len);
+ e = apr_bucket_transient_create(chunk_hdr, hdr_len);
APR_BRIGADE_INSERT_HEAD(b, e);
/*
* Insert the end-of-chunk CRLF before the EOS bucket, or
* appended to the brigade
*/
- e = apr_bucket_create_immortal(ASCII_CRLF, 2);
+ e = apr_bucket_immortal_create(ASCII_CRLF, 2);
if (eos != NULL) {
APR_BUCKET_INSERT_BEFORE(eos, e);
}
@@ -3276,7 +3276,7 @@
*/
if (eos != NULL) {
/* XXX: (2) trailers ... does not yet exist */
- e = apr_bucket_create_immortal(ASCII_ZERO ASCII_CRLF /* <trailers> */ ASCII_CRLF, 5);
+ e = apr_bucket_immortal_create(ASCII_ZERO ASCII_CRLF /* <trailers> */ ASCII_CRLF, 5);
APR_BUCKET_INSERT_BEFORE(eos, e);
}
@@ -3296,7 +3296,7 @@
if (!f->ctx) { /* If we haven't passed up the socket yet... */
f->ctx = (void *)1;
- e = apr_bucket_create_socket(f->c->client_socket);
+ e = apr_bucket_socket_create(f->c->client_socket);
APR_BRIGADE_INSERT_TAIL(b, e);
return APR_SUCCESS;
}
@@ -3474,7 +3474,7 @@
flags); /* apr_sendfile flags */
/* If apr_sendfile() returns APR_ENOTIMPL, call send_the_file()
- * to loop on apr_read/apr_send to send the file. Our Windows
+ * to loop on apr_file_read/apr_send to send the file. Our Windows
* binary distributions (which work on Windows 9x/NT) are
* compiled on Windows NT. TransmitFile is not available on
* Windows 95/98 and we discover this at runtime when
@@ -3517,8 +3517,8 @@
static void core_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
- apr_init_bucket_types(pconf);
- apr_insert_bucket_type(&ap_bucket_type_error);
+ apr_bucket_init_types(pconf);
+ apr_bucket_insert_type(&ap_bucket_type_error);
}
static void core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
1.292 +44 -44 httpd-2.0/modules/http/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
retrieving revision 1.291
retrieving revision 1.292
diff -u -r1.291 -r1.292
--- http_protocol.c 2001/02/06 22:49:46 1.291
+++ http_protocol.c 2001/02/08 07:44:03 1.292
@@ -237,7 +237,7 @@
bsend = apr_brigade_create(r->pool);
e = ap_bucket_create_error(HTTP_RANGE_NOT_SATISFIABLE, NULL, r->pool);
APR_BRIGADE_INSERT_TAIL(bsend, e);
- e = apr_bucket_create_eos();
+ e = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bsend, e);
return ap_pass_brigade(f->next, bsend);
}
@@ -316,14 +316,14 @@
if (ctx->num_ranges > 1) {
char *ts;
- e = apr_bucket_create_pool(bound_head,
+ e = apr_bucket_pool_create(bound_head,
strlen(bound_head), r->pool);
APR_BRIGADE_INSERT_TAIL(bsend, e);
ts = apr_psprintf(r->pool, BYTERANGE_FMT CRLF CRLF,
range_start, range_end, clength);
ap_xlate_proto_to_ascii(ts, strlen(ts));
- e = apr_bucket_create_pool(ts, strlen(ts), r->pool);
+ e = apr_bucket_pool_create(ts, strlen(ts), r->pool);
APR_BRIGADE_INSERT_TAIL(bsend, e);
}
@@ -338,7 +338,7 @@
if (apr_bucket_copy(ec, &foo) != APR_SUCCESS) {
apr_bucket_read(ec, &str, &len, APR_BLOCK_READ);
- foo = apr_bucket_create_heap(str, len, 0, NULL);
+ foo = apr_bucket_heap_create(str, len, 0, NULL);
}
APR_BRIGADE_INSERT_TAIL(bsend, foo);
ec = APR_BUCKET_NEXT(ec);
@@ -357,11 +357,11 @@
/* add the final boundary */
end = apr_pstrcat(r->pool, CRLF "--", r->boundary, "--" CRLF, NULL);
ap_xlate_proto_to_ascii(end, strlen(end));
- e = apr_bucket_create_pool(end, strlen(end), r->pool);
+ e = apr_bucket_pool_create(end, strlen(end), r->pool);
APR_BRIGADE_INSERT_TAIL(bsend, e);
}
- e = apr_bucket_create_eos();
+ e = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bsend, e);
/* we're done with the original content */
@@ -489,7 +489,7 @@
* were given a time in the future, we return the current time - the
* Last-Modified can't be in the future.
*/
- now = (mtime < r->request_time) ? r->request_time : apr_now();
+ now = (mtime < r->request_time) ? r->request_time : apr_time_now();
return (mtime > now) ? now : mtime;
}
@@ -515,7 +515,7 @@
}
/* XXX: we should define a "time unset" constant */
- mtime = (r->mtime != 0) ? r->mtime : apr_now();
+ mtime = (r->mtime != 0) ? r->mtime : apr_time_now();
/* If an If-Match request-header field was given
* AND the field value is not "*" (meaning match anything)
@@ -863,7 +863,7 @@
}
if (ctx->chunk_size == 0) { /* we just finished the last chunk? */
/* append eos bucket and get out */
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
return APR_SUCCESS;
}
@@ -1002,7 +1002,7 @@
apr_bucket_destroy(old);
}
if (f->c->remain == 0) {
- apr_bucket *eos = apr_bucket_create_eos();
+ apr_bucket *eos = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(b, eos);
}
@@ -1250,7 +1250,7 @@
/* this is a hack to make sure that request time is set,
* it's not perfect, but it's better than nothing
*/
- r->request_time = apr_now();
+ r->request_time = apr_time_now();
return 0;
}
}
@@ -1275,7 +1275,7 @@
ap_bsetflag(conn->client, B_SAFEREAD, 0);
#endif
- r->request_time = apr_now();
+ r->request_time = apr_time_now();
r->the_request = apr_pstrdup(r->pool, l);
r->method = ap_getword_white(r->pool, &ll);
#if 0
@@ -1332,8 +1332,8 @@
int fields_read = 0;
apr_table_t *tmp_headers;
- /* We'll use apr_overlap_tables later to merge these into r->headers_in. */
- tmp_headers = apr_make_table(r->pool, 50);
+ /* We'll use apr_table_overlap later to merge these into r->headers_in. */
+ tmp_headers = apr_table_make(r->pool, 50);
/*
* Read header lines until we get the empty separator line, a read error,
@@ -1388,7 +1388,7 @@
apr_table_addn(tmp_headers, copy, value);
}
- apr_overlap_tables(r->headers_in, tmp_headers, APR_OVERLAP_TABLES_MERGE);
+ apr_table_overlap(r->headers_in, tmp_headers, APR_OVERLAP_TABLES_MERGE);
}
request_rec *ap_read_request(conn_rec *conn)
@@ -1399,7 +1399,7 @@
int access_status;
core_request_config *req_cfg;
- apr_create_pool(&p, conn->pool);
+ apr_pool_create(&p, conn->pool);
r = apr_pcalloc(p, sizeof(request_rec));
r->pool = p;
r->connection = conn;
@@ -1413,11 +1413,11 @@
r->allowed_methods = ap_make_method_list(p, 2);
- r->headers_in = apr_make_table(r->pool, 50);
- r->subprocess_env = apr_make_table(r->pool, 50);
- r->headers_out = apr_make_table(r->pool, 12);
- r->err_headers_out = apr_make_table(r->pool, 5);
- r->notes = apr_make_table(r->pool, 5);
+ r->headers_in = apr_table_make(r->pool, 50);
+ r->subprocess_env = apr_table_make(r->pool, 50);
+ r->headers_out = apr_table_make(r->pool, 12);
+ r->err_headers_out = apr_table_make(r->pool, 5);
+ r->notes = apr_table_make(r->pool, 5);
r->request_config = ap_create_request_config(r->pool);
req_cfg = apr_pcalloc(r->pool, sizeof(core_request_config));
@@ -1573,10 +1573,10 @@
rnew->status = HTTP_OK;
rnew->headers_in = r->headers_in;
- rnew->subprocess_env = apr_copy_table(rnew->pool, r->subprocess_env);
- rnew->headers_out = apr_make_table(rnew->pool, 5);
- rnew->err_headers_out = apr_make_table(rnew->pool, 5);
- rnew->notes = apr_make_table(rnew->pool, 5);
+ rnew->subprocess_env = apr_table_copy(rnew->pool, r->subprocess_env);
+ rnew->headers_out = apr_table_make(rnew->pool, 5);
+ rnew->err_headers_out = apr_table_make(rnew->pool, 5);
+ rnew->notes = apr_table_make(rnew->pool, 5);
rnew->expecting_100 = r->expecting_100;
rnew->read_length = r->read_length;
@@ -1591,7 +1591,7 @@
apr_bucket *b;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
}
@@ -1921,7 +1921,7 @@
ml = (ap_method_list_t *) apr_palloc(p, sizeof(ap_method_list_t));
ml->method_mask = 0;
- ml->method_list = apr_make_array(p, sizeof(char *), nelts);
+ ml->method_list = apr_array_make(p, sizeof(char *), nelts);
return ml;
}
@@ -1939,7 +1939,7 @@
dest->method_mask = src->method_mask;
imethods = (char **) src->method_list->elts;
for (i = 0; i < src->method_list->nelts; ++i) {
- omethods = (char **) apr_push_array(dest->method_list);
+ omethods = (char **) apr_array_push(dest->method_list);
*omethods = apr_pstrdup(dest->method_list->cont, imethods[i]);
}
}
@@ -2030,7 +2030,7 @@
}
}
}
- xmethod = (const char **) apr_push_array(l->method_list);
+ xmethod = (const char **) apr_array_push(l->method_list);
*xmethod = method;
}
@@ -2188,7 +2188,7 @@
r->bytes_sent = 0;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_pool(buff, strlen(buff), r->pool);
+ b = apr_bucket_pool_create(buff, strlen(buff), r->pool);
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
@@ -2240,7 +2240,7 @@
}
}
if (i == values->nelts) { /* if not found */
- *(char **)apr_push_array(values) = start;
+ *(char **)apr_array_push(values) = start;
}
} while (*e != '\0');
@@ -2256,7 +2256,7 @@
{
apr_array_header_t *varies;
- varies = apr_make_array(r->pool, 5, sizeof(char *));
+ varies = apr_array_make(r->pool, 5, sizeof(char *));
/* Extract all Vary fields from the headers_out, separate each into
* its comma-separated fieldname values, and then add them to varies
@@ -2504,7 +2504,7 @@
* later attempts to set or unset a given fieldname might be bypassed.
*/
if (!apr_is_empty_table(r->err_headers_out))
- r->headers_out = apr_overlay_tables(r->pool, r->err_headers_out,
+ r->headers_out = apr_table_overlay(r->pool, r->err_headers_out,
r->headers_out);
/*
@@ -2633,7 +2633,7 @@
r->sent_bodyct = 1; /* Whatever follows is real body stuff... */
b2 = apr_brigade_create(r->pool);
- e = apr_bucket_create_pool(buff_start, strlen(buff_start), r->pool);
+ e = apr_bucket_pool_create(buff_start, strlen(buff_start), r->pool);
APR_BRIGADE_INSERT_HEAD(b2, e);
ap_pass_brigade(f->next, b2);
@@ -2796,9 +2796,9 @@
tmp = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL, " ", status_lines[0],
CRLF CRLF, NULL);
bb = apr_brigade_create(r->pool);
- e = apr_bucket_create_pool(tmp, strlen(tmp), r->pool);
+ e = apr_bucket_pool_create(tmp, strlen(tmp), r->pool);
APR_BRIGADE_INSERT_HEAD(bb, e);
- e = apr_bucket_create_flush();
+ e = apr_bucket_flush_create();
APR_BRIGADE_INSERT_TAIL(bb, e);
ap_pass_brigade(r->connection->output_filters, bb);
@@ -2955,7 +2955,7 @@
apr_status_t rv;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_file(fd, offset, len);
+ b = apr_bucket_file_create(fd, offset, len);
APR_BRIGADE_INSERT_TAIL(bb, b);
rv = ap_pass_brigade(r->output_filters, bb);
@@ -2978,7 +2978,7 @@
apr_bucket *b;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_mmap(mm, offset, length);
+ b = apr_bucket_mmap_create(mm, offset, length);
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
@@ -3006,7 +3006,7 @@
/* whatever is coming down the pipe (we don't care), we
can simply insert our buffered data at the front and
pass the whole bundle down the chain. */
- apr_bucket *b = apr_bucket_create_heap(ctx->buf, nbyte, 0, NULL);
+ apr_bucket *b = apr_bucket_heap_create(ctx->buf, nbyte, 0, NULL);
APR_BRIGADE_INSERT_HEAD(bb, b);
ctx->buf = NULL;
}
@@ -3020,14 +3020,14 @@
{
apr_bucket_brigade *bb = apr_brigade_create(r->pool);
apr_size_t nbyte = ctx->cur - ctx->buf;
- apr_bucket *b = apr_bucket_create_heap(ctx->buf, nbyte, 0, NULL);
+ apr_bucket *b = apr_bucket_heap_create(ctx->buf, nbyte, 0, NULL);
APR_BRIGADE_INSERT_TAIL(bb, b);
ctx->buf = NULL;
/* if there is extra data, then send that, too */
if (extra != NULL) {
- b = apr_bucket_create_transient(extra, extra_len);
+ b = apr_bucket_transient_create(extra, extra_len);
APR_BRIGADE_INSERT_TAIL(bb, b);
}
@@ -3062,7 +3062,7 @@
deliver the content through the normal filter chain */
if (strcmp("OLD_WRITE", r->output_filters->frec->name) != 0) {
apr_bucket_brigade *bb = apr_brigade_create(r->pool);
- apr_bucket *b = apr_bucket_create_transient(str, len);
+ apr_bucket *b = apr_bucket_transient_create(str, len);
APR_BRIGADE_INSERT_TAIL(bb, b);
return ap_pass_brigade(r->output_filters, bb);
@@ -3217,7 +3217,7 @@
apr_bucket *b;
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_flush();
+ b = apr_bucket_flush_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS)
return -1;
@@ -3531,7 +3531,7 @@
*/
r->headers_out = r->err_headers_out;
r->err_headers_out = tmp;
- apr_clear_table(r->err_headers_out);
+ apr_table_clear(r->err_headers_out);
if (ap_is_HTTP_REDIRECT(status) || (status == HTTP_CREATED)) {
if ((location != NULL) && *location) {
1.86 +6 -6 httpd-2.0/modules/http/http_request.c
Index: http_request.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_request.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- http_request.c 2001/01/31 23:10:56 1.85
+++ http_request.c 2001/02/08 07:44:04 1.86
@@ -794,7 +794,7 @@
apr_pool_t *rrp;
request_rec *rr;
- apr_create_pool(&rrp, r->pool);
+ apr_pool_create(&rrp, r->pool);
rr = apr_pcalloc(rrp, sizeof(request_rec));
rr->pool = rrp;
return rr;
@@ -1077,7 +1077,7 @@
AP_DECLARE(void) ap_destroy_sub_req(request_rec *r)
{
/* Reclaim the space */
- apr_destroy_pool(r->pool);
+ apr_pool_destroy(r->pool);
}
/*****************************************************************
@@ -1385,7 +1385,7 @@
/* ### shouldn't this read from the connection input filters? */
if (!r->connection->keepalive ||
ap_get_brigade(r->input_filters, bb, AP_MODE_PEEK) != APR_SUCCESS) {
- apr_bucket *e = apr_bucket_create_flush();
+ apr_bucket *e = apr_bucket_flush_create();
/* We just send directly to the connection based filters. At
* this point, we know that we have seen all of the data
@@ -1417,7 +1417,7 @@
{
apr_array_header_t *env_arr = apr_table_elts(t);
apr_table_entry_t *elts = (apr_table_entry_t *) env_arr->elts;
- apr_table_t *new = apr_make_table(p, env_arr->nalloc);
+ apr_table_t *new = apr_table_make(p, env_arr->nalloc);
int i;
for (i = 0; i < env_arr->nelts; ++i) {
@@ -1478,10 +1478,10 @@
new->main = r->main;
new->headers_in = r->headers_in;
- new->headers_out = apr_make_table(r->pool, 12);
+ new->headers_out = apr_table_make(r->pool, 12);
new->err_headers_out = r->err_headers_out;
new->subprocess_env = rename_original_env(r->pool, r->subprocess_env);
- new->notes = apr_make_table(r->pool, 5);
+ new->notes = apr_table_make(r->pool, 5);
new->allowed_methods = ap_make_method_list(new->pool, 2);
new->htaccess = r->htaccess;
1.35 +23 -23 httpd-2.0/modules/http/mod_mime.c
Index: mod_mime.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/mod_mime.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- mod_mime.c 2001/01/19 07:04:21 1.34
+++ mod_mime.c 2001/02/08 07:44:04 1.35
@@ -138,15 +138,15 @@
mime_dir_config *new =
(mime_dir_config *) apr_palloc(p, sizeof(mime_dir_config));
- new->forced_types = apr_make_table(p, 4);
- new->encoding_types = apr_make_table(p, 4);
- new->charset_types = apr_make_table(p, 4);
- new->language_types = apr_make_table(p, 4);
- new->filter_names = apr_make_table(p, 4);
- new->handlers = apr_make_table(p, 4);
- new->handlers_remove = apr_make_array(p, 4, sizeof(attrib_info));
- new->types_remove = apr_make_array(p, 4, sizeof(attrib_info));
- new->encodings_remove = apr_make_array(p, 4, sizeof(attrib_info));
+ new->forced_types = apr_table_make(p, 4);
+ new->encoding_types = apr_table_make(p, 4);
+ new->charset_types = apr_table_make(p, 4);
+ new->language_types = apr_table_make(p, 4);
+ new->filter_names = apr_table_make(p, 4);
+ new->handlers = apr_table_make(p, 4);
+ new->handlers_remove = apr_array_make(p, 4, sizeof(attrib_info));
+ new->types_remove = apr_array_make(p, 4, sizeof(attrib_info));
+ new->encodings_remove = apr_array_make(p, 4, sizeof(attrib_info));
new->type = NULL;
new->handler = NULL;
@@ -164,17 +164,17 @@
int i;
attrib_info *suffix;
- new->forced_types = apr_overlay_tables(p, add->forced_types,
+ new->forced_types = apr_table_overlay(p, add->forced_types,
base->forced_types);
- new->encoding_types = apr_overlay_tables(p, add->encoding_types,
+ new->encoding_types = apr_table_overlay(p, add->encoding_types,
base->encoding_types);
- new->charset_types = apr_overlay_tables(p, add->charset_types,
+ new->charset_types = apr_table_overlay(p, add->charset_types,
base->charset_types);
- new->language_types = apr_overlay_tables(p, add->language_types,
+ new->language_types = apr_table_overlay(p, add->language_types,
base->language_types);
- new->filter_names = apr_overlay_tables(p, add->filter_names,
+ new->filter_names = apr_table_overlay(p, add->filter_names,
base->filter_names);
- new->handlers = apr_overlay_tables(p, add->handlers,
+ new->handlers = apr_table_overlay(p, add->handlers,
base->handlers);
suffix = (attrib_info *) add->handlers_remove->elts;
@@ -293,7 +293,7 @@
if (*ext == '.') {
++ext;
}
- suffix = (attrib_info *) apr_push_array(mcfg->handlers_remove);
+ suffix = (attrib_info *) apr_array_push(mcfg->handlers_remove);
suffix->name = apr_pstrdup(cmd->pool, ext);
return NULL;
}
@@ -310,7 +310,7 @@
if (*ext == '.') {
++ext;
}
- suffix = (attrib_info *) apr_push_array(mcfg->encodings_remove);
+ suffix = (attrib_info *) apr_array_push(mcfg->encodings_remove);
suffix->name = apr_pstrdup(cmd->pool, ext);
return NULL;
}
@@ -327,7 +327,7 @@
if (*ext == '.') {
++ext;
}
- suffix = (attrib_info *) apr_push_array(mcfg->types_remove);
+ suffix = (attrib_info *) apr_array_push(mcfg->types_remove);
suffix->name = apr_pstrdup(cmd->pool, ext);
return NULL;
}
@@ -407,7 +407,7 @@
}
for (x = 0; x < MIME_HASHSIZE; x++)
- hash_buckets[x] = apr_make_table(p, 10);
+ hash_buckets[x] = apr_table_make(p, 10);
while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) {
const char *ll = l, *ct;
@@ -717,8 +717,8 @@
r->content_language = type; /* back compat. only */
if (!r->content_languages)
- r->content_languages = apr_make_array(r->pool, 2, sizeof(char *));
- new = (const char **) apr_push_array(r->content_languages);
+ r->content_languages = apr_array_make(r->pool, 2, sizeof(char *));
+ new = (const char **) apr_array_push(r->content_languages);
*new = type;
found = 1;
}
@@ -806,8 +806,8 @@
r->content_language = conf->default_language; /* back compat. only */
if (!r->content_languages)
- r->content_languages = apr_make_array(r->pool, 2, sizeof(char *));
- new = (const char **) apr_push_array(r->content_languages);
+ r->content_languages = apr_array_make(r->pool, 2, sizeof(char *));
+ new = (const char **) apr_array_push(r->content_languages);
*new = conf->default_language;
}
1.46 +16 -16 httpd-2.0/modules/loggers/mod_log_config.c
Index: mod_log_config.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/loggers/mod_log_config.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- mod_log_config.c 2001/01/19 07:04:22 1.45
+++ mod_log_config.c 2001/02/08 07:44:05 1.46
@@ -455,7 +455,7 @@
a problem with this, you can set the define. -djg
*/
#ifdef I_INSIST_ON_EXTRA_CYCLES_FOR_CLF_COMPLIANCE
- apr_explode_localtime(&xt, apr_now());
+ apr_explode_localtime(&xt, apr_time_now());
#else
apr_explode_localtime(&xt, r->request_time);
#endif
@@ -486,7 +486,7 @@
static const char *log_request_duration(request_rec *r, char *a)
{
- return apr_psprintf(r->pool, "%ld", (apr_now() - r->request_time)
+ return apr_psprintf(r->pool, "%ld", (apr_time_now() - r->request_time)
/ APR_USEC_PER_SEC);
}
@@ -754,9 +754,9 @@
i = i * 10 + (*s) - '0';
}
if (!it->conditions) {
- it->conditions = apr_make_array(p, 4, sizeof(int));
+ it->conditions = apr_array_make(p, 4, sizeof(int));
}
- *(int *) apr_push_array(it->conditions) = i;
+ *(int *) apr_array_push(it->conditions) = i;
break;
default:
@@ -783,18 +783,18 @@
static apr_array_header_t *parse_log_string(apr_pool_t *p, const char *s, const char **err)
{
- apr_array_header_t *a = apr_make_array(p, 30, sizeof(log_format_item));
+ apr_array_header_t *a = apr_array_make(p, 30, sizeof(log_format_item));
char *res;
while (*s) {
- if ((res = parse_log_item(p, (log_format_item *) apr_push_array(a), &s))) {
+ if ((res = parse_log_item(p, (log_format_item *) apr_array_push(a), &s))) {
*err = res;
return NULL;
}
}
s = APR_EOL_STR;
- parse_log_item(p, (log_format_item *) apr_push_array(a), &s);
+ parse_log_item(p, (log_format_item *) apr_array_push(a), &s);
return a;
}
@@ -838,7 +838,7 @@
static void flush_log(config_log_state *cls)
{
if (cls->outcnt && cls->log_fd != NULL) {
- apr_write(cls->log_fd, cls->outbuf, &cls->outcnt);
+ apr_file_write(cls->log_fd, cls->outbuf, &cls->outcnt);
cls->outcnt = 0;
}
}
@@ -914,7 +914,7 @@
s += strl[i];
}
w = len;
- apr_write(cls->log_fd, str, &w);
+ apr_file_write(cls->log_fd, str, &w);
}
else {
for (i = 0, s = &cls->outbuf[cls->outcnt]; i < format->nelts; ++i) {
@@ -931,7 +931,7 @@
s += strl[i];
}
- apr_write(cls->log_fd, str, &len);
+ apr_file_write(cls->log_fd, str, &len);
#endif
return OK;
@@ -977,11 +977,11 @@
multi_log_state *mls;
mls = (multi_log_state *) apr_palloc(p, sizeof(multi_log_state));
- mls->config_logs = apr_make_array(p, 1, sizeof(config_log_state));
+ mls->config_logs = apr_array_make(p, 1, sizeof(config_log_state));
mls->default_format_string = NULL;
mls->default_format = NULL;
mls->server_config_logs = NULL;
- mls->formats = apr_make_table(p, 4);
+ mls->formats = apr_table_make(p, 4);
apr_table_setn(mls->formats, "CLF", DEFAULT_LOG_FORMAT);
return mls;
@@ -1003,7 +1003,7 @@
add->default_format_string = base->default_format_string;
add->default_format = base->default_format;
}
- add->formats = apr_overlay_tables(p, base->formats, add->formats);
+ add->formats = apr_table_overlay(p, base->formats, add->formats);
return add;
}
@@ -1045,7 +1045,7 @@
&config_log_module);
config_log_state *cls;
- cls = (config_log_state *) apr_push_array(mls->config_logs);
+ cls = (config_log_state *) apr_array_push(mls->config_logs);
cls->condition_var = NULL;
if (envclause != NULL) {
if (strncasecmp(envclause, "env=", 4) != 0) {
@@ -1121,7 +1121,7 @@
}
else {
const char *fname = ap_server_root_relative(p, cls->fname);
- if ((status = apr_open(&cls->log_fd, fname, xfer_flags, xfer_perms, p))
+ if ((status = apr_file_open(&cls->log_fd, fname, xfer_flags, xfer_perms, p))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
"could not open transfer log file %s.", fname);
@@ -1237,7 +1237,7 @@
{
#ifdef BUFFERED_LOGS
/* Now register the last buffer flush with the cleanup engine */
- apr_register_cleanup(p, s, flush_all_logs, flush_all_logs);
+ apr_pool_cleanup_register(p, s, flush_all_logs, flush_all_logs);
#endif
}
1.21 +2 -2 httpd-2.0/modules/mappers/mod_actions.c
Index: mod_actions.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_actions.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- mod_actions.c 2001/01/31 22:45:26 1.20
+++ mod_actions.c 2001/02/08 07:44:05 1.21
@@ -101,7 +101,7 @@
action_dir_config *new =
(action_dir_config *) apr_pcalloc(p, sizeof(action_dir_config));
- new->action_types = apr_make_table(p, 4);
+ new->action_types = apr_table_make(p, 4);
return new;
}
@@ -114,7 +114,7 @@
sizeof(action_dir_config));
int i;
- new->action_types = apr_overlay_tables(p, add->action_types,
+ new->action_types = apr_table_overlay(p, add->action_types,
base->action_types);
for (i = 0; i < METHODS; ++i) {
1.24 +9 -9 httpd-2.0/modules/mappers/mod_alias.c
Index: mod_alias.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_alias.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mod_alias.c 2001/02/07 17:50:07 1.23
+++ mod_alias.c 2001/02/08 07:44:05 1.24
@@ -97,8 +97,8 @@
alias_server_conf *a =
(alias_server_conf *) apr_pcalloc(p, sizeof(alias_server_conf));
- a->aliases = apr_make_array(p, 20, sizeof(alias_entry));
- a->redirects = apr_make_array(p, 20, sizeof(alias_entry));
+ a->aliases = apr_array_make(p, 20, sizeof(alias_entry));
+ a->redirects = apr_array_make(p, 20, sizeof(alias_entry));
return a;
}
@@ -106,7 +106,7 @@
{
alias_dir_conf *a =
(alias_dir_conf *) apr_pcalloc(p, sizeof(alias_dir_conf));
- a->redirects = apr_make_array(p, 2, sizeof(alias_entry));
+ a->redirects = apr_array_make(p, 2, sizeof(alias_entry));
return a;
}
@@ -116,8 +116,8 @@
(alias_server_conf *) apr_pcalloc(p, sizeof(alias_server_conf));
alias_server_conf *base = (alias_server_conf *) basev, *overrides = (alias_server_conf *) overridesv;
- a->aliases = apr_append_arrays(p, overrides->aliases, base->aliases);
- a->redirects = apr_append_arrays(p, overrides->redirects, base->redirects);
+ a->aliases = apr_array_append(p, overrides->aliases, base->aliases);
+ a->redirects = apr_array_append(p, overrides->redirects, base->redirects);
return a;
}
@@ -126,7 +126,7 @@
alias_dir_conf *a =
(alias_dir_conf *) apr_pcalloc(p, sizeof(alias_dir_conf));
alias_dir_conf *base = (alias_dir_conf *) basev, *overrides = (alias_dir_conf *) overridesv;
- a->redirects = apr_append_arrays(p, overrides->redirects, base->redirects);
+ a->redirects = apr_array_append(p, overrides->redirects, base->redirects);
return a;
}
@@ -137,7 +137,7 @@
server_rec *s = cmd->server;
alias_server_conf *conf =
(alias_server_conf *) ap_get_module_config(s->module_config, &alias_module);
- alias_entry *new = apr_push_array(conf->aliases);
+ alias_entry *new = apr_array_push(conf->aliases);
/* XX r can NOT be relative to DocumentRoot here... compat bug. */
@@ -219,9 +219,9 @@
}
if (cmd->path)
- new = apr_push_array(dirconf->redirects);
+ new = apr_array_push(dirconf->redirects);
else
- new = apr_push_array(serverconf->redirects);
+ new = apr_array_push(serverconf->redirects);
new->fake = f;
new->real = url;
1.27 +5 -5 httpd-2.0/modules/mappers/mod_dir.c
Index: mod_dir.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_dir.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- mod_dir.c 2001/01/19 07:04:22 1.26
+++ mod_dir.c 2001/02/08 07:44:05 1.27
@@ -84,9 +84,9 @@
dir_config_rec *d = dummy;
if (!d->index_names) {
- d->index_names = apr_make_array(cmd->pool, 2, sizeof(char *));
+ d->index_names = apr_array_make(cmd->pool, 2, sizeof(char *));
}
- *(const char **)apr_push_array(d->index_names) = arg;
+ *(const char **)apr_array_push(d->index_names) = arg;
return NULL;
}
@@ -187,10 +187,10 @@
apr_pool_join(r->pool, rr->pool);
error_notfound = rr->status;
- r->notes = apr_overlay_tables(r->pool, r->notes, rr->notes);
- r->headers_out = apr_overlay_tables(r->pool, r->headers_out,
+ r->notes = apr_table_overlay(r->pool, r->notes, rr->notes);
+ r->headers_out = apr_table_overlay(r->pool, r->headers_out,
rr->headers_out);
- r->err_headers_out = apr_overlay_tables(r->pool, r->err_headers_out,
+ r->err_headers_out = apr_table_overlay(r->pool, r->err_headers_out,
rr->err_headers_out);
return error_notfound;
}
1.53 +66 -66 httpd-2.0/modules/mappers/mod_negotiation.c
Index: mod_negotiation.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_negotiation.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- mod_negotiation.c 2001/01/31 22:45:27 1.52
+++ mod_negotiation.c 2001/02/08 07:44:05 1.53
@@ -102,7 +102,7 @@
{
neg_dir_config *new = (neg_dir_config *) apr_palloc(p, sizeof(neg_dir_config));
- new->language_priority = apr_make_array(p, 4, sizeof(char *));
+ new->language_priority = apr_array_make(p, 4, sizeof(char *));
return new;
}
@@ -113,7 +113,7 @@
neg_dir_config *new = (neg_dir_config *) apr_palloc(p, sizeof(neg_dir_config));
/* give priority to the config in the subdirectory */
- new->language_priority = apr_append_arrays(p, add->language_priority,
+ new->language_priority = apr_array_append(p, add->language_priority,
base->language_priority);
return new;
}
@@ -122,7 +122,7 @@
const char *lang)
{
apr_array_header_t *arr = ((neg_dir_config *) n)->language_priority;
- const char **langp = (const char **) apr_push_array(arr);
+ const char **langp = (const char **) apr_array_push(arr);
*langp = lang;
return NULL;
@@ -444,10 +444,10 @@
return NULL;
}
- accept_recs = apr_make_array(p, 40, sizeof(accept_rec));
+ accept_recs = apr_array_make(p, 40, sizeof(accept_rec));
while (*accept_line) {
- accept_rec *new = (accept_rec *) apr_push_array(accept_recs);
+ accept_rec *new = (accept_rec *) apr_array_push(accept_recs);
accept_line = get_entry(p, new, accept_line);
}
@@ -460,14 +460,14 @@
static apr_array_header_t *do_languages_line(apr_pool_t *p, const char **lang_line)
{
- apr_array_header_t *lang_recs = apr_make_array(p, 2, sizeof(char *));
+ apr_array_header_t *lang_recs = apr_array_make(p, 2, sizeof(char *));
if (!lang_line) {
return lang_recs;
}
while (**lang_line) {
- char **new = (char **) apr_push_array(lang_recs);
+ char **new = (char **) apr_array_push(lang_recs);
*new = ap_get_token(p, lang_line, 0);
ap_str_tolower(*new);
if (**lang_line == ',' || **lang_line == ';') {
@@ -515,7 +515,7 @@
new->accept_charsets =
do_header_line(r->pool, apr_table_get(hdrs, "Accept-Charset"));
- new->avail_vars = apr_make_array(r->pool, 40, sizeof(var_rec));
+ new->avail_vars = apr_array_make(r->pool, 40, sizeof(var_rec));
return new;
}
@@ -620,16 +620,16 @@
accept_rec *new_accept;
if (!neg->accepts) {
- neg->accepts = apr_make_array(neg->pool, 4, sizeof(accept_rec));
+ neg->accepts = apr_array_make(neg->pool, 4, sizeof(accept_rec));
- new_accept = (accept_rec *) apr_push_array(neg->accepts);
+ new_accept = (accept_rec *) apr_array_push(neg->accepts);
new_accept->name = "*/*";
new_accept->quality = 1.0f;
new_accept->level = 0.0f;
}
- new_accept = (accept_rec *) apr_push_array(neg->accepts);
+ new_accept = (accept_rec *) apr_array_push(neg->accepts);
new_accept->name = CGI_MAGIC_TYPE;
if (neg->use_rvsa) {
@@ -664,7 +664,7 @@
/* Get a noncommented line */
do {
- if (apr_fgets(buffer, MAX_STRING_LEN, map) != APR_SUCCESS) {
+ if (apr_file_gets(buffer, MAX_STRING_LEN, map) != APR_SUCCESS) {
return header_eof;
}
} while (buffer[0] == '#');
@@ -685,10 +685,10 @@
cp += strlen(cp);
- while (apr_getc(&c, map) != APR_EOF) {
+ while (apr_file_getc(&c, map) != APR_EOF) {
if (c == '#') {
/* Comment line */
- while (apr_getc(&c, map) != EOF && c != '\n') {
+ while (apr_file_getc(&c, map) != EOF && c != '\n') {
continue;
}
}
@@ -699,11 +699,11 @@
*/
while (c != '\n' && apr_isspace(c)) {
- if(apr_getc(&c, map) != APR_SUCCESS)
+ if(apr_file_getc(&c, map) != APR_SUCCESS)
break;
}
- apr_ungetc(c, map);
+ apr_file_ungetc(c, map);
if (c == '\n') {
return header_seen; /* Blank line */
@@ -711,7 +711,7 @@
/* Continuation */
- while (cp < buf_end - 2 && (apr_getc(&c, map)) != EOF && c != '\n') {
+ while (cp < buf_end - 2 && (apr_file_getc(&c, map)) != EOF && c != '\n') {
*cp++ = c;
}
@@ -722,7 +722,7 @@
/* Line beginning with something other than whitespace */
- apr_ungetc(c, map);
+ apr_file_ungetc(c, map);
return header_seen;
}
}
@@ -803,7 +803,7 @@
/* We are not using multiviews */
neg->count_multiviews_variants = 0;
- if ((status = apr_open(&map, rr->filename, APR_READ,
+ if ((status = apr_file_open(&map, rr->filename, APR_READ,
APR_OS_DEFAULT, neg->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
"cannot access type map file: %s", rr->filename);
@@ -863,7 +863,7 @@
}
else {
if (*mime_info.file_name && has_content) {
- void *new_var = apr_push_array(neg->avail_vars);
+ void *new_var = apr_array_push(neg->avail_vars);
memcpy(new_var, (void *) &mime_info, sizeof(var_rec));
}
@@ -873,7 +873,7 @@
}
} while (hstate != header_eof);
- apr_close(map);
+ apr_file_close(map);
set_vlist_validator(r, rr);
@@ -999,7 +999,7 @@
get_entry(neg->pool, &accept_info, sub_req->content_type);
set_mime_fields(&mime_info, &accept_info);
- new_var = apr_push_array(neg->avail_vars);
+ new_var = apr_array_push(neg->avail_vars);
memcpy(new_var, (void *) &mime_info, sizeof(var_rec));
neg->count_multiviews_variants++;
@@ -2080,7 +2080,7 @@
* need to change the calculation of max_vlist_array above.
*/
if (neg->send_alternates && neg->avail_vars->nelts)
- arr = apr_make_array(r->pool, max_vlist_array, sizeof(char *));
+ arr = apr_array_make(r->pool, max_vlist_array, sizeof(char *));
else
arr = NULL;
@@ -2138,9 +2138,9 @@
/* Generate the string components for this Alternates entry */
- *((const char **) apr_push_array(arr)) = "{\"";
- *((const char **) apr_push_array(arr)) = variant->file_name;
- *((const char **) apr_push_array(arr)) = "\" ";
+ *((const char **) apr_array_push(arr)) = "{\"";
+ *((const char **) apr_array_push(arr)) = variant->file_name;
+ *((const char **) apr_array_push(arr)) = "\" ";
qstr = (char *) apr_palloc(r->pool, 6);
apr_snprintf(qstr, 6, "%1.3f", variant->source_quality);
@@ -2155,29 +2155,29 @@
}
}
}
- *((const char **) apr_push_array(arr)) = qstr;
+ *((const char **) apr_array_push(arr)) = qstr;
if (variant->mime_type && *variant->mime_type) {
- *((const char **) apr_push_array(arr)) = " {type ";
- *((const char **) apr_push_array(arr)) = variant->mime_type;
- *((const char **) apr_push_array(arr)) = "}";
+ *((const char **) apr_array_push(arr)) = " {type ";
+ *((const char **) apr_array_push(arr)) = variant->mime_type;
+ *((const char **) apr_array_push(arr)) = "}";
}
if (variant->content_charset && *variant->content_charset) {
- *((const char **) apr_push_array(arr)) = " {charset ";
- *((const char **) apr_push_array(arr)) = variant->content_charset;
- *((const char **) apr_push_array(arr)) = "}";
+ *((const char **) apr_array_push(arr)) = " {charset ";
+ *((const char **) apr_array_push(arr)) = variant->content_charset;
+ *((const char **) apr_array_push(arr)) = "}";
}
if (lang) {
- *((const char **) apr_push_array(arr)) = " {language ";
- *((const char **) apr_push_array(arr)) = lang;
- *((const char **) apr_push_array(arr)) = "}";
+ *((const char **) apr_array_push(arr)) = " {language ";
+ *((const char **) apr_array_push(arr)) = lang;
+ *((const char **) apr_array_push(arr)) = "}";
}
if (variant->content_encoding && *variant->content_encoding) {
/* Strictly speaking, this is non-standard, but so is TCN */
- *((const char **) apr_push_array(arr)) = " {encoding ";
- *((const char **) apr_push_array(arr)) = variant->content_encoding;
- *((const char **) apr_push_array(arr)) = "}";
+ *((const char **) apr_array_push(arr)) = " {encoding ";
+ *((const char **) apr_array_push(arr)) = variant->content_encoding;
+ *((const char **) apr_array_push(arr)) = "}";
}
/* Note that the Alternates specification (in rfc2295) does
@@ -2200,13 +2200,13 @@
lenstr = (char *) apr_palloc(r->pool, 22);
apr_snprintf(lenstr, 22, "%ld", len);
- *((const char **) apr_push_array(arr)) = " {length ";
- *((const char **) apr_push_array(arr)) = lenstr;
- *((const char **) apr_push_array(arr)) = "}";
+ *((const char **) apr_array_push(arr)) = " {length ";
+ *((const char **) apr_array_push(arr)) = lenstr;
+ *((const char **) apr_array_push(arr)) = "}";
}
- *((const char **) apr_push_array(arr)) = "}";
- *((const char **) apr_push_array(arr)) = ", "; /* trimmed below */
+ *((const char **) apr_array_push(arr)) = "}";
+ *((const char **) apr_array_push(arr)) = ", "; /* trimmed below */
}
if (neg->send_alternates && neg->avail_vars->nelts) {
@@ -2248,9 +2248,9 @@
* we preallocate a apr_table_t with the maximum substrings possible,
* fill it with the variant list, and then concatenate the entire array.
*/
- arr = apr_make_array(r->pool, max_vlist_array, sizeof(char *));
+ arr = apr_array_make(r->pool, max_vlist_array, sizeof(char *));
- *((const char **) apr_push_array(arr)) = "Available variants:\n<ul>\n";
+ *((const char **) apr_array_push(arr)) = "Available variants:\n<ul>\n";
for (i = 0; i < neg->avail_vars->nelts; ++i) {
var_rec *variant = &((var_rec *) neg->avail_vars->elts)[i];
@@ -2263,33 +2263,33 @@
* Note that if you change the number of substrings pushed, you also
* need to change the calculation of max_vlist_array above.
*/
- *((const char **) apr_push_array(arr)) = "<li><a href=\"";
- *((const char **) apr_push_array(arr)) = filename;
- *((const char **) apr_push_array(arr)) = "\">";
- *((const char **) apr_push_array(arr)) = filename;
- *((const char **) apr_push_array(arr)) = "</a> ";
- *((const char **) apr_push_array(arr)) = description;
+ *((const char **) apr_array_push(arr)) = "<li><a href=\"";
+ *((const char **) apr_array_push(arr)) = filename;
+ *((const char **) apr_array_push(arr)) = "\">";
+ *((const char **) apr_array_push(arr)) = filename;
+ *((const char **) apr_array_push(arr)) = "</a> ";
+ *((const char **) apr_array_push(arr)) = description;
if (variant->mime_type && *variant->mime_type) {
- *((const char **) apr_push_array(arr)) = ", type ";
- *((const char **) apr_push_array(arr)) = variant->mime_type;
+ *((const char **) apr_array_push(arr)) = ", type ";
+ *((const char **) apr_array_push(arr)) = variant->mime_type;
}
if (languages && languages->nelts) {
- *((const char **) apr_push_array(arr)) = ", language ";
- *((const char **) apr_push_array(arr)) = apr_array_pstrcat(r->pool,
+ *((const char **) apr_array_push(arr)) = ", language ";
+ *((const char **) apr_array_push(arr)) = apr_array_pstrcat(r->pool,
languages, ',');
}
if (variant->content_charset && *variant->content_charset) {
- *((const char **) apr_push_array(arr)) = ", charset ";
- *((const char **) apr_push_array(arr)) = variant->content_charset;
+ *((const char **) apr_array_push(arr)) = ", charset ";
+ *((const char **) apr_array_push(arr)) = variant->content_charset;
}
if (variant->content_encoding) {
- *((const char **) apr_push_array(arr)) = ", encoding ";
- *((const char **) apr_push_array(arr)) = variant->content_encoding;
+ *((const char **) apr_array_push(arr)) = ", encoding ";
+ *((const char **) apr_array_push(arr)) = variant->content_encoding;
}
- *((const char **) apr_push_array(arr)) = "\n";
+ *((const char **) apr_array_push(arr)) = "\n";
}
- *((const char **) apr_push_array(arr)) = "</ul>\n";
+ *((const char **) apr_array_push(arr)) = "</ul>\n";
return apr_array_pstrcat(r->pool, arr, '\0');
}
@@ -2668,12 +2668,12 @@
r->finfo = sub_req->finfo;
r->per_dir_config = sub_req->per_dir_config;
/* copy output headers from subrequest, but leave negotiation headers */
- r->notes = apr_overlay_tables(r->pool, sub_req->notes, r->notes);
- r->headers_out = apr_overlay_tables(r->pool, sub_req->headers_out,
+ r->notes = apr_table_overlay(r->pool, sub_req->notes, r->notes);
+ r->headers_out = apr_table_overlay(r->pool, sub_req->headers_out,
r->headers_out);
- r->err_headers_out = apr_overlay_tables(r->pool, sub_req->err_headers_out,
+ r->err_headers_out = apr_table_overlay(r->pool, sub_req->err_headers_out,
r->err_headers_out);
- r->subprocess_env = apr_overlay_tables(r->pool, sub_req->subprocess_env,
+ r->subprocess_env = apr_table_overlay(r->pool, sub_req->subprocess_env,
r->subprocess_env);
avail_recs = (var_rec *) neg->avail_vars->elts;
for (j = 0; j < neg->avail_vars->nelts; ++j) {
1.67 +60 -60 httpd-2.0/modules/mappers/mod_rewrite.c
Index: mod_rewrite.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- mod_rewrite.c 2001/02/01 10:03:42 1.66
+++ mod_rewrite.c 2001/02/08 07:44:05 1.67
@@ -188,7 +188,7 @@
static int proxy_available;
static const char *lockname;
-static apr_lock_t *rewrite_mapr_lock = NULL;
+static apr_lock_t *rewrite_mapr_lock_aquire = NULL;
static apr_lock_t *rewrite_log_lock = NULL;
/*
@@ -216,9 +216,9 @@
a->rewritelogfile = NULL;
a->rewritelogfp = NULL;
a->rewriteloglevel = 0;
- a->rewritemaps = apr_make_array(p, 2, sizeof(rewritemap_entry));
- a->rewriteconds = apr_make_array(p, 2, sizeof(rewritecond_entry));
- a->rewriterules = apr_make_array(p, 2, sizeof(rewriterule_entry));
+ a->rewritemaps = apr_array_make(p, 2, sizeof(rewritemap_entry));
+ a->rewriteconds = apr_array_make(p, 2, sizeof(rewritecond_entry));
+ a->rewriterules = apr_array_make(p, 2, sizeof(rewriterule_entry));
a->server = s;
return (void *)a;
@@ -250,11 +250,11 @@
a->rewritelogfp = overrides->rewritelogfp != NULL
? overrides->rewritelogfp
: base->rewritelogfp;
- a->rewritemaps = apr_append_arrays(p, overrides->rewritemaps,
+ a->rewritemaps = apr_array_append(p, overrides->rewritemaps,
base->rewritemaps);
- a->rewriteconds = apr_append_arrays(p, overrides->rewriteconds,
+ a->rewriteconds = apr_array_append(p, overrides->rewriteconds,
base->rewriteconds);
- a->rewriterules = apr_append_arrays(p, overrides->rewriterules,
+ a->rewriterules = apr_array_append(p, overrides->rewriterules,
base->rewriterules);
}
else {
@@ -289,8 +289,8 @@
a->state = ENGINE_DISABLED;
a->options = OPTION_NONE;
a->baseurl = NULL;
- a->rewriteconds = apr_make_array(p, 2, sizeof(rewritecond_entry));
- a->rewriterules = apr_make_array(p, 2, sizeof(rewriterule_entry));
+ a->rewriteconds = apr_array_make(p, 2, sizeof(rewritecond_entry));
+ a->rewriterules = apr_array_make(p, 2, sizeof(rewriterule_entry));
if (path == NULL) {
a->directory = NULL;
@@ -323,9 +323,9 @@
a->baseurl = overrides->baseurl;
if (a->options & OPTION_INHERIT) {
- a->rewriteconds = apr_append_arrays(p, overrides->rewriteconds,
+ a->rewriteconds = apr_array_append(p, overrides->rewriteconds,
base->rewriteconds);
- a->rewriterules = apr_append_arrays(p, overrides->rewriterules,
+ a->rewriterules = apr_array_append(p, overrides->rewriterules,
base->rewriterules);
}
else {
@@ -432,7 +432,7 @@
sconf = (rewrite_server_conf *)
ap_get_module_config(cmd->server->module_config, &rewrite_module);
- newmap = apr_push_array(sconf->rewritemaps);
+ newmap = apr_array_push(sconf->rewritemaps);
newmap->name = a1;
newmap->func = NULL;
@@ -553,10 +553,10 @@
/* make a new entry in the internal temporary rewrite rule list */
if (cmd->path == NULL) { /* is server command */
- newcond = apr_push_array(sconf->rewriteconds);
+ newcond = apr_array_push(sconf->rewriteconds);
}
else { /* is per-directory command */
- newcond = apr_push_array(dconf->rewriteconds);
+ newcond = apr_array_push(dconf->rewriteconds);
}
/* parse the argument line ourself */
@@ -698,10 +698,10 @@
/* make a new entry in the internal rewrite rule list */
if (cmd->path == NULL) { /* is server command */
- newrule = apr_push_array(sconf->rewriterules);
+ newrule = apr_array_push(sconf->rewriterules);
}
else { /* is per-directory command */
- newrule = apr_push_array(dconf->rewriterules);
+ newrule = apr_array_push(dconf->rewriterules);
}
/* parse the argument line ourself */
@@ -757,12 +757,12 @@
*/
if (cmd->path == NULL) { /* is server command */
newrule->rewriteconds = sconf->rewriteconds;
- sconf->rewriteconds = apr_make_array(cmd->pool, 2,
+ sconf->rewriteconds = apr_array_make(cmd->pool, 2,
sizeof(rewritecond_entry));
}
else { /* is per-directory command */
newrule->rewriteconds = dconf->rewriteconds;
- dconf->rewriteconds = apr_make_array(cmd->pool, 2,
+ dconf->rewriteconds = apr_array_make(cmd->pool, 2,
sizeof(rewritecond_entry));
}
@@ -936,18 +936,18 @@
int first_time = 0;
const char *userdata_key = "rewrite_init_module";
- apr_get_userdata(&data, userdata_key, s->process->pool);
+ apr_pool_userdata_get(&data, userdata_key, s->process->pool);
if (!data) {
first_time = 1;
- apr_set_userdata((const void *)1, userdata_key,
- apr_null_cleanup, s->process->pool);
+ apr_pool_userdata_set((const void *)1, userdata_key,
+ apr_pool_cleanup_null, s->process->pool);
}
/* check if proxy module is available */
proxy_available = (ap_find_linked_module("mod_proxy.c") != NULL);
/* create the rewriting lockfiles in the parent */
- if ((rv = apr_create_lock (&rewrite_log_lock, APR_MUTEX, APR_LOCKALL,
+ if ((rv = apr_lock_create (&rewrite_log_lock, APR_MUTEX, APR_LOCKALL,
NULL, p)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
"mod_rewrite: could not create rewrite_log_lock");
@@ -955,7 +955,7 @@
}
rewritelock_create(s, p);
- apr_register_cleanup(p, (void *)s, rewritelock_remove, apr_null_cleanup);
+ apr_pool_cleanup_register(p, (void *)s, rewritelock_remove, apr_pool_cleanup_null);
/* step through the servers and
* - open each rewriting logfile
@@ -982,10 +982,10 @@
if (lockname != NULL && *(lockname) != '\0')
{
- rv = apr_child_init_lock (&rewrite_mapr_lock, lockname, p);
+ rv = apr_lock_child_init (&rewrite_mapr_lock_aquire, lockname, p);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
- "mod_rewrite: could not init rewrite_mapr_lock "
+ "mod_rewrite: could not init rewrite_mapr_lock_aquire "
"in child");
}
}
@@ -2816,12 +2816,12 @@
char *curkey;
char *curval;
- rc = apr_open(&fp, file, APR_READ, APR_OS_DEFAULT, r->pool);
+ rc = apr_file_open(&fp, file, APR_READ, APR_OS_DEFAULT, r->pool);
if (rc != APR_SUCCESS) {
return NULL;
}
- while (apr_fgets(line, sizeof(line), fp) == APR_SUCCESS) {
+ while (apr_file_gets(line, sizeof(line), fp) == APR_SUCCESS) {
if (line[0] == '#')
continue; /* ignore comments */
cpT = line;
@@ -2847,7 +2847,7 @@
value = apr_pstrdup(r->pool, curval);
break;
}
- apr_close(fp);
+ apr_file_close(fp);
return value;
}
@@ -2901,16 +2901,16 @@
/* take the lock */
- if (rewrite_mapr_lock) {
- apr_lock(rewrite_mapr_lock);
+ if (rewrite_mapr_lock_aquire) {
+ apr_lock_aquire(rewrite_mapr_lock_aquire);
}
/* write out the request key */
#ifdef NO_WRITEV
nbytes = strlen(key);
- apr_write(fpin, key, &nbytes);
+ apr_file_write(fpin, key, &nbytes);
nbytes = 1;
- apr_write(fpin, "\n", &nbytes);
+ apr_file_write(fpin, "\n", &nbytes);
#else
iova[0].iov_base = key;
iova[0].iov_len = strlen(key);
@@ -2918,26 +2918,26 @@
iova[1].iov_len = 1;
niov = 2;
- apr_writev(fpin, iova, niov, &nbytes);
+ apr_file_writev(fpin, iova, niov, &nbytes);
#endif
/* read in the response value */
i = 0;
nbytes = 1;
- apr_read(fpout, &c, &nbytes);
+ apr_file_read(fpout, &c, &nbytes);
while (nbytes == 1 && (i < LONG_STRING_LEN-1)) {
if (c == '\n') {
break;
}
buf[i++] = c;
- apr_read(fpout, &c, &nbytes);
+ apr_file_read(fpout, &c, &nbytes);
}
buf[i] = '\0';
/* give the lock back */
- if (rewrite_mapr_lock) {
- apr_unlock(rewrite_mapr_lock);
+ if (rewrite_mapr_lock_aquire) {
+ apr_lock_release(rewrite_mapr_lock_aquire);
}
if (strcasecmp(buf, "NULL") == 0) {
@@ -3098,7 +3098,7 @@
conf->rewritelogfp = ap_piped_log_write_fd(pl);
}
else if (*conf->rewritelogfile != '\0') {
- rc = apr_open(&conf->rewritelogfp, fname, rewritelog_flags, rewritelog_mode, p);
+ rc = apr_file_open(&conf->rewritelogfp, fname, rewritelog_flags, rewritelog_mode, p);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rc, s,
"mod_rewrite: could not open RewriteLog "
@@ -3188,10 +3188,10 @@
(unsigned long)(r->server), (unsigned long)r,
type, redir, level, str2);
- apr_lock(rewrite_log_lock);
+ apr_lock_aquire(rewrite_log_lock);
nbytes = strlen(str3);
- apr_write(conf->rewritelogfp, str3, &nbytes);
- apr_unlock(rewrite_log_lock);
+ apr_file_write(conf->rewritelogfp, str3, &nbytes);
+ apr_lock_release(rewrite_log_lock);
va_end(ap);
return;
@@ -3203,7 +3203,7 @@
char tstr[80];
apr_size_t len;
- apr_explode_localtime(&t, apr_now());
+ apr_explode_localtime(&t, apr_time_now());
apr_strftime(tstr, &len, 80, "[%d/%b/%Y:%H:%M:%S ", &t);
apr_snprintf(tstr + strlen(tstr), 80-strlen(tstr), "%c%.2d%.2d]",
@@ -3238,7 +3238,7 @@
lockname = ap_server_root_relative(p, lockname);
/* create the lockfile */
- rc = apr_create_lock (&rewrite_mapr_lock, APR_MUTEX, APR_LOCKALL, lockname, p);
+ rc = apr_lock_create (&rewrite_mapr_lock_aquire, APR_MUTEX, APR_LOCKALL, lockname, p);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rc, s,
"mod_rewrite: Parent could not create RewriteLock "
@@ -3257,8 +3257,8 @@
}
/* destroy the rewritelock */
- apr_destroy_lock (rewrite_mapr_lock);
- rewrite_mapr_lock = NULL;
+ apr_lock_destroy (rewrite_mapr_lock_aquire);
+ rewrite_mapr_lock_aquire = NULL;
lockname = NULL;
return(0);
}
@@ -3337,22 +3337,22 @@
#endif
- if (((rc = apr_createprocattr_init(&procattr, p)) != APR_SUCCESS) ||
- ((rc = apr_setprocattr_io(procattr, APR_FULL_BLOCK,
+ if (((rc = apr_procattr_create(&procattr, p)) != APR_SUCCESS) ||
+ ((rc = apr_procattr_io_set(procattr, APR_FULL_BLOCK,
APR_FULL_NONBLOCK,
APR_FULL_NONBLOCK)) != APR_SUCCESS) ||
- ((rc = apr_setprocattr_dir(procattr,
+ ((rc = apr_procattr_dir_set(procattr,
ap_make_dirstr_parent(p, progname)))
!= APR_SUCCESS) ||
- ((rc = apr_setprocattr_cmdtype(procattr, APR_PROGRAM)) != APR_SUCCESS)) {
+ ((rc = apr_procattr_cmdtype_set(procattr, APR_PROGRAM)) != APR_SUCCESS)) {
/* Something bad happened, give up and go away. */
}
else {
procnew = apr_pcalloc(p, sizeof(*procnew));
- rc = apr_create_process(procnew, progname, NULL, NULL, procattr, p);
+ rc = apr_proc_create(procnew, progname, NULL, NULL, procattr, p);
if (rc == APR_SUCCESS) {
- apr_note_subprocess(p, procnew, kill_after_timeout);
+ apr_pool_note_subprocess(p, procnew, kill_after_timeout);
if (fpin) {
(*fpin) = procnew->in;
@@ -3493,12 +3493,12 @@
/* XXX: wow this has gotta be slow if you actually use it for a lot, recalculates exploded time for each variable */
/* underlaying Unix system stuff */
else if (strcasecmp(var, "TIME_YEAR") == 0) {
- apr_explode_localtime(&tm, apr_now());
+ apr_explode_localtime(&tm, apr_time_now());
apr_snprintf(resultbuf, sizeof(resultbuf), "%04d", tm.tm_year + 1900);
result = resultbuf;
}
#define MKTIMESTR(format, tmfield) \
- apr_explode_localtime(&tm, apr_now()); \
+ apr_explode_localtime(&tm, apr_time_now()); \
apr_snprintf(resultbuf, sizeof(resultbuf), format, tm.tmfield); \
result = resultbuf;
else if (strcasecmp(var, "TIME_MON") == 0) {
@@ -3520,7 +3520,7 @@
MKTIMESTR("%d", tm_wday)
}
else if (strcasecmp(var, "TIME") == 0) {
- apr_explode_localtime(&tm, apr_now());
+ apr_explode_localtime(&tm, apr_time_now());
apr_snprintf(resultbuf, sizeof(resultbuf),
"%04d%02d%02d%02d%02d%02d", tm.tm_year + 1900,
tm.tm_mon+1, tm.tm_mday,
@@ -3636,9 +3636,9 @@
cache *c;
c = (cache *)apr_palloc(p, sizeof(cache));
- if (apr_create_pool(&c->pool, p) != APR_SUCCESS)
+ if (apr_pool_create(&c->pool, p) != APR_SUCCESS)
return NULL;
- c->lists = apr_make_array(c->pool, 2, sizeof(cachelist));
+ c->lists = apr_array_make(c->pool, 2, sizeof(cachelist));
return c;
}
@@ -3759,10 +3759,10 @@
/* create a needed new list */
if (!found_list) {
- l = apr_push_array(c->lists);
+ l = apr_array_push(c->lists);
l->resource = apr_pstrdup(c->pool, res);
- l->entries = apr_make_array(c->pool, 2, sizeof(cacheentry));
- l->tlb = apr_make_array(c->pool, CACHE_TLB_ROWS,
+ l->entries = apr_array_make(c->pool, 2, sizeof(cacheentry));
+ l->tlb = apr_array_make(c->pool, CACHE_TLB_ROWS,
sizeof(cachetlbentry));
for (i=0; i<CACHE_TLB_ROWS; ++i) {
t = &((cachetlbentry *)l->tlb->elts)[i];
@@ -3775,7 +3775,7 @@
for (i = 0; i < c->lists->nelts; i++) {
l = &(((cachelist *)c->lists->elts)[i]);
if (strcmp(l->resource, res) == 0) {
- e = apr_push_array(l->entries);
+ e = apr_array_push(l->entries);
e->time = ce->time;
e->key = apr_pstrdup(c->pool, ce->key);
e->value = apr_pstrdup(c->pool, ce->value);
1.37 +3 -3 httpd-2.0/modules/mappers/mod_so.c
Index: mod_so.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_so.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- mod_so.c 2001/01/24 08:26:19 1.36
+++ mod_so.c 2001/02/08 07:44:06 1.37
@@ -159,7 +159,7 @@
so_server_conf *soc;
soc = (so_server_conf *)apr_pcalloc(p, sizeof(so_server_conf));
- soc->loaded_modules = apr_make_array(p, DYNAMIC_MODULE_LIMIT,
+ soc->loaded_modules = apr_array_make(p, DYNAMIC_MODULE_LIMIT,
sizeof(moduleinfo));
return (void *)soc;
@@ -225,7 +225,7 @@
if (modi->name != NULL && strcmp(modi->name, modname) == 0)
return NULL;
}
- modi = apr_push_array(sconf->loaded_modules);
+ modi = apr_array_push(sconf->loaded_modules);
modi->name = modname;
/*
@@ -279,7 +279,7 @@
* we do a restart (or shutdown) this cleanup will cause the
* shared object to be unloaded.
*/
- apr_register_cleanup(cmd->pool, modi, unload_module, apr_null_cleanup);
+ apr_pool_cleanup_register(cmd->pool, modi, unload_module, apr_pool_cleanup_null);
/*
* Finally we need to run the configuration process for the module
1.29 +29 -29 httpd-2.0/modules/mappers/mod_speling.c
Index: mod_speling.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_speling.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- mod_speling.c 2001/01/31 22:45:27 1.28
+++ mod_speling.c 2001/02/08 07:44:06 1.29
@@ -303,7 +303,7 @@
return DECLINED;
}
- candidates = apr_make_array(r->pool, 2, sizeof(misspelled_file));
+ candidates = apr_array_make(r->pool, 2, sizeof(misspelled_file));
dotloc = ap_ind(bad, '.');
if (dotloc == -1) {
@@ -330,7 +330,7 @@
else if (strcasecmp(bad, dirent.name) == 0) {
misspelled_file *sp_new;
- sp_new = (misspelled_file *) apr_push_array(candidates);
+ sp_new = (misspelled_file *) apr_array_push(candidates);
sp_new->name = apr_pstrdup(r->pool, dirent.name);
sp_new->quality = SP_MISCAPITALIZED;
}
@@ -342,7 +342,7 @@
else if ((q = spdist(bad, dirent.name)) != SP_VERYDIFFERENT) {
misspelled_file *sp_new;
- sp_new = (misspelled_file *) apr_push_array(candidates);
+ sp_new = (misspelled_file *) apr_array_push(candidates);
sp_new->name = apr_pstrdup(r->pool, dirent.name);
sp_new->quality = q;
}
@@ -388,7 +388,7 @@
&& !strncasecmp(bad, dirent.name, dotloc)) {
misspelled_file *sp_new;
- sp_new = (misspelled_file *) apr_push_array(candidates);
+ sp_new = (misspelled_file *) apr_array_push(candidates);
sp_new->name = apr_pstrdup(r->pool, dirent.name);
sp_new->quality = SP_VERYDIFFERENT;
}
@@ -458,20 +458,20 @@
notes = r->main->notes;
}
- if (apr_create_pool(&sub_pool, p) != APR_SUCCESS)
+ if (apr_pool_create(&sub_pool, p) != APR_SUCCESS)
return DECLINED;
- t = apr_make_array(sub_pool, candidates->nelts * 8 + 8,
+ t = apr_array_make(sub_pool, candidates->nelts * 8 + 8,
sizeof(char *));
- v = apr_make_array(sub_pool, candidates->nelts * 5,
+ v = apr_array_make(sub_pool, candidates->nelts * 5,
sizeof(char *));
/* Generate the response text. */
- *(const char **)apr_push_array(t) =
+ *(const char **)apr_array_push(t) =
"The document name you requested (<code>";
- *(const char **)apr_push_array(t) = ap_escape_html(sub_pool, r->uri);
- *(const char **)apr_push_array(t) =
+ *(const char **)apr_array_push(t) = ap_escape_html(sub_pool, r->uri);
+ *(const char **)apr_array_push(t) =
"</code>) could not be found on this server.\n"
"However, we found documents with names similar "
"to the one you requested.<p>"
@@ -488,19 +488,19 @@
(r->parsed_uri.query != NULL)
? r->parsed_uri.query : "",
NULL);
- *(const char **)apr_push_array(v) = "\"";
- *(const char **)apr_push_array(v) = ap_escape_uri(sub_pool, vuri);
- *(const char **)apr_push_array(v) = "\";\"";
- *(const char **)apr_push_array(v) = reason;
- *(const char **)apr_push_array(v) = "\"";
-
- *(const char **)apr_push_array(t) = "<li><a href=\"";
- *(const char **)apr_push_array(t) = ap_escape_uri(sub_pool, vuri);
- *(const char **)apr_push_array(t) = "\">";
- *(const char **)apr_push_array(t) = ap_escape_html(sub_pool, vuri);
- *(const char **)apr_push_array(t) = "</a> (";
- *(const char **)apr_push_array(t) = reason;
- *(const char **)apr_push_array(t) = ")\n";
+ *(const char **)apr_array_push(v) = "\"";
+ *(const char **)apr_array_push(v) = ap_escape_uri(sub_pool, vuri);
+ *(const char **)apr_array_push(v) = "\";\"";
+ *(const char **)apr_array_push(v) = reason;
+ *(const char **)apr_array_push(v) = "\"";
+
+ *(const char **)apr_array_push(t) = "<li><a href=\"";
+ *(const char **)apr_array_push(t) = ap_escape_uri(sub_pool, vuri);
+ *(const char **)apr_array_push(t) = "\">";
+ *(const char **)apr_array_push(t) = ap_escape_html(sub_pool, vuri);
+ *(const char **)apr_array_push(t) = "</a> (";
+ *(const char **)apr_array_push(t) = reason;
+ *(const char **)apr_array_push(t) = ")\n";
/*
* when we have printed the "close matches" and there are
@@ -512,20 +512,20 @@
if (i > 0 && i < candidates->nelts - 1
&& variant[i].quality != SP_VERYDIFFERENT
&& variant[i + 1].quality == SP_VERYDIFFERENT) {
- *(const char **)apr_push_array(t) =
+ *(const char **)apr_array_push(t) =
"</ul>\nFurthermore, the following related "
"documents were found:\n<ul>\n";
}
}
- *(const char **)apr_push_array(t) = "</ul>\n";
+ *(const char **)apr_array_push(t) = "</ul>\n";
/* If we know there was a referring page, add a note: */
if (ref != NULL) {
- *(const char **)apr_push_array(t) =
+ *(const char **)apr_array_push(t) =
"Please consider informing the owner of the "
"<a href=\"";
- *(const char **)apr_push_array(t) = ap_escape_uri(sub_pool, ref);
- *(const char **)apr_push_array(t) = "\">referring page</a> "
+ *(const char **)apr_array_push(t) = ap_escape_uri(sub_pool, ref);
+ *(const char **)apr_array_push(t) = "\">referring page</a> "
"about the broken link.\n";
}
@@ -536,7 +536,7 @@
apr_table_mergen(r->subprocess_env, "VARIANTS",
apr_array_pstrcat(p, v, ','));
- apr_destroy_pool(sub_pool);
+ apr_pool_destroy(sub_pool);
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_INFO, 0, r,
ref ? "Spelling fix: %s: %d candidates from %s"
1.34 +2 -2 httpd-2.0/modules/mappers/mod_userdir.c
Index: mod_userdir.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_userdir.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- mod_userdir.c 2001/01/31 23:11:01 1.33
+++ mod_userdir.c 2001/02/08 07:44:06 1.34
@@ -138,8 +138,8 @@
newcfg->globally_disabled = 0;
newcfg->userdir = DEFAULT_USER_DIR;
- newcfg->enabled_users = apr_make_table(p, 4);
- newcfg->disabled_users = apr_make_table(p, 4);
+ newcfg->enabled_users = apr_table_make(p, 4);
+ newcfg->disabled_users = apr_table_make(p, 4);
return (void *) newcfg;
}
1.30 +5 -5 httpd-2.0/modules/metadata/mod_cern_meta.c
Index: mod_cern_meta.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_cern_meta.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- mod_cern_meta.c 2001/01/31 22:45:30 1.29
+++ mod_cern_meta.c 2001/02/08 07:44:07 1.30
@@ -250,8 +250,8 @@
int p;
apr_table_t *tmp_headers;
- tmp_headers = apr_make_table(r->pool, 5);
- while (apr_fgets(w, MAX_STRING_LEN - 1, f) == APR_SUCCESS) {
+ tmp_headers = apr_table_make(r->pool, 5);
+ while (apr_file_gets(w, MAX_STRING_LEN - 1, f) == APR_SUCCESS) {
/* Delete terminal (CR?)LF */
@@ -299,7 +299,7 @@
apr_table_set(tmp_headers, w, l);
}
}
- apr_overlap_tables(r->headers_out, tmp_headers, APR_OVERLAP_TABLES_SET);
+ apr_table_overlap(r->headers_out, tmp_headers, APR_OVERLAP_TABLES_SET);
return OK;
}
@@ -369,7 +369,7 @@
}
ap_destroy_sub_req(rr);
- retcode = apr_open(&f, metafilename, APR_READ | APR_CREATE, APR_OS_DEFAULT, r->pool);
+ retcode = apr_file_open(&f, metafilename, APR_READ | APR_CREATE, APR_OS_DEFAULT, r->pool);
if (retcode != APR_SUCCESS) {
if (APR_STATUS_IS_ENOENT(retcode)) {
return DECLINED;
@@ -381,7 +381,7 @@
/* read the headers in */
rv = scan_meta_file(r, f);
- apr_close(f);
+ apr_file_close(f);
return rv;
}
1.20 +3 -3 httpd-2.0/modules/metadata/mod_env.c
Index: mod_env.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_env.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- mod_env.c 2001/01/19 07:04:24 1.19
+++ mod_env.c 2001/02/08 07:44:07 1.20
@@ -120,7 +120,7 @@
{
env_dir_config_rec *new =
(env_dir_config_rec *) apr_palloc(p, sizeof(env_dir_config_rec));
- new->vars = apr_make_table(p, 50);
+ new->vars = apr_table_make(p, 50);
new->unsetenv = "";
new->vars_present = 0;
return (void *) new;
@@ -150,7 +150,7 @@
* }
*/
- new_table = apr_copy_table(p, base->vars);
+ new_table = apr_table_copy(p, base->vars);
arr = apr_table_elts(add->vars);
elts = (apr_table_entry_t *)arr->elts;
@@ -249,7 +249,7 @@
if (!sconf->vars_present)
return DECLINED;
- r->subprocess_env = apr_overlay_tables(r->pool, e, vars);
+ r->subprocess_env = apr_table_overlay(r->pool, e, vars);
return OK;
}
1.29 +2 -2 httpd-2.0/modules/metadata/mod_expires.c
Index: mod_expires.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_expires.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- mod_expires.c 2001/01/31 22:45:31 1.28
+++ mod_expires.c 2001/02/08 07:44:08 1.29
@@ -228,7 +228,7 @@
(expires_dir_config *) apr_pcalloc(p, sizeof(expires_dir_config));
new->active = ACTIVE_DONTCARE;
new->expiresdefault = "";
- new->expiresbytype = apr_make_table(p, 4);
+ new->expiresbytype = apr_table_make(p, 4);
return (void *) new;
}
@@ -408,7 +408,7 @@
new->expiresdefault = add->expiresdefault;
};
- new->expiresbytype = apr_overlay_tables(p, add->expiresbytype,
+ new->expiresbytype = apr_table_overlay(p, add->expiresbytype,
base->expiresbytype);
return new;
}
1.18 +4 -4 httpd-2.0/modules/metadata/mod_headers.c
Index: mod_headers.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_headers.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- mod_headers.c 2001/01/19 07:04:24 1.17
+++ mod_headers.c 2001/02/08 07:44:08 1.18
@@ -139,7 +139,7 @@
headers_conf *a =
(headers_conf *) apr_pcalloc(p, sizeof(headers_conf));
- a->headers = apr_make_array(p, 2, sizeof(header_entry));
+ a->headers = apr_array_make(p, 2, sizeof(header_entry));
return a;
}
@@ -154,7 +154,7 @@
(headers_conf *) apr_pcalloc(p, sizeof(headers_conf));
headers_conf *base = (headers_conf *) basev, *overrides = (headers_conf *) overridesv;
- a->headers = apr_append_arrays(p, base->headers, overrides->headers);
+ a->headers = apr_array_append(p, base->headers, overrides->headers);
return a;
}
@@ -172,10 +172,10 @@
char *colon;
if (cmd->path) {
- new = (header_entry *) apr_push_array(dirconf->headers);
+ new = (header_entry *) apr_array_push(dirconf->headers);
}
else {
- new = (header_entry *) apr_push_array(serverconf->headers);
+ new = (header_entry *) apr_array_push(serverconf->headers);
}
if (!strcasecmp(action, "set"))
1.38 +16 -16 httpd-2.0/modules/metadata/mod_mime_magic.c
Index: mod_mime_magic.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_mime_magic.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- mod_mime_magic.c 2001/01/31 22:45:32 1.37
+++ mod_mime_magic.c 2001/02/08 07:44:08 1.38
@@ -873,7 +873,7 @@
return result;
}
- if (apr_open(&fd, r->filename, APR_READ, APR_OS_DEFAULT, r->pool) != APR_SUCCESS) {
+ if (apr_file_open(&fd, r->filename, APR_READ, APR_OS_DEFAULT, r->pool) != APR_SUCCESS) {
/* We can't open it, but we were able to stat it. */
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
MODNAME ": can't read `%s'", r->filename);
@@ -885,7 +885,7 @@
* try looking at the first HOWMANY bytes
*/
nbytes = sizeof(buf) - 1;
- if ((result = apr_read(fd, (char *) buf, &nbytes)) != APR_SUCCESS) {
+ if ((result = apr_file_read(fd, (char *) buf, &nbytes)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, result, r,
MODNAME ": read failed: %s", r->filename);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -898,7 +898,7 @@
tryit(r, buf, nbytes, 1);
}
- (void) apr_close(fd);
+ (void) apr_file_close(fd);
(void) magic_rsl_putchar(r, '\n');
return OK;
@@ -954,7 +954,7 @@
ap_get_module_config(s->module_config, &mime_magic_module);
const char *fname = ap_server_root_relative(p, conf->magicfile);
- result = apr_open(&f, fname, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p);
+ result = apr_file_open(&f, fname, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p);
if (result != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, result, s,
MODNAME ": can't read magic file %s", fname);
@@ -965,7 +965,7 @@
conf->magic = conf->last = NULL;
/* parse it */
- for (lineno = 1; apr_fgets(line, BUFSIZ, f) == APR_SUCCESS; lineno++) {
+ for (lineno = 1; apr_file_gets(line, BUFSIZ, f) == APR_SUCCESS; lineno++) {
int ws_offset;
/* delete newline */
@@ -998,7 +998,7 @@
++errs;
}
- (void) apr_close(f);
+ (void) apr_file_close(f);
#if MIME_MAGIC_DEBUG
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, s,
@@ -2152,11 +2152,11 @@
env = (const char *const *)ap_create_environment(child_context, r->subprocess_env);
- if ((apr_createprocattr_init(&procattr, child_context) != APR_SUCCESS) ||
- (apr_setprocattr_io(procattr, APR_FULL_BLOCK,
+ if ((apr_procattr_create(&procattr, child_context) != APR_SUCCESS) ||
+ (apr_procattr_io_set(procattr, APR_FULL_BLOCK,
APR_FULL_BLOCK, APR_NO_PIPE) != APR_SUCCESS) ||
- (apr_setprocattr_dir(procattr, r->filename) != APR_SUCCESS) ||
- (apr_setprocattr_cmdtype(procattr, APR_PROGRAM) != APR_SUCCESS)) {
+ (apr_procattr_dir_set(procattr, r->filename) != APR_SUCCESS) ||
+ (apr_procattr_cmdtype_set(procattr, APR_PROGRAM) != APR_SUCCESS)) {
/* Something bad happened, tell the world. */
ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_ENOPROC, r,
"couldn't setup child process: %s", r->filename);
@@ -2172,7 +2172,7 @@
}
procnew = apr_pcalloc(child_context, sizeof(*procnew));
- rc = apr_create_process(procnew, compr[parm->method].argv[0],
+ rc = apr_proc_create(procnew, compr[parm->method].argv[0],
new_argv, env, procattr, child_context);
if (rc != APR_SUCCESS) {
@@ -2182,7 +2182,7 @@
compr[parm->method].argv[0]);
}
else {
- apr_note_subprocess(child_context, procnew, kill_after_timeout);
+ apr_pool_note_subprocess(child_context, procnew, kill_after_timeout);
*pipe_in = procnew->out;
}
}
@@ -2205,7 +2205,7 @@
* there are cases (i.e. generating directory indicies with mod_autoindex)
* where we would end up with LOTS of zombies.
*/
- if (apr_create_pool(&sub_context, r->pool) != APR_SUCCESS)
+ if (apr_pool_create(&sub_context, r->pool) != APR_SUCCESS)
return -1;
if ((rv = uncompress_child(&parm, sub_context, &pipe_out)) != APR_SUCCESS) {
@@ -2215,14 +2215,14 @@
}
*newch = (unsigned char *) apr_palloc(r->pool, n);
- rv = apr_read(pipe_out, *newch, &n);
+ rv = apr_file_read(pipe_out, *newch, &n);
if (n == 0) {
- apr_destroy_pool(sub_context);
+ apr_pool_destroy(sub_context);
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
MODNAME ": read failed %s", r->filename);
return -1;
}
- apr_destroy_pool(sub_context);
+ apr_pool_destroy(sub_context);
return n;
}
1.23 +4 -4 httpd-2.0/modules/metadata/mod_setenvif.c
Index: mod_setenvif.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_setenvif.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- mod_setenvif.c 2001/01/19 07:04:24 1.22
+++ mod_setenvif.c 2001/02/08 07:44:08 1.23
@@ -165,7 +165,7 @@
{
sei_cfg_rec *new = (sei_cfg_rec *) apr_palloc(p, sizeof(sei_cfg_rec));
- new->conditionals = apr_make_array(p, 20, sizeof(sei_entry));
+ new->conditionals = apr_array_make(p, 20, sizeof(sei_entry));
return (void *) new;
}
@@ -184,7 +184,7 @@
sei_cfg_rec *a = apr_pcalloc(p, sizeof(sei_cfg_rec));
sei_cfg_rec *base = basev, *overrides = overridesv;
- a->conditionals = apr_append_arrays(p, base->conditionals,
+ a->conditionals = apr_array_append(p, base->conditionals,
overrides->conditionals);
return a;
}
@@ -252,7 +252,7 @@
/* no match, create a new entry */
- new = apr_push_array(sconf->conditionals);
+ new = apr_array_push(sconf->conditionals);
new->name = fname;
new->regex = regex;
new->icase = icase;
@@ -263,7 +263,7 @@
return apr_pstrcat(cmd->pool, cmd->cmd->name,
" regex could not be compiled.", NULL);
}
- new->features = apr_make_table(cmd->pool, 2);
+ new->features = apr_table_make(cmd->pool, 2);
if (!strcasecmp(fname, "remote_addr")) {
new->special_type = SPECIAL_REMOTE_ADDR;
1.24 +2 -2 httpd-2.0/modules/metadata/mod_unique_id.c
Index: mod_unique_id.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_unique_id.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mod_unique_id.c 2001/01/25 22:20:28 1.23
+++ mod_unique_id.c 2001/02/08 07:44:08 1.24
@@ -246,7 +246,7 @@
* But protecting against it is relatively cheap. We just sleep into the
* next second.
*/
- pause = (apr_interval_time_t)(1000000 - (apr_now() % APR_USEC_PER_SEC));
+ pause = (apr_interval_time_t)(1000000 - (apr_time_now() % APR_USEC_PER_SEC));
apr_sleep(pause);
}
@@ -285,7 +285,7 @@
* against restart problems, and a little less protection against a clock
* going backwards in time.
*/
- tv = apr_now();
+ tv = apr_time_now();
/* Some systems have very low variance on the low end of their system
* counter, defend against that.
*/
1.26 +1 -1 httpd-2.0/modules/metadata/mod_usertrack.c
Index: mod_usertrack.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_usertrack.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- mod_usertrack.c 2001/01/19 07:04:24 1.25
+++ mod_usertrack.c 2001/02/08 07:44:08 1.26
@@ -141,7 +141,7 @@
dcfg = ap_get_module_config(r->per_dir_config, &usertrack_module);
/* XXX: hmm, this should really tie in with mod_unique_id */
- apr_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%qd", rname, apr_now());
+ apr_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%qd", rname, apr_time_now());
if (cls->expires) {
apr_exploded_time_t tms;
1.22 +7 -7 httpd-2.0/modules/proxy/mod_proxy.c
Index: mod_proxy.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- mod_proxy.c 2001/02/07 05:40:42 1.21
+++ mod_proxy.c 2001/02/08 07:44:09 1.22
@@ -464,7 +464,7 @@
port = defports[i].port;
}
- new = apr_push_array(conf->proxies);
+ new = apr_array_push(conf->proxies);
new->scheme = f;
new->protocol = r;
new->hostname = p + 3;
@@ -490,7 +490,7 @@
}
if (!found) {
- new = apr_push_array(psf->nocaches);
+ new = apr_array_push(psf->nocaches);
new->name = arg;
/* Don't do name lookups on things that aren't dotted */
if (ap_strchr_c(arg, '.') != NULL &&
@@ -510,7 +510,7 @@
(proxy_server_conf *) ap_get_module_config(s->module_config, &proxy_module);
struct proxy_alias *new;
- new = apr_push_array(conf->aliases);
+ new = apr_array_push(conf->aliases);
new->fake = f;
new->real = r;
return NULL;
@@ -525,7 +525,7 @@
conf = (proxy_server_conf *)ap_get_module_config(s->module_config,
&proxy_module);
- new = apr_push_array(conf->raliases);
+ new = apr_array_push(conf->raliases);
new->fake = f;
new->real = r;
return NULL;
@@ -550,7 +550,7 @@
}
if (!found) {
- new = apr_push_array(conf->noproxies);
+ new = apr_array_push(conf->noproxies);
new->name = arg;
/* Don't do name lookups on things that aren't dotted */
if (ap_strchr_c(arg, '.') != NULL &&
@@ -577,7 +577,7 @@
if (!apr_isdigit(arg[0]))
return "AllowCONNECT: port number must be numeric";
- New = apr_push_array(conf->allowed_connect_ports);
+ New = apr_array_push(conf->allowed_connect_ports);
*New = atoi(arg);
return NULL;
}
@@ -603,7 +603,7 @@
}
if (!found) {
- New = apr_push_array(conf->dirconn);
+ New = apr_array_push(conf->dirconn);
New->name = apr_pstrdup(parms->pool, arg);
New->hostentry = NULL;
1.2 +2 -2 httpd-2.0/modules/proxy/proxy_cache.c
Index: proxy_cache.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_cache.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- proxy_cache.c 2001/02/07 05:42:10 1.1
+++ proxy_cache.c 2001/02/08 07:44:10 1.2
@@ -191,12 +191,12 @@
if((ret = ap_cache_el_data(el, &place)) != APR_SUCCESS) return ret;
nbytes = HUGE_STRING_LEN;
- while(apr_read(data, buffer, &nbytes) == APR_SUCCESS && nbytes) {
+ while(apr_file_read(data, buffer, &nbytes) == APR_SUCCESS && nbytes) {
o = 0;
while(nbytes)
{
i = nbytes;
- apr_write(place, buffer + o, &i);
+ apr_file_write(place, buffer + o, &i);
o += i;
nbytes -= i;
}
1.19 +10 -10 httpd-2.0/modules/proxy/proxy_connect.c
Index: proxy_connect.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_connect.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- proxy_connect.c 2000/11/19 14:27:43 1.18
+++ proxy_connect.c 2001/02/08 07:44:10 1.19
@@ -172,7 +172,7 @@
"CONNECT to %s on port %d", host, port);
}
- if ((apr_create_socket(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
+ if ((apr_socket_create(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error creating socket");
return HTTP_INTERNAL_SERVER_ERROR;
@@ -180,7 +180,7 @@
if (ap_proxy_doconnect(sock, (char *)(proxyhost ? proxyhost : host),
proxyport ? proxyport : port, r) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
return ap_proxyerror(r, HTTP_INTERNAL_SERVER_ERROR,
apr_pstrcat(r->pool, "Could not connect to remote machine:<br>",
proxyhost, NULL));
@@ -211,10 +211,10 @@
ap_rflush(r);
}
- if(apr_setup_poll(&pollfd, 2, r->pool) != APR_SUCCESS)
+ if(apr_poll_setup(&pollfd, 2, r->pool) != APR_SUCCESS)
{
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "proxy: error apr_setup_poll()");
+ "proxy: error apr_poll_setup()");
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -225,7 +225,7 @@
just see if a recv gives us anything and do the same to sock (server) side, I'll leave this as TBD so
one can decide the best path to take
*/
- if(apr_put_os_sock(&client_sock,
+ if(apr_os_sock_put(&client_sock,
(apr_os_sock_t *)get_socket(r->connection->client),
r->pool) != APR_SUCCESS)
{
@@ -233,11 +233,11 @@
"proxy: error creating client apr_socket_t");
return HTTP_INTERNAL_SERVER_ERROR;
}
- apr_add_poll_socket(pollfd, client_sock, APR_POLLIN);
+ apr_poll_socket_add(pollfd, client_sock, APR_POLLIN);
#endif
/* Add the server side to the poll */
- apr_add_poll_socket(pollfd, sock, APR_POLLIN);
+ apr_poll_socket_add(pollfd, sock, APR_POLLIN);
while (1) { /* Infinite loop until error (one side closes the connection) */
ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, "Going to sleep (poll)");
@@ -250,7 +250,7 @@
"Woke from select(), i=%d", pollcnt);
if (pollcnt) {
- apr_get_revents(&pollevent, sock, pollfd);
+ apr_poll_revents_get(&pollevent, sock, pollfd);
if (pollevent & APR_POLLIN) {
ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL,
"sock was set");
@@ -270,7 +270,7 @@
break;
}
- apr_get_revents(&pollevent, client_sock, pollfd);
+ apr_poll_revents_get(&pollevent, client_sock, pollfd);
if (pollevent & APR_POLLIN) {
ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL,
"client was set");
@@ -295,7 +295,7 @@
break;
}
- apr_close_socket(sock);
+ apr_socket_close(sock);
return OK;
}
1.28 +17 -17 httpd-2.0/modules/proxy/proxy_ftp.c
Index: proxy_ftp.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_ftp.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- proxy_ftp.c 2000/12/20 16:44:00 1.27
+++ proxy_ftp.c 2001/02/08 07:44:10 1.28
@@ -400,7 +400,7 @@
total_bytes_sent += n;
cntr = n;
- if (cachefp && apr_write(cachefp, buf, &cntr) != APR_SUCCESS) {
+ if (cachefp && apr_file_write(cachefp, buf, &cntr) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error writing to cache");
ap_proxy_cache_error(&c);
@@ -567,7 +567,7 @@
if (parms != NULL)
*(parms++) = '\0';
- if ((apr_create_socket(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
+ if ((apr_socket_create(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error creating socket");
return HTTP_INTERNAL_SERVER_ERROR;
@@ -586,13 +586,13 @@
#ifndef _OSD_POSIX /* BS2000 has this option "always on" */
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error setting reuseaddr option: setsockopt(SO_REUSEADDR)");
- apr_close_socket(sock);
+ apr_socket_close(sock);
return HTTP_INTERNAL_SERVER_ERROR;
#endif /*_OSD_POSIX*/
}
if (ap_proxy_doconnect(sock, host, port, r) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(r->pool,
"Could not connect to remote machine: ",
host, NULL));
@@ -788,7 +788,7 @@
}
/* try to set up PASV data connection first */
- if ((apr_create_socket(&dsock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
+ if ((apr_socket_create(&dsock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error creating PASV socket");
ap_bclose(f);
@@ -818,7 +818,7 @@
if (i == -1) {
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r,
"PASV: control connection is toast");
- apr_close_socket(dsock);
+ apr_socket_close(dsock);
ap_bclose(f);
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -862,31 +862,31 @@
}
}
else
- apr_close_socket(dsock); /* and try the regular way */
+ apr_socket_close(dsock); /* and try the regular way */
}
if (!pasvmode) { /* set up data connection */
- if ((apr_create_socket(&dsock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
+ if ((apr_socket_create(&dsock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error creating socket");
ap_bclose(f);
return HTTP_INTERNAL_SERVER_ERROR;
}
- apr_get_sockaddr(&localsa, APR_LOCAL, sock);
- apr_get_port(&npport, localsa);
- apr_get_ipaddr(&npaddr, localsa);
+ apr_socket_addr_get(&localsa, APR_LOCAL, sock);
+ apr_sockaddr_port_get(&npport, localsa);
+ apr_sockaddr_ip_get(&npaddr, localsa);
if (apr_setsocketopt(dsock, APR_SO_REUSEADDR, one) != APR_SUCCESS) {
#ifndef _OSD_POSIX /* BS2000 has this option "always on" */
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error setting reuseaddr option");
- apr_close_socket(dsock);
+ apr_socket_close(dsock);
ap_bclose(f);
return HTTP_INTERNAL_SERVER_ERROR;
#endif /*_OSD_POSIX*/
}
- if (apr_getaddrinfo(&localsa, npaddr, APR_INET, npport, 0, r->pool)
+ if (apr_sockaddr_info_get(&localsa, npaddr, APR_INET, npport, 0, r->pool)
!= APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error creating local socket address");
@@ -901,7 +901,7 @@
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error binding to ftp data socket %s", buff);
ap_bclose(f);
- apr_close_socket(dsock);
+ apr_socket_close(dsock);
return HTTP_INTERNAL_SERVER_ERROR;
}
apr_listen(dsock, 2); /* only need a short queue */
@@ -1170,7 +1170,7 @@
default:
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: failed to accept data connection");
- apr_close_socket(dsock);
+ apr_socket_close(dsock);
ap_bclose(f);
if (c != NULL) ap_proxy_cache_error(&c);
return HTTP_BAD_GATEWAY;
@@ -1188,7 +1188,7 @@
/* write status line */
if (!r->assbackwards)
ap_rvputs(r, "HTTP/1.0 ", r->status_line, CRLF, NULL);
- if (cachefp && apr_puts(apr_pstrcat(r->pool, "HTTP/1.0 ",
+ if (cachefp && apr_file_puts(apr_pstrcat(r->pool, "HTTP/1.0 ",
r->status_line, CRLF, NULL), cachefp) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error writing CRLF to cache");
@@ -1200,7 +1200,7 @@
ap_cache_el_header_walk(c, ap_proxy_send_hdr_line, r, NULL);
if (!r->assbackwards)
ap_rputs(CRLF, r);
- if (cachefp && apr_puts(CRLF, cachefp) == -1) {
+ if (cachefp && apr_file_puts(CRLF, cachefp) == -1) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error writing CRLF to cache");
ap_proxy_cache_error(&c);
1.30 +16 -16 httpd-2.0/modules/proxy/proxy_http.c
Index: proxy_http.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_http.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- proxy_http.c 2001/02/07 05:41:35 1.29
+++ proxy_http.c 2001/02/08 07:44:10 1.30
@@ -249,7 +249,7 @@
"Connect to remote machine blocked");
}
- if ((apr_create_socket(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
+ if ((apr_socket_create(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error creating socket");
return HTTP_INTERNAL_SERVER_ERROR;
@@ -292,16 +292,16 @@
buf = apr_pstrcat(r->pool, r->method, " ", proxyhost ? url : urlptr,
" HTTP/1.0" CRLF, NULL);
- e = apr_bucket_create_pool(buf, strlen(buf), r->pool);
+ e = apr_bucket_pool_create(buf, strlen(buf), r->pool);
APR_BRIGADE_INSERT_TAIL(bb, e);
if (destportstr != NULL && destport != DEFAULT_HTTP_PORT) {
buf = apr_pstrcat(r->pool, "Host: ", desthost, ":", destportstr, CRLF, NULL);
- e = apr_bucket_create_pool(buf, strlen(buf), r->pool);
+ e = apr_bucket_pool_create(buf, strlen(buf), r->pool);
APR_BRIGADE_INSERT_TAIL(bb, e);
}
else {
buf = apr_pstrcat(r->pool, "Host: ", desthost, CRLF, NULL);
- e = apr_bucket_create_pool(buf, strlen(buf), r->pool);
+ e = apr_bucket_pool_create(buf, strlen(buf), r->pool);
APR_BRIGADE_INSERT_TAIL(bb, e);
}
@@ -344,14 +344,14 @@
|| !strcasecmp(reqhdrs[i].key, "Proxy-Authorization"))
continue;
buf = apr_pstrcat(r->pool, reqhdrs[i].key, ": ", reqhdrs[i].val, CRLF, NULL);
- e = apr_bucket_create_pool(buf, strlen(buf), r->pool);
+ e = apr_bucket_pool_create(buf, strlen(buf), r->pool);
APR_BRIGADE_INSERT_TAIL(bb, e);
}
- e = apr_bucket_create_pool(CRLF, strlen(CRLF), r->pool);
+ e = apr_bucket_pool_create(CRLF, strlen(CRLF), r->pool);
APR_BRIGADE_INSERT_TAIL(bb, e);
- e = apr_bucket_create_flush();
+ e = apr_bucket_flush_create();
APR_BRIGADE_INSERT_TAIL(bb, e);
ap_pass_brigade(origin->output_filters, bb);
@@ -359,12 +359,12 @@
if (ap_should_client_block(r)) {
while ((i = ap_get_client_block(r, buffer, sizeof buffer)) > 0) {
- e = apr_bucket_create_pool(buffer, i, r->pool);
+ e = apr_bucket_pool_create(buffer, i, r->pool);
APR_BRIGADE_INSERT_TAIL(bb, e);
}
}
/* Flush the data to the origin server */
- e = apr_bucket_create_flush();
+ e = apr_bucket_flush_create();
APR_BRIGADE_INSERT_TAIL(bb, e);
ap_pass_brigade(origin->output_filters, bb);
@@ -381,14 +381,14 @@
e = APR_BRIGADE_FIRST(bb);
apr_bucket_read(e, (const char **)&buffer2, &len, APR_BLOCK_READ);
if (len == -1) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"ap_get_brigade() - proxy receive - Error reading from remote server %s (length %d)",
proxyhost ? proxyhost : desthost, len);
return ap_proxyerror(r, HTTP_BAD_GATEWAY,
"Error reading from remote server");
} else if (len == 0) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
return ap_proxyerror(r, HTTP_BAD_GATEWAY,
"Document contains no data");
}
@@ -405,7 +405,7 @@
/* If not an HTTP/1 message or if the status line was > 8192 bytes */
if (buffer2[5] != '1' || buffer2[len - 1] != '\n') {
- apr_close_socket(sock);
+ apr_socket_close(sock);
return HTTP_BAD_GATEWAY;
}
backasswards = 0;
@@ -477,7 +477,7 @@
if (!r->assbackwards)
ap_rvputs(r, "HTTP/1.0 ", r->status_line, CRLF, NULL);
- if (cachefp && apr_puts(apr_pstrcat(r->pool, "HTTP/1.0 ",
+ if (cachefp && apr_file_puts(apr_pstrcat(r->pool, "HTTP/1.0 ",
r->status_line, CRLF, NULL), cachefp) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error writing status line to cache");
@@ -498,9 +498,9 @@
/* Is it an HTTP/0.9 response? If so, send the extra data */
if (backasswards) {
cntr = len;
- e = apr_bucket_create_heap(buffer, cntr, 0, NULL);
+ e = apr_bucket_heap_create(buffer, cntr, 0, NULL);
APR_BRIGADE_INSERT_TAIL(bb, e);
- if (cachefp && apr_write(cachefp, buffer, &cntr) != APR_SUCCESS) {
+ if (cachefp && apr_file_write(cachefp, buffer, &cntr) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error writing extra data to cache");
}
@@ -526,6 +526,6 @@
}
}
- apr_close_socket(sock);
+ apr_socket_close(sock);
return OK;
}
1.39 +10 -10 httpd-2.0/modules/proxy/proxy_util.c
Index: proxy_util.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- proxy_util.c 2001/02/07 05:41:12 1.38
+++ proxy_util.c 2001/02/08 07:44:10 1.39
@@ -376,11 +376,11 @@
r->pool = c->pool;
r->status = HTTP_OK;
- r->headers_in = apr_make_table(r->pool, 50);
- r->subprocess_env = apr_make_table(r->pool, 50);
- r->headers_out = apr_make_table(r->pool, 12);
- r->err_headers_out = apr_make_table(r->pool, 5);
- r->notes = apr_make_table(r->pool, 5);
+ r->headers_in = apr_table_make(r->pool, 50);
+ r->subprocess_env = apr_table_make(r->pool, 50);
+ r->headers_out = apr_table_make(r->pool, 12);
+ r->err_headers_out = apr_table_make(r->pool, 5);
+ r->notes = apr_table_make(r->pool, 5);
r->read_body = REQUEST_NO_BODY;
r->connection = c;
@@ -531,7 +531,7 @@
/* Write to cache first. */
/*@@@ XXX FIXME: Assuming that writing the cache file won't time out?!!? */
wrote_to_cache = cntr;
- if (cachefp && apr_write(cachefp, &buf[0], &wrote_to_cache) != APR_SUCCESS) {
+ if (cachefp && apr_file_write(cachefp, &buf[0], &wrote_to_cache) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"proxy: error writing to cache");
ap_proxy_cache_error(&c);
@@ -1162,7 +1162,7 @@
apr_status_t rv;
apr_sockaddr_t *destsa;
- rv = apr_getaddrinfo(&destsa, host, AF_INET, port, 0, r->pool);
+ rv = apr_sockaddr_info_get(&destsa, host, AF_INET, port, 0, r->pool);
if (rv == APR_SUCCESS) {
rv = apr_connect(sock, destsa);
}
@@ -1195,7 +1195,7 @@
apr_send(client, data, &len);
if (ap_cache_el_data(cache, &cachefp) == APR_SUCCESS)
- apr_puts(data, cachefp);
+ apr_file_puts(data, cachefp);
return len;
}
@@ -1261,7 +1261,7 @@
if(ap_cache_el_data(c, &cachefp) != APR_SUCCESS)
return HTTP_INTERNAL_SERVER_ERROR;
/* send the response */
- if(apr_fgets(buffer, sizeof(buffer), cachefp)) {
+ if(apr_file_gets(buffer, sizeof(buffer), cachefp)) {
len = strlen(buffer);
apr_send(fp, buffer, &len);
offset +=len;
@@ -1271,7 +1271,7 @@
len = 2;
apr_send(fp, CRLF, &len);
/* send data */
- apr_getfileinfo(&finfo, APR_FINFO_MIN, cachefp);
+ apr_file_info_get(&finfo, APR_FINFO_MIN, cachefp);
if(!r->header_only && ap_send_fd(cachefp, r, offset, finfo.size, &len))
return HTTP_INTERNAL_SERVER_ERROR;
return OK;
1.7 +26 -26 httpd-2.0/modules/test/mod_autoindex.c
Index: mod_autoindex.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/test/mod_autoindex.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mod_autoindex.c 2001/01/31 22:45:35 1.6
+++ mod_autoindex.c 2001/02/08 07:44:11 1.7
@@ -212,7 +212,7 @@
static void push_item(apr_array_header_t *arr, char *type, const char *to,
const char *path, const char *data)
{
- struct item *p = (struct item *) apr_push_array(arr);
+ struct item *p = (struct item *) apr_array_push(arr);
if (!to) {
to = "";
@@ -316,7 +316,7 @@
ai_desc_t *desc_entry;
char *prefix = "";
- desc_entry = (ai_desc_t *) apr_push_array(dcfg->desc_list);
+ desc_entry = (ai_desc_t *) apr_array_push(dcfg->desc_list);
desc_entry->full_path = (ap_strchr_c(to, '/') == NULL) ? 0 : 1;
desc_entry->wildcards = (WILDCARDS_REQUIRED
|| desc_entry->full_path
@@ -596,12 +596,12 @@
new->icon_height = 0;
new->name_width = DEFAULT_NAME_WIDTH;
new->name_adjust = K_UNSET;
- new->icon_list = apr_make_array(p, 4, sizeof(struct item));
- new->alt_list = apr_make_array(p, 4, sizeof(struct item));
- new->desc_list = apr_make_array(p, 4, sizeof(ai_desc_t));
- new->ign_list = apr_make_array(p, 4, sizeof(struct item));
- new->hdr_list = apr_make_array(p, 4, sizeof(struct item));
- new->rdme_list = apr_make_array(p, 4, sizeof(struct item));
+ new->icon_list = apr_array_make(p, 4, sizeof(struct item));
+ new->alt_list = apr_array_make(p, 4, sizeof(struct item));
+ new->desc_list = apr_array_make(p, 4, sizeof(ai_desc_t));
+ new->ign_list = apr_array_make(p, 4, sizeof(struct item));
+ new->hdr_list = apr_array_make(p, 4, sizeof(struct item));
+ new->rdme_list = apr_array_make(p, 4, sizeof(struct item));
new->opts = 0;
new->incremented_opts = 0;
new->decremented_opts = 0;
@@ -622,12 +622,12 @@
new->icon_height = add->icon_height ? add->icon_height : base->icon_height;
new->icon_width = add->icon_width ? add->icon_width : base->icon_width;
- new->alt_list = apr_append_arrays(p, add->alt_list, base->alt_list);
- new->ign_list = apr_append_arrays(p, add->ign_list, base->ign_list);
- new->hdr_list = apr_append_arrays(p, add->hdr_list, base->hdr_list);
- new->desc_list = apr_append_arrays(p, add->desc_list, base->desc_list);
- new->icon_list = apr_append_arrays(p, add->icon_list, base->icon_list);
- new->rdme_list = apr_append_arrays(p, add->rdme_list, base->rdme_list);
+ new->alt_list = apr_array_append(p, add->alt_list, base->alt_list);
+ new->ign_list = apr_array_append(p, add->ign_list, base->ign_list);
+ new->hdr_list = apr_array_append(p, add->hdr_list, base->hdr_list);
+ new->desc_list = apr_array_append(p, add->desc_list, base->desc_list);
+ new->icon_list = apr_array_append(p, add->icon_list, base->icon_list);
+ new->rdme_list = apr_array_append(p, add->rdme_list, base->rdme_list);
if (add->opts & NO_OPTIONS) {
/*
* If the current directory says 'no options' then we also
@@ -916,10 +916,10 @@
apr_status_t stat;
ap_rputs("<PRE>\n", r);
- while (!apr_eof(f)) {
+ while (!apr_file_eof(f)) {
do {
n = sizeof(char) * IOBUFSIZE;
- stat = apr_read(f, buf, &n);
+ stat = apr_file_read(f, buf, &n);
}
while (stat != APR_SUCCESS && APR_STATUS_IS_EINTR(stat));
if (n == -1 || n == 0) {
@@ -1011,12 +1011,12 @@
* the file's contents, any HTML header it had won't end up
* where it belongs.
*/
- if (apr_open(&f, rr->filename, APR_READ,
+ if (apr_file_open(&f, rr->filename, APR_READ,
APR_OS_DEFAULT, r->pool) == APR_SUCCESS) {
emit_preamble(r, title);
emit_amble = 0;
do_emit_plain(r, f);
- apr_close(f);
+ apr_file_close(f);
emit_H1 = 0;
}
}
@@ -1079,10 +1079,10 @@
/*
* If we can open the file, suppress the signature.
*/
- if (apr_open(&f, rr->filename, APR_READ,
+ if (apr_file_open(&f, rr->filename, APR_READ,
APR_OS_DEFAULT, r->pool) == APR_SUCCESS) {
do_emit_plain(r, f);
- apr_close(f);
+ apr_file_close(f);
suppress_sig = 1;
}
}
@@ -1116,14 +1116,14 @@
"text/html")
|| !strcmp(r->content_type, INCLUDES_MAGIC_TYPE))
&& !r->content_encoding) {
- if (apr_open(&thefile, r->filename, APR_READ,
+ if (apr_file_open(&thefile, r->filename, APR_READ,
APR_OS_DEFAULT, r->pool) != APR_SUCCESS) {
return NULL;
}
n = sizeof(char) * (MAX_STRING_LEN - 1);
- apr_read(thefile, titlebuf, &n);
+ apr_file_read(thefile, titlebuf, &n);
if (n <= 0) {
- apr_close(thefile);
+ apr_file_close(thefile);
return NULL;
}
titlebuf[n] = '\0';
@@ -1144,7 +1144,7 @@
}
}
}
- apr_close(thefile);
+ apr_file_close(thefile);
return apr_pstrdup(r->pool, &titlebuf[x]);
}
}
@@ -1152,7 +1152,7 @@
p = 0;
}
}
- apr_close(thefile);
+ apr_file_close(thefile);
}
return NULL;
}
@@ -1308,7 +1308,7 @@
char *name_scratch;
char *pad_scratch;
- apr_create_pool(&scratch, r->pool);
+ apr_pool_create(&scratch, r->pool);
if (name[0] == '\0') {
name = "/";
}
1.7 +2 -2 httpd-2.0/modules/test/mod_test_util_uri.c
Index: mod_test_util_uri.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/test/mod_test_util_uri.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mod_test_util_uri.c 2000/08/02 05:27:25 1.6
+++ mod_test_util_uri.c 2001/02/08 07:44:12 1.7
@@ -207,7 +207,7 @@
}
*strp = 0;
- sub = apr_make_sub_pool(r->pool);
+ sub = apr_pool_sub_make(r->pool);
status = ap_parse_uri_components(sub, input_uri, &result);
if (status == HTTP_OK) {
#define CHECK(f) \
@@ -255,7 +255,7 @@
ap_rputs("</tr>\n", r);
++failures;
}
- apr_destroy_pool(sub);
+ apr_pool_destroy(sub);
}
return failures;
}
1.10 +1 -1 httpd-2.0/os/beos/os.c
Index: os.c
===================================================================
RCS file: /home/cvs/httpd-2.0/os/beos/os.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- os.c 2000/12/02 13:33:31 1.9
+++ os.c 2001/02/08 07:44:12 1.10
@@ -80,5 +80,5 @@
const char * const *env,
apr_procattr_t *attr, apr_pool_t *p)
{
- return apr_create_process(newproc, progname, args, env, attr, p);
+ return apr_proc_create(newproc, progname, args, env, attr, p);
}
1.9 +1 -1 httpd-2.0/os/bs2000/os.c
Index: os.c
===================================================================
RCS file: /home/cvs/httpd-2.0/os/bs2000/os.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- os.c 2000/11/26 04:47:34 1.8
+++ os.c 2001/02/08 07:44:13 1.9
@@ -110,6 +110,6 @@
const char * const *env,
apr_procattr_t *attr, apr_pool_t *p)
{
- return apr_create_process(newproc, progname, args, env, attr, p);
+ return apr_proc_create(newproc, progname, args, env, attr, p);
}
1.20 +1 -1 httpd-2.0/os/os2/util_os2.c
Index: util_os2.c
===================================================================
RCS file: /home/cvs/httpd-2.0/os/os2/util_os2.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- util_os2.c 2000/12/05 14:48:47 1.19
+++ util_os2.c 2001/02/08 07:44:13 1.20
@@ -179,5 +179,5 @@
const char * const *env,
apr_procattr_t *attr, apr_pool_t *p)
{
- return apr_create_process(newproc, progname, args, env, attr, p);
+ return apr_proc_create(newproc, progname, args, env, attr, p);
}
1.13 +2 -2 httpd-2.0/os/tpf/os.c
Index: os.c
===================================================================
RCS file: /home/cvs/httpd-2.0/os/tpf/os.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- os.c 2000/11/26 04:47:35 1.12
+++ os.c 2001/02/08 07:44:14 1.13
@@ -323,7 +323,7 @@
if (pid) {
- apr_note_subprocess(p, pid, kill_how);
+ apr_pool_note_subprocess(p, pid, kill_how);
if (pipe_out) {
*pipe_out = out_fds[0];
@@ -419,5 +419,5 @@
const char * const *env,
apr_procattr_t *attr, apr_pool_t *p)
{
- return apr_create_process(newproc, progname, args, env, attr, p);
+ return apr_proc_create(newproc, progname, args, env, attr, p);
}
1.34 +3 -3 httpd-2.0/os/unix/unixd.c
Index: unixd.c
===================================================================
RCS file: /home/cvs/httpd-2.0/os/unix/unixd.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- unixd.c 2001/01/20 21:42:19 1.33
+++ unixd.c 2001/02/08 07:44:15 1.34
@@ -441,7 +441,7 @@
char *execuser, *execgroup;
if (!unixd_config.suexec_enabled) {
- return apr_create_process(newproc, progname, args, env, attr, p);
+ return apr_proc_create(newproc, progname, args, env, attr, p);
}
execuser = apr_psprintf(p, "%ld", (long) ugid->uid);
@@ -469,7 +469,7 @@
newargs[i + 4] = args[i];
} while (args[i++]);
- return apr_create_process(newproc, newprogname, newargs, env, attr, p);
+ return apr_proc_create(newproc, newprogname, newargs, env, attr, p);
}
AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
@@ -482,7 +482,7 @@
ap_unix_identity_t *ugid = ap_run_get_suexec_identity(r);
if (ugid == NULL) {
- return apr_create_process(newproc, progname, args, env, attr, p);
+ return apr_proc_create(newproc, progname, args, env, attr, p);
}
return ap_unix_create_privileged_process(newproc, progname, args, env,
1.37 +16 -16 httpd-2.0/os/win32/mod_isapi.c
Index: mod_isapi.c
===================================================================
RCS file: /home/cvs/httpd-2.0/os/win32/mod_isapi.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- mod_isapi.c 2001/01/27 21:28:26 1.36
+++ mod_isapi.c 2001/02/08 07:44:15 1.37
@@ -191,7 +191,7 @@
static void *create_isapi_server_config(apr_pool_t *p, server_rec *s)
{
isapi_server_conf *sconf = apr_palloc(p, sizeof(isapi_server_conf));
- sconf->loaded = apr_make_array(p, 20, sizeof(isapi_loaded*));
+ sconf->loaded = apr_array_make(p, 20, sizeof(isapi_loaded*));
sconf->lock = CreateMutex(NULL, FALSE, NULL);
sconf->ReadAheadBuffer = 49152;
@@ -199,8 +199,8 @@
sconf->AppendLogToErrors = 0;
sconf->AppendLogToQuery = 0;
- apr_register_cleanup(p, sconf, cleanup_isapi_server_config,
- apr_null_cleanup);
+ apr_pool_cleanup_register(p, sconf, cleanup_isapi_server_config,
+ apr_pool_cleanup_null);
return sconf;
}
@@ -655,9 +655,9 @@
; /* XXX: Fake it */
bb = apr_brigade_create(r->pool);
- b = apr_bucket_create_transient(Buffer, (apr_size_t)lpwdwBytes);
+ b = apr_bucket_transient_create(Buffer, (apr_size_t)lpwdwBytes);
APR_BRIGADE_INSERT_TAIL(bb, b);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
@@ -799,10 +799,10 @@
apr_bucket_brigade *bb;
apr_bucket *b;
bb = apr_brigade_create(cid->r->pool);
- b = apr_bucket_create_transient((char*) lpdwDataType + ate,
+ b = apr_bucket_transient_create((char*) lpdwDataType + ate,
headlen - ate);
APR_BRIGADE_INSERT_TAIL(bb, b);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(cid->r->output_filters, bb);
}
@@ -898,7 +898,7 @@
return FALSE;
}
- if ((rv = apr_put_os_file(&fd, tf->hFile, r->pool)) != APR_SUCCESS) {
+ if ((rv = apr_os_file_put(&fd, tf->hFile, r->pool)) != APR_SUCCESS) {
return FALSE;
}
@@ -928,28 +928,28 @@
}
if (ate < (apr_size_t)tf->HeadLength)
{
- b = apr_bucket_create_transient((char*)tf->pHead + ate,
+ b = apr_bucket_transient_create((char*)tf->pHead + ate,
(apr_size_t)tf->HeadLength - ate);
APR_BRIGADE_INSERT_TAIL(bb, b);
}
}
else if (tf->pHead && tf->HeadLength) {
- b = apr_bucket_create_transient((char*)tf->pHead,
+ b = apr_bucket_transient_create((char*)tf->pHead,
(apr_size_t)tf->HeadLength);
APR_BRIGADE_INSERT_TAIL(bb, b);
}
- b = apr_bucket_create_file(fd, (apr_off_t)tf->Offset,
+ b = apr_bucket_file_create(fd, (apr_off_t)tf->Offset,
(apr_size_t)tf->BytesToWrite);
APR_BRIGADE_INSERT_TAIL(bb, b);
if (tf->pTail && (apr_size_t)tf->TailLength) {
- b = apr_bucket_create_transient((char*)tf->pTail,
+ b = apr_bucket_transient_create((char*)tf->pTail,
(apr_size_t)tf->TailLength);
APR_BRIGADE_INSERT_TAIL(bb, b);
}
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
@@ -1102,10 +1102,10 @@
apr_bucket_brigade *bb;
apr_bucket *b;
bb = apr_brigade_create(cid->r->pool);
- b = apr_bucket_create_transient(shi->pszHeader + ate,
+ b = apr_bucket_transient_create(shi->pszHeader + ate,
(apr_size_t)shi->cchHeader - ate);
APR_BRIGADE_INSERT_TAIL(bb, b);
- b = apr_bucket_create_eos();
+ b = apr_bucket_eos_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(cid->r->output_filters, bb);
}
@@ -1259,7 +1259,7 @@
}
/* Add to cached list of loaded modules */
- newisa = apr_push_array(sconf->loaded);
+ newisa = apr_array_push(sconf->loaded);
*newisa = isa;
return NULL;
1.23 +1 -1 httpd-2.0/os/win32/util_win32.c
Index: util_win32.c
===================================================================
RCS file: /home/cvs/httpd-2.0/os/win32/util_win32.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- util_win32.c 2001/02/01 15:58:09 1.22
+++ util_win32.c 2001/02/08 07:44:16 1.23
@@ -509,6 +509,6 @@
const char * const *env,
apr_procattr_t *attr, apr_pool_t *p)
{
- return apr_create_process(newproc, progname, args, env, attr, p);
+ return apr_proc_create(newproc, progname, args, env, attr, p);
}
1.110 +6 -6 httpd-2.0/server/config.c
Index: config.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/config.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- config.c 2001/01/29 22:19:17 1.109
+++ config.c 2001/02/08 07:44:17 1.110
@@ -1303,12 +1303,12 @@
apr_strerror(rv, errmsg, sizeof errmsg));
exit(1);
}
- candidates = apr_make_array(p, 1, sizeof(fnames));
+ candidates = apr_array_make(p, 1, sizeof(fnames));
while (apr_dir_read(&dirent, APR_FINFO_DIRENT, dirp) == APR_SUCCESS) {
/* strip out '.' and '..' */
if (strcmp(dirent.name, ".") &&
strcmp(dirent.name, "..")) {
- fnew = (fnames *) apr_push_array(candidates);
+ fnew = (fnames *) apr_array_push(candidates);
fnew->fname = ap_make_full_path(p, fname, dirent.name);
}
}
@@ -1485,8 +1485,8 @@
s->next = NULL;
s->is_virtual = 1;
- s->names = apr_make_array(p, 4, sizeof(char **));
- s->wild_names = apr_make_array(p, 4, sizeof(char **));
+ s->names = apr_array_make(p, 4, sizeof(char **));
+ s->wild_names = apr_array_make(p, 4, sizeof(char **));
s->module_config = create_empty_config(p);
s->lookup_defaults = ap_create_per_dir_config(p);
@@ -1551,7 +1551,7 @@
apr_status_t rv;
server_rec *s = (server_rec *) apr_pcalloc(p, sizeof(server_rec));
- apr_open_stderr(&s->error_log, p);
+ apr_file_open_stderr(&s->error_log, p);
s->process = process;
s->port = 0;
s->server_admin = DEFAULT_ADMIN;
@@ -1568,7 +1568,7 @@
s->next = NULL;
s->addrs = apr_pcalloc(p, sizeof(server_addr_rec));
/* NOT virtual host; don't match any real network interface */
- rv = apr_getaddrinfo(&s->addrs->host_addr,
+ rv = apr_sockaddr_info_get(&s->addrs->host_addr,
NULL, APR_INET, 0, 0, p);
ap_assert(rv == APR_SUCCESS); /* otherwise: bug or no storage */
s->addrs->host_port = 0; /* matches any port */
1.73 +17 -17 httpd-2.0/server/connection.c
Index: connection.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/connection.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- connection.c 2001/02/01 21:54:24 1.72
+++ connection.c 2001/02/08 07:44:17 1.73
@@ -138,7 +138,7 @@
apr_bucket *b;
bb = apr_brigade_create(c->pool);
- b = apr_bucket_create_flush();
+ b = apr_bucket_flush_create();
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(c->output_filters, bb);
}
@@ -164,7 +164,7 @@
#ifdef NO_LINGCLOSE
ap_flush_conn(c); /* just close it */
- apr_close_socket(c->client_socket);
+ apr_socket_close(c->client_socket);
return;
#endif
@@ -177,7 +177,7 @@
ap_flush_conn(c);
if (c->aborted) {
- apr_close_socket(c->client_socket);
+ apr_socket_close(c->client_socket);
return;
}
@@ -187,7 +187,7 @@
if (apr_shutdown(c->client_socket, APR_SHUTDOWN_WRITE) != APR_SUCCESS ||
c->aborted) {
- apr_close_socket(c->client_socket);
+ apr_socket_close(c->client_socket);
return;
}
@@ -195,7 +195,7 @@
* from peer) or we've exceeded our overall timeout.
*/
- start = apr_now();
+ start = apr_time_now();
timeout = MAX_SECS_TO_LINGER * APR_USEC_PER_SEC;
for (;;) {
apr_setsocketopt(c->client_socket, APR_SO_TIMEOUT, timeout);
@@ -204,14 +204,14 @@
if (rc != APR_SUCCESS || nbytes == 0) break;
/* how much time has elapsed? */
- timeout = (int)((apr_now() - start) / APR_USEC_PER_SEC);
+ timeout = (int)((apr_time_now() - start) / APR_USEC_PER_SEC);
if (timeout >= MAX_SECS_TO_LINGER) break;
/* figure out the new timeout */
timeout = (int)((MAX_SECS_TO_LINGER - timeout) * APR_USEC_PER_SEC);
}
- apr_close_socket(c->client_socket);
+ apr_socket_close(c->client_socket);
}
AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c)
@@ -254,7 +254,7 @@
break;
ap_update_child_status(AP_CHILD_THREAD_FROM_ID(c->id), SERVER_BUSY_KEEPALIVE, NULL);
- apr_destroy_pool(r->pool);
+ apr_pool_destroy(r->pool);
if (ap_graceful_stop_signalled())
break;
@@ -279,25 +279,25 @@
*/
conn->conn_config=ap_create_conn_config(p);
- conn->notes = apr_make_table(p, 5);
+ conn->notes = apr_table_make(p, 5);
conn->pool = p;
- if ((rv = apr_get_sockaddr(&conn->local_addr, APR_LOCAL, inout))
+ if ((rv = apr_socket_addr_get(&conn->local_addr, APR_LOCAL, inout))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_INFO, rv, server,
- "apr_get_sockaddr(APR_LOCAL)");
- apr_close_socket(inout);
+ "apr_socket_addr_get(APR_LOCAL)");
+ apr_socket_close(inout);
return NULL;
}
- apr_get_ipaddr(&conn->local_ip, conn->local_addr);
- if ((rv = apr_get_sockaddr(&conn->remote_addr, APR_REMOTE, inout))
+ apr_sockaddr_ip_get(&conn->local_ip, conn->local_addr);
+ if ((rv = apr_socket_addr_get(&conn->remote_addr, APR_REMOTE, inout))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_INFO, rv, server,
- "apr_get_sockaddr(APR_REMOTE)");
- apr_close_socket(inout);
+ "apr_socket_addr_get(APR_REMOTE)");
+ apr_socket_close(inout);
return NULL;
}
- apr_get_ipaddr(&conn->remote_ip, conn->remote_addr);
+ apr_sockaddr_ip_get(&conn->remote_ip, conn->remote_addr);
conn->base_server = server;
conn->client_socket = inout;
1.47 +17 -17 httpd-2.0/server/listen.c
Index: listen.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/listen.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- listen.c 2001/01/07 05:51:23 1.46
+++ listen.c 2001/02/08 07:44:17 1.47
@@ -93,7 +93,7 @@
ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
"make_sock: for address %pI, setsockopt: (SO_REUSEADDR)",
server->bind_addr);
- apr_close_socket(s);
+ apr_socket_close(s);
return stat;
}
@@ -102,7 +102,7 @@
ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
"make_sock: for address %pI, setsockopt: (SO_KEEPALIVE)",
server->bind_addr);
- apr_close_socket(s);
+ apr_socket_close(s);
return stat;
}
@@ -144,7 +144,7 @@
ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
"make_sock: could not bind to address %pI",
server->bind_addr);
- apr_close_socket(s);
+ apr_socket_close(s);
return stat;
}
@@ -152,7 +152,7 @@
ap_log_perror(APLOG_MARK, APLOG_ERR, stat, p,
"make_sock: unable to listen for connections on address %pI",
server->bind_addr);
- apr_close_socket(s);
+ apr_socket_close(s);
return stat;
}
@@ -167,7 +167,7 @@
ap_listen_rec *lr;
for (lr = ap_listeners; lr; lr = lr->next) {
- apr_close_socket(lr->sd);
+ apr_socket_close(lr->sd);
lr->active = 0;
}
return APR_SUCCESS;
@@ -184,9 +184,9 @@
if (default_family == APR_UNSPEC) {
apr_socket_t *tmp_sock;
- if (apr_create_socket(&tmp_sock, APR_INET6, SOCK_STREAM,
+ if (apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM,
p) == APR_SUCCESS) {
- apr_close_socket(tmp_sock);
+ apr_socket_close(tmp_sock);
default_family = APR_INET6;
}
else {
@@ -224,9 +224,9 @@
/* see if we've got an old listener for this address:port */
for (walk = &old_listeners; *walk; walk = &(*walk)->next) {
- apr_get_sockaddr(&sa, APR_LOCAL, (*walk)->sd);
- apr_get_port(&oldport, sa);
- apr_get_ipaddr(&oldaddr, sa);
+ apr_socket_addr_get(&sa, APR_LOCAL, (*walk)->sd);
+ apr_sockaddr_port_get(&oldport, sa);
+ apr_sockaddr_ip_get(&oldaddr, sa);
if (!strcmp(oldaddr, addr) && port == oldport) {
/* re-use existing record */
new = *walk;
@@ -240,21 +240,21 @@
/* this has to survive restarts */
new = apr_palloc(process->pool, sizeof(ap_listen_rec));
new->active = 0;
- if ((status = apr_getaddrinfo(&new->bind_addr, addr, APR_UNSPEC, port, 0,
+ if ((status = apr_sockaddr_info_get(&new->bind_addr, addr, APR_UNSPEC, port, 0,
process->pool)) != APR_SUCCESS) {
ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
"alloc_listener: failed to set up sockaddr for %s", addr);
return;
}
- if ((status = apr_create_socket(&new->sd, new->bind_addr->sa.sin.sin_family,
+ if ((status = apr_socket_create(&new->sd, new->bind_addr->sa.sin.sin_family,
SOCK_STREAM, process->pool)) != APR_SUCCESS) {
ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
"alloc_listener: failed to get a socket for %s", addr);
return;
}
- apr_get_sockaddr(&sa, APR_LOCAL, new->sd);
- apr_set_port(sa, port);
- apr_set_ipaddr(sa, addr);
+ apr_socket_addr_get(&sa, APR_LOCAL, new->sd);
+ apr_sockaddr_port_set(sa, port);
+ apr_sockaddr_ip_set(sa, addr);
new->next = ap_listeners;
ap_listeners = new;
}
@@ -289,14 +289,14 @@
/* close the old listeners */
for (lr = old_listeners; lr; lr = next) {
- apr_close_socket(lr->sd);
+ apr_socket_close(lr->sd);
lr->active = 0;
next = lr->next;
/* free(lr);*/
}
old_listeners = NULL;
- apr_register_cleanup(pconf, NULL, apr_null_cleanup, close_listeners_on_exec);
+ apr_pool_cleanup_register(pconf, NULL, apr_pool_cleanup_null, close_listeners_on_exec);
return num_open ? 0 : -1;
}
1.84 +40 -40 httpd-2.0/server/log.c
Index: log.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/log.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- log.c 2001/01/27 21:28:26 1.83
+++ log.c 2001/02/08 07:44:18 1.84
@@ -178,7 +178,7 @@
AP_DECLARE(void) ap_open_stderr_log(apr_pool_t *p)
{
- apr_open_stderr(&stderr_log, p);
+ apr_file_open_stderr(&stderr_log, p);
}
static int log_child(apr_pool_t *p, const char *progname,
@@ -197,8 +197,8 @@
apr_signal(SIGHUP, SIG_IGN);
#endif /* ndef SIGHUP */
- if (((rc = apr_createprocattr_init(&procattr, p)) == APR_SUCCESS) &&
- ((rc = apr_setprocattr_io(procattr,
+ if (((rc = apr_procattr_create(&procattr, p)) == APR_SUCCESS) &&
+ ((rc = apr_procattr_io_set(procattr,
APR_FULL_BLOCK,
APR_NO_PIPE,
APR_NO_PIPE)) == APR_SUCCESS)) {
@@ -208,11 +208,11 @@
apr_tokenize_to_argv(progname, &args, p);
pname = apr_pstrdup(p, args[0]);
procnew = (apr_proc_t *) apr_pcalloc(p, sizeof(*procnew));
- rc = apr_create_process(procnew, pname, (const char * const *)args,
+ rc = apr_proc_create(procnew, pname, (const char * const *)args,
NULL, procattr, p);
if (rc == APR_SUCCESS) {
- apr_note_subprocess(p, procnew, kill_after_timeout);
+ apr_pool_note_subprocess(p, procnew, kill_after_timeout);
(*fpin) = procnew->in;
}
}
@@ -262,7 +262,7 @@
#endif
else {
fname = ap_server_root_relative(p, s->error_fname);
- rc = apr_open(&s->error_log, fname,
+ rc = apr_file_open(&s->error_log, fname,
APR_APPEND | APR_READ | APR_WRITE | APR_CREATE,
APR_OS_DEFAULT, p);
if (rc != APR_SUCCESS) {
@@ -286,9 +286,9 @@
replace_stderr = 1;
if (s_main->error_log) {
/* replace stderr with this new log */
- apr_flush(s_main->error_log);
- apr_open_stderr(&errfile, p);
- if ((rc = apr_dupfile(&errfile, s_main->error_log, p)) != APR_SUCCESS) {
+ apr_file_flush(s_main->error_log);
+ apr_file_open_stderr(&errfile, p);
+ if ((rc = apr_file_dup(&errfile, s_main->error_log, p)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s_main,
"unable to replace stderr with error_log");
} else {
@@ -323,9 +323,9 @@
AP_DECLARE(void) ap_error_log2stderr(server_rec *s) {
apr_file_t *errfile = NULL;
- apr_open_stderr(&errfile, s->process->pool);
+ apr_file_open_stderr(&errfile, s->process->pool);
if (s->error_log != NULL) {
- apr_dupfile(&(s->error_log), errfile, s->process->pool);
+ apr_file_dup(&(s->error_log), errfile, s->process->pool);
}
}
@@ -384,7 +384,7 @@
if (logf && ((level & APLOG_STARTUP) != APLOG_STARTUP)) {
errstr[0] = '[';
- apr_ctime(errstr + 1, apr_now());
+ apr_ctime(errstr + 1, apr_time_now());
errstr[1 + APR_CTIME_LEN - 1] = ']';
errstr[1 + APR_CTIME_LEN ] = ' ';
len = 1 + APR_CTIME_LEN + 1;
@@ -448,8 +448,8 @@
if (len > MAX_STRING_LEN - sizeof(APR_EOL_STR))
len = MAX_STRING_LEN - sizeof(APR_EOL_STR);
strcpy(errstr + len, APR_EOL_STR);
- apr_puts(errstr, logf);
- apr_flush(logf);
+ apr_file_puts(errstr, logf);
+ apr_file_flush(logf);
}
#ifdef HAVE_SYSLOG
else {
@@ -536,7 +536,7 @@
);
}
- if ((rv = apr_open(&pid_file, fname, APR_WRITE | APR_CREATE | APR_TRUNCATE,
+ if ((rv = apr_file_open(&pid_file, fname, APR_WRITE | APR_CREATE | APR_TRUNCATE,
APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
"could not create %s", fname);
@@ -545,8 +545,8 @@
ap_server_argv0, fname);
exit(1);
}
- apr_fprintf(pid_file, "%ld" APR_EOL_STR, (long)mypid);
- apr_close(pid_file);
+ apr_file_printf(pid_file, "%ld" APR_EOL_STR, (long)mypid);
+ apr_file_close(pid_file);
saved_pid = mypid;
}
@@ -554,7 +554,7 @@
{
char time_str[APR_CTIME_LEN];
- apr_ctime(time_str, apr_now());
+ apr_ctime(time_str, apr_time_now());
ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
"[%s] file %s, line %d, assertion \"%s\" failed",
time_str, szFile, nLine, szExp);
@@ -582,8 +582,8 @@
#ifdef SIGHUP
apr_signal(SIGHUP, SIG_IGN);
#endif
- if (((status = apr_createprocattr_init(&procattr, pl->p)) != APR_SUCCESS) ||
- ((status = apr_setprocattr_childin(procattr, ap_piped_log_read_fd(pl),
+ if (((status = apr_procattr_create(&procattr, pl->p)) != APR_SUCCESS) ||
+ ((status = apr_procattr_child_in_set(procattr, ap_piped_log_read_fd(pl),
ap_piped_log_write_fd(pl))) != APR_SUCCESS)) {
char buf[120];
/* Something bad happened, give up and go away. */
@@ -599,17 +599,17 @@
apr_tokenize_to_argv(pl->program, &args, pl->p);
pname = apr_pstrdup(pl->p, args[0]);
procnew = apr_pcalloc(pl->p, sizeof(apr_proc_t));
- rc = apr_create_process(procnew, pname, (const char * const *) args,
+ rc = apr_proc_create(procnew, pname, (const char * const *) args,
NULL, procattr, pl->p);
if (rc == APR_SUCCESS) {
/* pjr - This no longer happens inside the child, */
- /* I am assuming that if apr_create_process was */
+ /* I am assuming that if apr_proc_create was */
/* successful that the child is running. */
RAISE_SIGSTOP(PIPED_LOG_SPAWN);
pl->pid = procnew;
ap_piped_log_write_fd(pl) = procnew->in;
- apr_register_other_child(procnew, piped_log_maintenance, pl,
+ apr_proc_other_child_register(procnew, piped_log_maintenance, pl,
ap_piped_log_write_fd(pl), pl->p);
}
}
@@ -626,7 +626,7 @@
switch (reason) {
case APR_OC_REASON_DEATH:
pl->pid = NULL;
- apr_unregister_other_child(pl);
+ apr_proc_other_child_unregister(pl);
if (pl->program == NULL) {
/* during a restart */
break;
@@ -634,7 +634,7 @@
break;
case APR_OC_REASON_LOST:
pl->pid = NULL;
- apr_unregister_other_child(pl);
+ apr_proc_other_child_unregister(pl);
if (pl->program == NULL) {
/* during a restart */
break;
@@ -657,7 +657,7 @@
case APR_OC_REASON_RESTART:
pl->program = NULL;
if (pl->pid != NULL) {
- apr_kill(pl->pid, SIGTERM);
+ apr_proc_kill(pl->pid, SIGTERM);
}
break;
@@ -672,11 +672,11 @@
piped_log *pl = data;
if (pl->pid != NULL) {
- apr_kill(pl->pid, SIGTERM);
+ apr_proc_kill(pl->pid, SIGTERM);
}
- apr_unregister_other_child(pl);
- apr_close(ap_piped_log_read_fd(pl));
- apr_close(ap_piped_log_write_fd(pl));
+ apr_proc_other_child_unregister(pl);
+ apr_file_close(ap_piped_log_read_fd(pl));
+ apr_file_close(ap_piped_log_write_fd(pl));
return APR_SUCCESS;
}
@@ -685,8 +685,8 @@
{
piped_log *pl = data;
- apr_close(ap_piped_log_read_fd(pl));
- apr_close(ap_piped_log_write_fd(pl));
+ apr_file_close(ap_piped_log_read_fd(pl));
+ apr_file_close(ap_piped_log_write_fd(pl));
return APR_SUCCESS;
}
@@ -698,15 +698,15 @@
pl->p = p;
pl->program = apr_pstrdup(p, program);
pl->pid = NULL;
- if (apr_create_pipe(&ap_piped_log_read_fd(pl), &ap_piped_log_write_fd(pl), p) != APR_SUCCESS) {
+ if (apr_file_pipe_create(&ap_piped_log_read_fd(pl), &ap_piped_log_write_fd(pl), p) != APR_SUCCESS) {
return NULL;
}
- apr_register_cleanup(p, pl, piped_log_cleanup, piped_log_cleanup_for_exec);
+ apr_pool_cleanup_register(p, pl, piped_log_cleanup, piped_log_cleanup_for_exec);
if (piped_log_spawn(pl) == -1) {
int save_errno = errno;
- apr_kill_cleanup(p, pl, piped_log_cleanup);
- apr_close(ap_piped_log_read_fd(pl));
- apr_close(ap_piped_log_write_fd(pl));
+ apr_pool_cleanup_kill(p, pl, piped_log_cleanup);
+ apr_file_close(ap_piped_log_read_fd(pl));
+ apr_file_close(ap_piped_log_write_fd(pl));
errno = save_errno;
return NULL;
}
@@ -719,7 +719,7 @@
{
piped_log *pl = data;
- apr_close(ap_piped_log_write_fd(pl));
+ apr_file_close(ap_piped_log_write_fd(pl));
return APR_SUCCESS;
}
@@ -740,7 +740,7 @@
pl->p = p;
ap_piped_log_read_fd(pl) = NULL;
ap_piped_log_write_fd(pl) = dummy;
- apr_register_cleanup(p, pl, piped_log_cleanup, piped_log_cleanup);
+ apr_pool_cleanup_register(p, pl, piped_log_cleanup, piped_log_cleanup);
return pl;
}
@@ -749,6 +749,6 @@
AP_DECLARE(void) ap_close_piped_log(piped_log *pl)
{
- apr_run_cleanup(pl->p, pl, piped_log_cleanup);
+ apr_pool_cleanup_run(pl->p, pl, piped_log_cleanup);
}
1.88 +21 -21 httpd-2.0/server/main.c
Index: main.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/main.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- main.c 2001/01/27 17:50:47 1.87
+++ main.c 2001/02/08 07:44:18 1.88
@@ -201,7 +201,7 @@
static void destroy_and_exit_process(process_rec *process, int process_exit_value)
{
- apr_destroy_pool(process->pool); /* and destroy all descendent pools */
+ apr_pool_destroy(process->pool); /* and destroy all descendent pools */
apr_terminate();
exit(process_exit_value);
}
@@ -212,13 +212,13 @@
apr_pool_t *cntx;
apr_status_t stat;
- stat = apr_create_pool(&cntx, NULL);
+ stat = apr_pool_create(&cntx, NULL);
if (stat != APR_SUCCESS) {
/* XXX From the time that we took away the NULL pool->malloc mapping
* we have been unable to log here without segfaulting.
*/
ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL,
- "apr_create_pool() failed to create "
+ "apr_pool_create() failed to create "
"initial context");
apr_terminate();
exit(1);
@@ -229,7 +229,7 @@
process = apr_palloc(cntx, sizeof(process_rec));
process->pool = cntx;
- apr_create_pool(&process->pconf, process->pool);
+ apr_pool_create(&process->pconf, process->pool);
process->argc = argc;
process->argv = argv;
process->short_name = apr_filename_of_pathname(argv[0]);
@@ -320,35 +320,35 @@
ap_setup_prelinked_modules(process);
- apr_create_pool(&pcommands, pglobal);
- ap_server_pre_read_config = apr_make_array(pcommands, 1, sizeof(char *));
- ap_server_post_read_config = apr_make_array(pcommands, 1, sizeof(char *));
- ap_server_config_defines = apr_make_array(pcommands, 1, sizeof(char *));
+ apr_pool_create(&pcommands, pglobal);
+ ap_server_pre_read_config = apr_array_make(pcommands, 1, sizeof(char *));
+ ap_server_post_read_config = apr_array_make(pcommands, 1, sizeof(char *));
+ ap_server_config_defines = apr_array_make(pcommands, 1, sizeof(char *));
ap_run_rewrite_args(process);
/* Maintain AP_SERVER_BASEARGS list in http_main.h to allow the MPM
* to safely pass on our args from its rewrite_args() handler.
*/
- apr_initopt(&opt, pcommands, process->argc, process->argv);
+ apr_getopt_init(&opt, pcommands, process->argc, process->argv);
while (apr_getopt(opt, AP_SERVER_BASEARGS, &c, &optarg)
== APR_SUCCESS) {
char **new;
switch (c) {
case 'c':
- new = (char **)apr_push_array(ap_server_post_read_config);
+ new = (char **)apr_array_push(ap_server_post_read_config);
*new = apr_pstrdup(pcommands, optarg);
break;
case 'C':
- new = (char **)apr_push_array(ap_server_pre_read_config);
+ new = (char **)apr_array_push(ap_server_pre_read_config);
*new = apr_pstrdup(pcommands, optarg);
break;
case 'd':
def_server_root = optarg;
break;
case 'D':
- new = (char **)apr_push_array(ap_server_config_defines);
+ new = (char **)apr_array_push(ap_server_config_defines);
*new = apr_pstrdup(pcommands, optarg);
break;
case 'f':
@@ -376,8 +376,8 @@
}
}
- apr_create_pool(&plog, pglobal);
- apr_create_pool(&ptemp, pconf);
+ apr_pool_create(&plog, pglobal);
+ apr_pool_create(&ptemp, pconf);
/* Note that we preflight the config file once
before reading it _again_ in the main loop.
@@ -398,7 +398,7 @@
apr_clear_pool(plog);
ap_run_open_logs(pconf, plog, ptemp, server_conf);
ap_post_config_hook(pconf, plog, ptemp, server_conf);
- apr_destroy_pool(ptemp);
+ apr_pool_destroy(ptemp);
for (;;) {
apr_hook_deregister_all();
@@ -413,7 +413,7 @@
* memory. rbb
*/
ap_conftree = NULL;
- apr_create_pool(&ptemp, pconf);
+ apr_pool_create(&ptemp, pconf);
ap_server_root = def_server_root;
server_conf = ap_read_config(process, ptemp, confname, &ap_conftree);
ap_run_pre_config(pconf, plog, ptemp);
@@ -424,7 +424,7 @@
apr_clear_pool(plog);
ap_run_open_logs(pconf, plog, ptemp, server_conf);
ap_post_config_hook(pconf, plog, ptemp, server_conf);
- apr_destroy_pool(ptemp);
+ apr_pool_destroy(ptemp);
ap_run_optional_fn_retrieve();
@@ -446,13 +446,13 @@
#ifndef SHARED_CORE_BOOTSTRAP
/*
- * Force apr_validate_password() into the image so that modules like
+ * Force apr_password_validate() into the image so that modules like
* mod_auth can use it even if they're dynamically loaded.
*/
-void suck_in_apr_validate_password(void);
-void suck_in_apr_validate_password(void)
+void suck_in_apr_password_validate(void);
+void suck_in_apr_password_validate(void)
{
- apr_validate_password("a", "b");
+ apr_password_validate("a", "b");
}
#endif
1.39 +4 -4 httpd-2.0/server/mpm_common.c
Index: mpm_common.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm_common.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- mpm_common.c 2001/01/28 01:16:36 1.38
+++ mpm_common.c 2001/02/08 07:44:18 1.39
@@ -115,7 +115,7 @@
continue;
proc.pid = pid;
- waitret = apr_wait_proc(&proc, APR_NOWAIT);
+ waitret = apr_proc_wait(&proc, APR_NOWAIT);
if (waitret != APR_CHILD_NOTDONE) {
MPM_NOTE_CHILD_KILLED(i);
continue;
@@ -168,7 +168,7 @@
break;
}
}
- apr_check_other_child();
+ apr_proc_other_child_check();
if (!not_dead_yet) {
/* nothing left to wait for */
break;
@@ -191,10 +191,10 @@
if (wait_or_timeout_counter == INTERVAL_OF_WRITABLE_PROBES) {
wait_or_timeout_counter = 0;
#if APR_HAS_OTHER_CHILD
- apr_probe_writable_fds();
+ apr_proc_probe_writable_fds();
#endif
}
- rv = apr_wait_all_procs(ret, status, APR_NOWAIT, p);
+ rv = apr_proc_wait_all_procs(ret, status, APR_NOWAIT, p);
if (APR_STATUS_IS_EINTR(rv)) {
ret->pid = -1;
return;
1.36 +11 -11 httpd-2.0/server/rfc1413.c
Index: rfc1413.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/rfc1413.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- rfc1413.c 2000/12/19 16:08:03 1.35
+++ rfc1413.c 2001/02/08 07:44:19 1.36
@@ -120,29 +120,29 @@
apr_status_t rv;
apr_sockaddr_t *localsa, *destsa;
- if ((rv = apr_getaddrinfo(&localsa, conn->local_ip, APR_UNSPEC,
+ if ((rv = apr_sockaddr_info_get(&localsa, conn->local_ip, APR_UNSPEC,
0, /* ephemeral port */
0, conn->pool)) != APR_SUCCESS) {
/* This should not fail since we have a numeric address string
* as the host. */
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
- "rfc1413: apr_getaddrinfo(%s) failed",
+ "rfc1413: apr_sockaddr_info_get(%s) failed",
conn->local_ip);
return rv;
}
- if ((rv = apr_getaddrinfo(&destsa, conn->remote_ip,
+ if ((rv = apr_sockaddr_info_get(&destsa, conn->remote_ip,
localsa->sa.sin.sin_family, /* has to match */
RFC1413_PORT, 0, conn->pool)) != APR_SUCCESS) {
/* This should not fail since we have a numeric address string
* as the host. */
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
- "rfc1413: apr_getaddrinfo(%s) failed",
+ "rfc1413: apr_sockaddr_info_get(%s) failed",
conn->remote_ip);
return rv;
}
- if ((rv = apr_create_socket(newsock,
+ if ((rv = apr_socket_create(newsock,
localsa->sa.sin.sin_family, /* has to match */
SOCK_STREAM, conn->pool)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
@@ -155,7 +155,7 @@
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
"rfc1413: error setting query socket timeout");
- apr_close_socket(*newsock);
+ apr_socket_close(*newsock);
return rv;
}
@@ -171,7 +171,7 @@
if ((rv = apr_bind(*newsock, localsa)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
"rfc1413: Error binding query socket to local port");
- apr_close_socket(*newsock);
+ apr_socket_close(*newsock);
return rv;
}
@@ -180,7 +180,7 @@
* the service; don't log such an error
*/
if ((rv = apr_connect(*newsock, destsa)) != APR_SUCCESS) {
- apr_close_socket(*newsock);
+ apr_socket_close(*newsock);
return rv;
}
@@ -199,8 +199,8 @@
int buflen;
apr_sockaddr_t *localsa;
- apr_get_sockaddr(&localsa, APR_LOCAL, sock);
- apr_get_port(&sav_our_port, localsa);
+ apr_socket_addr_get(&localsa, APR_LOCAL, sock);
+ apr_sockaddr_port_get(&sav_our_port, localsa);
sav_rmt_port = RFC1413_PORT;
/* send the data */
@@ -282,7 +282,7 @@
rv = rfc1413_connect(&sock, conn, srv);
if (rv == APR_SUCCESS) {
rv = rfc1413_query(sock, conn, srv);
- apr_close_socket(sock);
+ apr_socket_close(sock);
}
if (rv != APR_SUCCESS) {
conn->remote_logname = FROM_UNKNOWN;
1.9 +4 -4 httpd-2.0/server/scoreboard.c
Index: scoreboard.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- scoreboard.c 2001/02/07 21:41:43 1.8
+++ scoreboard.c 2001/02/08 07:44:19 1.9
@@ -184,8 +184,8 @@
memset(ap_scoreboard_image, 0, SCOREBOARD_SIZE);
ap_scoreboard_image->global.sb_type = sb_type;
ap_scoreboard_image->global.running_generation = running_gen;
- ap_restart_time = apr_now();
- apr_register_cleanup(p, NULL, ap_cleanup_scoreboard, apr_null_cleanup);
+ ap_restart_time = apr_time_now();
+ apr_pool_cleanup_register(p, NULL, ap_cleanup_scoreboard, apr_pool_cleanup_null);
}
/* ToDo:
@@ -334,10 +334,10 @@
ss = &ap_scoreboard_image->servers[child_num][thread_num];
if (status == START_PREQUEST) {
- ss->start_time = apr_now();
+ ss->start_time = apr_time_now();
}
else if (status == STOP_PREQUEST) {
- ss->stop_time = apr_now();
+ ss->stop_time = apr_time_now();
}
put_scoreboard_info(child_num, thread_num, ss);
}
1.98 +12 -12 httpd-2.0/server/util.c
Index: util.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/util.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- util.c 2001/02/01 09:59:25 1.97
+++ util.c 2001/02/08 07:44:19 1.98
@@ -293,7 +293,7 @@
return NULL;
}
- apr_register_cleanup(p, (void *) preg, regex_cleanup, regex_cleanup);
+ apr_pool_cleanup_register(p, (void *) preg, regex_cleanup, regex_cleanup);
return preg;
}
@@ -301,7 +301,7 @@
AP_DECLARE(void) ap_pregfree(apr_pool_t *p, regex_t * reg)
{
regfree(reg);
- apr_kill_cleanup(p, (void *) reg, regex_cleanup);
+ apr_pool_cleanup_kill(p, (void *) reg, regex_cleanup);
}
/*
@@ -839,14 +839,14 @@
static apr_status_t cfg_close(void *param)
{
apr_file_t *cfp = (apr_file_t *) param;
- return (apr_close(cfp));
+ return (apr_file_close(cfp));
}
static int cfg_getch(void *param)
{
char ch;
apr_file_t *cfp = (apr_file_t *) param;
- if (apr_getc(&ch, cfp) == APR_SUCCESS)
+ if (apr_file_getc(&ch, cfp) == APR_SUCCESS)
return ch;
return (int)EOF;
}
@@ -855,7 +855,7 @@
{
apr_file_t *cfp = (apr_file_t *) param;
apr_status_t rv;
- rv = apr_fgets(buf, bufsiz, cfp);
+ rv = apr_file_gets(buf, bufsiz, cfp);
if (rv == APR_SUCCESS || (rv == APR_EOF && strcmp(buf, "")))
return buf;
return NULL;
@@ -885,7 +885,7 @@
* it was the admin's choice to assign the .htaccess file's name.
*/
- status = apr_open(&file, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p);
+ status = apr_file_open(&file, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p);
#ifdef DEBUG
ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, NULL,
"Opening config file %s (%s)",
@@ -895,7 +895,7 @@
if (status != APR_SUCCESS)
return status;
- status = apr_getfileinfo(&finfo, APR_FINFO_TYPE, file);
+ status = apr_file_info_get(&finfo, APR_FINFO_TYPE, file);
if (status != APR_SUCCESS)
return status;
@@ -910,7 +910,7 @@
ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, NULL,
"Access to file %s denied by server: not a regular file",
name);
- apr_close(file);
+ apr_file_close(file);
return APR_EBADF;
}
@@ -1828,8 +1828,8 @@
char *decoded;
int l;
- decoded = (char *) apr_palloc(p, 1 + apr_base64decode_len(bufcoded));
- l = apr_base64decode(decoded, bufcoded);
+ decoded = (char *) apr_palloc(p, 1 + apr_base64_decode_len(bufcoded));
+ l = apr_base64_decode(decoded, bufcoded);
decoded[l] = '\0'; /* make binary sequence into string */
return decoded;
@@ -1840,8 +1840,8 @@
char *encoded;
int l = strlen(string);
- encoded = (char *) apr_palloc(p, 1 + apr_base64encode_len(l));
- l = apr_base64encode(encoded, string, l);
+ encoded = (char *) apr_palloc(p, 1 + apr_base64_encode_len(l));
+ l = apr_base64_encode(encoded, string, l);
encoded[l] = '\0'; /* make binary sequence into string */
return encoded;
1.44 +1 -1 httpd-2.0/server/util_filter.c
Index: util_filter.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/util_filter.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- util_filter.c 2001/01/19 07:04:29 1.43
+++ util_filter.c 2001/02/08 07:44:21 1.44
@@ -104,7 +104,7 @@
frec->next = *reg_filter_list;
*reg_filter_list = frec;
- apr_register_cleanup(FILTER_POOL, NULL, filter_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(FILTER_POOL, NULL, filter_cleanup, apr_pool_cleanup_null);
}
AP_DECLARE(void) ap_register_input_filter(const char *name,
1.25 +9 -9 httpd-2.0/server/util_md5.c
Index: util_md5.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/util_md5.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- util_md5.c 2000/12/20 16:43:48 1.24
+++ util_md5.c 2001/02/08 07:44:21 1.25
@@ -104,12 +104,12 @@
* Take the MD5 hash of the string argument.
*/
- apr_MD5Init(&my_md5);
+ apr_md5_init(&my_md5);
#if APR_CHARSET_EBCDIC
- apr_MD5SetXlate(&my_md5, ap_hdrs_to_ascii);
+ apr_md5_set_xlate(&my_md5, ap_hdrs_to_ascii);
#endif
- apr_MD5Update(&my_md5, buf, (unsigned int)length);
- apr_MD5Final(hash, &my_md5);
+ apr_md5_update(&my_md5, buf, (unsigned int)length);
+ apr_md5_final(hash, &my_md5);
for (i = 0, r = result; i < MD5_DIGESTSIZE; i++) {
*r++ = hex[hash[i] >> 4];
@@ -179,7 +179,7 @@
encodedDigest = (char *) apr_pcalloc(a, 25 * sizeof(char));
- apr_MD5Final(digest, context);
+ apr_md5_final(digest, context);
digest[sizeof(digest) - 1] = digest[sizeof(digest) - 2] = 0;
p = encodedDigest;
@@ -203,13 +203,13 @@
apr_size_t nbytes;
apr_off_t offset = 0L;
- apr_MD5Init(&context);
+ apr_md5_init(&context);
nbytes = sizeof(buf);
- while (apr_read(infile, buf, &nbytes) == APR_SUCCESS) {
+ while (apr_file_read(infile, buf, &nbytes) == APR_SUCCESS) {
length += nbytes;
- apr_MD5Update(&context, buf, nbytes);
+ apr_md5_update(&context, buf, nbytes);
}
- apr_seek(infile, APR_SET, &offset);
+ apr_file_seek(infile, APR_SET, &offset);
return ap_md5contextTo64(p, &context);
}
1.53 +9 -9 httpd-2.0/server/util_script.c
Index: util_script.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/util_script.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- util_script.c 2000/12/20 16:43:49 1.52
+++ util_script.c 2001/02/08 07:44:21 1.53
@@ -172,7 +172,7 @@
/* use a temporary apr_table_t which we'll overlap onto
* r->subprocess_env later
*/
- e = apr_make_table(r->pool, 25 + hdrs_arr->nelts);
+ e = apr_table_make(r->pool, 25 + hdrs_arr->nelts);
/* First, add environment vars from headers... this is as per
* CGI specs, though other sorts of scripting interfaces see
@@ -258,8 +258,8 @@
apr_table_addn(e, "SERVER_ADMIN", s->server_admin); /* Apache */
apr_table_addn(e, "SCRIPT_FILENAME", r->filename); /* Apache */
- apr_get_sockaddr(&remotesa, APR_REMOTE, c->client_socket);
- apr_get_port(&rport, remotesa);
+ apr_socket_addr_get(&remotesa, APR_REMOTE, c->client_socket);
+ apr_sockaddr_port_get(&rport, remotesa);
apr_table_addn(e, "REMOTE_PORT", apr_psprintf(r->pool, "%d", rport));
if (r->user) {
@@ -284,7 +284,7 @@
}
}
- apr_overlap_tables(r->subprocess_env, e, APR_OVERLAP_TABLES_SET);
+ apr_table_overlap(r->subprocess_env, e, APR_OVERLAP_TABLES_SET);
}
/* This "cute" little function comes about because the path info on
@@ -396,7 +396,7 @@
w = buffer ? buffer : x;
/* temporary place to hold headers to merge in later */
- merge = apr_make_table(r->pool, 10);
+ merge = apr_table_make(r->pool, 10);
/* The HTTP specification says that it is legal to merge duplicate
* headers into one. Some browsers that support Cookies don't like
@@ -404,7 +404,7 @@
* separately. Lets humour those browsers by not merging.
* Oh what a pain it is.
*/
- cookie_table = apr_make_table(r->pool, 2);
+ cookie_table = apr_table_make(r->pool, 2);
apr_table_do(set_cookie_doo_doo, cookie_table, r->err_headers_out, "Set-Cookie", NULL);
while (1) {
@@ -449,12 +449,12 @@
if ((cgi_status == HTTP_OK) && (r->method_number == M_GET)) {
cond_status = ap_meets_conditions(r);
}
- apr_overlap_tables(r->err_headers_out, merge,
+ apr_table_overlap(r->err_headers_out, merge,
APR_OVERLAP_TABLES_MERGE);
if (!apr_is_empty_table(cookie_table)) {
/* the cookies have already been copied to the cookie_table */
apr_table_unset(r->err_headers_out, "Set-Cookie");
- r->err_headers_out = apr_overlay_tables(r->pool,
+ r->err_headers_out = apr_table_overlay(r->pool,
r->err_headers_out, cookie_table);
}
return cond_status;
@@ -562,7 +562,7 @@
static int getsfunc_FILE(char *buf, int len, void *f)
{
- return apr_fgets(buf, len, (apr_file_t *) f) == APR_SUCCESS;
+ return apr_file_gets(buf, len, (apr_file_t *) f) == APR_SUCCESS;
}
AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f,
1.13 +2 -2 httpd-2.0/server/util_xml.c
Index: util_xml.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/util_xml.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- util_xml.c 2000/11/26 04:47:31 1.12
+++ util_xml.c 2001/02/08 07:44:22 1.13
@@ -381,7 +381,7 @@
ctx.p = r->pool;
ctx.doc = apr_pcalloc(ctx.p, sizeof(*ctx.doc));
- ctx.doc->namespaces = apr_make_array(ctx.p, 5, sizeof(const char *));
+ ctx.doc->namespaces = apr_array_make(ctx.p, 5, sizeof(const char *));
ap_xml_insert_uri(ctx.doc->namespaces, "DAV:");
/* ### we should get the encoding from Content-Encoding */
@@ -863,7 +863,7 @@
return i;
}
- pelt = apr_push_array(uri_array);
+ pelt = apr_array_push(uri_array);
*pelt = uri; /* assume uri is const or in a pool */
return uri_array->nelts - 1;
}
1.53 +18 -18 httpd-2.0/server/vhost.c
Index: vhost.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/vhost.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- vhost.c 2001/01/24 01:05:47 1.52
+++ vhost.c 2001/02/08 07:44:22 1.53
@@ -220,15 +220,15 @@
}
if (strcmp(host, "*") == 0) {
- rv = apr_getaddrinfo(&my_addr, NULL, APR_INET, port, 0, p);
+ rv = apr_sockaddr_info_get(&my_addr, NULL, APR_INET, port, 0, p);
my_addr->sa.sin.sin_addr.s_addr = htonl(INADDR_ANY);
} else if (strcasecmp(host, "_default_") == 0
|| strcmp(host, "255.255.255.255") == 0) {
- rv = apr_getaddrinfo(&my_addr, NULL, APR_INET, port, 0, p);
+ rv = apr_sockaddr_info_get(&my_addr, NULL, APR_INET, port, 0, p);
ap_assert(rv == APR_SUCCESS); /* must be bug or out of storage */
my_addr->sa.sin.sin_addr.s_addr = DEFAULT_VHOST_ADDR;
} else {
- rv = apr_getaddrinfo(&my_addr, host, APR_UNSPEC, port, 0, p);
+ rv = apr_sockaddr_info_get(&my_addr, host, APR_UNSPEC, port, 0, p);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
"Cannot resolve host name %s --- ignoring!", host);
@@ -237,7 +237,7 @@
}
/* XXX Gotta go through *all* addresses for the host name!
- * Fix apr_getaddrinfo() to save them! */
+ * Fix apr_sockaddr_info_get() to save them! */
sar = apr_pcalloc(p, sizeof(server_addr_rec));
**paddr = sar;
@@ -457,22 +457,22 @@
buf[len-1] = '*';
}
if (ic->names == NULL) {
- apr_fprintf(f, "%-22s %s (%s:%u)\n", buf, ic->server->server_hostname,
+ apr_file_printf(f, "%-22s %s (%s:%u)\n", buf, ic->server->server_hostname,
ic->server->defn_name, ic->server->defn_line_number);
return;
}
- apr_fprintf(f, "%-22s is a NameVirtualHost\n"
+ apr_file_printf(f, "%-22s is a NameVirtualHost\n"
"%8s default server %s (%s:%u)\n",
buf, "", ic->server->server_hostname,
ic->server->defn_name, ic->server->defn_line_number);
for (nc = ic->names; nc; nc = nc->next) {
if (nc->sar->host_port) {
- apr_fprintf(f, "%8s port %u ", "", nc->sar->host_port);
+ apr_file_printf(f, "%8s port %u ", "", nc->sar->host_port);
}
else {
- apr_fprintf(f, "%8s port * ", "");
+ apr_file_printf(f, "%8s port * ", "");
}
- apr_fprintf(f, "namevhost %s (%s:%u)\n", nc->server->server_hostname,
+ apr_file_printf(f, "namevhost %s (%s:%u)\n", nc->server->server_hostname,
nc->server->defn_name, nc->server->defn_line_number);
}
}
@@ -482,14 +482,14 @@
ipaddr_chain *ic;
int i;
- apr_fprintf(f, "VirtualHost configuration:\n");
+ apr_file_printf(f, "VirtualHost configuration:\n");
for (i = 0; i < IPHASH_TABLE_SIZE; ++i) {
for (ic = iphash_table[i]; ic; ic = ic->next) {
dump_a_vhost(f, ic);
}
}
if (default_list) {
- apr_fprintf(f, "wildcard NameVirtualHosts and _default_ servers:\n");
+ apr_file_printf(f, "wildcard NameVirtualHosts and _default_ servers:\n");
for (ic = default_list; ic; ic = ic->next) {
dump_a_vhost(f, ic);
}
@@ -679,7 +679,7 @@
ServerName, and their DNS isn't working. -djg */
char *ipaddr_str;
- apr_get_ipaddr(&ipaddr_str, s->addrs->host_addr);
+ apr_sockaddr_ip_get(&ipaddr_str, s->addrs->host_addr);
ap_log_error(APLOG_MARK, APLOG_ERR, rv, main_s,
"Failed to resolve server name "
"for %s (check DNS) -- or specify an explicit "
@@ -705,7 +705,7 @@
#endif
if (ap_exists_config_define("DUMP_VHOSTS")) {
apr_file_t *thefile = NULL;
- apr_open_stderr(&thefile, p);
+ apr_file_open_stderr(&thefile, p);
dump_vhost_config(thefile);
}
}
@@ -875,8 +875,8 @@
apr_sockaddr_t *localsa;
last_s = NULL;
- apr_get_sockaddr(&localsa, APR_LOCAL, r->connection->client_socket);
- apr_get_port(&port, localsa);
+ apr_socket_addr_get(&localsa, APR_LOCAL, r->connection->client_socket);
+ apr_sockaddr_port_get(&port, localsa);
/* Recall that the name_chain is a list of server_addr_recs, some of
* whose ports may not match. Also each server may appear more than
@@ -933,8 +933,8 @@
apr_port_t port;
apr_sockaddr_t *localsa;
- apr_get_sockaddr(&localsa, APR_LOCAL, r->connection->client_socket);
- apr_get_port(&port, localsa);
+ apr_socket_addr_get(&localsa, APR_LOCAL, r->connection->client_socket);
+ apr_sockaddr_port_get(&port, localsa);
/*
* This is in conjunction with the ServerPath code in http_core, so we
@@ -1008,7 +1008,7 @@
/* maybe there's a default server or wildcard name-based vhost
* matching this port
*/
- apr_get_port(&port, conn->local_addr);
+ apr_sockaddr_port_get(&port, conn->local_addr);
trav = find_default_server(port);
if (trav) {
conn->vhost_lookup_data = trav->names;
1.38 +23 -23 httpd-2.0/server/mpm/beos/beos.c
Index: beos.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/beos/beos.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- beos.c 2001/02/07 13:17:27 1.37
+++ beos.c 2001/02/08 07:44:28 1.38
@@ -150,7 +150,7 @@
static void clean_child_exit(int code)
{
if (pchild)
- apr_destroy_pool(pchild);
+ apr_pool_destroy(pchild);
exit(code);
}
@@ -304,14 +304,14 @@
long conn_id = my_child_num;
int csd;
- (void)apr_get_os_sock(&csd, sock);
+ (void)apr_os_sock_get(&csd, sock);
if (csd >= FD_SETSIZE) {
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL,
"filedescriptor (%u) larger than FD_SETSIZE (%u) "
"found, you probably need to rebuild Apache with a "
"larger FD_SETSIZE", csd, FD_SETSIZE);
- apr_close_socket(sock);
+ apr_socket_close(sock);
return;
}
@@ -344,22 +344,22 @@
sigfillset(&sig_mask);
sigprocmask(SIG_BLOCK, &sig_mask, NULL);
- apr_create_pool(&ptrans, tpool);
+ apr_pool_create(&ptrans, tpool);
- apr_lock(worker_thread_count_mutex);
+ apr_lock_aquire(worker_thread_count_mutex);
worker_thread_count++;
- apr_unlock(worker_thread_count_mutex);
+ apr_lock_release(worker_thread_count_mutex);
- apr_setup_poll(&pollset, num_listening_sockets, tpool);
+ apr_poll_setup(&pollset, num_listening_sockets, tpool);
for(n=0 ; n < num_listening_sockets ; ++n)
- apr_add_poll_socket(pollset, listening_sockets[n], APR_POLLIN);
+ apr_poll_socket_add(pollset, listening_sockets[n], APR_POLLIN);
while (!this_worker_should_exit) {
this_worker_should_exit |= (ap_max_requests_per_child != 0) && (requests_this_child <= 0);
if (this_worker_should_exit) break;
- apr_lock(accept_mutex);
+ apr_lock_aquire(accept_mutex);
while (!this_worker_should_exit) {
apr_int16_t event;
apr_status_t ret = apr_poll(pollset, &srv, -1);
@@ -394,7 +394,7 @@
curr_pollfd = 1;
}
/* Get the revent... */
- apr_get_revents(&event, listening_sockets[curr_pollfd], pollset);
+ apr_poll_revents_get(&event, listening_sockets[curr_pollfd], pollset);
if (event & APR_POLLIN) {
last_pollfd = curr_pollfd;
@@ -407,7 +407,7 @@
got_fd:
if (!this_worker_should_exit) {
rv = apr_accept(&csd, sd, ptrans);
- apr_unlock(accept_mutex);
+ apr_lock_release(accept_mutex);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
"apr_accept");
@@ -417,21 +417,21 @@
}
}
else {
- apr_unlock(accept_mutex);
+ apr_lock_release(accept_mutex);
break;
}
apr_clear_pool(ptrans);
}
- apr_destroy_pool(tpool);
- apr_lock(worker_thread_count_mutex);
+ apr_pool_destroy(tpool);
+ apr_lock_aquire(worker_thread_count_mutex);
worker_thread_count--;
if (worker_thread_count == 0) {
/* All the threads have exited, now finish the shutdown process
* by signalling the sigwait thread */
kill(server_pid, SIGTERM);
}
- apr_unlock(worker_thread_count_mutex);
+ apr_lock_release(worker_thread_count_mutex);
return (0);
}
@@ -448,7 +448,7 @@
}
my_info->slot = slot;
- apr_create_pool(&my_info->tpool, pchild);
+ apr_pool_create(&my_info->tpool, pchild);
if (slot + 1 > ap_max_child_assigned)
ap_max_child_assigned = slot + 1;
@@ -590,7 +590,7 @@
}
#if APR_HAS_OTHER_CHILD
}
- else if (apr_reap_other_child(&pid, status) == 0) {
+ else if (apr_proc_other_child_read(&pid, status) == 0) {
/* handled */
#endif
}
@@ -654,7 +654,7 @@
* used to lock around select so we only have one thread
* in select at a time
*/
- if ((rv = apr_create_lock(&accept_mutex, APR_MUTEX, APR_CROSS_PROCESS,
+ if ((rv = apr_lock_create(&accept_mutex, APR_MUTEX, APR_CROSS_PROCESS,
NULL, pconf)) != APR_SUCCESS) {
/* tsch tsch, can't have more than one thread in the accept loop
at a time so we need to fall on our sword... */
@@ -665,7 +665,7 @@
/* worker_thread_count_mutex
* locks the worker_thread_count so we have ana ccurate count...
*/
- if ((rv = apr_create_lock(&worker_thread_count_mutex, APR_MUTEX, APR_CROSS_PROCESS,
+ if ((rv = apr_lock_create(&worker_thread_count_mutex, APR_MUTEX, APR_CROSS_PROCESS,
NULL, pconf)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
"Couldn't create worker thread count lock");
@@ -701,7 +701,7 @@
/* setup the child pool to use for the workers. Each worker creates
* a seperate pool of it's own to use.
*/
- apr_create_pool(&pchild, pconf);
+ apr_pool_create(&pchild, pconf);
ap_child_init_hook(pchild, ap_server_conf);
/* Now that we have the child pool (pchild) we can allocate
@@ -797,8 +797,8 @@
/* just before we go, tidy up the locks we've created to prevent a
* potential leak of semaphores... */
- apr_destroy_lock(worker_thread_count_mutex);
- apr_destroy_lock(accept_mutex);
+ apr_lock_destroy(worker_thread_count_mutex);
+ apr_lock_destroy(accept_mutex);
return 0;
}
@@ -815,7 +815,7 @@
if (restart_num++ == 1) {
is_graceful = 0;
if (!one_process && !no_detach)
- apr_detach();
+ apr_proc_detach();
server_pid = getpid();
}
1.144 +28 -28 httpd-2.0/server/mpm/dexter/dexter.c
Index: dexter.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/dexter/dexter.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -r1.143 -r1.144
--- dexter.c 2001/02/07 20:49:24 1.143
+++ dexter.c 2001/02/08 07:44:28 1.144
@@ -181,7 +181,7 @@
static void clean_child_exit(int code)
{
if (pchild) {
- apr_destroy_pool(pchild);
+ apr_pool_destroy(pchild);
}
exit(code);
}
@@ -258,7 +258,7 @@
restart_pending = 1;
is_graceful = graceful;
if (is_graceful) {
- apr_kill_cleanup(pconf, NULL, ap_cleanup_scoreboard);
+ apr_pool_cleanup_kill(pconf, NULL, ap_cleanup_scoreboard);
}
}
@@ -399,8 +399,8 @@
int csd;
apr_status_t rv;
- if ((rv = apr_get_os_sock(&csd, sock)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, "apr_get_os_sock");
+ if ((rv = apr_os_sock_get(&csd, sock)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, "apr_os_sock_get");
}
if (csd >= FD_SETSIZE) {
@@ -409,7 +409,7 @@
"to rebuild Apache with a larger FD_SETSIZE "
"(currently %d)",
csd, FD_SETSIZE);
- apr_close_socket(sock);
+ apr_socket_close(sock);
return;
}
@@ -511,17 +511,17 @@
apr_status_t rv;
pthread_mutex_lock(&thread_pool_parent_mutex);
- apr_create_pool(&tpool, thread_pool_parent);
+ apr_pool_create(&tpool, thread_pool_parent);
pthread_mutex_unlock(&thread_pool_parent_mutex);
- apr_create_pool(&ptrans, tpool);
+ apr_pool_create(&ptrans, tpool);
(void) ap_update_child_status(child_num, thread_num, SERVER_STARTING,
(request_rec *) NULL);
- apr_setup_poll(&pollset, num_listenfds+1, tpool);
+ apr_poll_setup(&pollset, num_listenfds+1, tpool);
for(n=0 ; n <= num_listenfds ; ++n)
- apr_add_poll_socket(pollset, listenfds[n], APR_POLLIN);
+ apr_poll_socket_add(pollset, listenfds[n], APR_POLLIN);
while (1) {
workers_may_exit |= (max_requests_per_child != 0) && (requests_this_child <= 0);
@@ -544,10 +544,10 @@
(void) ap_update_child_status(child_num, thread_num, SERVER_READY,
(request_rec *) NULL);
- if ((rv = SAFE_ACCEPT(apr_lock(accept_mutex)))
+ if ((rv = SAFE_ACCEPT(apr_lock_aquire(accept_mutex)))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_lock failed. Attempting to shutdown "
+ "apr_lock_aquire failed. Attempting to shutdown "
"process gracefully.");
workers_may_exit = 1;
}
@@ -569,7 +569,7 @@
}
if (workers_may_exit) break;
- apr_get_revents(&event, listenfds[0], pollset);
+ apr_poll_revents_get(&event, listenfds[0], pollset);
if (event & APR_POLLIN) {
/* A process got a signal on the shutdown pipe. Check if we're
* the lucky process to die. */
@@ -590,7 +590,7 @@
curr_pollfd = 1;
}
/* XXX: Should we check for POLLERR? */
- apr_get_revents(&event, listenfds[curr_pollfd], pollset);
+ apr_poll_revents_get(&event, listenfds[curr_pollfd], pollset);
if (event & APR_POLLIN) {
last_pollfd = curr_pollfd;
sd = listenfds[curr_pollfd];
@@ -605,10 +605,10 @@
csd = NULL;
ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, "apr_accept");
}
- if ((rv = SAFE_ACCEPT(apr_unlock(accept_mutex)))
+ if ((rv = SAFE_ACCEPT(apr_lock_release(accept_mutex)))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_unlock failed. Attempting to shutdown "
+ "apr_lock_release failed. Attempting to shutdown "
"process gracefully.");
workers_may_exit = 1;
}
@@ -627,10 +627,10 @@
requests_this_child--;
}
} else {
- if ((rv = SAFE_ACCEPT(apr_unlock(accept_mutex)))
+ if ((rv = SAFE_ACCEPT(apr_lock_release(accept_mutex)))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_unlock failed. Attempting to shutdown "
+ "apr_lock_release failed. Attempting to shutdown "
"process gracefully.");
workers_may_exit = 1;
}
@@ -669,11 +669,11 @@
my_pid = getpid();
child_num = child_num_arg;
- apr_create_pool(&pchild, pconf);
+ apr_pool_create(&pchild, pconf);
/*stuff to do before we switch id's, so we have permissions.*/
- rv = SAFE_ACCEPT(apr_child_init_lock(&accept_mutex, lock_fname,
+ rv = SAFE_ACCEPT(apr_lock_child_init(&accept_mutex, lock_fname,
pchild));
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
@@ -726,7 +726,7 @@
for (i = 0; i < max_threads; i++) {
worker_thread_free_ids[i] = i;
}
- apr_create_pool(&thread_pool_parent, pchild);
+ apr_pool_create(&thread_pool_parent, pchild);
pthread_mutex_init(&thread_pool_parent_mutex, NULL);
pthread_mutex_init(&idle_thread_count_mutex, NULL);
pthread_mutex_init(&worker_thread_count_mutex, NULL);
@@ -936,7 +936,7 @@
}
#if APR_HAS_OTHER_CHILD
}
- else if (apr_reap_other_child(&pid, status) == 0) {
+ else if (apr_proc_other_child_read(&pid, status) == 0) {
/* handled */
#endif
}
@@ -984,17 +984,17 @@
pconf = _pconf;
ap_server_conf = s;
- if ((rv = apr_create_pipe(&pipe_of_death_in, &pipe_of_death_out, pconf))
+ if ((rv = apr_file_pipe_create(&pipe_of_death_in, &pipe_of_death_out, pconf))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv,
(const server_rec*) ap_server_conf,
- "apr_create_pipe (pipe_of_death)");
+ "apr_file_pipe_create (pipe_of_death)");
exit(1);
}
- if ((rv = apr_set_pipe_timeout(pipe_of_death_in, 0)) != APR_SUCCESS) {
+ if ((rv = apr_file_pipe_timeout_set(pipe_of_death_in, 0)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv,
(const server_rec*) ap_server_conf,
- "apr_set_pipe_timeout (pipe_of_death)");
+ "apr_file_pipe_timeout_set (pipe_of_death)");
exit(1);
}
ap_server_conf = s;
@@ -1010,7 +1010,7 @@
lock_fname = apr_psprintf(_pconf, "%s.%u",
ap_server_root_relative(_pconf, lock_fname),
my_pid);
- rv = SAFE_ACCEPT(apr_create_lock(&accept_mutex, APR_MUTEX,
+ rv = SAFE_ACCEPT(apr_lock_create(&accept_mutex, APR_MUTEX,
APR_LOCKALL, lock_fname, _pconf));
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
@@ -1110,7 +1110,7 @@
}
/* give the children the signal to die */
for (i = 0; i < num_daemons;) {
- if ((rv = apr_write(pipe_of_death_out, &char_of_death, &one)) != APR_SUCCESS) {
+ if ((rv = apr_file_write(pipe_of_death_out, &char_of_death, &one)) != APR_SUCCESS) {
if (APR_STATUS_IS_EINTR(rv)) continue;
ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
"write pipe_of_death");
@@ -1147,7 +1147,7 @@
is_graceful = 0;
if (!one_process && !no_detach) {
- apr_detach();
+ apr_proc_detach();
}
my_pid = getpid();
1.64 +17 -17 httpd-2.0/server/mpm/mpmt_beos/mpmt_beos.c
Index: mpmt_beos.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_beos/mpmt_beos.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- mpmt_beos.c 2001/02/07 13:17:28 1.63
+++ mpmt_beos.c 2001/02/08 07:44:29 1.64
@@ -149,7 +149,7 @@
void clean_child_exit(int code)
{
if (pchild) {
- apr_destroy_pool(pchild);
+ apr_pool_destroy(pchild);
}
exit(code);
}
@@ -324,11 +324,11 @@
sigfillset(&sig_mask);
sigprocmask(SIG_BLOCK, &sig_mask, NULL);
- apr_create_pool(&ptrans, tpool);
+ apr_pool_create(&ptrans, tpool);
- apr_lock(worker_thread_count_mutex);
+ apr_lock_aquire(worker_thread_count_mutex);
worker_thread_count++;
- apr_unlock(worker_thread_count_mutex);
+ apr_lock_release(worker_thread_count_mutex);
/* TODO: Switch to a system where threads reuse the results from earlier
poll calls - manoj */
@@ -336,7 +336,7 @@
workers_may_exit |= (ap_max_requests_per_child != 0) && (requests_this_child <= 0);
if (workers_may_exit) break;
- apr_lock(accept_mutex);
+ apr_lock_aquire(accept_mutex);
while (!workers_may_exit) {
srv = poll(listenfds, num_listenfds + 1, -1);
if (srv < 0) {
@@ -368,7 +368,7 @@
/* XXX: Should we check for POLLERR? */
if (listenfds[curr_pollfd].revents & POLLIN) {
last_pollfd = curr_pollfd;
- apr_put_os_sock(&sd, &listenfds[curr_pollfd].fd, tpool);
+ apr_os_sock_put(&sd, &listenfds[curr_pollfd].fd, tpool);
goto got_fd;
}
} while (curr_pollfd != last_pollfd);
@@ -377,27 +377,27 @@
got_fd:
if (!workers_may_exit) {
apr_accept(&csd, sd, ptrans);
- apr_unlock(accept_mutex);
+ apr_lock_release(accept_mutex);
process_socket(ptrans, csd, process_slot,
thread_slot);
requests_this_child--;
}
else {
- apr_unlock(accept_mutex);
+ apr_lock_release(accept_mutex);
break;
}
apr_clear_pool(ptrans);
}
- apr_destroy_pool(tpool);
- apr_lock(worker_thread_count_mutex);
+ apr_pool_destroy(tpool);
+ apr_lock_aquire(worker_thread_count_mutex);
worker_thread_count--;
if (worker_thread_count == 0) {
/* All the threads have exited, now finish the shutdown process
* by signalling the sigwait thread */
kill(my_pid, SIGTERM);
}
- apr_unlock(worker_thread_count_mutex);
+ apr_lock_release(worker_thread_count_mutex);
return (0);
}
@@ -417,7 +417,7 @@
apr_status_t rv;
my_pid = getpid();
- apr_create_pool(&pchild, pconf);
+ apr_pool_create(&pchild, pconf);
if (beosd_setup_child()) {
clean_child_exit(APEXIT_CHILDFATAL);
@@ -436,7 +436,7 @@
/* Set up the pollfd array */
listenfds = apr_palloc(pchild, sizeof(struct pollfd) * (num_listenfds));
for (lr = ap_listeners, i = 0; i < num_listenfds; lr = lr->next, ++i) {
- apr_get_os_sock(&listenfds[i].fd , lr->sd);
+ apr_os_sock_get(&listenfds[i].fd , lr->sd);
listenfds[i].events = POLLIN; /* should we add POLLPRI ?*/
listenfds[i].revents = 0;
}
@@ -444,7 +444,7 @@
/* Setup worker threads */
worker_thread_count = 0;
- if ((rv = apr_create_lock(&worker_thread_count_mutex, APR_MUTEX,
+ if ((rv = apr_lock_create(&worker_thread_count_mutex, APR_MUTEX,
APR_CROSS_PROCESS, NULL, pchild)) != APR_SUCCESS) {
/* Oh dear, didn't manage to create a worker thread mutex,
so there's no point on going on with this child... */
@@ -461,7 +461,7 @@
my_info->pid = my_child_num;
my_info->tid = i;
my_info->sd = 0;
- apr_create_pool(&my_info->tpool, pchild);
+ apr_pool_create(&my_info->tpool, pchild);
/* We are creating threads right now */
if ((thread = spawn_thread(worker_thread, "httpd_worker_thread",
@@ -635,7 +635,7 @@
}
#if APR_HAS_OTHER_CHILD
}
- else if (apr_reap_other_child(&pid, status) == 0) {
+ else if (apr_proc_other_child_read(&pid, status) == 0) {
/* handled */
#endif
}
@@ -690,7 +690,7 @@
ap_log_pid(pconf, ap_pid_fname);
/* create the accept_mutex */
- if ((rv = apr_create_lock(&accept_mutex, APR_MUTEX, APR_CROSS_PROCESS,
+ if ((rv = apr_lock_create(&accept_mutex, APR_MUTEX, APR_CROSS_PROCESS,
NULL, pconf)) != APR_SUCCESS) {
/* tsch tsch, can't have more than one thread in the accept loop
at a time so we need to fall on our sword... */
1.142 +28 -28 httpd-2.0/server/mpm/mpmt_pthread/mpmt_pthread.c
Index: mpmt_pthread.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_pthread/mpmt_pthread.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- mpmt_pthread.c 2001/02/07 20:49:24 1.141
+++ mpmt_pthread.c 2001/02/08 07:44:30 1.142
@@ -174,7 +174,7 @@
void clean_child_exit(int code)
{
if (pchild) {
- apr_destroy_pool(pchild);
+ apr_pool_destroy(pchild);
}
exit(code);
}
@@ -251,7 +251,7 @@
restart_pending = 1;
is_graceful = graceful;
if (is_graceful) {
- apr_kill_cleanup(pconf, NULL, ap_cleanup_scoreboard);
+ apr_pool_cleanup_kill(pconf, NULL, ap_cleanup_scoreboard);
}
}
@@ -392,7 +392,7 @@
long conn_id = AP_ID_FROM_CHILD_THREAD(my_child_num, my_thread_num);
int csd;
- (void) apr_get_os_sock(&csd, sock);
+ (void) apr_os_sock_get(&csd, sock);
if (csd >= FD_SETSIZE) {
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL,
@@ -400,7 +400,7 @@
"to rebuild Apache with a larger FD_SETSIZE "
"(currently %d)",
csd, FD_SETSIZE);
- apr_close_socket(sock);
+ apr_socket_close(sock);
return;
}
@@ -454,15 +454,15 @@
free(ti);
- apr_create_pool(&ptrans, tpool);
+ apr_pool_create(&ptrans, tpool);
pthread_mutex_lock(&worker_thread_count_mutex);
worker_thread_count++;
pthread_mutex_unlock(&worker_thread_count_mutex);
- apr_setup_poll(&pollset, num_listensocks+1, tpool);
+ apr_poll_setup(&pollset, num_listensocks+1, tpool);
for(n=0 ; n <= num_listensocks ; ++n)
- apr_add_poll_socket(pollset, listensocks[n], APR_POLLIN);
+ apr_poll_socket_add(pollset, listensocks[n], APR_POLLIN);
/* TODO: Switch to a system where threads reuse the results from earlier
poll calls - manoj */
@@ -472,10 +472,10 @@
(void) ap_update_child_status(process_slot, thread_slot, SERVER_READY,
(request_rec *) NULL);
- if ((rv = SAFE_ACCEPT(apr_lock(accept_mutex)))
+ if ((rv = SAFE_ACCEPT(apr_lock_aquire(accept_mutex)))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_lock failed. Attempting to shutdown "
+ "apr_lock_aquire failed. Attempting to shutdown "
"process gracefully.");
workers_may_exit = 1;
}
@@ -499,7 +499,7 @@
if (workers_may_exit) break;
- apr_get_revents(&event, listensocks[0], pollset);
+ apr_poll_revents_get(&event, listensocks[0], pollset);
if (event & APR_POLLIN) {
/* A process got a signal on the shutdown pipe. Check if we're
* the lucky process to die. */
@@ -520,7 +520,7 @@
curr_pollfd = 1;
}
/* XXX: Should we check for POLLERR? */
- apr_get_revents(&event, listensocks[curr_pollfd], pollset);
+ apr_poll_revents_get(&event, listensocks[curr_pollfd], pollset);
if (event & APR_POLLIN) {
last_pollfd = curr_pollfd;
sd=listensocks[curr_pollfd];
@@ -536,10 +536,10 @@
ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
"apr_accept");
}
- if ((rv = SAFE_ACCEPT(apr_unlock(accept_mutex)))
+ if ((rv = SAFE_ACCEPT(apr_lock_release(accept_mutex)))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_unlock failed. Attempting to shutdown "
+ "apr_lock_release failed. Attempting to shutdown "
"process gracefully.");
workers_may_exit = 1;
}
@@ -549,10 +549,10 @@
}
}
else {
- if ((rv = SAFE_ACCEPT(apr_unlock(accept_mutex)))
+ if ((rv = SAFE_ACCEPT(apr_lock_release(accept_mutex)))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_unlock failed. Attempting to shutdown "
+ "apr_lock_release failed. Attempting to shutdown "
"process gracefully.");
workers_may_exit = 1;
}
@@ -561,7 +561,7 @@
apr_clear_pool(ptrans);
}
- apr_destroy_pool(tpool);
+ apr_pool_destroy(tpool);
ap_update_child_status(process_slot, thread_slot, SERVER_DEAD,
(request_rec *) NULL);
pthread_mutex_lock(&worker_thread_count_mutex);
@@ -591,12 +591,12 @@
ap_my_pid = getpid();
- apr_create_pool(&pchild, pconf);
+ apr_pool_create(&pchild, pconf);
/*stuff to do before we switch id's, so we have permissions.*/
reopen_scoreboard(pchild);
- rv = SAFE_ACCEPT(apr_child_init_lock(&accept_mutex, lock_fname,
+ rv = SAFE_ACCEPT(apr_lock_child_init(&accept_mutex, lock_fname,
pchild));
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
@@ -665,7 +665,7 @@
my_info->pid = my_child_num;
my_info->tid = i;
my_info->sd = 0;
- apr_create_pool(&my_info->tpool, pchild);
+ apr_pool_create(&my_info->tpool, pchild);
/* We are creating threads right now */
(void) ap_update_child_status(my_child_num, i, SERVER_STARTING,
@@ -866,7 +866,7 @@
if (idle_thread_count > max_spare_threads) {
/* Kill off one child */
char char_of_death = '!';
- if ((rv = apr_write(pipe_of_death_out, &char_of_death, &one)) != APR_SUCCESS) {
+ if ((rv = apr_file_write(pipe_of_death_out, &char_of_death, &one)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, "write pipe_of_death");
}
idle_spawn_rate = 1;
@@ -943,7 +943,7 @@
}
#if APR_HAS_OTHER_CHILD
}
- else if (apr_reap_other_child(&pid, status) == 0) {
+ else if (apr_proc_other_child_read(&pid, status) == 0) {
/* handled */
#endif
}
@@ -989,18 +989,18 @@
pconf = _pconf;
ap_server_conf = s;
- rv = apr_create_pipe(&pipe_of_death_in, &pipe_of_death_out, pconf);
+ rv = apr_file_pipe_create(&pipe_of_death_in, &pipe_of_death_out, pconf);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv,
(const server_rec*) ap_server_conf,
- "apr_create_pipe (pipe_of_death)");
+ "apr_file_pipe_create (pipe_of_death)");
exit(1);
}
- if ((rv = apr_set_pipe_timeout(pipe_of_death_in, 0)) != APR_SUCCESS) {
+ if ((rv = apr_file_pipe_timeout_set(pipe_of_death_in, 0)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv,
(const server_rec*) ap_server_conf,
- "apr_set_pipe_timeout (pipe_of_death)");
+ "apr_file_pipe_timeout_set (pipe_of_death)");
exit(1);
}
ap_server_conf = s;
@@ -1016,7 +1016,7 @@
lock_fname = apr_psprintf(_pconf, "%s.%u",
ap_server_root_relative(_pconf, lock_fname),
ap_my_pid);
- rv = apr_create_lock(&accept_mutex, APR_MUTEX, APR_LOCKALL,
+ rv = apr_lock_create(&accept_mutex, APR_MUTEX, APR_LOCKALL,
lock_fname, _pconf);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
@@ -1116,7 +1116,7 @@
/* give the children the signal to die */
for (i = 0; i < ap_daemons_limit;) {
- if ((rv = apr_write(pipe_of_death_in, &char_of_death, &one)) != APR_SUCCESS) {
+ if ((rv = apr_file_write(pipe_of_death_in, &char_of_death, &one)) != APR_SUCCESS) {
if (APR_STATUS_IS_EINTR(rv)) continue;
ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, "write pipe_of_death");
}
@@ -1163,7 +1163,7 @@
is_graceful = 0;
if (!one_process && !no_detach) {
- apr_detach();
+ apr_proc_detach();
}
ap_my_pid = getpid();
}
1.41 +40 -40 httpd-2.0/server/mpm/perchild/perchild.c
Index: perchild.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/perchild/perchild.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- perchild.c 2001/02/07 20:49:24 1.40
+++ perchild.c 2001/02/08 07:44:30 1.41
@@ -220,7 +220,7 @@
static void clean_child_exit(int code)
{
if (pchild) {
- apr_destroy_pool(pchild);
+ apr_pool_destroy(pchild);
}
exit(code);
}
@@ -296,7 +296,7 @@
restart_pending = 1;
is_graceful = graceful;
if (is_graceful) {
- apr_kill_cleanup(pconf, NULL, ap_cleanup_scoreboard);
+ apr_pool_cleanup_kill(pconf, NULL, ap_cleanup_scoreboard);
}
}
@@ -438,8 +438,8 @@
apr_status_t rv;
int thread_num = conn_id % HARD_THREAD_LIMIT;
- if ((rv = apr_get_os_sock(&csd, sock)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, "apr_get_os_sock");
+ if ((rv = apr_os_sock_get(&csd, sock)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, "apr_os_sock_get");
}
if (csd >= FD_SETSIZE) {
@@ -448,7 +448,7 @@
"to rebuild Apache with a larger FD_SETSIZE "
"(currently %d)",
csd, FD_SETSIZE);
- apr_close_socket(sock);
+ apr_socket_close(sock);
return;
}
@@ -549,13 +549,13 @@
apr_status_t rv;
pthread_mutex_lock(&thread_pool_parent_mutex);
- apr_create_pool(&tpool, thread_pool_parent);
+ apr_pool_create(&tpool, thread_pool_parent);
pthread_mutex_unlock(&thread_pool_parent_mutex);
- apr_create_pool(&ptrans, tpool);
+ apr_pool_create(&ptrans, tpool);
- apr_setup_poll(&pollset, num_listenfds+1, tpool);
+ apr_poll_setup(&pollset, num_listenfds+1, tpool);
for(n=0 ; n <= num_listenfds ; ++n) {
- apr_add_poll_socket(pollset, listenfds[n], APR_POLLIN);
+ apr_poll_socket_add(pollset, listenfds[n], APR_POLLIN);
}
while (!workers_may_exit) {
@@ -580,10 +580,10 @@
pthread_mutex_unlock(&thread_accept_mutex);
break;
}
- if ((rv = SAFE_ACCEPT(apr_lock(process_accept_mutex)))
+ if ((rv = SAFE_ACCEPT(apr_lock_aquire(process_accept_mutex)))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_lock failed. Attempting to shutdown "
+ "apr_lock_aquire failed. Attempting to shutdown "
"process gracefully.");
workers_may_exit = 1;
}
@@ -605,7 +605,7 @@
}
if (workers_may_exit) break;
- apr_get_revents(&event, listenfds[0], pollset);
+ apr_poll_revents_get(&event, listenfds[0], pollset);
if (event & APR_POLLIN) {
/* A process got a signal on the shutdown pipe. Check if we're
* the lucky process to die. */
@@ -613,7 +613,7 @@
continue;
}
- apr_get_revents(&event, listenfds[1], pollset);
+ apr_poll_revents_get(&event, listenfds[1], pollset);
if (event & APR_POLLIN || event & APR_POLLOUT) {
/* This request is from another child in our current process.
* We should set a flag here, and then below we will read
@@ -636,7 +636,7 @@
curr_pollfd = 1;
}
/* XXX: Should we check for POLLERR? */
- apr_get_revents(&event, listenfds[curr_pollfd], pollset);
+ apr_poll_revents_get(&event, listenfds[curr_pollfd], pollset);
if (event & APR_POLLIN) {
last_pollfd = curr_pollfd;
sd = listenfds[curr_pollfd];
@@ -650,10 +650,10 @@
if ((rv = apr_accept(&csd, sd, ptrans)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, "apr_accept");
}
- if ((rv = SAFE_ACCEPT(apr_unlock(process_accept_mutex)))
+ if ((rv = SAFE_ACCEPT(apr_lock_release(process_accept_mutex)))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_unlock failed. Attempting to shutdown "
+ "apr_lock_release failed. Attempting to shutdown "
"process gracefully.");
workers_may_exit = 1;
}
@@ -695,7 +695,7 @@
memcpy(&dp, CMSG_DATA(cmsg), sizeof(dp));
thread_socket_table[thread_num] = dp;
- apr_put_os_sock(&csd, &child_info_table[child_num].sd, ptrans);
+ apr_os_sock_put(&csd, &child_info_table[child_num].sd, ptrans);
}
if (setjmp(jmpbuffer) != 1) {
process_socket(ptrans, csd, conn_id);
@@ -705,10 +705,10 @@
}
requests_this_child--;
} else {
- if ((rv = SAFE_ACCEPT(apr_unlock(process_accept_mutex)))
+ if ((rv = SAFE_ACCEPT(apr_lock_release(process_accept_mutex)))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_unlock failed. Attempting to shutdown "
+ "apr_lock_release failed. Attempting to shutdown "
"process gracefully.");
workers_may_exit = 1;
}
@@ -722,7 +722,7 @@
}
pthread_mutex_lock(&thread_pool_parent_mutex);
- apr_destroy_pool(tpool);
+ apr_pool_destroy(tpool);
pthread_mutex_unlock(&thread_pool_parent_mutex);
pthread_mutex_lock(&worker_thread_count_mutex);
worker_thread_count--;
@@ -821,11 +821,11 @@
my_pid = getpid();
child_num = child_num_arg;
- apr_create_pool(&pchild, pconf);
+ apr_pool_create(&pchild, pconf);
/*stuff to do before we switch id's, so we have permissions.*/
- rv = SAFE_ACCEPT(apr_child_init_lock(&process_accept_mutex, lock_fname,
+ rv = SAFE_ACCEPT(apr_lock_child_init(&process_accept_mutex, lock_fname,
pchild));
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
@@ -869,7 +869,7 @@
#endif
/* The child socket */
- apr_put_os_sock(&listenfds[1], &child_info_table[child_num].sd, pchild);
+ apr_os_sock_put(&listenfds[1], &child_info_table[child_num].sd, pchild);
num_listenfds++;
for (lr = ap_listeners, i = 2; i <= num_listenfds; lr = lr->next, ++i)
@@ -885,7 +885,7 @@
for (i = 0; i < max_threads; i++) {
worker_thread_free_ids[i] = i;
}
- apr_create_pool(&thread_pool_parent, pchild);
+ apr_pool_create(&thread_pool_parent, pchild);
pthread_mutex_init(&thread_pool_parent_mutex, NULL);
pthread_mutex_init(&idle_thread_count_mutex, NULL);
pthread_mutex_init(&worker_thread_count_mutex, NULL);
@@ -1096,7 +1096,7 @@
}
#if APR_HAS_OTHER_CHILD
}
- else if (apr_reap_other_child(&pid, status) == 0) {
+ else if (apr_proc_other_child_read(&pid, status) == 0) {
/* handled */
#endif
}
@@ -1144,17 +1144,17 @@
pconf = _pconf;
ap_server_conf = s;
- if ((rv = apr_create_pipe(&pipe_of_death_in, &pipe_of_death_out, pconf))
+ if ((rv = apr_file_pipe_create(&pipe_of_death_in, &pipe_of_death_out, pconf))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv,
(const server_rec*) ap_server_conf,
- "apr_create_pipe (pipe_of_death)");
+ "apr_file_pipe_create (pipe_of_death)");
exit(1);
}
- if ((rv = apr_set_pipe_timeout(pipe_of_death_in, 0)) != APR_SUCCESS) {
+ if ((rv = apr_file_pipe_timeout_set(pipe_of_death_in, 0)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv,
(const server_rec*) ap_server_conf,
- "apr_set_pipe_timeout (pipe_of_death)");
+ "apr_file_pipe_timeout_set (pipe_of_death)");
exit(1);
}
ap_server_conf = s;
@@ -1170,7 +1170,7 @@
lock_fname = apr_psprintf(_pconf, "%s.%u",
ap_server_root_relative(_pconf, lock_fname),
my_pid);
- rv = SAFE_ACCEPT(apr_create_lock(&process_accept_mutex, APR_MUTEX,
+ rv = SAFE_ACCEPT(apr_lock_create(&process_accept_mutex, APR_MUTEX,
APR_CROSS_PROCESS, lock_fname, _pconf));
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
@@ -1270,7 +1270,7 @@
}
/* give the children the signal to die */
for (i = 0; i < num_daemons;) {
- if ((rv = apr_write(pipe_of_death_out, &char_of_death, &one)) != APR_SUCCESS) {
+ if ((rv = apr_file_write(pipe_of_death_out, &char_of_death, &one)) != APR_SUCCESS) {
if (APR_STATUS_IS_EINTR(rv)) continue;
ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
"write pipe_of_death");
@@ -1308,7 +1308,7 @@
is_graceful = 0;
if (!one_process && !no_detach) {
- apr_detach();
+ apr_proc_detach();
}
my_pid = getpid();
@@ -1354,13 +1354,13 @@
char *foo;
int len;
- apr_get_userdata((void **)&foo, "PERCHILD_BUFFER", r->connection->pool);
+ apr_pool_userdata_get((void **)&foo, "PERCHILD_BUFFER", r->connection->pool);
len = strlen(foo);
- apr_set_userdata(NULL, "PERCHILD_BUFFER", apr_null_cleanup,
+ apr_pool_userdata_set(NULL, "PERCHILD_BUFFER", apr_pool_cleanup_null,
r->connection->pool);
- apr_get_os_sock(&sfd, thesock);
+ apr_os_sock_get(&sfd, thesock);
iov.iov_base = NULL;
iov.iov_len = 0;
@@ -1382,7 +1382,7 @@
msg.msg_flags=0;
if (sendmsg(sconf->sd2, &msg, 0) == -1) {
- apr_destroy_pool(r->pool);
+ apr_pool_destroy(r->pool);
return -1;
}
@@ -1398,7 +1398,7 @@
}
}
- apr_destroy_pool(r->pool);
+ apr_pool_destroy(r->pool);
return 1;
}
@@ -1462,7 +1462,7 @@
if (thread_socket_table[thread_num] != -1) {
apr_socket_t *csd = NULL;
- apr_put_os_sock(&csd, &thread_socket_table[thread_num],
+ apr_os_sock_put(&csd, &thread_socket_table[thread_num],
r->connection->pool);
ap_sock_disable_nagle(csd);
r->connection->client_socket = csd;
@@ -1494,7 +1494,7 @@
return rv;
}
- apr_get_userdata((void **)&buffer, "PERCHILD_BUFFER", f->c->pool);
+ apr_pool_userdata_get((void **)&buffer, "PERCHILD_BUFFER", f->c->pool);
APR_BRIGADE_FOREACH(e, b) {
if (e->length != 0) {
@@ -1509,7 +1509,7 @@
}
}
}
- apr_set_userdata(buffer, "PERCHILD_BUFFER", apr_null_cleanup, f->c->pool);
+ apr_pool_userdata_set(buffer, "PERCHILD_BUFFER", apr_pool_cleanup_null, f->c->pool);
return APR_SUCCESS;
}
1.157 +14 -14 httpd-2.0/server/mpm/prefork/prefork.c
Index: prefork.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- prefork.c 2001/02/08 02:51:42 1.156
+++ prefork.c 2001/02/08 07:44:30 1.157
@@ -237,7 +237,7 @@
static void clean_child_exit(int code)
{
if (pchild) {
- apr_destroy_pool(pchild);
+ apr_pool_destroy(pchild);
}
chdir_for_gprof();
exit(code);
@@ -257,7 +257,7 @@
{
apr_status_t rv;
- rv = apr_child_init_lock(&accept_lock, ap_lock_fname, p);
+ rv = apr_lock_child_init(&accept_lock, ap_lock_fname, p);
if (rv) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL,
"couldn't do child init for accept mutex");
@@ -273,7 +273,7 @@
apr_status_t rv;
expand_lock_fname(p);
- rv = apr_create_lock(&accept_lock, APR_MUTEX, APR_CROSS_PROCESS, ap_lock_fname, p);
+ rv = apr_lock_create(&accept_lock, APR_MUTEX, APR_CROSS_PROCESS, ap_lock_fname, p);
if (rv) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't create accept mutex");
exit(APEXIT_INIT);
@@ -282,7 +282,7 @@
static void accept_mutex_on(void)
{
- apr_status_t rv = apr_lock(accept_lock);
+ apr_status_t rv = apr_lock_aquire(accept_lock);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't grab the accept mutex");
exit(APEXIT_CHILDFATAL);
@@ -291,7 +291,7 @@
static void accept_mutex_off(void)
{
- apr_status_t rv = apr_unlock(accept_lock);
+ apr_status_t rv = apr_lock_release(accept_lock);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't release the accept mutex");
exit(APEXIT_CHILDFATAL);
@@ -398,7 +398,7 @@
}
restart_pending = 1;
if ((is_graceful = (sig == SIGWINCH))) {
- apr_kill_cleanup(pconf, NULL, ap_cleanup_scoreboard);
+ apr_pool_cleanup_kill(pconf, NULL, ap_cleanup_scoreboard);
}
}
@@ -545,9 +545,9 @@
/* Get a sub context for global allocations in this child, so that
* we can have cleanups occur when the child exits.
*/
- apr_create_pool(&pchild, pconf);
+ apr_pool_create(&pchild, pconf);
- apr_create_pool(&ptrans, pchild);
+ apr_pool_create(&ptrans, pchild);
/* needs to be done before we switch UIDs so we have permissions */
reopen_scoreboard(pchild);
@@ -634,7 +634,7 @@
}
first_lr=lr;
do {
- apr_get_os_sock(&sockdes, lr->sd);
+ apr_os_sock_get(&sockdes, lr->sd);
if (FD_ISSET(sockdes, &main_fds))
goto got_listener;
lr = lr->next;
@@ -786,7 +786,7 @@
* socket options, file descriptors, and read/write buffers.
*/
- apr_get_os_sock(&sockdes, csd);
+ apr_os_sock_get(&sockdes, csd);
if (sockdes >= FD_SETSIZE) {
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL,
@@ -794,7 +794,7 @@
"to rebuild Apache with a larger FD_SETSIZE "
"(currently %d)",
sockdes, FD_SETSIZE);
- apr_close_socket(csd);
+ apr_socket_close(csd);
continue;
}
@@ -1058,7 +1058,7 @@
listenmaxfd = -1;
FD_ZERO(&listenfds);
for (lr = ap_listeners; lr; lr = lr->next) {
- apr_get_os_sock(&sockdes, lr->sd);
+ apr_os_sock_get(&sockdes, lr->sd);
FD_SET(sockdes, &listenfds);
if (sockdes > listenmaxfd) {
listenmaxfd = sockdes;
@@ -1161,7 +1161,7 @@
}
#if APR_HAS_OTHER_CHILD
}
- else if (apr_reap_other_child(&pid, status) == 0) {
+ else if (apr_proc_other_child_read(&pid, status) == 0) {
/* handled */
#endif
}
@@ -1295,7 +1295,7 @@
is_graceful = 0;
if (!one_process && !no_detach) {
- apr_detach();
+ apr_proc_detach();
}
ap_my_pid = getpid();
1.81 +13 -13 httpd-2.0/server/mpm/spmt_os2/spmt_os2.c
Index: spmt_os2.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- spmt_os2.c 2001/02/07 23:25:31 1.80
+++ spmt_os2.c 2001/02/08 07:44:31 1.81
@@ -142,7 +142,7 @@
static void clean_child_exit(int code)
{
if (THREAD_GLOBAL(pchild)) {
- apr_destroy_pool(THREAD_GLOBAL(pchild));
+ apr_pool_destroy(THREAD_GLOBAL(pchild));
}
thread_control[THREAD_GLOBAL(thread_num)].deferred_die = 0;
@@ -156,7 +156,7 @@
static apr_status_t accept_mutex_child_cleanup(void *foo)
{
- return apr_unlock(accept_mutex);
+ return apr_lock_release(accept_mutex);
}
/*
@@ -165,7 +165,7 @@
*/
static void accept_mutex_child_init(apr_pool_t *p)
{
- apr_register_cleanup(p, NULL, accept_mutex_child_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(p, NULL, accept_mutex_child_cleanup, apr_pool_cleanup_null);
}
/*
@@ -174,7 +174,7 @@
*/
static void accept_mutex_init(apr_pool_t *p)
{
- apr_status_t rc = apr_create_lock(&accept_mutex, APR_MUTEX, APR_INTRAPROCESS, NULL, p);
+ apr_status_t rc = apr_lock_create(&accept_mutex, APR_MUTEX, APR_INTRAPROCESS, NULL, p);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rc, ap_server_conf,
@@ -185,7 +185,7 @@
static void accept_mutex_on(void)
{
- apr_status_t rc = apr_lock(accept_mutex);
+ apr_status_t rc = apr_lock_aquire(accept_mutex);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rc, ap_server_conf,
@@ -196,7 +196,7 @@
static void accept_mutex_off(void)
{
- apr_status_t rc = apr_unlock(accept_mutex);
+ apr_status_t rc = apr_lock_release(accept_mutex);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rc, ap_server_conf,
@@ -253,7 +253,7 @@
if (wait_or_timeout_counter == INTERVAL_OF_WRITABLE_PROBES) {
wait_or_timeout_counter = 0;
#if APR_HAS_OTHER_CHILD
- apr_probe_writable_fds();
+ apr_proc_probe_writable_fds();
#endif
}
@@ -611,10 +611,10 @@
numfds++;
}
- apr_setup_poll(listen_poll, numfds, pchild);
+ apr_poll_setup(listen_poll, numfds, pchild);
for (lr = ap_listeners; lr; lr = lr->next) {
- apr_add_poll_socket(*listen_poll, lr->sd, APR_POLLIN);
+ apr_poll_socket_add(*listen_poll, lr->sd, APR_POLLIN);
}
return 0;
}
@@ -646,11 +646,11 @@
/* Get a sub pool for global allocations in this child, so that
* we can have cleanups occur when the child exits.
*/
- apr_create_pool(&pchild, pconf);
+ apr_pool_create(&pchild, pconf);
*ppthread_globals = (struct thread_globals *)apr_palloc(pchild, sizeof(struct thread_globals));
THREAD_GLOBAL(thread_num) = (int)thread_num_arg;
THREAD_GLOBAL(pchild) = pchild;
- apr_create_pool(&ptrans, pchild);
+ apr_pool_create(&ptrans, pchild);
if (setup_listen_poll(pchild, &listen_poll)) {
clean_child_exit(1);
@@ -734,7 +734,7 @@
lr = ap_listeners;
}
- apr_get_revents(&event, lr->sd, listen_poll);
+ apr_poll_revents_get(&event, lr->sd, listen_poll);
if (event == APR_POLLIN) {
first_lr = lr->next;
@@ -1166,7 +1166,7 @@
ap_listen_rec *lr;
for (lr = ap_listeners; lr; lr = lr->next) {
- apr_close_socket(lr->sd);
+ apr_socket_close(lr->sd);
DosSleep(0);
}
1.136 +39 -39 httpd-2.0/server/mpm/winnt/mpm_winnt.c
Index: mpm_winnt.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -r1.135 -r1.136
--- mpm_winnt.c 2001/02/06 20:41:07 1.135
+++ mpm_winnt.c 2001/02/08 07:44:31 1.136
@@ -159,7 +159,7 @@
{
apr_socket_t *thesocket = sock;
SOCKET sd;
- if (apr_get_os_sock(&sd, thesocket) == APR_SUCCESS) {
+ if (apr_os_sock_get(&sd, thesocket) == APR_SUCCESS) {
closesocket(sd);
}
return APR_SUCCESS;
@@ -406,7 +406,7 @@
SOCKET nsd;
for (lr = head_listener; lr ; lr = lr->next) {
- apr_get_os_sock(&nsd, lr->sd);
+ apr_os_sock_get(&nsd, lr->sd);
if (FD_ISSET(nsd, main_fds)) {
head_listener = lr->next;
if (head_listener == NULL)
@@ -433,7 +433,7 @@
for (lr = ap_listeners; lr; lr = lr->next) {
num_listeners++;
if (lr->sd != NULL) {
- apr_get_os_sock(&nsd, lr->sd);
+ apr_os_sock_get(&nsd, lr->sd);
FD_SET(nsd, &listenfds);
if (listenmaxfd == INVALID_SOCKET || nsd > listenmaxfd) {
listenmaxfd = nsd;
@@ -499,7 +499,7 @@
listenmaxfd = nsd;
}
}
- apr_put_os_sock(&lr->sd, &nsd, pconf);
+ apr_os_sock_put(&lr->sd, &nsd, pconf);
lr->count = 0;
}
/* Now, read the AcceptExCompPort from the parent */
@@ -524,7 +524,7 @@
if (osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) {
for (lr = ap_listeners; lr; lr = lr->next) {
int nsd;
- apr_get_os_sock(&nsd,lr->sd);
+ apr_os_sock_get(&nsd,lr->sd);
CreateIoCompletionPort((HANDLE) nsd, AcceptExCompPort, 0, 0);
}
}
@@ -651,7 +651,7 @@
new_job->next = NULL;
new_job->sock = sock;
- apr_lock(allowed_globals.jobmutex);
+ apr_lock_aquire(allowed_globals.jobmutex);
if (allowed_globals.jobtail != NULL)
allowed_globals.jobtail->next = new_job;
@@ -661,7 +661,7 @@
allowed_globals.jobcount++;
release_semaphore(allowed_globals.jobsemaphore);
- apr_unlock(allowed_globals.jobmutex);
+ apr_lock_release(allowed_globals.jobmutex);
}
static int remove_job(void)
@@ -670,10 +670,10 @@
int sock;
acquire_semaphore(allowed_globals.jobsemaphore);
- apr_lock(allowed_globals.jobmutex);
+ apr_lock_aquire(allowed_globals.jobmutex);
if (shutdown_in_progress && !allowed_globals.jobhead) {
- apr_unlock(allowed_globals.jobmutex);
+ apr_lock_release(allowed_globals.jobmutex);
return (-1);
}
job = allowed_globals.jobhead;
@@ -681,7 +681,7 @@
allowed_globals.jobhead = job->next;
if (allowed_globals.jobhead == NULL)
allowed_globals.jobtail = NULL;
- apr_unlock(allowed_globals.jobmutex);
+ apr_lock_release(allowed_globals.jobmutex);
sock = job->sock;
free(job);
@@ -736,7 +736,7 @@
lr = find_ready_listener(&main_fds);
if (lr != NULL) {
/* fetch the native socket descriptor */
- apr_get_os_sock(&nsd, lr->sd);
+ apr_os_sock_get(&nsd, lr->sd);
}
}
@@ -773,7 +773,7 @@
"win9x_get_connection: apr_pcalloc() failed. Process will exit.");
return NULL;
}
- apr_create_pool(&context->ptrans, pconf);
+ apr_pool_create(&context->ptrans, pconf);
}
@@ -873,7 +873,7 @@
}
/* create and initialize the accept socket */
- apr_get_os_sock(&nsd, context->lr->sd);
+ apr_os_sock_get(&nsd, context->lr->sd);
context->accept_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (context->accept_socket == INVALID_SOCKET) {
ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_netos_error(), server_conf,
@@ -890,7 +890,7 @@
/* Not a failure condition. Keep running. */
}
- apr_create_pool(&context->ptrans, _pconf);
+ apr_pool_create(&context->ptrans, _pconf);
/* recv_buf must be large enough to hold the remote and local
* addresses. Note that recv_buf_size is the amount of recv_buf
@@ -931,7 +931,7 @@
context->sock = NULL;
/* recreate and initialize the accept socket if it is not being reused */
- apr_get_os_sock(&nsd, context->lr->sd);
+ apr_os_sock_get(&nsd, context->lr->sd);
/* AcceptEx on the completion context. The completion context will be signaled
* when a connection is accepted. Hack Alert: TransmitFile, under certain
@@ -1089,12 +1089,12 @@
* but only if we are not in the process of shutting down
*/
if (!shutdown_in_progress) {
- apr_lock(allowed_globals.jobmutex);
+ apr_lock_aquire(allowed_globals.jobmutex);
context->lr->count--;
if (context->lr->count < 2) {
SetEvent(maintenance_event);
}
- apr_unlock(allowed_globals.jobmutex);
+ apr_lock_release(allowed_globals.jobmutex);
}
/* Received a connection */
@@ -1160,7 +1160,7 @@
sockinfo.remote = context->sa_client;
sockinfo.family = APR_INET;
sockinfo.type = SOCK_STREAM;
- apr_make_os_sock(&context->sock, &sockinfo, context->ptrans);
+ apr_os_sock_make(&context->sock, &sockinfo, context->ptrans);
ap_update_child_status(0, thread_num,
SERVER_BUSY_READ, (request_rec *) NULL);
@@ -1250,7 +1250,7 @@
if (one_process) {
/* Single process mode */
- apr_create_lock(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS,signal_name_prefix,pconf);
+ apr_lock_create(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS,signal_name_prefix,pconf);
exit_event = CreateEvent(NULL, TRUE, FALSE, exit_event_name);
setup_listeners(server_conf);
@@ -1258,7 +1258,7 @@
}
else {
/* Child process mode */
- apr_child_init_lock(&start_mutex, signal_name_prefix, pconf);
+ apr_lock_child_init(&start_mutex, signal_name_prefix, pconf);
exit_event = OpenEvent(EVENT_ALL_ACCESS, FALSE, exit_event_name);
ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
"Child %d: exit_event_name = %s", my_pid, exit_event_name);
@@ -1275,16 +1275,16 @@
ap_assert(exit_event);
ap_assert(maintenance_event);
- apr_create_pool(&pchild, pconf);
+ apr_pool_create(&pchild, pconf);
allowed_globals.jobsemaphore = create_semaphore(0);
- apr_create_lock(&allowed_globals.jobmutex, APR_MUTEX, APR_INTRAPROCESS, NULL, pchild);
+ apr_lock_create(&allowed_globals.jobmutex, APR_MUTEX, APR_INTRAPROCESS, NULL, pchild);
/*
* Wait until we have permission to start accepting connections.
* start_mutex is used to ensure that only one child ever
* goes into the listen/accept loop at once.
*/
- status = apr_lock(start_mutex);
+ status = apr_lock_aquire(start_mutex);
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK,APLOG_ERR, status, server_conf,
"Child %d: Failed to acquire the start_mutex. Process will exit.", my_pid);
@@ -1389,7 +1389,7 @@
workers_may_exit = 1;
/* Unblock threads blocked on the completion port */
- apr_lock(allowed_globals.jobmutex);
+ apr_lock_aquire(allowed_globals.jobmutex);
while (g_blocked_threads > 0) {
ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
"Child %d: %d threads blocked on the completion port", my_pid, g_blocked_threads);
@@ -1398,11 +1398,11 @@
}
Sleep(1000);
}
- apr_unlock(allowed_globals.jobmutex);
+ apr_lock_release(allowed_globals.jobmutex);
/* Cancel any remaining pending AcceptEx completion contexts */
for (lr = ap_listeners; lr != NULL; lr = lr->next) {
- apr_get_os_sock(&nsd,lr->sd);
+ apr_os_sock_get(&nsd,lr->sd);
CancelIo((HANDLE) nsd);
}
@@ -1415,7 +1415,7 @@
*/
ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
"Child %d: Releasing the start mutex", my_pid);
- apr_unlock(start_mutex);
+ apr_lock_release(start_mutex);
/* Give busy worker threads a chance to service their connections.
* Kill them off if they take too long
@@ -1442,9 +1442,9 @@
CloseHandle(AcceptExCompPort);
destroy_semaphore(allowed_globals.jobsemaphore);
- apr_destroy_lock(allowed_globals.jobmutex);
+ apr_lock_destroy(allowed_globals.jobmutex);
- apr_destroy_pool(pchild);
+ apr_pool_destroy(pchild);
CloseHandle(exit_event);
}
@@ -1632,7 +1632,7 @@
for (lr = ap_listeners; lr; lr = lr->next) {
int nsd;
lpWSAProtocolInfo = apr_pcalloc(p, sizeof(WSAPROTOCOL_INFO));
- apr_get_os_sock(&nsd,lr->sd);
+ apr_os_sock_get(&nsd,lr->sd);
ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
"Parent: Duplicating socket %d and sending it to child process %d", nsd, pi.dwProcessId);
if (WSADuplicateSocket(nsd, pi.dwProcessId,
@@ -1918,17 +1918,17 @@
* because pconf will be destroyed after the
* initial pre-flight of the config parser.
*/
- mpm_new_argv = apr_make_array(process->pool, process->argc + 2,
+ mpm_new_argv = apr_array_make(process->pool, process->argc + 2,
sizeof(const char *));
- *(const char **)apr_push_array(mpm_new_argv) = process->argv[0];
- *(const char **)apr_push_array(mpm_new_argv) = "-d";
- *(const char **)apr_push_array(mpm_new_argv) = def_server_root;
+ *(const char **)apr_array_push(mpm_new_argv) = process->argv[0];
+ *(const char **)apr_array_push(mpm_new_argv) = "-d";
+ *(const char **)apr_array_push(mpm_new_argv) = def_server_root;
fixed_args = mpm_new_argv->nelts;
optbuf[0] = '-';
optbuf[2] = '\0';
- apr_initopt(&opt, process->pool, process->argc, (char**) process->argv);
+ apr_getopt_init(&opt, process->pool, process->argc, (char**) process->argv);
while (apr_getopt(opt, "n:k:iu" AP_SERVER_BASEARGS,
optbuf + 1, &optarg) == APR_SUCCESS) {
switch (optbuf[1]) {
@@ -1949,11 +1949,11 @@
signal_arg = "uninstall";
break;
default:
- *(const char **)apr_push_array(mpm_new_argv) =
+ *(const char **)apr_array_push(mpm_new_argv) =
apr_pstrdup(process->pool, optbuf);
if (optarg) {
- *(const char **)apr_push_array(mpm_new_argv) = optarg;
+ *(const char **)apr_array_push(mpm_new_argv) = optarg;
}
break;
}
@@ -2201,7 +2201,7 @@
* Ths start mutex is used during a restart to prevent more than one
* child process from entering the accept loop at once.
*/
- apr_create_lock(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS, signal_name_prefix,
+ apr_lock_create(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS, signal_name_prefix,
server_conf->process->pool);
}
}
@@ -2240,7 +2240,7 @@
server_conf, "removed PID file %s (pid=%ld)",
pidfile, GetCurrentProcessId());
}
- apr_destroy_lock(start_mutex);
+ apr_lock_destroy(start_mutex);
CloseHandle(restart_event);
CloseHandle(shutdown_event);
1.30 +3 -3 httpd-2.0/server/mpm/winnt/registry.c
Index: registry.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/registry.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- registry.c 2000/11/29 17:33:02 1.29
+++ registry.c 2001/02/08 07:44:31 1.30
@@ -275,14 +275,14 @@
++tmp;
}
- *parray = apr_make_array(p, nSize, sizeof(char *));
+ *parray = apr_array_make(p, nSize, sizeof(char *));
tmp = pValue;
- newelem = (char **) apr_push_array(*parray);
+ newelem = (char **) apr_array_push(*parray);
*newelem = tmp;
while (tmp[0] || tmp[1])
{
if (!tmp[0]) {
- newelem = (char **) apr_push_array(*parray);
+ newelem = (char **) apr_array_push(*parray);
*newelem = tmp + 1;
}
++tmp;
1.12 +2 -2 apr/dso/aix/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/aix/dso.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- dso.c 2001/01/19 09:56:31 1.11
+++ dso.c 2001/02/08 07:44:32 1.12
@@ -155,14 +155,14 @@
(*res_handle)->handle = (void*)os_handle;
(*res_handle)->cont = ctx;
- apr_register_cleanup(ctx, *res_handle, dso_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
{
- return apr_run_cleanup(handle->cont, handle, dso_cleanup);
+ return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
1.15 +2 -2 apr/dso/beos/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/beos/dso.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- dso.c 2001/01/19 09:56:31 1.14
+++ dso.c 2001/02/08 07:44:32 1.15
@@ -79,14 +79,14 @@
(*res_handle)->handle = newid;
(*res_handle)->cont = ctx;
- apr_register_cleanup(ctx, *res_handle, dso_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
{
- return apr_run_cleanup(handle->cont, handle, dso_cleanup);
+ return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym, apr_dso_handle_t *handle,
1.20 +2 -2 apr/dso/os2/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/os2/dso.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- dso.c 2001/01/28 15:30:23 1.19
+++ dso.c 2001/02/08 07:44:33 1.20
@@ -94,7 +94,7 @@
}
(*res_handle)->handle = handle;
- apr_register_cleanup(ctx, *res_handle, dso_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -102,7 +102,7 @@
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
{
- return apr_run_cleanup(handle->cont, handle, dso_cleanup);
+ return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
}
1.6 +2 -2 apr/dso/os390/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/os390/dso.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dso.c 2001/01/19 09:56:31 1.5
+++ dso.c 2001/02/08 07:44:33 1.6
@@ -87,7 +87,7 @@
if ((handle = dllload(path)) != NULL) {
(*res_handle)->handle = handle;
- apr_register_cleanup(ctx, *res_handle, dso_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -97,7 +97,7 @@
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
{
- return apr_run_cleanup(handle->pool, handle, dso_cleanup);
+ return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
1.31 +2 -2 apr/dso/unix/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/unix/dso.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- dso.c 2001/01/19 09:56:31 1.30
+++ dso.c 2001/02/08 07:44:33 1.31
@@ -107,14 +107,14 @@
(*res_handle)->cont = ctx;
(*res_handle)->errormsg = NULL;
- apr_register_cleanup(ctx, *res_handle, dso_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
{
- return apr_run_cleanup(handle->cont, handle, dso_cleanup);
+ return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
1.20 +2 -2 apr/dso/win32/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/win32/dso.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- dso.c 2001/01/27 06:39:14 1.19
+++ dso.c 2001/02/08 07:44:33 1.20
@@ -126,14 +126,14 @@
(*res_handle)->cont = ctx;
(*res_handle)->load_error = APR_SUCCESS;
- apr_register_cleanup(ctx, *res_handle, dso_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(struct apr_dso_handle_t *handle)
{
- return apr_run_cleanup(handle->cont, handle, dso_cleanup);
+ return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
1.25 +3 -3 apr/file_io/os2/dir.c
Index: dir.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/dir.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- dir.c 2001/01/28 15:30:23 1.24
+++ dir.c 2001/02/08 07:44:34 1.25
@@ -82,7 +82,7 @@
thedir->handle = 0;
thedir->validentry = FALSE;
*new = thedir;
- apr_register_cleanup(cntxt, thedir, dir_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(cntxt, thedir, dir_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -167,14 +167,14 @@
-apr_status_t apr_make_dir(const char *path, apr_fileperms_t perm, apr_pool_t *cont)
+apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm, apr_pool_t *cont)
{
return APR_OS2_STATUS(DosCreateDir(path, NULL));
}
-apr_status_t apr_remove_dir(const char *path, apr_pool_t *cont)
+apr_status_t apr_dir_remove(const char *path, apr_pool_t *cont)
{
return APR_OS2_STATUS(DosDeleteDir(path));
}
1.20 +3 -3 apr/file_io/os2/filedup.c
Index: filedup.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/filedup.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- filedup.c 2001/01/28 15:30:23 1.19
+++ filedup.c 2001/02/08 07:44:34 1.20
@@ -58,7 +58,7 @@
#include "apr_strings.h"
#include <string.h>
-apr_status_t apr_dupfile(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p)
+apr_status_t apr_file_dup(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p)
{
int rv;
apr_file_t *dup_file;
@@ -90,8 +90,8 @@
dup_file->pipe = old_file->pipe;
if (*new_file == NULL) {
- apr_register_cleanup(dup_file->cntxt, dup_file, apr_file_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register(dup_file->cntxt, dup_file, apr_file_cleanup,
+ apr_pool_cleanup_null);
*new_file = dup_file;
}
1.20 +2 -2 apr/file_io/os2/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/filestat.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- filestat.c 2001/01/28 15:30:23 1.19
+++ filestat.c 2001/02/08 07:44:34 1.20
@@ -115,7 +115,7 @@
-apr_status_t apr_getfileinfo(apr_finfo_t *finfo, apr_int32_t wanted,
+apr_status_t apr_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted,
apr_file_t *thefile)
{
ULONG rc;
@@ -145,7 +145,7 @@
return APR_OS2_STATUS(rc);
}
-apr_status_t apr_setfileperms(const char *fname, apr_fileperms_t perms)
+apr_status_t apr_file_perms_set(const char *fname, apr_fileperms_t perms)
{
return APR_ENOTIMPL;
}
1.2 +2 -2 apr/file_io/os2/flock.c
Index: flock.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/flock.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- flock.c 2000/12/04 06:00:35 1.1
+++ flock.c 2001/02/08 07:44:34 1.2
@@ -54,7 +54,7 @@
#include "fileio.h"
-apr_status_t apr_lock_file(apr_file_t *thefile, int type)
+apr_status_t apr_file_lock(apr_file_t *thefile, int type)
{
FILELOCK lockrange = { 0, 0x7fffffff };
ULONG rc;
@@ -65,7 +65,7 @@
return APR_FROM_OS_ERROR(rc);
}
-apr_status_t apr_unlock_file(apr_file_t *thefile)
+apr_status_t apr_file_unlock(apr_file_t *thefile)
{
FILELOCK unlockrange = { 0, 0x7fffffff };
ULONG rc;
1.39 +16 -16 apr/file_io/os2/open.c
Index: open.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/open.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- open.c 2001/01/28 08:29:54 1.38
+++ open.c 2001/02/08 07:44:34 1.39
@@ -62,12 +62,12 @@
apr_status_t apr_file_cleanup(void *thefile)
{
apr_file_t *file = thefile;
- return apr_close(file);
+ return apr_file_close(file);
}
-apr_status_t apr_open(apr_file_t **new, const char *fname, apr_int32_t flag, apr_fileperms_t perm, apr_pool_t *cntxt)
+apr_status_t apr_file_open(apr_file_t **new, const char *fname, apr_int32_t flag, apr_fileperms_t perm, apr_pool_t *cntxt)
{
int oflags = 0;
int mflags = OPEN_FLAGS_FAIL_ON_ERROR|OPEN_SHARE_DENYNONE;
@@ -98,7 +98,7 @@
if (dafile->buffered) {
dafile->buffer = apr_palloc(cntxt, APR_FILE_BUFSIZE);
- rv = apr_create_lock(&dafile->mutex, APR_MUTEX, APR_INTRAPROCESS, NULL, cntxt);
+ rv = apr_lock_create(&dafile->mutex, APR_MUTEX, APR_INTRAPROCESS, NULL, cntxt);
if (rv)
return rv;
@@ -144,19 +144,19 @@
dafile->direction = 0;
dafile->pipe = FALSE;
- apr_register_cleanup(dafile->cntxt, dafile, apr_file_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(dafile->cntxt, dafile, apr_file_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
-apr_status_t apr_close(apr_file_t *file)
+apr_status_t apr_file_close(apr_file_t *file)
{
ULONG rc;
apr_status_t status;
if (file && file->isopen) {
- apr_flush(file);
+ apr_file_flush(file);
rc = DosClose(file->filedes);
if (rc == 0) {
@@ -172,14 +172,14 @@
}
if (file->buffered)
- apr_destroy_lock(file->mutex);
+ apr_lock_destroy(file->mutex);
return APR_SUCCESS;
}
-apr_status_t apr_remove_file(const char *path, apr_pool_t *cntxt)
+apr_status_t apr_file_remove(const char *path, apr_pool_t *cntxt)
{
ULONG rc = DosDelete(path);
return APR_OS2_STATUS(rc);
@@ -187,7 +187,7 @@
-apr_status_t apr_rename_file(const char *from_path, const char *to_path,
+apr_status_t apr_file_rename(const char *from_path, const char *to_path,
apr_pool_t *p)
{
ULONG rc = DosMove(from_path, to_path);
@@ -205,7 +205,7 @@
-apr_status_t apr_get_os_file(apr_os_file_t *thefile, apr_file_t *file)
+apr_status_t apr_os_file_get(apr_os_file_t *thefile, apr_file_t *file)
{
if (file == NULL) {
return APR_ENOFILE;
@@ -217,7 +217,7 @@
-apr_status_t apr_put_os_file(apr_file_t **file, apr_os_file_t *thefile, apr_pool_t *cont)
+apr_status_t apr_os_file_put(apr_file_t **file, apr_os_file_t *thefile, apr_pool_t *cont)
{
apr_os_file_t *dafile = thefile;
@@ -234,7 +234,7 @@
-apr_status_t apr_eof(apr_file_t *fptr)
+apr_status_t apr_file_eof(apr_file_t *fptr)
{
if (!fptr->isopen || fptr->eof_hit == 1) {
return APR_EOF;
@@ -244,20 +244,20 @@
-apr_status_t apr_open_stderr(apr_file_t **thefile, apr_pool_t *cont)
+apr_status_t apr_file_open_stderr(apr_file_t **thefile, apr_pool_t *cont)
{
apr_os_file_t fd = 2;
- return apr_put_os_file(thefile, &fd, cont);
+ return apr_os_file_put(thefile, &fd, cont);
}
-apr_status_t apr_open_stdout(apr_file_t **thefile, apr_pool_t *cont)
+apr_status_t apr_file_open_stdout(apr_file_t **thefile, apr_pool_t *cont)
{
apr_os_file_t fd = 1;
- return apr_put_os_file(thefile, &fd, cont);
+ return apr_os_file_put(thefile, &fd, cont);
}
1.31 +6 -6 apr/file_io/os2/pipe.c
Index: pipe.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/pipe.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- pipe.c 2000/11/14 13:41:23 1.30
+++ pipe.c 2001/02/08 07:44:34 1.31
@@ -61,7 +61,7 @@
#include <string.h>
#include <process.h>
-apr_status_t apr_create_pipe(apr_file_t **in, apr_file_t **out, apr_pool_t *cont)
+apr_status_t apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *cont)
{
ULONG filedes[2];
ULONG rc, action;
@@ -122,7 +122,7 @@
(*in)->pipe = 1;
(*in)->timeout = -1;
(*in)->blocking = BLK_ON;
- apr_register_cleanup(cont, *in, apr_file_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(cont, *in, apr_file_cleanup, apr_pool_cleanup_null);
(*out) = (apr_file_t *)apr_palloc(cont, sizeof(apr_file_t));
(*out)->cntxt = cont;
@@ -134,14 +134,14 @@
(*out)->pipe = 1;
(*out)->timeout = -1;
(*out)->blocking = BLK_ON;
- apr_register_cleanup(cont, *out, apr_file_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(cont, *out, apr_file_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
-apr_status_t apr_create_namedpipe(const char *filename, apr_fileperms_t perm, apr_pool_t *cont)
+apr_status_t apr_file_namedpipe_create(const char *filename, apr_fileperms_t perm, apr_pool_t *cont)
{
/* Not yet implemented, interface not suitable */
return APR_ENOTIMPL;
@@ -149,7 +149,7 @@
-apr_status_t apr_set_pipe_timeout(apr_file_t *thepipe, apr_interval_time_t timeout)
+apr_status_t apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
{
if (thepipe->pipe == 1) {
thepipe->timeout = timeout;
@@ -172,7 +172,7 @@
-apr_status_t apr_get_pipe_timeout(apr_file_t *thepipe, apr_interval_time_t *timeout)
+apr_status_t apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_interval_time_t *timeout)
{
if (thepipe->pipe == 1) {
*timeout = thepipe->timeout;
1.38 +21 -21 apr/file_io/os2/readwrite.c
Index: readwrite.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/readwrite.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- readwrite.c 2001/01/28 15:30:24 1.37
+++ readwrite.c 2001/02/08 07:44:34 1.38
@@ -61,7 +61,7 @@
#include <malloc.h>
-apr_status_t apr_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
+apr_status_t apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
{
ULONG rc = 0;
ULONG bytesread;
@@ -76,10 +76,10 @@
ULONG blocksize;
ULONG size = *nbytes;
- apr_lock(thefile->mutex);
+ apr_lock_aquire(thefile->mutex);
if (thefile->direction == 1) {
- apr_flush(thefile);
+ apr_file_flush(thefile);
thefile->bufpos = 0;
thefile->direction = 0;
thefile->dataRead = 0;
@@ -105,7 +105,7 @@
}
*nbytes = rc == 0 ? pos - (char *)buf : 0;
- apr_unlock(thefile->mutex);
+ apr_lock_release(thefile->mutex);
return APR_OS2_STATUS(rc);
} else {
if (thefile->pipe)
@@ -137,7 +137,7 @@
-apr_status_t apr_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
+apr_status_t apr_file_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
{
ULONG rc = 0;
ULONG byteswritten;
@@ -152,7 +152,7 @@
int blocksize;
int size = *nbytes;
- apr_lock(thefile->mutex);
+ apr_lock_aquire(thefile->mutex);
if ( thefile->direction == 0 ) {
// Position file pointer for writing at the offset we are logically reading from
@@ -165,7 +165,7 @@
while (rc == 0 && size > 0) {
if (thefile->bufpos == APR_FILE_BUFSIZE) // write buffer is full
- rc = apr_flush(thefile);
+ rc = apr_file_flush(thefile);
blocksize = size > APR_FILE_BUFSIZE - thefile->bufpos ? APR_FILE_BUFSIZE - thefile->bufpos : size;
memcpy(thefile->buffer + thefile->bufpos, pos, blocksize);
@@ -174,7 +174,7 @@
size -= blocksize;
}
- apr_unlock(thefile->mutex);
+ apr_lock_release(thefile->mutex);
return APR_OS2_STATUS(rc);
} else {
rc = DosWrite(thefile->filedes, buf, *nbytes, &byteswritten);
@@ -193,7 +193,7 @@
#ifdef HAVE_WRITEV
-apr_status_t apr_writev(apr_file_t *thefile, const struct iovec *vec, apr_size_t nvec, apr_size_t *nbytes)
+apr_status_t apr_file_writev(apr_file_t *thefile, const struct iovec *vec, apr_size_t nvec, apr_size_t *nbytes)
{
int bytes;
if ((bytes = writev(thefile->filedes, vec, nvec)) < 0) {
@@ -209,7 +209,7 @@
-apr_status_t apr_putc(char ch, apr_file_t *thefile)
+apr_status_t apr_file_putc(char ch, apr_file_t *thefile)
{
ULONG rc;
ULONG byteswritten;
@@ -229,15 +229,15 @@
-apr_status_t apr_ungetc(char ch, apr_file_t *thefile)
+apr_status_t apr_file_ungetc(char ch, apr_file_t *thefile)
{
apr_off_t offset = -1;
- return apr_seek(thefile, APR_CUR, &offset);
+ return apr_file_seek(thefile, APR_CUR, &offset);
}
-apr_status_t apr_getc(char *ch, apr_file_t *thefile)
+apr_status_t apr_file_getc(char *ch, apr_file_t *thefile)
{
ULONG rc;
apr_size_t bytesread;
@@ -247,7 +247,7 @@
}
bytesread = 1;
- rc = apr_read(thefile, ch, &bytesread);
+ rc = apr_file_read(thefile, ch, &bytesread);
if (rc) {
return rc;
@@ -263,17 +263,17 @@
-apr_status_t apr_puts(const char *str, apr_file_t *thefile)
+apr_status_t apr_file_puts(const char *str, apr_file_t *thefile)
{
apr_size_t len;
len = strlen(str);
- return apr_write(thefile, str, &len);
+ return apr_file_write(thefile, str, &len);
}
-apr_status_t apr_flush(apr_file_t *thefile)
+apr_status_t apr_file_flush(apr_file_t *thefile)
{
if (thefile->buffered) {
ULONG written = 0;
@@ -298,7 +298,7 @@
-apr_status_t apr_fgets(char *str, int len, apr_file_t *thefile)
+apr_status_t apr_file_gets(char *str, int len, apr_file_t *thefile)
{
size_t readlen;
apr_status_t rv = APR_SUCCESS;
@@ -306,7 +306,7 @@
for (i = 0; i < len-1; i++) {
readlen = 1;
- rv = apr_read(thefile, str+i, &readlen);
+ rv = apr_file_read(thefile, str+i, &readlen);
if (readlen != 1) {
rv = APR_EOF;
@@ -324,7 +324,7 @@
-APR_DECLARE(int) apr_fprintf(apr_file_t *fptr, const char *format, ...)
+APR_DECLARE(int) apr_file_printf(apr_file_t *fptr, const char *format, ...)
{
int cc;
va_list ap;
@@ -337,7 +337,7 @@
}
va_start(ap, format);
len = apr_vsnprintf(buf, HUGE_STRING_LEN, format, ap);
- cc = apr_puts(buf, fptr);
+ cc = apr_file_puts(buf, fptr);
va_end(ap);
free(buf);
return (cc == APR_SUCCESS) ? len : -1;
1.14 +3 -3 apr/file_io/os2/seek.c
Index: seek.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/seek.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- seek.c 2001/01/28 15:30:24 1.13
+++ seek.c 2001/02/08 07:44:35 1.14
@@ -65,7 +65,7 @@
ULONG rc;
if (thefile->direction == 1) {
- apr_flush(thefile);
+ apr_file_flush(thefile);
thefile->bufpos = thefile->direction = thefile->dataRead = 0;
}
@@ -85,7 +85,7 @@
-apr_status_t apr_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
+apr_status_t apr_file_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
{
if (!thefile->isopen) {
return APR_EBADF;
@@ -105,7 +105,7 @@
break;
case APR_END:
- rc = apr_getfileinfo(&finfo, APR_FINFO_NORM, thefile);
+ rc = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
if (rc == APR_SUCCESS)
rc = setptr(thefile, finfo.size - *offset);
break;
1.50 +7 -7 apr/file_io/unix/dir.c
Index: dir.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/dir.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- dir.c 2001/01/24 23:33:59 1.49
+++ dir.c 2001/02/08 07:44:37 1.50
@@ -95,8 +95,8 @@
return errno;
}
else {
- apr_register_cleanup((*new)->cntxt, (void *)(*new), dir_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new), dir_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
}
@@ -106,7 +106,7 @@
apr_status_t rv;
if ((rv = dir_cleanup(thedir)) == APR_SUCCESS) {
- apr_kill_cleanup(thedir->cntxt, thedir, dir_cleanup);
+ apr_pool_cleanup_kill(thedir->cntxt, thedir, dir_cleanup);
return APR_SUCCESS;
}
return rv;
@@ -195,7 +195,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_make_dir(const char *path, apr_fileperms_t perm, apr_pool_t *cont)
+apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm, apr_pool_t *cont)
{
mode_t mode = apr_unix_perms2mode(perm);
@@ -207,7 +207,7 @@
}
}
-apr_status_t apr_remove_dir(const char *path, apr_pool_t *cont)
+apr_status_t apr_dir_remove(const char *path, apr_pool_t *cont)
{
if (rmdir(path) == 0) {
return APR_SUCCESS;
@@ -217,7 +217,7 @@
}
}
-apr_status_t apr_get_os_dir(apr_os_dir_t **thedir, apr_dir_t *dir)
+apr_status_t apr_os_dir_get(apr_os_dir_t **thedir, apr_dir_t *dir)
{
if (dir == NULL) {
return APR_ENODIR;
@@ -226,7 +226,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_put_os_dir(apr_dir_t **dir, apr_os_dir_t *thedir,
+apr_status_t apr_os_dir_put(apr_dir_t **dir, apr_os_dir_t *thedir,
apr_pool_t *cont)
{
if ((*dir) == NULL) {
1.47 +5 -5 apr/file_io/unix/fileacc.c
Index: fileacc.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/fileacc.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- fileacc.c 2001/01/20 21:39:03 1.46
+++ fileacc.c 2001/02/08 07:44:37 1.47
@@ -57,7 +57,7 @@
/* A file to put ALL of the accessor functions for apr_file_t types. */
-APR_DECLARE(apr_status_t) apr_get_filename(const char **fname,
+APR_DECLARE(apr_status_t) apr_file_name_get(const char **fname,
apr_file_t *thefile)
{
*fname = thefile->fname;
@@ -122,15 +122,15 @@
}
#endif
-APR_DECLARE(apr_status_t) apr_get_filedata(void **data, const char *key,
+APR_DECLARE(apr_status_t) apr_file_data_get(void **data, const char *key,
apr_file_t *file)
{
- return apr_get_userdata(data, key, file->cntxt);
+ return apr_pool_userdata_get(data, key, file->cntxt);
}
-APR_DECLARE(apr_status_t) apr_set_filedata(apr_file_t *file, void *data,
+APR_DECLARE(apr_status_t) apr_file_data_set(apr_file_t *file, void *data,
const char *key,
apr_status_t (*cleanup)(void *))
{
- return apr_set_userdata(data, key, cleanup, file->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, file->cntxt);
}
1.28 +4 -4 apr/file_io/unix/filedup.c
Index: filedup.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/filedup.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- filedup.c 2000/11/14 06:40:03 1.27
+++ filedup.c 2001/02/08 07:44:38 1.28
@@ -56,7 +56,7 @@
#include "apr_strings.h"
#include "apr_portable.h"
-apr_status_t apr_dupfile(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p)
+apr_status_t apr_file_dup(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p)
{
int have_file = 0;
@@ -80,14 +80,14 @@
(*new_file)->buffered = old_file->buffered;
if ((*new_file)->buffered) {
#if APR_HAS_THREADS
- apr_create_lock(&((*new_file)->thlock), APR_MUTEX, APR_INTRAPROCESS, NULL,
+ apr_lock_create(&((*new_file)->thlock), APR_MUTEX, APR_INTRAPROCESS, NULL,
p);
#endif
(*new_file)->buffer = apr_palloc(p, APR_FILE_BUFSIZE);
}
(*new_file)->blocking = old_file->blocking; /* this is the way dup() works */
- apr_register_cleanup((*new_file)->cntxt, (void *)(*new_file), apr_unix_file_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*new_file)->cntxt, (void *)(*new_file), apr_unix_file_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
1.43 +2 -2 apr/file_io/unix/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/filestat.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- filestat.c 2001/01/27 06:41:07 1.42
+++ filestat.c 2001/02/08 07:44:38 1.43
@@ -105,7 +105,7 @@
*/
}
-apr_status_t apr_getfileinfo(apr_finfo_t *finfo, apr_int32_t wanted,
+apr_status_t apr_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted,
apr_file_t *thefile)
{
struct stat info;
@@ -121,7 +121,7 @@
}
}
-apr_status_t apr_setfileperms(const char *fname, apr_fileperms_t perms)
+apr_status_t apr_file_perms_set(const char *fname, apr_fileperms_t perms)
{
mode_t mode = apr_unix_perms2mode(perms);
1.2 +2 -2 apr/file_io/unix/flock.c
Index: flock.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/flock.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- flock.c 2000/11/29 07:37:41 1.1
+++ flock.c 2001/02/08 07:44:38 1.2
@@ -61,7 +61,7 @@
#include <sys/file.h>
#endif
-apr_status_t apr_lock_file(apr_file_t *thefile, int type)
+apr_status_t apr_file_lock(apr_file_t *thefile, int type)
{
int rc;
@@ -112,7 +112,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_unlock_file(apr_file_t *thefile)
+apr_status_t apr_file_unlock(apr_file_t *thefile)
{
int rc;
1.6 +4 -4 apr/file_io/unix/fullrw.c
Index: fullrw.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/fullrw.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- fullrw.c 2001/01/18 20:07:14 1.5
+++ fullrw.c 2001/02/08 07:44:38 1.6
@@ -55,7 +55,7 @@
#include "apr_file_io.h"
-APR_DECLARE(apr_status_t) apr_full_read(apr_file_t *thefile, void *buf,
+APR_DECLARE(apr_status_t) apr_file_read_file(apr_file_t *thefile, void *buf,
apr_size_t nbytes,
apr_size_t *bytes_read)
{
@@ -65,7 +65,7 @@
do {
apr_size_t amt = nbytes;
- status = apr_read(thefile, buf, &amt);
+ status = apr_file_read(thefile, buf, &amt);
buf = (char *)buf + amt;
nbytes -= amt;
total_read += amt;
@@ -77,7 +77,7 @@
return status;
}
-APR_DECLARE(apr_status_t) apr_full_write(apr_file_t *thefile, const void *buf,
+APR_DECLARE(apr_status_t) apr_file_write_full(apr_file_t *thefile, const void *buf,
apr_size_t nbytes,
apr_size_t *bytes_written)
{
@@ -87,7 +87,7 @@
do {
apr_size_t amt = nbytes;
- status = apr_write(thefile, buf, &amt);
+ status = apr_file_write(thefile, buf, &amt);
buf = (char *)buf + amt;
nbytes -= amt;
total_written += amt;
1.71 +18 -18 apr/file_io/unix/open.c
Index: open.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/open.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- open.c 2001/01/27 17:57:02 1.70
+++ open.c 2001/02/08 07:44:38 1.71
@@ -67,7 +67,7 @@
file->filedes = -1;
#if APR_HAS_THREADS
if (file->thlock) {
- return apr_destroy_lock(file->thlock);
+ return apr_lock_destroy(file->thlock);
}
#endif
return APR_SUCCESS;
@@ -78,7 +78,7 @@
}
}
-apr_status_t apr_open(apr_file_t **new, const char *fname, apr_int32_t flag, apr_fileperms_t perm, apr_pool_t *cont)
+apr_status_t apr_file_open(apr_file_t **new, const char *fname, apr_int32_t flag, apr_fileperms_t perm, apr_pool_t *cont)
{
int oflags = 0;
#if APR_HAS_THREADS
@@ -111,7 +111,7 @@
if ((*new)->buffered) {
(*new)->buffer = apr_palloc(cont, APR_FILE_BUFSIZE);
#if APR_HAS_THREADS
- rv = apr_create_lock(&((*new)->thlock), APR_MUTEX, APR_INTRAPROCESS,
+ rv = apr_lock_create(&((*new)->thlock), APR_MUTEX, APR_INTRAPROCESS,
NULL, cont);
if (rv) {
return rv;
@@ -163,27 +163,27 @@
(*new)->bufpos = 0;
(*new)->dataRead = 0;
(*new)->direction = 0;
- apr_register_cleanup((*new)->cntxt, (void *)(*new), apr_unix_file_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new), apr_unix_file_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
-apr_status_t apr_close(apr_file_t *file)
+apr_status_t apr_file_close(apr_file_t *file)
{
apr_status_t flush_rv = APR_SUCCESS, rv;
if (file->buffered) {
- flush_rv = apr_flush(file);
+ flush_rv = apr_file_flush(file);
}
if ((rv = apr_unix_file_cleanup(file)) == APR_SUCCESS) {
- apr_kill_cleanup(file->cntxt, file, apr_unix_file_cleanup);
+ apr_pool_cleanup_kill(file->cntxt, file, apr_unix_file_cleanup);
return APR_SUCCESS;
}
return rv ? rv : flush_rv;
}
-apr_status_t apr_remove_file(const char *path, apr_pool_t *cont)
+apr_status_t apr_file_remove(const char *path, apr_pool_t *cont)
{
if (unlink(path) == 0) {
return APR_SUCCESS;
@@ -193,7 +193,7 @@
}
}
-apr_status_t apr_rename_file(const char *from_path, const char *to_path,
+apr_status_t apr_file_rename(const char *from_path, const char *to_path,
apr_pool_t *p)
{
if (rename(from_path, to_path) != 0) {
@@ -202,7 +202,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_os_file(apr_os_file_t *thefile, apr_file_t *file)
+apr_status_t apr_os_file_get(apr_os_file_t *thefile, apr_file_t *file)
{
if (file == NULL) {
return APR_ENOFILE;
@@ -212,7 +212,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_put_os_file(apr_file_t **file, apr_os_file_t *thefile,
+apr_status_t apr_os_file_put(apr_file_t **file, apr_os_file_t *thefile,
apr_pool_t *cont)
{
int *dafile = thefile;
@@ -231,7 +231,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_eof(apr_file_t *fptr)
+apr_status_t apr_file_eof(apr_file_t *fptr)
{
if (fptr->eof_hit == 1) {
return APR_EOF;
@@ -239,7 +239,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_ferror(apr_file_t *fptr)
+apr_status_t apr_file_error(apr_file_t *fptr)
{
/* This function should be removed ASAP. It is next on my list once
* I am sure nobody is using it.
@@ -247,18 +247,18 @@
return APR_SUCCESS;
}
-apr_status_t apr_open_stderr(apr_file_t **thefile, apr_pool_t *cont)
+apr_status_t apr_file_open_stderr(apr_file_t **thefile, apr_pool_t *cont)
{
int fd = STDERR_FILENO;
- return apr_put_os_file(thefile, &fd, cont);
+ return apr_os_file_put(thefile, &fd, cont);
}
-apr_status_t apr_open_stdout(apr_file_t **thefile, apr_pool_t *cont)
+apr_status_t apr_file_open_stdout(apr_file_t **thefile, apr_pool_t *cont)
{
int fd = STDOUT_FILENO;
- return apr_put_os_file(thefile, &fd, cont);
+ return apr_os_file_put(thefile, &fd, cont);
}
APR_POOL_IMPLEMENT_ACCESSOR_X(file, cntxt);
1.45 +8 -8 apr/file_io/unix/pipe.c
Index: pipe.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/pipe.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- pipe.c 2000/11/14 06:40:03 1.44
+++ pipe.c 2001/02/08 07:44:38 1.45
@@ -126,7 +126,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_set_pipe_timeout(apr_file_t *thepipe, apr_interval_time_t timeout)
+apr_status_t apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
{
if (thepipe->pipe == 1) {
thepipe->timeout = timeout;
@@ -145,7 +145,7 @@
return APR_EINVAL;
}
-apr_status_t apr_get_pipe_timeout(apr_file_t *thepipe, apr_interval_time_t *timeout)
+apr_status_t apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_interval_time_t *timeout)
{
if (thepipe->pipe == 1) {
*timeout = thepipe->timeout;
@@ -154,7 +154,7 @@
return APR_EINVAL;
}
-apr_status_t apr_create_pipe(apr_file_t **in, apr_file_t **out, apr_pool_t *cont)
+apr_status_t apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *cont)
{
int filedes[2];
@@ -187,14 +187,14 @@
(*in)->thlock = NULL;
#endif
- apr_register_cleanup((*in)->cntxt, (void *)(*in), apr_unix_file_cleanup,
- apr_null_cleanup);
- apr_register_cleanup((*out)->cntxt, (void *)(*out), apr_unix_file_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*in)->cntxt, (void *)(*in), apr_unix_file_cleanup,
+ apr_pool_cleanup_null);
+ apr_pool_cleanup_register((*out)->cntxt, (void *)(*out), apr_unix_file_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
-apr_status_t apr_create_namedpipe(const char *filename,
+apr_status_t apr_file_namedpipe_create(const char *filename,
apr_fileperms_t perm, apr_pool_t *cont)
{
mode_t mode = apr_unix_perms2mode(perm);
1.64 +22 -22 apr/file_io/unix/readwrite.c
Index: readwrite.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/readwrite.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- readwrite.c 2000/11/14 06:40:03 1.63
+++ readwrite.c 2001/02/08 07:44:38 1.64
@@ -101,7 +101,7 @@
/* problems:
* 1) ungetchar not used for buffered files
*/
-apr_status_t apr_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
+apr_status_t apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
{
apr_ssize_t rv;
apr_size_t bytes_read;
@@ -117,11 +117,11 @@
apr_uint64_t size = *nbytes;
#if APR_HAS_THREADS
- apr_lock(thefile->thlock);
+ apr_lock_aquire(thefile->thlock);
#endif
if (thefile->direction == 1) {
- apr_flush(thefile);
+ apr_file_flush(thefile);
thefile->bufpos = 0;
thefile->direction = 0;
thefile->dataRead = 0;
@@ -156,7 +156,7 @@
rv = 0;
}
#if APR_HAS_THREADS
- apr_unlock(thefile->thlock);
+ apr_lock_release(thefile->thlock);
#endif
return rv;
}
@@ -205,7 +205,7 @@
}
}
-apr_status_t apr_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
+apr_status_t apr_file_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
{
apr_size_t rv;
@@ -215,7 +215,7 @@
int size = *nbytes;
#if APR_HAS_THREADS
- apr_lock(thefile->thlock);
+ apr_lock_aquire(thefile->thlock);
#endif
if ( thefile->direction == 0 ) {
@@ -232,7 +232,7 @@
rv = 0;
while (rv == 0 && size > 0) {
if (thefile->bufpos == APR_FILE_BUFSIZE) /* write buffer is full*/
- apr_flush(thefile);
+ apr_file_flush(thefile);
blocksize = size > APR_FILE_BUFSIZE - thefile->bufpos ?
APR_FILE_BUFSIZE - thefile->bufpos : size;
@@ -243,7 +243,7 @@
}
#if APR_HAS_THREADS
- apr_unlock(thefile->thlock);
+ apr_lock_release(thefile->thlock);
#endif
return rv;
}
@@ -276,7 +276,7 @@
}
}
-apr_status_t apr_writev(apr_file_t *thefile, const struct iovec *vec,
+apr_status_t apr_file_writev(apr_file_t *thefile, const struct iovec *vec,
apr_size_t nvec, apr_size_t *nbytes)
{
#ifdef HAVE_WRITEV
@@ -292,38 +292,38 @@
}
#else
*nbytes = vec[0].iov_len;
- return apr_write(thefile, vec[0].iov_base, nbytes);
+ return apr_file_write(thefile, vec[0].iov_base, nbytes);
#endif
}
-apr_status_t apr_putc(char ch, apr_file_t *thefile)
+apr_status_t apr_file_putc(char ch, apr_file_t *thefile)
{
apr_size_t nbytes = 1;
- return apr_write(thefile, &ch, &nbytes);
+ return apr_file_write(thefile, &ch, &nbytes);
}
-apr_status_t apr_ungetc(char ch, apr_file_t *thefile)
+apr_status_t apr_file_ungetc(char ch, apr_file_t *thefile)
{
thefile->ungetchar = (unsigned char)ch;
return APR_SUCCESS;
}
-apr_status_t apr_getc(char *ch, apr_file_t *thefile)
+apr_status_t apr_file_getc(char *ch, apr_file_t *thefile)
{
apr_size_t nbytes = 1;
- return apr_read(thefile, ch, &nbytes);
+ return apr_file_read(thefile, ch, &nbytes);
}
-apr_status_t apr_puts(const char *str, apr_file_t *thefile)
+apr_status_t apr_file_puts(const char *str, apr_file_t *thefile)
{
apr_size_t nbytes = strlen(str);
- return apr_write(thefile, str, &nbytes);
+ return apr_file_write(thefile, str, &nbytes);
}
-apr_status_t apr_flush(apr_file_t *thefile)
+apr_status_t apr_file_flush(apr_file_t *thefile)
{
if (thefile->buffered) {
apr_int64_t written = 0;
@@ -345,7 +345,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_fgets(char *str, int len, apr_file_t *thefile)
+apr_status_t apr_file_gets(char *str, int len, apr_file_t *thefile)
{
apr_status_t rv = APR_SUCCESS; /* get rid of gcc warning */
apr_size_t nbytes;
@@ -359,7 +359,7 @@
while (str < final) { /* leave room for trailing '\0' */
nbytes = 1;
- rv = apr_read(thefile, str, &nbytes);
+ rv = apr_file_read(thefile, str, &nbytes);
if (rv != APR_SUCCESS) {
break;
}
@@ -376,7 +376,7 @@
return rv;
}
-APR_DECLARE(int) apr_fprintf(apr_file_t *fptr, const char *format, ...)
+APR_DECLARE(int) apr_file_printf(apr_file_t *fptr, const char *format, ...)
{
apr_status_t cc;
va_list ap;
@@ -389,7 +389,7 @@
}
va_start(ap, format);
len = apr_vsnprintf(buf, HUGE_STRING_LEN, format, ap);
- cc = apr_puts(buf, fptr);
+ cc = apr_file_puts(buf, fptr);
va_end(ap);
free(buf);
return (cc == APR_SUCCESS) ? len : -1;
1.19 +3 -3 apr/file_io/unix/seek.c
Index: seek.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/seek.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- seek.c 2001/01/20 21:39:03 1.18
+++ seek.c 2001/02/08 07:44:38 1.19
@@ -60,7 +60,7 @@
int rc;
if (thefile->direction == 1) {
- apr_flush(thefile);
+ apr_file_flush(thefile);
thefile->bufpos = thefile->direction = thefile->dataRead = 0;
}
@@ -85,7 +85,7 @@
}
-apr_status_t apr_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
+apr_status_t apr_file_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
{
apr_off_t rv;
@@ -104,7 +104,7 @@
break;
case APR_END:
- rc = apr_getfileinfo(&finfo, APR_FINFO_SIZE, thefile);
+ rc = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
if (rc == APR_SUCCESS)
rc = setptr(thefile, finfo.size - *offset);
break;
1.52 +6 -6 apr/file_io/win32/dir.c
Index: dir.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/dir.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- dir.c 2001/02/01 05:44:17 1.51
+++ dir.c 2001/02/08 07:44:40 1.52
@@ -128,8 +128,8 @@
(*new)->rootlen = len - 1;
(*new)->cntxt = cont;
(*new)->dirhand = INVALID_HANDLE_VALUE;
- apr_register_cleanup((*new)->cntxt, (void *)(*new), dir_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new), dir_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -261,7 +261,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_make_dir(const char *path, apr_fileperms_t perm,
+APR_DECLARE(apr_status_t) apr_dir_make(const char *path, apr_fileperms_t perm,
apr_pool_t *cont)
{
#if APR_HAS_UNICODE_FS
@@ -286,7 +286,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_remove_dir(const char *path, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_dir_remove(const char *path, apr_pool_t *cont)
{
#if APR_HAS_UNICODE_FS
apr_oslevel_e os_level;
@@ -310,7 +310,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_os_dir(apr_os_dir_t **thedir,
+APR_DECLARE(apr_status_t) apr_os_dir_get(apr_os_dir_t **thedir,
apr_dir_t *dir)
{
if (dir == NULL) {
@@ -320,7 +320,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_put_os_dir(apr_dir_t **dir,
+APR_DECLARE(apr_status_t) apr_os_dir_put(apr_dir_t **dir,
apr_os_dir_t *thedir,
apr_pool_t *cont)
{
1.30 +3 -3 apr/file_io/win32/filedup.c
Index: filedup.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/filedup.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- filedup.c 2001/01/20 21:39:03 1.29
+++ filedup.c 2001/02/08 07:44:41 1.30
@@ -58,7 +58,7 @@
#include "apr_strings.h"
#include <string.h>
-APR_DECLARE(apr_status_t) apr_dupfile(apr_file_t **new_file,
+APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
apr_file_t *old_file, apr_pool_t *p)
{
BOOLEAN isStdHandle = FALSE;
@@ -109,8 +109,8 @@
(*new_file)->buffered = FALSE;
if (!isStdHandle) {
- apr_register_cleanup((*new_file)->cntxt, (void *)(*new_file), file_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*new_file)->cntxt, (void *)(*new_file), file_cleanup,
+ apr_pool_cleanup_null);
}
return APR_SUCCESS;
1.47 +10 -10 apr/file_io/win32/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/filestat.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- filestat.c 2001/02/01 05:44:17 1.46
+++ filestat.c 2001/02/08 07:44:41 1.47
@@ -154,28 +154,28 @@
* user, group or permissions.
*/
- if ((rv = apr_open(&thefile, fname,
+ if ((rv = apr_file_open(&thefile, fname,
((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0)
| ((wanted & (APR_FINFO_PROT | APR_FINFO_OWNER))
? APR_READCONTROL : 0),
APR_OS_DEFAULT, cont)) == APR_SUCCESS) {
- rv = apr_getfileinfo(finfo, wanted, thefile);
+ rv = apr_file_info_get(finfo, wanted, thefile);
finfo->filehand = NULL;
- apr_close(thefile);
+ apr_file_close(thefile);
}
else if (APR_STATUS_IS_EACCES(rv) && (wanted & (APR_FINFO_PROT
| APR_FINFO_OWNER))) {
/* We have a backup plan. Perhaps we couldn't grab READ_CONTROL?
* proceed without asking for that permission...
*/
- if ((rv = apr_open(&thefile, fname,
+ if ((rv = apr_file_open(&thefile, fname,
((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0),
APR_OS_DEFAULT, cont)) == APR_SUCCESS) {
- rv = apr_getfileinfo(finfo, wanted & ~(APR_FINFO_PROT
+ rv = apr_file_info_get(finfo, wanted & ~(APR_FINFO_PROT
| APR_FINFO_OWNER),
thefile);
finfo->filehand = NULL;
- apr_close(thefile);
+ apr_file_close(thefile);
}
}
if (rv != APR_SUCCESS && rv != APR_INCOMPLETE)
@@ -246,8 +246,8 @@
((wanted & APR_FINFO_PROT) ? &dacl : NULL),
NULL, &pdesc);
if (rv == ERROR_SUCCESS)
- apr_register_cleanup(finfo->cntxt, pdesc, free_localheap,
- apr_null_cleanup);
+ apr_pool_cleanup_register(finfo->cntxt, pdesc, free_localheap,
+ apr_pool_cleanup_null);
else
user = grp = dacl = NULL;
@@ -322,7 +322,7 @@
}
-APR_DECLARE(apr_status_t) apr_getfileinfo(apr_finfo_t *finfo, apr_int32_t wanted,
+APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted,
apr_file_t *thefile)
{
BY_HANDLE_FILE_INFORMATION FileInfo;
@@ -374,7 +374,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_setfileperms(const char *fname,
+APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
apr_fileperms_t perms)
{
return APR_ENOTIMPL;
1.3 +2 -2 apr/file_io/win32/flock.c
Index: flock.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/flock.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- flock.c 2001/01/18 20:07:15 1.2
+++ flock.c 2001/02/08 07:44:41 1.3
@@ -54,7 +54,7 @@
#include "fileio.h"
-APR_DECLARE(apr_status_t) apr_lock_file(apr_file_t *thefile, int type)
+APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
{
OVERLAPPED offset;
DWORD flags, len = 0xffffffff;
@@ -70,7 +70,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_unlock_file(apr_file_t *thefile)
+APR_DECLARE(apr_status_t) apr_file_unlock(apr_file_t *thefile)
{
OVERLAPPED offset;
DWORD len = 0xffffffff;
1.70 +17 -17 apr/file_io/win32/open.c
Index: open.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/open.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- open.c 2001/01/27 22:25:10 1.69
+++ open.c 2001/02/08 07:44:41 1.70
@@ -164,7 +164,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_open(apr_file_t **new, const char *fname,
+APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
apr_int32_t flag, apr_fileperms_t perm,
apr_pool_t *cont)
{
@@ -266,11 +266,11 @@
if (flag & APR_BUFFERED) {
(*new)->buffered = 1;
(*new)->buffer = apr_palloc(cont, APR_FILE_BUFSIZE);
- rv = apr_create_lock(&(*new)->mutex, APR_MUTEX, APR_INTRAPROCESS, NULL, cont);
+ rv = apr_lock_create(&(*new)->mutex, APR_MUTEX, APR_INTRAPROCESS, NULL, cont);
if (rv) {
if (file_cleanup(*new) == APR_SUCCESS) {
- apr_kill_cleanup(cont, *new, file_cleanup);
+ apr_pool_cleanup_kill(cont, *new, file_cleanup);
}
return rv;
}
@@ -292,26 +292,26 @@
(*new)->direction = 0;
(*new)->filePtr = 0;
- apr_register_cleanup((*new)->cntxt, (void *)(*new), file_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new), file_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_close(apr_file_t *file)
+APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file)
{
apr_status_t stat;
if ((stat = file_cleanup(file)) == APR_SUCCESS) {
- apr_kill_cleanup(file->cntxt, file, file_cleanup);
+ apr_pool_cleanup_kill(file->cntxt, file, file_cleanup);
if (file->buffered)
- apr_destroy_lock(file->mutex);
+ apr_lock_destroy(file->mutex);
return APR_SUCCESS;
}
return stat;
}
-APR_DECLARE(apr_status_t) apr_remove_file(const char *path, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *cont)
{
#if APR_HAS_UNICODE_FS
apr_oslevel_e os_level;
@@ -333,7 +333,7 @@
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_rename_file(const char *frompath,
+APR_DECLARE(apr_status_t) apr_file_rename(const char *frompath,
const char *topath,
apr_pool_t *cont)
{
@@ -383,7 +383,7 @@
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_get_os_file(apr_os_file_t *thefile,
+APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
apr_file_t *file)
{
if (file == NULL) {
@@ -393,7 +393,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_put_os_file(apr_file_t **file,
+APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_pool_t *cont)
{
@@ -404,7 +404,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_eof(apr_file_t *fptr)
+APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
{
if (fptr->eof_hit == 1) {
return APR_EOF;
@@ -412,7 +412,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_open_stderr(apr_file_t **thefile, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile, apr_pool_t *cont)
{
apr_os_file_t file_handle;
@@ -420,10 +420,10 @@
if (file_handle == INVALID_HANDLE_VALUE)
return apr_get_os_error();
- return apr_put_os_file(thefile, &file_handle, cont);
+ return apr_os_file_put(thefile, &file_handle, cont);
}
-APR_DECLARE(apr_status_t) apr_open_stdout(apr_file_t **thefile, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile, apr_pool_t *cont)
{
apr_os_file_t file_handle;
@@ -431,7 +431,7 @@
if (file_handle == INVALID_HANDLE_VALUE)
return apr_get_os_error();
- return apr_put_os_file(thefile, &file_handle, cont);
+ return apr_os_file_put(thefile, &file_handle, cont);
}
APR_POOL_IMPLEMENT_ACCESSOR_X(file, cntxt);
1.35 +9 -9 apr/file_io/win32/pipe.c
Index: pipe.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/pipe.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- pipe.c 2001/01/20 21:39:03 1.34
+++ pipe.c 2001/02/08 07:44:41 1.35
@@ -63,7 +63,7 @@
#include <sys/stat.h>
#include "misc.h"
-APR_DECLARE(apr_status_t) apr_set_pipe_timeout(apr_file_t *thepipe, apr_interval_time_t timeout)
+APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
{
if (thepipe->pipe == 1) {
thepipe->timeout = timeout;
@@ -72,7 +72,7 @@
return APR_EINVAL;
}
-APR_DECLARE(apr_status_t) apr_get_pipe_timeout(apr_file_t *thepipe, apr_interval_time_t *timeout)
+APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_interval_time_t *timeout)
{
if (thepipe->pipe == 1) {
*timeout = thepipe->timeout;
@@ -81,7 +81,7 @@
return APR_EINVAL;
}
-APR_DECLARE(apr_status_t) apr_create_pipe(apr_file_t **in, apr_file_t **out, apr_pool_t *p)
+APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *p)
{
SECURITY_ATTRIBUTES sa;
@@ -117,15 +117,15 @@
return apr_get_os_error();
}
- apr_register_cleanup((*in)->cntxt, (void *)(*in), file_cleanup,
- apr_null_cleanup);
- apr_register_cleanup((*out)->cntxt, (void *)(*out), file_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*in)->cntxt, (void *)(*in), file_cleanup,
+ apr_pool_cleanup_null);
+ apr_pool_cleanup_register((*out)->cntxt, (void *)(*out), file_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
/* apr_create_nt_pipe()
- * An internal (for now) APR function created for use by apr_create_process()
+ * An internal (for now) APR function created for use by apr_proc_create()
* when setting up pipes to communicate with the child process.
* apr_create_nt_pipe() allows setting the blocking mode of each end of
* the pipe when the pipe is created (rather than after the pipe is created).
@@ -134,7 +134,7 @@
*
* In general, we don't want to enable child side pipe handles for async i/o.
* This prevents us from enabling both ends of the pipe for async i/o in
- * apr_create_pipe.
+ * apr_file_pipe_create.
*
* Why not use NamedPipes on NT which support setting pipe state to
* non-blocking? On NT, even though you can set a pipe non-blocking,
1.52 +22 -22 apr/file_io/win32/readwrite.c
Index: readwrite.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/readwrite.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- readwrite.c 2001/01/18 20:07:16 1.51
+++ readwrite.c 2001/02/08 07:44:41 1.52
@@ -148,7 +148,7 @@
return rv;
}
-APR_DECLARE(apr_status_t) apr_read(apr_file_t *thefile, void *buf, apr_size_t *len)
+APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *len)
{
apr_size_t rv;
DWORD bytes_read = 0;
@@ -175,10 +175,10 @@
apr_size_t blocksize;
apr_size_t size = *len;
- apr_lock(thefile->mutex);
+ apr_lock_aquire(thefile->mutex);
if (thefile->direction == 1) {
- apr_flush(thefile);
+ apr_file_flush(thefile);
thefile->bufpos = 0;
thefile->direction = 0;
thefile->dataRead = 0;
@@ -210,7 +210,7 @@
if (*len) {
rv = 0;
}
- apr_unlock(thefile->mutex);
+ apr_lock_release(thefile->mutex);
} else {
/* Unbuffered i/o */
apr_size_t nbytes;
@@ -221,7 +221,7 @@
return rv;
}
-APR_DECLARE(apr_status_t) apr_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
+APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
{
apr_status_t rv;
DWORD bwrote;
@@ -231,7 +231,7 @@
int blocksize;
int size = *nbytes;
- apr_lock(thefile->mutex);
+ apr_lock_aquire(thefile->mutex);
if (thefile->direction == 0) {
// Position file pointer for writing at the offset we are logically reading from
@@ -245,7 +245,7 @@
rv = 0;
while (rv == 0 && size > 0) {
if (thefile->bufpos == APR_FILE_BUFSIZE) // write buffer is full
- rv = apr_flush(thefile);
+ rv = apr_file_flush(thefile);
blocksize = size > APR_FILE_BUFSIZE - thefile->bufpos ? APR_FILE_BUFSIZE - thefile->bufpos : size;
memcpy(thefile->buffer + thefile->bufpos, pos, blocksize);
@@ -254,7 +254,7 @@
size -= blocksize;
}
- apr_unlock(thefile->mutex);
+ apr_lock_release(thefile->mutex);
return rv;
} else {
if (!thefile->pipe && thefile->append) {
@@ -275,7 +275,7 @@
/*
* Too bad WriteFileGather() is not supported on 95&98 (or NT prior to SP2)
*/
-APR_DECLARE(apr_status_t) apr_writev(apr_file_t *thefile,
+APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile,
const struct iovec *vec,
apr_size_t nvec,
apr_size_t *nbytes)
@@ -289,7 +289,7 @@
for (i = 0; i < nvec; i++) {
buf = vec[i].iov_base;
bwrote = vec[i].iov_len;
- rv = apr_write(thefile, buf, &bwrote);
+ rv = apr_file_write(thefile, buf, &bwrote);
*nbytes += bwrote;
if (rv != APR_SUCCESS) {
break;
@@ -298,26 +298,26 @@
return rv;
}
-APR_DECLARE(apr_status_t) apr_putc(char ch, apr_file_t *thefile)
+APR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile)
{
DWORD len = 1;
- return apr_write(thefile, &ch, &len);
+ return apr_file_write(thefile, &ch, &len);
}
-APR_DECLARE(apr_status_t) apr_ungetc(char ch, apr_file_t *thefile)
+APR_DECLARE(apr_status_t) apr_file_ungetc(char ch, apr_file_t *thefile)
{
thefile->ungetchar = (unsigned char) ch;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_getc(char *ch, apr_file_t *thefile)
+APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
{
apr_status_t rc;
int bread;
bread = 1;
- rc = apr_read(thefile, ch, &bread);
+ rc = apr_file_read(thefile, ch, &bread);
if (rc) {
return rc;
@@ -330,14 +330,14 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_puts(const char *str, apr_file_t *thefile)
+APR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile)
{
DWORD len = strlen(str);
- return apr_write(thefile, str, &len);
+ return apr_file_write(thefile, str, &len);
}
-APR_DECLARE(apr_status_t) apr_fgets(char *str, int len, apr_file_t *thefile)
+APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
{
apr_size_t readlen;
apr_status_t rv = APR_SUCCESS;
@@ -345,7 +345,7 @@
for (i = 0; i < len-1; i++) {
readlen = 1;
- rv = apr_read(thefile, str+i, &readlen);
+ rv = apr_file_read(thefile, str+i, &readlen);
if (readlen != 1) {
rv = APR_EOF;
@@ -363,7 +363,7 @@
return rv;
}
-APR_DECLARE(apr_status_t) apr_flush(apr_file_t *thefile)
+APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile)
{
if (thefile->buffered) {
DWORD written = 0;
@@ -393,7 +393,7 @@
return -1;
}
-APR_DECLARE(int) apr_fprintf(apr_file_t *fptr, const char *format, ...)
+APR_DECLARE(int) apr_file_printf(apr_file_t *fptr, const char *format, ...)
{
int cc;
va_list ap;
@@ -406,7 +406,7 @@
}
va_start(ap, format);
len = apr_vsnprintf(buf, HUGE_STRING_LEN, format, ap);
- cc = apr_puts(buf, fptr);
+ cc = apr_file_puts(buf, fptr);
va_end(ap);
free(buf);
return (cc == APR_SUCCESS) ? len : -1;
1.14 +3 -3 apr/file_io/win32/seek.c
Index: seek.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/seek.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- seek.c 2001/01/20 21:39:03 1.13
+++ seek.c 2001/02/08 07:44:41 1.14
@@ -63,7 +63,7 @@
DWORD rc;
if (thefile->direction == 1) {
- apr_flush(thefile);
+ apr_file_flush(thefile);
thefile->bufpos = thefile->direction = thefile->dataRead = 0;
}
@@ -86,7 +86,7 @@
-APR_DECLARE(apr_status_t) apr_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
+APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
{
DWORD howmove;
DWORD rv;
@@ -105,7 +105,7 @@
break;
case APR_END:
- rc = apr_getfileinfo(&finfo, APR_FINFO_SIZE, thefile);
+ rc = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
if (rc == APR_SUCCESS && (finfo.valid & APR_FINFO_SIZE))
rc = setptr(thefile, finfo.size - *offset);
break;
1.20 +3 -3 apr/i18n/unix/xlate.c
Index: xlate.c
===================================================================
RCS file: /home/cvs/apr/i18n/unix/xlate.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- xlate.c 2001/02/08 02:37:29 1.19
+++ xlate.c 2001/02/08 07:44:44 1.20
@@ -264,8 +264,8 @@
if (found) {
*convset = new;
- apr_register_cleanup(pool, (void *)new, apr_xlate_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register(pool, (void *)new, apr_xlate_cleanup,
+ apr_pool_cleanup_null);
status = APR_SUCCESS;
}
else {
@@ -360,7 +360,7 @@
apr_status_t status;
if ((status = apr_xlate_cleanup(convset)) == APR_SUCCESS) {
- apr_kill_cleanup(convset->pool, convset, apr_xlate_cleanup);
+ apr_pool_cleanup_kill(convset->pool, convset, apr_xlate_cleanup);
}
return status;
1.5 +29 -29 apr/include/apr_compat.h
Index: apr_compat.h
===================================================================
RCS file: /home/cvs/apr/include/apr_compat.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- apr_compat.h 2000/12/05 22:08:26 1.4
+++ apr_compat.h 2001/02/08 07:44:44 1.5
@@ -6,48 +6,48 @@
#define ap_inline apr_inline
#define ap_md5_ctx_t apr_md5_ctx_t
-#define ap_MD5Encode apr_MD5Encode
-#define ap_MD5Final apr_MD5Final
-#define ap_MD5Init apr_MD5Init
-#define ap_MD5Update apr_MD5Update
-#define ap_append_arrays apr_append_arrays
+#define ap_MD5Encode apr_md5_encode
+#define ap_MD5Final apr_md5_final
+#define ap_MD5Init apr_md5_init
+#define ap_MD5Update apr_md5_update
+#define ap_append_arrays apr_array_append
#define ap_array_cat apr_array_cat
#define ap_array_header_t apr_array_header_t
#define ap_array_pstrcat apr_array_pstrcat
-#define ap_bytes_in_free_blocks apr_bytes_in_free_blocks
-#define ap_bytes_in_pool apr_bytes_in_pool
+#define ap_bytes_in_free_blocks apr_pool_free_blocks_num_bytes
+#define ap_bytes_in_pool apr_pool_num_bytes
#define ap_check_file_time apr_check_file_time
#define ap_filetype_e apr_filetype_e
-#define ap_cleanup_for_exec apr_cleanup_for_exec
+#define ap_cleanup_for_exec apr_pool_cleanup_for_exec
#define ap_clear_pool apr_clear_pool
-#define ap_clear_table apr_clear_table
-#define ap_copy_array apr_copy_array
-#define ap_copy_array_hdr apr_copy_array_hdr
-#define ap_copy_table apr_copy_table
+#define ap_clear_table apr_table_clear
+#define ap_copy_array apr_array_copy
+#define ap_copy_array_hdr apr_array_copy_hdr
+#define ap_copy_table apr_table_copy
#define ap_cpystrn apr_cpystrn
#define ap_day_snames apr_day_snames
-#define ap_destroy_pool apr_destroy_pool
+#define ap_destroy_pool apr_pool_destroy
#define ap_exploded_time_t apr_exploded_time_t
#define ap_fnmatch apr_fnmatch
#define ap_getopt apr_getopt
#define ap_inet_addr apr_inet_addr
-#define ap_init_alloc apr_init_alloc
+#define ap_init_alloc apr_pool_alloc_init
#define ap_is_empty_table apr_is_empty_table
#define ap_is_fnmatch apr_is_fnmatch
-#define ap_kill_cleanup apr_kill_cleanup
-#define ap_make_array apr_make_array
-#define ap_make_sub_pool apr_make_sub_pool
-#define ap_make_table apr_make_table
+#define ap_kill_cleanup apr_pool_cleanup_kill
+#define ap_make_array apr_array_make
+#define ap_make_sub_pool apr_pool_sub_make
+#define ap_make_table apr_table_make
#define ap_month_snames apr_month_snames
-#define ap_note_subprocess apr_note_subprocess
-#define ap_null_cleanup apr_null_cleanup
+#define ap_note_subprocess apr_pool_note_subprocess
+#define ap_null_cleanup apr_pool_cleanup_null
#define ap_os_dso_load apr_dso_load
#define ap_os_dso_unload apr_dso_unload
#define ap_os_dso_sym apr_dso_sym
#define ap_os_dso_error apr_dso_error
-#define ap_os_kill apr_kill
-#define ap_overlap_tables apr_overlap_tables
-#define ap_overlay_tables apr_overlay_tables
+#define ap_os_kill apr_proc_kill
+#define ap_overlap_tables apr_table_overlap
+#define ap_overlay_tables apr_table_overlay
#define ap_palloc apr_palloc
#define ap_pcalloc apr_pcalloc
#define ap_pool_join apr_pool_join
@@ -55,11 +55,11 @@
#define ap_pstrcat apr_pstrcat
#define ap_pstrdup apr_pstrdup
#define ap_pstrndup apr_pstrndup
-#define ap_push_array apr_push_array
+#define ap_push_array apr_array_push
#define ap_pvsprintf apr_pvsprintf
-#define ap_register_cleanup apr_register_cleanup
-#define ap_register_other_child apr_register_other_child
-#define ap_run_cleanup apr_run_cleanup
+#define ap_register_cleanup apr_pool_cleanup_register
+#define ap_register_other_child apr_proc_other_child_register
+#define ap_run_cleanup apr_pool_cleanup_run
#define ap_signal apr_signal
#define ap_snprintf apr_snprintf
#define ap_table_add apr_table_add
@@ -72,8 +72,8 @@
#define ap_table_set apr_table_set
#define ap_table_setn apr_table_setn
#define ap_table_unset apr_table_unset
-#define ap_unregister_other_child apr_unregister_other_child
-#define ap_validate_password apr_validate_password
+#define ap_unregister_other_child apr_proc_other_child_unregister
+#define ap_validate_password apr_password_validate
#define ap_vformatter apr_vformatter
#define ap_vsnprintf apr_vsnprintf
#define ap_wait_t apr_wait_t
1.94 +78 -78 apr/include/apr_file_io.h
Index: apr_file_io.h
===================================================================
RCS file: /home/cvs/apr/include/apr_file_io.h,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- apr_file_io.h 2001/01/27 17:57:03 1.93
+++ apr_file_io.h 2001/02/08 07:44:45 1.94
@@ -73,7 +73,7 @@
* @package APR File handling
*/
-/* Flags for apr_open */
+/* Flags for apr_file_open */
#define APR_READ 1 /* Open the file for reading */
#define APR_WRITE 2 /* Open the file for writing */
#define APR_CREATE 4 /* Create the file if not there */
@@ -87,7 +87,7 @@
#define APR_XTHREAD 512 /* Platform dependent tag to open the file
for use across multiple threads */
-/* flags for apr_seek */
+/* flags for apr_file_seek */
#define APR_SET SEEK_SET
#define APR_CUR SEEK_CUR
#define APR_END SEEK_END
@@ -136,30 +136,30 @@
* </PRE>
* @param perm Access permissions for file.
* @param cont The pool to use.
- * @deffunc apr_status_t apr_open(apr_file_t **new_file, const char *fname, apr_int32_t flag, apr_fileperms_t perm, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_file_open(apr_file_t **new_file, const char *fname, apr_int32_t flag, apr_fileperms_t perm, apr_pool_t *cont)
* @tip If perm is APR_OS_DEFAULT and the file is being created, appropriate
* default permissions will be used. *arg1 must point to a valid file_t,
* or NULL (in which case it will be allocated)
*/
-APR_DECLARE(apr_status_t) apr_open(apr_file_t **new_file, const char *fname,
+APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new_file, const char *fname,
apr_int32_t flag, apr_fileperms_t perm,
apr_pool_t *cont);
/**
* Close the specified file.
* @param file The file descriptor to close.
- * @deffunc apr_status_t apr_close(apr_file_t *file)
+ * @deffunc apr_status_t apr_file_close(apr_file_t *file)
*/
-APR_DECLARE(apr_status_t) apr_close(apr_file_t *file);
+APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file);
/**
* delete the specified file.
* @param path The full path to the file (using / on all systems)
* @param cont The pool to use.
- * @deffunc apr_status_t apr_remove_file(const char *path, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_file_remove(const char *path, apr_pool_t *cont)
* @tip If the file is open, it won't be removed until all instances are closed.
*/
-APR_DECLARE(apr_status_t) apr_remove_file(const char *path, apr_pool_t *cont);
+APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *cont);
/**
* rename the specified file.
@@ -168,9 +168,9 @@
* @param pool The pool to use.
* @tip If a file exists at the new location, then it will be overwritten.
* Moving files or directories across devices may not be possible.
- * @deffunc apr_status_t apr_rename_file(const char *from_path, const char *to_path, apr_pool_t *pool)
+ * @deffunc apr_status_t apr_file_rename(const char *from_path, const char *to_path, apr_pool_t *pool)
*/
-APR_DECLARE(apr_status_t) apr_rename_file(const char *from_path,
+APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path,
const char *to_path,
apr_pool_t *pool);
@@ -178,34 +178,34 @@
* Are we at the end of the file
* @param fptr The apr file we are testing.
* @tip Returns APR_EOF if we are at the end of file, APR_SUCCESS otherwise.
- * @deffunc apr_status_t apr_eof(apr_file_t *fptr)
+ * @deffunc apr_status_t apr_file_eof(apr_file_t *fptr)
*/
-APR_DECLARE(apr_status_t) apr_eof(apr_file_t *fptr);
+APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr);
/**
* Is there an error on the stream?
* @param fptr The apr file we are testing.
* @tip Returns -1 if the error indicator is set, APR_SUCCESS otherwise.
- * @deffunc apr_status_t apr_ferror(apr_file_t *fptr)
+ * @deffunc apr_status_t apr_file_error(apr_file_t *fptr)
*/
-APR_DECLARE(apr_status_t) apr_ferror(apr_file_t *fptr);
+APR_DECLARE(apr_status_t) apr_file_error(apr_file_t *fptr);
/**
* open standard error as an apr file pointer.
* @param thefile The apr file to use as stderr.
* @param cont The pool to allocate the file out of.
- * @deffunc apr_status_t apr_open_stderr(apr_file_t **thefile, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_file_open_stderr(apr_file_t **thefile, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_open_stderr(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile,
apr_pool_t *cont);
/**
* open standard output as an apr file pointer.
* @param thefile The apr file to use as stdout.
* @param cont The pool to allocate the file out of.
- * @deffunc apr_status_t apr_open_stdout(apr_file_t **thefile, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_file_open_stdout(apr_file_t **thefile, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_open_stdout(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile,
apr_pool_t *cont);
/**
@@ -213,7 +213,7 @@
* @param thefile The file descriptor to read from.
* @param buf The buffer to store the data to.
* @param nbytes On entry, the number of bytes to read; on exit, the number of bytes read.
- * @tip apr_read will read up to the specified number of bytes, but never
+ * @tip apr_file_read will read up to the specified number of bytes, but never
* more. If there isn't enough data to fill that number of bytes, all
* of the available data is read. The third argument is modified to
* reflect the number of bytes read. If a char was put back into the
@@ -223,9 +223,9 @@
* error to be returned.
*
* APR_EINTR is never returned.
- * @deffunc apr_status_t apr_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
+ * @deffunc apr_status_t apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
*/
-APR_DECLARE(apr_status_t) apr_read(apr_file_t *thefile, void *buf,
+APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf,
apr_size_t *nbytes);
/**
@@ -234,7 +234,7 @@
* @param buf The buffer which contains the data.
* @param nbytes On entry, the number of bytes to write; on exit, the number
* of bytes written.
- * @tip apr_write will write up to the specified number of bytes, but never
+ * @tip apr_file_write will write up to the specified number of bytes, but never
* more. If the OS cannot write that many bytes, it will write as many
* as it can. The third argument is modified to reflect the * number
* of bytes written.
@@ -242,9 +242,9 @@
* It is possible for both bytes to be written and an error to be returned.
*
* APR_EINTR is never returned.
- * @deffunc apr_status_t apr_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
+ * @deffunc apr_status_t apr_file_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
*/
-APR_DECLARE(apr_status_t) apr_write(apr_file_t *thefile, const void *buf,
+APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf,
apr_size_t *nbytes);
/**
@@ -258,12 +258,12 @@
* @tip It is possible for both bytes to be written and an error to be returned.
* APR_EINTR is never returned.
*
- * apr_writev is available even if the underlying operating system
+ * apr_file_writev is available even if the underlying operating system
*
* doesn't provide writev().
- * @deffunc apr_status_t apr_writev(apr_file_t *thefile, const struct iovec *vec, apr_size_t nvec, apr_size_t *nbytes)
+ * @deffunc apr_status_t apr_file_writev(apr_file_t *thefile, const struct iovec *vec, apr_size_t nvec, apr_size_t *nbytes)
*/
-APR_DECLARE(apr_status_t) apr_writev(apr_file_t *thefile,
+APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile,
const struct iovec *vec,
apr_size_t nvec, apr_size_t *nbytes);
@@ -274,7 +274,7 @@
* @param buf The buffer to store the data to.
* @param nbytes The number of bytes to read.
* @param bytes_read If non-NULL, this will contain the number of bytes read.
- * @tip apr_read will read up to the specified number of bytes, but never
+ * @tip apr_file_read will read up to the specified number of bytes, but never
* more. If there isn't enough data to fill that number of bytes,
* then the process/thread will block until it is available or EOF
* is reached. If a char was put back into the stream via ungetc,
@@ -284,9 +284,9 @@
* error to be returned.
*
* APR_EINTR is never returned.
- * @deffunc apr_status_t apr_full_read(apr_file_t *thefile, void *buf, apr_size_t nbytes, apr_size_t *bytes_read)
+ * @deffunc apr_status_t apr_file_read_file(apr_file_t *thefile, void *buf, apr_size_t nbytes, apr_size_t *bytes_read)
*/
-APR_DECLARE(apr_status_t) apr_full_read(apr_file_t *thefile, void *buf,
+APR_DECLARE(apr_status_t) apr_file_read_file(apr_file_t *thefile, void *buf,
apr_size_t nbytes,
apr_size_t *bytes_read);
@@ -297,7 +297,7 @@
* @param buf The buffer which contains the data.
* @param nbytes The number of bytes to write.
* @param bytes_written If non-NULL, this will contain the number of bytes written.
- * @tip apr_write will write up to the specified number of bytes, but never
+ * @tip apr_file_write will write up to the specified number of bytes, but never
* more. If the OS cannot write that many bytes, the process/thread
* will block until they can be written. Exceptional error such as
* "out of space" or "pipe closed" will terminate with an error.
@@ -305,9 +305,9 @@
* It is possible for both bytes to be written and an error to be returned.
*
* APR_EINTR is never returned.
- * @deffunc apr_status_t apr_full_write(apr_file_t *thefile, const void *buf, apr_size_t nbytes, apr_size_t *bytes_written)
+ * @deffunc apr_status_t apr_file_write_full(apr_file_t *thefile, const void *buf, apr_size_t nbytes, apr_size_t *bytes_written)
*/
-APR_DECLARE(apr_status_t) apr_full_write(apr_file_t *thefile, const void *buf,
+APR_DECLARE(apr_status_t) apr_file_write_full(apr_file_t *thefile, const void *buf,
apr_size_t nbytes,
apr_size_t *bytes_written);
@@ -315,49 +315,49 @@
* put a character into the specified file.
* @param ch The character to write.
* @param thefile The file descriptor to write to
- * @deffunc apr_status_t apr_putc(char ch, apr_file_t *thefile)
+ * @deffunc apr_status_t apr_file_putc(char ch, apr_file_t *thefile)
*/
-APR_DECLARE(apr_status_t) apr_putc(char ch, apr_file_t *thefile);
+APR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile);
/**
* get a character from the specified file.
* @param ch The character to write.
* @param thefile The file descriptor to write to
- * @deffunc apr_status_t apr_getc(char *ch, apr_file_t *thefile)
+ * @deffunc apr_status_t apr_file_getc(char *ch, apr_file_t *thefile)
*/
-APR_DECLARE(apr_status_t) apr_getc(char *ch, apr_file_t *thefile);
+APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile);
/**
* put a character back onto a specified stream.
* @param ch The character to write.
* @param thefile The file descriptor to write to
- * @deffunc apr_status_t apr_ungetc(char ch, apr_file_t *thefile)
+ * @deffunc apr_status_t apr_file_ungetc(char ch, apr_file_t *thefile)
*/
-APR_DECLARE(apr_status_t) apr_ungetc(char ch, apr_file_t *thefile);
+APR_DECLARE(apr_status_t) apr_file_ungetc(char ch, apr_file_t *thefile);
/**
* Get a string from a specified file.
* @param str The buffer to store the string in.
* @param len The length of the string
* @param thefile The file descriptor to read from
- * @deffunc apr_status_t apr_fgets(char *str, int len, apr_file_t *thefile)
+ * @deffunc apr_status_t apr_file_gets(char *str, int len, apr_file_t *thefile)
*/
-APR_DECLARE(apr_status_t) apr_fgets(char *str, int len, apr_file_t *thefile);
+APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile);
/**
* Put the string into a specified file.
* @param str The string to write.
* @param thefile The file descriptor to write to
- * @deffunc apr_status_t apr_puts(const char *str, apr_file_t *thefile)
+ * @deffunc apr_status_t apr_file_puts(const char *str, apr_file_t *thefile)
*/
-APR_DECLARE(apr_status_t) apr_puts(const char *str, apr_file_t *thefile);
+APR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile);
/**
* Flush the file's buffer.
* @param thefile The file descriptor to flush
- * @deffunc apr_status_t apr_flush(apr_file_t *thefile)
+ * @deffunc apr_status_t apr_file_flush(apr_file_t *thefile)
*/
-APR_DECLARE(apr_status_t) apr_flush(apr_file_t *thefile);
+APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile);
/**
* duplicate the specified file descriptor.
@@ -365,9 +365,9 @@
* @param old_file The file to duplicate.
* @param p The pool to use for the new file.
* @tip *arg1 must point to a valid apr_file_t, or point to NULL
- * @deffunc apr_status_t apr_dupfile(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p)
+ * @deffunc apr_status_t apr_file_dup(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p)
*/
-APR_DECLARE(apr_status_t) apr_dupfile(apr_file_t **new_file,
+APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
apr_file_t *old_file,
apr_pool_t *p);
@@ -382,9 +382,9 @@
* @param offset The offset to move the pointer to.
* @tip The third argument is modified to be the offset the pointer
was actually moved to.
- * @deffunc apr_status_t apr_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
+ * @deffunc apr_status_t apr_file_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
*/
-APR_DECLARE(apr_status_t) apr_seek(apr_file_t *thefile,
+APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile,
apr_seek_where_t where,
apr_off_t *offset);
@@ -393,9 +393,9 @@
* @param in The file descriptor to use as input to the pipe.
* @param out The file descriptor to use as output from the pipe.
* @param cont The pool to operate on.
- * @deffunc apr_status_t apr_create_pipe(apr_file_t **in, apr_file_t **out, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_create_pipe(apr_file_t **in, apr_file_t **out,
+APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out,
apr_pool_t *cont);
/**
@@ -403,9 +403,9 @@
* @param filename The filename of the named pipe
* @param perm The permissions for the newly created pipe.
* @param cont The pool to operate on.
- * @deffunc apr_status_t apr_create_namedpipe(const char *filename, apr_fileperms_t perm, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_file_namedpipe_create(const char *filename, apr_fileperms_t perm, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_create_namedpipe(const char *filename,
+APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
apr_fileperms_t perm,
apr_pool_t *cont);
@@ -413,9 +413,9 @@
* Get the timeout value for a pipe or manipulate the blocking state.
* @param thepipe The pipe we are getting a timeout for.
* @param timeout The current timeout value in microseconds.
- * @deffunc apr_status_t apr_get_pipe_timeout(apr_file_t *thepipe, apr_interval_time_t *timeout)
+ * @deffunc apr_status_t apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_interval_time_t *timeout)
*/
-APR_DECLARE(apr_status_t) apr_get_pipe_timeout(apr_file_t *thepipe,
+APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe,
apr_interval_time_t *timeout);
/**
@@ -423,9 +423,9 @@
* @param thepipe The pipe we are setting a timeout on.
* @param timeout The timeout value in microseconds. Values < 0 mean wait
* forever, 0 means do not wait at all.
- * @deffunc apr_status_t apr_set_pipe_timeout(apr_file_t *thepipe, apr_interval_time_t timeout)
+ * @deffunc apr_status_t apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
*/
-APR_DECLARE(apr_status_t) apr_set_pipe_timeout(apr_file_t *thepipe,
+APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe,
apr_interval_time_t timeout);
/** file (un)locking functions. */
@@ -438,16 +438,16 @@
* block.
* @param thefile The file to lock.
* @param type The type of lock to establish on the file.
- * @deffunc apr_status_t apr_lock_file(apr_file_t *thefile, int type)
+ * @deffunc apr_status_t apr_file_lock(apr_file_t *thefile, int type)
*/
-APR_DECLARE(apr_status_t) apr_lock_file(apr_file_t *thefile, int type);
+APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type);
/**
* Remove any outstanding locks on the file.
* @param thefile The file to unlock.
- * @deffunc apr_status_t apr_unlock_file(apr_file_t *thefile)
+ * @deffunc apr_status_t apr_file_unlock(apr_file_t *thefile)
*/
-APR_DECLARE(apr_status_t) apr_unlock_file(apr_file_t *thefile);
+APR_DECLARE(apr_status_t) apr_file_unlock(apr_file_t *thefile);
/**accessor and general file_io functions. */
@@ -455,9 +455,9 @@
* return the file name of the current file.
* @param new_path The path of the file.
* @param thefile The currently open file.
- * @deffunc apr_status_t apr_get_filename(const char **new_path, apr_file_t *thefile)
+ * @deffunc apr_status_t apr_file_name_get(const char **new_path, apr_file_t *thefile)
*/
-APR_DECLARE(apr_status_t) apr_get_filename(const char **new_path,
+APR_DECLARE(apr_status_t) apr_file_name_get(const char **new_path,
apr_file_t *thefile);
/**
@@ -465,9 +465,9 @@
* @param data The user data associated with the file.
* @param key The key to use for retreiving data associated with this file.
* @param file The currently open file.
- * @deffunc apr_status_t apr_get_filedata(void **data, const char *key, apr_file_t *file)
+ * @deffunc apr_status_t apr_file_data_get(void **data, const char *key, apr_file_t *file)
*/
-APR_DECLARE(apr_status_t) apr_get_filedata(void **data, const char *key,
+APR_DECLARE(apr_status_t) apr_file_data_get(void **data, const char *key,
apr_file_t *file);
/**
@@ -476,9 +476,9 @@
* @param data The user data to associate with the file.
* @param key The key to use for assocaiteing data with the file.
* @param cleanup The cleanup routine to use when the file is destroyed.
- * @deffunc apr_status_t apr_set_filedata(apr_file_t *file, void *data, const char *key, apr_status_t (*cleanup)(void *))
+ * @deffunc apr_status_t apr_file_data_set(apr_file_t *file, void *data, const char *key, apr_status_t (*cleanup)(void *))
*/
-APR_DECLARE(apr_status_t) apr_set_filedata(apr_file_t *file, void *data,
+APR_DECLARE(apr_status_t) apr_file_data_set(apr_file_t *file, void *data,
const char *key,
apr_status_t (*cleanup)(void *));
@@ -488,9 +488,9 @@
* @param format The format string
* @param ... The values to substitute in the format string
* @return The number of bytes written
- * @deffunc int apr_fprintf(apr_file_t *fptr, const char *format, ...)
+ * @deffunc int apr_file_printf(apr_file_t *fptr, const char *format, ...)
*/
-APR_DECLARE_NONSTD(int) apr_fprintf(apr_file_t *fptr, const char *format, ...)
+APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr, const char *format, ...)
__attribute__((format(printf,2,3)));
/**
@@ -502,9 +502,9 @@
* are specified which could not be set.
*
* Platforms which do not implement this feature will return APR_ENOTIMPL.
- * @deffunc apr_status_t apr_setfileperms(const char *fname, apr_fileperms_t perms)
+ * @deffunc apr_status_t apr_file_perms_set(const char *fname, apr_fileperms_t perms)
*/
-APR_DECLARE(apr_status_t) apr_setfileperms(const char *fname,
+APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
apr_fileperms_t perms);
/**
@@ -512,34 +512,34 @@
* @param path the path for the directory to be created. (use / on all systems)
* @param perm Permissions for the new direcoty.
* @param cont the pool to use.
- * @deffunc apr_status_t apr_make_dir(const char *path, apr_fileperms_t perm, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_make_dir(const char *path, apr_fileperms_t perm,
+APR_DECLARE(apr_status_t) apr_dir_make(const char *path, apr_fileperms_t perm,
apr_pool_t *cont);
/**
* Remove directory from the file system.
* @param path the path for the directory to be removed. (use / on all systems)
* @param cont the pool to use.
- * @deffunc apr_status_t apr_remove_dir(const char *path, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_dir_remove(const char *path, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_remove_dir(const char *path, apr_pool_t *cont);
+APR_DECLARE(apr_status_t) apr_dir_remove(const char *path, apr_pool_t *cont);
/**
* get the specified file's stats.
* @param finfo Where to store the information about the file.
* @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
* @param thefile The file to get information about.
- * @deffunc apr_status_t apr_getfileinfo(apr_finfo_t *finfo, apr_int32_t wanted, apr_file_t *thefile)
+ * @deffunc apr_status_t apr_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted, apr_file_t *thefile)
*/
-APR_DECLARE(apr_status_t) apr_getfileinfo(apr_finfo_t *finfo,
+APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
apr_int32_t wanted,
apr_file_t *thefile);
/**
* Get the pool used by the file.
* @return apr_pool_t the pool
- * @deffunc apr_pool_t apr_get_file_pool(apr_file_t *f)
+ * @deffunc apr_pool_t apr_file_pool_get(apr_file_t *f)
*/
APR_POOL_DECLARE_ACCESSOR(file);
1.31 +6 -6 apr/include/apr_getopt.h
Index: apr_getopt.h
===================================================================
RCS file: /home/cvs/apr/include/apr_getopt.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- apr_getopt.h 2001/02/02 05:56:12 1.30
+++ apr_getopt.h 2001/02/08 07:44:45 1.31
@@ -115,14 +115,14 @@
* @param argc The number of arguments to parse
* @param argv The array of arguments to parse
* @tip Arguments 2 and 3 are most commonly argc and argv from main(argc, argv)
- * @deffunc apr_status_t apr_initopt(apr_getopt_t **os, apr_pool_t *cont,int argc, char *const *argv)
+ * @deffunc apr_status_t apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont,int argc, char *const *argv)
*/
-APR_DECLARE(apr_status_t) apr_initopt(apr_getopt_t **os, apr_pool_t *cont,
+APR_DECLARE(apr_status_t) apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont,
int argc, const char * const *argv);
/**
- * Parse the options initialized by apr_initopt().
- * @param os The apr_opt_t structure returned by apr_initopt()
+ * Parse the options initialized by apr_getopt_init().
+ * @param os The apr_opt_t structure returned by apr_getopt_init()
* @param opts A string of characters that are acceptable options to the
* program. Characters followed by ":" are required to have an
* option associated
@@ -141,10 +141,10 @@
char *optch, const char **optarg);
/**
- * Parse the options initialized by apr_initopt(), accepting long
+ * Parse the options initialized by apr_getopt_init(), accepting long
* options beginning with "--" in addition to single-character
* options beginning with "-".
- * @param os The apr_getopt_t structure created by apr_initopt()
+ * @param os The apr_getopt_t structure created by apr_getopt_init()
* @param opts A pointer to a list of apr_getopt_option_t structures, which
* can be initialized with { "name", optch, has_args }. has_args
* is nonzero if the option requires an argument. A structure
1.22 +2 -2 apr/include/apr_hash.h
Index: apr_hash.h
===================================================================
RCS file: /home/cvs/apr/include/apr_hash.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- apr_hash.h 2001/02/02 05:56:12 1.21
+++ apr_hash.h 2001/02/08 07:44:45 1.22
@@ -97,9 +97,9 @@
* Create a hash table.
* @param pool The pool to allocate the hash table out of
* @return The hash table just created
- * @deffunc apr_hash_t *apr_make_hash(apr_pool_t *pool)
+ * @deffunc apr_hash_t *apr_hash_make(apr_pool_t *pool)
*/
-APR_DECLARE(apr_hash_t *) apr_make_hash(apr_pool_t *pool);
+APR_DECLARE(apr_hash_t *) apr_hash_make(apr_pool_t *pool);
/**
* Associate a value with a key in a hash table.
1.50 +4 -4 apr/include/apr_lib.h
Index: apr_lib.h
===================================================================
RCS file: /home/cvs/apr/include/apr_lib.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- apr_lib.h 2001/01/18 20:07:20 1.49
+++ apr_lib.h 2001/02/08 07:44:45 1.50
@@ -212,9 +212,9 @@
* Validate any password encypted with any algorithm that APR understands
* @param passwd The password to validate
* @param hash The password to validate against
- * @deffunc apr_status_t apr_validate_password(const char *passwd, const char *hash)
+ * @deffunc apr_status_t apr_password_validate(const char *passwd, const char *hash)
*/
-APR_DECLARE(apr_status_t) apr_validate_password(const char *passwd,
+APR_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
const char *hash);
/*
@@ -264,9 +264,9 @@
* @param prompt The prompt to display
* @param pwbuf Where to store the password
* @param bufsize The length of the password string.
- * @deffunc apr_status_t apr_getpass(const char *prompt, char *pwbuf, size_t *bufsize)
+ * @deffunc apr_status_t apr_password_get(const char *prompt, char *pwbuf, size_t *bufsize)
*/
-APR_DECLARE(apr_status_t) apr_getpass(const char *prompt, char *pwbuf,
+APR_DECLARE(apr_status_t) apr_password_get(const char *prompt, char *pwbuf,
size_t *bufsize);
#ifdef __cplusplus
1.21 +15 -15 apr/include/apr_lock.h
Index: apr_lock.h
===================================================================
RCS file: /home/cvs/apr/include/apr_lock.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- apr_lock.h 2001/01/18 20:07:20 1.20
+++ apr_lock.h 2001/02/08 07:44:45 1.21
@@ -96,9 +96,9 @@
* @param cont The pool to operate on.
* @tip APR_CROSS_PROCESS may lock both processes and threads, but it is
* only guaranteed to lock processes.
- * @deffunc apr_status_t apr_create_lock(apr_lock_t **lock, apr_locktype_e type, apr_lockscope_e scope, const char *fname, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_lock_create(apr_lock_t **lock, apr_locktype_e type, apr_lockscope_e scope, const char *fname, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_create_lock(apr_lock_t **lock,
+APR_DECLARE(apr_status_t) apr_lock_create(apr_lock_t **lock,
apr_locktype_e type,
apr_lockscope_e scope,
const char *fname,
@@ -107,25 +107,25 @@
/**
* Lock a protected region.
* @param lock The lock to set.
- * @deffunc apr_status_t apr_lock(apr_lock_t *lock)
+ * @deffunc apr_status_t apr_lock_aquire(apr_lock_t *lock)
*/
-APR_DECLARE(apr_status_t) apr_lock(apr_lock_t *lock);
+APR_DECLARE(apr_status_t) apr_lock_aquire(apr_lock_t *lock);
/**
* Unlock a protected region.
* @param lock The lock to reset.
- * @deffunc apr_status_t apr_unlock(apr_lock_t *lock)
+ * @deffunc apr_status_t apr_lock_release(apr_lock_t *lock)
*/
-APR_DECLARE(apr_status_t) apr_unlock(apr_lock_t *lock);
+APR_DECLARE(apr_status_t) apr_lock_release(apr_lock_t *lock);
/**
* Free the memory associated with a lock.
* @param lock The lock to free.
- * @deffunc apr_status_t apr_destroy_lock(apr_lock_t *lock)
+ * @deffunc apr_status_t apr_lock_destroy(apr_lock_t *lock)
* @tip If the lock is currently active when it is destroyed, it
* will be unlocked first.
*/
-APR_DECLARE(apr_status_t) apr_destroy_lock(apr_lock_t *lock);
+APR_DECLARE(apr_status_t) apr_lock_destroy(apr_lock_t *lock);
/**
* Re-open a lock in a child process.
@@ -133,15 +133,15 @@
* @param fname A file name to use if the lock mechanism requires one. This
* argument should always be provided. The lock code itself will
* determine if it should be used. This filename should be the
- * same one that was passed to apr_create_lock
+ * same one that was passed to apr_lock_create
* @param cont The pool to operate on.
* @tip This function doesn't always do something, it depends on the
* locking mechanism chosen for the platform, but it is a good
* idea to call it regardless, because it makes the code more
* portable.
- * @deffunc apr_status_t apr_child_init_lock(apr_lock_t **lock, const char *fname, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_child_init_lock(apr_lock_t **lock,
+APR_DECLARE(apr_status_t) apr_lock_child_init(apr_lock_t **lock,
const char *fname,
apr_pool_t *cont);
@@ -150,9 +150,9 @@
* @param lock The currently open lock.
* @param key The key to use when retreiving data associated with this lock
* @param data The user data associated with the lock.
- * @deffunc apr_status_t apr_get_lockdata(apr_lock_t *lock, const char *key, void *data)
+ * @deffunc apr_status_t apr_lock_data_get(apr_lock_t *lock, const char *key, void *data)
*/
-APR_DECLARE(apr_status_t) apr_get_lockdata(apr_lock_t *lock, const char *key,
+APR_DECLARE(apr_status_t) apr_lock_data_get(apr_lock_t *lock, const char *key,
void *data);
/**
@@ -161,9 +161,9 @@
* @param data The user data to associate with the lock.
* @param key The key to use when associating data with this lock
* @param cleanup The cleanup to use when the lock is destroyed.
- * @deffunc apr_status_t apr_set_lockdata(apr_lock_t *lock, void *data, const char *key, apr_status_t (*cleanup)(void *))
+ * @deffunc apr_status_t apr_lock_data_set(apr_lock_t *lock, void *data, const char *key, apr_status_t (*cleanup)(void *))
*/
-APR_DECLARE(apr_status_t) apr_set_lockdata(apr_lock_t *lock, void *data,
+APR_DECLARE(apr_status_t) apr_lock_data_set(apr_lock_t *lock, void *data,
const char *key,
apr_status_t (*cleanup)(void *));
1.21 +11 -11 apr/include/apr_md5.h
Index: apr_md5.h
===================================================================
RCS file: /home/cvs/apr/include/apr_md5.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- apr_md5.h 2001/01/18 20:07:20 1.20
+++ apr_md5.h 2001/02/08 07:44:46 1.21
@@ -119,22 +119,22 @@
/**
* MD5 Initialize. Begins an MD5 operation, writing a new context.
* @param context The MD5 context to initialize.
- * @deffunc apr_status_t apr_MD5Init(apr_md5_ctx_t *context)
+ * @deffunc apr_status_t apr_md5_init(apr_md5_ctx_t *context)
*/
-APR_DECLARE(apr_status_t) apr_MD5Init(apr_md5_ctx_t *context);
+APR_DECLARE(apr_status_t) apr_md5_init(apr_md5_ctx_t *context);
/**
* MD5 translation setup. Provides the APR translation handle to be used
* for translating the content before calculating the digest.
* @param context The MD5 content to set the translation for.
* @param xlate The translation handle to use for this MD5 context
- * @deffunc apr_status_t apr_MD5SetXlate(apr_md5_ctx_t *context, apr_xlate_t *xlate)
+ * @deffunc apr_status_t apr_md5_set_xlate(apr_md5_ctx_t *context, apr_xlate_t *xlate)
*/
#if APR_HAS_XLATE
-APR_DECLARE(apr_status_t) apr_MD5SetXlate(apr_md5_ctx_t *context,
+APR_DECLARE(apr_status_t) apr_md5_set_xlate(apr_md5_ctx_t *context,
apr_xlate_t *xlate);
#else
-#define apr_MD5SetXlate(context, xlate) APR_ENOTIMPL
+#define apr_md5_set_xlate(context, xlate) APR_ENOTIMPL
#endif
/**
@@ -143,9 +143,9 @@
* @param context The MD5 content to update.
* @param input next message block to update
* @param inputLen The length of the next message block
- * @deffunc apr_status_t apr_MD5Update(apr_md5_ctx_t *context, const unsigned char *input, unsigned int inputLen)
+ * @deffunc apr_status_t apr_md5_update(apr_md5_ctx_t *context, const unsigned char *input, unsigned int inputLen)
*/
-APR_DECLARE(apr_status_t) apr_MD5Update(apr_md5_ctx_t *context,
+APR_DECLARE(apr_status_t) apr_md5_update(apr_md5_ctx_t *context,
const unsigned char *input,
unsigned int inputLen);
@@ -154,9 +154,9 @@
* message digest and zeroing the context
* @param digest The final MD5 digest
* @param context The MD5 content we are finalizing.
- * @deffunc apr_status_t apr_MD5Final(unsigned char digest[MD5_DIGESTSIZE], apr_md5_ctx_t *context)
+ * @deffunc apr_status_t apr_md5_final(unsigned char digest[MD5_DIGESTSIZE], apr_md5_ctx_t *context)
*/
-APR_DECLARE(apr_status_t) apr_MD5Final(unsigned char digest[MD5_DIGESTSIZE],
+APR_DECLARE(apr_status_t) apr_md5_final(unsigned char digest[MD5_DIGESTSIZE],
apr_md5_ctx_t *context);
/**
@@ -165,9 +165,9 @@
* @param salt The salt to use for the encoding
* @param result The string to store the encoded password in
* @param nbytes The length of the string
- * @deffunc apr_status_t apr_MD5Encode(const char *password, const char *salt, char *result, size_t nbytes)
+ * @deffunc apr_status_t apr_md5_encode(const char *password, const char *salt, char *result, size_t nbytes)
*/
-APR_DECLARE(apr_status_t) apr_MD5Encode(const char *password, const char *salt,
+APR_DECLARE(apr_status_t) apr_md5_encode(const char *password, const char *salt,
char *result, size_t nbytes);
#ifdef __cplusplus
1.97 +37 -37 apr/include/apr_network_io.h
Index: apr_network_io.h
===================================================================
RCS file: /home/cvs/apr/include/apr_network_io.h,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- apr_network_io.h 2001/02/02 18:55:39 1.96
+++ apr_network_io.h 2001/02/08 07:44:46 1.97
@@ -194,7 +194,7 @@
/** This points to the IP address structure within the appropriate
* sockaddr structure. */
void *ipaddr_ptr;
- /** If multiple addresses were found by apr_getaddrinfo(), this
+ /** If multiple addresses were found by apr_sockaddr_info_get(), this
* points to a representation of the next address. */
apr_sockaddr_t *next;
};
@@ -226,9 +226,9 @@
* @param family The address family of the socket (e.g., APR_INET).
* @param type The type of the socket (e.g., SOCK_STREAM).
* @param cont The pool to use
- * @deffunc apr_status_t apr_create_socket(apr_socket_t **new_sock, int family, int type, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_socket_create(apr_socket_t **new_sock, int family, int type, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_create_socket(apr_socket_t **new_sock,
+APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new_sock,
int family, int type,
apr_pool_t *cont);
@@ -251,9 +251,9 @@
/**
* Close a tcp socket.
* @param thesocket The socket to close
- * @deffunc apr_status_t apr_close_socket(apr_socket_t *thesocket)
+ * @deffunc apr_status_t apr_socket_close(apr_socket_t *thesocket)
*/
-APR_DECLARE(apr_status_t) apr_close_socket(apr_socket_t *thesocket);
+APR_DECLARE(apr_status_t) apr_socket_close(apr_socket_t *thesocket);
/**
* Bind the socket to its associated port
@@ -308,9 +308,9 @@
* @param port The port number.
* @param flags Special processing flags.
* @param p The pool for the apr_sockaddr_t and associated storage.
- * @deffunc apr_status_t apr_getaddrinfo(apr_sockaddr_t **sa, const char *hostname, apr_int32_t family, apr_port_t port, apr_int32_t flags, apr_pool_t *p)
+ * @deffunc apr_status_t apr_sockaddr_info_get(apr_sockaddr_t **sa, const char *hostname, apr_int32_t family, apr_port_t port, apr_int32_t flags, apr_pool_t *p)
*/
-APR_DECLARE(apr_status_t) apr_getaddrinfo(apr_sockaddr_t **sa,
+APR_DECLARE(apr_status_t) apr_sockaddr_info_get(apr_sockaddr_t **sa,
const char *hostname,
apr_int32_t family,
apr_port_t port,
@@ -377,9 +377,9 @@
* @param data The user data associated with the socket.
* @param key The key to associate with the user data.
* @param sock The currently open socket.
- * @deffunc apr_status_t apr_get_socketdata(void **data, const char *key, apr_socket_t *sock)
+ * @deffunc apr_status_t apr_socket_data_get(void **data, const char *key, apr_socket_t *sock)
*/
-APR_DECLARE(apr_status_t) apr_get_socketdata(void **data, const char *key,
+APR_DECLARE(apr_status_t) apr_socket_data_get(void **data, const char *key,
apr_socket_t *sock);
/**
@@ -388,9 +388,9 @@
* @param data The user data to associate with the socket.
* @param key The key to associate with the data.
* @param cleanup The cleanup to call when the socket is destroyed.
- * @deffunc apr_status_t apr_set_socketdata(apr_socket_t *sock, void *data, const char *key, apr_status_t (*cleanup)(void*))
+ * @deffunc apr_status_t apr_socket_data_set(apr_socket_t *sock, void *data, const char *key, apr_status_t (*cleanup)(void*))
*/
-APR_DECLARE(apr_status_t) apr_set_socketdata(apr_socket_t *sock, void *data,
+APR_DECLARE(apr_status_t) apr_socket_data_set(apr_socket_t *sock, void *data,
const char *key,
apr_status_t (*cleanup)(void*));
@@ -537,9 +537,9 @@
* @param sa The returned apr_sockaddr_t.
* @param which Which interface do we want the apr_sockaddr_t for?
* @param sock The socket to use
- * @deffunc apr_status_t apr_get_sockaddr(apr_sockaddr_t **sa, apr_interface_e which, apr_socket_t *sock)
+ * @deffunc apr_status_t apr_socket_addr_get(apr_sockaddr_t **sa, apr_interface_e which, apr_socket_t *sock)
*/
-APR_DECLARE(apr_status_t) apr_get_sockaddr(apr_sockaddr_t **sa,
+APR_DECLARE(apr_status_t) apr_socket_addr_get(apr_sockaddr_t **sa,
apr_interface_e which,
apr_socket_t *sock);
@@ -547,18 +547,18 @@
* Set the port in an APR socket address.
* @param sockaddr The socket address to set.
* @param port The port to be stored in the socket address.
- * @deffunc apr_status_t apr_set_port(apr_sockaddr_t *sockaddr, apr_port_t port)
+ * @deffunc apr_status_t apr_sockaddr_port_set(apr_sockaddr_t *sockaddr, apr_port_t port)
*/
-APR_DECLARE(apr_status_t) apr_set_port(apr_sockaddr_t *sockaddr,
+APR_DECLARE(apr_status_t) apr_sockaddr_port_set(apr_sockaddr_t *sockaddr,
apr_port_t port);
/**
* Return the port in an APR socket address.
* @param port The port from the socket address.
* @param sockaddr The socket address to reference.
- * @deffunc apr_status_t apr_get_port(apr_port_t *port, apr_sockaddr_t *sockaddr)
+ * @deffunc apr_status_t apr_sockaddr_port_get(apr_port_t *port, apr_sockaddr_t *sockaddr)
*/
-APR_DECLARE(apr_status_t) apr_get_port(apr_port_t *port,
+APR_DECLARE(apr_status_t) apr_sockaddr_port_get(apr_port_t *port,
apr_sockaddr_t *sockaddr);
/**
@@ -566,9 +566,9 @@
* @param sockaddr The socket address to use
* @param addr The IP address to attach to the socket.
* Use APR_ANYADDR to use any IP addr on the machine.
- * @deffunc apr_status_t apr_set_ipaddr(apr_sockaddr_t *sockaddr, const char *addr)
+ * @deffunc apr_status_t apr_sockaddr_ip_set(apr_sockaddr_t *sockaddr, const char *addr)
*/
-APR_DECLARE(apr_status_t) apr_set_ipaddr(apr_sockaddr_t *sockaddr,
+APR_DECLARE(apr_status_t) apr_sockaddr_ip_set(apr_sockaddr_t *sockaddr,
const char *addr);
/**
@@ -576,9 +576,9 @@
* an APR socket address.
* @param addr The IP address.
* @param sockaddr The socket address to reference.
- * @deffunc apr_status_t apr_get_ipaddr(char **addr, apr_sockaddr_t *sockaddr)
+ * @deffunc apr_status_t apr_sockaddr_ip_get(char **addr, apr_sockaddr_t *sockaddr)
*/
-APR_DECLARE(apr_status_t) apr_get_ipaddr(char **addr,
+APR_DECLARE(apr_status_t) apr_sockaddr_ip_get(char **addr,
apr_sockaddr_t *sockaddr);
/**
@@ -586,9 +586,9 @@
* @param new_poll The poll structure to be used.
* @param num The number of socket descriptors to be polled.
* @param cont The pool to operate on.
- * @deffunc apr_status_t apr_setup_poll(apr_pollfd_t **new_poll, apr_int32_t num, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_poll_setup(apr_pollfd_t **new_poll, apr_int32_t num, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_setup_poll(apr_pollfd_t **new_poll,
+APR_DECLARE(apr_status_t) apr_poll_setup(apr_pollfd_t **new_poll,
apr_int32_t num,
apr_pool_t *cont);
@@ -622,9 +622,9 @@
* APR_POLLPRI signal if prioirty data is availble to be read
* APR_POLLOUT signal if write will not block
* </PRE>
- * @deffunc apr_status_t apr_add_poll_socket(apr_pollfd_t *aprset, apr_socket_t *sock, apr_int16_t event)
+ * @deffunc apr_status_t apr_poll_socket_add(apr_pollfd_t *aprset, apr_socket_t *sock, apr_int16_t event)
*/
-APR_DECLARE(apr_status_t) apr_add_poll_socket(apr_pollfd_t *aprset,
+APR_DECLARE(apr_status_t) apr_poll_socket_add(apr_pollfd_t *aprset,
apr_socket_t *sock,
apr_int16_t event);
@@ -638,18 +638,18 @@
* APR_POLLPRI signal if prioirty data is availble to be read
* APR_POLLOUT signal if write will not block
* </PRE>
- * @deffunc apr_status_t apr_mask_poll_socket(apr_pollfd_t *aprset, apr_socket_t *sock, apr_int16_t events)
+ * @deffunc apr_status_t apr_poll_socket_mask(apr_pollfd_t *aprset, apr_socket_t *sock, apr_int16_t events)
*/
-APR_DECLARE(apr_status_t) apr_mask_poll_socket(apr_pollfd_t *aprset,
+APR_DECLARE(apr_status_t) apr_poll_socket_mask(apr_pollfd_t *aprset,
apr_socket_t *sock,
apr_int16_t events);
/**
* Remove a socket from the poll structure.
* @param aprset The poll structure we will be using.
* @param sock The socket to remove from the current poll structure.
- * @deffunc apr_status_t apr_remove_poll_socket(apr_pollfd_t *aprset, apr_socket_t *sock)
+ * @deffunc apr_status_t apr_poll_socket_remove(apr_pollfd_t *aprset, apr_socket_t *sock)
*/
-APR_DECLARE(apr_status_t) apr_remove_poll_socket(apr_pollfd_t *aprset,
+APR_DECLARE(apr_status_t) apr_poll_socket_remove(apr_pollfd_t *aprset,
apr_socket_t *sock);
/**
@@ -661,9 +661,9 @@
* APR_POLLPRI signal if prioirty data is availble to be read
* APR_POLLOUT signal if write will not block
* </PRE>
- * @deffunc apr_status_t apr_clear_poll_sockets(apr_pollfd_t *aprset, apr_int16_t events)
+ * @deffunc apr_status_t apr_poll_socket_clear(apr_pollfd_t *aprset, apr_int16_t events)
*/
-APR_DECLARE(apr_status_t) apr_clear_poll_sockets(apr_pollfd_t *aprset,
+APR_DECLARE(apr_status_t) apr_poll_socket_clear(apr_pollfd_t *aprset,
apr_int16_t events);
/**
@@ -680,9 +680,9 @@
* </PRE>
* @param sock The socket we wish to get information about.
* @param aprset The poll structure we will be using.
- * @deffunc apr_status_t apr_get_revents(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
+ * @deffunc apr_status_t apr_poll_revents_get(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
*/
-APR_DECLARE(apr_status_t) apr_get_revents(apr_int16_t *event,
+APR_DECLARE(apr_status_t) apr_poll_revents_get(apr_int16_t *event,
apr_socket_t *sock,
apr_pollfd_t *aprset);
@@ -691,9 +691,9 @@
* @param pollfd The currently open pollfd.
* @param key The key to use for retreiving data associated with a poll struct.
* @param data The user data associated with the pollfd.
- * @deffunc apr_status_t apr_get_polldata(apr_pollfd_t *pollfd, const char *key, void *data)
+ * @deffunc apr_status_t apr_poll_data_get(apr_pollfd_t *pollfd, const char *key, void *data)
*/
-APR_DECLARE(apr_status_t) apr_get_polldata(apr_pollfd_t *pollfd,
+APR_DECLARE(apr_status_t) apr_poll_data_get(apr_pollfd_t *pollfd,
const char *key, void *data);
/**
@@ -702,9 +702,9 @@
* @param data The key to associate with the data.
* @param key The user data to associate with the pollfd.
* @param cleanup The cleanup function
- * @deffunc apr_status_t apr_set_polldata(apr_pollfd_t *pollfd, void *data, const char *key, apr_status_t (*cleanup)(void *))
+ * @deffunc apr_status_t apr_poll_data_set(apr_pollfd_t *pollfd, void *data, const char *key, apr_status_t (*cleanup)(void *))
*/
-APR_DECLARE(apr_status_t) apr_set_polldata(apr_pollfd_t *pollfd, void *data,
+APR_DECLARE(apr_status_t) apr_poll_data_set(apr_pollfd_t *pollfd, void *data,
const char *key,
apr_status_t (*cleanup)(void *));
1.42 +31 -31 apr/include/apr_pools.h
Index: apr_pools.h
===================================================================
RCS file: /home/cvs/apr/include/apr_pools.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- apr_pools.h 2001/01/24 12:49:06 1.41
+++ apr_pools.h 2001/02/08 07:44:46 1.42
@@ -215,9 +215,9 @@
* ever be used outside of APR.
* @tip Programs do NOT need to call this directly. APR will call this
* automatically from apr_initialize.
- * @deffunc apr_status_t apr_init_alloc(apr_pool_t *globalp)
+ * @deffunc apr_status_t apr_pool_alloc_init(apr_pool_t *globalp)
*/
-APR_DECLARE(apr_status_t) apr_init_alloc(apr_pool_t *globalp);
+APR_DECLARE(apr_status_t) apr_pool_alloc_init(apr_pool_t *globalp);
/**
* Tear down all of the internal structures required to use pools
@@ -226,9 +226,9 @@
* ever be used outside of APR.
* @tip Programs do NOT need to call this directly. APR will call this
* automatically from apr_terminate.
- * @deffunc void apr_term_alloc(apr_pool_t *globalp)
+ * @deffunc void apr_pool_alloc_term(apr_pool_t *globalp)
*/
-APR_DECLARE(void) apr_term_alloc(apr_pool_t *globalp);
+APR_DECLARE(void) apr_pool_alloc_term(apr_pool_t *globalp);
/* pool functions */
@@ -239,9 +239,9 @@
* pool. If it is non-NULL, the new pool will inherit all
* of it's parent pool's attributes, except the apr_pool_t will
* be a sub-pool.
- * @deffunc apr_status_t apr_create_pool(apr_pool_t **newcont, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_pool_create(apr_pool_t **newcont, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_create_pool(apr_pool_t **newcont,
+APR_DECLARE(apr_status_t) apr_pool_create(apr_pool_t **newcont,
apr_pool_t *cont);
/**
@@ -258,9 +258,9 @@
* data by choosing a key that another part of the program is using
* It is advised that steps are taken to ensure that a unique
* key is used at all times.
- * @deffunc apr_status_t apr_set_userdata(const void *data, const char *key, apr_status_t (*cleanup)(void *), apr_pool_t *cont)
+ * @deffunc apr_status_t apr_pool_userdata_set(const void *data, const char *key, apr_status_t (*cleanup)(void *), apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_set_userdata(const void *data, const char *key,
+APR_DECLARE(apr_status_t) apr_pool_userdata_set(const void *data, const char *key,
apr_status_t (*cleanup)(void *),
apr_pool_t *cont);
@@ -269,9 +269,9 @@
* @param data The key for the data to retrieve
* @param key The user data associated with the pool.
* @param cont The current pool.
- * @deffunc apr_status_t apr_get_userdata(void **data, const char *key, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_pool_userdata_get(void **data, const char *key, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_get_userdata(void **data, const char *key,
+APR_DECLARE(apr_status_t) apr_pool_userdata_get(void **data, const char *key,
apr_pool_t *cont);
/**
@@ -281,9 +281,9 @@
* @return The new sub-pool
* @tip The apr_abort function provides a way to quit the program if the
* machine is out of memory. By default, APR will return on error.
- * @deffunc apr_pool_t *apr_make_sub_pool(apr_pool_t *p, int (*apr_abort)(int retcode))
+ * @deffunc apr_pool_t *apr_pool_sub_make(apr_pool_t *p, int (*apr_abort)(int retcode))
*/
-APR_DECLARE(apr_pool_t *) apr_make_sub_pool(apr_pool_t *p,
+APR_DECLARE(apr_pool_t *) apr_pool_sub_make(apr_pool_t *p,
int (*apr_abort)(int retcode));
/**
@@ -299,24 +299,24 @@
* destroy the pool
* @param p The pool to destroy
* @tip This will actually free the memory
- * @deffunc void apr_destroy_pool(apr_pool_t *p)
+ * @deffunc void apr_pool_destroy(apr_pool_t *p)
*/
-APR_DECLARE(void) apr_destroy_pool(apr_pool_t *p);
+APR_DECLARE(void) apr_pool_destroy(apr_pool_t *p);
/**
* report the number of bytes currently in the pool
* @param p The pool to inspect
* @return The number of bytes
- * @deffunc apr_size_t apr_bytes_in_pool(apr_pool_t *p)
+ * @deffunc apr_size_t apr_pool_num_bytes(apr_pool_t *p)
*/
-APR_DECLARE(apr_size_t) apr_bytes_in_pool(apr_pool_t *p);
+APR_DECLARE(apr_size_t) apr_pool_num_bytes(apr_pool_t *p);
/**
* report the number of bytes currently in the list of free blocks
* @return The number of bytes
- * @deffunc apr_size_t apr_bytes_in_free_blocks(void)
+ * @deffunc apr_size_t apr_pool_free_blocks_num_bytes(void)
*/
-APR_DECLARE(apr_size_t) apr_bytes_in_free_blocks(void);
+APR_DECLARE(apr_size_t) apr_pool_free_blocks_num_bytes(void);
/**
* Allocate a block of memory from a pool
@@ -343,9 +343,9 @@
* @param plain_cleanup The function to call when the pool is cleared
* or destroyed
* @param child_cleanup The function to call when a child process is created
- * @deffunc void apr_register_cleanup(apr_pool_t *p, const void *data, apr_status_t (*plain_cleanup)(void *), apr_status_t (*child_cleanup)(void *))
+ * @deffunc void apr_pool_cleanup_register(apr_pool_t *p, const void *data, apr_status_t (*plain_cleanup)(void *), apr_status_t (*child_cleanup)(void *))
*/
-APR_DECLARE(void) apr_register_cleanup(apr_pool_t *p, const void *data,
+APR_DECLARE(void) apr_pool_cleanup_register(apr_pool_t *p, const void *data,
apr_status_t (*plain_cleanup)(void *),
apr_status_t (*child_cleanup)(void *));
@@ -354,9 +354,9 @@
* @param p The pool remove the cleanup from
* @param data The data to remove from cleanup
* @param cleanup The function to remove from cleanup
- * @deffunc void apr_kill_cleanup(apr_pool_t *p, const void *data, apr_status_t (*cleanup)(void *))
+ * @deffunc void apr_pool_cleanup_kill(apr_pool_t *p, const void *data, apr_status_t (*cleanup)(void *))
*/
-APR_DECLARE(void) apr_kill_cleanup(apr_pool_t *p, const void *data,
+APR_DECLARE(void) apr_pool_cleanup_kill(apr_pool_t *p, const void *data,
apr_status_t (*cleanup)(void *));
/**
@@ -364,9 +364,9 @@
* @param p The pool remove the cleanup from
* @param data The data to remove from cleanup
* @param cleanup The function to remove from cleanup
- * @deffunc apr_status_t apr_run_cleanup(apr_pool_t *p, void *data, apr_status_t (*cleanup)(void *))
+ * @deffunc apr_status_t apr_pool_cleanup_run(apr_pool_t *p, void *data, apr_status_t (*cleanup)(void *))
*/
-APR_DECLARE(apr_status_t) apr_run_cleanup(apr_pool_t *p, void *data,
+APR_DECLARE(apr_status_t) apr_pool_cleanup_run(apr_pool_t *p, void *data,
apr_status_t (*cleanup)(void *));
/* Preparing for exec() --- close files, etc., but *don't* flush I/O
@@ -375,16 +375,16 @@
/**
* Run all of the child_cleanups, so that any unnecessary files are
* closed because we are about to exec a new program
- * @deffunc void apr_cleanup_for_exec(void)
+ * @deffunc void apr_pool_cleanup_for_exec(void)
*/
-APR_DECLARE(void) apr_cleanup_for_exec(void);
+APR_DECLARE(void) apr_pool_cleanup_for_exec(void);
/**
* An empty cleanup function
* @param data The data to cleanup
- * @deffunc apr_status_t apr_null_cleanup(void *data)
+ * @deffunc apr_status_t apr_pool_cleanup_null(void *data)
*/
-APR_DECLARE_NONSTD(apr_status_t) apr_null_cleanup(void *data);
+APR_DECLARE_NONSTD(apr_status_t) apr_pool_cleanup_null(void *data);
/*
* Pool accessor functions.
@@ -397,7 +397,7 @@
*
* APR_POOL_DECLARE_ACCESSOR(file);
* becomes:
- * APR_DECLARE(apr_pool_t *) apr_get_file_pool(apr_file_t *ob);
+ * APR_DECLARE(apr_pool_t *) apr_file_pool_get(apr_file_t *ob);
*
* In the implementation, the APR_POOL_IMPLEMENT_ACCESSOR() is used to
* actually define the function. It assumes the field is named "pool". For
@@ -408,13 +408,13 @@
* the macros to support other linkages.
*/
#define APR_POOL_DECLARE_ACCESSOR(typename) \
- APR_DECLARE(apr_pool_t *) apr_get_##typename##_pool \
+ APR_DECLARE(apr_pool_t *) apr_##typename##_pool_get \
(apr_##typename##_t *ob)
#define APR_POOL_IMPLEMENT_ACCESSOR(typename) \
APR_POOL_IMPLEMENT_ACCESSOR_X(typename, pool)
#define APR_POOL_IMPLEMENT_ACCESSOR_X(typename, fieldname) \
- APR_DECLARE(apr_pool_t *) apr_get_##typename##_pool \
+ APR_DECLARE(apr_pool_t *) apr_##typename##_pool_get \
(apr_##typename##_t *ob) { return ob->fieldname; }
/* used to guarantee to the apr_pool_t debugging code that the sub apr_pool_t
1.44 +35 -35 apr/include/apr_portable.h
Index: apr_portable.h
===================================================================
RCS file: /home/cvs/apr/include/apr_portable.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- apr_portable.h 2001/01/28 15:30:25 1.43
+++ apr_portable.h 2001/02/08 07:44:46 1.44
@@ -200,56 +200,56 @@
* convert the file from apr type to os specific type.
* @param thefile The os specific file we are converting to
* @param file The apr file to convert.
- * @deffunc apr_status_t apr_get_os_file(apr_os_file_t *thefile, apr_file_t *file)
+ * @deffunc apr_status_t apr_os_file_get(apr_os_file_t *thefile, apr_file_t *file)
* @tip On Unix, it is only possible to get a file descriptor from
* an apr file type.
*/
-APR_DECLARE(apr_status_t) apr_get_os_file(apr_os_file_t *thefile,
+APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
apr_file_t *file);
/**
* convert the dir from apr type to os specific type.
* @param thedir The os specific dir we are converting to
* @param dir The apr dir to convert.
- * @deffunc apr_status_t apr_get_os_dir(apr_os_dir_t **thedir, apr_dir_t *dir)
+ * @deffunc apr_status_t apr_os_dir_get(apr_os_dir_t **thedir, apr_dir_t *dir)
*/
-APR_DECLARE(apr_status_t) apr_get_os_dir(apr_os_dir_t **thedir,
+APR_DECLARE(apr_status_t) apr_os_dir_get(apr_os_dir_t **thedir,
apr_dir_t *dir);
/**
* Convert the socket from an apr type to an OS specific socket
* @param thesock The socket to convert.
* @param sock The os specifc equivelant of the apr socket..
- * @deffunc apr_status_t apr_get_os_sock(apr_os_sock_t *thesock, apr_socket_t *sock)
+ * @deffunc apr_status_t apr_os_sock_get(apr_os_sock_t *thesock, apr_socket_t *sock)
*/
-APR_DECLARE(apr_status_t) apr_get_os_sock(apr_os_sock_t *thesock,
+APR_DECLARE(apr_status_t) apr_os_sock_get(apr_os_sock_t *thesock,
apr_socket_t *sock);
/**
* Convert the lock from os specific type to apr type
* @param oslock The os specific lock we are converting to.
* @param lock The apr lock to convert.
- * @deffunc apr_status_t apr_get_os_lock(apr_os_lock_t *oslock, apr_lock_t *lock)
+ * @deffunc apr_status_t apr_os_lock_get(apr_os_lock_t *oslock, apr_lock_t *lock)
*/
-APR_DECLARE(apr_status_t) apr_get_os_lock(apr_os_lock_t *oslock,
+APR_DECLARE(apr_status_t) apr_os_lock_get(apr_os_lock_t *oslock,
apr_lock_t *lock);
/**
* Get the exploded time in the platforms native format.
* @param ostime the native time format
* @param aprtime the time to convert
- * @deffunc apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime, apr_exploded_time_t *aprtime)
+ * @deffunc apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime, apr_exploded_time_t *aprtime)
*/
-APR_DECLARE(apr_status_t) apr_get_os_exp_time(apr_os_exp_time_t **ostime,
+APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime,
apr_exploded_time_t *aprtime);
/**
* Get the imploded time in the platforms native format.
* @param ostime the native time format
* @param aprtimethe time to convert
- * @deffunc apr_status_t apr_get_os_imp_time(apr_os_imp_time_t **ostime, apr_time_t *aprtime)
+ * @deffunc apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime, apr_time_t *aprtime)
*/
-APR_DECLARE(apr_status_t) apr_get_os_imp_time(apr_os_imp_time_t **ostime,
+APR_DECLARE(apr_status_t) apr_os_imp_time_get(apr_os_imp_time_t **ostime,
apr_time_t *aprtime);
#if APR_HAS_THREADS
@@ -258,18 +258,18 @@
* convert the thread to os specific type from apr type.
* @param thethd The apr thread to convert
* @param thd The os specific thread we are converting to
- * @deffunc apr_status_t apr_get_os_thread(apr_os_thread_t **thethd, apr_thread_t *thd)
+ * @deffunc apr_status_t apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd)
*/
-APR_DECLARE(apr_status_t) apr_get_os_thread(apr_os_thread_t **thethd,
+APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd,
apr_thread_t *thd);
/**
* convert the thread private memory key to os specific type from an apr type.
* @param thekey The apr handle we are converting from.
* @param key The os specific handle we are converting to.
- * @deffunc apr_status_t apr_get_os_threadkey(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
+ * @deffunc apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
*/
-APR_DECLARE(apr_status_t) apr_get_os_threadkey(apr_os_threadkey_t *thekey,
+APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey,
apr_threadkey_t *key);
#endif /* APR_HAS_THREADS */
@@ -279,11 +279,11 @@
* @param file The apr file we are converting to.
* @param thefile The os specific file to convert
* @param cont The pool to use if it is needed.
- * @deffunc apr_status_t apr_put_os_file(apr_file_t **file, apr_os_file_t *thefile, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_os_file_put(apr_file_t **file, apr_os_file_t *thefile, apr_pool_t *cont)
* @tip On Unix, it is only possible to put a file descriptor into
* an apr file type.
*/
-APR_DECLARE(apr_status_t) apr_put_os_file(apr_file_t **file,
+APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_pool_t *cont);
@@ -292,9 +292,9 @@
* @param dir The apr dir we are converting to.
* @param thedir The os specific dir to convert
* @param cont The pool to use when creating to apr directory.
- * @deffunc apr_status_t apr_put_os_dir(apr_dir_t **dir, apr_os_dir_t *thedir, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_os_dir_put(apr_dir_t **dir, apr_os_dir_t *thedir, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_put_os_dir(apr_dir_t **dir,
+APR_DECLARE(apr_status_t) apr_os_dir_put(apr_dir_t **dir,
apr_os_dir_t *thedir,
apr_pool_t *cont);
@@ -303,9 +303,9 @@
* @param sock The pool to use.
* @param thesock The socket to convert to.
* @param cont The socket we are converting to an apr type.
- * @deffunc apr_status_t apr_put_os_sock(apr_socket_t **sock, apr_os_sock_t *thesock, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_os_sock_put(apr_socket_t **sock, apr_os_sock_t *thesock, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_put_os_sock(apr_socket_t **sock,
+APR_DECLARE(apr_status_t) apr_os_sock_put(apr_socket_t **sock,
apr_os_sock_t *thesock,
apr_pool_t *cont);
@@ -316,11 +316,11 @@
* @param os_sock_info The os representation of the socket handle and
* other characteristics of the socket
* @param cont The pool to use
- * @deffunc apr_status_t apr_make_os_sock(apr_socket_t **apr_sock, apr_os_sock_info_t *os_sock_info, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_os_sock_make(apr_socket_t **apr_sock, apr_os_sock_info_t *os_sock_info, apr_pool_t *cont)
* @tip If you only know the descriptor/handle or if it isn't really
- * a true socket, use apr_put_os_sock() instead.
+ * a true socket, use apr_os_sock_put() instead.
*/
-APR_DECLARE(apr_status_t) apr_make_os_sock(apr_socket_t **apr_sock,
+APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
apr_os_sock_info_t *os_sock_info,
apr_pool_t *cont);
@@ -329,9 +329,9 @@
* @param lock The apr lock we are converting to.
* @param thelock The os specific lock to convert.
* @param cont The pool to use if it is needed.
- * @deffunc apr_status_t apr_put_os_lock(apr_lock_t **lock, apr_os_lock_t *thelock, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_os_lock_put(apr_lock_t **lock, apr_os_lock_t *thelock, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_put_os_lock(apr_lock_t **lock,
+APR_DECLARE(apr_status_t) apr_os_lock_put(apr_lock_t **lock,
apr_os_lock_t *thelock,
apr_pool_t *cont);
@@ -340,9 +340,9 @@
* @param aprtime the APR time format
* @param ostime the time to convert
* @param cont the pool to use if necessary
- * @deffunc apr_status_t apr_put_os_imp_time(apr_time_t *aprtime, apr_os_imp_time_t **ostime, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_os_imp_time_put(apr_time_t *aprtime, apr_os_imp_time_t **ostime, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_put_os_imp_time(apr_time_t *aprtime,
+APR_DECLARE(apr_status_t) apr_os_imp_time_put(apr_time_t *aprtime,
apr_os_imp_time_t **ostime,
apr_pool_t *cont);
@@ -351,9 +351,9 @@
* @param aprtime the APR time format
* @param ostime the time to convert
* @param cont the pool to use if necessary
- * @deffunc apr_status_t apr_put_os_exp_time(apr_exploded_time_t *aprtime, apr_os_exp_time_t **ostime, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_os_exp_time_pupt(apr_exploded_time_t *aprtime, apr_os_exp_time_t **ostime, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_put_os_exp_time(apr_exploded_time_t *aprtime,
+APR_DECLARE(apr_status_t) apr_os_exp_time_pupt(apr_exploded_time_t *aprtime,
apr_os_exp_time_t **ostime,
apr_pool_t *cont);
@@ -364,9 +364,9 @@
* @param thd The apr thread we are converting to.
* @param thethd The os specific thread to convert
* @param cont The pool to use if it is needed.
- * @deffunc apr_status_t apr_put_os_thread(apr_thread_t **thd, apr_os_thread_t *thethd,
+ * @deffunc apr_status_t apr_os_thread_pupt(apr_thread_t **thd, apr_os_thread_t *thethd,
*/
-APR_DECLARE(apr_status_t) apr_put_os_thread(apr_thread_t **thd,
+APR_DECLARE(apr_status_t) apr_os_thread_pupt(apr_thread_t **thd,
apr_os_thread_t *thethd,
apr_pool_t *cont);
@@ -375,9 +375,9 @@
* @param key The apr handle we are converting to.
* @param thekey The os specific handle to convert
* @param cont The pool to use if it is needed.
- * @deffunc apr_status_t apr_put_os_threadkey(apr_threadkey_t **key, apr_os_threadkey_t *thekey, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_os_threadkey_put(apr_threadkey_t **key, apr_os_threadkey_t *thekey, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_put_os_threadkey(apr_threadkey_t **key,
+APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
apr_os_threadkey_t *thekey,
apr_pool_t *cont);
1.16 +6 -6 apr/include/apr_shmem.h
Index: apr_shmem.h
===================================================================
RCS file: /home/cvs/apr/include/apr_shmem.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- apr_shmem.h 2001/01/18 20:07:21 1.15
+++ apr_shmem.h 2001/02/08 07:44:46 1.16
@@ -134,9 +134,9 @@
* based on file access. APR_USES_KEYBASED_SHM if shared
* memory is based on a key value such as shmctl. If the
* shared memory is anonymous, the name is NULL.
- * @deffunc apr_status_t apr_get_shm_name(apr_shmem_t *c, apr_shm_name_t **name)
+ * @deffunc apr_status_t apr_shm_name_get(apr_shmem_t *c, apr_shm_name_t **name)
*/
-APR_DECLARE(apr_status_t) apr_get_shm_name(apr_shmem_t *c,
+APR_DECLARE(apr_status_t) apr_shm_name_get(apr_shmem_t *c,
apr_shm_name_t **name);
/**
@@ -149,17 +149,17 @@
* @return APR_USES_ANONYMOUS_SHM if we are using anonymous shared
* memory. APR_SUCCESS if we are using named shared memory
* and we were able to assign the name correctly.
- * @deffunc apr_status_t apr_set_shm_name(apr_shmem_t *c, apr_shm_name_t *name)
+ * @deffunc apr_status_t apr_shm_name_set(apr_shmem_t *c, apr_shm_name_t *name)
*/
-APR_DECLARE(apr_status_t) apr_set_shm_name(apr_shmem_t *c,
+APR_DECLARE(apr_status_t) apr_shm_name_set(apr_shmem_t *c,
apr_shm_name_t *name);
/**
* Open the shared memory block in a child process.
* @param The shared memory block to open in the child.
- * @deffunc apr_status_t apr_open_shmem(apr_shmem_t *c)
+ * @deffunc apr_status_t apr_shm_open(apr_shmem_t *c)
*/
-APR_DECLARE(apr_status_t) apr_open_shmem(apr_shmem_t *c);
+APR_DECLARE(apr_status_t) apr_shm_open(apr_shmem_t *c);
/**
* Determine how much memory is available in the specified shared memory block
1.14 +23 -23 apr/include/apr_tables.h
Index: apr_tables.h
===================================================================
RCS file: /home/cvs/apr/include/apr_tables.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- apr_tables.h 2001/01/23 04:19:56 1.13
+++ apr_tables.h 2001/02/08 07:44:46 1.14
@@ -149,9 +149,9 @@
* @param nelts the number of elements in the initial array
* @param elt_size The size of each element in the array.
* @return The new array
- * @deffunc apr_array_header_t *apr_make_array(struct apr_pool_t *p, int nelts, int elt_size)
+ * @deffunc apr_array_header_t *apr_array_make(struct apr_pool_t *p, int nelts, int elt_size)
*/
-APR_DECLARE(apr_array_header_t *) apr_make_array(struct apr_pool_t *p,
+APR_DECLARE(apr_array_header_t *) apr_array_make(struct apr_pool_t *p,
int nelts, int elt_size);
/**
@@ -160,9 +160,9 @@
* @return Location for the new element in the array.
* @tip If there are no free spots in the array, then this function will
* allocate new space for the new element.
- * @deffunc void *apr_push_array(apr_array_header_t *arr)
+ * @deffunc void *apr_array_push(apr_array_header_t *arr)
*/
-APR_DECLARE(void *) apr_push_array(apr_array_header_t *arr);
+APR_DECLARE(void *) apr_array_push(apr_array_header_t *arr);
/**
* Concatenate two arrays together
@@ -179,13 +179,13 @@
* @param p The pool to allocate the copy of the array out of
* @param arr The array to copy
* @return An exact copy of the array passed in
- * @deffunc apr_array_header_t *apr_copy_array(apr_pool_t *p, const apr_array_header_t *arr)
- * @tip The alternate apr_copy_array_hdr copies only the header, and arranges
+ * @deffunc apr_array_header_t *apr_array_copy(apr_pool_t *p, const apr_array_header_t *arr)
+ * @tip The alternate apr_array_copy_hdr copies only the header, and arranges
* for the elements to be copied if (and only if) the code subsequently does
* a push or arraycat.
*/
APR_DECLARE(apr_array_header_t *)
- apr_copy_array(struct apr_pool_t *p,
+ apr_array_copy(struct apr_pool_t *p,
const apr_array_header_t *arr);
/**
* Copy the headers of the array, and arrange for the elements to be copied if
@@ -193,11 +193,11 @@
* @param p The pool to allocate the copy of the array out of
* @param arr The array to copy
* @return An exact copy of the array passed in
- * @deffunc apr_array_header_t *apr_copy_array_hdr(apr_pool_t *p, const apr_array_header_t *arr)
- * @tip The alternate apr_copy_array copies the *entire* array.
+ * @deffunc apr_array_header_t *apr_array_copy_hdr(apr_pool_t *p, const apr_array_header_t *arr)
+ * @tip The alternate apr_array_copy copies the *entire* array.
*/
APR_DECLARE(apr_array_header_t *)
- apr_copy_array_hdr(struct apr_pool_t *p,
+ apr_array_copy_hdr(struct apr_pool_t *p,
const apr_array_header_t *arr);
/**
@@ -206,10 +206,10 @@
* @param first The array to put first in the new array.
* @param second The array to put second in the new array.
* @param return A new array containing the data from the two arrays passed in.
- * @deffunc apr_array_header_t *apr_append_arrays(apr_pool_t *p, const apr_array_header_t *first, const apr_array_header_t *second)
+ * @deffunc apr_array_header_t *apr_array_append(apr_pool_t *p, const apr_array_header_t *first, const apr_array_header_t *second)
*/
APR_DECLARE(apr_array_header_t *)
- apr_append_arrays(struct apr_pool_t *p,
+ apr_array_append(struct apr_pool_t *p,
const apr_array_header_t *first,
const apr_array_header_t *second);
@@ -235,26 +235,26 @@
* @param nelts The number of elements in the initial table.
* @return The new table.
* @warning This table can only store text data
- * @deffunc apr_table_t *apr_make_table(apr_pool_t *p, int nelts)
+ * @deffunc apr_table_t *apr_table_make(apr_pool_t *p, int nelts)
*/
-APR_DECLARE(apr_table_t *) apr_make_table(struct apr_pool_t *p, int nelts);
+APR_DECLARE(apr_table_t *) apr_table_make(struct apr_pool_t *p, int nelts);
/**
* Create a new table and copy another table into it
* @param p The pool to allocate the new table out of
* @param t The table to copy
* @return A copy of the table passed in
- * @deffunc apr_table_t *apr_copy_table(apr_pool_t *p, const apr_table_t *t)
+ * @deffunc apr_table_t *apr_table_copy(apr_pool_t *p, const apr_table_t *t)
*/
-APR_DECLARE(apr_table_t *) apr_copy_table(struct apr_pool_t *p,
+APR_DECLARE(apr_table_t *) apr_table_copy(struct apr_pool_t *p,
const apr_table_t *t);
/**
* Delete all of the elements from a table
* @param t The table to clear
- * @deffunc void apr_clear_table(apr_table_t *t)
+ * @deffunc void apr_table_clear(apr_table_t *t)
*/
-APR_DECLARE(void) apr_clear_table(apr_table_t *t);
+APR_DECLARE(void) apr_table_clear(apr_table_t *t);
/**
* Get the value associated with a given key from the table. After this call,
@@ -358,9 +358,9 @@
* @param overlay The first table to put in the new table
* @param base The table to add at the end of the new table
* @return A new table containing all of the data from the two passed in
- * @deffunc apr_table_t *apr_overlay_tables(apr_pool_t *p, const apr_table_t *overlay, const apr_table_t *base);
+ * @deffunc apr_table_t *apr_table_overlay(apr_pool_t *p, const apr_table_t *overlay, const apr_table_t *base);
*/
-APR_DECLARE(apr_table_t *) apr_overlay_tables(struct apr_pool_t *p,
+APR_DECLARE(apr_table_t *) apr_table_overlay(struct apr_pool_t *p,
const apr_table_t *overlay,
const apr_table_t *base);
@@ -400,7 +400,7 @@
apr_table_vdo(int (*comp) (void *, const char *, const char *),
void *rec, const apr_table_t *t, va_list);
-/* Conceptually, apr_overlap_tables does this:
+/* Conceptually, apr_table_overlap does this:
*
* apr_array_header_t *barr = apr_table_elts(b);
* apr_table_entry_t *belt = (apr_table_entry_t *)barr->elts;
@@ -434,9 +434,9 @@
* APR_OVERLAP_TABLES_MERGE Use apr_table_mergen
* @tip This function is highly optimized, and uses less memory and CPU cycles
* than a function that just loops through table b calling other functions.
- * @deffunc void apr_overlap_tables(apr_table_t *a, const apr_table_t *b, unsigned flags)
+ * @deffunc void apr_table_overlap(apr_table_t *a, const apr_table_t *b, unsigned flags)
*/
-APR_DECLARE(void) apr_overlap_tables(apr_table_t *a, const apr_table_t *b,
+APR_DECLARE(void) apr_table_overlap(apr_table_t *a, const apr_table_t *b,
unsigned flags);
#ifdef __cplusplus
1.52 +65 -65 apr/include/apr_thread_proc.h
Index: apr_thread_proc.h
===================================================================
RCS file: /home/cvs/apr/include/apr_thread_proc.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- apr_thread_proc.h 2001/01/18 20:07:22 1.51
+++ apr_thread_proc.h 2001/02/08 07:44:46 1.52
@@ -157,26 +157,26 @@
* Create and initialize a new threadattr variable
* @param new_attr The newly created threadattr.
* @param cont The pool to use
- * @deffunc apr_status_t apr_create_threadattr(apr_threadattr_t **new_attr, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_threadattr_create(apr_threadattr_t **new_attr, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_create_threadattr(apr_threadattr_t **new_attr,
+APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new_attr,
apr_pool_t *cont);
/**
* Set if newly created threads should be created in detach mode.
* @param attr The threadattr to affect
* @param on Thread detach state on or off
- * @deffunc apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on)
+ * @deffunc apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on)
*/
-APR_DECLARE(apr_status_t) apr_setthreadattr_detach(apr_threadattr_t *attr,
+APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr,
apr_int32_t on);
/**
* Get the detach mode for this threadattr.
* @param attr The threadattr to reference
- * @deffunc apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr)
+ * @deffunc apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr)
*/
-APR_DECLARE(apr_status_t) apr_getthreadattr_detach(apr_threadattr_t *attr);
+APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr);
/**
* Create a new thread of execution
@@ -185,9 +185,9 @@
* @param func The function to start the new thread in
* @param data Any data to be passed to the starting function
* @param cont The pool to use
- * @deffunc apr_status_t apr_create_thread(apr_thread_t **new_thread, apr_threadattr_t *attr, apr_thread_start_t func, void *data, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_thread_create(apr_thread_t **new_thread, apr_threadattr_t *attr, apr_thread_start_t func, void *data, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_create_thread(apr_thread_t **new_thread,
+APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new_thread,
apr_threadattr_t *attr,
apr_thread_start_t func,
void *data, apr_pool_t *cont);
@@ -222,9 +222,9 @@
* @param data The user data associated with the thread.
* @param key The key to associate with the data
* @param thread The currently open thread.
- * @deffunc apr_status_t apr_get_threaddata(void **data, const char *key, apr_thread_t *thread)
+ * @deffunc apr_status_t apr_thread_data_get(void **data, const char *key, apr_thread_t *thread)
*/
-APR_DECLARE(apr_status_t) apr_get_threaddata(void **data, const char *key,
+APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key,
apr_thread_t *thread);
/**
@@ -233,9 +233,9 @@
* @param key The key to use for associating the data with the tread
* @param cleanup The cleanup routine to use when the thread is destroyed.
* @param thread The currently open thread.
- * @deffunc apr_status_t apr_set_threaddata(void *data, const char *key, apr_status_t (*cleanup) (void *), apr_thread_t *thread)
+ * @deffunc apr_status_t apr_thread_data_set(void *data, const char *key, apr_status_t (*cleanup) (void *), apr_thread_t *thread)
*/
-APR_DECLARE(apr_status_t) apr_set_threaddata(void *data, const char *key,
+APR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_thread_t *thread);
@@ -244,9 +244,9 @@
* @param key The thread private handle.
* @param dest The destructor to use when freeing the private memory.
* @param cont The pool to use
- * @deffunc apr_status_t apr_create_thread_private(apr_threadkey_t **key, void (*dest)(void *), apr_pool_t *cont)
+ * @deffunc apr_status_t apr_threadkey_private_create(apr_threadkey_t **key, void (*dest)(void *), apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_create_thread_private(apr_threadkey_t **key,
+APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key,
void (*dest)(void *),
apr_pool_t *cont);
@@ -254,35 +254,35 @@
* Get a pointer to the thread private memory
* @param new_mem The data stored in private memory
* @param key The handle for the desired thread private memory
- * @deffunc apr_status_t apr_get_thread_private(void **new_mem, apr_threadkey_t *key)
+ * @deffunc apr_status_t apr_threadkey_private_get(void **new_mem, apr_threadkey_t *key)
*/
-APR_DECLARE(apr_status_t) apr_get_thread_private(void **new_mem,
+APR_DECLARE(apr_status_t) apr_threadkey_private_get(void **new_mem,
apr_threadkey_t *key);
/**
* Set the data to be stored in thread private memory
* @param priv The data to be stored in private memory
* @param key The handle for the desired thread private memory
- * @deffunc apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key)
+ * @deffunc apr_status_t apr_threadkey_private_set(void *priv, apr_threadkey_t *key)
*/
-APR_DECLARE(apr_status_t) apr_set_thread_private(void *priv,
+APR_DECLARE(apr_status_t) apr_threadkey_private_set(void *priv,
apr_threadkey_t *key);
/**
* Free the thread private memory
* @param key The handle for the desired thread private memory
- * @deffunc apr_status_t apr_delete_thread_private(apr_threadkey_t *key)
+ * @deffunc apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key)
*/
-APR_DECLARE(apr_status_t) apr_delete_thread_private(apr_threadkey_t *key);
+APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key);
/**
* Return the pool associated with the current threadkey.
* @param data The user data associated with the threadkey.
* @param key The key associated with the data
* @param threadkey The currently open threadkey.
- * @deffunc apr_status_t apr_get_threadkeydata(void **data, const char *key, apr_threadkey_t *threadkey)
+ * @deffunc apr_status_t apr_threadkey_data_get(void **data, const char *key, apr_threadkey_t *threadkey)
*/
-APR_DECLARE(apr_status_t) apr_get_threadkeydata(void **data, const char *key,
+APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key,
apr_threadkey_t *threadkey);
/**
@@ -291,9 +291,9 @@
* @param key The key to associate with the data.
* @param cleanup The cleanup routine to use when the file is destroyed.
* @param threadkey The currently open threadkey.
- * @deffunc apr_status_t apr_set_threadkeydata(void *data, const char *key, apr_status_t (*cleanup) (void *), apr_threadkey_t *threadkey)
+ * @deffunc apr_status_t apr_threadkey_data_set(void *data, const char *key, apr_status_t (*cleanup) (void *), apr_threadkey_t *threadkey)
*/
-APR_DECLARE(apr_status_t) apr_set_threadkeydata(void *data, const char *key,
+APR_DECLARE(apr_status_t) apr_threadkey_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_threadkey_t *threadkey);
@@ -307,9 +307,9 @@
* Create and initialize a new procattr variable
* @param new_attr The newly created procattr.
* @param cont The pool to use
- * @deffunc apr_status_t apr_createprocattr_init(apr_procattr_t **new_attr, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_procattr_create(apr_procattr_t **new_attr, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_createprocattr_init(apr_procattr_t **new_attr,
+APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new_attr,
apr_pool_t *cont);
/**
@@ -319,9 +319,9 @@
* @param in Should stdin be a pipe back to the parent?
* @param out Should stdout be a pipe back to the parent?
* @param err Should stderr be a pipe back to the parent?
- * @deffunc apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in, apr_int32_t out, apr_int32_t err)
+ * @deffunc apr_status_t apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in, apr_int32_t out, apr_int32_t err)
*/
-APR_DECLARE(apr_status_t) apr_setprocattr_io(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
apr_int32_t in, apr_int32_t out,
apr_int32_t err);
@@ -330,7 +330,7 @@
* @param attr The procattr we care about.
* @param child_in apr_file_t value to use as child_in. Must be a valid file.
* @param parent_in apr_file_t value to use as parent_in. Must be a valid file.
- * @deffunc apr_status_t apr_setprocattr_childin(struct apr_procattr_t *attr, apr_file_t *child_in, apr_file_t *parent_in)
+ * @deffunc apr_status_t apr_procattr_child_in_set(struct apr_procattr_t *attr, apr_file_t *child_in, apr_file_t *parent_in)
* @tip This is NOT a required initializer function. This is
* useful if you have already opened a pipe (or multiple files)
* that you wish to use, perhaps persistently across multiple
@@ -338,7 +338,7 @@
* extra function calls by not creating your own pipe since this
* creates one in the process space for you.
*/
-APR_DECLARE(apr_status_t) apr_setprocattr_childin(struct apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_child_in_set(struct apr_procattr_t *attr,
apr_file_t *child_in,
apr_file_t *parent_in);
@@ -347,13 +347,13 @@
* @param attr The procattr we care about.
* @param child_out apr_file_t value to use as child_out. Must be a valid file.
* @param parent_out apr_file_t value to use as parent_out. Must be a valid file.
- * @deffunc apr_status_t apr_setprocattr_childout(struct apr_procattr_t *attr, apr_file_t *child_out, apr_file_t *parent_out)
+ * @deffunc apr_status_t apr_procattr_child_out_set(struct apr_procattr_t *attr, apr_file_t *child_out, apr_file_t *parent_out)
* @tip This is NOT a required initializer function. This is
* useful if you have already opened a pipe (or multiple files)
* that you wish to use, perhaps persistently across multiple
* process invocations - such as a log file.
*/
-APR_DECLARE(apr_status_t) apr_setprocattr_childout(struct apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_child_out_set(struct apr_procattr_t *attr,
apr_file_t *child_out,
apr_file_t *parent_out);
@@ -362,13 +362,13 @@
* @param attr The procattr we care about.
* @param child_err apr_file_t value to use as child_err. Must be a valid file.
* @param parent_err apr_file_t value to use as parent_err. Must be a valid file.
- * @deffunc apr_status_t apr_setprocattr_childerr(struct apr_procattr_t *attr, apr_file_t *child_err, apr_file_t *parent_err)
+ * @deffunc apr_status_t apr_procattr_child_err_set(struct apr_procattr_t *attr, apr_file_t *child_err, apr_file_t *parent_err)
* @tip This is NOT a required initializer function. This is
* useful if you have already opened a pipe (or multiple files)
* that you wish to use, perhaps persistently across multiple
* process invocations - such as a log file.
*/
-APR_DECLARE(apr_status_t) apr_setprocattr_childerr(struct apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_child_err_set(struct apr_procattr_t *attr,
apr_file_t *child_err,
apr_file_t *parent_err);
@@ -378,9 +378,9 @@
* @param dir Which dir to start in. By default, this is the same dir as
* the parent currently resides in, when the createprocess call
* is made.
- * @deffunc apr_status_t apr_setprocattr_dir(apr_procattr_t *attr, const char *dir)
+ * @deffunc apr_status_t apr_procattr_dir_set(apr_procattr_t *attr, const char *dir)
*/
-APR_DECLARE(apr_status_t) apr_setprocattr_dir(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
const char *dir);
/**
@@ -391,18 +391,18 @@
* APR_SHELLCMD -- Shell script
* APR_PROGRAM -- Executable program (default)
* </PRE>
- * @deffunc apr_status_t apr_setprocattr_cmdtype(apr_procattr_t *attr, apr_cmdtype_e cmd)
+ * @deffunc apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr, apr_cmdtype_e cmd)
*/
-APR_DECLARE(apr_status_t) apr_setprocattr_cmdtype(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,
apr_cmdtype_e cmd);
/**
* Determine if the chlid should start in detached state.
* @param attr The procattr we care about.
* @param detach Should the child start in detached state? Default is no.
- * @deffunc apr_status_t apr_setprocattr_detach(apr_procattr_t *attr, apr_int32_t detach)
+ * @deffunc apr_status_t apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
*/
-APR_DECLARE(apr_status_t) apr_setprocattr_detach(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr,
apr_int32_t detach);
#if APR_HAVE_STRUCT_RLIMIT
@@ -416,9 +416,9 @@
* APR_LIMIT_NPROC
* </PRE>
* @param limit Value to set the limit to.
- * @deffunc apr_status_t apr_setprocattr_limit(apr_procattr_t *attr, apr_int32_t what, apr_int32_t what, struct rlimit *limit)
+ * @deffunc apr_status_t apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what, apr_int32_t what, struct rlimit *limit)
*/
-APR_DECLARE(apr_status_t) apr_setprocattr_limit(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
apr_int32_t what,
struct rlimit *limit);
#endif
@@ -429,9 +429,9 @@
* a standard unix fork.
* @param proc The resulting process handle.
* @param cont The pool to use.
- * @deffunc apr_status_t apr_fork(apr_proc_t *proc, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_fork(apr_proc_t *proc, apr_pool_t *cont);
+APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont);
#endif
/**
@@ -445,9 +445,9 @@
* @param attr the procattr we should use to determine how to create the new
* process
* @param cont The pool to use.
- * @deffunc apr_status_t apr_create_process(apr_proc_t *new_proc, const char *progname, const char * const *args, const char * const *env, apr_procattr_t *attr, apr_pool_t *cont)
+ * @deffunc apr_status_t apr_proc_create(apr_proc_t *new_proc, const char *progname, const char * const *args, const char * const *env, apr_procattr_t *attr, apr_pool_t *cont)
*/
-APR_DECLARE(apr_status_t) apr_create_process(apr_proc_t *new_proc,
+APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new_proc,
const char *progname,
const char * const *args,
const char * const *env,
@@ -463,14 +463,14 @@
* APR_NOWAIT -- return immediately regardless of if the
* child is dead or not.
* </PRE>
- * @deffunc apr_status_t apr_wait_proc(apr_proc_t *proc, apr_wait_how_e waithow)
+ * @deffunc apr_status_t apr_proc_wait(apr_proc_t *proc, apr_wait_how_e waithow)
* @tip The childs status is in the return code to this process. It is one of:
* <PRE>
* APR_CHILD_DONE -- child is no longer running.
* APR_CHILD_NOTDONE -- child is still running.
* </PRE>
*/
-APR_DECLARE(apr_status_t) apr_wait_proc(apr_proc_t *proc,
+APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
apr_wait_how_e waithow);
/**
@@ -488,9 +488,9 @@
* child is dead or not.
* </PRE>
* @param p Pool to allocate child information out of.
- * @deffunc apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, apr_wait_how_e waithow, apr_pool_t *p)
+ * @deffunc apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc, apr_wait_t *status, apr_wait_how_e waithow, apr_pool_t *p)
*/
-APR_DECLARE(apr_status_t) apr_wait_all_procs(apr_proc_t *proc,
+APR_DECLARE(apr_status_t) apr_proc_wait_all_procs(apr_proc_t *proc,
apr_wait_t *status,
apr_wait_how_e waithow,
apr_pool_t *p);
@@ -498,7 +498,7 @@
/**
* Detach the process from the controlling terminal.
*/
-apr_status_t apr_detach(void);
+apr_status_t apr_proc_detach(void);
#if APR_HAS_OTHER_CHILD
@@ -513,9 +513,9 @@
* then the maintenance is invoked with reason
* OC_REASON_UNWRITABLE.
* @param p The pool to use for allocating memory.
- * @deffunc void apr_register_other_child(apr_proc_t *pid, void (*maintenance) (int reason, void *, int status), void *data, apr_file_t *write_fd, apr_pool_t *p)
+ * @deffunc void apr_proc_other_child_register(apr_proc_t *pid, void (*maintenance) (int reason, void *, int status), void *data, apr_file_t *write_fd, apr_pool_t *p)
*/
-APR_DECLARE(void) apr_register_other_child(apr_proc_t *pid,
+APR_DECLARE(void) apr_proc_other_child_register(apr_proc_t *pid,
void (*maintenance) (int reason,
void *,
int status),
@@ -526,36 +526,36 @@
* Stop watching the specified process.
* @param data The data to pass to the maintenance function. This is
* used to find the process to unregister.
- * @deffunc void apr_unregister_other_child(void *data)
+ * @deffunc void apr_proc_other_child_unregister(void *data)
* @tip Since this can be called by a maintenance function while we're
* scanning the other_children list, all scanners should protect
* themself by loading ocr->next before calling any maintenance
* function.
*/
-APR_DECLARE(void) apr_unregister_other_child(void *data);
+APR_DECLARE(void) apr_proc_other_child_unregister(void *data);
/**
* Check on the specified process. If it is gone, call the maintenance
* function.
* @param pid The process to check.
* @param status The status to pass to the maintenance function.
- * @deffunc apr_status_t apr_reap_other_child(apr_proc_t *pid, int status);
+ * @deffunc apr_status_t apr_proc_other_child_read(apr_proc_t *pid, int status);
*/
-APR_DECLARE(apr_status_t) apr_reap_other_child(apr_proc_t *pid, int status);
+APR_DECLARE(apr_status_t) apr_proc_other_child_read(apr_proc_t *pid, int status);
/**
* Loop through all registered other_children and call the appropriate
* maintenance function when necessary.
- * @deffunc void apr_check_other_child();
+ * @deffunc void apr_proc_other_child_check();
*/
-APR_DECLARE(void) apr_check_other_child(void);
+APR_DECLARE(void) apr_proc_other_child_check(void);
/**
* Ensure all the registered write_fds are still writable, otherwise
* invoke the maintenance functions as appropriate.
- * @deffunc void apr_probe_writable_fds()
+ * @deffunc void apr_proc_probe_writable_fds()
*/
-APR_DECLARE(void) apr_probe_writable_fds(void);
+APR_DECLARE(void) apr_proc_probe_writable_fds(void);
#endif /* APR_HAS_OTHER_CHILD */
@@ -563,9 +563,9 @@
* Terminate a process.
* @param proc The process to terminate.
* @param sig How to kill the process.
- * @deffunc apr_status_t apr_kill(apr_proc_t *proc, int sig)
+ * @deffunc apr_status_t apr_proc_kill(apr_proc_t *proc, int sig)
*/
-APR_DECLARE(apr_status_t) apr_kill(apr_proc_t *proc, int sig);
+APR_DECLARE(apr_status_t) apr_proc_kill(apr_proc_t *proc, int sig);
/**
* Register a process to be killed when a pool dies.
@@ -579,9 +579,9 @@
* just_wait -- wait forever for the process to complete
* kill_only_once -- send SIGTERM and then wait
* </PRE>
- * @deffunc void apr_note_subprocess(struct apr_pool_t *a, apr_proc_t *pid, enum kill_conditions how)
+ * @deffunc void apr_pool_note_subprocess(struct apr_pool_t *a, apr_proc_t *pid, enum kill_conditions how)
*/
-APR_DECLARE(void) apr_note_subprocess(apr_pool_t *a, apr_proc_t *pid,
+APR_DECLARE(void) apr_pool_note_subprocess(apr_pool_t *a, apr_proc_t *pid,
enum kill_conditions how);
#ifdef __cplusplus
1.31 +2 -2 apr/include/apr_time.h
Index: apr_time.h
===================================================================
RCS file: /home/cvs/apr/include/apr_time.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- apr_time.h 2001/01/18 20:07:22 1.30
+++ apr_time.h 2001/02/08 07:44:47 1.31
@@ -90,9 +90,9 @@
/**
* return the current time
- * @deffunc apr_time_t apr_now(void)
+ * @deffunc apr_time_t apr_time_now(void)
*/
-APR_DECLARE(apr_time_t) apr_now(void);
+APR_DECLARE(apr_time_t) apr_time_now(void);
typedef struct apr_exploded_time_t apr_exploded_time_t;
/**
1.5 +6 -6 apr/include/apr_uuid.h
Index: apr_uuid.h
===================================================================
RCS file: /home/cvs/apr/include/apr_uuid.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- apr_uuid.h 2001/01/18 20:07:22 1.4
+++ apr_uuid.h 2001/02/08 07:44:47 1.5
@@ -78,9 +78,9 @@
/**
* Generate and return a (new) UUID
* @param uuid The resulting UUID
- * @deffunc void apr_get_uuid(apr_uuid_t *uuid)
+ * @deffunc void apr_uuid_get(apr_uuid_t *uuid)
*/
-APR_DECLARE(void) apr_get_uuid(apr_uuid_t *uuid);
+APR_DECLARE(void) apr_uuid_get(apr_uuid_t *uuid);
/**
* Format a UUID into a string, following the standard format
@@ -88,17 +88,17 @@
* be at least APR_UUID_FORMATTED_LENGTH + 1 bytes long to hold
* the formatted UUID and a null terminator
* @param uuid The UUID to format
- * @deffunc void apr_format_uuid(char *buffer, const apr_uuid_t *uuid)
+ * @deffunc void apr_uuid_format(char *buffer, const apr_uuid_t *uuid)
*/
-APR_DECLARE(void) apr_format_uuid(char *buffer, const apr_uuid_t *uuid);
+APR_DECLARE(void) apr_uuid_format(char *buffer, const apr_uuid_t *uuid);
/**
* Parse a standard-format string into a UUID
* @param uuid The resulting UUID
* @param uuid_str The formatted UUID
- * @deffunc apr_status_t apr_parse_uuid(apr_uuid_t *uuid, const char *uuid_str)
+ * @deffunc apr_status_t apr_uuid_parse(apr_uuid_t *uuid, const char *uuid_str)
*/
-APR_DECLARE(apr_status_t) apr_parse_uuid(apr_uuid_t *uuid, const char *uuid_str);
+APR_DECLARE(apr_status_t) apr_uuid_parse(apr_uuid_t *uuid, const char *uuid_str);
#ifdef __cplusplus
}
1.46 +1 -1 apr/include/arch/win32/fileio.h
Index: fileio.h
===================================================================
RCS file: /home/cvs/apr/include/arch/win32/fileio.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- fileio.h 2001/02/01 05:44:57 1.45
+++ fileio.h 2001/02/08 07:44:49 1.46
@@ -118,7 +118,7 @@
#define S_IFWHT 0160000 /* Whiteout */
#endif
-/* Internal Flags for apr_open */
+/* Internal Flags for apr_file_open */
#define APR_OPENLINK 8192 /* Open a link itself, if supported */
#define APR_READCONTROL 4096 /* Read the file's owner/perms */
#define APR_WRITECONTROL 2048 /* Modifythe file's owner/perms */
1.85 +48 -48 apr/lib/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apr/lib/apr_pools.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- apr_pools.c 2001/01/28 10:33:52 1.84
+++ apr_pools.c 2001/02/08 07:44:49 1.85
@@ -329,7 +329,7 @@
#if APR_HAS_THREADS
if (alloc_mutex) {
- apr_lock(alloc_mutex);
+ apr_lock_aquire(alloc_mutex);
}
#endif
old_free_list = block_freelist;
@@ -381,7 +381,7 @@
#if APR_HAS_THREADS
if (alloc_mutex) {
- apr_unlock(alloc_mutex);
+ apr_lock_release(alloc_mutex);
}
#endif /* APR_HAS_THREADS */
#endif /* ALLOC_USE_MALLOC */
@@ -466,7 +466,7 @@
#define POOL_HDR_CLICKS (1 + ((sizeof(struct apr_pool_t) - 1) / CLICK_SZ))
#define POOL_HDR_BYTES (POOL_HDR_CLICKS * CLICK_SZ)
-APR_DECLARE(apr_pool_t *) apr_make_sub_pool(apr_pool_t *p, int (*apr_abort)(int retcode))
+APR_DECLARE(apr_pool_t *) apr_pool_sub_make(apr_pool_t *p, int (*apr_abort)(int retcode))
{
union block_hdr *blok;
apr_pool_t *new_pool;
@@ -474,7 +474,7 @@
#if APR_HAS_THREADS
if (alloc_mutex) {
- apr_lock(alloc_mutex);
+ apr_lock_aquire(alloc_mutex);
}
#endif
@@ -500,7 +500,7 @@
#if APR_HAS_THREADS
if (alloc_mutex) {
- apr_unlock(alloc_mutex);
+ apr_lock_release(alloc_mutex);
}
#endif
@@ -536,16 +536,16 @@
}
#endif
-/* ### why do we have this, in addition to apr_make_sub_pool? */
-APR_DECLARE(apr_status_t) apr_create_pool(apr_pool_t **newcont, apr_pool_t *cont)
+/* ### why do we have this, in addition to apr_pool_sub_make? */
+APR_DECLARE(apr_status_t) apr_pool_create(apr_pool_t **newcont, apr_pool_t *cont)
{
apr_pool_t *newpool;
if (cont) {
- newpool = apr_make_sub_pool(cont, cont->apr_abort);
+ newpool = apr_pool_sub_make(cont, cont->apr_abort);
}
else {
- newpool = apr_make_sub_pool(NULL, NULL);
+ newpool = apr_pool_sub_make(NULL, NULL);
}
if (newpool == NULL) {
@@ -575,7 +575,7 @@
struct cleanup *next;
};
-APR_DECLARE(void) apr_register_cleanup(apr_pool_t *p, const void *data,
+APR_DECLARE(void) apr_pool_cleanup_register(apr_pool_t *p, const void *data,
apr_status_t (*plain_cleanup) (void *),
apr_status_t (*child_cleanup) (void *))
{
@@ -591,7 +591,7 @@
}
}
-APR_DECLARE(void) apr_kill_cleanup(apr_pool_t *p, const void *data,
+APR_DECLARE(void) apr_pool_cleanup_kill(apr_pool_t *p, const void *data,
apr_status_t (*cleanup) (void *))
{
struct cleanup *c;
@@ -612,10 +612,10 @@
}
}
-APR_DECLARE(apr_status_t) apr_run_cleanup(apr_pool_t *p, void *data,
+APR_DECLARE(apr_status_t) apr_pool_cleanup_run(apr_pool_t *p, void *data,
apr_status_t (*cleanup) (void *))
{
- apr_kill_cleanup(p, data, cleanup);
+ apr_pool_cleanup_kill(p, data, cleanup);
return (*cleanup) (data);
}
@@ -645,7 +645,7 @@
}
}
-APR_DECLARE(void) apr_cleanup_for_exec(void)
+APR_DECLARE(void) apr_pool_cleanup_for_exec(void)
{
#if !defined(WIN32) && !defined(OS2)
/*
@@ -661,13 +661,13 @@
#endif /* ndef WIN32 */
}
-APR_DECLARE_NONSTD(apr_status_t) apr_null_cleanup(void *data)
+APR_DECLARE_NONSTD(apr_status_t) apr_pool_cleanup_null(void *data)
{
/* do nothing cleanup routine */
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_init_alloc(apr_pool_t *globalp)
+APR_DECLARE(apr_status_t) apr_pool_alloc_init(apr_pool_t *globalp)
{
#if APR_HAS_THREADS
apr_status_t status;
@@ -679,20 +679,20 @@
stack_var_init(&s);
#endif
#if APR_HAS_THREADS
- status = apr_create_lock(&alloc_mutex, APR_MUTEX, APR_INTRAPROCESS,
+ status = apr_lock_create(&alloc_mutex, APR_MUTEX, APR_INTRAPROCESS,
NULL, globalp);
if (status != APR_SUCCESS) {
- apr_destroy_lock(alloc_mutex);
+ apr_lock_destroy(alloc_mutex);
return status;
}
- status = apr_create_lock(&spawn_mutex, APR_MUTEX, APR_INTRAPROCESS,
+ status = apr_lock_create(&spawn_mutex, APR_MUTEX, APR_INTRAPROCESS,
NULL, globalp);
if (status != APR_SUCCESS) {
- apr_destroy_lock(spawn_mutex);
+ apr_lock_destroy(spawn_mutex);
return status;
}
#endif
- permanent_pool = apr_make_sub_pool(globalp, NULL);
+ permanent_pool = apr_pool_sub_make(globalp, NULL);
#ifdef ALLOC_STATS
atexit(dump_stats);
@@ -701,15 +701,15 @@
return APR_SUCCESS;
}
-APR_DECLARE(void) apr_term_alloc(apr_pool_t *globalp)
+APR_DECLARE(void) apr_pool_alloc_term(apr_pool_t *globalp)
{
#if APR_HAS_THREADS
- apr_destroy_lock(alloc_mutex);
- apr_destroy_lock(spawn_mutex);
+ apr_lock_destroy(alloc_mutex);
+ apr_lock_destroy(spawn_mutex);
alloc_mutex = NULL;
spawn_mutex = NULL;
#endif
- apr_destroy_pool(globalp);
+ apr_pool_destroy(globalp);
}
/* We only want to lock the mutex if we are being called from apr_clear_pool.
@@ -721,7 +721,7 @@
APR_DECLARE(void) apr_clear_pool(apr_pool_t *a)
{
while (a->sub_pools) {
- apr_destroy_pool(a->sub_pools);
+ apr_pool_destroy(a->sub_pools);
}
/*
* Don't hold the mutex during cleanups.
@@ -753,12 +753,12 @@
#endif
}
-APR_DECLARE(void) apr_destroy_pool(apr_pool_t *a)
+APR_DECLARE(void) apr_pool_destroy(apr_pool_t *a)
{
apr_clear_pool(a);
#if APR_HAS_THREADS
if (alloc_mutex) {
- apr_lock(alloc_mutex);
+ apr_lock_aquire(alloc_mutex);
}
#endif
@@ -775,17 +775,17 @@
}
#if APR_HAS_THREADS
if (alloc_mutex) {
- apr_unlock(alloc_mutex);
+ apr_lock_release(alloc_mutex);
}
#endif
free_blocks(a->first);
}
-APR_DECLARE(apr_size_t) apr_bytes_in_pool(apr_pool_t *p)
+APR_DECLARE(apr_size_t) apr_pool_num_bytes(apr_pool_t *p)
{
return bytes_in_block_list(p->first);
}
-APR_DECLARE(apr_size_t) apr_bytes_in_free_blocks(void)
+APR_DECLARE(apr_size_t) apr_pool_free_blocks_num_bytes(void)
{
return bytes_in_block_list(block_freelist);
}
@@ -963,7 +963,7 @@
#if APR_HAS_THREADS
if (alloc_mutex) {
- apr_lock(alloc_mutex);
+ apr_lock_aquire(alloc_mutex);
}
#endif
@@ -976,7 +976,7 @@
#if APR_HAS_THREADS
if (alloc_mutex) {
- apr_unlock(alloc_mutex);
+ apr_lock_release(alloc_mutex);
}
#endif
@@ -999,14 +999,14 @@
* User data management functions
*/
-APR_DECLARE(apr_status_t) apr_set_userdata(const void *data, const char *key,
+APR_DECLARE(apr_status_t) apr_pool_userdata_set(const void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_pool_t *cont)
{
int keylen = strlen(key);
if (cont->prog_data == NULL)
- cont->prog_data = apr_make_hash(cont);
+ cont->prog_data = apr_hash_make(cont);
if (apr_hash_get(cont->prog_data, key, keylen) == NULL){
char *new_key = apr_pstrdup(cont, key);
@@ -1016,11 +1016,11 @@
apr_hash_set(cont->prog_data, key, keylen, data);
}
- apr_register_cleanup(cont, data, cleanup, cleanup);
+ apr_pool_cleanup_register(cont, data, cleanup, cleanup);
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_userdata(void **data, const char *key, apr_pool_t *cont)
+APR_DECLARE(apr_status_t) apr_pool_userdata_get(void **data, const char *key, apr_pool_t *cont)
{
if (cont->prog_data == NULL)
*data = NULL;
@@ -1087,11 +1087,11 @@
/* must try another blok */
#if APR_HAS_THREADS
- apr_lock(alloc_mutex);
+ apr_lock_aquire(alloc_mutex);
#endif
nblok = new_block(2 * cur_len, NULL);
#if APR_HAS_THREADS
- apr_unlock(alloc_mutex);
+ apr_lock_release(alloc_mutex);
#endif
memcpy(nblok->h.first_avail, blok->h.first_avail, cur_len);
ps->vbuff.curpos = nblok->h.first_avail + cur_len;
@@ -1102,12 +1102,12 @@
if (ps->got_a_new_block) {
debug_fill(blok->h.first_avail, blok->h.endp - blok->h.first_avail);
#if APR_HAS_THREADS
- apr_lock(alloc_mutex);
+ apr_lock_aquire(alloc_mutex);
#endif
blok->h.next = block_freelist;
block_freelist = blok;
#if APR_HAS_THREADS
- apr_unlock(alloc_mutex);
+ apr_lock_release(alloc_mutex);
#endif
}
ps->blok = nblok;
@@ -1202,7 +1202,7 @@
* generic interface, but for now, it's a special case
*/
-APR_DECLARE(void) apr_note_subprocess(apr_pool_t *a, apr_proc_t *pid,
+APR_DECLARE(void) apr_pool_note_subprocess(apr_pool_t *a, apr_proc_t *pid,
enum kill_conditions how)
{
struct process_chain *new =
@@ -1237,7 +1237,7 @@
#ifndef NEED_WAITPID
/* Pick up all defunct processes */
for (p = procs; p; p = p->next) {
- if (apr_wait_proc(p->pid, APR_NOWAIT) == APR_CHILD_DONE) {
+ if (apr_proc_wait(p->pid, APR_NOWAIT) == APR_CHILD_DONE) {
p->kill_how = kill_never;
}
}
@@ -1248,20 +1248,20 @@
|| (p->kill_how == kill_only_once)) {
/*
* Subprocess may be dead already. Only need the timeout if not.
- * Note: apr_kill on Windows is TerminateProcess(), which is
+ * Note: apr_proc_kill on Windows is TerminateProcess(), which is
* similar to a SIGKILL, so always give the process a timeout
* under Windows before killing it.
*/
#ifdef WIN32
need_timeout = 1;
#else
- if (apr_kill(p->pid, SIGTERM) == APR_SUCCESS) {
+ if (apr_proc_kill(p->pid, SIGTERM) == APR_SUCCESS) {
need_timeout = 1;
}
#endif
}
else if (p->kill_how == kill_always) {
- apr_kill(p->pid, SIGKILL);
+ apr_proc_kill(p->pid, SIGKILL);
}
}
@@ -1276,7 +1276,7 @@
*/
for (p = procs; p; p = p->next) {
if (p->kill_how == kill_after_timeout) {
- apr_kill(p->pid, SIGKILL);
+ apr_proc_kill(p->pid, SIGKILL);
}
}
#ifdef WIN32
@@ -1293,7 +1293,7 @@
/* Now wait for all the signaled processes to die */
for (p = procs; p; p = p->next) {
if (p->kill_how != kill_never) {
- (void) apr_wait_proc(p->pid, APR_WAIT);
+ (void) apr_proc_wait(p->pid, APR_WAIT);
}
}
}
1.19 +3 -3 apr/locks/beos/crossproc.c
Index: crossproc.c
===================================================================
RCS file: /home/cvs/apr/locks/beos/crossproc.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- crossproc.c 2000/12/31 18:48:02 1.18
+++ crossproc.c 2001/02/08 07:44:50 1.19
@@ -81,8 +81,8 @@
}
new->ben_interproc = 0;
new->sem_interproc = stat;
- apr_register_cleanup(new->cntxt, (void *)new, lock_inter_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register(new->cntxt, (void *)new, lock_inter_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -116,7 +116,7 @@
{
apr_status_t stat;
if ((stat = lock_inter_cleanup(lock)) == APR_SUCCESS) {
- apr_kill_cleanup(lock->cntxt, lock, lock_inter_cleanup);
+ apr_pool_cleanup_kill(lock->cntxt, lock, lock_inter_cleanup);
return APR_SUCCESS;
}
return stat;
1.15 +3 -3 apr/locks/beos/intraproc.c
Index: intraproc.c
===================================================================
RCS file: /home/cvs/apr/locks/beos/intraproc.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- intraproc.c 2000/12/31 18:48:03 1.14
+++ intraproc.c 2001/02/08 07:44:50 1.15
@@ -76,8 +76,8 @@
}
new->ben_intraproc = 0;
new->sem_intraproc = stat;
- apr_register_cleanup(new->cntxt, (void *)new, lock_intra_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register(new->cntxt, (void *)new, lock_intra_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -111,7 +111,7 @@
{
apr_status_t stat;
if ((stat = lock_intra_cleanup(lock)) == APR_SUCCESS) {
- apr_kill_cleanup(lock->cntxt, lock, lock_intra_cleanup);
+ apr_pool_cleanup_kill(lock->cntxt, lock, lock_intra_cleanup);
return APR_SUCCESS;
}
return stat;
1.24 +11 -11 apr/locks/beos/locks.c
Index: locks.c
===================================================================
RCS file: /home/cvs/apr/locks/beos/locks.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- locks.c 2000/12/31 18:48:03 1.23
+++ locks.c 2001/02/08 07:44:50 1.24
@@ -56,7 +56,7 @@
#include "apr_strings.h"
#include "apr_portable.h"
-apr_status_t apr_create_lock(apr_lock_t **lock, apr_locktype_e type,
+apr_status_t apr_lock_create(apr_lock_t **lock, apr_locktype_e type,
apr_lockscope_e scope, const char *fname,
apr_pool_t *cont)
{
@@ -86,7 +86,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_lock(apr_lock_t *lock)
+apr_status_t apr_lock_aquire(apr_lock_t *lock)
{
apr_status_t stat;
@@ -103,7 +103,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_unlock(apr_lock_t *lock)
+apr_status_t apr_lock_release(apr_lock_t *lock)
{
apr_status_t stat;
if (lock->scope != APR_CROSS_PROCESS) {
@@ -119,7 +119,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_destroy_lock(apr_lock_t *lock)
+apr_status_t apr_lock_destroy(apr_lock_t *lock)
{
apr_status_t stat;
if (lock->scope != APR_CROSS_PROCESS) {
@@ -135,7 +135,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_child_init_lock(apr_lock_t **lock, const char *fname,
+apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname,
apr_pool_t *cont)
{
apr_status_t stat;
@@ -147,18 +147,18 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_lockdata(apr_lock_t *lock, const char *key, void *data)
+apr_status_t apr_lock_data_get(apr_lock_t *lock, const char *key, void *data)
{
- return apr_get_userdata(data, key, lock->cntxt);
+ return apr_pool_userdata_get(data, key, lock->cntxt);
}
-apr_status_t apr_set_lockdata(apr_lock_t *lock, void *data, const char *key,
+apr_status_t apr_lock_data_set(apr_lock_t *lock, void *data, const char *key,
apr_status_t (*cleanup) (void *))
{
- return apr_set_userdata(data, key, cleanup, lock->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, lock->cntxt);
}
-apr_status_t apr_get_os_lock(apr_os_lock_t *oslock, apr_lock_t *lock)
+apr_status_t apr_os_lock_get(apr_os_lock_t *oslock, apr_lock_t *lock)
{
oslock->sem_interproc = lock->sem_interproc;
oslock->sem_intraproc = lock->sem_intraproc;
@@ -167,7 +167,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_put_os_lock(apr_lock_t **lock, apr_os_lock_t *thelock,
+apr_status_t apr_os_lock_put(apr_lock_t **lock, apr_os_lock_t *thelock,
apr_pool_t *cont)
{
if (cont == NULL) {
1.23 +9 -9 apr/locks/os2/locks.c
Index: locks.c
===================================================================
RCS file: /home/cvs/apr/locks/os2/locks.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- locks.c 2001/01/28 15:30:27 1.22
+++ locks.c 2001/02/08 07:44:51 1.23
@@ -71,12 +71,12 @@
static apr_status_t lock_cleanup(void *thelock)
{
apr_lock_t *lock = thelock;
- return apr_destroy_lock(lock);
+ return apr_lock_destroy(lock);
}
-apr_status_t apr_create_lock(apr_lock_t **lock, apr_locktype_e type, apr_lockscope_e scope,
+apr_status_t apr_lock_create(apr_lock_t **lock, apr_locktype_e type, apr_lockscope_e scope,
const char *fname, apr_pool_t *cont)
{
apr_lock_t *new;
@@ -102,14 +102,14 @@
*lock = new;
if (!rc)
- apr_register_cleanup(cont, new, lock_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(cont, new, lock_cleanup, apr_pool_cleanup_null);
return APR_OS2_STATUS(rc);
}
-apr_status_t apr_child_init_lock(apr_lock_t **lock, const char *fname,
+apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname,
apr_pool_t *cont)
{
int rc;
@@ -126,14 +126,14 @@
rc = DosOpenMutexSem( (char *)fname, &(*lock)->hMutex );
if (!rc)
- apr_register_cleanup(cont, *lock, lock_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(cont, *lock, lock_cleanup, apr_pool_cleanup_null);
return APR_OS2_STATUS(rc);
}
-apr_status_t apr_lock(apr_lock_t *lock)
+apr_status_t apr_lock_aquire(apr_lock_t *lock)
{
ULONG rc;
@@ -149,7 +149,7 @@
-apr_status_t apr_unlock(apr_lock_t *lock)
+apr_status_t apr_lock_release(apr_lock_t *lock)
{
ULONG rc;
@@ -164,14 +164,14 @@
-apr_status_t apr_destroy_lock(apr_lock_t *lock)
+apr_status_t apr_lock_destroy(apr_lock_t *lock)
{
ULONG rc;
apr_status_t stat = APR_SUCCESS;
if (lock->owner == CurrentTid) {
while (lock->lock_count > 0 && stat == APR_SUCCESS)
- stat = apr_unlock(lock);
+ stat = apr_lock_release(lock);
}
if (stat != APR_SUCCESS)
1.40 +8 -8 apr/locks/unix/crossproc.c
Index: crossproc.c
===================================================================
RCS file: /home/cvs/apr/locks/unix/crossproc.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- crossproc.c 2001/01/02 11:37:52 1.39
+++ crossproc.c 2001/02/08 07:44:51 1.40
@@ -99,7 +99,7 @@
return errno;
}
new->curr_locked = 0;
- apr_register_cleanup(new->cntxt, (void *)new, lock_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(new->cntxt, (void *)new, lock_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -136,7 +136,7 @@
apr_status_t stat;
if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
- apr_kill_cleanup(lock->cntxt, lock, lock_cleanup);
+ apr_pool_cleanup_kill(lock->cntxt, lock, lock_cleanup);
return APR_SUCCESS;
}
return stat;
@@ -222,7 +222,7 @@
}
new->curr_locked = 0;
- apr_register_cleanup(new->cntxt, (void *)new, lock_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(new->cntxt, (void *)new, lock_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -258,7 +258,7 @@
{
apr_status_t stat;
if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
- apr_kill_cleanup(lock->cntxt, lock, lock_cleanup);
+ apr_pool_cleanup_kill(lock->cntxt, lock, lock_cleanup);
return APR_SUCCESS;
}
return stat;
@@ -315,7 +315,7 @@
new->curr_locked=0;
unlink(new->fname);
- apr_register_cleanup(new->cntxt, new, lock_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(new->cntxt, new, lock_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -351,7 +351,7 @@
{
apr_status_t stat;
if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
- apr_kill_cleanup(lock->cntxt, lock, lock_cleanup);
+ apr_pool_cleanup_kill(lock->cntxt, lock, lock_cleanup);
return APR_SUCCESS;
}
return stat;
@@ -395,7 +395,7 @@
return errno;
}
new->curr_locked = 0;
- apr_register_cleanup(new->cntxt, (void *)new, lock_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(new->cntxt, (void *)new, lock_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -431,7 +431,7 @@
{
apr_status_t stat;
if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
- apr_kill_cleanup(lock->cntxt, lock, lock_cleanup);
+ apr_pool_cleanup_kill(lock->cntxt, lock, lock_cleanup);
return APR_SUCCESS;
}
return stat;
1.21 +3 -3 apr/locks/unix/intraproc.c
Index: intraproc.c
===================================================================
RCS file: /home/cvs/apr/locks/unix/intraproc.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- intraproc.c 2001/01/02 11:37:53 1.20
+++ intraproc.c 2001/02/08 07:44:51 1.21
@@ -108,8 +108,8 @@
}
new->curr_locked = 0;
- apr_register_cleanup(new->cntxt, (void *)new, lock_intra_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register(new->cntxt, (void *)new, lock_intra_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -143,7 +143,7 @@
{
apr_status_t stat;
if ((stat = lock_intra_cleanup(lock)) == APR_SUCCESS) {
- apr_kill_cleanup(lock->cntxt, lock, lock_intra_cleanup);
+ apr_pool_cleanup_kill(lock->cntxt, lock, lock_intra_cleanup);
return APR_SUCCESS;
}
return stat;
1.44 +11 -11 apr/locks/unix/locks.c
Index: locks.c
===================================================================
RCS file: /home/cvs/apr/locks/unix/locks.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- locks.c 2000/12/15 16:56:57 1.43
+++ locks.c 2001/02/08 07:44:51 1.44
@@ -56,7 +56,7 @@
#include "apr_strings.h"
#include "apr_portable.h"
-apr_status_t apr_create_lock(apr_lock_t **lock, apr_locktype_e type,
+apr_status_t apr_lock_create(apr_lock_t **lock, apr_locktype_e type,
apr_lockscope_e scope, const char *fname,
apr_pool_t *cont)
{
@@ -101,7 +101,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_lock(apr_lock_t *lock)
+apr_status_t apr_lock_aquire(apr_lock_t *lock)
{
apr_status_t stat;
#if APR_PROCESS_LOCK_IS_GLOBAL /* don't need intra lock for APR_LOCKALL */
@@ -125,7 +125,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_unlock(apr_lock_t *lock)
+apr_status_t apr_lock_release(apr_lock_t *lock)
{
apr_status_t stat;
@@ -150,7 +150,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_destroy_lock(apr_lock_t *lock)
+apr_status_t apr_lock_destroy(apr_lock_t *lock)
{
apr_status_t stat;
#if APR_PROCESS_LOCK_IS_GLOBAL /* don't need intra lock for APR_LOCKALL */
@@ -176,7 +176,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_child_init_lock(apr_lock_t **lock, const char *fname,
+apr_status_t apr_lock_child_init(apr_lock_t **lock, const char *fname,
apr_pool_t *cont)
{
apr_status_t stat;
@@ -188,18 +188,18 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_lockdata(apr_lock_t *lock, const char *key, void *data)
+apr_status_t apr_lock_data_get(apr_lock_t *lock, const char *key, void *data)
{
- return apr_get_userdata(data, key, lock->cntxt);
+ return apr_pool_userdata_get(data, key, lock->cntxt);
}
-apr_status_t apr_set_lockdata(apr_lock_t *lock, void *data, const char *key,
+apr_status_t apr_lock_data_set(apr_lock_t *lock, void *data, const char *key,
apr_status_t (*cleanup) (void *))
{
- return apr_set_userdata(data, key, cleanup, lock->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, lock->cntxt);
}
-apr_status_t apr_get_os_lock(apr_os_lock_t *oslock, apr_lock_t *lock)
+apr_status_t apr_os_lock_get(apr_os_lock_t *oslock, apr_lock_t *lock)
{
oslock->crossproc = lock->interproc;
#if APR_HAS_THREADS
@@ -211,7 +211,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_put_os_lock(apr_lock_t **lock, apr_os_lock_t *thelock,
+apr_status_t apr_os_lock_put(apr_lock_t **lock, apr_os_lock_t *thelock,
apr_pool_t *cont)
{
if (cont == NULL) {
1.34 +11 -11 apr/locks/win32/locks.c
Index: locks.c
===================================================================
RCS file: /home/cvs/apr/locks/win32/locks.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- locks.c 2001/01/18 20:07:28 1.33
+++ locks.c 2001/02/08 07:44:52 1.34
@@ -57,7 +57,7 @@
#include "win32/locks.h"
#include "apr_portable.h"
-APR_DECLARE(apr_status_t) apr_create_lock(apr_lock_t **lock,
+APR_DECLARE(apr_status_t) apr_lock_create(apr_lock_t **lock,
apr_locktype_e type,
apr_lockscope_e scope,
const char *fname,
@@ -94,7 +94,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_child_init_lock(apr_lock_t **lock,
+APR_DECLARE(apr_status_t) apr_lock_child_init(apr_lock_t **lock,
const char *fname,
apr_pool_t *cont)
{
@@ -115,7 +115,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_lock(apr_lock_t *lock)
+APR_DECLARE(apr_status_t) apr_lock_aquire(apr_lock_t *lock)
{
DWORD rv;
if (lock->scope == APR_INTRAPROCESS) {
@@ -131,7 +131,7 @@
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_unlock(apr_lock_t *lock)
+APR_DECLARE(apr_status_t) apr_lock_release(apr_lock_t *lock)
{
if (lock->scope == APR_INTRAPROCESS) {
LeaveCriticalSection(&lock->section);
@@ -144,7 +144,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_destroy_lock(apr_lock_t *lock)
+APR_DECLARE(apr_status_t) apr_lock_destroy(apr_lock_t *lock)
{
if (lock->scope == APR_INTRAPROCESS) {
DeleteCriticalSection(&lock->section);
@@ -157,27 +157,27 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_lockdata(apr_lock_t *lock, const char *key,
+APR_DECLARE(apr_status_t) apr_lock_data_get(apr_lock_t *lock, const char *key,
void *data)
{
- return apr_get_userdata(data, key, lock->cntxt);
+ return apr_pool_userdata_get(data, key, lock->cntxt);
}
-APR_DECLARE(apr_status_t) apr_set_lockdata(apr_lock_t *lock, void *data,
+APR_DECLARE(apr_status_t) apr_lock_data_set(apr_lock_t *lock, void *data,
const char *key,
apr_status_t (*cleanup) (void *))
{
- return apr_set_userdata(data, key, cleanup, lock->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, lock->cntxt);
}
-APR_DECLARE(apr_status_t) apr_get_os_lock(apr_os_lock_t *thelock,
+APR_DECLARE(apr_status_t) apr_os_lock_get(apr_os_lock_t *thelock,
apr_lock_t *lock)
{
*thelock = lock->mutex;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_put_os_lock(apr_lock_t **lock,
+APR_DECLARE(apr_status_t) apr_os_lock_put(apr_lock_t **lock,
apr_os_lock_t *thelock,
apr_pool_t *cont)
{
1.32 +1 -1 apr/misc/unix/getopt.c
Index: getopt.c
===================================================================
RCS file: /home/cvs/apr/misc/unix/getopt.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- getopt.c 2001/01/28 08:59:15 1.31
+++ getopt.c 2001/02/08 07:44:52 1.32
@@ -48,7 +48,7 @@
return p + 1;
}
-APR_DECLARE(apr_status_t) apr_initopt(apr_getopt_t **os, apr_pool_t *cont,
+APR_DECLARE(apr_status_t) apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont,
int argc, const char *const *argv)
{
void *argv_buff;
1.8 +4 -4 apr/misc/unix/getuuid.c
Index: getuuid.c
===================================================================
RCS file: /home/cvs/apr/misc/unix/getuuid.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- getuuid.c 2001/01/28 09:06:04 1.7
+++ getuuid.c 2001/02/08 07:44:52 1.8
@@ -105,12 +105,12 @@
} r;
- apr_MD5Init(&c);
+ apr_md5_init(&c);
r.pid = getpid();
gettimeofday(&r.t, (struct timezone *)0);
gethostname(r.hostname, 256);
- apr_MD5Update(&c, (const unsigned char *)&r, sizeof(r));
- apr_MD5Final(seed, &c);
+ apr_md5_update(&c, (const unsigned char *)&r, sizeof(r));
+ apr_md5_final(seed, &c);
memcpy(node, seed, NODE_LENGTH); /* use a subset of the seed bytes */
#endif
@@ -196,7 +196,7 @@
*timestamp = time_now + fudge;
}
-void apr_get_uuid(apr_uuid_t *uuid)
+void apr_uuid_get(apr_uuid_t *uuid)
{
apr_uint64_t timestamp;
unsigned char *d = uuid->data;
1.19 +5 -5 apr/misc/unix/otherchild.c
Index: otherchild.c
===================================================================
RCS file: /home/cvs/apr/misc/unix/otherchild.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- otherchild.c 2000/12/05 00:16:19 1.18
+++ otherchild.c 2001/02/08 07:44:53 1.19
@@ -71,7 +71,7 @@
static apr_other_child_rec_t *other_children = NULL;
-APR_DECLARE(void) apr_register_other_child(apr_proc_t *pid,
+APR_DECLARE(void) apr_proc_other_child_register(apr_proc_t *pid,
void (*maintenance) (int reason, void *, int status),
void *data, apr_file_t *write_fd, apr_pool_t *p)
{
@@ -91,7 +91,7 @@
other_children = ocr;
}
-APR_DECLARE(void) apr_unregister_other_child(void *data)
+APR_DECLARE(void) apr_proc_other_child_unregister(void *data)
{
apr_other_child_rec_t **pocr, *nocr;
@@ -108,7 +108,7 @@
/* test to ensure that the write_fds are all still writable, otherwise
* invoke the maintenance functions as appropriate */
-void apr_probe_writable_fds(void)
+void apr_proc_probe_writable_fds(void)
{
fd_set writable_fds;
int fd_max;
@@ -156,7 +156,7 @@
}
}
-APR_DECLARE(apr_status_t) apr_reap_other_child(apr_proc_t *pid, int status)
+APR_DECLARE(apr_status_t) apr_proc_other_child_read(apr_proc_t *pid, int status)
{
apr_other_child_rec_t *ocr, *nocr;
@@ -172,7 +172,7 @@
return APR_CHILD_NOTDONE;
}
-APR_DECLARE(void) apr_check_other_child(void)
+APR_DECLARE(void) apr_proc_other_child_check(void)
{
apr_other_child_rec_t *ocr, *nocr;
pid_t waitret;
1.47 +3 -3 apr/misc/unix/start.c
Index: start.c
===================================================================
RCS file: /home/cvs/apr/misc/unix/start.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- start.c 2001/01/18 20:07:29 1.46
+++ start.c 2001/02/08 07:44:53 1.47
@@ -76,7 +76,7 @@
return APR_SUCCESS;
}
- if (apr_create_pool(&global_apr_pool, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&global_apr_pool, NULL) != APR_SUCCESS) {
return APR_ENOPOOL;
}
@@ -94,7 +94,7 @@
return APR_EEXIST;
}
#endif
- status = apr_init_alloc(global_apr_pool);
+ status = apr_pool_alloc_init(global_apr_pool);
return status;
}
@@ -104,7 +104,7 @@
if (initialized) {
return;
}
- apr_term_alloc(global_apr_pool);
+ apr_pool_alloc_term(global_apr_pool);
}
APR_DECLARE(apr_status_t) apr_set_abort(int (*apr_abort)(int retcode), apr_pool_t *cont)
1.3 +2 -2 apr/misc/unix/uuid.c
Index: uuid.c
===================================================================
RCS file: /home/cvs/apr/misc/unix/uuid.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- uuid.c 2001/01/18 20:07:29 1.2
+++ uuid.c 2001/02/08 07:44:53 1.3
@@ -60,7 +60,7 @@
#include "apr_lib.h"
-APR_DECLARE(void) apr_format_uuid(char *buffer, const apr_uuid_t *uuid)
+APR_DECLARE(void) apr_uuid_format(char *buffer, const apr_uuid_t *uuid)
{
const unsigned char *d = uuid->data;
@@ -95,7 +95,7 @@
return (unsigned char)result;
}
-APR_DECLARE(apr_status_t) apr_parse_uuid(apr_uuid_t *uuid,
+APR_DECLARE(apr_status_t) apr_uuid_parse(apr_uuid_t *uuid,
const char *uuid_str)
{
int i;
1.3 +1 -1 apr/misc/win32/getuuid.c
Index: getuuid.c
===================================================================
RCS file: /home/cvs/apr/misc/win32/getuuid.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- getuuid.c 2001/01/18 20:07:30 1.2
+++ getuuid.c 2001/02/08 07:44:54 1.3
@@ -62,7 +62,7 @@
#include "apr.h"
#include "apr_uuid.h"
-APR_DECLARE(void) apr_get_uuid(apr_uuid_t *uuid)
+APR_DECLARE(void) apr_uuid_get(apr_uuid_t *uuid)
{
GUID guid;
1.32 +4 -4 apr/mmap/unix/mmap.c
Index: mmap.c
===================================================================
RCS file: /home/cvs/apr/mmap/unix/mmap.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- mmap.c 2001/02/05 04:37:50 1.31
+++ mmap.c 2001/02/08 07:44:54 1.32
@@ -120,7 +120,7 @@
#ifdef BEOS
/* XXX: mmap shouldn't really change the seek offset */
- apr_seek(file, APR_SET, &offset);
+ apr_file_seek(file, APR_SET, &offset);
if (flag & APR_MMAP_WRITE) {
native_flags |= B_WRITE_AREA;
}
@@ -166,8 +166,8 @@
(*new)->cntxt = cont;
/* register the cleanup... */
- apr_register_cleanup((*new)->cntxt, (void*)(*new), mmap_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void*)(*new), mmap_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -179,7 +179,7 @@
return APR_ENOENT;
if ((rv = mmap_cleanup(mmap)) == APR_SUCCESS) {
- apr_kill_cleanup(mmap->cntxt, mmap, mmap_cleanup);
+ apr_pool_cleanup_kill(mmap->cntxt, mmap, mmap_cleanup);
return APR_SUCCESS;
}
return rv;
1.3 +3 -3 apr/mmap/win32/mmap.c
Index: mmap.c
===================================================================
RCS file: /home/cvs/apr/mmap/win32/mmap.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mmap.c 2001/01/18 20:07:32 1.2
+++ mmap.c 2001/02/08 07:44:55 1.3
@@ -147,8 +147,8 @@
(*new)->cntxt = cont;
/* register the cleanup... */
- apr_register_cleanup((*new)->cntxt, (void*)(*new), mmap_cleanup,
- apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void*)(*new), mmap_cleanup,
+ apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -157,7 +157,7 @@
apr_status_t rv;
if ((rv = mmap_cleanup(mmap)) == APR_SUCCESS) {
- apr_kill_cleanup(mmap->cntxt, mmap, mmap_cleanup);
+ apr_pool_cleanup_kill(mmap->cntxt, mmap, mmap_cleanup);
return APR_SUCCESS;
}
return rv;
1.25 +10 -10 apr/network_io/beos/poll.c
Index: poll.c
===================================================================
RCS file: /home/cvs/apr/network_io/beos/poll.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- poll.c 2001/01/12 17:49:30 1.24
+++ poll.c 2001/02/08 07:44:55 1.25
@@ -67,7 +67,7 @@
* select for R4.5 of BeOS. So here we use code that uses the write
* bits.
*/
-apr_status_t apr_setup_poll(apr_pollfd_t **new, apr_int32_t num, apr_pool_t *cont)
+apr_status_t apr_poll_setup(apr_pollfd_t **new, apr_int32_t num, apr_pool_t *cont)
{
(*new) = (apr_pollfd_t *)apr_pcalloc(cont, sizeof(apr_pollfd_t) * num);
if ((*new) == NULL) {
@@ -84,7 +84,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_add_poll_socket(apr_pollfd_t *aprset,
+apr_status_t apr_poll_socket_add(apr_pollfd_t *aprset,
apr_socket_t *sock, apr_int16_t event)
{
if (event & APR_POLLIN) {
@@ -102,7 +102,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_mask_poll_socket(apr_pollfd_t *aprset,
+apr_status_t apr_poll_socket_mask(apr_pollfd_t *aprset,
apr_socket_t *sock,
apr_int16_t events)
{
@@ -146,7 +146,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_revents(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
+apr_status_t apr_poll_revents_get(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
{
apr_int16_t revents = 0;
char data[1];
@@ -190,7 +190,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_remove_poll_socket(apr_pollfd_t *aprset, apr_socket_t *sock)
+apr_status_t apr_poll_socket_remove(apr_pollfd_t *aprset, apr_socket_t *sock)
{
FD_CLR(sock->socketdes, aprset->read);
FD_CLR(sock->socketdes, aprset->read);
@@ -198,7 +198,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_clear_poll_sockets(apr_pollfd_t *aprset, apr_int16_t event)
+apr_status_t apr_poll_socket_clear(apr_pollfd_t *aprset, apr_int16_t event)
{
if (event & APR_POLLIN) {
FD_ZERO(aprset->read);
@@ -213,15 +213,15 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_polldata(apr_pollfd_t *pollfd, const char *key, void *data)
+apr_status_t apr_poll_data_get(apr_pollfd_t *pollfd, const char *key, void *data)
{
- return apr_get_userdata(data, key, pollfd->cntxt);
+ return apr_pool_userdata_get(data, key, pollfd->cntxt);
}
-apr_status_t apr_set_polldata(apr_pollfd_t *pollfd, void *data, const char *key,
+apr_status_t apr_poll_data_set(apr_pollfd_t *pollfd, void *data, const char *key,
apr_status_t (*cleanup) (void *))
{
- return apr_set_userdata(data, key, cleanup, pollfd->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, pollfd->cntxt);
}
#endif /* BEOS_BONE */
1.20 +8 -8 apr/network_io/os2/poll.c
Index: poll.c
===================================================================
RCS file: /home/cvs/apr/network_io/os2/poll.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- poll.c 2001/01/28 15:30:29 1.19
+++ poll.c 2001/02/08 07:44:56 1.20
@@ -62,7 +62,7 @@
/* OS/2 doesn't have a poll function, implement using OS/2 style select */
-apr_status_t apr_setup_poll(apr_pollfd_t **new, apr_int32_t num, apr_pool_t *cont)
+apr_status_t apr_poll_setup(apr_pollfd_t **new, apr_int32_t num, apr_pool_t *cont)
{
*new = (apr_pollfd_t *)apr_palloc(cont, sizeof(apr_pollfd_t));
@@ -93,7 +93,7 @@
-apr_status_t apr_add_poll_socket(apr_pollfd_t *aprset,
+apr_status_t apr_poll_socket_add(apr_pollfd_t *aprset,
apr_socket_t *sock, apr_int16_t events)
{
int i;
@@ -129,7 +129,7 @@
{
int i;
int rv = 0;
- apr_time_t starttime = apr_now();
+ apr_time_t starttime = apr_time_now();
do {
for (i=0; i<pollfdset->num_total; i++) {
@@ -143,7 +143,7 @@
timeout >= 0 ? timeout / 1000 : -1);
if (rv < 0 && sock_errno() == SOCEINTR && timeout >= 0 ) {
- apr_interval_time_t elapsed = apr_now() - starttime;
+ apr_interval_time_t elapsed = apr_time_now() - starttime;
if (timeout <= elapsed)
break;
@@ -158,7 +158,7 @@
-apr_status_t apr_get_revents(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
+apr_status_t apr_poll_revents_get(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
{
int i;
@@ -180,7 +180,7 @@
-apr_status_t apr_mask_poll_socket(apr_pollfd_t *aprset,
+apr_status_t apr_poll_socket_mask(apr_pollfd_t *aprset,
apr_socket_t *sock, apr_int16_t events)
{
int start, *count, pos;
@@ -218,7 +218,7 @@
-apr_status_t apr_remove_poll_socket(apr_pollfd_t *aprset, apr_socket_t *sock)
+apr_status_t apr_poll_socket_remove(apr_pollfd_t *aprset, apr_socket_t *sock)
{
- return apr_mask_poll_socket(aprset, sock, APR_POLLIN|APR_POLLOUT|APR_POLLPRI);
+ return apr_poll_socket_mask(aprset, sock, APR_POLLIN|APR_POLLOUT|APR_POLLPRI);
}
1.39 +16 -16 apr/network_io/os2/sockets.c
Index: sockets.c
===================================================================
RCS file: /home/cvs/apr/network_io/os2/sockets.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- sockets.c 2001/01/03 01:48:48 1.38
+++ sockets.c 2001/02/08 07:44:56 1.39
@@ -126,7 +126,7 @@
(*new)->remote_addr->pool = p;
}
-apr_status_t apr_create_socket(apr_socket_t **new, int ofamily, int type,
+apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
apr_pool_t *cont)
{
int family = ofamily;
@@ -163,8 +163,8 @@
(*new)->timeout = -1;
(*new)->nonblock = FALSE;
- apr_register_cleanup((*new)->cntxt, (void *)(*new),
- socket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new),
+ socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -178,9 +178,9 @@
}
}
-apr_status_t apr_close_socket(apr_socket_t *thesocket)
+apr_status_t apr_socket_close(apr_socket_t *thesocket)
{
- apr_kill_cleanup(thesocket->cntxt, thesocket, socket_cleanup);
+ apr_pool_cleanup_kill(thesocket->cntxt, thesocket, socket_cleanup);
return socket_cleanup(thesocket);
}
@@ -223,8 +223,8 @@
return APR_OS2_STATUS(sock_errno());
}
- apr_register_cleanup((*new)->cntxt, (void *)(*new),
- socket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new),
+ socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -246,27 +246,27 @@
-apr_status_t apr_get_socketdata(void **data, const char *key,
+apr_status_t apr_socket_data_get(void **data, const char *key,
apr_socket_t *socket)
{
- return apr_get_userdata(data, key, socket->cntxt);
+ return apr_pool_userdata_get(data, key, socket->cntxt);
}
-apr_status_t apr_set_socketdata(apr_socket_t *socket, void *data, const char *key,
+apr_status_t apr_socket_data_set(apr_socket_t *socket, void *data, const char *key,
apr_status_t (*cleanup) (void *))
{
- return apr_set_userdata(data, key, cleanup, socket->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, socket->cntxt);
}
-apr_status_t apr_get_os_sock(apr_os_sock_t *thesock, apr_socket_t *sock)
+apr_status_t apr_os_sock_get(apr_os_sock_t *thesock, apr_socket_t *sock)
{
*thesock = sock->socketdes;
return APR_SUCCESS;
}
-apr_status_t apr_make_os_sock(apr_socket_t **apr_sock,
+apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,
apr_os_sock_info_t *os_sock_info,
apr_pool_t *cont)
{
@@ -288,13 +288,13 @@
(*apr_sock)->remote_addr->salen);
}
- apr_register_cleanup((*apr_sock)->cntxt, (void *)(*apr_sock),
- socket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register((*apr_sock)->cntxt, (void *)(*apr_sock),
+ socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
-apr_status_t apr_put_os_sock(apr_socket_t **sock, apr_os_sock_t *thesock, apr_pool_t *cont)
+apr_status_t apr_os_sock_put(apr_socket_t **sock, apr_os_sock_t *thesock, apr_pool_t *cont)
{
if (cont == NULL) {
return APR_ENOPOOL;
1.43 +16 -16 apr/network_io/unix/poll.c
Index: poll.c
===================================================================
RCS file: /home/cvs/apr/network_io/unix/poll.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- poll.c 2000/12/30 18:31:36 1.42
+++ poll.c 2001/02/08 07:44:56 1.43
@@ -57,7 +57,7 @@
#ifdef HAVE_POLL /* We can just use poll to do our socket polling. */
-apr_status_t apr_setup_poll(apr_pollfd_t **new, apr_int32_t num, apr_pool_t *cont)
+apr_status_t apr_poll_setup(apr_pollfd_t **new, apr_int32_t num, apr_pool_t *cont)
{
(*new) = (apr_pollfd_t *)apr_pcalloc(cont, sizeof(apr_pollfd_t));
if ((*new) == NULL) {
@@ -115,7 +115,7 @@
return rv;
}
-apr_status_t apr_add_poll_socket(apr_pollfd_t *aprset,
+apr_status_t apr_poll_socket_add(apr_pollfd_t *aprset,
apr_socket_t *sock, apr_int16_t event)
{
int i = 0;
@@ -153,7 +153,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_revents(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
+apr_status_t apr_poll_revents_get(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
{
int i = 0;
@@ -167,7 +167,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_mask_poll_socket(apr_pollfd_t *aprset,
+apr_status_t apr_poll_socket_mask(apr_pollfd_t *aprset,
apr_socket_t *sock, apr_int16_t events)
{
apr_int16_t newevents;
@@ -187,7 +187,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_remove_poll_socket(apr_pollfd_t *aprset, apr_socket_t *sock)
+apr_status_t apr_poll_socket_remove(apr_pollfd_t *aprset, apr_socket_t *sock)
{
int i = 0;
while(i < aprset->curpos && aprset->pollset[i].fd != sock->socketdes) {
@@ -204,7 +204,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_clear_poll_sockets(apr_pollfd_t *aprset, apr_int16_t events)
+apr_status_t apr_poll_socket_clear(apr_pollfd_t *aprset, apr_int16_t events)
{
int i = 0;
apr_int16_t newevents;
@@ -222,7 +222,7 @@
#else /* Use select to mimic poll */
-apr_status_t apr_setup_poll(apr_pollfd_t **new, apr_int32_t num, apr_pool_t *cont)
+apr_status_t apr_poll_setup(apr_pollfd_t **new, apr_int32_t num, apr_pool_t *cont)
{
(*new) = (apr_pollfd_t *)apr_pcalloc(cont, sizeof(apr_pollfd_t) * num);
if ((*new) == NULL) {
@@ -239,7 +239,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_add_poll_socket(apr_pollfd_t *aprset,
+apr_status_t apr_poll_socket_add(apr_pollfd_t *aprset,
apr_socket_t *sock, apr_int16_t event)
{
if (event & APR_POLLIN) {
@@ -257,7 +257,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_mask_poll_socket(apr_pollfd_t *aprset,
+apr_status_t apr_poll_socket_mask(apr_pollfd_t *aprset,
apr_socket_t *sock,
apr_int16_t events)
{
@@ -301,7 +301,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_revents(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
+apr_status_t apr_poll_revents_get(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset)
{
apr_int16_t revents = 0;
char data[1];
@@ -348,7 +348,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_remove_poll_socket(apr_pollfd_t *aprset, apr_socket_t *sock)
+apr_status_t apr_poll_socket_remove(apr_pollfd_t *aprset, apr_socket_t *sock)
{
FD_CLR(sock->socketdes, aprset->read);
FD_CLR(sock->socketdes, aprset->except);
@@ -356,7 +356,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_clear_poll_sockets(apr_pollfd_t *aprset, apr_int16_t event)
+apr_status_t apr_poll_socket_clear(apr_pollfd_t *aprset, apr_int16_t event)
{
if (event & APR_POLLIN) {
FD_ZERO(aprset->read);
@@ -373,15 +373,15 @@
#endif
-apr_status_t apr_get_polldata(apr_pollfd_t *pollfd, const char *key, void *data)
+apr_status_t apr_poll_data_get(apr_pollfd_t *pollfd, const char *key, void *data)
{
- return apr_get_userdata(data, key, pollfd->cntxt);
+ return apr_pool_userdata_get(data, key, pollfd->cntxt);
}
-apr_status_t apr_set_polldata(apr_pollfd_t *pollfd, void *data, const char *key,
+apr_status_t apr_poll_data_set(apr_pollfd_t *pollfd, void *data, const char *key,
apr_status_t (*cleanup) (void *))
{
- return apr_set_userdata(data, key, cleanup, pollfd->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, pollfd->cntxt);
}
#if APR_FILES_AS_SOCKETS
1.26 +7 -7 apr/network_io/unix/sa_common.c
Index: sa_common.c
===================================================================
RCS file: /home/cvs/apr/network_io/unix/sa_common.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- sa_common.c 2001/02/05 05:19:22 1.25
+++ sa_common.c 2001/02/08 07:44:57 1.26
@@ -70,7 +70,7 @@
#include <stdlib.h>
#endif
-APR_DECLARE(apr_status_t) apr_set_port(apr_sockaddr_t *sockaddr,
+APR_DECLARE(apr_status_t) apr_sockaddr_port_set(apr_sockaddr_t *sockaddr,
apr_port_t port)
{
/* XXX IPv6: assumes sin_port and sin6_port at same offset */
@@ -79,10 +79,10 @@
}
/* XXX assumes IPv4... I don't think this function is needed anyway
- * since we have apr_getaddrinfo(), but we need to clean up Apache's
+ * since we have apr_sockaddr_info_get(), but we need to clean up Apache's
* listen.c a bit more first.
*/
-APR_DECLARE(apr_status_t) apr_set_ipaddr(apr_sockaddr_t *sockaddr,
+APR_DECLARE(apr_status_t) apr_sockaddr_ip_set(apr_sockaddr_t *sockaddr,
const char *addr)
{
apr_uint32_t ipaddr;
@@ -105,7 +105,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_port(apr_port_t *port,
+APR_DECLARE(apr_status_t) apr_sockaddr_port_get(apr_port_t *port,
apr_sockaddr_t *sockaddr)
{
/* XXX IPv6 - assumes sin_port and sin6_port at same offset */
@@ -113,7 +113,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_ipaddr(char **addr,
+APR_DECLARE(apr_status_t) apr_sockaddr_ip_get(char **addr,
apr_sockaddr_t *sockaddr)
{
*addr = apr_palloc(sockaddr->pool, sockaddr->addr_str_len);
@@ -154,7 +154,7 @@
#endif
}
-APR_DECLARE(apr_status_t) apr_get_sockaddr(apr_sockaddr_t **sa,
+APR_DECLARE(apr_status_t) apr_socket_addr_get(apr_sockaddr_t **sa,
apr_interface_e which,
apr_socket_t *sock)
{
@@ -303,7 +303,7 @@
}
#endif
-APR_DECLARE(apr_status_t) apr_getaddrinfo(apr_sockaddr_t **sa,
+APR_DECLARE(apr_status_t) apr_sockaddr_info_get(apr_sockaddr_t **sa,
const char *hostname,
apr_int32_t family, apr_port_t port,
apr_int32_t flags, apr_pool_t *p)
1.70 +16 -16 apr/network_io/unix/sockets.c
Index: sockets.c
===================================================================
RCS file: /home/cvs/apr/network_io/unix/sockets.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- sockets.c 2001/01/25 12:13:33 1.69
+++ sockets.c 2001/02/08 07:44:57 1.70
@@ -121,7 +121,7 @@
(*new)->remote_addr->pool = p;
}
-apr_status_t apr_create_socket(apr_socket_t **new, int ofamily, int type,
+apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
apr_pool_t *cont)
{
int family = ofamily;
@@ -155,8 +155,8 @@
set_socket_vars(*new, family);
(*new)->timeout = -1;
- apr_register_cleanup((*new)->cntxt, (void *)(*new),
- socket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new),
+ socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -165,9 +165,9 @@
return (shutdown(thesocket->socketdes, how) == -1) ? errno : APR_SUCCESS;
}
-apr_status_t apr_close_socket(apr_socket_t *thesocket)
+apr_status_t apr_socket_close(apr_socket_t *thesocket)
{
- apr_kill_cleanup(thesocket->cntxt, thesocket, socket_cleanup);
+ apr_pool_cleanup_kill(thesocket->cntxt, thesocket, socket_cleanup);
return socket_cleanup(thesocket);
}
@@ -241,8 +241,8 @@
(*new)->local_interface_unknown = 1;
}
- apr_register_cleanup((*new)->cntxt, (void *)(*new),
- socket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new),
+ socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -283,24 +283,24 @@
}
}
-apr_status_t apr_get_socketdata(void **data, const char *key, apr_socket_t *sock)
+apr_status_t apr_socket_data_get(void **data, const char *key, apr_socket_t *sock)
{
- return apr_get_userdata(data, key, sock->cntxt);
+ return apr_pool_userdata_get(data, key, sock->cntxt);
}
-apr_status_t apr_set_socketdata(apr_socket_t *sock, void *data, const char *key,
+apr_status_t apr_socket_data_set(apr_socket_t *sock, void *data, const char *key,
apr_status_t (*cleanup) (void *))
{
- return apr_set_userdata(data, key, cleanup, sock->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, sock->cntxt);
}
-apr_status_t apr_get_os_sock(apr_os_sock_t *thesock, apr_socket_t *sock)
+apr_status_t apr_os_sock_get(apr_os_sock_t *thesock, apr_socket_t *sock)
{
*thesock = sock->socketdes;
return APR_SUCCESS;
}
-apr_status_t apr_make_os_sock(apr_socket_t **apr_sock,
+apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,
apr_os_sock_info_t *os_sock_info,
apr_pool_t *cont)
{
@@ -325,13 +325,13 @@
(*apr_sock)->remote_addr->salen);
}
- apr_register_cleanup((*apr_sock)->cntxt, (void *)(*apr_sock),
- socket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register((*apr_sock)->cntxt, (void *)(*apr_sock),
+ socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
-apr_status_t apr_put_os_sock(apr_socket_t **sock, apr_os_sock_t *thesock,
+apr_status_t apr_os_sock_put(apr_socket_t **sock, apr_os_sock_t *thesock,
apr_pool_t *cont)
{
if ((*sock) == NULL) {
1.24 +11 -11 apr/network_io/win32/poll.c
Index: poll.c
===================================================================
RCS file: /home/cvs/apr/network_io/win32/poll.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- poll.c 2001/01/18 20:07:33 1.23
+++ poll.c 2001/02/08 07:44:57 1.24
@@ -60,7 +60,7 @@
#include <time.h>
-APR_DECLARE(apr_status_t) apr_setup_poll(apr_pollfd_t **new, apr_int32_t num,
+APR_DECLARE(apr_status_t) apr_poll_setup(apr_pollfd_t **new, apr_int32_t num,
apr_pool_t *cont)
{
(*new) = (apr_pollfd_t *)apr_palloc(cont, sizeof(apr_pollfd_t) * num);
@@ -80,7 +80,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_add_poll_socket(apr_pollfd_t *aprset,
+APR_DECLARE(apr_status_t) apr_poll_socket_add(apr_pollfd_t *aprset,
apr_socket_t *sock,
apr_int16_t event)
{
@@ -142,7 +142,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_revents(apr_int16_t *event,
+APR_DECLARE(apr_status_t) apr_poll_revents_get(apr_int16_t *event,
apr_socket_t *sock,
apr_pollfd_t *aprset)
{
@@ -198,20 +198,20 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_polldata(apr_pollfd_t *pollfd,
+APR_DECLARE(apr_status_t) apr_poll_data_get(apr_pollfd_t *pollfd,
const char *key, void *data)
{
- return apr_get_userdata(data, key, pollfd->cntxt);
+ return apr_pool_userdata_get(data, key, pollfd->cntxt);
}
-APR_DECLARE(apr_status_t) apr_set_polldata(apr_pollfd_t *pollfd, void *data,
+APR_DECLARE(apr_status_t) apr_poll_data_set(apr_pollfd_t *pollfd, void *data,
const char *key,
apr_status_t (*cleanup)(void *))
{
- return apr_set_userdata(data, key, cleanup, pollfd->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, pollfd->cntxt);
}
-APR_DECLARE(apr_status_t) apr_mask_poll_socket(apr_pollfd_t *aprset,
+APR_DECLARE(apr_status_t) apr_poll_socket_mask(apr_pollfd_t *aprset,
apr_socket_t *sock,
apr_int16_t events)
{
@@ -230,13 +230,13 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_remove_poll_socket(apr_pollfd_t *aprset,
+APR_DECLARE(apr_status_t) apr_poll_socket_remove(apr_pollfd_t *aprset,
apr_socket_t *sock)
{
- return apr_mask_poll_socket(aprset, sock, ~0);
+ return apr_poll_socket_mask(aprset, sock, ~0);
}
-APR_DECLARE(apr_status_t) apr_clear_poll_sockets(apr_pollfd_t *aprset,
+APR_DECLARE(apr_status_t) apr_poll_socket_clear(apr_pollfd_t *aprset,
apr_int16_t events)
{
if (events & APR_POLLIN) {
1.50 +16 -16 apr/network_io/win32/sockets.c
Index: sockets.c
===================================================================
RCS file: /home/cvs/apr/network_io/win32/sockets.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- sockets.c 2001/01/18 20:07:34 1.49
+++ sockets.c 2001/02/08 07:44:58 1.50
@@ -112,7 +112,7 @@
sizeof(apr_sockaddr_t));
}
-APR_DECLARE(apr_status_t) apr_create_socket(apr_socket_t **new, int ofamily,
+APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new, int ofamily,
int type, apr_pool_t *cont)
{
int family = ofamily;
@@ -153,8 +153,8 @@
(*new)->timeout = -1;
(*new)->disconnected = 0;
- apr_register_cleanup((*new)->cntxt, (void *)(*new),
- socket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new),
+ socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -186,9 +186,9 @@
}
}
-APR_DECLARE(apr_status_t) apr_close_socket(apr_socket_t *thesocket)
+APR_DECLARE(apr_status_t) apr_socket_close(apr_socket_t *thesocket)
{
- apr_kill_cleanup(thesocket->cntxt, thesocket, socket_cleanup);
+ apr_pool_cleanup_kill(thesocket->cntxt, thesocket, socket_cleanup);
return socket_cleanup(thesocket);
}
@@ -260,8 +260,8 @@
(*new)->local_interface_unknown = 1;
}
- apr_register_cleanup((*new)->cntxt, (void *)(*new),
- socket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register((*new)->cntxt, (void *)(*new),
+ socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -299,27 +299,27 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_socketdata(void **data, const char *key,
+APR_DECLARE(apr_status_t) apr_socket_data_get(void **data, const char *key,
apr_socket_t *socket)
{
- return apr_get_userdata(data, key, socket->cntxt);
+ return apr_pool_userdata_get(data, key, socket->cntxt);
}
-APR_DECLARE(apr_status_t) apr_set_socketdata(apr_socket_t *socket, void *data,
+APR_DECLARE(apr_status_t) apr_socket_data_set(apr_socket_t *socket, void *data,
const char *key,
apr_status_t (*cleanup)(void *))
{
- return apr_set_userdata(data, key, cleanup, socket->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, socket->cntxt);
}
-APR_DECLARE(apr_status_t) apr_get_os_sock(apr_os_sock_t *thesock,
+APR_DECLARE(apr_status_t) apr_os_sock_get(apr_os_sock_t *thesock,
apr_socket_t *sock)
{
*thesock = sock->sock;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_make_os_sock(apr_socket_t **apr_sock,
+APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
apr_os_sock_info_t *os_sock_info,
apr_pool_t *cont)
{
@@ -344,13 +344,13 @@
(*apr_sock)->remote_addr->pool = cont;
}
- apr_register_cleanup((*apr_sock)->cntxt, (void *)(*apr_sock),
- socket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register((*apr_sock)->cntxt, (void *)(*apr_sock),
+ socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_put_os_sock(apr_socket_t **sock,
+APR_DECLARE(apr_status_t) apr_os_sock_put(apr_socket_t **sock,
apr_os_sock_t *thesock,
apr_pool_t *cont)
{
1.10 +2 -2 apr/passwd/apr_getpass.c
Index: apr_getpass.c
===================================================================
RCS file: /home/cvs/apr/passwd/apr_getpass.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- apr_getpass.c 2001/01/28 08:18:31 1.9
+++ apr_getpass.c 2001/02/08 07:44:59 1.10
@@ -52,7 +52,7 @@
* <http://www.apache.org/>.
*/
-/* apr_getpass.c: abstraction to provide for obtaining a password from the
+/* apr_password_get.c: abstraction to provide for obtaining a password from the
* command line in whatever way the OS supports. In the best case, it's a
* wrapper for the system library's getpass() routine; otherwise, we
* use one we define ourselves.
@@ -212,7 +212,7 @@
* but the caller is *not* made aware of it.
*/
-APR_DECLARE(apr_status_t) apr_getpass(const char *prompt, char *pwbuf, size_t *bufsiz)
+APR_DECLARE(apr_status_t) apr_password_get(const char *prompt, char *pwbuf, size_t *bufsiz)
{
char *pw_got = NULL;
int result = 0;
1.7 +35 -35 apr/passwd/apr_md5.c
Index: apr_md5.c
===================================================================
RCS file: /home/cvs/apr/passwd/apr_md5.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- apr_md5.c 2000/12/20 16:20:18 1.6
+++ apr_md5.c 2001/02/08 07:44:59 1.7
@@ -86,7 +86,7 @@
*/
/*
- * The apr_MD5Encode() routine uses much code obtained from the FreeBSD 3.0
+ * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0
* MD5 crypt() function, which is licenced as follows:
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
@@ -146,7 +146,7 @@
};
#if APR_CHARSET_EBCDIC
-static apr_xlate_t *xlate_ebcdic_to_ascii; /* used in apr_MD5Encode() */
+static apr_xlate_t *xlate_ebcdic_to_ascii; /* used in apr_md5_encode() */
#endif
/* F, G, H and I are basic MD5 functions.
@@ -186,7 +186,7 @@
/* MD5 initialization. Begins an MD5 operation, writing a new context.
*/
-APR_DECLARE(apr_status_t) apr_MD5Init(apr_md5_ctx_t *context)
+APR_DECLARE(apr_status_t) apr_md5_init(apr_md5_ctx_t *context)
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants. */
@@ -205,7 +205,7 @@
* to be used for translating the content before calculating the
* digest.
*/
-APR_DECLARE(apr_status_t) apr_MD5SetXlate(apr_md5_ctx_t *context,
+APR_DECLARE(apr_status_t) apr_md5_set_xlate(apr_md5_ctx_t *context,
apr_xlate_t *xlate)
{
apr_status_t rv;
@@ -229,7 +229,7 @@
operation, processing another message block, and updating the
context.
*/
-APR_DECLARE(apr_status_t) apr_MD5Update(apr_md5_ctx_t *context,
+APR_DECLARE(apr_status_t) apr_md5_update(apr_md5_ctx_t *context,
const unsigned char *input,
unsigned int inputLen)
{
@@ -311,7 +311,7 @@
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context.
*/
-APR_DECLARE(apr_status_t) apr_MD5Final(unsigned char digest[MD5_DIGESTSIZE],
+APR_DECLARE(apr_status_t) apr_md5_final(unsigned char digest[MD5_DIGESTSIZE],
apr_md5_ctx_t *context)
{
unsigned char bits[8];
@@ -321,17 +321,17 @@
Encode(bits, context->count, 8);
#if APR_HAS_XLATE
- /* apr_MD5Update() should not translate for this final round. */
+ /* apr_md5_update() should not translate for this final round. */
context->xlate = NULL;
#endif /*APR_HAS_XLATE*/
/* Pad out to 56 mod 64. */
idx = (unsigned int) ((context->count[0] >> 3) & 0x3f);
padLen = (idx < 56) ? (56 - idx) : (120 - idx);
- apr_MD5Update(context, PADDING, padLen);
+ apr_md5_update(context, PADDING, padLen);
/* Append length (before padding) */
- apr_MD5Update(context, bits, 8);
+ apr_md5_update(context, bits, 8);
/* Store state in digest */
Encode(digest, context->state, MD5_DIGESTSIZE);
@@ -491,7 +491,7 @@
}
}
-APR_DECLARE(apr_status_t) apr_MD5Encode(const char *pw, const char *salt,
+APR_DECLARE(apr_status_t) apr_md5_encode(const char *pw, const char *salt,
char *result, size_t nbytes)
{
/*
@@ -536,36 +536,36 @@
/*
* 'Time to make the doughnuts..'
*/
- apr_MD5Init(&ctx);
+ apr_md5_init(&ctx);
#if APR_CHARSET_EBCDIC
- apr_MD5SetXlate(&ctx, xlate_ebcdic_to_ascii);
+ apr_md5_set_xlate(&ctx, xlate_ebcdic_to_ascii);
#endif
/*
* The password first, since that is what is most unknown
*/
- apr_MD5Update(&ctx, (unsigned char *)pw, strlen(pw));
+ apr_md5_update(&ctx, (unsigned char *)pw, strlen(pw));
/*
* Then our magic string
*/
- apr_MD5Update(&ctx, (unsigned char *)apr1_id, strlen(apr1_id));
+ apr_md5_update(&ctx, (unsigned char *)apr1_id, strlen(apr1_id));
/*
* Then the raw salt
*/
- apr_MD5Update(&ctx, (unsigned char *)sp, sl);
+ apr_md5_update(&ctx, (unsigned char *)sp, sl);
/*
* Then just as many characters of the MD5(pw, salt, pw)
*/
- apr_MD5Init(&ctx1);
- apr_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
- apr_MD5Update(&ctx1, (unsigned char *)sp, sl);
- apr_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
- apr_MD5Final(final, &ctx1);
+ apr_md5_init(&ctx1);
+ apr_md5_update(&ctx1, (unsigned char *)pw, strlen(pw));
+ apr_md5_update(&ctx1, (unsigned char *)sp, sl);
+ apr_md5_update(&ctx1, (unsigned char *)pw, strlen(pw));
+ apr_md5_final(final, &ctx1);
for (pl = strlen(pw); pl > 0; pl -= MD5_DIGESTSIZE) {
- apr_MD5Update(&ctx, final,
+ apr_md5_update(&ctx, final,
(pl > MD5_DIGESTSIZE) ? MD5_DIGESTSIZE : pl);
}
@@ -579,10 +579,10 @@
*/
for (i = strlen(pw); i != 0; i >>= 1) {
if (i & 1) {
- apr_MD5Update(&ctx, final, 1);
+ apr_md5_update(&ctx, final, 1);
}
else {
- apr_MD5Update(&ctx, (unsigned char *)pw, 1);
+ apr_md5_update(&ctx, (unsigned char *)pw, 1);
}
}
@@ -594,7 +594,7 @@
strncat(passwd, sp, sl);
strcat(passwd, "$");
- apr_MD5Final(final, &ctx);
+ apr_md5_final(final, &ctx);
/*
* And now, just to make sure things don't run too fast..
@@ -602,28 +602,28 @@
* need 30 seconds to build a 1000 entry dictionary...
*/
for (i = 0; i < 1000; i++) {
- apr_MD5Init(&ctx1);
+ apr_md5_init(&ctx1);
if (i & 1) {
- apr_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
+ apr_md5_update(&ctx1, (unsigned char *)pw, strlen(pw));
}
else {
- apr_MD5Update(&ctx1, final, MD5_DIGESTSIZE);
+ apr_md5_update(&ctx1, final, MD5_DIGESTSIZE);
}
if (i % 3) {
- apr_MD5Update(&ctx1, (unsigned char *)sp, sl);
+ apr_md5_update(&ctx1, (unsigned char *)sp, sl);
}
if (i % 7) {
- apr_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
+ apr_md5_update(&ctx1, (unsigned char *)pw, strlen(pw));
}
if (i & 1) {
- apr_MD5Update(&ctx1, final, MD5_DIGESTSIZE);
+ apr_md5_update(&ctx1, final, MD5_DIGESTSIZE);
}
else {
- apr_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
+ apr_md5_update(&ctx1, (unsigned char *)pw, strlen(pw));
}
- apr_MD5Final(final,&ctx1);
+ apr_md5_final(final,&ctx1);
}
p = passwd + strlen(passwd);
@@ -647,12 +647,12 @@
/*
* Validate a plaintext password against a smashed one. Use either
- * crypt() (if available) or apr_MD5Encode(), depending upon the format
+ * crypt() (if available) or apr_md5_encode(), depending upon the format
* of the smashed input password. Return APR_SUCCESS if they match, or
* APR_EMISMATCH if they don't.
*/
-APR_DECLARE(apr_status_t) apr_validate_password(const char *passwd,
+APR_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
const char *hash)
{
char sample[120];
@@ -663,7 +663,7 @@
/*
* The hash was created using our custom algorithm.
*/
- apr_MD5Encode(passwd, hash, sample, sizeof(sample));
+ apr_md5_encode(passwd, hash, sample, sizeof(sample));
}
else {
/*
1.9 +3 -3 apr/shmem/os2/shmem.c
Index: shmem.c
===================================================================
RCS file: /home/cvs/apr/shmem/os2/shmem.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- shmem.c 2001/01/28 15:30:29 1.8
+++ shmem.c 2001/02/08 07:44:59 1.9
@@ -121,7 +121,7 @@
-apr_status_t apr_get_shm_name(apr_shmem_t *c, apr_shm_name_t **name)
+apr_status_t apr_shm_name_get(apr_shmem_t *c, apr_shm_name_t **name)
{
*name = NULL;
return APR_ANONYMOUS;
@@ -129,14 +129,14 @@
-apr_status_t apr_set_shm_name(apr_shmem_t *c, apr_shm_name_t *name)
+apr_status_t apr_shm_name_set(apr_shmem_t *c, apr_shm_name_t *name)
{
return APR_ANONYMOUS;
}
-apr_status_t apr_open_shmem(struct shmem_t *m)
+apr_status_t apr_shm_open(struct shmem_t *m)
{
int rc;
1.19 +3 -3 apr/shmem/unix/shmem.c
Index: shmem.c
===================================================================
RCS file: /home/cvs/apr/shmem/unix/shmem.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- shmem.c 2001/01/06 17:07:45 1.18
+++ shmem.c 2001/02/08 07:45:00 1.19
@@ -110,7 +110,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_shm_name(apr_shmem_t *c, apr_shm_name_t **name)
+apr_status_t apr_shm_name_get(apr_shmem_t *c, apr_shm_name_t **name)
{
#if APR_USES_ANONYMOUS_SHM
*name = NULL;
@@ -125,7 +125,7 @@
#endif
}
-apr_status_t apr_set_shm_name(apr_shmem_t *c, apr_shm_name_t *name)
+apr_status_t apr_shm_name_set(apr_shmem_t *c, apr_shm_name_t *name)
{
#if APR_USES_ANONYMOUS_SHM
return APR_ANONYMOUS;
@@ -139,7 +139,7 @@
#endif
}
-apr_status_t apr_open_shmem(struct shmem_t *c)
+apr_status_t apr_shm_open(struct shmem_t *c)
{
#if APR_USES_ANONYMOUS_SHM
1.9 +1 -1 apr/strings/apr_snprintf.c
Index: apr_snprintf.c
===================================================================
RCS file: /home/cvs/apr/strings/apr_snprintf.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- apr_snprintf.c 2000/12/16 02:06:47 1.8
+++ apr_snprintf.c 2001/02/08 07:45:01 1.9
@@ -499,7 +499,7 @@
/* XXX IPv6: this assumes sin_port and sin6_port are at same offset */
p = conv_10(ntohs(sa->sa.sin.sin_port), TRUE, &is_negative, p, &sub_len);
*--p = ':';
- apr_get_ipaddr(&ipaddr_str, sa);
+ apr_sockaddr_ip_get(&ipaddr_str, sa);
sub_len = strlen(ipaddr_str);
#if APR_HAVE_IPV6
if (sa->sa.sin.sin_family == APR_INET6 &&
1.12 +1 -1 apr/tables/apr_hash.c
Index: apr_hash.c
===================================================================
RCS file: /home/cvs/apr/tables/apr_hash.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- apr_hash.c 2001/01/11 08:37:50 1.11
+++ apr_hash.c 2001/02/08 07:45:02 1.12
@@ -127,7 +127,7 @@
return apr_pcalloc(ht->pool, sizeof(*ht->array) * (max + 1));
}
-APR_DECLARE(apr_hash_t *) apr_make_hash(apr_pool_t *pool)
+APR_DECLARE(apr_hash_t *) apr_hash_make(apr_pool_t *pool)
{
apr_hash_t *ht;
ht = apr_palloc(pool, sizeof(apr_hash_t));
1.11 +14 -14 apr/tables/apr_tables.c
Index: apr_tables.c
===================================================================
RCS file: /home/cvs/apr/tables/apr_tables.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- apr_tables.c 2001/01/20 11:34:32 1.10
+++ apr_tables.c 2001/02/08 07:45:02 1.11
@@ -107,7 +107,7 @@
res->nalloc = nelts; /* ...but this many allocated */
}
-APR_DECLARE(apr_array_header_t *) apr_make_array(apr_pool_t *p,
+APR_DECLARE(apr_array_header_t *) apr_array_make(apr_pool_t *p,
int nelts, int elt_size)
{
apr_array_header_t *res;
@@ -117,7 +117,7 @@
return res;
}
-APR_DECLARE(void *) apr_push_array(apr_array_header_t *arr)
+APR_DECLARE(void *) apr_array_push(apr_array_header_t *arr)
{
if (arr->nelts == arr->nalloc) {
int new_size = (arr->nalloc <= 0) ? 1 : arr->nalloc * 2;
@@ -159,10 +159,10 @@
dst->nelts += src->nelts;
}
-APR_DECLARE(apr_array_header_t *) apr_copy_array(apr_pool_t *p,
+APR_DECLARE(apr_array_header_t *) apr_array_copy(apr_pool_t *p,
const apr_array_header_t *arr)
{
- apr_array_header_t *res = apr_make_array(p, arr->nalloc, arr->elt_size);
+ apr_array_header_t *res = apr_array_make(p, arr->nalloc, arr->elt_size);
memcpy(res->elts, arr->elts, arr->elt_size * arr->nelts);
res->nelts = arr->nelts;
@@ -186,7 +186,7 @@
}
APR_DECLARE(apr_array_header_t *)
- apr_copy_array_hdr(apr_pool_t *p,
+ apr_array_copy_hdr(apr_pool_t *p,
const apr_array_header_t *arr)
{
apr_array_header_t *res;
@@ -200,11 +200,11 @@
/* The above is used here to avoid consing multiple new array bodies... */
APR_DECLARE(apr_array_header_t *)
- apr_append_arrays(apr_pool_t *p,
+ apr_array_append(apr_pool_t *p,
const apr_array_header_t *first,
const apr_array_header_t *second)
{
- apr_array_header_t *res = apr_copy_array_hdr(p, first);
+ apr_array_header_t *res = apr_array_copy_hdr(p, first);
apr_array_cat(res, second);
return res;
@@ -286,14 +286,14 @@
if (t->a.nelts == t->a.nalloc) {
return NULL;
}
- return (apr_table_entry_t *) apr_push_array(&t->a);
+ return (apr_table_entry_t *) apr_array_push(&t->a);
}
#else /* MAKE_TABLE_PROFILE */
-#define table_push(t) ((apr_table_entry_t *) apr_push_array(&(t)->a))
+#define table_push(t) ((apr_table_entry_t *) apr_array_push(&(t)->a))
#endif /* MAKE_TABLE_PROFILE */
-APR_DECLARE(apr_table_t *) apr_make_table(apr_pool_t *p, int nelts)
+APR_DECLARE(apr_table_t *) apr_table_make(apr_pool_t *p, int nelts)
{
apr_table_t *t = apr_palloc(p, sizeof(apr_table_t));
@@ -304,7 +304,7 @@
return t;
}
-APR_DECLARE(apr_table_t *) apr_copy_table(apr_pool_t *p, const apr_table_t *t)
+APR_DECLARE(apr_table_t *) apr_table_copy(apr_pool_t *p, const apr_table_t *t)
{
apr_table_t *new = apr_palloc(p, sizeof(apr_table_t));
@@ -323,7 +323,7 @@
return new;
}
-APR_DECLARE(void) apr_clear_table(apr_table_t *t)
+APR_DECLARE(void) apr_table_clear(apr_table_t *t)
{
t->a.nelts = 0;
}
@@ -534,7 +534,7 @@
elts->val = (char *)val;
}
-APR_DECLARE(apr_table_t *) apr_overlay_tables(apr_pool_t *p,
+APR_DECLARE(apr_table_t *) apr_table_overlay(apr_pool_t *p,
const apr_table_t *overlay,
const apr_table_t *base)
{
@@ -665,7 +665,7 @@
#define APR_OVERLAP_TABLES_ON_STACK (512)
#endif
-APR_DECLARE(void) apr_overlap_tables(apr_table_t *a, const apr_table_t *b,
+APR_DECLARE(void) apr_table_overlap(apr_table_t *a, const apr_table_t *b,
unsigned flags)
{
overlap_key cat_keys_buf[APR_OVERLAP_TABLES_ON_STACK];
1.9 +3 -3 apr/test/abc.c
Index: abc.c
===================================================================
RCS file: /home/cvs/apr/test/abc.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- abc.c 2000/08/02 05:26:36 1.8
+++ abc.c 2001/02/08 07:45:04 1.9
@@ -11,12 +11,12 @@
int status = 0;
apr_pool_t *context;
- apr_create_pool(&context, NULL);
+ apr_pool_create(&context, NULL);
- apr_open(&fd, argv[1], APR_READ, -1, context);
+ apr_file_open(&fd, argv[1], APR_READ, -1, context);
while (!status) {
- status = apr_getc(&ch, fd);
+ status = apr_file_getc(&ch, fd);
if (status == APR_EOF )
fprintf(stdout, "EOF, YEAH!!!!!!!!!\n");
else if (status == APR_SUCCESS)
1.25 +16 -16 apr/test/client.c
Index: client.c
===================================================================
RCS file: /home/cvs/apr/test/client.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- client.c 2001/01/23 19:56:14 1.24
+++ client.c 2001/02/08 07:45:05 1.25
@@ -98,14 +98,14 @@
atexit(closeapr);
fprintf(stdout, "Creating context.......");
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Something went wrong\n");
exit(-1);
}
fprintf(stdout, "OK\n");
fprintf(stdout,"\tClient: Making socket address...............");
- if ((stat = apr_getaddrinfo(&remote_sa, dest, APR_UNSPEC, 8021, 0, context))
+ if ((stat = apr_sockaddr_info_get(&remote_sa, dest, APR_UNSPEC, 8021, 0, context))
!= APR_SUCCESS) {
fprintf(stdout, "Failed!\n");
fprintf(stdout, "Address resolution failed for %s: %s\n",
@@ -115,7 +115,7 @@
fprintf(stdout,"OK\n");
fprintf(stdout, "\tClient: Creating new socket.......");
- if (apr_create_socket(&sock, remote_sa->sa.sin.sin_family, SOCK_STREAM,
+ if (apr_socket_create(&sock, remote_sa->sa.sin.sin_family, SOCK_STREAM,
context) != APR_SUCCESS) {
fprintf(stderr, "Couldn't create socket\n");
exit(-1);
@@ -127,7 +127,7 @@
stat = apr_connect(sock, remote_sa);
if (stat != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Could not connect: %s (%d)\n",
apr_strerror(stat, msgbuf, sizeof(msgbuf)), stat);
fflush(stderr);
@@ -138,25 +138,25 @@
if (read_timeout == -1) {
fprintf(stdout, "\tClient: Setting socket option NONBLOCK.......");
if (apr_setsocketopt(sock, APR_SO_NONBLOCK, 1) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Couldn't set socket option\n");
exit(-1);
}
fprintf(stdout, "OK\n");
}
- apr_get_sockaddr(&remote_sa, APR_REMOTE, sock);
- apr_get_ipaddr(&remote_ipaddr, remote_sa);
- apr_get_port(&remote_port, remote_sa);
- apr_get_sockaddr(&local_sa, APR_LOCAL, sock);
- apr_get_ipaddr(&local_ipaddr, local_sa);
- apr_get_port(&local_port, local_sa);
+ apr_socket_addr_get(&remote_sa, APR_REMOTE, sock);
+ apr_sockaddr_ip_get(&remote_ipaddr, remote_sa);
+ apr_sockaddr_port_get(&remote_port, remote_sa);
+ apr_socket_addr_get(&local_sa, APR_LOCAL, sock);
+ apr_sockaddr_ip_get(&local_ipaddr, local_sa);
+ apr_sockaddr_port_get(&local_port, local_sa);
fprintf(stdout, "\tClient socket: %s:%u -> %s:%u\n", local_ipaddr, local_port, remote_ipaddr, remote_port);
fprintf(stdout, "\tClient: Trying to send data over socket.......");
length = STRLEN;
if (apr_send(sock, datasend, &length) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Problem sending data\n");
exit(-1);
}
@@ -176,13 +176,13 @@
fprintf(stdout, "\tClient: Trying to receive data over socket.......");
if ((stat = apr_recv(sock, datarecv, &length)) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Problem receiving data: %s (%d)\n",
apr_strerror(stat, msgbuf, sizeof(msgbuf)), stat);
exit(-1);
}
if (strcmp(datarecv, "Recv data test")) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "I did not receive the correct data %s\n", datarecv);
exit(-1);
}
@@ -190,14 +190,14 @@
fprintf(stdout, "\tClient: Shutting down socket.......");
if (apr_shutdown(sock, APR_SHUTDOWN_WRITE) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Could not shutdown socket\n");
exit(-1);
}
fprintf(stdout, "OK\n");
fprintf(stdout, "\tClient: Closing down socket.......");
- if (apr_close_socket(sock) != APR_SUCCESS) {
+ if (apr_socket_close(sock) != APR_SUCCESS) {
fprintf(stderr, "Could not shutdown socket\n");
exit(-1);
}
1.9 +28 -28 apr/test/sendfile.c
Index: sendfile.c
===================================================================
RCS file: /home/cvs/apr/test/sendfile.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sendfile.c 2001/01/23 19:56:17 1.8
+++ sendfile.c 2001/02/08 07:45:05 1.9
@@ -110,18 +110,18 @@
atexit(closeapr);
- rv = apr_create_pool(p, NULL);
+ rv = apr_pool_create(p, NULL);
if (rv != APR_SUCCESS) {
- fprintf(stderr, "apr_create_pool()->%d/%s\n",
+ fprintf(stderr, "apr_pool_create()->%d/%s\n",
rv,
apr_strerror(rv, buf, sizeof buf));
exit(1);
}
*sock = NULL;
- rv = apr_create_socket(sock, *family, SOCK_STREAM, *p);
+ rv = apr_socket_create(sock, *family, SOCK_STREAM, *p);
if (rv != APR_SUCCESS) {
- fprintf(stderr, "apr_create_socket()->%d/%s\n",
+ fprintf(stderr, "apr_socket_create()->%d/%s\n",
rv,
apr_strerror(rv, buf, sizeof buf));
exit(1);
@@ -130,9 +130,9 @@
if (*family == APR_UNSPEC) {
apr_sockaddr_t *localsa;
- rv = apr_get_sockaddr(&localsa, APR_LOCAL, *sock);
+ rv = apr_socket_addr_get(&localsa, APR_LOCAL, *sock);
if (rv != APR_SUCCESS) {
- fprintf(stderr, "apr_get_sockaddr()->%d/%s\n",
+ fprintf(stderr, "apr_socket_addr_get()->%d/%s\n",
rv,
apr_strerror(rv, buf, sizeof buf));
exit(1);
@@ -150,11 +150,11 @@
apr_finfo_t finfo;
printf("Creating a test file...\n");
- rv = apr_open(&f, fname,
+ rv = apr_file_open(&f, fname,
APR_CREATE | APR_WRITE | APR_TRUNCATE | APR_BUFFERED,
APR_UREAD | APR_UWRITE, p);
if (rv) {
- fprintf(stderr, "apr_open()->%d/%s\n",
+ fprintf(stderr, "apr_file_open()->%d/%s\n",
rv, apr_strerror(rv, buf, sizeof buf));
exit(1);
}
@@ -162,35 +162,35 @@
buf[0] = FILE_DATA_CHAR;
buf[1] = '\0';
for (i = 0; i < FILE_LENGTH; i++) {
- /* exercise apr_putc() and apr_puts() on buffered files */
+ /* exercise apr_file_putc() and apr_file_puts() on buffered files */
if ((i % 2) == 0) {
- rv = apr_putc(buf[0], f);
+ rv = apr_file_putc(buf[0], f);
if (rv) {
- fprintf(stderr, "apr_putc()->%d/%s\n",
+ fprintf(stderr, "apr_file_putc()->%d/%s\n",
rv, apr_strerror(rv, buf, sizeof buf));
exit(1);
}
}
else {
- rv = apr_puts(buf, f);
+ rv = apr_file_puts(buf, f);
if (rv) {
- fprintf(stderr, "apr_puts()->%d/%s\n",
+ fprintf(stderr, "apr_file_puts()->%d/%s\n",
rv, apr_strerror(rv, buf, sizeof buf));
exit(1);
}
}
}
- rv = apr_close(f);
+ rv = apr_file_close(f);
if (rv) {
- fprintf(stderr, "apr_close()->%d/%s\n",
+ fprintf(stderr, "apr_file_close()->%d/%s\n",
rv, apr_strerror(rv, buf, sizeof buf));
exit(1);
}
rv = apr_stat(&finfo, fname, APR_FINFO_NORM, p);
if (rv) {
- fprintf(stderr, "apr_close()->%d/%s\n",
+ fprintf(stderr, "apr_file_close()->%d/%s\n",
rv, apr_strerror(rv, buf, sizeof buf));
exit(1);
}
@@ -230,17 +230,17 @@
apr_setup(&p, &sock, &family);
create_testfile(p, TESTFILE);
- rv = apr_open(&f, TESTFILE, APR_READ, 0, p);
+ rv = apr_file_open(&f, TESTFILE, APR_READ, 0, p);
if (rv != APR_SUCCESS) {
- fprintf(stderr, "apr_open()->%d/%s\n",
+ fprintf(stderr, "apr_file_open()->%d/%s\n",
rv,
apr_strerror(rv, buf, sizeof buf));
exit(1);
}
- rv = apr_getaddrinfo(&destsa, "127.0.0.1", family, TESTSF_PORT, 0, p);
+ rv = apr_sockaddr_info_get(&destsa, "127.0.0.1", family, TESTSF_PORT, 0, p);
if (rv != APR_SUCCESS) {
- fprintf(stderr, "apr_getaddrinfo()->%d/%s\n",
+ fprintf(stderr, "apr_sockaddr_info_get()->%d/%s\n",
rv,
apr_strerror(rv, buf, sizeof buf));
exit(1);
@@ -343,9 +343,9 @@
apr_size_t total_bytes_sent;
pfd = NULL;
- rv = apr_setup_poll(&pfd, 1, p);
+ rv = apr_poll_setup(&pfd, 1, p);
assert(!rv);
- rv = apr_add_poll_socket(pfd, sock, APR_POLLOUT);
+ rv = apr_poll_socket_add(pfd, sock, APR_POLLOUT);
assert(!rv);
total_bytes_sent = 0;
@@ -456,9 +456,9 @@
}
current_file_offset = 0;
- rv = apr_seek(f, APR_CUR, ¤t_file_offset);
+ rv = apr_file_seek(f, APR_CUR, ¤t_file_offset);
if (rv != APR_SUCCESS) {
- fprintf(stderr, "apr_seek()->%d/%s\n",
+ fprintf(stderr, "apr_file_seek()->%d/%s\n",
rv,
apr_strerror(rv, buf, sizeof buf));
exit(1);
@@ -493,9 +493,9 @@
printf("client: apr_sendfile() worked as expected!\n");
- rv = apr_remove_file(TESTFILE, p);
+ rv = apr_file_remove(TESTFILE, p);
if (rv != APR_SUCCESS) {
- fprintf(stderr, "apr_remove_file()->%d/%s\n",
+ fprintf(stderr, "apr_file_remove()->%d/%s\n",
rv,
apr_strerror(rv, buf, sizeof buf));
exit(1);
@@ -527,9 +527,9 @@
exit(1);
}
- rv = apr_getaddrinfo(&localsa, NULL, family, TESTSF_PORT, 0, p);
+ rv = apr_sockaddr_info_get(&localsa, NULL, family, TESTSF_PORT, 0, p);
if (rv != APR_SUCCESS) {
- fprintf(stderr, "apr_getaddrinfo()->%d/%s\n",
+ fprintf(stderr, "apr_sockaddr_info_get()->%d/%s\n",
rv,
apr_strerror(rv, buf, sizeof buf));
exit(1);
1.26 +32 -32 apr/test/server.c
Index: server.c
===================================================================
RCS file: /home/cvs/apr/test/server.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- server.c 2001/01/23 19:56:18 1.25
+++ server.c 2001/02/08 07:45:05 1.26
@@ -95,13 +95,13 @@
atexit(closeapr);
fprintf(stdout, "Creating context.......");
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Could not create a context\n");
exit(-1);
}
fprintf(stdout, "OK\n");
- if (apr_initopt(&opt, context, argc, argv)) {
+ if (apr_getopt_init(&opt, context, argc, argv)) {
fprintf(stderr, "failed to initialize opts\n");
exit(-1);
}
@@ -125,7 +125,7 @@
* socket we need. We'll use the returned sockaddr later when
* we bind.
*/
- stat = apr_getaddrinfo(&localsa, bind_to_ipaddr, APR_UNSPEC, 8021, 0,
+ stat = apr_sockaddr_info_get(&localsa, bind_to_ipaddr, APR_UNSPEC, 8021, 0,
context);
if (stat != APR_SUCCESS) {
fprintf(stderr,
@@ -137,7 +137,7 @@
}
fprintf(stdout, "\tServer: Creating new socket.......");
- if (apr_create_socket(&sock, family, SOCK_STREAM, context) != APR_SUCCESS) {
+ if (apr_socket_create(&sock, family, SOCK_STREAM, context) != APR_SUCCESS) {
fprintf(stderr, "Couldn't create socket\n");
exit(-1);
}
@@ -145,7 +145,7 @@
fprintf(stdout, "\tServer: Setting socket option NONBLOCK.......");
if (apr_setsocketopt(sock, APR_SO_NONBLOCK, 1) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Couldn't set socket option\n");
exit(-1);
}
@@ -153,20 +153,20 @@
fprintf(stdout, "\tServer: Setting socket option REUSEADDR.......");
if (apr_setsocketopt(sock, APR_SO_REUSEADDR, 1) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Couldn't set socket option\n");
exit(-1);
}
fprintf(stdout, "OK\n");
if (!localsa) {
- apr_get_sockaddr(&localsa, APR_LOCAL, sock);
- apr_set_port(localsa, 8021);
+ apr_socket_addr_get(&localsa, APR_LOCAL, sock);
+ apr_sockaddr_port_set(localsa, 8021);
}
fprintf(stdout, "\tServer: Binding socket to port.......");
if ((stat = apr_bind(sock, localsa)) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Could not bind: %s\n",
apr_strerror(stat, buf, sizeof buf));
exit(-1);
@@ -175,26 +175,26 @@
fprintf(stdout, "\tServer: Listening to socket.......");
if (apr_listen(sock, 5) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Could not listen\n");
exit(-1);
}
fprintf(stdout, "OK\n");
fprintf(stdout, "\tServer: Setting up socket for polling.......");
- apr_setup_poll(&sdset, 1, context);
- apr_add_poll_socket(sdset, sock, APR_POLLIN);
+ apr_poll_setup(&sdset, 1, context);
+ apr_poll_socket_add(sdset, sock, APR_POLLIN);
fprintf(stdout, "OK\n");
fprintf(stdout, "\tServer: Beginning to poll for socket.......");
rv = 1;
if (apr_poll(sdset, &rv, -1) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Select caused an error\n");
exit(-1);
}
else if (rv == 0) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "I should not return until rv == 1\n");
exit(-1);
}
@@ -202,31 +202,31 @@
fprintf(stdout, "\tServer: Accepting a connection.......");
if (apr_accept(&sock2, sock, context) != APR_SUCCESS) {
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr, "Could not accept connection.\n");
exit(-1);
}
fprintf(stdout, "OK\n");
- apr_get_sockaddr(&remotesa, APR_REMOTE, sock2);
- apr_get_ipaddr(&remote_ipaddr, remotesa);
- apr_get_port(&remote_port, remotesa);
- apr_get_sockaddr(&localsa, APR_LOCAL, sock2);
- apr_get_ipaddr(&local_ipaddr, localsa);
- apr_get_port(&local_port, localsa);
+ apr_socket_addr_get(&remotesa, APR_REMOTE, sock2);
+ apr_sockaddr_ip_get(&remote_ipaddr, remotesa);
+ apr_sockaddr_port_get(&remote_port, remotesa);
+ apr_socket_addr_get(&localsa, APR_LOCAL, sock2);
+ apr_sockaddr_ip_get(&local_ipaddr, localsa);
+ apr_sockaddr_port_get(&local_port, localsa);
fprintf(stdout, "\tServer socket: %s:%u -> %s:%u\n", local_ipaddr, local_port, remote_ipaddr, remote_port);
length = STRLEN;
fprintf(stdout, "\tServer: Trying to recv data from socket.......");
if (apr_recv(sock2, datasend, &length) != APR_SUCCESS) {
- apr_close_socket(sock);
- apr_close_socket(sock2);
+ apr_socket_close(sock);
+ apr_socket_close(sock2);
fprintf(stderr, "Problem recving data\n");
exit(-1);
}
if (strcmp(datasend, "Send data test")) {
- apr_close_socket(sock);
- apr_close_socket(sock2);
+ apr_socket_close(sock);
+ apr_socket_close(sock2);
fprintf(stderr, "I did not receive the correct data %s\n", datarecv);
exit(-1);
}
@@ -235,8 +235,8 @@
length = STRLEN;
fprintf(stdout, "\tServer: Sending data over socket.......");
if (apr_send(sock2, datarecv, &length) != APR_SUCCESS) {
- apr_close_socket(sock);
- apr_close_socket(sock2);
+ apr_socket_close(sock);
+ apr_socket_close(sock2);
fprintf(stderr, "Problem sending data\n");
exit(-1);
}
@@ -244,23 +244,23 @@
fprintf(stdout, "\tServer: Shutting down accepted socket.......");
if (apr_shutdown(sock2, APR_SHUTDOWN_READ) != APR_SUCCESS) {
- apr_close_socket(sock);
- apr_close_socket(sock2);
+ apr_socket_close(sock);
+ apr_socket_close(sock2);
fprintf(stderr, "Problem shutting down\n");
exit(-1);
}
fprintf(stdout, "OK\n");
fprintf(stdout, "\tServer: closing duplicate socket.......");
- if (apr_close_socket(sock2) != APR_SUCCESS) {
- apr_close_socket(sock);
+ if (apr_socket_close(sock2) != APR_SUCCESS) {
+ apr_socket_close(sock);
fprintf(stderr, "Problem closing down\n");
exit(-1);
}
fprintf(stdout, "OK\n");
fprintf(stdout, "\tServer: closing original socket.......");
- if (apr_close_socket(sock) != APR_SUCCESS) {
+ if (apr_socket_close(sock) != APR_SUCCESS) {
fprintf(stderr, "Problem closing down\n");
exit(-1);
}
1.20 +2 -2 apr/test/testargs.c
Index: testargs.c
===================================================================
RCS file: /home/cvs/apr/test/testargs.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- testargs.c 2001/01/23 19:56:20 1.19
+++ testargs.c 2001/02/08 07:45:05 1.20
@@ -87,9 +87,9 @@
apr_initialize();
atexit(closeapr);
- apr_create_pool(&context, NULL);
+ apr_pool_create(&context, NULL);
- if (apr_initopt(&opt, context, argc, argv))
+ if (apr_getopt_init(&opt, context, argc, argv))
{
printf("failed to initialize opts");
exit(1);
1.14 +3 -3 apr/test/testcontext.c
Index: testcontext.c
===================================================================
RCS file: /home/cvs/apr/test/testcontext.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- testcontext.c 2001/01/23 19:56:23 1.13
+++ testcontext.c 2001/02/08 07:45:05 1.14
@@ -85,16 +85,16 @@
}
atexit(closeapr);
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Couldn't allocate context.");
exit(-1);
}
testdata = apr_pstrdup(context, "This is a test\n");
- apr_set_userdata(testdata, "TEST", string_cleanup, context);
+ apr_pool_userdata_set(testdata, "TEST", string_cleanup, context);
- apr_get_userdata((void **)&retdata, "TEST", context);
+ apr_pool_userdata_get((void **)&retdata, "TEST", context);
if (!strcmp(testdata, retdata)) {
fprintf(stdout, "User data is working ok\n");
1.14 +1 -1 apr/test/testdso.c
Index: testdso.c
===================================================================
RCS file: /home/cvs/apr/test/testdso.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- testdso.c 2001/01/23 19:56:25 1.13
+++ testdso.c 2001/02/08 07:45:05 1.14
@@ -35,7 +35,7 @@
apr_initialize();
atexit(closeapr);
- if (apr_create_pool(&cont, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&cont, NULL) != APR_SUCCESS) {
fprintf(stderr, "Couldn't allocate context.");
exit(-1);
}
1.30 +61 -61 apr/test/testfile.c
Index: testfile.c
===================================================================
RCS file: /home/cvs/apr/test/testfile.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- testfile.c 2001/02/01 17:33:42 1.29
+++ testfile.c 2001/02/08 07:45:06 1.30
@@ -124,11 +124,11 @@
exit(-1);
}
atexit(closeapr);
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Couldn't allocate context.");
exit(-1);
}
- if (apr_create_pool(&cont2, context) != APR_SUCCESS) {
+ if (apr_pool_create(&cont2, context) != APR_SUCCESS) {
fprintf(stderr, "Couldn't allocate context.");
exit(-1);
}
@@ -136,7 +136,7 @@
fprintf(stdout, "Testing file functions.\n");
fprintf(stdout, "\tOpening file.......");
- status = apr_open(&thefile, filename, flag, APR_UREAD | APR_UWRITE | APR_GREAD, context);
+ status = apr_file_open(&thefile, filename, flag, APR_UREAD | APR_UWRITE | APR_GREAD, context);
if (status != APR_SUCCESS) {
fprintf(stderr, "Didn't open file: %d/%s\n", status,
apr_strerror(status, errmsg, sizeof errmsg));
@@ -151,7 +151,7 @@
fprintf(stderr, "Bad file des\n");
exit(-1);
}
- apr_get_filename(&str, thefile);
+ apr_file_name_get(&str, thefile);
if (strcmp(str, filename) != 0) {
fprintf(stderr, "wrong filename\n");
exit(-1);
@@ -163,9 +163,9 @@
fprintf(stdout, "\tWriting to file.......");
nbytes = strlen("this is a test");
- status = apr_write(thefile, "this is a test", &nbytes);
+ status = apr_file_write(thefile, "this is a test", &nbytes);
if (status != APR_SUCCESS) {
- fprintf(stderr, "something's wrong; apr_write->%d/%s\n",
+ fprintf(stderr, "something's wrong; apr_file_write->%d/%s\n",
status, apr_strerror(status, errmsg, sizeof errmsg));
exit(-1);
}
@@ -179,7 +179,7 @@
fprintf(stdout, "\tMoving to start of file.......");
zer = 0;
- status = apr_seek(thefile, SEEK_SET, &zer);
+ status = apr_file_seek(thefile, SEEK_SET, &zer);
if (status != APR_SUCCESS) {
fprintf(stderr, "couldn't seek to beginning of file: %d/%s",
status, apr_strerror(status, errmsg, sizeof errmsg));
@@ -201,8 +201,8 @@
fprintf(stdout, "OK\n");
fprintf(stdout, "\t\tChecking for incoming data.......");
- apr_setup_poll(&sdset, 1, context);
- apr_add_poll_socket(sdset, testsock, APR_POLLIN);
+ apr_poll_setup(&sdset, 1, context);
+ apr_poll_socket_add(sdset, testsock, APR_POLLIN);
num = 1;
if (apr_poll(sdset, &num, -1) != APR_SUCCESS) {
fprintf(stderr, "Select caused an error\n");
@@ -218,9 +218,9 @@
fprintf(stdout, "\tReading from the file.......");
nbytes = strlen("this is a test");
buf = (char *)apr_palloc(context, nbytes + 1);
- status = apr_read(thefile, buf, &nbytes);
+ status = apr_file_read(thefile, buf, &nbytes);
if (status != APR_SUCCESS) {
- fprintf(stderr, "apr_read()->%d/%s\n",
+ fprintf(stderr, "apr_file_read()->%d/%s\n",
status, apr_strerror(status, errmsg, sizeof errmsg));
exit(-1);
}
@@ -233,7 +233,7 @@
}
fprintf(stdout, "\tAdding user data to the file.......");
- status = apr_set_filedata(thefile, "This is a test", "test", apr_null_cleanup);
+ status = apr_file_data_set(thefile, "This is a test", "test", apr_pool_cleanup_null);
if (status != APR_SUCCESS) {
fprintf(stderr, "Couldn't add the data\n");
exit(-1);
@@ -243,7 +243,7 @@
}
fprintf(stdout, "\tGetting user data from the file.......");
- status = apr_get_filedata((void **)&teststr, "test", thefile);
+ status = apr_file_data_get((void **)&teststr, "test", thefile);
if (status != APR_SUCCESS || strcmp(teststr, "This is a test")) {
fprintf(stderr, "Couldn't get the data\n");
exit(-1);
@@ -253,7 +253,7 @@
}
fprintf(stdout, "\tGetting fileinfo.......");
- status = apr_getfileinfo(&finfo, APR_FINFO_NORM, thefile);
+ status = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
if (status == APR_INCOMPLETE) {
int i;
fprintf(stdout, "INCOMPLETE\n");
@@ -272,7 +272,7 @@
uid = finfo.user;
fprintf(stdout, "\tClosing File.......");
- status = apr_close(thefile);
+ status = apr_file_close(thefile);
if (status != APR_SUCCESS) {
fprintf(stderr, "Couldn't close the file\n");
exit(-1);
@@ -329,7 +329,7 @@
}
fprintf(stdout, "\tDeleting file.......");
- status = apr_remove_file(filename, context);
+ status = apr_file_remove(filename, context);
if (status != APR_SUCCESS) {
fprintf(stderr, "Couldn't delete the file\n");
exit(-1);
@@ -339,7 +339,7 @@
}
fprintf(stdout, "\tMaking sure it's gone.......");
- status = apr_open(&thefile, filename, APR_READ, APR_UREAD | APR_UWRITE | APR_GREAD, context);
+ status = apr_file_open(&thefile, filename, APR_READ, APR_UREAD | APR_UWRITE | APR_GREAD, context);
if (status == APR_SUCCESS) {
fprintf(stderr, "I could open the file for some reason?\n");
exit(-1);
@@ -352,7 +352,7 @@
test_filedel(context);
test_read(context);
- apr_destroy_pool(context);
+ apr_pool_destroy(context);
return 1;
}
@@ -362,20 +362,20 @@
apr_int32_t flag = APR_READ | APR_WRITE | APR_CREATE;
apr_status_t stat;
- stat = apr_open(&thefile, "testdel", flag, APR_UREAD | APR_UWRITE | APR_GREAD, context);
+ stat = apr_file_open(&thefile, "testdel", flag, APR_UREAD | APR_UWRITE | APR_GREAD, context);
if (stat != APR_SUCCESS) {
return stat;
}
- if ((stat = apr_close(thefile)) != APR_SUCCESS) {
+ if ((stat = apr_file_close(thefile)) != APR_SUCCESS) {
return stat;
}
- if ((stat = apr_remove_file("testdel", context)) != APR_SUCCESS) {
+ if ((stat = apr_file_remove("testdel", context)) != APR_SUCCESS) {
return stat;
}
- stat = apr_open(&thefile, "testdel", APR_READ, APR_UREAD | APR_UWRITE | APR_GREAD, context);
+ stat = apr_file_open(&thefile, "testdel", APR_READ, APR_UREAD | APR_UWRITE | APR_GREAD, context);
if (stat == APR_SUCCESS) {
return stat;
}
@@ -393,7 +393,7 @@
fprintf(stdout, "Testing Directory functions.\n");
fprintf(stdout, "\tMakeing Directory.......");
- if (apr_make_dir("testdir", APR_UREAD | APR_UWRITE | APR_UEXECUTE | APR_GREAD | APR_GWRITE | APR_GEXECUTE | APR_WREAD | APR_WWRITE | APR_WEXECUTE, context) != APR_SUCCESS) {
+ if (apr_dir_make("testdir", APR_UREAD | APR_UWRITE | APR_UEXECUTE | APR_GREAD | APR_GWRITE | APR_GEXECUTE | APR_WREAD | APR_WWRITE | APR_WEXECUTE, context) != APR_SUCCESS) {
fprintf(stderr, "Could not create directory\n");
return -1;
}
@@ -401,13 +401,13 @@
fprintf(stdout, "OK\n");
}
- if (apr_open(&file, "testdir/testfile", APR_READ | APR_WRITE | APR_CREATE, APR_UREAD | APR_UWRITE | APR_UEXECUTE, context) != APR_SUCCESS) {;
+ if (apr_file_open(&file, "testdir/testfile", APR_READ | APR_WRITE | APR_CREATE, APR_UREAD | APR_UWRITE | APR_UEXECUTE, context) != APR_SUCCESS) {;
return -1;
}
bytes = strlen("Another test!!!");
- apr_write(file, "Another test!!", &bytes);
- apr_close(file);
+ apr_file_write(file, "Another test!!", &bytes);
+ apr_file_close(file);
fprintf(stdout, "\tOpening Directory.......");
if (apr_dir_open(&temp, "testdir", context) != APR_SUCCESS) {
@@ -474,7 +474,7 @@
}
fprintf(stdout, "\tRemoving file from directory.......");
- if (apr_remove_file("testdir/testfile", context) != APR_SUCCESS) {
+ if (apr_file_remove("testdir/testfile", context) != APR_SUCCESS) {
fprintf(stderr, "Could not remove file\n");
return -1;
}
@@ -483,7 +483,7 @@
}
fprintf(stdout, "\tRemoving Directory.......");
- if (apr_remove_dir("testdir", context) != APR_SUCCESS) {
+ if (apr_dir_remove("testdir", context) != APR_SUCCESS) {
fprintf(stderr, "Could not remove directory\n");
return -1;
}
@@ -506,23 +506,23 @@
/* Create a test file with known content.
*/
- rv = apr_open(&f, fname, APR_CREATE | APR_WRITE | APR_TRUNCATE, APR_UREAD | APR_UWRITE, p);
+ rv = apr_file_open(&f, fname, APR_CREATE | APR_WRITE | APR_TRUNCATE, APR_UREAD | APR_UWRITE, p);
if (rv) {
- fprintf(stderr, "apr_open()->%d/%s\n",
+ fprintf(stderr, "apr_file_open()->%d/%s\n",
rv, apr_strerror(rv, buf, sizeof buf));
exit(1);
}
nbytes = 4;
- rv = apr_write(f, "abc\n", &nbytes);
+ rv = apr_file_write(f, "abc\n", &nbytes);
assert(!rv && nbytes == 4);
memset(buf, 'a', sizeof buf);
nbytes = sizeof buf;
- rv = apr_write(f, buf, &nbytes);
+ rv = apr_file_write(f, buf, &nbytes);
assert(!rv && nbytes == sizeof buf);
nbytes = 2;
- rv = apr_write(f, "\n\n", &nbytes);
+ rv = apr_file_write(f, "\n\n", &nbytes);
assert(!rv && nbytes == 2);
- rv = apr_close(f);
+ rv = apr_file_close(f);
assert(!rv);
}
@@ -537,11 +537,11 @@
bytes[0] = bytes[2] = 0x01;
if (counter % 2) {
- rv = apr_getc(bytes + 1, f);
+ rv = apr_file_getc(bytes + 1, f);
}
else {
nbytes = 1;
- rv = apr_read(f, bytes + 1, &nbytes);
+ rv = apr_file_read(f, bytes + 1, &nbytes);
assert(nbytes == 1);
}
assert(!rv);
@@ -560,23 +560,23 @@
char buf[1024];
int i;
- rv = apr_open(&f, fname, APR_READ | extra_flags, 0, p);
+ rv = apr_file_open(&f, fname, APR_READ | extra_flags, 0, p);
assert(!rv);
read_one(f, 'a');
read_one(f, 'b');
if (extra_flags & APR_BUFFERED) {
fprintf(stdout,
- "\n\t\tskipping apr_ungetc() for APR_BUFFERED... "
+ "\n\t\tskipping apr_file_ungetc() for APR_BUFFERED... "
"doesn't work yet...\n\t\t\t\t ");
}
else {
- rv = apr_ungetc('b', f);
+ rv = apr_file_ungetc('b', f);
assert(!rv);
/* Note: some implementations move the file ptr back;
* others just save up to one char; it isn't
* portable to unget more than once.
*/
- /* Don't do this: rv = apr_ungetc('a', f); */
+ /* Don't do this: rv = apr_file_ungetc('a', f); */
read_one(f, 'b');
}
read_one(f, 'c');
@@ -586,20 +586,20 @@
}
read_one(f, '\n');
read_one(f, '\n');
- rv = apr_getc(buf, f);
+ rv = apr_file_getc(buf, f);
assert(rv == APR_EOF);
- rv = apr_close(f);
+ rv = apr_file_close(f);
assert(!rv);
f = NULL;
- rv = apr_open(&f, fname, APR_READ | extra_flags, 0, p);
+ rv = apr_file_open(&f, fname, APR_READ | extra_flags, 0, p);
assert(!rv);
- rv = apr_fgets(buf, 10, f);
+ rv = apr_file_gets(buf, 10, f);
assert(!rv);
assert(!strcmp(buf, "abc\n"));
/* read first 800 of TESTREAD_BLKSIZE 'a's
*/
- rv = apr_fgets(buf, 801, f);
+ rv = apr_file_gets(buf, 801, f);
assert(!rv);
assert(strlen(buf) == 800);
for (i = 0; i < 800; i++) {
@@ -607,7 +607,7 @@
}
/* read rest of the 'a's and the first newline
*/
- rv = apr_fgets(buf, sizeof buf, f);
+ rv = apr_file_gets(buf, sizeof buf, f);
assert(!rv);
assert(strlen(buf) == TESTREAD_BLKSIZE - 800 + 1);
for (i = 0; i < TESTREAD_BLKSIZE - 800; i++) {
@@ -616,23 +616,23 @@
assert(buf[TESTREAD_BLKSIZE - 800] == '\n');
/* read the last newline
*/
- rv = apr_fgets(buf, sizeof buf, f);
+ rv = apr_file_gets(buf, sizeof buf, f);
assert(!rv);
assert(!strcmp(buf, "\n"));
/* get APR_EOF
*/
- rv = apr_fgets(buf, sizeof buf, f);
+ rv = apr_file_gets(buf, sizeof buf, f);
assert(rv == APR_EOF);
- /* get APR_EOF with apr_getc
+ /* get APR_EOF with apr_file_getc
*/
- rv = apr_getc(buf, f);
+ rv = apr_file_getc(buf, f);
assert(rv == APR_EOF);
- /* get APR_EOF with apr_read
+ /* get APR_EOF with apr_file_read
*/
nbytes = sizeof buf;
- rv = apr_read(f, buf, &nbytes);
+ rv = apr_file_read(f, buf, &nbytes);
assert(rv == APR_EOF);
- rv = apr_close(f);
+ rv = apr_file_close(f);
assert(!rv);
}
@@ -645,27 +645,27 @@
/* Create a test file with known content.
*/
- rv = apr_open(&f, fname, APR_CREATE | APR_WRITE | APR_TRUNCATE, APR_UREAD | APR_UWRITE, p);
+ rv = apr_file_open(&f, fname, APR_CREATE | APR_WRITE | APR_TRUNCATE, APR_UREAD | APR_UWRITE, p);
if (rv) {
- fprintf(stderr, "apr_open()->%d/%s\n",
+ fprintf(stderr, "apr_file_open()->%d/%s\n",
rv, apr_strerror(rv, buf, sizeof buf));
exit(1);
}
nbytes = APR_BUFFERSIZE;
memset(buf, 0xFE, nbytes);
- rv = apr_write(f, buf, &nbytes);
+ rv = apr_file_write(f, buf, &nbytes);
assert(!rv && nbytes == APR_BUFFERSIZE);
- rv = apr_close(f);
+ rv = apr_file_close(f);
assert(!rv);
f = NULL;
- rv = apr_open(&f, fname, APR_READ | extra_flags, 0, p);
+ rv = apr_file_open(&f, fname, APR_READ | extra_flags, 0, p);
assert(!rv);
nbytes = sizeof buf;
- rv = apr_read(f, buf, &nbytes);
+ rv = apr_file_read(f, buf, &nbytes);
assert(!rv);
assert(nbytes == APR_BUFFERSIZE);
- rv = apr_close(f);
+ rv = apr_file_close(f);
assert(!rv);
}
@@ -689,7 +689,7 @@
fprintf(stdout, "\tMore unbuffered file tests......");
test_bigread(p, fname, 0);
fprintf(stdout, "OK\n");
- rv = apr_remove_file(fname, p);
+ rv = apr_file_remove(fname, p);
assert(!rv);
fprintf(stdout, "\tAll read tests...........OK\n");
}
1.4 +10 -10 apr/test/testflock.c
Index: testflock.c
===================================================================
RCS file: /home/cvs/apr/test/testflock.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- testflock.c 2001/01/23 19:56:28 1.3
+++ testflock.c 2001/02/08 07:45:06 1.4
@@ -89,7 +89,7 @@
static void errmsg(const char *msg)
{
if (pool != NULL)
- apr_destroy_pool(pool);
+ apr_pool_destroy(pool);
fprintf(stderr, msg);
exit(1);
}
@@ -99,12 +99,12 @@
apr_file_t *file;
apr_status_t status;
- if (apr_open(&file, TESTFILE, APR_WRITE,
+ if (apr_file_open(&file, TESTFILE, APR_WRITE,
APR_OS_DEFAULT, pool) != APR_SUCCESS)
errmsg("Could not open test file.\n");
printf("Test file opened.\n");
- status = apr_lock_file(file, APR_FLOCK_EXCLUSIVE | APR_FLOCK_NONBLOCK);
+ status = apr_file_lock(file, APR_FLOCK_EXCLUSIVE | APR_FLOCK_NONBLOCK);
if (!APR_STATUS_IS_EAGAIN(status)) {
char msg[200];
errmsg(apr_psprintf(pool, "Expected EAGAIN. Got %d: %s.\n",
@@ -113,11 +113,11 @@
printf("First attempt: we were properly locked out.\nWaiting for lock...");
fflush(stdout);
- if (apr_lock_file(file, APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
+ if (apr_file_lock(file, APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
errmsg("Could not establish lock on test file.");
printf(" got it.\n");
- (void) apr_close(file);
+ (void) apr_file_close(file);
printf("Exiting.\n");
}
@@ -125,19 +125,19 @@
{
apr_file_t *file;
- if (apr_open(&file, TESTFILE, APR_WRITE|APR_CREATE, APR_OS_DEFAULT,
+ if (apr_file_open(&file, TESTFILE, APR_WRITE|APR_CREATE, APR_OS_DEFAULT,
pool) != APR_SUCCESS)
errmsg("Could not create file.\n");
printf("Test file created.\n");
- if (apr_lock_file(file, APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
+ if (apr_file_lock(file, APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
errmsg("Could not lock the file.\n");
printf("Lock created.\nSleeping...");
fflush(stdout);
apr_sleep(30000000); /* 30 seconds */
- (void) apr_close(file);
+ (void) apr_file_close(file);
printf(" done.\nExiting.\n");
}
@@ -158,10 +158,10 @@
errmsg("Could not initialize APR.\n");
atexit(closeapr);
- if (apr_create_pool(&pool, NULL) != APR_SUCCESS)
+ if (apr_pool_create(&pool, NULL) != APR_SUCCESS)
errmsg("Could not create global pool.\n");
- if (apr_initopt(&opt, pool, argc, argv) != APR_SUCCESS)
+ if (apr_getopt_init(&opt, pool, argc, argv) != APR_SUCCESS)
errmsg("Could not parse options.\n");
while ((status = apr_getopt(opt, "r", &optchar, &optarg)) == APR_SUCCESS) {
1.5 +5 -5 apr/test/testmd5.c
Index: testmd5.c
===================================================================
RCS file: /home/cvs/apr/test/testmd5.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- testmd5.c 2000/11/29 00:22:05 1.4
+++ testmd5.c 2001/02/08 07:45:06 1.5
@@ -91,22 +91,22 @@
apr_md5_ctx_t context;
unsigned char hash[MD5_DIGESTSIZE];
- rv = apr_MD5Init(&context);
+ rv = apr_md5_init(&context);
assert(!rv);
if (xlate) {
#if APR_HAS_XLATE
- apr_MD5SetXlate(&context, xlate);
+ apr_md5_set_xlate(&context, xlate);
#else
fprintf(stderr,
"A translation handle was unexpected.\n");
#endif
}
- rv = apr_MD5Update(&context, buf, bufLen);
+ rv = apr_md5_update(&context, buf, bufLen);
assert(!rv);
- rv = apr_MD5Final(hash, &context);
+ rv = apr_md5_final(hash, &context);
assert(!rv);
for (i = 0; i < MD5_DIGESTSIZE; i++) {
@@ -154,7 +154,7 @@
assert(!rv);
atexit(apr_terminate);
- rv = apr_create_pool(&pool, NULL);
+ rv = apr_pool_create(&pool, NULL);
if (src) {
#if APR_HAS_XLATE
1.25 +3 -3 apr/test/testmmap.c
Index: testmmap.c
===================================================================
RCS file: /home/cvs/apr/test/testmmap.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- testmmap.c 2001/01/23 19:56:29 1.24
+++ testmmap.c 2001/02/08 07:45:07 1.25
@@ -97,7 +97,7 @@
atexit(closeapr);
fprintf(stdout,"Creating context....................");
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Failed.\n");
exit(-1);
}
@@ -108,7 +108,7 @@
strncat(file1,"/testmmap.c",11);
fprintf(stdout, "Opening file........................");
- rv = apr_open(&thefile, file1, flag, APR_UREAD | APR_GREAD, context);
+ rv = apr_file_open(&thefile, file1, flag, APR_UREAD | APR_GREAD, context);
if (rv != APR_SUCCESS) {
fprintf(stderr,
"couldn't open file `%s': %d/%s\n",
@@ -120,7 +120,7 @@
}
fprintf(stderr, "Getting file size...................");
- rv = apr_getfileinfo(&finfo, APR_FINFO_NORM, thefile);
+ rv = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
if (rv != APR_SUCCESS) {
fprintf(stderr,
"Didn't get file information: %d/%s\n",
1.17 +8 -8 apr/test/testoc.c
Index: testoc.c
===================================================================
RCS file: /home/cvs/apr/test/testoc.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- testoc.c 2001/01/28 23:23:22 1.16
+++ testoc.c 2001/02/08 07:45:07 1.17
@@ -103,7 +103,7 @@
exit(-1);
}
atexit(apr_terminate);
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Couldn't allocate context.");
exit(-1);
}
@@ -114,18 +114,18 @@
fprintf(stdout, "[PARENT] Creating procattr.............");
fflush(stdout);
- if (apr_createprocattr_init(&procattr, context) != APR_SUCCESS) {
+ if (apr_procattr_create(&procattr, context) != APR_SUCCESS) {
fprintf(stderr, "Could not create attr\n");
exit(-1);;
}
else {
- apr_setprocattr_io(procattr, APR_FULL_BLOCK, APR_NO_PIPE, APR_NO_PIPE);
+ apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_NO_PIPE, APR_NO_PIPE);
}
fprintf(stdout, "OK\n");
fprintf(stdout, "[PARENT] Starting other child..........");
fflush(stdout);
- if (apr_create_process(&newproc, "./occhild", args, NULL, procattr, context)
+ if (apr_proc_create(&newproc, "./occhild", args, NULL, procattr, context)
!= APR_SUCCESS) {
fprintf(stderr, "error starting other child\n");
exit(-1);
@@ -134,12 +134,12 @@
std = newproc.in;
- apr_register_other_child(&newproc, ocmaint, NULL, std, context);
+ apr_proc_other_child_register(&newproc, ocmaint, NULL, std, context);
fprintf(stdout, "[PARENT] Sending SIGKILL to child......");
fflush(stdout);
apr_sleep(1 * APR_USEC_PER_SEC);
- if (apr_kill(&newproc, SIGKILL) != APR_SUCCESS) {
+ if (apr_proc_kill(&newproc, SIGKILL) != APR_SUCCESS) {
fprintf(stderr,"couldn't send the signal!\n");
exit(-1);
}
@@ -147,10 +147,10 @@
/* allow time for things to settle... */
apr_sleep(3 * APR_USEC_PER_SEC);
- apr_probe_writable_fds();
+ apr_proc_probe_writable_fds();
fprintf(stdout, "[PARENT] Checking on children..........\n");
- apr_check_other_child();
+ apr_proc_other_child_check();
#else
fprintf(stdout, "OC failed!\n");
fprintf(stdout, "Other_child is not supported on this platform\n");
1.14 +6 -6 apr/test/testpipe.c
Index: testpipe.c
===================================================================
RCS file: /home/cvs/apr/test/testpipe.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- testpipe.c 2001/01/23 19:56:31 1.13
+++ testpipe.c 2001/02/08 07:45:07 1.14
@@ -82,7 +82,7 @@
exit(-1);
}
atexit(closeapr);
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Couldn't allocate context.");
exit(-1);
}
@@ -90,8 +90,8 @@
fprintf(stdout, "Testing pipe functions.\n");
fprintf(stdout, "\tCreating pipes.......");
- if ((rv = apr_create_pipe(&readp, &writep, context)) != APR_SUCCESS) {
- fprintf(stderr, "apr_create_pipe()->%d/%s\n",
+ if ((rv = apr_file_pipe_create(&readp, &writep, context)) != APR_SUCCESS) {
+ fprintf(stderr, "apr_file_pipe_create()->%d/%s\n",
rv, apr_strerror(rv, msgbuf, sizeof msgbuf));
exit(-1);
}
@@ -100,8 +100,8 @@
}
fprintf(stdout, "\tSetting pipe timeout.......");
- if ((rv = apr_set_pipe_timeout(readp, 1 * APR_USEC_PER_SEC)) != APR_SUCCESS) {
- fprintf(stderr, "apr_set_pipe_timeout()->%d/%s\n",
+ if ((rv = apr_file_pipe_timeout_set(readp, 1 * APR_USEC_PER_SEC)) != APR_SUCCESS) {
+ fprintf(stderr, "apr_file_pipe_timeout_set()->%d/%s\n",
rv, apr_strerror(rv, msgbuf, sizeof msgbuf));
exit(-1);
} else {
@@ -111,7 +111,7 @@
fprintf(stdout, "\tReading from the pipe.......");
nbytes = strlen("this is a test");
buf = (char *)apr_palloc(context, nbytes + 1);
- if (apr_read(readp, buf, &nbytes) == APR_TIMEUP) {
+ if (apr_file_read(readp, buf, &nbytes) == APR_TIMEUP) {
fprintf(stdout, "OK\n");
}
else {
1.25 +11 -11 apr/test/testproc.c
Index: testproc.c
===================================================================
RCS file: /home/cvs/apr/test/testproc.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- testproc.c 2001/01/23 19:56:33 1.24
+++ testproc.c 2001/02/08 07:45:07 1.25
@@ -90,7 +90,7 @@
exit(-1);
}
atexit(closeapr);
- apr_create_pool(&context, NULL);
+ apr_pool_create(&context, NULL);
if (argc > 1) {
@@ -102,21 +102,21 @@
teststr = apr_pstrdup(context, "Whooo Hoooo\0");
fprintf(stdout, "Creating directory for later use.......");
- if (apr_make_dir("proctest", APR_UREAD | APR_UWRITE | APR_UEXECUTE, context) != APR_SUCCESS) {
+ if (apr_dir_make("proctest", APR_UREAD | APR_UWRITE | APR_UEXECUTE, context) != APR_SUCCESS) {
fprintf(stderr, "Could not create dir\n");
exit(-1);
}
fprintf(stdout, "OK\n");
fprintf(stdout, "Creating procattr.......");
- if (apr_createprocattr_init(&attr, context) != APR_SUCCESS) {
+ if (apr_procattr_create(&attr, context) != APR_SUCCESS) {
fprintf(stderr, "Could not create attr\n");
exit(-1);;
}
fprintf(stdout, "OK.\n");
fprintf(stdout, "Setting attr pipes, all three.......");
- if (apr_setprocattr_io(attr, APR_FULL_BLOCK,
+ if (apr_procattr_io_set(attr, APR_FULL_BLOCK,
APR_CHILD_BLOCK, APR_NO_PIPE) != APR_SUCCESS) {
fprintf(stderr, "Could not set pipes attr\n");
exit(-1);
@@ -124,14 +124,14 @@
fprintf(stdout, "OK.\n");
fprintf(stdout, "Setting attr dir.......");
- if (apr_setprocattr_dir(attr, "proctest") != APR_SUCCESS) {
+ if (apr_procattr_dir_set(attr, "proctest") != APR_SUCCESS) {
fprintf(stderr, "Could not set directory attr\n");
exit(-1);
}
fprintf(stdout, "OK.\n");
fprintf(stdout, "Setting attr cmd type.......");
- if (apr_setprocattr_cmdtype(attr, APR_PROGRAM) != APR_SUCCESS) {
+ if (apr_procattr_cmdtype_set(attr, APR_PROGRAM) != APR_SUCCESS) {
fprintf(stderr, "Could not set cmd type attr\n");
exit(-1);
}
@@ -142,7 +142,7 @@
args[2] = NULL;
fprintf(stdout, "Creating a new process.......");
- if (apr_create_process(&newproc, "../testproc", args, NULL, attr, context) != APR_SUCCESS) {
+ if (apr_proc_create(&newproc, "../testproc", args, NULL, attr, context) != APR_SUCCESS) {
fprintf(stderr, "Could not create the new process\n");
exit(-1);
}
@@ -154,7 +154,7 @@
length = 256;
fprintf(stdout, "Writing the data to child.......");
- if (apr_write(testfile, teststr, &length) == APR_SUCCESS) {
+ if (apr_file_write(testfile, teststr, &length) == APR_SUCCESS) {
fprintf(stdout,"OK\n");
}
else fprintf(stderr, "Write failed.\n");
@@ -166,7 +166,7 @@
length = 256;
fprintf(stdout, "Checking the data read from pipe to child.......");
buf = apr_pcalloc(context, length);
- if (apr_read(testfile, buf, &length) == APR_SUCCESS) {
+ if (apr_file_read(testfile, buf, &length) == APR_SUCCESS) {
if (!strcmp(buf, teststr))
fprintf(stdout,"OK\n");
else fprintf(stderr, "Uh-Oh\n");
@@ -174,14 +174,14 @@
else fprintf(stderr, "Read failed.\n");
fprintf(stdout, "Waiting for child to die.......");
- if (apr_wait_proc(&newproc, APR_WAIT) != APR_CHILD_DONE) {
+ if (apr_proc_wait(&newproc, APR_WAIT) != APR_CHILD_DONE) {
fprintf(stderr, "Wait for child failed\n");
exit(-1);
}
fprintf(stdout, "OK\n");
fprintf(stdout, "Removing directory.......");
- if (apr_remove_dir("proctest", context) != APR_SUCCESS) {
+ if (apr_dir_remove("proctest", context) != APR_SUCCESS) {
fprintf(stderr, "Could not remove directory.\n");
exit(-1);
}
1.15 +2 -2 apr/test/testshmem.c
Index: testshmem.c
===================================================================
RCS file: /home/cvs/apr/test/testshmem.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- testshmem.c 2000/12/05 00:14:12 1.14
+++ testshmem.c 2001/02/08 07:45:08 1.15
@@ -102,7 +102,7 @@
apr_initialize();
fprintf(stdout, "Initializing the context.......");
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "could not initialize\n");
exit(-1);
}
@@ -128,7 +128,7 @@
pid = fork();
if (pid == 0) {
apr_sleep(1);
- if (apr_open_shmem(shm) == APR_SUCCESS) {
+ if (apr_shm_open(shm) == APR_SUCCESS) {
msgwait(1);
msgput(0, "Msg received\n");
} else {
1.19 +21 -21 apr/test/testsock.c
Index: testsock.c
===================================================================
RCS file: /home/cvs/apr/test/testsock.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- testsock.c 2001/01/23 19:56:35 1.18
+++ testsock.c 2001/02/08 07:45:08 1.19
@@ -74,8 +74,8 @@
const char *args[2];
fprintf(stdout, "Creating children to run network tests.......\n");
- s1 = apr_createprocattr_init(&attr1, context);
- s2 = apr_createprocattr_init(&attr2, context);
+ s1 = apr_procattr_create(&attr1, context);
+ s2 = apr_procattr_create(&attr2, context);
if (s1 != APR_SUCCESS || s2 != APR_SUCCESS) {
fprintf(stderr, "Problem creating proc attrs\n");
@@ -84,30 +84,30 @@
args[0] = apr_pstrdup(context, "server");
args[1] = NULL;
- s1 = apr_create_process(&proc1, "./server", args, NULL, attr1, context);
+ s1 = apr_proc_create(&proc1, "./server", args, NULL, attr1, context);
/* Sleep for 5 seconds to ensure the server is setup before we begin */
apr_sleep(5000000);
args[0] = apr_pstrdup(context, "client");
- s2 = apr_create_process(&proc2, "./client", args, NULL, attr2, context);
+ s2 = apr_proc_create(&proc2, "./client", args, NULL, attr2, context);
if (s1 != APR_SUCCESS || s2 != APR_SUCCESS) {
fprintf(stderr, "Problem spawning new process\n");
exit(-1);
}
- while ((s1 = apr_wait_proc(&proc1, APR_NOWAIT)) == APR_CHILD_NOTDONE &&
- (s2 = apr_wait_proc(&proc2, APR_NOWAIT)) == APR_CHILD_NOTDONE) {
+ while ((s1 = apr_proc_wait(&proc1, APR_NOWAIT)) == APR_CHILD_NOTDONE &&
+ (s2 = apr_proc_wait(&proc2, APR_NOWAIT)) == APR_CHILD_NOTDONE) {
continue;
}
if (s1 == APR_SUCCESS) {
- apr_kill(&proc2, SIGTERM);
- while (apr_wait_proc(&proc2, APR_WAIT) == APR_CHILD_NOTDONE);
+ apr_proc_kill(&proc2, SIGTERM);
+ while (apr_proc_wait(&proc2, APR_WAIT) == APR_CHILD_NOTDONE);
}
else {
- apr_kill(&proc1, SIGTERM);
- while (apr_wait_proc(&proc1, APR_WAIT) == APR_CHILD_NOTDONE);
+ apr_proc_kill(&proc1, SIGTERM);
+ while (apr_proc_wait(&proc1, APR_WAIT) == APR_CHILD_NOTDONE);
}
fprintf(stdout, "Network test completed.\n");
@@ -125,8 +125,8 @@
const char *args[3];
fprintf(stdout, "Creating children to run network tests.......\n");
- s1 = apr_createprocattr_init(&attr1, context);
- s2 = apr_createprocattr_init(&attr2, context);
+ s1 = apr_procattr_create(&attr1, context);
+ s2 = apr_procattr_create(&attr2, context);
if (s1 != APR_SUCCESS || s2 != APR_SUCCESS) {
fprintf(stderr, "Problem creating proc attrs\n");
@@ -136,7 +136,7 @@
args[0] = apr_pstrdup(context, "sendfile");
args[1] = apr_pstrdup(context, "server");
args[2] = NULL;
- s1 = apr_create_process(&proc1, "./sendfile", args, NULL, attr1, context);
+ s1 = apr_proc_create(&proc1, "./sendfile", args, NULL, attr1, context);
/* Sleep for 5 seconds to ensure the server is setup before we begin */
apr_sleep(5000000);
@@ -155,25 +155,25 @@
break;
}
}
- s2 = apr_create_process(&proc2, "./sendfile", args, NULL, attr2, context);
+ s2 = apr_proc_create(&proc2, "./sendfile", args, NULL, attr2, context);
if (s1 != APR_SUCCESS || s2 != APR_SUCCESS) {
fprintf(stderr, "Problem spawning new process\n");
exit(-1);
}
- while ((s1 = apr_wait_proc(&proc1, APR_NOWAIT)) == APR_CHILD_NOTDONE &&
- (s2 = apr_wait_proc(&proc2, APR_NOWAIT)) == APR_CHILD_NOTDONE) {
+ while ((s1 = apr_proc_wait(&proc1, APR_NOWAIT)) == APR_CHILD_NOTDONE &&
+ (s2 = apr_proc_wait(&proc2, APR_NOWAIT)) == APR_CHILD_NOTDONE) {
continue;
}
if (s1 == APR_SUCCESS) {
- apr_kill(&proc2, SIGTERM);
- while (apr_wait_proc(&proc2, APR_WAIT) == APR_CHILD_NOTDONE);
+ apr_proc_kill(&proc2, SIGTERM);
+ while (apr_proc_wait(&proc2, APR_WAIT) == APR_CHILD_NOTDONE);
}
else {
- apr_kill(&proc1, SIGTERM);
- while (apr_wait_proc(&proc1, APR_WAIT) == APR_CHILD_NOTDONE);
+ apr_proc_kill(&proc1, SIGTERM);
+ while (apr_proc_wait(&proc1, APR_WAIT) == APR_CHILD_NOTDONE);
}
fprintf(stdout, "Network test completed.\n");
@@ -198,7 +198,7 @@
atexit(closeapr);
fprintf(stdout, "Creating context.......");
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Could not create context\n");
exit(-1);
}
1.3 +14 -14 apr/test/testsockopt.c
Index: testsockopt.c
===================================================================
RCS file: /home/cvs/apr/test/testsockopt.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- testsockopt.c 2001/01/28 23:23:22 1.2
+++ testsockopt.c 2001/02/08 07:45:08 1.3
@@ -66,14 +66,14 @@
static void failure(apr_socket_t *sock)
{
- apr_close_socket(sock);
+ apr_socket_close(sock);
printf("Failed!\n");
exit(-1);
}
static void failureno(apr_socket_t *sock)
{
- apr_close_socket(sock);
+ apr_socket_close(sock);
printf("No!\n");
exit(-1);
}
@@ -96,11 +96,11 @@
exit(-1);
}
atexit(closeapr);
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Couldn't allocate context.");
exit(-1);
}
- if (apr_create_pool(&cont2, context) != APR_SUCCESS) {
+ if (apr_pool_create(&cont2, context) != APR_SUCCESS) {
fprintf(stderr, "Couldn't allocate context.");
exit(-1);
}
@@ -108,7 +108,7 @@
printf("Testing socket option functions.\n");
printf("\tCreating socket..........................");
- if ((stat = apr_create_socket(&sock, APR_INET, SOCK_STREAM, context))
+ if ((stat = apr_socket_create(&sock, APR_INET, SOCK_STREAM, context))
!= APR_SUCCESS){
printf("Failed to create a socket!\n");
exit(-1);
@@ -117,7 +117,7 @@
printf ("\tTrying to set APR_SO_KEEPALIVE...........");
if (apr_setsocketopt(sock, APR_SO_KEEPALIVE, 1) != APR_SUCCESS){
- apr_close_socket(sock);
+ apr_socket_close(sock);
printf("Failed!\n");
exit (-1);
}
@@ -125,12 +125,12 @@
printf("\tChecking if we recorded it...............");
if (apr_getsocketopt(sock, APR_SO_KEEPALIVE, &ck) != APR_SUCCESS){
- apr_close_socket(sock);
+ apr_socket_close(sock);
fprintf(stderr,"Failed\n");
exit(-1);
}
if (ck != 1){
- apr_close_socket(sock);
+ apr_socket_close(sock);
printf("No (%d)\n", ck);
exit(-1);
}
@@ -138,7 +138,7 @@
printf("\tTrying to set APR_SO_DEBUG...............");
if (apr_setsocketopt(sock, APR_SO_DEBUG, 1) != APR_SUCCESS){
- apr_close_socket(sock);
+ apr_socket_close(sock);
printf("Failed\n");
exit (-1);
}
@@ -146,20 +146,20 @@
printf("\tChecking if we recorded it...............");
if (apr_getsocketopt(sock, APR_SO_DEBUG, &ck) != APR_SUCCESS){
- apr_close_socket(sock);
+ apr_socket_close(sock);
printf("Failed!\n");
exit (-1);
}
if (ck != 1){
printf ("No (%d)\n", ck);
- apr_close_socket(sock);
+ apr_socket_close(sock);
exit (-1);
}
printf ("Yes\n");
printf ("\tTrying to remove APR_SO_KEEPALIVE........");
if (apr_setsocketopt(sock, APR_SO_KEEPALIVE, 0) != APR_SUCCESS){
- apr_close_socket(sock);
+ apr_socket_close(sock);
printf("Failed!\n");
exit (-1);
}
@@ -167,7 +167,7 @@
printf ("\tDid we record the removal................");
if (apr_getsocketopt(sock, APR_SO_KEEPALIVE, &ck) != APR_SUCCESS){
- apr_close_socket(sock);
+ apr_socket_close(sock);
printf("Didn't get value!\n");
exit(-1);
}
@@ -215,7 +215,7 @@
#endif
printf("\tTrying to close the socket...............");
- if ((stat = apr_close_socket(sock)) != APR_SUCCESS){
+ if ((stat = apr_socket_close(sock)) != APR_SUCCESS){
printf("Failed to close the socket!\n");
exit(-1);
}
1.14 +14 -14 apr/test/testthread.c
Index: testthread.c
===================================================================
RCS file: /home/cvs/apr/test/testthread.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- testthread.c 2000/11/15 21:46:38 1.13
+++ testthread.c 2001/02/08 07:45:08 1.14
@@ -77,9 +77,9 @@
{
int i;
for (i = 0; i < 10000; i++) {
- apr_lock(thread_lock);
+ apr_lock_aquire(thread_lock);
x++;
- apr_unlock(thread_lock);
+ apr_lock_release(thread_lock);
}
return NULL;
}
@@ -88,9 +88,9 @@
{
int i;
for (i = 0; i < 10000; i++) {
- apr_lock(thread_lock);
+ apr_lock_aquire(thread_lock);
x++;
- apr_unlock(thread_lock);
+ apr_lock_release(thread_lock);
}
return NULL;
}
@@ -99,9 +99,9 @@
{
int i;
for (i = 0; i < 10000; i++) {
- apr_lock(thread_lock);
+ apr_lock_aquire(thread_lock);
x++;
- apr_unlock(thread_lock);
+ apr_lock_release(thread_lock);
}
return NULL;
}
@@ -110,9 +110,9 @@
{
int i;
for (i = 0; i < 10000; i++) {
- apr_lock(thread_lock);
+ apr_lock_aquire(thread_lock);
x++;
- apr_unlock(thread_lock);
+ apr_lock_release(thread_lock);
}
return NULL;
}
@@ -132,14 +132,14 @@
apr_initialize();
fprintf(stdout, "Initializing the context.......");
- if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
+ if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "could not initialize\n");
exit(-1);
}
fprintf(stdout, "OK\n");
fprintf(stdout, "Initializing the lock.......");
- s1 = apr_create_lock(&thread_lock, APR_MUTEX, APR_INTRAPROCESS, "lock.file", context);
+ s1 = apr_lock_create(&thread_lock, APR_MUTEX, APR_INTRAPROCESS, "lock.file", context);
if (s1 != APR_SUCCESS) {
fprintf(stderr, "Could not create lock\n");
exit(-1);
@@ -147,10 +147,10 @@
fprintf(stdout, "OK\n");
fprintf(stdout, "Starting all the threads.......");
- s1 = apr_create_thread(&t1, NULL, thread_func1, NULL, context);
- s2 = apr_create_thread(&t2, NULL, thread_func2, NULL, context);
- s3 = apr_create_thread(&t3, NULL, thread_func3, NULL, context);
- s4 = apr_create_thread(&t4, NULL, thread_func4, NULL, context);
+ s1 = apr_thread_create(&t1, NULL, thread_func1, NULL, context);
+ s2 = apr_thread_create(&t2, NULL, thread_func2, NULL, context);
+ s3 = apr_thread_create(&t3, NULL, thread_func3, NULL, context);
+ s4 = apr_thread_create(&t4, NULL, thread_func4, NULL, context);
if (s1 != APR_SUCCESS || s2 != APR_SUCCESS ||
s3 != APR_SUCCESS || s4 != APR_SUCCESS) {
fprintf(stderr, "Error starting thread\n");
1.12 +2 -2 apr/test/testtime.c
Index: testtime.c
===================================================================
RCS file: /home/cvs/apr/test/testtime.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- testtime.c 2000/11/15 21:46:38 1.11
+++ testtime.c 2001/02/08 07:45:08 1.12
@@ -69,8 +69,8 @@
fprintf(stdout, "Testing Time functions.\n");
- fprintf(stdout, "\tapr_now.......");
- now = apr_now();
+ fprintf(stdout, "\tapr_time_now.......");
+ now = apr_time_now();
fprintf(stdout, "OK\n");
fprintf(stdout, "\tapr_explode_localtime.......");
1.2 +8 -8 apr/test/testuuid.c
Index: testuuid.c
===================================================================
RCS file: /home/cvs/apr/test/testuuid.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- testuuid.c 2000/10/06 12:19:43 1.1
+++ testuuid.c 2001/02/08 07:45:08 1.2
@@ -64,11 +64,11 @@
char buf[APR_UUID_FORMATTED_LENGTH + 1];
int retcode = 0;
- apr_get_uuid(&uuid);
- apr_format_uuid(buf, &uuid);
+ apr_uuid_get(&uuid);
+ apr_uuid_format(buf, &uuid);
printf("UUID: %s\n", buf);
- apr_parse_uuid(&uuid2, buf);
+ apr_uuid_parse(&uuid2, buf);
if (memcmp(&uuid, &uuid2, sizeof(uuid)) == 0)
printf("Parse appears to work.\n");
else {
@@ -76,15 +76,15 @@
retcode = 1;
}
- apr_format_uuid(buf, &uuid2);
+ apr_uuid_format(buf, &uuid2);
printf("parsed/reformatted UUID: %s\n", buf);
/* generate two of them quickly */
- apr_get_uuid(&uuid);
- apr_get_uuid(&uuid2);
- apr_format_uuid(buf, &uuid);
+ apr_uuid_get(&uuid);
+ apr_uuid_get(&uuid2);
+ apr_uuid_format(buf, &uuid);
printf("UUID 1: %s\n", buf);
- apr_format_uuid(buf, &uuid2);
+ apr_uuid_format(buf, &uuid2);
printf("UUID 2: %s\n", buf);
return retcode;
1.36 +40 -40 apr/threadproc/beos/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apr/threadproc/beos/proc.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- proc.c 2001/01/10 19:34:35 1.35
+++ proc.c 2001/02/08 07:45:13 1.36
@@ -61,7 +61,7 @@
int err;
};
-apr_status_t apr_createprocattr_init(apr_procattr_t **new, apr_pool_t *cont)
+apr_status_t apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont)
{
(*new) = (apr_procattr_t *)apr_palloc(cont,
sizeof(apr_procattr_t));
@@ -82,12 +82,12 @@
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in,
+apr_status_t apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in,
apr_int32_t out, apr_int32_t err)
{
apr_status_t status;
if (in != 0) {
- if ((status = apr_create_pipe(&attr->child_in, &attr->parent_in,
+ if ((status = apr_file_pipe_create(&attr->child_in, &attr->parent_in,
attr->cntxt)) != APR_SUCCESS) {
return status;
}
@@ -95,18 +95,18 @@
case APR_FULL_BLOCK:
break;
case APR_PARENT_BLOCK:
- apr_set_pipe_timeout(attr->child_in, 0);
+ apr_file_pipe_timeout_set(attr->child_in, 0);
break;
case APR_CHILD_BLOCK:
- apr_set_pipe_timeout(attr->parent_in, 0);
+ apr_file_pipe_timeout_set(attr->parent_in, 0);
break;
default:
- apr_set_pipe_timeout(attr->child_in, 0);
- apr_set_pipe_timeout(attr->parent_in, 0);
+ apr_file_pipe_timeout_set(attr->child_in, 0);
+ apr_file_pipe_timeout_set(attr->parent_in, 0);
}
}
if (out) {
- if ((status = apr_create_pipe(&attr->parent_out, &attr->child_out,
+ if ((status = apr_file_pipe_create(&attr->parent_out, &attr->child_out,
attr->cntxt)) != APR_SUCCESS) {
return status;
}
@@ -114,18 +114,18 @@
case APR_FULL_BLOCK:
break;
case APR_PARENT_BLOCK:
- apr_set_pipe_timeout(attr->child_out, 0);
+ apr_file_pipe_timeout_set(attr->child_out, 0);
break;
case APR_CHILD_BLOCK:
- apr_set_pipe_timeout(attr->parent_out, 0);
+ apr_file_pipe_timeout_set(attr->parent_out, 0);
break;
default:
- apr_set_pipe_timeout(attr->child_out, 0);
- apr_set_pipe_timeout(attr->parent_out, 0);
+ apr_file_pipe_timeout_set(attr->child_out, 0);
+ apr_file_pipe_timeout_set(attr->parent_out, 0);
}
}
if (err) {
- if ((status = apr_create_pipe(&attr->parent_err, &attr->child_err,
+ if ((status = apr_file_pipe_create(&attr->parent_err, &attr->child_err,
attr->cntxt)) != APR_SUCCESS) {
return status;
}
@@ -133,20 +133,20 @@
case APR_FULL_BLOCK:
break;
case APR_PARENT_BLOCK:
- apr_set_pipe_timeout(attr->child_err, 0);
+ apr_file_pipe_timeout_set(attr->child_err, 0);
break;
case APR_CHILD_BLOCK:
- apr_set_pipe_timeout(attr->parent_err, 0);
+ apr_file_pipe_timeout_set(attr->parent_err, 0);
break;
default:
- apr_set_pipe_timeout(attr->child_err, 0);
- apr_set_pipe_timeout(attr->parent_err, 0);
+ apr_file_pipe_timeout_set(attr->child_err, 0);
+ apr_file_pipe_timeout_set(attr->parent_err, 0);
}
}
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_dir(apr_procattr_t *attr,
+apr_status_t apr_procattr_dir_set(apr_procattr_t *attr,
const char *dir)
{
char * cwd;
@@ -166,20 +166,20 @@
return APR_ENOMEM;
}
-apr_status_t apr_setprocattr_cmdtype(apr_procattr_t *attr,
+apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr,
apr_cmdtype_e cmd)
{
attr->cmdtype = cmd;
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_detach(apr_procattr_t *attr, apr_int32_t detach)
+apr_status_t apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
{
attr->detached = detach;
return APR_SUCCESS;
}
-apr_status_t apr_fork(apr_proc_t *proc, apr_pool_t *cont)
+apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
{
int pid;
@@ -201,7 +201,7 @@
}
-apr_status_t apr_create_process(apr_proc_t *new, const char *progname,
+apr_status_t apr_proc_create(apr_proc_t *new, const char *progname,
const char * const *args,
const char * const *env,
apr_procattr_t *attr, apr_pool_t *cont)
@@ -259,13 +259,13 @@
resume_thread(newproc);
if (attr->child_in) {
- apr_close(attr->child_in);
+ apr_file_close(attr->child_in);
}
if (attr->child_out) {
- apr_close(attr->child_out);
+ apr_file_close(attr->child_out);
}
if (attr->child_err) {
- apr_close(attr->child_err);
+ apr_file_close(attr->child_err);
}
send_data(newproc, 0, (void*)sp, sizeof(struct send_pipe));
@@ -279,7 +279,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
+apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
apr_wait_how_e waithow, apr_pool_t *p)
{
int waitpid_options = WUNTRACED;
@@ -297,7 +297,7 @@
return errno;
}
-apr_status_t apr_wait_proc(apr_proc_t *proc,
+apr_status_t apr_proc_wait(apr_proc_t *proc,
apr_wait_how_e wait)
{
status_t exitval, rv;
@@ -321,52 +321,52 @@
return APR_CHILD_NOTDONE;
}
-apr_status_t apr_setprocattr_childin(apr_procattr_t *attr, apr_file_t *child_in,
+apr_status_t apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in,
apr_file_t *parent_in)
{
if (attr->child_in == NULL && attr->parent_in == NULL)
- apr_create_pipe(&attr->child_in, &attr->parent_in, attr->cntxt);
+ apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt);
if (child_in != NULL)
- apr_dupfile(&attr->child_in, child_in, attr->cntxt);
+ apr_file_dup(&attr->child_in, child_in, attr->cntxt);
if (parent_in != NULL)
- apr_dupfile(&attr->parent_in, parent_in, attr->cntxt);
+ apr_file_dup(&attr->parent_in, parent_in, attr->cntxt);
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_childout(apr_procattr_t *attr, apr_file_t *child_out,
+apr_status_t apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out,
apr_file_t *parent_out)
{
if (attr->child_out == NULL && attr->parent_out == NULL)
- apr_create_pipe(&attr->child_out, &attr->parent_out, attr->cntxt);
+ apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt);
if (child_out != NULL)
- apr_dupfile(&attr->child_out, child_out, attr->cntxt);
+ apr_file_dup(&attr->child_out, child_out, attr->cntxt);
if (parent_out != NULL)
- apr_dupfile(&attr->parent_out, parent_out, attr->cntxt);
+ apr_file_dup(&attr->parent_out, parent_out, attr->cntxt);
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_childerr(apr_procattr_t *attr, apr_file_t *child_err,
+apr_status_t apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err,
apr_file_t *parent_err)
{
if (attr->child_err == NULL && attr->parent_err == NULL)
- apr_create_pipe(&attr->child_err, &attr->parent_err, attr->cntxt);
+ apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt);
if (child_err != NULL)
- apr_dupfile(&attr->child_err, child_err, attr->cntxt);
+ apr_file_dup(&attr->child_err, child_err, attr->cntxt);
if (parent_err != NULL)
- apr_dupfile(&attr->parent_err, parent_err, attr->cntxt);
+ apr_file_dup(&attr->parent_err, parent_err, attr->cntxt);
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_limit(apr_procattr_t *attr, apr_int32_t what,
+apr_status_t apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,
void *limit)
{
return APR_ENOTIMPL;
1.17 +12 -12 apr/threadproc/beos/thread.c
Index: thread.c
===================================================================
RCS file: /home/cvs/apr/threadproc/beos/thread.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- thread.c 2000/12/31 18:48:03 1.16
+++ thread.c 2001/02/08 07:45:13 1.17
@@ -54,7 +54,7 @@
#include "threadproc.h"
-apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont)
+apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont)
{
(*new) = (apr_threadattr_t *)apr_palloc(cont,
sizeof(apr_threadattr_t));
@@ -69,7 +69,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on)
+apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on)
{
if (on == 1){
attr->detached = 1;
@@ -79,7 +79,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr)
+apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr)
{
if (attr->detached == 1){
return APR_DETACH;
@@ -87,7 +87,7 @@
return APR_NOTDETACH;
}
-apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr,
+apr_status_t apr_thread_create(apr_thread_t **new, apr_threadattr_t *attr,
apr_thread_start_t func, void *data,
apr_pool_t *cont)
{
@@ -107,7 +107,7 @@
else
temp = B_NORMAL_PRIORITY;
- stat = apr_create_pool(&(*new)->cntxt, cont);
+ stat = apr_pool_create(&(*new)->cntxt, cont);
if (stat != APR_SUCCESS) {
return stat;
}
@@ -124,7 +124,7 @@
apr_status_t apr_thread_exit(apr_thread_t *thd, apr_status_t *retval)
{
- apr_destroy_pool(thd->cntxt);
+ apr_pool_destroy(thd->cntxt);
exit_thread ((status_t)retval);
return APR_SUCCESS;
}
@@ -149,25 +149,25 @@
}
}
-apr_status_t apr_get_threaddata(void **data, const char *key, apr_thread_t *thread)
+apr_status_t apr_thread_data_get(void **data, const char *key, apr_thread_t *thread)
{
- return apr_get_userdata(data, key, thread->cntxt);
+ return apr_pool_userdata_get(data, key, thread->cntxt);
}
-apr_status_t apr_set_threaddata(void *data, const char *key,
+apr_status_t apr_thread_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_thread_t *thread)
{
- return apr_set_userdata(data, key, cleanup, thread->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, thread->cntxt);
}
-apr_status_t apr_get_os_thread(apr_os_thread_t **thethd, apr_thread_t *thd)
+apr_status_t apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd)
{
*thethd = &thd->td;
return APR_SUCCESS;
}
-apr_status_t apr_put_os_thread(apr_thread_t **thd, apr_os_thread_t *thethd,
+apr_status_t apr_os_thread_pupt(apr_thread_t **thd, apr_os_thread_t *thethd,
apr_pool_t *cont)
{
if (cont == NULL) {
1.15 +10 -10 apr/threadproc/beos/threadpriv.c
Index: threadpriv.c
===================================================================
RCS file: /home/cvs/apr/threadproc/beos/threadpriv.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- threadpriv.c 2000/11/19 01:05:16 1.14
+++ threadpriv.c 2001/02/08 07:45:14 1.15
@@ -58,7 +58,7 @@
static struct beos_private_data *beos_data[BEOS_MAX_DATAKEYS];
static sem_id lock;
-apr_status_t apr_create_thread_private(apr_threadkey_t **key,
+apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,
void (*dest)(void *), apr_pool_t *cont)
{
(*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t));
@@ -82,7 +82,7 @@
return APR_ENOMEM;
}
-apr_status_t apr_get_thread_private(void **new, apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_get(void **new, apr_threadkey_t *key)
{
thread_id tid;
int i, index=0;
@@ -114,7 +114,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_set(void *priv, apr_threadkey_t *key)
{
thread_id tid;
int i,index = 0, ret;
@@ -169,7 +169,7 @@
return APR_ENOMEM;
}
-apr_status_t apr_delete_thread_private(apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key)
{
if (key->key < BEOS_MAX_DATAKEYS){
acquire_sem(key_table[key->key].lock);
@@ -184,26 +184,26 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_threadkeydata(void **data, const char *key,
+apr_status_t apr_threadkey_data_get(void **data, const char *key,
apr_threadkey_t *threadkey)
{
- return apr_get_userdata(data, key, threadkey->cntxt);
+ return apr_pool_userdata_get(data, key, threadkey->cntxt);
}
-apr_status_t apr_set_threadkeydata(void *data, const char *key,
+apr_status_t apr_threadkey_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_threadkey_t *threadkey)
{
- return apr_set_userdata(data, key, cleanup, threadkey->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt);
}
-apr_status_t apr_get_os_threadkey(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
+apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
{
*thekey = key->key;
return APR_SUCCESS;
}
-apr_status_t apr_put_os_threadkey(apr_threadkey_t **key,
+apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,
apr_os_threadkey_t *thekey, apr_pool_t *cont)
{
if (cont == NULL) {
1.37 +42 -42 apr/threadproc/os2/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apr/threadproc/os2/proc.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- proc.c 2001/01/28 15:30:31 1.36
+++ proc.c 2001/02/08 07:45:15 1.37
@@ -71,7 +71,7 @@
#include <process.h>
#include <stdlib.h>
-apr_status_t apr_createprocattr_init(apr_procattr_t **new, apr_pool_t *cont)
+apr_status_t apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont)
{
(*new) = (apr_procattr_t *)apr_palloc(cont,
sizeof(apr_procattr_t));
@@ -92,12 +92,12 @@
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in,
+apr_status_t apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in,
apr_int32_t out, apr_int32_t err)
{
apr_status_t stat;
if (in) {
- if ((stat = apr_create_pipe(&attr->child_in, &attr->parent_in,
+ if ((stat = apr_file_pipe_create(&attr->child_in, &attr->parent_in,
attr->cntxt)) != APR_SUCCESS) {
return stat;
}
@@ -105,18 +105,18 @@
case APR_FULL_BLOCK:
break;
case APR_PARENT_BLOCK:
- apr_set_pipe_timeout(attr->child_in, 0);
+ apr_file_pipe_timeout_set(attr->child_in, 0);
break;
case APR_CHILD_BLOCK:
- apr_set_pipe_timeout(attr->parent_in, 0);
+ apr_file_pipe_timeout_set(attr->parent_in, 0);
break;
default:
- apr_set_pipe_timeout(attr->child_in, 0);
- apr_set_pipe_timeout(attr->parent_in, 0);
+ apr_file_pipe_timeout_set(attr->child_in, 0);
+ apr_file_pipe_timeout_set(attr->parent_in, 0);
}
}
if (out) {
- if ((stat = apr_create_pipe(&attr->parent_out, &attr->child_out,
+ if ((stat = apr_file_pipe_create(&attr->parent_out, &attr->child_out,
attr->cntxt)) != APR_SUCCESS) {
return stat;
}
@@ -124,18 +124,18 @@
case APR_FULL_BLOCK:
break;
case APR_PARENT_BLOCK:
- apr_set_pipe_timeout(attr->child_out, 0);
+ apr_file_pipe_timeout_set(attr->child_out, 0);
break;
case APR_CHILD_BLOCK:
- apr_set_pipe_timeout(attr->parent_out, 0);
+ apr_file_pipe_timeout_set(attr->parent_out, 0);
break;
default:
- apr_set_pipe_timeout(attr->child_out, 0);
- apr_set_pipe_timeout(attr->parent_out, 0);
+ apr_file_pipe_timeout_set(attr->child_out, 0);
+ apr_file_pipe_timeout_set(attr->parent_out, 0);
}
}
if (err) {
- if ((stat = apr_create_pipe(&attr->parent_err, &attr->child_err,
+ if ((stat = apr_file_pipe_create(&attr->parent_err, &attr->child_err,
attr->cntxt)) != APR_SUCCESS) {
return stat;
}
@@ -143,68 +143,68 @@
case APR_FULL_BLOCK:
break;
case APR_PARENT_BLOCK:
- apr_set_pipe_timeout(attr->child_err, 0);
+ apr_file_pipe_timeout_set(attr->child_err, 0);
break;
case APR_CHILD_BLOCK:
- apr_set_pipe_timeout(attr->parent_err, 0);
+ apr_file_pipe_timeout_set(attr->parent_err, 0);
break;
default:
- apr_set_pipe_timeout(attr->child_err, 0);
- apr_set_pipe_timeout(attr->parent_err, 0);
+ apr_file_pipe_timeout_set(attr->child_err, 0);
+ apr_file_pipe_timeout_set(attr->parent_err, 0);
}
}
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_childin(apr_procattr_t *attr, apr_file_t *child_in,
+apr_status_t apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in,
apr_file_t *parent_in)
{
if (attr->child_in == NULL && attr->parent_in == NULL)
- apr_create_pipe(&attr->child_in, &attr->parent_in, attr->cntxt);
+ apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt);
if (child_in != NULL)
- apr_dupfile(&attr->child_in, child_in, attr->cntxt);
+ apr_file_dup(&attr->child_in, child_in, attr->cntxt);
if (parent_in != NULL)
- apr_dupfile(&attr->parent_in, parent_in, attr->cntxt);
+ apr_file_dup(&attr->parent_in, parent_in, attr->cntxt);
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_childout(apr_procattr_t *attr, apr_file_t *child_out,
+apr_status_t apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out,
apr_file_t *parent_out)
{
if (attr->child_out == NULL && attr->parent_out == NULL)
- apr_create_pipe(&attr->child_out, &attr->parent_out, attr->cntxt);
+ apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt);
if (child_out != NULL)
- apr_dupfile(&attr->child_out, child_out, attr->cntxt);
+ apr_file_dup(&attr->child_out, child_out, attr->cntxt);
if (parent_out != NULL)
- apr_dupfile(&attr->parent_out, parent_out, attr->cntxt);
+ apr_file_dup(&attr->parent_out, parent_out, attr->cntxt);
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_childerr(apr_procattr_t *attr, apr_file_t *child_err,
+apr_status_t apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err,
apr_file_t *parent_err)
{
if (attr->child_err == NULL && attr->parent_err == NULL)
- apr_create_pipe(&attr->child_err, &attr->parent_err, attr->cntxt);
+ apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt);
if (child_err != NULL)
- apr_dupfile(&attr->child_err, child_err, attr->cntxt);
+ apr_file_dup(&attr->child_err, child_err, attr->cntxt);
if (parent_err != NULL)
- apr_dupfile(&attr->parent_err, parent_err, attr->cntxt);
+ apr_file_dup(&attr->parent_err, parent_err, attr->cntxt);
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_dir(apr_procattr_t *attr, const char *dir)
+apr_status_t apr_procattr_dir_set(apr_procattr_t *attr, const char *dir)
{
attr->currdir = apr_pstrdup(attr->cntxt, dir);
if (attr->currdir) {
@@ -213,20 +213,20 @@
return APR_ENOMEM;
}
-apr_status_t apr_setprocattr_cmdtype(apr_procattr_t *attr,
+apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr,
apr_cmdtype_e cmd)
{
attr->cmdtype = cmd;
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_detach(apr_procattr_t *attr, apr_int32_t detach)
+apr_status_t apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
{
attr->detached = detach;
return APR_SUCCESS;
}
-apr_status_t apr_fork(apr_proc_t *proc, apr_pool_t *cont)
+apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
{
int pid;
@@ -277,7 +277,7 @@
-apr_status_t apr_create_process(apr_proc_t *proc, const char *progname,
+apr_status_t apr_proc_create(apr_proc_t *proc, const char *progname,
const char * const *args,
const char * const *env,
apr_procattr_t *attr, apr_pool_t *cont)
@@ -348,14 +348,14 @@
strcpy(interpreter, "#!" SHELL_PATH);
extra_arg = "/C";
} else if (stricmp(extension, ".exe") != 0) {
- status = apr_open(&progfile, progname, APR_READ|APR_BUFFERED, 0, cont);
+ status = apr_file_open(&progfile, progname, APR_READ|APR_BUFFERED, 0, cont);
if (status != APR_SUCCESS && APR_STATUS_IS_ENOENT(status)) {
progname = apr_pstrcat(cont, progname, ".exe", NULL);
}
if (status == APR_SUCCESS) {
- status = apr_fgets(interpreter, sizeof(interpreter), progfile);
+ status = apr_file_gets(interpreter, sizeof(interpreter), progfile);
if (status == APR_SUCCESS) {
if (interpreter[0] == '#' && interpreter[1] == '!') {
@@ -376,7 +376,7 @@
}
}
}
- apr_close(progfile);
+ apr_file_close(progfile);
}
i = 0;
@@ -461,21 +461,21 @@
}
if (attr->child_in) {
- apr_close(attr->child_in);
+ apr_file_close(attr->child_in);
dup = STDIN_FILENO;
DosDupHandle(save_in, &dup);
DosClose(save_in);
}
if (attr->child_out) {
- apr_close(attr->child_out);
+ apr_file_close(attr->child_out);
dup = STDOUT_FILENO;
DosDupHandle(save_out, &dup);
DosClose(save_out);
}
if (attr->child_err) {
- apr_close(attr->child_err);
+ apr_file_close(attr->child_err);
dup = STDERR_FILENO;
DosDupHandle(save_err, &dup);
DosClose(save_err);
@@ -492,7 +492,7 @@
-apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
+apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
apr_wait_how_e waithow, apr_pool_t *p)
{
RESULTCODES codes;
@@ -520,7 +520,7 @@
-apr_status_t apr_wait_proc(apr_proc_t *proc,
+apr_status_t apr_proc_wait(apr_proc_t *proc,
apr_wait_how_e wait)
{
RESULTCODES codes;
1.12 +1 -1 apr/threadproc/os2/signals.c
Index: signals.c
===================================================================
RCS file: /home/cvs/apr/threadproc/os2/signals.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- signals.c 2001/01/28 15:30:31 1.11
+++ signals.c 2001/02/08 07:45:15 1.12
@@ -62,7 +62,7 @@
#include <string.h>
#include <sys/wait.h>
-apr_status_t apr_kill(apr_proc_t *proc, int signal)
+apr_status_t apr_proc_kill(apr_proc_t *proc, int signal)
{
/* SIGTERM's don't work too well in OS/2 (only affects other EMX programs).
CGIs may not be, esp. REXX scripts, so use a native call instead */
1.18 +6 -6 apr/threadproc/os2/thread.c
Index: thread.c
===================================================================
RCS file: /home/cvs/apr/threadproc/os2/thread.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- thread.c 2001/01/28 15:30:31 1.17
+++ thread.c 2001/02/08 07:45:15 1.18
@@ -61,7 +61,7 @@
#include "fileio.h"
#include <stdlib.h>
-apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont)
+apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont)
{
(*new) = (apr_threadattr_t *)apr_palloc(cont, sizeof(apr_threadattr_t));
@@ -76,7 +76,7 @@
-apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on)
+apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on)
{
attr->attr |= APR_THREADATTR_DETACHED;
return APR_SUCCESS;
@@ -84,7 +84,7 @@
-apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr)
+apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr)
{
return (attr->attr & APR_THREADATTR_DETACHED) ? APR_DETACH : APR_NOTDETACH;
}
@@ -99,7 +99,7 @@
-apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr,
+apr_status_t apr_thread_create(apr_thread_t **new, apr_threadattr_t *attr,
apr_thread_start_t func, void *data,
apr_pool_t *cont)
{
@@ -117,14 +117,14 @@
thread->attr = attr;
thread->func = func;
thread->data = data;
- stat = apr_create_pool(&thread->cntxt, cont);
+ stat = apr_pool_create(&thread->cntxt, cont);
if (stat != APR_SUCCESS) {
return stat;
}
if (attr == NULL) {
- stat = apr_create_threadattr(&thread->attr, thread->cntxt);
+ stat = apr_threadattr_create(&thread->attr, thread->cntxt);
if (stat != APR_SUCCESS) {
return stat;
1.13 +4 -4 apr/threadproc/os2/threadpriv.c
Index: threadpriv.c
===================================================================
RCS file: /home/cvs/apr/threadproc/os2/threadpriv.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- threadpriv.c 2000/11/14 06:40:07 1.12
+++ threadpriv.c 2001/02/08 07:45:15 1.13
@@ -59,7 +59,7 @@
#include "apr_lib.h"
#include "fileio.h"
-apr_status_t apr_create_thread_private(apr_threadkey_t **key,
+apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,
void (*dest)(void *), apr_pool_t *cont)
{
(*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t));
@@ -72,19 +72,19 @@
return APR_OS2_STATUS(DosAllocThreadLocalMemory(1, &((*key)->key)));
}
-apr_status_t apr_get_thread_private(void **new, apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_get(void **new, apr_threadkey_t *key)
{
(*new) = (void *)*(key->key);
return APR_SUCCESS;
}
-apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_set(void *priv, apr_threadkey_t *key)
{
*(key->key) = (ULONG)priv;
return APR_SUCCESS;
}
-apr_status_t apr_delete_thread_private(apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key)
{
return APR_OS2_STATUS(DosFreeThreadLocalMemory(key->key));
}
1.43 +49 -49 apr/threadproc/unix/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apr/threadproc/unix/proc.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- proc.c 2000/12/08 04:28:57 1.42
+++ proc.c 2001/02/08 07:45:16 1.43
@@ -56,7 +56,7 @@
#include "apr_strings.h"
#include "apr_portable.h"
-apr_status_t apr_createprocattr_init(apr_procattr_t **new, apr_pool_t *cont)
+apr_status_t apr_procattr_create(apr_procattr_t **new, apr_pool_t *cont)
{
(*new) = (apr_procattr_t *)apr_pcalloc(cont, sizeof(apr_procattr_t));
@@ -68,12 +68,12 @@
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in,
+apr_status_t apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in,
apr_int32_t out, apr_int32_t err)
{
apr_status_t status;
if (in != 0) {
- if ((status = apr_create_pipe(&attr->child_in, &attr->parent_in,
+ if ((status = apr_file_pipe_create(&attr->child_in, &attr->parent_in,
attr->cntxt)) != APR_SUCCESS) {
return status;
}
@@ -81,18 +81,18 @@
case APR_FULL_BLOCK:
break;
case APR_PARENT_BLOCK:
- apr_set_pipe_timeout(attr->child_in, 0);
+ apr_file_pipe_timeout_set(attr->child_in, 0);
break;
case APR_CHILD_BLOCK:
- apr_set_pipe_timeout(attr->parent_in, 0);
+ apr_file_pipe_timeout_set(attr->parent_in, 0);
break;
default:
- apr_set_pipe_timeout(attr->child_in, 0);
- apr_set_pipe_timeout(attr->parent_in, 0);
+ apr_file_pipe_timeout_set(attr->child_in, 0);
+ apr_file_pipe_timeout_set(attr->parent_in, 0);
}
}
if (out) {
- if ((status = apr_create_pipe(&attr->parent_out, &attr->child_out,
+ if ((status = apr_file_pipe_create(&attr->parent_out, &attr->child_out,
attr->cntxt)) != APR_SUCCESS) {
return status;
}
@@ -100,18 +100,18 @@
case APR_FULL_BLOCK:
break;
case APR_PARENT_BLOCK:
- apr_set_pipe_timeout(attr->child_out, 0);
+ apr_file_pipe_timeout_set(attr->child_out, 0);
break;
case APR_CHILD_BLOCK:
- apr_set_pipe_timeout(attr->parent_out, 0);
+ apr_file_pipe_timeout_set(attr->parent_out, 0);
break;
default:
- apr_set_pipe_timeout(attr->child_out, 0);
- apr_set_pipe_timeout(attr->parent_out, 0);
+ apr_file_pipe_timeout_set(attr->child_out, 0);
+ apr_file_pipe_timeout_set(attr->parent_out, 0);
}
}
if (err) {
- if ((status = apr_create_pipe(&attr->parent_err, &attr->child_err,
+ if ((status = apr_file_pipe_create(&attr->parent_err, &attr->child_err,
attr->cntxt)) != APR_SUCCESS) {
return status;
}
@@ -119,69 +119,69 @@
case APR_FULL_BLOCK:
break;
case APR_PARENT_BLOCK:
- apr_set_pipe_timeout(attr->child_err, 0);
+ apr_file_pipe_timeout_set(attr->child_err, 0);
break;
case APR_CHILD_BLOCK:
- apr_set_pipe_timeout(attr->parent_err, 0);
+ apr_file_pipe_timeout_set(attr->parent_err, 0);
break;
default:
- apr_set_pipe_timeout(attr->child_err, 0);
- apr_set_pipe_timeout(attr->parent_err, 0);
+ apr_file_pipe_timeout_set(attr->child_err, 0);
+ apr_file_pipe_timeout_set(attr->parent_err, 0);
}
}
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_childin(apr_procattr_t *attr, apr_file_t *child_in,
+apr_status_t apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in,
apr_file_t *parent_in)
{
if (attr->child_in == NULL && attr->parent_in == NULL)
- apr_create_pipe(&attr->child_in, &attr->parent_in, attr->cntxt);
+ apr_file_pipe_create(&attr->child_in, &attr->parent_in, attr->cntxt);
if (child_in != NULL)
- apr_dupfile(&attr->child_in, child_in, attr->cntxt);
+ apr_file_dup(&attr->child_in, child_in, attr->cntxt);
if (parent_in != NULL)
- apr_dupfile(&attr->parent_in, parent_in, attr->cntxt);
+ apr_file_dup(&attr->parent_in, parent_in, attr->cntxt);
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_childout(apr_procattr_t *attr, apr_file_t *child_out,
+apr_status_t apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out,
apr_file_t *parent_out)
{
if (attr->child_out == NULL && attr->parent_out == NULL)
- apr_create_pipe(&attr->child_out, &attr->parent_out, attr->cntxt);
+ apr_file_pipe_create(&attr->child_out, &attr->parent_out, attr->cntxt);
if (child_out != NULL)
- apr_dupfile(&attr->child_out, child_out, attr->cntxt);
+ apr_file_dup(&attr->child_out, child_out, attr->cntxt);
if (parent_out != NULL)
- apr_dupfile(&attr->parent_out, parent_out, attr->cntxt);
+ apr_file_dup(&attr->parent_out, parent_out, attr->cntxt);
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_childerr(apr_procattr_t *attr, apr_file_t *child_err,
+apr_status_t apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err,
apr_file_t *parent_err)
{
if (attr->child_err == NULL && attr->parent_err == NULL)
- apr_create_pipe(&attr->child_err, &attr->parent_err, attr->cntxt);
+ apr_file_pipe_create(&attr->child_err, &attr->parent_err, attr->cntxt);
if (child_err != NULL)
- apr_dupfile(&attr->child_err, child_err, attr->cntxt);
+ apr_file_dup(&attr->child_err, child_err, attr->cntxt);
if (parent_err != NULL)
- apr_dupfile(&attr->parent_err, parent_err, attr->cntxt);
+ apr_file_dup(&attr->parent_err, parent_err, attr->cntxt);
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_dir(apr_procattr_t *attr,
+apr_status_t apr_procattr_dir_set(apr_procattr_t *attr,
const char *dir)
{
attr->currdir = apr_pstrdup(attr->cntxt, dir);
@@ -191,20 +191,20 @@
return APR_ENOMEM;
}
-apr_status_t apr_setprocattr_cmdtype(apr_procattr_t *attr,
+apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr,
apr_cmdtype_e cmd)
{
attr->cmdtype = cmd;
return APR_SUCCESS;
}
-apr_status_t apr_setprocattr_detach(apr_procattr_t *attr, apr_int32_t detach)
+apr_status_t apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
{
attr->detached = detach;
return APR_SUCCESS;
}
-apr_status_t apr_fork(apr_proc_t *proc, apr_pool_t *cont)
+apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
{
int pid;
@@ -270,7 +270,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_create_process(apr_proc_t *new, const char *progname,
+apr_status_t apr_proc_create(apr_proc_t *new, const char *progname,
const char * const *args,
const char * const *env,
apr_procattr_t *attr, apr_pool_t *cont)
@@ -288,19 +288,19 @@
int status;
/* child process */
if (attr->child_in) {
- apr_close(attr->parent_in);
+ apr_file_close(attr->parent_in);
dup2(attr->child_in->filedes, STDIN_FILENO);
- apr_close(attr->child_in);
+ apr_file_close(attr->child_in);
}
if (attr->child_out) {
- apr_close(attr->parent_out);
+ apr_file_close(attr->parent_out);
dup2(attr->child_out->filedes, STDOUT_FILENO);
- apr_close(attr->child_out);
+ apr_file_close(attr->child_out);
}
if (attr->child_err) {
- apr_close(attr->parent_err);
+ apr_file_close(attr->parent_err);
dup2(attr->child_err->filedes, STDERR_FILENO);
- apr_close(attr->child_err);
+ apr_file_close(attr->child_err);
}
apr_signal(SIGCHLD, SIG_DFL); /*not sure if this is needed or not */
@@ -311,7 +311,7 @@
}
}
- apr_cleanup_for_exec();
+ apr_pool_cleanup_for_exec();
if ((status = limit_proc(attr)) != APR_SUCCESS) {
return status;
@@ -333,13 +333,13 @@
}
newargs[i + 2] = NULL;
if (attr->detached) {
- apr_detach();
+ apr_proc_detach();
}
execve(SHELL_PATH, (char * const *) newargs, (char * const *)env);
}
else {
if (attr->detached) {
- apr_detach();
+ apr_proc_detach();
}
execve(progname, (char * const *)args, (char * const *)env);
}
@@ -348,18 +348,18 @@
}
/* Parent process */
if (attr->child_in) {
- apr_close(attr->child_in);
+ apr_file_close(attr->child_in);
}
if (attr->child_out) {
- apr_close(attr->child_out);
+ apr_file_close(attr->child_out);
}
if (attr->child_err) {
- apr_close(attr->child_err);
+ apr_file_close(attr->child_err);
}
return APR_SUCCESS;
}
-apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
+apr_status_t apr_proc_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
apr_wait_how_e waithow, apr_pool_t *p)
{
int waitpid_options = WUNTRACED;
@@ -377,7 +377,7 @@
return errno;
}
-apr_status_t apr_wait_proc(apr_proc_t *proc,
+apr_status_t apr_proc_wait(apr_proc_t *proc,
apr_wait_how_e waithow)
{
pid_t status;
@@ -401,7 +401,7 @@
return errno;
}
-apr_status_t apr_setprocattr_limit(apr_procattr_t *attr, apr_int32_t what,
+apr_status_t apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,
struct rlimit *limit)
{
switch(what) {
1.27 +1 -1 apr/threadproc/unix/procsup.c
Index: procsup.c
===================================================================
RCS file: /home/cvs/apr/threadproc/unix/procsup.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- procsup.c 2000/12/08 04:28:57 1.26
+++ procsup.c 2001/02/08 07:45:17 1.27
@@ -54,7 +54,7 @@
#include "threadproc.h"
-apr_status_t apr_detach(void)
+apr_status_t apr_proc_detach(void)
{
int x;
pid_t pgrp;
1.15 +1 -1 apr/threadproc/unix/signals.c
Index: signals.c
===================================================================
RCS file: /home/cvs/apr/threadproc/unix/signals.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- signals.c 2000/12/08 04:28:58 1.14
+++ signals.c 2001/02/08 07:45:17 1.15
@@ -59,7 +59,7 @@
#include <signal.h>
#endif
-apr_status_t apr_kill(apr_proc_t *proc, int sig)
+apr_status_t apr_proc_kill(apr_proc_t *proc, int sig)
{
if (kill(proc->pid, sig) == -1) {
return errno;
1.33 +26 -26 apr/threadproc/unix/thread.c
Index: thread.c
===================================================================
RCS file: /home/cvs/apr/threadproc/unix/thread.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- thread.c 2000/12/08 04:28:58 1.32
+++ thread.c 2001/02/08 07:45:17 1.33
@@ -59,7 +59,7 @@
#if APR_HAS_THREADS
#if APR_HAVE_PTHREAD_H
-apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont)
+apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont)
{
apr_status_t stat;
@@ -82,7 +82,7 @@
return stat;
}
-apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on)
+apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on)
{
apr_status_t stat;
#ifdef PTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR
@@ -102,7 +102,7 @@
}
}
-apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr)
+apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr)
{
int state;
@@ -116,7 +116,7 @@
return APR_NOTDETACH;
}
-apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr,
+apr_status_t apr_thread_create(apr_thread_t **new, apr_threadattr_t *attr,
apr_thread_start_t func, void *data,
apr_pool_t *cont)
{
@@ -142,7 +142,7 @@
else
temp = NULL;
- stat = apr_create_pool(&(*new)->cntxt, cont);
+ stat = apr_pool_create(&(*new)->cntxt, cont);
if (stat != APR_SUCCESS) {
return stat;
}
@@ -160,7 +160,7 @@
apr_status_t apr_thread_exit(apr_thread_t *thd, apr_status_t *retval)
{
- apr_destroy_pool(thd->cntxt);
+ apr_pool_destroy(thd->cntxt);
pthread_exit(retval);
return APR_SUCCESS;
}
@@ -199,25 +199,25 @@
}
}
-apr_status_t apr_get_threaddata(void **data, const char *key, apr_thread_t *thread)
+apr_status_t apr_thread_data_get(void **data, const char *key, apr_thread_t *thread)
{
- return apr_get_userdata(data, key, thread->cntxt);
+ return apr_pool_userdata_get(data, key, thread->cntxt);
}
-apr_status_t apr_set_threaddata(void *data, const char *key,
+apr_status_t apr_thread_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_thread_t *thread)
{
- return apr_set_userdata(data, key, cleanup, thread->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, thread->cntxt);
}
-apr_status_t apr_get_os_thread(apr_os_thread_t **thethd, apr_thread_t *thd)
+apr_status_t apr_os_thread_get(apr_os_thread_t **thethd, apr_thread_t *thd)
{
*thethd = thd->td;
return APR_SUCCESS;
}
-apr_status_t apr_put_os_thread(apr_thread_t **thd, apr_os_thread_t *thethd,
+apr_status_t apr_os_thread_pupt(apr_thread_t **thd, apr_os_thread_t *thethd,
apr_pool_t *cont)
{
if (cont == NULL) {
@@ -235,77 +235,77 @@
#if !APR_HAS_THREADS
-apr_status_t apr_create_thread(apr_thread_t **new_thread, apr_threadattr_t *attr,
+apr_status_t apr_thread_create(apr_thread_t **new_thread, apr_threadattr_t *attr,
apr_thread_start_t func, void *data,
apr_pool_t *cont)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_create_threadattr(apr_threadattr_t **new, apr_pool_t *cont)
+apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *cont)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_create_thread_private(apr_threadkey_t **key, void (*dest)(void *),
+apr_status_t apr_threadkey_private_create(apr_threadkey_t **key, void (*dest)(void *),
apr_pool_t *cont)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_delete_thread_private(apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_get_os_thread(void); /* avoid warning for no prototype */
+apr_status_t apr_os_thread_get(void); /* avoid warning for no prototype */
-apr_status_t apr_get_os_thread(void)
+apr_status_t apr_os_thread_get(void)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr)
+apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_get_threaddata(void **data, const char *key, apr_thread_t *thread)
+apr_status_t apr_thread_data_get(void **data, const char *key, apr_thread_t *thread)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_get_threadkeydata(void **data, const char *key,
+apr_status_t apr_threadkey_data_get(void **data, const char *key,
apr_threadkey_t *threadkey)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_get_thread_private(void **new_mem, apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_get(void **new_mem, apr_threadkey_t *key)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_setthreadattr_detach(apr_threadattr_t *attr, apr_int32_t on)
+apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr, apr_int32_t on)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_set_threaddata(void *data, const char *key,
+apr_status_t apr_thread_data_set(void *data, const char *key,
apr_status_t (*cleanup)(void *),
apr_thread_t *thread)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_set_threadkeydata(void *data, const char *key,
+apr_status_t apr_threadkey_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_threadkey_t *threadkey)
{
return APR_ENOTIMPL;
}
-apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_set(void *priv, apr_threadkey_t *key)
{
return APR_ENOTIMPL;
}
1.30 +12 -12 apr/threadproc/unix/threadpriv.c
Index: threadpriv.c
===================================================================
RCS file: /home/cvs/apr/threadproc/unix/threadpriv.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- threadpriv.c 2000/12/08 04:28:58 1.29
+++ threadpriv.c 2001/02/08 07:45:17 1.30
@@ -59,7 +59,7 @@
#if APR_HAS_THREADS
#if APR_HAVE_PTHREAD_H
-apr_status_t apr_create_thread_private(apr_threadkey_t **key,
+apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,
void (*dest)(void *), apr_pool_t *cont)
{
apr_status_t stat;
@@ -77,7 +77,7 @@
return stat;
}
-apr_status_t apr_get_thread_private(void **new, apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_get(void **new, apr_threadkey_t *key)
{
#ifdef PTHREAD_GETSPECIFIC_TAKES_TWO_ARGS
if (pthread_getspecific(key->key,new))
@@ -88,7 +88,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_set_thread_private(void *priv, apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_set(void *priv, apr_threadkey_t *key)
{
apr_status_t stat;
if ((stat = pthread_setspecific(key->key, priv)) == 0) {
@@ -100,7 +100,7 @@
}
#ifdef HAVE_PTHREAD_KEY_DELETE
-apr_status_t apr_delete_thread_private(apr_threadkey_t *key)
+apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key)
{
apr_status_t stat;
if ((stat = pthread_key_delete(key->key)) == 0) {
@@ -110,26 +110,26 @@
}
#endif
-apr_status_t apr_get_threadkeydata(void **data, const char *key,
+apr_status_t apr_threadkey_data_get(void **data, const char *key,
apr_threadkey_t *threadkey)
{
- return apr_get_userdata(data, key, threadkey->cntxt);
+ return apr_pool_userdata_get(data, key, threadkey->cntxt);
}
-apr_status_t apr_set_threadkeydata(void *data, const char *key,
+apr_status_t apr_threadkey_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_threadkey_t *threadkey)
{
- return apr_set_userdata(data, key, cleanup, threadkey->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt);
}
-apr_status_t apr_get_os_threadkey(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
+apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_threadkey_t *key)
{
*thekey = key->key;
return APR_SUCCESS;
}
-apr_status_t apr_put_os_threadkey(apr_threadkey_t **key,
+apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,
apr_os_threadkey_t *thekey, apr_pool_t *cont)
{
if (cont == NULL) {
@@ -146,9 +146,9 @@
#endif /* APR_HAS_THREADS */
#if !APR_HAS_THREADS
-apr_status_t apr_get_os_threadkey(void); /* avoid warning for no prototype */
+apr_status_t apr_os_threadkey_get(void); /* avoid warning for no prototype */
-apr_status_t apr_get_os_threadkey(void)
+apr_status_t apr_os_threadkey_get(void)
{
return APR_ENOTIMPL;
}
1.43 +15 -15 apr/threadproc/win32/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apr/threadproc/win32/proc.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- proc.c 2001/01/18 20:07:36 1.42
+++ proc.c 2001/02/08 07:45:19 1.43
@@ -71,7 +71,7 @@
*
*/
-APR_DECLARE(apr_status_t) apr_createprocattr_init(apr_procattr_t **new,
+APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new,
apr_pool_t *cont)
{
(*new) = (apr_procattr_t *)apr_palloc(cont, sizeof(apr_procattr_t));
@@ -152,7 +152,7 @@
if (original == NULL)
return APR_SUCCESS;
- /* Can't use apr_dupfile here because it creates a non-inhertible
+ /* Can't use apr_file_dup here because it creates a non-inhertible
* handle, and apr_open_file'd apr_file_t's are non-inheritable,
* so we must assume we need to make an inheritable handle.
*/
@@ -170,7 +170,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_setprocattr_io(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
apr_int32_t in,
apr_int32_t out,
apr_int32_t err)
@@ -204,7 +204,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_setprocattr_childin(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr,
apr_file_t *child_in,
apr_file_t *parent_in)
{
@@ -227,7 +227,7 @@
return stat;
}
-APR_DECLARE(apr_status_t) apr_setprocattr_childout(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr,
apr_file_t *child_out,
apr_file_t *parent_out)
{
@@ -250,7 +250,7 @@
return stat;
}
-APR_DECLARE(apr_status_t) apr_setprocattr_childerr(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr,
apr_file_t *child_err,
apr_file_t *parent_err)
{
@@ -273,7 +273,7 @@
return stat;
}
-APR_DECLARE(apr_status_t) apr_setprocattr_dir(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
const char *dir)
{
char path[MAX_PATH];
@@ -297,14 +297,14 @@
return APR_ENOMEM;
}
-APR_DECLARE(apr_status_t) apr_setprocattr_cmdtype(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,
apr_cmdtype_e cmd)
{
attr->cmdtype = cmd;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_setprocattr_detach(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr,
apr_int32_t det)
{
attr->detached = det;
@@ -312,11 +312,11 @@
}
/* TODO:
- * apr_create_process with APR_SHELLCMD on Win9x won't work due to MS KB:
+ * apr_proc_create with APR_SHELLCMD on Win9x won't work due to MS KB:
* Q150956
*/
-APR_DECLARE(apr_status_t) apr_create_process(apr_proc_t *new,
+APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
const char *progname,
const char * const *args,
const char * const *env,
@@ -440,13 +440,13 @@
new->pid = (pid_t) pi.hProcess;
if (attr->child_in) {
- apr_close(attr->child_in);
+ apr_file_close(attr->child_in);
}
if (attr->child_out) {
- apr_close(attr->child_out);
+ apr_file_close(attr->child_out);
}
if (attr->child_err) {
- apr_close(attr->child_err);
+ apr_file_close(attr->child_err);
}
CloseHandle(pi.hThread);
@@ -456,7 +456,7 @@
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_wait_proc(apr_proc_t *proc, apr_wait_how_e wait)
+APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc, apr_wait_how_e wait)
{
DWORD stat;
if (!proc)
1.12 +1 -1 apr/threadproc/win32/signals.c
Index: signals.c
===================================================================
RCS file: /home/cvs/apr/threadproc/win32/signals.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- signals.c 2001/01/18 20:07:36 1.11
+++ signals.c 2001/02/08 07:45:20 1.12
@@ -64,7 +64,7 @@
#endif
/* Windows only really support killing process, but that will do for now. */
-APR_DECLARE(apr_status_t) apr_kill(apr_proc_t *proc, int signal)
+APR_DECLARE(apr_status_t) apr_proc_kill(apr_proc_t *proc, int signal)
{
if (TerminateProcess((HANDLE)proc->pid, signal) == 0) {
return apr_get_os_error();
1.28 +12 -12 apr/threadproc/win32/thread.c
Index: thread.c
===================================================================
RCS file: /home/cvs/apr/threadproc/win32/thread.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- thread.c 2001/01/18 20:07:36 1.27
+++ thread.c 2001/02/08 07:45:20 1.28
@@ -61,7 +61,7 @@
#include <process.h>
-APR_DECLARE(apr_status_t) apr_create_threadattr(apr_threadattr_t **new,
+APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new,
apr_pool_t *cont)
{
(*new) = (apr_threadattr_t *)apr_palloc(cont,
@@ -75,21 +75,21 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_setthreadattr_detach(apr_threadattr_t *attr,
+APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr,
apr_int32_t on)
{
attr->detach = on;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_getthreadattr_detach(apr_threadattr_t *attr)
+APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr)
{
if (attr->detach == 1)
return APR_DETACH;
return APR_NOTDETACH;
}
-APR_DECLARE(apr_status_t) apr_create_thread(apr_thread_t **new,
+APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
apr_threadattr_t *attr,
apr_thread_start_t func,
void *data, apr_pool_t *cont)
@@ -106,7 +106,7 @@
(*new)->cntxt = cont;
- stat = apr_create_pool(&(*new)->cntxt, cont);
+ stat = apr_pool_create(&(*new)->cntxt, cont);
if (stat != APR_SUCCESS) {
return stat;
}
@@ -133,7 +133,7 @@
APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd,
apr_status_t *retval)
{
- apr_destroy_pool(thd->cntxt);
+ apr_pool_destroy(thd->cntxt);
_endthreadex(*retval);
return APR_SUCCESS;
}
@@ -164,20 +164,20 @@
}
}
-APR_DECLARE(apr_status_t) apr_get_threaddata(void **data, const char *key,
+APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key,
apr_thread_t *thread)
{
- return apr_get_userdata(data, key, thread->cntxt);
+ return apr_pool_userdata_get(data, key, thread->cntxt);
}
-APR_DECLARE(apr_status_t) apr_set_threaddata(void *data, const char *key,
+APR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key,
apr_status_t (*cleanup) (void *),
apr_thread_t *thread)
{
- return apr_set_userdata(data, key, cleanup, thread->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, thread->cntxt);
}
-APR_DECLARE(apr_status_t) apr_get_os_thread(apr_os_thread_t **thethd,
+APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd,
apr_thread_t *thd)
{
if (thd == NULL) {
@@ -187,7 +187,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_put_os_thread(apr_thread_t **thd,
+APR_DECLARE(apr_status_t) apr_os_thread_pupt(apr_thread_t **thd,
apr_os_thread_t *thethd,
apr_pool_t *cont)
{
1.23 +10 -10 apr/threadproc/win32/threadpriv.c
Index: threadpriv.c
===================================================================
RCS file: /home/cvs/apr/threadproc/win32/threadpriv.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- threadpriv.c 2001/01/18 20:07:37 1.22
+++ threadpriv.c 2001/02/08 07:45:20 1.23
@@ -59,7 +59,7 @@
#include "apr_errno.h"
#include "apr_portable.h"
-APR_DECLARE(apr_status_t) apr_create_thread_private(apr_threadkey_t **key,
+APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key,
void (*dest)(void *),
apr_pool_t *cont)
{
@@ -69,7 +69,7 @@
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_get_thread_private(void **new,
+APR_DECLARE(apr_status_t) apr_threadkey_private_get(void **new,
apr_threadkey_t *key)
{
if ((*new) = TlsGetValue(key->key)) {
@@ -78,7 +78,7 @@
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_set_thread_private(void *priv,
+APR_DECLARE(apr_status_t) apr_threadkey_private_set(void *priv,
apr_threadkey_t *key)
{
if (TlsSetValue(key->key, priv)) {
@@ -87,7 +87,7 @@
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_delete_thread_private(apr_threadkey_t *key)
+APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key)
{
if (TlsFree(key->key)) {
return APR_SUCCESS;
@@ -95,27 +95,27 @@
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_get_threadkeydata(void **data, const char *key,
+APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key,
apr_threadkey_t *threadkey)
{
- return apr_get_userdata(data, key, threadkey->cntxt);
+ return apr_pool_userdata_get(data, key, threadkey->cntxt);
}
-APR_DECLARE(apr_status_t) apr_set_threadkeydata(void *data, const char *key,
+APR_DECLARE(apr_status_t) apr_threadkey_data_set(void *data, const char *key,
apr_status_t (*cleanup)(void *),
apr_threadkey_t *threadkey)
{
- return apr_set_userdata(data, key, cleanup, threadkey->cntxt);
+ return apr_pool_userdata_set(data, key, cleanup, threadkey->cntxt);
}
-APR_DECLARE(apr_status_t) apr_get_os_threadkey(apr_os_threadkey_t *thekey,
+APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey,
apr_threadkey_t *key)
{
*thekey = key->key;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_put_os_threadkey(apr_threadkey_t **key,
+APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
apr_os_threadkey_t *thekey,
apr_pool_t *cont)
{
1.34 +5 -5 apr/time/unix/time.c
Index: time.c
===================================================================
RCS file: /home/cvs/apr/time/unix/time.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- time.c 2001/01/28 15:30:32 1.33
+++ time.c 2001/02/08 07:45:22 1.34
@@ -79,7 +79,7 @@
}
-apr_time_t apr_now(void)
+apr_time_t apr_time_now(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
@@ -211,14 +211,14 @@
return APR_SUCCESS;
}
-apr_status_t apr_get_os_imp_time(apr_os_imp_time_t **ostime, apr_time_t *aprtime)
+apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime, apr_time_t *aprtime)
{
(*ostime)->tv_usec = *aprtime % APR_USEC_PER_SEC;
(*ostime)->tv_sec = *aprtime / APR_USEC_PER_SEC;
return APR_SUCCESS;
}
-apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime,
+apr_status_t apr_os_exp_time_get(apr_os_exp_time_t **ostime,
apr_exploded_time_t *aprtime)
{
(*ostime)->tm_sec = aprtime->tm_sec;
@@ -233,14 +233,14 @@
return APR_SUCCESS;
}
-apr_status_t apr_put_os_imp_time(apr_time_t *aprtime, apr_os_imp_time_t **ostime,
+apr_status_t apr_os_imp_time_put(apr_time_t *aprtime, apr_os_imp_time_t **ostime,
apr_pool_t *cont)
{
*aprtime = (*ostime)->tv_sec * APR_USEC_PER_SEC + (*ostime)->tv_usec;
return APR_SUCCESS;
}
-apr_status_t apr_put_os_exp_time(apr_exploded_time_t *aprtime,
+apr_status_t apr_os_exp_time_pupt(apr_exploded_time_t *aprtime,
apr_os_exp_time_t **ostime, apr_pool_t *cont)
{
aprtime->tm_sec = (*ostime)->tm_sec;
1.18 +5 -5 apr/time/win32/time.c
Index: time.c
===================================================================
RCS file: /home/cvs/apr/time/win32/time.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- time.c 2001/02/02 14:43:53 1.17
+++ time.c 2001/02/08 07:45:23 1.18
@@ -145,7 +145,7 @@
}
/* Return micro-seconds since the Unix epoch (jan. 1, 1970) UTC */
-APR_DECLARE(apr_time_t) apr_now(void)
+APR_DECLARE(apr_time_t) apr_time_now(void)
{
LONGLONG aprtime = 0;
FILETIME time;
@@ -213,7 +213,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_os_imp_time(apr_os_imp_time_t **ostime,
+APR_DECLARE(apr_status_t) apr_os_imp_time_get(apr_os_imp_time_t **ostime,
apr_time_t *aprtime)
{
/* TODO: Consider not passing in pointer to apr_time_t (e.g., call by value) */
@@ -221,7 +221,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_get_os_exp_time(apr_os_exp_time_t **ostime,
+APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime,
apr_exploded_time_t *aprexptime)
{
(*ostime)->wYear = aprexptime->tm_year + 1900;
@@ -235,7 +235,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_put_os_imp_time(apr_time_t *aprtime,
+APR_DECLARE(apr_status_t) apr_os_imp_time_put(apr_time_t *aprtime,
apr_os_imp_time_t **ostime,
apr_pool_t *cont)
{
@@ -243,7 +243,7 @@
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_put_os_exp_time(apr_exploded_time_t *aprtime,
+APR_DECLARE(apr_status_t) apr_os_exp_time_pupt(apr_exploded_time_t *aprtime,
apr_os_exp_time_t **ostime,
apr_pool_t *cont)
{
1.4 +4 -4 apr-util/buckets/apr_brigade.c
Index: apr_brigade.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_brigade.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- apr_brigade.c 2001/01/19 07:01:59 1.3
+++ apr_brigade.c 2001/02/08 07:45:23 1.4
@@ -89,7 +89,7 @@
}
APU_DECLARE(apr_status_t) apr_brigade_destroy(apr_bucket_brigade *b)
{
- apr_kill_cleanup(b->p, b, apr_brigade_cleanup);
+ apr_pool_cleanup_kill(b->p, b, apr_brigade_cleanup);
return apr_brigade_cleanup(b);
}
@@ -101,7 +101,7 @@
b->p = p;
APR_RING_INIT(&b->list, apr_bucket, link);
- apr_register_cleanup(b->p, b, apr_brigade_cleanup, apr_brigade_cleanup);
+ apr_pool_cleanup_register(b->p, b, apr_brigade_cleanup, apr_brigade_cleanup);
return b;
}
@@ -199,7 +199,7 @@
j = strlen(x);
/* XXX: copy or not? let the caller decide? */
- r = apr_bucket_create_heap(x, j, 1, &i);
+ r = apr_bucket_heap_create(x, j, 1, &i);
if (i != j) {
/* Do we need better error reporting? */
return -1;
@@ -245,7 +245,7 @@
res = apr_vsnprintf(buf, 4096, fmt, va);
- r = apr_bucket_create_heap(buf, strlen(buf), 1, NULL);
+ r = apr_bucket_heap_create(buf, strlen(buf), 1, NULL);
APR_BRIGADE_INSERT_TAIL(b, r);
return res;
1.46 +16 -16 apr-util/buckets/apr_buckets.c
Index: apr_buckets.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- apr_buckets.c 2001/01/27 14:52:54 1.45
+++ apr_buckets.c 2001/02/08 07:45:23 1.46
@@ -70,46 +70,46 @@
static apr_array_header_t *bucket_types;
-APU_DECLARE(void) apr_init_bucket_types(apr_pool_t *p)
+APU_DECLARE(void) apr_bucket_init_types(apr_pool_t *p)
{
- bucket_types = apr_make_array(p, 8, sizeof(apr_bucket_type_t));
+ bucket_types = apr_array_make(p, 8, sizeof(apr_bucket_type_t));
- apr_insert_bucket_type(&apr_bucket_type_eos);
- apr_insert_bucket_type(&apr_bucket_type_file);
- apr_insert_bucket_type(&apr_bucket_type_heap);
+ apr_bucket_insert_type(&apr_bucket_type_eos);
+ apr_bucket_insert_type(&apr_bucket_type_file);
+ apr_bucket_insert_type(&apr_bucket_type_heap);
#if APR_HAS_MMAP
- apr_insert_bucket_type(&apr_bucket_type_mmap);
+ apr_bucket_insert_type(&apr_bucket_type_mmap);
#endif
- apr_insert_bucket_type(&apr_bucket_type_pipe);
- apr_insert_bucket_type(&apr_bucket_type_immortal);
- apr_insert_bucket_type(&apr_bucket_type_transient);
- apr_insert_bucket_type(&apr_bucket_type_socket);
+ apr_bucket_insert_type(&apr_bucket_type_pipe);
+ apr_bucket_insert_type(&apr_bucket_type_immortal);
+ apr_bucket_insert_type(&apr_bucket_type_transient);
+ apr_bucket_insert_type(&apr_bucket_type_socket);
}
-APU_DECLARE(int) apr_insert_bucket_type(const apr_bucket_type_t *type)
+APU_DECLARE(int) apr_bucket_insert_type(const apr_bucket_type_t *type)
{
const apr_bucket_type_t **newone;
- newone = (const apr_bucket_type_t **)apr_push_array(bucket_types);
+ newone = (const apr_bucket_type_t **)apr_array_push(bucket_types);
newone = &type;
return bucket_types->nelts - 1;
}
-APU_DECLARE_NONSTD(apr_status_t) apr_bucket_setaside_notimpl(apr_bucket *data)
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_notimpl_setaside(apr_bucket *data)
{
return APR_ENOTIMPL;
}
-APU_DECLARE_NONSTD(apr_status_t) apr_bucket_split_notimpl(apr_bucket *data, apr_off_t point)
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_notimpl_split(apr_bucket *data, apr_off_t point)
{
return APR_ENOTIMPL;
}
-APU_DECLARE_NONSTD(apr_status_t) apr_bucket_copy_notimpl(apr_bucket *e, apr_bucket **c)
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_notimpl_copy(apr_bucket *e, apr_bucket **c)
{
return APR_ENOTIMPL;
}
-APU_DECLARE_NONSTD(void) apr_bucket_destroy_notimpl(void *data)
+APU_DECLARE_NONSTD(void) apr_bucket_notimpl_destroy(void *data)
{
return;
}
1.19 +7 -7 apr-util/buckets/apr_buckets_eos.c
Index: apr_buckets_eos.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_eos.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- apr_buckets_eos.c 2001/01/19 07:02:00 1.18
+++ apr_buckets_eos.c 2001/02/08 07:45:23 1.19
@@ -65,11 +65,11 @@
static apr_status_t eos_copy(apr_bucket *e, apr_bucket **c)
{
- *c = apr_bucket_create_eos();
+ *c = apr_bucket_eos_create();
return APR_SUCCESS;
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_eos(apr_bucket *b)
+APU_DECLARE(apr_bucket *) apr_bucket_eos_make(apr_bucket *b)
{
b->length = 0;
b->data = NULL;
@@ -79,16 +79,16 @@
return b;
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_eos(void)
+APU_DECLARE(apr_bucket *) apr_bucket_eos_create(void)
{
- apr_bucket_do_create(apr_bucket_make_eos(b));
+ apr_bucket_do_create(apr_bucket_eos_make(b));
}
APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_eos = {
"EOS", 5,
- apr_bucket_destroy_notimpl,
+ apr_bucket_notimpl_destroy,
eos_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_notimpl,
+ apr_bucket_notimpl_setaside,
+ apr_bucket_notimpl_split,
eos_copy
};
1.28 +14 -14 apr-util/buckets/apr_buckets_file.c
Index: apr_buckets_file.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_file.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- apr_buckets_file.c 2001/02/07 15:24:24 1.27
+++ apr_buckets_file.c 2001/02/08 07:45:23 1.28
@@ -89,7 +89,7 @@
{
apr_bucket_file *f;
- f = apr_bucket_destroy_shared(data);
+ f = apr_bucket_shared_destroy(data);
if (f == NULL) {
return;
}
@@ -117,7 +117,7 @@
/* we need to protect ourselves in case we die while we've got the
* file mmapped */
apr_status_t status;
- apr_pool_t *p = apr_get_file_pool(f);
+ apr_pool_t *p = apr_file_pool_get(f);
if ((status = apr_mmap_create(&mm, f, s->start, e->length,
APR_MMAP_READ, p)) != APR_SUCCESS) {
mm = NULL;
@@ -127,7 +127,7 @@
mm = NULL;
}
if (mm) {
- apr_bucket_make_mmap(e, mm, 0, e->length); /*XXX: check for failure? */
+ apr_bucket_mmap_make(e, mm, 0, e->length); /*XXX: check for failure? */
file_destroy(s);
return apr_bucket_read(e, str, len, block);
}
@@ -146,13 +146,13 @@
/* Handle offset ... */
if (s->start) {
- rv = apr_seek(f, APR_SET, &s->start);
+ rv = apr_file_seek(f, APR_SET, &s->start);
if (rv != APR_SUCCESS) {
free(buf);
return rv;
}
}
- rv = apr_read(f, buf, len);
+ rv = apr_file_read(f, buf, len);
if (rv != APR_SUCCESS && rv != APR_EOF) {
free(buf);
return rv;
@@ -163,12 +163,12 @@
* Change the current bucket to refer to what we read,
* even if we read nothing because we hit EOF.
*/
- apr_bucket_make_heap(e, buf, *len, 0, NULL); /*XXX: check for failure? */
+ apr_bucket_heap_make(e, buf, *len, 0, NULL); /*XXX: check for failure? */
file_destroy(s);
/* If we have more to read from the file, then create another bucket */
if (length > 0) {
- b = apr_bucket_create_file(f, s->start + (*len), length);
+ b = apr_bucket_file_create(f, s->start + (*len), length);
APR_BUCKET_INSERT_AFTER(e, b);
}
#if APR_HAS_MMAP
@@ -177,7 +177,7 @@
return APR_SUCCESS;
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_file(apr_bucket *b, apr_file_t *fd,
+APU_DECLARE(apr_bucket *) apr_bucket_file_make(apr_bucket *b, apr_file_t *fd,
apr_off_t offset, apr_size_t len)
{
apr_bucket_file *f;
@@ -188,7 +188,7 @@
}
f->fd = fd;
- b = apr_bucket_make_shared(b, f, offset, offset + len);
+ b = apr_bucket_shared_make(b, f, offset, offset + len);
if (b == NULL) {
free(f);
return NULL;
@@ -199,17 +199,17 @@
return b;
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_file(apr_file_t *fd,
+APU_DECLARE(apr_bucket *) apr_bucket_file_create(apr_file_t *fd,
apr_off_t offset, apr_size_t len)
{
- apr_bucket_do_create(apr_bucket_make_file(b, fd, offset, len));
+ apr_bucket_do_create(apr_bucket_file_make(b, fd, offset, len));
}
APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_file = {
"FILE", 5,
file_destroy,
file_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_shared,
- apr_bucket_copy_shared
+ apr_bucket_notimpl_setaside,
+ apr_bucket_shared_split,
+ apr_bucket_shared_copy
};
1.11 +7 -7 apr-util/buckets/apr_buckets_flush.c
Index: apr_buckets_flush.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_flush.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- apr_buckets_flush.c 2001/01/19 07:02:00 1.10
+++ apr_buckets_flush.c 2001/02/08 07:45:24 1.11
@@ -65,11 +65,11 @@
static apr_status_t flush_copy(apr_bucket *e, apr_bucket **c)
{
- *c = apr_bucket_create_flush();
+ *c = apr_bucket_flush_create();
return APR_SUCCESS;
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_flush(apr_bucket *b)
+APU_DECLARE(apr_bucket *) apr_bucket_flush_make(apr_bucket *b)
{
b->length = 0;
b->data = NULL;
@@ -79,16 +79,16 @@
return b;
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_flush(void)
+APU_DECLARE(apr_bucket *) apr_bucket_flush_create(void)
{
- apr_bucket_do_create(apr_bucket_make_flush(b));
+ apr_bucket_do_create(apr_bucket_flush_make(b));
}
APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_flush = {
"FLUSH", 5,
- apr_bucket_destroy_notimpl,
+ apr_bucket_notimpl_destroy,
flush_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_notimpl,
+ apr_bucket_notimpl_setaside,
+ apr_bucket_notimpl_split,
flush_copy
};
1.25 +8 -8 apr-util/buckets/apr_buckets_heap.c
Index: apr_buckets_heap.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_heap.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- apr_buckets_heap.c 2001/02/06 16:21:17 1.24
+++ apr_buckets_heap.c 2001/02/08 07:45:24 1.25
@@ -73,7 +73,7 @@
{
apr_bucket_heap *h;
- h = apr_bucket_destroy_shared(data);
+ h = apr_bucket_shared_destroy(data);
if (h == NULL) {
return;
}
@@ -81,7 +81,7 @@
free(h);
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_heap(apr_bucket *b,
+APU_DECLARE(apr_bucket *) apr_bucket_heap_make(apr_bucket *b,
const char *buf, apr_size_t length, int copy, apr_size_t *w)
{
apr_bucket_heap *h;
@@ -108,7 +108,7 @@
h->alloc_len = length;
}
- b = apr_bucket_make_shared(b, h, 0, length);
+ b = apr_bucket_shared_make(b, h, 0, length);
if (b == NULL) {
if (copy) {
free(h->base);
@@ -125,17 +125,17 @@
return b;
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_heap(
+APU_DECLARE(apr_bucket *) apr_bucket_heap_create(
const char *buf, apr_size_t length, int copy, apr_size_t *w)
{
- apr_bucket_do_create(apr_bucket_make_heap(b, buf, length, copy, w));
+ apr_bucket_do_create(apr_bucket_heap_make(b, buf, length, copy, w));
}
APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_heap = {
"HEAP", 5,
heap_destroy,
heap_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_shared,
- apr_bucket_copy_shared
+ apr_bucket_notimpl_setaside,
+ apr_bucket_shared_split,
+ apr_bucket_shared_copy
};
1.27 +8 -8 apr-util/buckets/apr_buckets_mmap.c
Index: apr_buckets_mmap.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_mmap.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- apr_buckets_mmap.c 2001/01/22 23:11:30 1.26
+++ apr_buckets_mmap.c 2001/02/08 07:45:24 1.27
@@ -79,7 +79,7 @@
{
apr_bucket_mmap *m;
- m = apr_bucket_destroy_shared(data);
+ m = apr_bucket_shared_destroy(data);
if (m == NULL) {
return;
}
@@ -89,7 +89,7 @@
/*
* XXX: are the start and length arguments useful?
*/
-APU_DECLARE(apr_bucket *) apr_bucket_make_mmap(apr_bucket *b,
+APU_DECLARE(apr_bucket *) apr_bucket_mmap_make(apr_bucket *b,
apr_mmap_t *mm, apr_off_t start, apr_size_t length)
{
apr_bucket_mmap *m;
@@ -100,7 +100,7 @@
}
m->mmap = mm;
- b = apr_bucket_make_shared(b, m, start, start+length);
+ b = apr_bucket_shared_make(b, m, start, start+length);
if (b == NULL) {
free(m);
return NULL;
@@ -112,19 +112,19 @@
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_mmap(
+APU_DECLARE(apr_bucket *) apr_bucket_mmap_create(
apr_mmap_t *mm, apr_off_t start, apr_size_t length)
{
- apr_bucket_do_create(apr_bucket_make_mmap(b, mm, start, length));
+ apr_bucket_do_create(apr_bucket_mmap_make(b, mm, start, length));
}
APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_mmap = {
"MMAP", 5,
mmap_destroy,
mmap_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_shared,
- apr_bucket_copy_shared
+ apr_bucket_notimpl_setaside,
+ apr_bucket_shared_split,
+ apr_bucket_shared_copy
};
#endif
1.27 +14 -14 apr-util/buckets/apr_buckets_pipe.c
Index: apr_buckets_pipe.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_pipe.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- apr_buckets_pipe.c 2001/01/19 07:02:00 1.26
+++ apr_buckets_pipe.c 2001/02/08 07:45:24 1.27
@@ -66,17 +66,17 @@
apr_interval_time_t timeout;
if (block == APR_NONBLOCK_READ) {
- apr_get_pipe_timeout(p, &timeout);
- apr_set_pipe_timeout(p, 0);
+ apr_file_pipe_timeout_get(p, &timeout);
+ apr_file_pipe_timeout_set(p, 0);
}
buf = malloc(HUGE_STRING_LEN); /* XXX: check for failure? */
*str = buf;
*len = HUGE_STRING_LEN;
- rv = apr_read(p, buf, len);
+ rv = apr_file_read(p, buf, len);
if (block == APR_NONBLOCK_READ) {
- apr_set_pipe_timeout(p, timeout);
+ apr_file_pipe_timeout_set(p, timeout);
}
if (rv != APR_SUCCESS && rv != APR_EOF) {
@@ -88,7 +88,7 @@
* Change the current bucket to refer to what we read,
* even if we read nothing because we hit EOF.
*/
- apr_bucket_make_heap(a, buf, *len, 0, NULL); /* XXX: check for failure? */
+ apr_bucket_heap_make(a, buf, *len, 0, NULL); /* XXX: check for failure? */
/*
* If there's more to read we have to keep the rest of the pipe
* for later. Otherwise, we'll close the pipe.
@@ -102,17 +102,17 @@
* new bucket.
*/
if (*len > 0) {
- b = apr_bucket_create_pipe(p);
+ b = apr_bucket_pipe_creat(p);
APR_BUCKET_INSERT_AFTER(a, b);
}
else if (rv == APR_EOF) {
- apr_close(p);
+ apr_file_close(p);
return (block == APR_NONBLOCK_READ) ? APR_EOF : APR_SUCCESS;
}
return APR_SUCCESS;
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_pipe(apr_bucket *b, apr_file_t *p)
+APU_DECLARE(apr_bucket *) apr_bucket_pipe_make(apr_bucket *b, apr_file_t *p)
{
/*
* A pipe is closed when the end is reached in pipe_read(). If the
@@ -134,16 +134,16 @@
return b;
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_pipe(apr_file_t *p)
+APU_DECLARE(apr_bucket *) apr_bucket_pipe_creat(apr_file_t *p)
{
- apr_bucket_do_create(apr_bucket_make_pipe(b, p));
+ apr_bucket_do_create(apr_bucket_pipe_make(b, p));
}
APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_pipe = {
"PIPE", 5,
- apr_bucket_destroy_notimpl,
+ apr_bucket_notimpl_destroy,
pipe_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_notimpl,
- apr_bucket_copy_notimpl
+ apr_bucket_notimpl_setaside,
+ apr_bucket_notimpl_split,
+ apr_bucket_notimpl_copy
};
1.10 +12 -12 apr-util/buckets/apr_buckets_pool.c
Index: apr_buckets_pool.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_pool.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- apr_buckets_pool.c 2001/01/19 07:02:00 1.9
+++ apr_buckets_pool.c 2001/02/08 07:45:24 1.10
@@ -63,13 +63,13 @@
apr_bucket *b = h->b;
apr_size_t w;
- apr_bucket_make_heap(b, h->base, b->length, 1, &w);
+ apr_bucket_heap_make(b, h->base, b->length, 1, &w);
new = b->data;
new->start = s->start;
new->end = s->end;
- apr_bucket_destroy_shared(s);
+ apr_bucket_shared_destroy(s);
return APR_SUCCESS;
}
@@ -89,15 +89,15 @@
apr_bucket_shared *s = data;
apr_bucket_pool *h = s->data;
- apr_kill_cleanup(h->p, data, pool_bucket_cleanup);
- h = apr_bucket_destroy_shared(data);
+ apr_pool_cleanup_kill(h->p, data, pool_bucket_cleanup);
+ h = apr_bucket_shared_destroy(data);
if (h == NULL) {
return;
}
free(h);
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_pool(apr_bucket *b,
+APU_DECLARE(apr_bucket *) apr_bucket_pool_make(apr_bucket *b,
const char *buf, apr_size_t length, apr_pool_t *p)
{
apr_bucket_pool *h;
@@ -113,7 +113,7 @@
h->base = (char *) buf;
h->p = p;
- b = apr_bucket_make_shared(b, h, 0, length);
+ b = apr_bucket_shared_make(b, h, 0, length);
if (b == NULL) {
free(h);
return NULL;
@@ -122,21 +122,21 @@
b->type = &apr_bucket_type_pool;
h->b = b;
- apr_register_cleanup(h->p, b->data, pool_bucket_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(h->p, b->data, pool_bucket_cleanup, apr_pool_cleanup_null);
return b;
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_pool(
+APU_DECLARE(apr_bucket *) apr_bucket_pool_create(
const char *buf, apr_size_t length, apr_pool_t *p)
{
- apr_bucket_do_create(apr_bucket_make_pool(b, buf, length, p));
+ apr_bucket_do_create(apr_bucket_pool_make(b, buf, length, p));
}
APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_pool = {
"POOL", 5,
pool_destroy,
pool_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_shared,
- apr_bucket_copy_shared
+ apr_bucket_notimpl_setaside,
+ apr_bucket_shared_split,
+ apr_bucket_shared_copy
};
1.13 +5 -5 apr-util/buckets/apr_buckets_refcount.c
Index: apr_buckets_refcount.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_refcount.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- apr_buckets_refcount.c 2001/01/19 07:02:00 1.12
+++ apr_buckets_refcount.c 2001/02/08 07:45:24 1.13
@@ -58,7 +58,7 @@
#include "apr_buckets.h"
-APU_DECLARE_NONSTD(apr_status_t) apr_bucket_split_shared(apr_bucket *a, apr_off_t point)
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_shared_split(apr_bucket *a, apr_off_t point)
{
apr_bucket *b;
apr_bucket_shared *ad, *bd;
@@ -68,7 +68,7 @@
return APR_EINVAL;
}
- rv = apr_bucket_copy_shared(a, &b);
+ rv = apr_bucket_shared_copy(a, &b);
if (rv != APR_SUCCESS) {
return rv;
}
@@ -86,7 +86,7 @@
return APR_SUCCESS;
}
-APU_DECLARE_NONSTD(apr_status_t) apr_bucket_copy_shared(apr_bucket *a, apr_bucket **c)
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_shared_copy(apr_bucket *a, apr_bucket **c)
{
apr_bucket *b;
apr_bucket_shared *ad, *bd;
@@ -114,7 +114,7 @@
return APR_SUCCESS;
}
-APU_DECLARE(void *) apr_bucket_destroy_shared(void *data)
+APU_DECLARE(void *) apr_bucket_shared_destroy(void *data)
{
apr_bucket_shared *s = data;
apr_bucket_refcount *r = s->data;
@@ -129,7 +129,7 @@
}
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_shared(apr_bucket *b, void *data,
+APU_DECLARE(apr_bucket *) apr_bucket_shared_make(apr_bucket *b, void *data,
apr_off_t start, apr_off_t end)
{
apr_bucket_shared *s;
1.20 +9 -9 apr-util/buckets/apr_buckets_simple.c
Index: apr_buckets_simple.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_simple.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- apr_buckets_simple.c 2001/01/19 07:02:00 1.19
+++ apr_buckets_simple.c 2001/02/08 07:45:24 1.20
@@ -120,7 +120,7 @@
return APR_SUCCESS;
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_immortal(apr_bucket *b,
+APU_DECLARE(apr_bucket *) apr_bucket_immortal_make(apr_bucket *b,
const char *buf, apr_size_t length)
{
apr_bucket_simple *bd;
@@ -140,10 +140,10 @@
return b;
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_immortal(
+APU_DECLARE(apr_bucket *) apr_bucket_immortal_create(
const char *buf, apr_size_t length)
{
- apr_bucket_do_create(apr_bucket_make_immortal(b, buf, length));
+ apr_bucket_do_create(apr_bucket_immortal_make(b, buf, length));
}
/*
@@ -165,7 +165,7 @@
start = bd->start;
end = bd->end;
/* XXX: handle small heap buckets */
- b = apr_bucket_make_heap(b, start, end-start, 1, &w);
+ b = apr_bucket_heap_make(b, start, end-start, 1, &w);
if (b == NULL || w != end-start) {
return APR_ENOMEM;
}
@@ -173,10 +173,10 @@
return APR_SUCCESS;
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_transient(apr_bucket *b,
+APU_DECLARE(apr_bucket *) apr_bucket_transient_make(apr_bucket *b,
const char *buf, apr_size_t length)
{
- b = apr_bucket_make_immortal(b, buf, length);
+ b = apr_bucket_immortal_make(b, buf, length);
if (b == NULL) {
return NULL;
}
@@ -184,17 +184,17 @@
return b;
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_transient(
+APU_DECLARE(apr_bucket *) apr_bucket_transient_create(
const char *buf, apr_size_t length)
{
- apr_bucket_do_create(apr_bucket_make_transient(b, buf, length));
+ apr_bucket_do_create(apr_bucket_transient_make(b, buf, length));
}
const apr_bucket_type_t apr_bucket_type_immortal = {
"IMMORTAL", 5,
free,
simple_read,
- apr_bucket_setaside_notimpl,
+ apr_bucket_notimpl_setaside,
simple_split,
simple_copy
};
1.16 +9 -9 apr-util/buckets/apr_buckets_socket.c
Index: apr_buckets_socket.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_socket.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- apr_buckets_socket.c 2001/01/19 07:02:00 1.15
+++ apr_buckets_socket.c 2001/02/08 07:45:24 1.16
@@ -89,7 +89,7 @@
* Change the current bucket to refer to what we read,
* even if we read nothing because we hit EOF.
*/
- apr_bucket_make_heap(a, buf, *len, 0, NULL); /* XXX: check for failure? */
+ apr_bucket_heap_make(a, buf, *len, 0, NULL); /* XXX: check for failure? */
/*
* If there's more to read we have to keep the rest of the socket
* for later. XXX: Note that more complicated bucket types that
@@ -106,7 +106,7 @@
* down for reading, but there is no benefit to doing so.
*/
if (*len > 0) {
- b = apr_bucket_create_socket(p);
+ b = apr_bucket_socket_create(p);
APR_BUCKET_INSERT_AFTER(a, b);
}
else if (rv == APR_EOF && block == APR_NONBLOCK_READ) {
@@ -115,7 +115,7 @@
return APR_SUCCESS;
}
-APU_DECLARE(apr_bucket *) apr_bucket_make_socket(apr_bucket *b, apr_socket_t *p)
+APU_DECLARE(apr_bucket *) apr_bucket_socket_make(apr_bucket *b, apr_socket_t *p)
{
/*
* XXX: We rely on a cleanup on some pool or other to actually
@@ -132,16 +132,16 @@
return b;
}
-APU_DECLARE(apr_bucket *) apr_bucket_create_socket(apr_socket_t *p)
+APU_DECLARE(apr_bucket *) apr_bucket_socket_create(apr_socket_t *p)
{
- apr_bucket_do_create(apr_bucket_make_socket(b, p));
+ apr_bucket_do_create(apr_bucket_socket_make(b, p));
}
APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_socket = {
"SOCKET", 5,
- apr_bucket_destroy_notimpl,
+ apr_bucket_notimpl_destroy,
socket_read,
- apr_bucket_setaside_notimpl,
- apr_bucket_split_notimpl,
- apr_bucket_copy_notimpl
+ apr_bucket_notimpl_setaside,
+ apr_bucket_notimpl_split,
+ apr_bucket_notimpl_copy
};
1.24 +9 -9 apr-util/crypto/apr_sha1.c
Index: apr_sha1.c
===================================================================
RCS file: /home/cvs/apr-util/crypto/apr_sha1.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- apr_sha1.c 2001/01/19 13:25:45 1.23
+++ apr_sha1.c 2001/02/08 07:45:26 1.24
@@ -241,7 +241,7 @@
/* initialize the SHA digest */
-APU_DECLARE(void) apr_SHA1Init(apr_sha1_ctx_t *sha_info)
+APU_DECLARE(void) apr_sha1_init(apr_sha1_ctx_t *sha_info)
{
sha_info->digest[0] = 0x67452301L;
sha_info->digest[1] = 0xefcdab89L;
@@ -255,7 +255,7 @@
/* update the SHA digest */
-APU_DECLARE(void) apr_SHA1Update_binary(apr_sha1_ctx_t *sha_info,
+APU_DECLARE(void) apr_sha1_update_binary(apr_sha1_ctx_t *sha_info,
const unsigned char *buffer,
unsigned int count)
{
@@ -294,7 +294,7 @@
sha_info->local = count;
}
-APU_DECLARE(void) apr_SHA1Update(apr_sha1_ctx_t *sha_info, const char *buf,
+APU_DECLARE(void) apr_sha1_update(apr_sha1_ctx_t *sha_info, const char *buf,
unsigned int count)
{
#if APR_CHARSET_EBCDIC
@@ -342,13 +342,13 @@
(apr_byte_t *) sha_info->data, &outbytes_left);
sha_info->local = count;
#else
- apr_SHA1Update_binary(sha_info, (const unsigned char *) buf, count);
+ apr_sha1_update_binary(sha_info, (const unsigned char *) buf, count);
#endif
}
/* finish computing the SHA digest */
-APU_DECLARE(void) apr_SHA1Final(unsigned char digest[APR_SHA1_DIGESTSIZE],
+APU_DECLARE(void) apr_sha1_final(unsigned char digest[APR_SHA1_DIGESTSIZE],
apr_sha1_ctx_t *sha_info)
{
int count, i, j;
@@ -393,15 +393,15 @@
clear += APR_SHA1PW_IDLEN;
}
- apr_SHA1Init(&context);
- apr_SHA1Update(&context, clear, len);
- apr_SHA1Final(digest, &context);
+ apr_sha1_init(&context);
+ apr_sha1_update(&context, clear, len);
+ apr_sha1_final(digest, &context);
/* private marker. */
apr_cpystrn(out, APR_SHA1PW_ID, APR_SHA1PW_IDLEN + 1);
/* SHA1 hash is always 20 chars */
- l = apr_base64encode_binary(out + APR_SHA1PW_IDLEN, digest, sizeof(digest));
+ l = apr_base64_encode_binary(out + APR_SHA1PW_IDLEN, digest, sizeof(digest));
out[l + APR_SHA1PW_IDLEN] = '\0';
/*
1.17 +3 -3 apr-util/dbm/apr_dbm.c
Index: apr_dbm.c
===================================================================
RCS file: /home/cvs/apr-util/dbm/apr_dbm.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- apr_dbm.c 2001/01/25 04:37:40 1.16
+++ apr_dbm.c 2001/02/08 07:45:27 1.17
@@ -278,8 +278,8 @@
#define REGISTER_CLEANUP(dbm, pdatum) \
if ((pdatum)->dptr) \
- apr_register_cleanup((dbm)->pool, (pdatum)->dptr, \
- datum_cleanup, apr_null_cleanup); \
+ apr_pool_cleanup_register((dbm)->pool, (pdatum)->dptr, \
+ datum_cleanup, apr_pool_cleanup_null); \
else
#else /* NEEDS_CLEANUP */
@@ -536,7 +536,7 @@
APU_DECLARE(void) apr_dbm_freedatum(apr_dbm_t *dbm, apr_datum_t data)
{
#ifdef NEEDS_CLEANUP
- (void) apr_run_cleanup(dbm->pool, data.dptr, datum_cleanup);
+ (void) apr_pool_cleanup_run(dbm->pool, data.dptr, datum_cleanup);
#else
APR_DBM_FREEDPTR(data.dptr);
#endif
1.8 +17 -17 apr-util/dbm/sdbm/sdbm.c
Index: sdbm.c
===================================================================
RCS file: /home/cvs/apr-util/dbm/sdbm/sdbm.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sdbm.c 2001/01/27 23:18:21 1.7
+++ sdbm.c 2001/02/08 07:45:27 1.8
@@ -115,9 +115,9 @@
{
SDBM *db = data;
- (void) apr_close(db->dirf);
+ (void) apr_file_close(db->dirf);
(void) sdbm_unlock(db);
- (void) apr_close(db->pagf);
+ (void) apr_file_close(db->pagf);
free(db);
return APR_SUCCESS;
@@ -163,21 +163,21 @@
* If we fail anywhere, undo everything, return NULL.
*/
- if ((status = apr_open(&db->pagf, pagname, flags, perms, p))
+ if ((status = apr_file_open(&db->pagf, pagname, flags, perms, p))
!= APR_SUCCESS)
goto error;
if ((status = sdbm_lock(db)) != APR_SUCCESS)
goto error;
- if ((status = apr_open(&db->dirf, dirname, flags, perms, p))
+ if ((status = apr_file_open(&db->dirf, dirname, flags, perms, p))
!= APR_SUCCESS)
goto error;
/*
* need the dirfile size to establish max bit number.
*/
- if ((status = apr_getfileinfo(&finfo, APR_FINFO_SIZE, db->dirf))
+ if ((status = apr_file_info_get(&finfo, APR_FINFO_SIZE, db->dirf))
!= APR_SUCCESS)
goto error;
@@ -192,7 +192,7 @@
/* (apr_pcalloc zeroed the buffers) */
/* make sure that we close the database at some point */
- apr_register_cleanup(p, db, database_cleanup, apr_null_cleanup);
+ apr_pool_cleanup_register(p, db, database_cleanup, apr_pool_cleanup_null);
/* Done! */
*pdb = db;
@@ -200,10 +200,10 @@
error:
if (db->dirf != NULL)
- (void) apr_close(db->dirf);
+ (void) apr_file_close(db->dirf);
if (db->pagf != NULL) {
(void) sdbm_unlock(db);
- (void) apr_close(db->pagf);
+ (void) apr_file_close(db->pagf);
}
free(db);
return status;
@@ -212,7 +212,7 @@
void
sdbm_close(SDBM *db)
{
- (void) apr_run_cleanup(db->pool, db, database_cleanup);
+ (void) apr_pool_cleanup_run(db->pool, db, database_cleanup);
}
sdbm_datum
@@ -233,8 +233,8 @@
apr_status_t status;
apr_off_t off = OFF_PAG(pagno);
- if ((status = apr_seek(db->pagf, APR_SET, &off)) != APR_SUCCESS ||
- (status = apr_full_write(db->pagf, buf, PBLKSIZ, NULL)) != APR_SUCCESS) {
+ if ((status = apr_file_seek(db->pagf, APR_SET, &off)) != APR_SUCCESS ||
+ (status = apr_file_write_full(db->pagf, buf, PBLKSIZ, NULL)) != APR_SUCCESS) {
ioerr(db);
return status;
}
@@ -413,8 +413,8 @@
{
apr_status_t status;
- if ((status = apr_seek(f, APR_SET, &off)) != APR_SUCCESS ||
- ((status = apr_full_read(f, buf, len, NULL)) != APR_SUCCESS)) {
+ if ((status = apr_file_seek(f, APR_SET, &off)) != APR_SUCCESS ||
+ ((status = apr_file_read_file(f, buf, len, NULL)) != APR_SUCCESS)) {
/* if EOF is reached, pretend we read all zero's */
if (status == APR_EOF) {
memset(buf, 0, len);
@@ -551,8 +551,8 @@
db->maxbno += DBLKSIZ * BYTESIZ;
off = OFF_DIR(dirb);
- if (((status = apr_seek(db->dirf, APR_SET, &off)) != APR_SUCCESS)
- || (status = apr_full_write(db->dirf, db->dirbuf, DBLKSIZ,
+ if (((status = apr_file_seek(db->dirf, APR_SET, &off)) != APR_SUCCESS)
+ || (status = apr_file_write_full(db->dirf, db->dirbuf, DBLKSIZ,
NULL)) != APR_SUCCESS) {
return status;
}
@@ -582,13 +582,13 @@
db->keyptr = 0;
if (db->pagbno != db->blkptr++) {
apr_off_t off = OFF_PAG(db->blkptr);
- if (apr_seek(db->pagf, APR_SET, &off) != APR_SUCCESS)
+ if (apr_file_seek(db->pagf, APR_SET, &off) != APR_SUCCESS)
break;
}
db->pagbno = db->blkptr;
/* ### EOF acceptable here too? */
- if (apr_full_read(db->pagf, db->pagbuf, PBLKSIZ, NULL) != APR_SUCCESS)
+ if (apr_file_read_file(db->pagf, db->pagbuf, PBLKSIZ, NULL) != APR_SUCCESS)
break;
if (!chkpage(db->pagbuf))
break;
1.3 +2 -2 apr-util/dbm/sdbm/sdbm_lock.c
Index: sdbm_lock.c
===================================================================
RCS file: /home/cvs/apr-util/dbm/sdbm/sdbm_lock.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sdbm_lock.c 2000/12/12 08:54:30 1.2
+++ sdbm_lock.c 2001/02/08 07:45:27 1.3
@@ -67,10 +67,10 @@
else
type = APR_FLOCK_SHARED;
- return apr_lock_file(db->pagf, type);
+ return apr_file_lock(db->pagf, type);
}
apr_status_t sdbm_unlock(SDBM *db)
{
- return apr_unlock_file(db->pagf);
+ return apr_file_unlock(db->pagf);
}
1.20 +10 -10 apr-util/encoding/apr_base64.c
Index: apr_base64.c
===================================================================
RCS file: /home/cvs/apr-util/encoding/apr_base64.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- apr_base64.c 2001/01/19 07:02:02 1.19
+++ apr_base64.c 2001/02/08 07:45:28 1.20
@@ -149,7 +149,7 @@
}
#endif /*APR_CHARSET_EBCDIC*/
-APU_DECLARE(int) apr_base64decode_len(const char *bufcoded)
+APU_DECLARE(int) apr_base64_decode_len(const char *bufcoded)
{
int nbytesdecoded;
register const unsigned char *bufin;
@@ -164,14 +164,14 @@
return nbytesdecoded + 1;
}
-APU_DECLARE(int) apr_base64decode(char *bufplain, const char *bufcoded)
+APU_DECLARE(int) apr_base64_decode(char *bufplain, const char *bufcoded)
{
#if APR_CHARSET_EBCDIC
apr_size_t inbytes_left, outbytes_left;
#endif /* APR_CHARSET_EBCDIC */
int len;
- len = apr_base64decode_binary((unsigned char *) bufplain, bufcoded);
+ len = apr_base64_decode_binary((unsigned char *) bufplain, bufcoded);
#if APR_CHARSET_EBCDIC
inbytes_left = outbytes_left = len;
apr_xlate_conv_buffer(xlate_to_ebcdic, bufplain, &inbytes_left,
@@ -181,10 +181,10 @@
return len;
}
-/* This is the same as apr_base64decode() except on EBCDIC machines, where
+/* This is the same as apr_base64_decode() except on EBCDIC machines, where
* the conversion of the output to ebcdic is left out.
*/
-APU_DECLARE(int) apr_base64decode_binary(unsigned char *bufplain,
+APU_DECLARE(int) apr_base64_decode_binary(unsigned char *bufplain,
const char *bufcoded)
{
int nbytesdecoded;
@@ -232,15 +232,15 @@
static const char basis_64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-APU_DECLARE(int) apr_base64encode_len(int len)
+APU_DECLARE(int) apr_base64_encode_len(int len)
{
return ((len + 2) / 3 * 4) + 1;
}
-APU_DECLARE(int) apr_base64encode(char *encoded, const char *string, int len)
+APU_DECLARE(int) apr_base64_encode(char *encoded, const char *string, int len)
{
#if !APR_CHARSET_EBCDIC
- return apr_base64encode_binary(encoded, (const unsigned char *) string, len);
+ return apr_base64_encode_binary(encoded, (const unsigned char *) string, len);
#else /* APR_CHARSET_EBCDIC */
int i;
char *p;
@@ -273,10 +273,10 @@
#endif /* APR_CHARSET_EBCDIC */
}
-/* This is the same as apr_base64encode() except on EBCDIC machines, where
+/* This is the same as apr_base64_encode() except on EBCDIC machines, where
* the conversion of the input to ascii is left out.
*/
-APU_DECLARE(int) apr_base64encode_binary(char *encoded,
+APU_DECLARE(int) apr_base64_encode_binary(char *encoded,
const unsigned char *string, int len)
{
int i;
1.36 +12 -12 apr-util/hooks/apr_hooks.c
Index: apr_hooks.c
===================================================================
RCS file: /home/cvs/apr-util/hooks/apr_hooks.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- apr_hooks.c 2001/01/29 19:47:48 1.35
+++ apr_hooks.c 2001/02/08 07:45:28 1.36
@@ -189,16 +189,16 @@
apr_array_header_t *pNew;
int n;
- apr_create_pool(&p, apr_global_hook_pool);
+ apr_pool_create(&p, apr_global_hook_pool);
pSort=prepare(p,(TSortData *)pHooks->elts,pHooks->nelts);
pSort=tsort(pSort,pHooks->nelts);
- pNew=apr_make_array(apr_global_hook_pool,pHooks->nelts,sizeof(TSortData));
+ pNew=apr_array_make(apr_global_hook_pool,pHooks->nelts,sizeof(TSortData));
if(apr_debug_module_hooks)
printf("Sorting %s:",szName);
for(n=0 ; pSort ; pSort=pSort->pNext,++n) {
TSortData *pHook;
assert(n < pHooks->nelts);
- pHook=apr_push_array(pNew);
+ pHook=apr_array_push(pNew);
memcpy(pHook,pSort->pData,sizeof *pHook);
if(apr_debug_module_hooks)
printf(" %s",pHook->szName);
@@ -221,8 +221,8 @@
HookSortEntry *pEntry;
if(!s_aHooksToSort)
- s_aHooksToSort=apr_make_array(apr_global_hook_pool,1,sizeof(HookSortEntry));
- pEntry=apr_push_array(s_aHooksToSort);
+ s_aHooksToSort=apr_array_make(apr_global_hook_pool,1,sizeof(HookSortEntry));
+ pEntry=apr_array_push(s_aHooksToSort);
pEntry->szHookName=szHookName;
pEntry->paHooks=paHooks;
}
@@ -290,7 +290,7 @@
APR_DECLARE_EXTERNAL_HOOK(apr,APU,void,_generic,(void))
-APU_DECLARE(apr_array_header_t *) apr_generic_hook_get(const char *szName)
+APU_DECLARE(apr_array_header_t *) apr_hook_generic_get(const char *szName)
{
apr_array_header_t **ppArray;
@@ -302,25 +302,25 @@
return *ppArray;
}
-APU_DECLARE(void) apr_hook_generic(const char *szName,void (*pfn)(void),
+APU_DECLARE(void) apr_hook_generic_add(const char *szName,void (*pfn)(void),
const char * const *aszPre,
const char * const *aszSucc,int nOrder)
{
- apr_array_header_t *pArray=apr_generic_hook_get(szName);
+ apr_array_header_t *pArray=apr_hook_generic_get(szName);
apr_LINK__generic_t *pHook;
if(!pArray) {
apr_array_header_t **ppArray;
- pArray=apr_make_array(apr_global_hook_pool,1,sizeof(apr_LINK__generic_t));
+ pArray=apr_array_make(apr_global_hook_pool,1,sizeof(apr_LINK__generic_t));
if(!s_phGenericHooks)
- s_phGenericHooks=apr_make_hash(apr_global_hook_pool);
+ s_phGenericHooks=apr_hash_make(apr_global_hook_pool);
ppArray=apr_palloc(apr_global_hook_pool,sizeof *ppArray);
*ppArray=pArray;
apr_hash_set(s_phGenericHooks,szName,strlen(szName),ppArray);
apr_hook_sort_register(szName,ppArray);
}
- pHook=apr_push_array(pArray);
+ pHook=apr_array_push(pArray);
pHook->pFunc=pfn;
pHook->aszPredecessors=aszPre;
pHook->aszSuccessors=aszSucc;
@@ -343,7 +343,7 @@
void (*pfn)(void))
{
if(!s_phOptionalFunctions)
- s_phOptionalFunctions=apr_make_hash(apr_global_hook_pool);
+ s_phOptionalFunctions=apr_hash_make(apr_global_hook_pool);
apr_hash_set(s_phOptionalFunctions,szName,strlen(szName),(void *)pfn);
}
1.15 +12 -12 apr-util/include/apr_base64.h
Index: apr_base64.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_base64.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- apr_base64.h 2001/01/23 17:40:08 1.14
+++ apr_base64.h 2001/02/08 07:45:29 1.15
@@ -88,9 +88,9 @@
* encrypted string.
* @param len the length of an unencrypted string.
* @return the length of the string after it is encrypted
- * @deffunc int apr_base64encode_len(int len)
+ * @deffunc int apr_base64_encode_len(int len)
*/
-APU_DECLARE(int) apr_base64encode_len(int len);
+APU_DECLARE(int) apr_base64_encode_len(int len);
/**
* Encode a text string using base64encoding.
@@ -98,9 +98,9 @@
* @param plain_src The original string in plain text
* @param len_plain_src The length of the plain text string
* @return the length of the encoded string
- * @deffunc int apr_base64encode(char *coded_dst, const char *plain_src, int len_plain_src)
+ * @deffunc int apr_base64_encode(char *coded_dst, const char *plain_src, int len_plain_src)
*/
-APU_DECLARE(int) apr_base64encode(char * coded_dst, const char *plain_src,
+APU_DECLARE(int) apr_base64_encode(char * coded_dst, const char *plain_src,
int len_plain_src);
/**
@@ -109,9 +109,9 @@
* @param plain_src The original string in plain text
* @param len_plain_src The length of the plain text string
* @return the length of the encoded string
- * @deffunc int apr_base64encode_binary(char *coded_dst, const char *plain_src, int len_plain_src)
+ * @deffunc int apr_base64_encode_binary(char *coded_dst, const char *plain_src, int len_plain_src)
*/
-APU_DECLARE(int) apr_base64encode_binary(char * coded_dst,
+APU_DECLARE(int) apr_base64_encode_binary(char * coded_dst,
const unsigned char *plain_src,
int len_plain_src);
@@ -119,27 +119,27 @@
* Determine the length of a plain text string given the encoded version
* @param coded_src The encoded string
* @return the length of the plain text string
- * @deffunc int apr_base64decode_len(const char *coded_src)
+ * @deffunc int apr_base64_decode_len(const char *coded_src)
*/
-APU_DECLARE(int) apr_base64decode_len(const char * coded_src);
+APU_DECLARE(int) apr_base64_decode_len(const char * coded_src);
/**
* Decode a string to plain text
* @param plain_dst The destination string for the plain text
* @param coded_src The encoded string
* @return the length of the plain text string
- * @deffunc int apr_base64decode(char *plain_dst, const char *coded_src)
+ * @deffunc int apr_base64_decode(char *plain_dst, const char *coded_src)
*/
-APU_DECLARE(int) apr_base64decode(char * plain_dst, const char *coded_src);
+APU_DECLARE(int) apr_base64_decode(char * plain_dst, const char *coded_src);
/**
* Decode an EBCDIC string to plain text
* @param plain_dst The destination string for the plain text
* @param coded_src The encoded string
* @return the length of the plain text string
- * @deffunc int apr_base64decode_binary(char *plain_dst, const char *coded_src)
+ * @deffunc int apr_base64_decode_binary(char *plain_dst, const char *coded_src)
*/
-APU_DECLARE(int) apr_base64decode_binary(unsigned char * plain_dst,
+APU_DECLARE(int) apr_base64_decode_binary(unsigned char * plain_dst,
const char *coded_src);
#ifdef __cplusplus
1.69 +58 -58 apr-util/include/apr_buckets.h
Index: apr_buckets.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_buckets.h,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- apr_buckets.h 2001/01/27 14:52:55 1.68
+++ apr_buckets.h 2001/02/08 07:45:29 1.69
@@ -678,9 +678,9 @@
* Initialize the core implemented bucket types. Once this is done,
* it is possible to add new bucket types to the server
* @param p The pool to allocate the array out of.
- * @deffunc void apr_init_bucket_types(apr_pool_t *p)
+ * @deffunc void apr_bucket_init_types(apr_pool_t *p)
*/
-APU_DECLARE(void) apr_init_bucket_types(apr_pool_t *p);
+APU_DECLARE(void) apr_bucket_init_types(apr_pool_t *p);
/**
* free the resources used by a bucket. If multiple buckets refer to
@@ -735,9 +735,9 @@
* implemented for this bucket
* @param data The bucket to setaside
* @return APR_ENOTIMPL
- * @deffunc apr_status_t apr_bucket_setaside_notimpl(apr_bucket *data)
+ * @deffunc apr_status_t apr_bucket_notimpl_setaside(apr_bucket *data)
*/
-APU_DECLARE_NONSTD(apr_status_t) apr_bucket_setaside_notimpl(apr_bucket *data);
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_notimpl_setaside(apr_bucket *data);
/**
* A place holder function that signifies that the split function was not
@@ -745,10 +745,10 @@
* @param data The bucket to split
* @param point The location to split the bucket
* @return APR_ENOTIMPL
- * @deffunc apr_status_t apr_bucket_split_notimpl(apr_bucket *data, apr_off_t point)
+ * @deffunc apr_status_t apr_bucket_notimpl_split(apr_bucket *data, apr_off_t point)
*/
APU_DECLARE_NONSTD(apr_status_t)
- apr_bucket_split_notimpl(apr_bucket *data,
+ apr_bucket_notimpl_split(apr_bucket *data,
apr_off_t point);
/**
@@ -757,10 +757,10 @@
* @param e The bucket to copy
* @param c Returns a pointer to the new bucket
* @return APR_ENOTIMPL
- * @deffunc apr_status_t apr_bucket_copy_notimpl(apr_bucket *e, apr_bucket **c)
+ * @deffunc apr_status_t apr_bucket_notimpl_copy(apr_bucket *e, apr_bucket **c)
*/
APU_DECLARE_NONSTD(apr_status_t)
- apr_bucket_copy_notimpl(apr_bucket *e, apr_bucket **c);
+ apr_bucket_notimpl_copy(apr_bucket *e, apr_bucket **c);
/**
* A place holder function that signifies that the destroy function was not
@@ -768,7 +768,7 @@
* @param data The bucket to destroy
* @deffunc void apr_bucket_destroy(apr_bucket *data)
*/
-APU_DECLARE_NONSTD(void) apr_bucket_destroy_notimpl(void *data);
+APU_DECLARE_NONSTD(void) apr_bucket_notimpl_destroy(void *data);
/* There is no apr_bucket_read_notimpl, because it is a required function
*/
@@ -778,7 +778,7 @@
* @param type The new bucket type to register
* @return The offset into the array in which the bucket types are stored
*/
-APU_DECLARE(int) apr_insert_bucket_type(const apr_bucket_type_t *type);
+APU_DECLARE(int) apr_bucket_insert_type(const apr_bucket_type_t *type);
/* All of the bucket types implemented by the core */
/**
@@ -851,10 +851,10 @@
* @param end The end of the data in the bucket
* relative to the private base pointer
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_shared(apr_bucket_refcount *r, apr_off_t start, apr_off_t end)
+ * @deffunc apr_bucket *apr_bucket_shared_make(apr_bucket_refcount *r, apr_off_t start, apr_off_t end)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_make_shared(apr_bucket *b, void *data,
+ apr_bucket_shared_make(apr_bucket *b, void *data,
apr_off_t start, apr_off_t end);
/**
@@ -865,9 +865,9 @@
* @return NULL if nothing needs to be done,
* otherwise a pointer to the private data structure which
* must be destroyed because its reference count is zero
- * @deffunc void *apr_bucket_destroy_shared(apr_bucket *b)
+ * @deffunc void *apr_bucket_shared_destroy(apr_bucket *b)
*/
-APU_DECLARE(void *) apr_bucket_destroy_shared(void *data);
+APU_DECLARE(void *) apr_bucket_shared_destroy(void *data);
/**
* Split a bucket into two at the given point, and adjust the refcount
@@ -879,10 +879,10 @@
* @return APR_EINVAL if the point is not within the bucket;
* APR_ENOMEM if allocation failed;
* or APR_SUCCESS
- * @deffunc apr_status_t apr_bucket_split_shared(apr_bucket *b, apr_off_t point)
+ * @deffunc apr_status_t apr_bucket_shared_split(apr_bucket *b, apr_off_t point)
*/
APU_DECLARE_NONSTD(apr_status_t)
- apr_bucket_split_shared(apr_bucket *b, apr_off_t point);
+ apr_bucket_shared_split(apr_bucket *b, apr_off_t point);
/**
* Copy a refcounted bucket, incrementing the reference count. Most
@@ -892,10 +892,10 @@
* @param c Returns a pointer to the new bucket
* @return APR_ENOMEM if allocation failed;
or APR_SUCCESS
- * @deffunc apr_status_t apr_bucket_copy_shared(apr_bucket *a, apr_bucket **c)
+ * @deffunc apr_status_t apr_bucket_shared_copy(apr_bucket *a, apr_bucket **c)
*/
APU_DECLARE_NONSTD(apr_status_t)
- apr_bucket_copy_shared(apr_bucket *a, apr_bucket **c);
+ apr_bucket_shared_copy(apr_bucket *a, apr_bucket **c);
/* ***** Functions to Create Buckets of varying type ***** */
@@ -933,9 +933,9 @@
* Create an End of Stream bucket. This indicates that there is no more data
* coming from down the filter stack. All filters should flush at this point.
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_eos(void)
+ * @deffunc apr_bucket *apr_bucket_eos_create(void)
*/
-APU_DECLARE(apr_bucket *) apr_bucket_create_eos(void);
+APU_DECLARE(apr_bucket *) apr_bucket_eos_create(void);
/**
* Make the bucket passed in an EOS bucket. This indicates that there is no
@@ -943,18 +943,18 @@
* this point.
* @param b The bucket to make into an EOS bucket
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_eos(apr_bucket *b)
+ * @deffunc apr_bucket *apr_bucket_eos_make(apr_bucket *b)
*/
-APU_DECLARE(apr_bucket *) apr_bucket_make_eos(apr_bucket *b);
+APU_DECLARE(apr_bucket *) apr_bucket_eos_make(apr_bucket *b);
/**
* Create a flush bucket. This indicates that filters should flush their
* data. There is no guarantee that they will flush it, but this is the
* best we can do.
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_flush(void)
+ * @deffunc apr_bucket *apr_bucket_flush_create(void)
*/
-APU_DECLARE(apr_bucket *) apr_bucket_create_flush(void);
+APU_DECLARE(apr_bucket *) apr_bucket_flush_create(void);
/**
* Make the bucket passed in a FLUSH bucket. This indicates that filters
@@ -962,19 +962,19 @@
* but this is the best we can do.
* @param b The bucket to make into a FLUSH bucket
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_flush(apr_bucket *b)
+ * @deffunc apr_bucket *apr_bucket_flush_make(apr_bucket *b)
*/
-APU_DECLARE(apr_bucket *) apr_bucket_make_flush(apr_bucket *b);
+APU_DECLARE(apr_bucket *) apr_bucket_flush_make(apr_bucket *b);
/**
* Create a bucket referring to long-lived data.
* @param buf The data to insert into the bucket
* @param nbyte The size of the data to insert.
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_immortal(const char *buf, apr_size_t nbyte, apr_size_t *w)
+ * @deffunc apr_bucket *apr_bucket_immortal_create(const char *buf, apr_size_t nbyte, apr_size_t *w)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_create_immortal(const char *buf, apr_size_t nbyte);
+ apr_bucket_immortal_create(const char *buf, apr_size_t nbyte);
/**
* Make the bucket passed in a bucket refer to long-lived data
@@ -983,10 +983,10 @@
* @param nbyte The size of the data to insert.
* @param w The number of bytes added to the bucket
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_immortal(apr_bucket *b, const char *buf, apr_size_t nbyte, apr_size_t *w)
+ * @deffunc apr_bucket *apr_bucket_immortal_make(apr_bucket *b, const char *buf, apr_size_t nbyte, apr_size_t *w)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_make_immortal(apr_bucket *b, const char *buf,
+ apr_bucket_immortal_make(apr_bucket *b, const char *buf,
apr_size_t nbyte);
/**
@@ -994,10 +994,10 @@
* @param buf The data to insert into the bucket
* @param nbyte The size of the data to insert.
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_transient(const char *buf, apr_size_t nbyte, apr_size_t *w)
+ * @deffunc apr_bucket *apr_bucket_transient_create(const char *buf, apr_size_t nbyte, apr_size_t *w)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_create_transient(const char *buf, apr_size_t nbyte);
+ apr_bucket_transient_create(const char *buf, apr_size_t nbyte);
/**
* Make the bucket passed in a bucket refer to stack data
@@ -1005,10 +1005,10 @@
* @param buf The data to insert into the bucket
* @param nbyte The size of the data to insert.
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_transient(apr_bucket *b, const char *buf, apr_size_t nbyte)
+ * @deffunc apr_bucket *apr_bucket_transient_make(apr_bucket *b, const char *buf, apr_size_t nbyte)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_make_transient(apr_bucket *b, const char *buf,
+ apr_bucket_transient_make(apr_bucket *b, const char *buf,
apr_size_t nbyte);
/**
@@ -1024,10 +1024,10 @@
* @param w The number of bytes actually copied into the bucket.
* If copy is zero then this return value can be ignored by passing a NULL pointer.
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_heap(const char *buf, apr_size_t nbyte, int copy, apr_size_t *w)
+ * @deffunc apr_bucket *apr_bucket_heap_create(const char *buf, apr_size_t nbyte, int copy, apr_size_t *w)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_create_heap(const char *buf, apr_size_t nbyte,
+ apr_bucket_heap_create(const char *buf, apr_size_t nbyte,
int copy, apr_size_t *w);
/**
* Make the bucket passed in a bucket refer to heap data
@@ -1038,10 +1038,10 @@
* @param w The number of bytes actually copied into the bucket.
* If copy is zero then this return value can be ignored by passing a NULL pointer.
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_heap(apr_bucket *b, const char *buf, apr_size_t nbyte, int copy, apr_size_t *w)
+ * @deffunc apr_bucket *apr_bucket_heap_make(apr_bucket *b, const char *buf, apr_size_t nbyte, int copy, apr_size_t *w)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_make_heap(apr_bucket *b, const char *buf,
+ apr_bucket_heap_make(apr_bucket *b, const char *buf,
apr_size_t nbyte, int copy, apr_size_t *w);
/**
@@ -1049,10 +1049,10 @@
* @param buf The buffer to insert into the bucket
* @param p The pool the memory was allocated out of
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_pool(const char *buf, apr_size_t *length, apr_pool_t *p)
+ * @deffunc apr_bucket *apr_bucket_pool_create(const char *buf, apr_size_t *length, apr_pool_t *p)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_create_pool(const char *buf, apr_size_t length,
+ apr_bucket_pool_create(const char *buf, apr_size_t length,
apr_pool_t *p);
/**
@@ -1061,10 +1061,10 @@
* @param buf The buffer to insert into the bucket
* @param p The pool the memory was allocated out of
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_pool(apr_bucket *b, const char *buf, apr_size_t *length, apr_pool_t *p)
+ * @deffunc apr_bucket *apr_bucket_pool_make(apr_bucket *b, const char *buf, apr_size_t *length, apr_pool_t *p)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_make_pool(apr_bucket *b, const char *buf,
+ apr_bucket_pool_make(apr_bucket *b, const char *buf,
apr_size_t length, apr_pool_t *p);
#if APR_HAS_MMAP
@@ -1075,10 +1075,10 @@
* that this bucket refers to
* @param length The number of bytes referred to by this bucket
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_mmap(const apr_mmap_t *mm, apr_size_t start, apr_size_t length)
+ * @deffunc apr_bucket *apr_bucket_mmap_create(const apr_mmap_t *mm, apr_size_t start, apr_size_t length)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_create_mmap(apr_mmap_t *mm, apr_off_t start,
+ apr_bucket_mmap_create(apr_mmap_t *mm, apr_off_t start,
apr_size_t length);
/**
@@ -1089,10 +1089,10 @@
* that this bucket refers to
* @param length The number of bytes referred to by this bucket
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_mmap(apr_bucket *b, const apr_mmap_t *mm, apr_size_t start, apr_size_t length)
+ * @deffunc apr_bucket *apr_bucket_mmap_make(apr_bucket *b, const apr_mmap_t *mm, apr_size_t start, apr_size_t length)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_make_mmap(apr_bucket *b, apr_mmap_t *mm,
+ apr_bucket_mmap_make(apr_bucket *b, apr_mmap_t *mm,
apr_off_t start, apr_size_t length);
#endif
@@ -1100,36 +1100,36 @@
* Create a bucket referring to a socket.
* @param thissocket The socket to put in the bucket
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_socket(apr_socket_t *thissocket)
+ * @deffunc apr_bucket *apr_bucket_socket_create(apr_socket_t *thissocket)
*/
-APU_DECLARE(apr_bucket *) apr_bucket_create_socket(apr_socket_t *thissock);
+APU_DECLARE(apr_bucket *) apr_bucket_socket_create(apr_socket_t *thissock);
/**
* Make the bucket passed in a bucket refer to a socket
* @param b The bucket to make into a SOCKET bucket
* @param thissocket The socket to put in the bucket
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_socket(apr_bucket *b, apr_socket_t *thissocket)
+ * @deffunc apr_bucket *apr_bucket_socket_make(apr_bucket *b, apr_socket_t *thissocket)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_make_socket(apr_bucket *b, apr_socket_t *thissock);
+ apr_bucket_socket_make(apr_bucket *b, apr_socket_t *thissock);
/**
* Create a bucket referring to a pipe.
* @param thispipe The pipe to put in the bucket
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_pipe(apr_file_t *thispipe)
+ * @deffunc apr_bucket *apr_bucket_pipe_creat(apr_file_t *thispipe)
*/
-APU_DECLARE(apr_bucket *) apr_bucket_create_pipe(apr_file_t *thispipe);
+APU_DECLARE(apr_bucket *) apr_bucket_pipe_creat(apr_file_t *thispipe);
/**
* Make the bucket passed in a bucket refer to a pipe
* @param b The bucket to make into a PIPE bucket
* @param thispipe The pipe to put in the bucket
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_pipe(apr_bucket *b, apr_file_t *thispipe)
+ * @deffunc apr_bucket *apr_bucket_pipe_make(apr_bucket *b, apr_file_t *thispipe)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_make_pipe(apr_bucket *b, apr_file_t *thispipe);
+ apr_bucket_pipe_make(apr_bucket *b, apr_file_t *thispipe);
/**
* Create a bucket referring to a file.
@@ -1137,10 +1137,10 @@
* @param offset The offset where the data of interest begins in the file
* @param len The amount of data in the file we are interested in
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_create_file(apr_file_t *fd, apr_off_t offset, apr_size_t len)
+ * @deffunc apr_bucket *apr_bucket_file_create(apr_file_t *fd, apr_off_t offset, apr_size_t len)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_create_file(apr_file_t *fd, apr_off_t offset,
+ apr_bucket_file_create(apr_file_t *fd, apr_off_t offset,
apr_size_t len);
/**
@@ -1150,10 +1150,10 @@
* @param offset The offset where the data of interest begins in the file
* @param len The amount of data in the file we are interested in
* @return The new bucket, or NULL if allocation failed
- * @deffunc apr_bucket *apr_bucket_make_file(apr_bucket *b, apr_file_t *fd, apr_off_t offset, apr_size_t len)
+ * @deffunc apr_bucket *apr_bucket_file_make(apr_bucket *b, apr_file_t *fd, apr_off_t offset, apr_size_t len)
*/
APU_DECLARE(apr_bucket *)
- apr_bucket_make_file(apr_bucket *b, apr_file_t *fd,
+ apr_bucket_file_make(apr_bucket *b, apr_file_t *fd,
apr_off_t offset, apr_size_t len);
#ifdef __cplusplus
1.4 +4 -4 apr-util/include/apr_generic_hook.h
Index: apr_generic_hook.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_generic_hook.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- apr_generic_hook.h 2001/01/19 07:01:26 1.3
+++ apr_generic_hook.h 2001/02/08 07:45:29 1.4
@@ -68,7 +68,7 @@
#define APR_DECLARE_GENERIC_HOOK(ns,ret,name,args) \
typedef ret ns##_HOOK_##name args;
-APU_DECLARE(void) apr_hook_generic(const char *szName,void (*pfn)(void),
+APU_DECLARE(void) apr_hook_generic_add(const char *szName,void (*pfn)(void),
const char * const *aszPre,
const char * const *aszSucc,int nOrder);
@@ -84,10 +84,10 @@
#define APR_HOOK_GENERIC(name,pfn,aszPre,aszSucc,nOrder) \
((void (*)(const char *,HOOK_##name *,const char * const *, \
- const char * const *,int))&apr_hook_generic)(#name,pfn,aszPre, \
+ const char * const *,int))&apr_hook_generic_add)(#name,pfn,aszPre, \
aszSucc, nOrder)
-APU_DECLARE(apr_array_header_t *) apr_generic_hook_get(const char *szName);
+APU_DECLARE(apr_array_header_t *) apr_hook_generic_get(const char *szName);
/**
* Implement a generic hook that runs until one of the functions
@@ -105,7 +105,7 @@
ns##_LINK_##name *pHook; \
int n; \
ret rv; \
- apr_array_header_t *pHookArray=apr_generic_hook_get(#name); \
+ apr_array_header_t *pHookArray=apr_hook_generic_get(#name); \
\
if(!pHookArray) \
return ok; \
1.37 +2 -2 apr-util/include/apr_hooks.h
Index: apr_hooks.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_hooks.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- apr_hooks.h 2001/02/02 05:56:12 1.36
+++ apr_hooks.h 2001/02/08 07:45:30 1.37
@@ -95,10 +95,10 @@
ns##_LINK_##name##_t *pHook; \
if(!_hooks.link_##name) \
{ \
- _hooks.link_##name=apr_make_array(apr_global_hook_pool,1,sizeof(ns##_LINK_##name##_t)); \
+ _hooks.link_##name=apr_array_make(apr_global_hook_pool,1,sizeof(ns##_LINK_##name##_t)); \
apr_hook_sort_register(#name,&_hooks.link_##name); \
} \
- pHook=apr_push_array(_hooks.link_##name); \
+ pHook=apr_array_push(_hooks.link_##name); \
pHook->pFunc=pf; \
pHook->aszPredecessors=aszPre; \
pHook->aszSuccessors=aszSucc; \
1.17 +8 -8 apr-util/include/apr_sha1.h
Index: apr_sha1.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_sha1.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- apr_sha1.h 2001/01/19 07:01:27 1.16
+++ apr_sha1.h 2001/02/08 07:45:30 1.17
@@ -119,18 +119,18 @@
/**
* Initialize the SHA digest
* @param context The SHA context to initialize
- * @deffunc void apr_SHA1Init(apr_sha1_ctx_t *context);
+ * @deffunc void apr_sha1_init(apr_sha1_ctx_t *context);
*/
-APU_DECLARE(void) apr_SHA1Init(apr_sha1_ctx_t *context);
+APU_DECLARE(void) apr_sha1_init(apr_sha1_ctx_t *context);
/**
* Update the SHA digest
* @param context The SHA1 context to update
* @param input The buffer to add to the SHA digest
* @param inputLen The length of the input buffer
- * @deffunc void apr_SHA1Update(apr_sha1_ctx_t *context, const char *input, unsigned int inputLen)
+ * @deffunc void apr_sha1_update(apr_sha1_ctx_t *context, const char *input, unsigned int inputLen)
*/
-APU_DECLARE(void) apr_SHA1Update(apr_sha1_ctx_t *context, const char *input,
+APU_DECLARE(void) apr_sha1_update(apr_sha1_ctx_t *context, const char *input,
unsigned int inputLen);
/**
@@ -138,9 +138,9 @@
* @param context The SHA1 context to update
* @param input The buffer to add to the SHA digest
* @param inputLen The length of the input buffer
- * @deffunc void apr_SHA1Update_binary(apr_sha1_ctx_t *context, const unsigned char *input, unsigned int inputLen)
+ * @deffunc void apr_sha1_update_binary(apr_sha1_ctx_t *context, const unsigned char *input, unsigned int inputLen)
*/
-APU_DECLARE(void) apr_SHA1Update_binary(apr_sha1_ctx_t *context,
+APU_DECLARE(void) apr_sha1_update_binary(apr_sha1_ctx_t *context,
const unsigned char *input,
unsigned int inputLen);
@@ -148,9 +148,9 @@
* Finish computing the SHA digest
* @param digest the output buffer in which to store the digest
* @param context The context to finalize
- * @deffunc void apr_SHA1Final(unsigned char digest[APR_SHA1_DIGESTSIZE], apr_sha1_ctx_t *context)
+ * @deffunc void apr_sha1_final(unsigned char digest[APR_SHA1_DIGESTSIZE], apr_sha1_ctx_t *context)
*/
-APU_DECLARE(void) apr_SHA1Final(unsigned char digest[APR_SHA1_DIGESTSIZE],
+APU_DECLARE(void) apr_sha1_final(unsigned char digest[APR_SHA1_DIGESTSIZE],
apr_sha1_ctx_t *context);
#ifdef __cplusplus
1.2 +6 -6 apr-util/include/apu_compat.h
Index: apu_compat.h
===================================================================
RCS file: /home/cvs/apr-util/include/apu_compat.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apu_compat.h 2001/01/28 18:22:52 1.1
+++ apu_compat.h 2001/02/08 07:45:30 1.2
@@ -8,12 +8,12 @@
/* redefine 1.3.x symbols to those that now live in libapr-util */
-#define ap_base64decode apr_base64decode
-#define ap_base64decode_binary apr_base64decode_binary
-#define ap_base64decode_len apr_base64decode_len
-#define ap_base64encode apr_base64encode
-#define ap_base64encode_binary apr_base64encode_binary
-#define ap_base64encode_len apr_base64encode_len
+#define ap_base64decode apr_base64_decode
+#define ap_base64decode_binary apr_base64_decode_binary
+#define ap_base64decode_len apr_base64_decode_len
+#define ap_base64encode apr_base64_encode
+#define ap_base64encode_binary apr_base64_encode_binary
+#define ap_base64encode_len apr_base64_encode_len
#define ap_hook_deregister_all apr_hook_deregister_all
#define ap_hook_sort_register apr_hook_sort_register
#define ap_show_hook apr_show_hook
1.5 +3 -3 apr-util/test/testdbm.c
Index: testdbm.c
===================================================================
RCS file: /home/cvs/apr-util/test/testdbm.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- testdbm.c 2000/12/09 09:07:14 1.4
+++ testdbm.c 2001/02/08 07:45:31 1.5
@@ -135,9 +135,9 @@
const char *optarg;
(void) apr_initialize();
- apr_create_pool(&pool, NULL);
+ apr_pool_create(&pool, NULL);
- (void) apr_initopt(&os, pool, argc, argv);
+ (void) apr_getopt_init(&os, pool, argc, argv);
progname = argv[0];
@@ -160,7 +160,7 @@
os->ind++;
doit(act, argv[os->ind], pool);
- apr_destroy_pool(pool);
+ apr_pool_destroy(pool);
apr_terminate();
return 0;
}
1.55 +33 -33 httpd-2.0/support/ab.c
Index: ab.c
===================================================================
RCS file: /home/cvs/httpd-2.0/support/ab.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- ab.c 2001/01/25 14:43:28 1.54
+++ ab.c 2001/02/08 07:45:32 1.55
@@ -272,7 +272,7 @@
static void write_request(struct connection *c)
{
apr_size_t len = reqlen;
- c->connect = apr_now();
+ c->connect = apr_time_now();
apr_setsocketopt(c->aprsock, APR_SO_TIMEOUT, aprtimeout);
if (apr_send(c->aprsock, request, &reqlen) != APR_SUCCESS ||
reqlen != len) {
@@ -284,7 +284,7 @@
}
c->state = STATE_READ;
- apr_add_poll_socket(readbits, c->aprsock, APR_POLLIN);
+ apr_poll_socket_add(readbits, c->aprsock, APR_POLLIN);
}
/* --------------------------------------------------------- */
@@ -295,7 +295,7 @@
{
int timetaken;
- endtime = apr_now();
+ endtime = apr_time_now();
timetaken = (endtime - start) / 1000;
printf("\r \r");
@@ -372,7 +372,7 @@
{
int timetaken;
- endtime = apr_now();
+ endtime = apr_time_now();
timetaken = (endtime - start) / 1000;
printf("\n\n<table %s>\n", tablestring);
@@ -505,28 +505,28 @@
c->cbx = 0;
c->gotheader = 0;
- if ((rv = apr_getaddrinfo(&destsa, hostname, APR_UNSPEC, port, 0, cntxt))
+ if ((rv = apr_sockaddr_info_get(&destsa, hostname, APR_UNSPEC, port, 0, cntxt))
!= APR_SUCCESS) {
char buf[120];
apr_snprintf(buf, sizeof(buf),
- "apr_getaddrinfo() for %s", hostname);
+ "apr_sockaddr_info_get() for %s", hostname);
apr_err(buf, rv);
}
- if ((rv = apr_create_socket(&c->aprsock, destsa->sa.sin.sin_family,
+ if ((rv = apr_socket_create(&c->aprsock, destsa->sa.sin.sin_family,
SOCK_STREAM, cntxt)) != APR_SUCCESS) {
apr_err("socket", rv);
}
- c->start = apr_now();
+ c->start = apr_time_now();
if ((rv = apr_connect(c->aprsock, destsa)) != APR_SUCCESS) {
if (APR_STATUS_IS_EINPROGRESS(rv)) {
c->state = STATE_CONNECTING;
- apr_add_poll_socket(readbits, c->aprsock, APR_POLLOUT);
+ apr_poll_socket_add(readbits, c->aprsock, APR_POLLOUT);
return;
}
else {
- apr_remove_poll_socket(readbits, c->aprsock);
- apr_close_socket(c->aprsock);
+ apr_poll_socket_remove(readbits, c->aprsock);
+ apr_socket_close(c->aprsock);
err_conn++;
if (bad++ > 10) {
fprintf(stderr,
@@ -566,7 +566,7 @@
/* save out time */
if (done < requests) {
struct data s;
- c->done = apr_now();
+ c->done = apr_time_now();
s.read = c->read;
s.ctime = (c->connect - c->start) / 1000;
s.time = (c->done - c->start) / 1000;
@@ -574,8 +574,8 @@
}
}
- apr_remove_poll_socket(readbits, c->aprsock);
- apr_close_socket(c->aprsock);
+ apr_poll_socket_remove(readbits, c->aprsock);
+ apr_socket_close(c->aprsock);
c->state = STATE_UNCONNECTED;
/* connect again */
@@ -649,8 +649,8 @@
}
else {
/* header is in invalid or too big - close connection */
- apr_remove_poll_socket(readbits, c->aprsock);
- apr_close_socket(c->aprsock);
+ apr_poll_socket_remove(readbits, c->aprsock);
+ apr_socket_close(c->aprsock);
err_response++;
if (bad++ > 10) {
err("\nTest aborted after 10 failures\n\n");
@@ -731,7 +731,7 @@
}
if (done < requests) {
struct data s;
- c->done = apr_now();
+ c->done = apr_time_now();
s.read = c->read;
s.ctime = (c->connect - c->start) / 1000;
s.time = (c->done - c->start) / 1000;
@@ -766,13 +766,13 @@
fflush(stdout);
}
- now = apr_now();
+ now = apr_time_now();
con = malloc(concurrency * sizeof(struct connection));
memset(con, 0, concurrency * sizeof(struct connection));
stats = malloc(requests * sizeof(struct data));
- apr_setup_poll(&readbits, concurrency, cntxt);
+ apr_poll_setup(&readbits, concurrency, cntxt);
/* setup request */
if (!posting) {
@@ -823,7 +823,7 @@
#endif /*NOT_ASCII*/
/* ok - lets start */
- start = apr_now();
+ start = apr_time_now();
/* initialise lots of requests */
for (i = 0; i < concurrency; i++) {
@@ -836,7 +836,7 @@
apr_int32_t timed;
/* check for time limit expiry */
- now = apr_now();
+ now = apr_time_now();
timed = (now - start) / APR_USEC_PER_SEC;
if (tlimit && timed > (tlimit * 1000)) {
requests = done; /* so stats are correct */
@@ -857,7 +857,7 @@
if (con[i].state == STATE_UNCONNECTED)
continue;
- apr_get_revents(&rv, con[i].aprsock, readbits);
+ apr_poll_revents_get(&rv, con[i].aprsock, readbits);
/* Notes: APR_POLLHUP is set after FIN is received on some
* systems, so treat that like APR_POLLIN so that we try
* to read again.
@@ -887,7 +887,7 @@
* in as APR_POLLIN.
*/
if (con[i].state == STATE_READ || con[i].state == STATE_CONNECTING)
- apr_add_poll_socket(readbits, con[i].aprsock, APR_POLLIN);
+ apr_poll_socket_add(readbits, con[i].aprsock, APR_POLLIN);
}
}
@@ -903,14 +903,14 @@
static void copyright(void)
{
if (!use_html) {
- printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.54 $> apache-2.0");
+ printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.55 $> apache-2.0");
printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
printf("Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/\n");
printf("\n");
}
else {
printf("<p>\n");
- printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.54 $");
+ printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.55 $");
printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/<br>\n");
printf("</p>\n<p>\n");
@@ -995,14 +995,14 @@
apr_status_t rv;
char errmsg[120];
- rv = apr_open(&postfd, pfile, APR_READ, mode, cntxt);
+ rv = apr_file_open(&postfd, pfile, APR_READ, mode, cntxt);
if (rv != APR_SUCCESS) {
printf("Invalid postfile name (%s): %s\n", pfile,
apr_strerror(rv, errmsg, sizeof errmsg));
return rv;
}
- apr_getfileinfo(&finfo, APR_FINFO_NORM, postfd);
+ apr_file_info_get(&finfo, APR_FINFO_NORM, postfd);
postlen = finfo.size;
postdata = (char *)malloc(postlen);
if (!postdata) {
@@ -1010,7 +1010,7 @@
return APR_ENOMEM;
}
length = postlen;
- rv = apr_read(postfd, postdata, &length);
+ rv = apr_file_read(postfd, postdata, &length);
if (rv != APR_SUCCESS) {
printf("error reading postfile: %s\n",
apr_strerror(rv, errmsg, sizeof errmsg));
@@ -1022,7 +1022,7 @@
length);
return APR_EINVAL;
}
- apr_close(postfd);
+ apr_file_close(postfd);
return 0;
}
@@ -1053,7 +1053,7 @@
apr_initialize();
atexit(terminate);
- apr_create_pool(&cntxt, NULL);
+ apr_pool_create(&cntxt, NULL);
#ifdef NOT_ASCII
status = apr_xlate_open(&to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, cntxt);
@@ -1073,7 +1073,7 @@
}
#endif
- apr_initopt(&opt, cntxt, argc, argv);
+ apr_getopt_init(&opt, cntxt, argc, argv);
while ((status = apr_getopt(opt, "n:c:t:T:p:v:kVhwix:y:z:C:H:P:A:", &c, &optarg)) == APR_SUCCESS) {
switch (c) {
case 'n':
@@ -1125,7 +1125,7 @@
*/
while(apr_isspace(*optarg))
optarg++;
- l=apr_base64encode(tmp, optarg, strlen(optarg));
+ l=apr_base64_encode(tmp, optarg, strlen(optarg));
tmp[l]='\0';
strncat(auth, "Authorization: basic ", sizeof(auth));
@@ -1138,7 +1138,7 @@
*/
while(apr_isspace(*optarg))
optarg++;
- l=apr_base64encode(tmp, optarg, strlen(optarg));
+ l=apr_base64_encode(tmp, optarg, strlen(optarg));
tmp[l]='\0';
strncat(auth, "Proxy-Authorization: basic ", sizeof(auth));
1.21 +24 -24 httpd-2.0/support/htdigest.c
Index: htdigest.c
===================================================================
RCS file: /home/cvs/httpd-2.0/support/htdigest.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- htdigest.c 2001/01/18 23:54:14 1.20
+++ htdigest.c 2001/02/08 07:45:32 1.21
@@ -129,16 +129,16 @@
char ch;
while (1) {
- apr_getc(&ch, f);
+ apr_file_getc(&ch, f);
s[i] = ch;
if (s[i] == CR)
- apr_getc(&ch, f);
+ apr_file_getc(&ch, f);
s[i] = ch;
if ((s[i] == 0x4) || (s[i] == LF) || (i == (n - 1))) {
s[i] = '\0';
- if (apr_eof(f) == APR_EOF) {
+ if (apr_file_eof(f) == APR_EOF) {
return 1;
}
return 0;
@@ -152,8 +152,8 @@
int x;
for (x = 0; l[x]; x++)
- apr_putc(l[x], f);
- apr_putc('\n', f);
+ apr_file_putc(l[x], f);
+ apr_file_putc('\n', f);
}
@@ -168,36 +168,36 @@
unsigned int i;
size_t len = sizeof(pwin);
- if (apr_getpass("New password: ", pwin, &len) != APR_SUCCESS) {
+ if (apr_password_get("New password: ", pwin, &len) != APR_SUCCESS) {
fprintf(stderr, "password too long");
exit(5);
}
len = sizeof(pwin);
- apr_getpass("Re-type new password: ", pwv, &len);
+ apr_password_get("Re-type new password: ", pwv, &len);
if (strcmp(pwin, pwv) != 0) {
fprintf(stderr, "They don't match, sorry.\n");
if (tn) {
- apr_remove_file(tn, cntxt);
+ apr_file_remove(tn, cntxt);
}
exit(1);
}
pw = pwin;
- apr_fprintf(f, "%s:%s:", user, realm);
+ apr_file_printf(f, "%s:%s:", user, realm);
/* Do MD5 stuff */
sprintf(string, "%s:%s:%s", user, realm, pw);
- apr_MD5Init(&context);
+ apr_md5_init(&context);
#if APR_CHARSET_EBCDIC
- apr_MD5SetXlate(&context, to_ascii);
+ apr_md5_set_xlate(&context, to_ascii);
#endif
- apr_MD5Update(&context, (unsigned char *) string, strlen(string));
- apr_MD5Final(digest, &context);
+ apr_md5_update(&context, (unsigned char *) string, strlen(string));
+ apr_md5_final(digest, &context);
for (i = 0; i < 16; i++)
- apr_fprintf(f, "%02x", digest[i]);
+ apr_file_printf(f, "%02x", digest[i]);
- apr_fprintf(f, "\n");
+ apr_file_printf(f, "\n");
}
static void usage(void)
@@ -211,7 +211,7 @@
{
fprintf(stderr, "Interrupted.\n");
if (tn)
- apr_remove_file(tn, cntxt);
+ apr_file_remove(tn, cntxt);
exit(1);
}
@@ -240,7 +240,7 @@
exit(1);
}
atexit(terminate);
- apr_create_pool(&cntxt, NULL);
+ apr_pool_create(&cntxt, NULL);
#if APR_CHARSET_EBCDIC
rv = apr_xlate_open(&to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, cntxt);
@@ -256,7 +256,7 @@
if (argc == 5) {
if (strcmp(argv[1], "-c"))
usage();
- rv = apr_open(&tfp, argv[2], APR_WRITE | APR_CREATE, -1, cntxt);
+ rv = apr_file_open(&tfp, argv[2], APR_WRITE | APR_CREATE, -1, cntxt);
if (rv != APR_SUCCESS) {
char errmsg[120];
@@ -267,19 +267,19 @@
}
printf("Adding password for %s in realm %s.\n", argv[4], argv[3]);
add_password(argv[4], argv[3], tfp);
- apr_close(tfp);
+ apr_file_close(tfp);
exit(0);
}
else if (argc != 4)
usage();
tn = tmpnam(NULL);
- if (apr_open(&tfp, tn, APR_WRITE | APR_CREATE, -1, cntxt)!= APR_SUCCESS) {
+ if (apr_file_open(&tfp, tn, APR_WRITE | APR_CREATE, -1, cntxt)!= APR_SUCCESS) {
fprintf(stderr, "Could not open temp file.\n");
exit(1);
}
- if (apr_open(&f, argv[1], APR_READ, -1, cntxt) != APR_SUCCESS) {
+ if (apr_file_open(&f, argv[1], APR_READ, -1, cntxt) != APR_SUCCESS) {
fprintf(stderr,
"Could not open passwd file %s for reading.\n", argv[1]);
fprintf(stderr, "Use -c option to create new one.\n");
@@ -311,14 +311,14 @@
printf("Adding user %s in realm %s\n", user, realm);
add_password(user, realm, tfp);
}
- apr_close(f);
- apr_close(tfp);
+ apr_file_close(f);
+ apr_file_close(tfp);
#if defined(OS2) || defined(WIN32)
sprintf(command, "copy \"%s\" \"%s\"", tn, argv[1]);
#else
sprintf(command, "cp %s %s", tn, argv[1]);
#endif
system(command);
- apr_remove_file(tn, cntxt);
+ apr_file_remove(tn, cntxt);
return 0;
}
1.33 +4 -4 httpd-2.0/support/htpasswd.c
Index: htpasswd.c
===================================================================
RCS file: /home/cvs/httpd-2.0/support/htpasswd.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- htpasswd.c 2001/01/20 21:42:23 1.32
+++ htpasswd.c 2001/02/08 07:45:32 1.33
@@ -216,13 +216,13 @@
}
else {
bufsize = sizeof(pwin);
- if (apr_getpass("New password: ", pwin, &bufsize) != 0) {
+ if (apr_password_get("New password: ", pwin, &bufsize) != 0) {
apr_snprintf(record, (rlen - 1), "password too long (>%d)",
sizeof(pwin) - 1);
return ERR_OVERFLOW;
}
bufsize = sizeof(pwv);
- apr_getpass("Re-type new password: ", pwv, &bufsize);
+ apr_password_get("Re-type new password: ", pwv, &bufsize);
if (strcmp(pwin, pwv) != 0) {
apr_cpystrn(record, "password verification error", (rlen - 1));
return ERR_PWMISMATCH;
@@ -242,7 +242,7 @@
to64(&salt[0], rand(), 8);
salt[8] = '\0';
- apr_MD5Encode((const char *)pw, (const char *)salt,
+ apr_md5_encode((const char *)pw, (const char *)salt,
cpw, sizeof(cpw));
break;
@@ -402,7 +402,7 @@
apr_initialize();
atexit(apr_terminate);
- apr_create_pool(&pool, NULL);
+ apr_pool_create(&pool, NULL);
rv = apr_xlate_open(&to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, pool);
if (rv) {
1.15 +1 -1 httpd-2.0/support/logresolve.c
Index: logresolve.c
===================================================================
RCS file: /home/cvs/httpd-2.0/support/logresolve.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- logresolve.c 2000/12/22 00:02:52 1.14
+++ logresolve.c 2001/02/08 07:45:32 1.15
@@ -297,7 +297,7 @@
int i, check;
#ifdef WIN32
- /* If we apr'ify this code, apr_create_pool/apr_destroy_pool
+ /* If we apr'ify this code, apr_pool_create/apr_pool_destroy
* should perform the WSAStartup/WSACleanup for us.
*/
WSADATA wsaData;
1.6 +1 -1 httpd-2.0/test/test_find.c
Index: test_find.c
===================================================================
RCS file: /home/cvs/httpd-2.0/test/test_find.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- test_find.c 2000/10/16 06:05:15 1.5
+++ test_find.c 2001/02/08 07:45:33 1.6
@@ -45,7 +45,7 @@
char line[512];
char tok[512];
- p = apr_init_alloc();
+ p = apr_pool_alloc_init();
printf("Enter field value to find items within:\n");
if (!gets(line))
1.6 +1 -1 httpd-2.0/test/test_parser.c
Index: test_parser.c
===================================================================
RCS file: /home/cvs/httpd-2.0/test/test_parser.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- test_parser.c 2000/10/16 06:05:15 1.5
+++ test_parser.c 2001/02/08 07:45:33 1.6
@@ -46,7 +46,7 @@
char *newstr;
char instr[512];
- p = apr_init_alloc();
+ p = apr_pool_alloc_init();
while (gets(instr)) {
printf(" [%s] ==\n", instr);