summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Zhakov <ivan@apache.org>2022-11-20 07:14:38 +0000
committerIvan Zhakov <ivan@apache.org>2022-11-20 07:14:38 +0000
commit4f9b76b6f2acc4030ce9ef164322514c5d0e761b (patch)
tree9b993b3753affcbf164056826f9d568d8760b3a1
parent961caf5f46055483fa72ab02f5e8baa16c209e2f (diff)
downloadapr-4f9b76b6f2acc4030ce9ef164322514c5d0e761b.tar.gz
Remove trailing whitespaces in *.c.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--atomic/netware/apr_atomic.c2
-rw-r--r--atomic/os390/atomic.c22
-rw-r--r--buckets/apr_brigade.c44
-rw-r--r--buckets/apr_buckets_eos.c4
-rw-r--r--buckets/apr_buckets_flush.c6
-rw-r--r--buckets/apr_buckets_heap.c2
-rw-r--r--buckets/apr_buckets_mmap.c12
-rw-r--r--buckets/apr_buckets_pipe.c6
-rw-r--r--buckets/apr_buckets_pool.c2
-rw-r--r--buckets/apr_buckets_simple.c4
-rw-r--r--buckets/apr_buckets_socket.c6
-rw-r--r--build/jlibtool.c14
-rw-r--r--crypto/apr_crypto_prng.c2
-rw-r--r--crypto/apr_md4.c26
-rw-r--r--crypto/apr_md5.c30
-rw-r--r--crypto/apr_passwd.c2
-rw-r--r--crypto/getuuid.c2
-rw-r--r--dbd/apr_dbd_mysql.c2
-rw-r--r--dbd/apr_dbd_odbc.c132
-rw-r--r--dbd/apr_dbd_oracle.c8
-rw-r--r--dbd/apr_dbd_pgsql.c18
-rw-r--r--dbd/apr_dbd_sqlite2.c6
-rw-r--r--dbd/apr_dbd_sqlite3.c4
-rw-r--r--dbd/unsupported/apr_dbd_freetds.c4
-rw-r--r--dbm/apr_dbm.c24
-rw-r--r--dbm/apr_dbm_berkeleydb.c6
-rw-r--r--dbm/sdbm/sdbm.c48
-rw-r--r--dbm/sdbm/sdbm_hash.c2
-rw-r--r--dbm/sdbm/sdbm_lock.c2
-rw-r--r--dbm/sdbm/sdbm_pair.c10
-rw-r--r--dso/aix/dso.c14
-rw-r--r--dso/beos/dso.c6
-rw-r--r--dso/netware/dso.c14
-rw-r--r--dso/os2/dso.c6
-rw-r--r--dso/os390/dso.c14
-rw-r--r--dso/unix/dso.c14
-rw-r--r--dso/win32/dso.c10
-rw-r--r--encoding/apr_base64.c4
-rw-r--r--encoding/apr_escape.c2
-rw-r--r--file_io/netware/filestat.c42
-rw-r--r--file_io/netware/filesys.c2
-rw-r--r--file_io/netware/flock.c4
-rw-r--r--file_io/netware/pipe.c14
-rw-r--r--file_io/os2/buffer.c12
-rw-r--r--file_io/os2/dir.c16
-rw-r--r--file_io/os2/dir_make_recurse.c2
-rw-r--r--file_io/os2/filedup.c2
-rw-r--r--file_io/os2/filestat.c14
-rw-r--r--file_io/os2/filesys.c8
-rw-r--r--file_io/os2/maperrorcode.c4
-rw-r--r--file_io/os2/open.c30
-rw-r--r--file_io/os2/pipe.c12
-rw-r--r--file_io/os2/readwrite.c12
-rw-r--r--file_io/unix/buffer.c10
-rw-r--r--file_io/unix/dir.c30
-rw-r--r--file_io/unix/fileacc.c4
-rw-r--r--file_io/unix/filedup.c18
-rw-r--r--file_io/unix/filestat.c28
-rw-r--r--file_io/unix/open.c46
-rw-r--r--file_io/unix/pipe.c22
-rw-r--r--file_io/unix/printf.c4
-rw-r--r--file_io/unix/readwrite.c36
-rw-r--r--file_io/unix/tempdir.c12
-rw-r--r--file_io/win32/buffer.c14
-rw-r--r--file_io/win32/dir.c18
-rw-r--r--file_io/win32/filedup.c10
-rw-r--r--file_io/win32/filepath.c166
-rw-r--r--file_io/win32/filestat.c64
-rw-r--r--file_io/win32/filesys.c22
-rw-r--r--file_io/win32/flock.c4
-rw-r--r--file_io/win32/open.c58
-rw-r--r--file_io/win32/readwrite.c36
-rw-r--r--file_io/win32/seek.c10
-rw-r--r--locks/beos/proc_mutex.c20
-rw-r--r--locks/beos/thread_cond.c34
-rw-r--r--locks/beos/thread_mutex.c40
-rw-r--r--locks/beos/thread_rwlock.c14
-rw-r--r--locks/netware/proc_mutex.c8
-rw-r--r--locks/netware/thread_cond.c12
-rw-r--r--locks/netware/thread_mutex.c10
-rw-r--r--locks/netware/thread_rwlock.c8
-rw-r--r--locks/os2/proc_mutex.c4
-rw-r--r--locks/unix/proc_mutex.c68
-rw-r--r--locks/unix/thread_cond.c2
-rw-r--r--locks/unix/thread_mutex.c16
-rw-r--r--locks/unix/thread_rwlock.c2
-rw-r--r--locks/win32/proc_mutex.c12
-rw-r--r--memcache/apr_memcache.c92
-rw-r--r--memory/unix/apr_pools.c12
-rw-r--r--misc/netware/libprews.c2
-rw-r--r--misc/netware/rand.c10
-rw-r--r--misc/netware/start.c26
-rw-r--r--misc/unix/errorcodes.c28
-rw-r--r--misc/unix/getopt.c14
-rw-r--r--misc/unix/otherchild.c6
-rw-r--r--misc/unix/rand.c26
-rw-r--r--misc/unix/start.c8
-rw-r--r--misc/win32/apr_app.c2
-rw-r--r--misc/win32/internal.c4
-rw-r--r--misc/win32/misc.c18
-rw-r--r--misc/win32/rand.c2
-rw-r--r--misc/win32/utf8.c46
-rw-r--r--mmap/unix/common.c4
-rw-r--r--mmap/unix/mmap.c12
-rw-r--r--mmap/win32/mmap.c10
-rw-r--r--network_io/beos/sendrecv.c20
-rw-r--r--network_io/os2/sendrecv.c6
-rw-r--r--network_io/os2/sendrecv_udp.c2
-rw-r--r--network_io/os2/sockets.c34
-rw-r--r--network_io/os2/sockopt.c12
-rw-r--r--network_io/unix/multicast.c12
-rw-r--r--network_io/unix/sendrecv.c72
-rw-r--r--network_io/unix/sockaddr.c68
-rw-r--r--network_io/unix/sockets.c36
-rw-r--r--network_io/unix/sockopt.c24
-rw-r--r--network_io/win32/sendrecv.c48
-rw-r--r--network_io/win32/sockets.c54
-rw-r--r--network_io/win32/sockopt.c30
-rw-r--r--passwd/apr_getpass.c10
-rw-r--r--poll/unix/epoll.c26
-rw-r--r--poll/unix/kqueue.c36
-rw-r--r--poll/unix/poll.c10
-rw-r--r--poll/unix/port.c22
-rw-r--r--poll/unix/select.c2
-rw-r--r--poll/unix/z_asio.c14
-rw-r--r--random/unix/apr_random.c10
-rw-r--r--random/unix/sha2.c8
-rw-r--r--shmem/beos/shm.c30
-rw-r--r--shmem/os2/shm.c10
-rw-r--r--shmem/unix/shm.c46
-rw-r--r--shmem/win32/shm.c32
-rw-r--r--strings/apr_cpystrn.c14
-rw-r--r--strings/apr_cstr.c2
-rw-r--r--strings/apr_fnmatch.c36
-rw-r--r--strings/apr_snprintf.c20
-rw-r--r--strings/apr_strings.c8
-rw-r--r--strings/apr_strnatcmp.c6
-rw-r--r--strings/apr_strtok.c2
-rw-r--r--tables/apr_hash.c2
-rw-r--r--tables/apr_skiplist.c2
-rw-r--r--tables/apr_tables.c16
-rw-r--r--test/abts.c16
-rw-r--r--test/echod.c2
-rw-r--r--test/globalmutexchild.c4
-rw-r--r--test/internal/testregex.c6
-rw-r--r--test/internal/testutf.c34
-rw-r--r--test/proc_child.c2
-rw-r--r--test/readchild.c2
-rw-r--r--test/sendfile.c44
-rw-r--r--test/sockchild.c6
-rw-r--r--test/sockperf.c16
-rw-r--r--test/testargs.c12
-rw-r--r--test/testbuckets.c52
-rw-r--r--test/testcond.c2
-rw-r--r--test/testdate.c2
-rw-r--r--test/testdir.c8
-rw-r--r--test/testdso.c10
-rw-r--r--test/testdup.c14
-rw-r--r--test/testfile.c110
-rw-r--r--test/testfilecopy.c38
-rw-r--r--test/testfileinfo.c10
-rw-r--r--test/testflock.c6
-rw-r--r--test/testfnmatch.c6
-rw-r--r--test/testglobalmutex.c4
-rw-r--r--test/testhash.c8
-rw-r--r--test/testhooks.c4
-rw-r--r--test/testipsub.c6
-rw-r--r--test/testlfs.c46
-rw-r--r--test/testlock.c26
-rw-r--r--test/testlockperf.c12
-rw-r--r--test/testmd4.c30
-rw-r--r--test/testmd5.c6
-rw-r--r--test/testmemcache.c4
-rw-r--r--test/testmmap.c4
-rw-r--r--test/testmutexscope.c8
-rw-r--r--test/testnames.c16
-rw-r--r--test/testoc.c18
-rw-r--r--test/testpass.c8
-rw-r--r--test/testpipe.c16
-rw-r--r--test/testpoll.c56
-rw-r--r--test/testpools.c10
-rw-r--r--test/testproc.c8
-rw-r--r--test/testprocmutex.c14
-rw-r--r--test/testredis.c56
-rw-r--r--test/testshm.c12
-rw-r--r--test/testshmconsumer.c4
-rw-r--r--test/testshmproducer.c2
-rw-r--r--test/testskiplist.c6
-rw-r--r--test/testsock.c64
-rw-r--r--test/testsockets.c2
-rw-r--r--test/testsockopt.c4
-rw-r--r--test/teststr.c22
-rw-r--r--test/teststrmatch.c2
-rw-r--r--test/testtable.c8
-rw-r--r--test/testtemp.c2
-rw-r--r--test/testthread.c4
-rw-r--r--test/testuri.c2
-rw-r--r--test/testuser.c4
-rw-r--r--test/testutil.c6
-rw-r--r--test/testxml.c2
-rw-r--r--test/tryread.c2
-rw-r--r--threadproc/beos/apr_proc_stub.c10
-rw-r--r--threadproc/beos/proc.c62
-rw-r--r--threadproc/beos/thread.c12
-rw-r--r--threadproc/beos/threadpriv.c4
-rw-r--r--threadproc/beos/threadproc_common.c2
-rw-r--r--threadproc/netware/proc.c72
-rw-r--r--threadproc/netware/thread.c8
-rw-r--r--threadproc/netware/threadpriv.c16
-rw-r--r--threadproc/os2/proc.c56
-rw-r--r--threadproc/os2/thread.c6
-rw-r--r--threadproc/os2/threadpriv.c8
-rw-r--r--threadproc/unix/proc.c8
-rw-r--r--threadproc/unix/signals.c10
-rw-r--r--threadproc/unix/thread.c4
-rw-r--r--threadproc/win32/proc.c128
-rw-r--r--threadproc/win32/signals.c6
-rw-r--r--threadproc/win32/thread.c14
-rw-r--r--threadproc/win32/threadpriv.c4
-rw-r--r--time/unix/time.c6
-rw-r--r--time/unix/timestr.c2
-rw-r--r--time/win32/time.c16
-rw-r--r--time/win32/timestr.c2
-rw-r--r--uri/apr_uri.c16
-rw-r--r--user/netware/groupinfo.c4
-rw-r--r--user/unix/groupinfo.c4
-rw-r--r--user/unix/userinfo.c4
-rw-r--r--user/win32/groupinfo.c12
-rw-r--r--user/win32/userinfo.c26
-rw-r--r--util-misc/apr_date.c58
-rw-r--r--util-misc/apr_queue.c18
-rw-r--r--util-misc/apr_reslist.c2
-rw-r--r--util-misc/apr_rmm.c22
-rw-r--r--util-misc/apr_thread_pool.c12
-rw-r--r--xlate/xlate.c2
235 files changed, 2111 insertions, 2111 deletions
diff --git a/atomic/netware/apr_atomic.c b/atomic/netware/apr_atomic.c
index 9785fd3c2..d4168edf1 100644
--- a/atomic/netware/apr_atomic.c
+++ b/atomic/netware/apr_atomic.c
@@ -62,7 +62,7 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint
return atomic_xchg((unsigned long *)mem,(unsigned long)val);
}
-APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
+APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
{
return (atomic_xchgadd((unsigned long *)mem, 0xFFFFFFFF) - 1);
}
diff --git a/atomic/os390/atomic.c b/atomic/os390/atomic.c
index 9442f27ea..f7318aee9 100644
--- a/atomic/os390/atomic.c
+++ b/atomic/os390/atomic.c
@@ -29,7 +29,7 @@ apr_status_t apr_atomic_init(apr_pool_t *p)
apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
{
- apr_uint32_t old, new_val;
+ apr_uint32_t old, new_val;
old = *mem; /* old is automatically updated on cs failure */
do {
@@ -55,12 +55,12 @@ apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem)
int apr_atomic_dec32(volatile apr_uint32_t *mem)
{
- apr_uint32_t old, new_val;
+ apr_uint32_t old, new_val;
old = *mem; /* old is automatically updated on cs failure */
do {
new_val = old - 1;
- } while (__cs(&old, (cs_t *)mem, new_val));
+ } while (__cs(&old, (cs_t *)mem, new_val));
return new_val != 0;
}
@@ -75,11 +75,11 @@ void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
*mem = val;
}
-apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t swap,
+apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t swap,
apr_uint32_t cmp)
{
apr_uint32_t old = cmp;
-
+
__cs(&old, (cs_t *)mem, swap);
return old; /* old is automatically updated from mem on cs failure */
}
@@ -101,7 +101,7 @@ void *apr_atomic_casptr(void *volatile *mem_ptr,
{
__csg(&cmp_ptr, /* automatically updated from mem on __csg failure */
mem_ptr, /* set from swap when __csg succeeds */
- &swap_ptr);
+ &swap_ptr);
return (void *)cmp_ptr;
}
#else
@@ -110,12 +110,12 @@ void *apr_atomic_casptr(void *volatile *mem_ptr,
apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
{
- apr_uint32_t old, new_val;
+ apr_uint32_t old, new_val;
old = *mem; /* old is automatically updated on cs failure */
do {
new_val = val;
- } while (__cs(&old, (cs_t *)mem, new_val));
+ } while (__cs(&old, (cs_t *)mem, new_val));
return old;
}
@@ -127,10 +127,10 @@ APR_DECLARE(void*) apr_atomic_xchgptr(void *volatile *mem_ptr, void *new_ptr)
old_ptr = *mem_ptr; /* old is automatically updated on cs failure */
#if APR_SIZEOF_VOIDP == 4
do {
- } while (__cs1(&old_ptr, mem_ptr, &new_ptr));
+ } while (__cs1(&old_ptr, mem_ptr, &new_ptr));
#elif APR_SIZEOF_VOIDP == 8
- do {
- } while (__csg(&old_ptr, mem_ptr, &new_ptr));
+ do {
+ } while (__csg(&old_ptr, mem_ptr, &new_ptr));
#else
#error APR_SIZEOF_VOIDP value not supported
#endif /* APR_SIZEOF_VOIDP */
diff --git a/buckets/apr_brigade.c b/buckets/apr_brigade.c
index 20c7d192c..5a9403163 100644
--- a/buckets/apr_brigade.c
+++ b/buckets/apr_brigade.c
@@ -29,7 +29,7 @@
#include <sys/uio.h>
#endif
-static apr_status_t brigade_cleanup(void *data)
+static apr_status_t brigade_cleanup(void *data)
{
return apr_brigade_cleanup(data);
}
@@ -57,7 +57,7 @@ APR_DECLARE(apr_status_t) apr_brigade_cleanup(void *data)
apr_bucket_delete(e);
}
#endif
-
+
/* We don't need to free(bb) because it's allocated from a pool. */
return APR_SUCCESS;
}
@@ -68,7 +68,7 @@ APR_DECLARE(apr_status_t) apr_brigade_destroy(apr_bucket_brigade *b)
return apr_pool_cleanup_run(b->p, b, brigade_cleanup);
#else
apr_status_t rv;
-
+
APR_BRIGADE_CHECK_CONSISTENCY(b);
rv = apr_pool_cleanup_run(b->p, b, brigade_cleanup);
@@ -109,8 +109,8 @@ APR_DECLARE(apr_bucket_brigade *) apr_brigade_split_ex(apr_bucket_brigade *b,
else if (!APR_BRIGADE_EMPTY(a)) {
apr_brigade_cleanup(a);
}
- /* Return an empty brigade if there is nothing left in
- * the first brigade to split off
+ /* Return an empty brigade if there is nothing left in
+ * the first brigade to split off
*/
if (e != APR_BRIGADE_SENTINEL(b)) {
f = APR_RING_LAST(&b->list);
@@ -183,7 +183,7 @@ APR_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b,
* and is within this bucket, or this bucket's len
* is undefined, so now we are ready to split it.
* First try to split the bucket natively... */
- if ((rv = apr_bucket_split(e, (apr_size_t)point64))
+ if ((rv = apr_bucket_split(e, (apr_size_t)point64))
!= APR_ENOTIMPL) {
*after_point = APR_BUCKET_NEXT(e);
return rv;
@@ -212,7 +212,7 @@ APR_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b,
}
point64 -= (apr_uint64_t)e->length;
}
- *after_point = APR_BRIGADE_SENTINEL(b);
+ *after_point = APR_BRIGADE_SENTINEL(b);
return APR_INCOMPLETE;
}
@@ -254,7 +254,7 @@ APR_DECLARE(apr_status_t) apr_brigade_flatten(apr_bucket_brigade *bb,
{
apr_size_t actual = 0;
apr_bucket *b;
-
+
for (b = APR_BRIGADE_FIRST(bb);
b != APR_BRIGADE_SENTINEL(bb);
b = APR_BUCKET_NEXT(b))
@@ -304,14 +304,14 @@ APR_DECLARE(apr_status_t) apr_brigade_pflatten(apr_bucket_brigade *bb,
apr_status_t rv;
apr_brigade_length(bb, 1, &actual);
-
+
/* XXX: This is dangerous beyond belief. At least in the
* apr_brigade_flatten case, the user explicitly stated their
* buffer length - so we don't up and palloc 4GB for a single
* file bucket. This API must grow a useful max boundry,
* either compiled-in or preset via the *len value.
*
- * Shouldn't both fn's grow an additional return value for
+ * Shouldn't both fn's grow an additional return value for
* the case that the brigade couldn't be flattened into the
* provided or allocated buffer (such as APR_EMOREDATA?)
* Not a failure, simply an advisory result.
@@ -319,7 +319,7 @@ APR_DECLARE(apr_status_t) apr_brigade_pflatten(apr_bucket_brigade *bb,
total = (apr_size_t)actual;
*c = apr_palloc(pool, total);
-
+
rv = apr_brigade_flatten(bb, *c, &total);
if (rv != APR_SUCCESS) {
@@ -687,7 +687,7 @@ skip:
}
-APR_DECLARE(apr_status_t) apr_brigade_to_iovec(apr_bucket_brigade *b,
+APR_DECLARE(apr_status_t) apr_brigade_to_iovec(apr_bucket_brigade *b,
struct iovec *vec, int *nvec)
{
int left = *nvec;
@@ -719,7 +719,7 @@ APR_DECLARE(apr_status_t) apr_brigade_to_iovec(apr_bucket_brigade *b,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_brigade_vputstrs(apr_bucket_brigade *b,
+APR_DECLARE(apr_status_t) apr_brigade_vputstrs(apr_bucket_brigade *b,
apr_brigade_flush flush,
void *ctx,
va_list va)
@@ -761,7 +761,7 @@ APR_DECLARE(apr_status_t) apr_brigade_putc(apr_bucket_brigade *b,
APR_DECLARE(apr_status_t) apr_brigade_write(apr_bucket_brigade *b,
apr_brigade_flush flush,
- void *ctx,
+ void *ctx,
const char *str, apr_size_t nbyte)
{
apr_bucket *e = APR_BRIGADE_LAST(b);
@@ -782,7 +782,7 @@ APR_DECLARE(apr_status_t) apr_brigade_write(apr_bucket_brigade *b,
}
if (nbyte > remaining) {
- /* either a buffer bucket exists but is full,
+ /* either a buffer bucket exists but is full,
* or no buffer bucket exists and the data is too big
* to buffer. In either case, we should flush. */
if (flush) {
@@ -946,7 +946,7 @@ APR_DECLARE(apr_status_t) apr_brigade_puts(apr_bucket_brigade *bb,
return apr_brigade_write(bb, flush, ctx, str, strlen(str));
}
-APR_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b,
+APR_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b,
apr_brigade_flush flush,
void *ctx, ...)
{
@@ -959,9 +959,9 @@ APR_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b,
return rv;
}
-APR_DECLARE_NONSTD(apr_status_t) apr_brigade_printf(apr_bucket_brigade *b,
+APR_DECLARE_NONSTD(apr_status_t) apr_brigade_printf(apr_bucket_brigade *b,
apr_brigade_flush flush,
- void *ctx,
+ void *ctx,
const char *fmt, ...)
{
va_list ap;
@@ -1046,12 +1046,12 @@ APR_DECLARE(apr_bucket *) apr_brigade_insert_file(apr_bucket_brigade *bb,
apr_bucket *e;
if (sizeof(apr_off_t) == sizeof(apr_size_t) || length < MAX_BUCKET_SIZE) {
- e = apr_bucket_file_create(f, start, (apr_size_t)length, p,
+ e = apr_bucket_file_create(f, start, (apr_size_t)length, p,
bb->bucket_alloc);
}
else {
- /* Several buckets are needed. */
- e = apr_bucket_file_create(f, start, MAX_BUCKET_SIZE, p,
+ /* Several buckets are needed. */
+ e = apr_bucket_file_create(f, start, MAX_BUCKET_SIZE, p,
bb->bucket_alloc);
while (length > MAX_BUCKET_SIZE) {
@@ -1063,7 +1063,7 @@ APR_DECLARE(apr_bucket *) apr_brigade_insert_file(apr_bucket_brigade *bb,
}
e->length = (apr_size_t)length; /* Resize just the last bucket */
}
-
+
APR_BRIGADE_INSERT_TAIL(bb, e);
return e;
}
diff --git a/buckets/apr_buckets_eos.c b/buckets/apr_buckets_eos.c
index 446cd3c23..561cab6dd 100644
--- a/buckets/apr_buckets_eos.c
+++ b/buckets/apr_buckets_eos.c
@@ -16,7 +16,7 @@
#include "apr_buckets.h"
-static apr_status_t eos_bucket_read(apr_bucket *b, const char **str,
+static apr_status_t eos_bucket_read(apr_bucket *b, const char **str,
apr_size_t *len, apr_read_type_e block)
{
*str = NULL;
@@ -30,7 +30,7 @@ APR_DECLARE(apr_bucket *) apr_bucket_eos_make(apr_bucket *b)
b->start = 0;
b->data = NULL;
b->type = &apr_bucket_type_eos;
-
+
return b;
}
diff --git a/buckets/apr_buckets_flush.c b/buckets/apr_buckets_flush.c
index dbb4fb9ba..0d5645acf 100644
--- a/buckets/apr_buckets_flush.c
+++ b/buckets/apr_buckets_flush.c
@@ -16,7 +16,7 @@
#include "apr_buckets.h"
-static apr_status_t flush_bucket_read(apr_bucket *b, const char **str,
+static apr_status_t flush_bucket_read(apr_bucket *b, const char **str,
apr_size_t *len, apr_read_type_e block)
{
*str = NULL;
@@ -30,7 +30,7 @@ APR_DECLARE(apr_bucket *) apr_bucket_flush_make(apr_bucket *b)
b->start = 0;
b->data = NULL;
b->type = &apr_bucket_type_flush;
-
+
return b;
}
@@ -45,7 +45,7 @@ APR_DECLARE(apr_bucket *) apr_bucket_flush_create(apr_bucket_alloc_t *list)
}
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_flush = {
- "FLUSH", 5, APR_BUCKET_METADATA,
+ "FLUSH", 5, APR_BUCKET_METADATA,
apr_bucket_destroy_noop,
flush_bucket_read,
apr_bucket_setaside_noop,
diff --git a/buckets/apr_buckets_heap.c b/buckets/apr_buckets_heap.c
index 7405d2caf..81e0cfac0 100644
--- a/buckets/apr_buckets_heap.c
+++ b/buckets/apr_buckets_heap.c
@@ -18,7 +18,7 @@
#define APR_WANT_MEMFUNC
#include "apr_want.h"
-static apr_status_t heap_bucket_read(apr_bucket *b, const char **str,
+static apr_status_t heap_bucket_read(apr_bucket *b, const char **str,
apr_size_t *len, apr_read_type_e block)
{
apr_bucket_heap *h = b->data;
diff --git a/buckets/apr_buckets_mmap.c b/buckets/apr_buckets_mmap.c
index 116b78868..9a111a797 100644
--- a/buckets/apr_buckets_mmap.c
+++ b/buckets/apr_buckets_mmap.c
@@ -18,13 +18,13 @@
#if APR_HAS_MMAP
-static apr_status_t mmap_bucket_read(apr_bucket *b, const char **str,
+static apr_status_t mmap_bucket_read(apr_bucket *b, const char **str,
apr_size_t *length, apr_read_type_e block)
{
apr_bucket_mmap *m = b->data;
apr_status_t ok;
void *addr;
-
+
if (!m->mmap) {
/* the apr_mmap_t was already cleaned up out from under us */
return APR_EINVAL;
@@ -68,8 +68,8 @@ static void mmap_bucket_destroy(void *data)
/*
* XXX: are the start and length arguments useful?
*/
-APR_DECLARE(apr_bucket *) apr_bucket_mmap_make(apr_bucket *b, apr_mmap_t *mm,
- apr_off_t start,
+APR_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;
@@ -87,8 +87,8 @@ APR_DECLARE(apr_bucket *) apr_bucket_mmap_make(apr_bucket *b, apr_mmap_t *mm,
}
-APR_DECLARE(apr_bucket *) apr_bucket_mmap_create(apr_mmap_t *mm,
- apr_off_t start,
+APR_DECLARE(apr_bucket *) apr_bucket_mmap_create(apr_mmap_t *mm,
+ apr_off_t start,
apr_size_t length,
apr_bucket_alloc_t *list)
{
diff --git a/buckets/apr_buckets_pipe.c b/buckets/apr_buckets_pipe.c
index 574610b02..4c4730156 100644
--- a/buckets/apr_buckets_pipe.c
+++ b/buckets/apr_buckets_pipe.c
@@ -46,7 +46,7 @@ static apr_status_t pipe_bucket_read(apr_bucket *a, const char **str,
/*
* If there's more to read we have to keep the rest of the pipe
* for later. Otherwise, we'll close the pipe.
- * XXX: Note that more complicated bucket types that
+ * XXX: Note that more complicated bucket types that
* refer to data not in memory and must therefore have a read()
* function similar to this one should be wary of copying this
* code because if they have a destroy function they probably
@@ -94,7 +94,7 @@ APR_DECLARE(apr_bucket *) apr_bucket_pipe_make(apr_bucket *b, apr_file_t *p)
b->length = (apr_size_t)(-1);
b->start = -1;
b->data = p;
-
+
return b;
}
@@ -110,7 +110,7 @@ APR_DECLARE(apr_bucket *) apr_bucket_pipe_create(apr_file_t *p,
}
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_pipe = {
- "PIPE", 5, APR_BUCKET_DATA,
+ "PIPE", 5, APR_BUCKET_DATA,
apr_bucket_destroy_noop,
pipe_bucket_read,
apr_bucket_setaside_notimpl,
diff --git a/buckets/apr_buckets_pool.c b/buckets/apr_buckets_pool.c
index da6029072..2d68da593 100644
--- a/buckets/apr_buckets_pool.c
+++ b/buckets/apr_buckets_pool.c
@@ -42,7 +42,7 @@ static apr_status_t pool_bucket_cleanup(void *data)
return APR_SUCCESS;
}
-static apr_status_t pool_bucket_read(apr_bucket *b, const char **str,
+static apr_status_t pool_bucket_read(apr_bucket *b, const char **str,
apr_size_t *len, apr_read_type_e block)
{
apr_bucket_pool *p = b->data;
diff --git a/buckets/apr_buckets_simple.c b/buckets/apr_buckets_simple.c
index 14f11ba7d..fbe79810e 100644
--- a/buckets/apr_buckets_simple.c
+++ b/buckets/apr_buckets_simple.c
@@ -45,7 +45,7 @@ APR_DECLARE_NONSTD(apr_status_t) apr_bucket_simple_split(apr_bucket *a,
return APR_SUCCESS;
}
-static apr_status_t simple_bucket_read(apr_bucket *b, const char **str,
+static apr_status_t simple_bucket_read(apr_bucket *b, const char **str,
apr_size_t *len, apr_read_type_e block)
{
*str = (char *)b->data + b->start;
@@ -129,7 +129,7 @@ const apr_bucket_type_t apr_bucket_type_immortal = {
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_transient = {
"TRANSIENT", 5, APR_BUCKET_DATA,
- apr_bucket_destroy_noop,
+ apr_bucket_destroy_noop,
simple_bucket_read,
transient_bucket_setaside,
apr_bucket_simple_split,
diff --git a/buckets/apr_buckets_socket.c b/buckets/apr_buckets_socket.c
index 556304962..2a1ca9e1f 100644
--- a/buckets/apr_buckets_socket.c
+++ b/buckets/apr_buckets_socket.c
@@ -55,7 +55,7 @@ static apr_status_t socket_bucket_read(apr_bucket *a, const char **str,
* new bucket.
*
* Even if there is nothing more to read, don't close the socket here
- * as we have to use it to send any response :) We could shut it
+ * as we have to use it to send any response :) We could shut it
* down for reading, but there is no benefit to doing so.
*/
if (*len > 0) {
@@ -83,7 +83,7 @@ APR_DECLARE(apr_bucket *) apr_bucket_socket_make(apr_bucket *b, apr_socket_t *p)
* destroy it instead.
*
* Note that typically the socket is allocated from the connection pool
- * so it will disappear when the connection is finished.
+ * so it will disappear when the connection is finished.
*/
b->type = &apr_bucket_type_socket;
b->length = (apr_size_t)(-1);
@@ -108,7 +108,7 @@ APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_socket = {
"SOCKET", 5, APR_BUCKET_DATA,
apr_bucket_destroy_noop,
socket_bucket_read,
- apr_bucket_setaside_notimpl,
+ apr_bucket_setaside_notimpl,
apr_bucket_split_notimpl,
apr_bucket_copy_notimpl
};
diff --git a/build/jlibtool.c b/build/jlibtool.c
index 892e26d56..bae4c1d69 100644
--- a/build/jlibtool.c
+++ b/build/jlibtool.c
@@ -223,7 +223,7 @@ enum lib_type {
typedef struct {
const char **vals;
- int num;
+ int num;
} count_chars;
typedef struct {
@@ -312,7 +312,7 @@ static int snprintf( char *str, size_t n, const char *fmt, ... )
{
va_list ap;
int res;
-
+
va_start( ap, fmt );
res = vsnprintf( str, n, fmt, ap );
va_end( ap );
@@ -680,7 +680,7 @@ long safe_strtol(const char *nptr, const char **endptr, int base)
return 0;
}
- return rv;
+ return rv;
}
void safe_mkdir(const char *path)
@@ -867,7 +867,7 @@ char *check_object_exists(command_t *cmd, const char *arg, int arglen)
*/
default:
break;
- }
+ }
if (!cmd->options.silent) {
printf("Checking (obj): %s\n", newarg);
@@ -939,7 +939,7 @@ char *check_library_exists(command_t *cmd, const char *arg, int pathlen,
default:
*libtype = type_UNKNOWN;
break;
- }
+ }
if (!cmd->options.silent) {
printf("Checking (lib): %s\n", newarg);
@@ -1932,7 +1932,7 @@ int run_mode(command_t *cmd_data)
break;
default:
break;
- }
+ }
return 0;
}
@@ -2048,7 +2048,7 @@ int main(int argc, char *argv[])
rc = run_mode(&cmd_data);
if (!rc) {
- add_for_runtime(&cmd_data);
+ add_for_runtime(&cmd_data);
}
cleanup_tmp_dirs(&cmd_data);
diff --git a/crypto/apr_crypto_prng.c b/crypto/apr_crypto_prng.c
index cd4a2044d..820c11baf 100644
--- a/crypto/apr_crypto_prng.c
+++ b/crypto/apr_crypto_prng.c
@@ -472,7 +472,7 @@ APR_DECLARE(apr_status_t) apr_crypto_prng_reseed(apr_crypto_prng_t *cprng,
/* Use the system entropy, i.e. one of "/dev/[u]random", getrandom(),
* arc4random()... This may block but still we really want to wait for
* the system to gather enough entropy for these 32 initial bytes, much
- * more than we want non-random bytes, and that's once and for all!
+ * more than we want non-random bytes, and that's once and for all!
*/
rv = apr_generate_random_bytes(cprng->key, CPRNG_KEY_SIZE);
}
diff --git a/crypto/apr_md4.c b/crypto/apr_md4.c
index aef0a3404..d182d40dd 100644
--- a/crypto/apr_md4.c
+++ b/crypto/apr_md4.c
@@ -51,7 +51,7 @@
/* Constants for MD4Transform routine.
*/
-
+
#define S11 3
#define S12 7
#define S13 11
@@ -64,7 +64,7 @@
#define S32 9
#define S33 11
#define S34 15
-
+
static void MD4Transform(apr_uint32_t state[4], const unsigned char block[64]);
static void Encode(unsigned char *output, const apr_uint32_t *input,
unsigned int len);
@@ -119,7 +119,7 @@ APR_DECLARE(apr_status_t) apr_md4_init(apr_md4_ctx_t *context)
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
-
+
#if APR_HAS_XLATE
context->xlate = NULL;
#endif
@@ -132,7 +132,7 @@ APR_DECLARE(apr_status_t) apr_md4_init(apr_md4_ctx_t *context)
* to be used for translating the content before calculating the
* digest.
*/
-APR_DECLARE(apr_status_t) apr_md4_set_xlate(apr_md4_ctx_t *context,
+APR_DECLARE(apr_status_t) apr_md4_set_xlate(apr_md4_ctx_t *context,
apr_xlate_t *xlate)
{
apr_status_t rv;
@@ -169,7 +169,7 @@ APR_DECLARE(apr_status_t) apr_md4_update(apr_md4_ctx_t *context,
idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((apr_uint32_t)inputLen << 3))
+ if ((context->count[0] += ((apr_uint32_t)inputLen << 3))
< ((apr_uint32_t)inputLen << 3))
context->count[1]++;
context->count[1] += (apr_uint32_t)inputLen >> 29;
@@ -196,9 +196,9 @@ APR_DECLARE(apr_status_t) apr_md4_update(apr_md4_ctx_t *context,
if (inputLen >= partLen) {
if (context->xlate) {
inbytes_left = outbytes_left = partLen;
- apr_xlate_conv_buffer(context->xlate, (const char *)input,
- &inbytes_left,
- (char *)&context->buffer[idx],
+ apr_xlate_conv_buffer(context->xlate, (const char *)input,
+ &inbytes_left,
+ (char *)&context->buffer[idx],
&outbytes_left);
}
else {
@@ -210,7 +210,7 @@ APR_DECLARE(apr_status_t) apr_md4_update(apr_md4_ctx_t *context,
if (context->xlate) {
unsigned char inp_tmp[64];
inbytes_left = outbytes_left = 64;
- apr_xlate_conv_buffer(context->xlate, (const char *)&input[i],
+ apr_xlate_conv_buffer(context->xlate, (const char *)&input[i],
&inbytes_left,
(char *)inp_tmp, &outbytes_left);
MD4Transform(context->state, inp_tmp);
@@ -228,8 +228,8 @@ APR_DECLARE(apr_status_t) apr_md4_update(apr_md4_ctx_t *context,
/* Buffer remaining input */
if (context->xlate) {
inbytes_left = outbytes_left = inputLen - i;
- apr_xlate_conv_buffer(context->xlate, (const char *)&input[i],
- &inbytes_left, (char *)&context->buffer[idx],
+ apr_xlate_conv_buffer(context->xlate, (const char *)&input[i],
+ &inbytes_left, (char *)&context->buffer[idx],
&outbytes_left);
}
else {
@@ -270,7 +270,7 @@ APR_DECLARE(apr_status_t) apr_md4_final(
/* Zeroize sensitive information. */
memset(context, 0, sizeof(*context));
-
+
return APR_SUCCESS;
}
@@ -357,7 +357,7 @@ static void MD4Transform(apr_uint32_t state[4], const unsigned char block[64])
state[1] += b;
state[2] += c;
state[3] += d;
-
+
/* Zeroize sensitive information. */
apr_memzero_explicit(x, sizeof(x));
}
diff --git a/crypto/apr_md5.c b/crypto/apr_md5.c
index 2aa0b4c49..e6cba1122 100644
--- a/crypto/apr_md5.c
+++ b/crypto/apr_md5.c
@@ -145,14 +145,14 @@ static apr_xlate_t *xlate_ebcdic_to_ascii; /* used in apr_md5_encode() */
APR_DECLARE(apr_status_t) apr_md5_init(apr_md5_ctx_t *context)
{
context->count[0] = context->count[1] = 0;
-
+
/* Load magic initialization constants. */
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
context->xlate = NULL;
-
+
return APR_SUCCESS;
}
@@ -160,7 +160,7 @@ APR_DECLARE(apr_status_t) apr_md5_init(apr_md5_ctx_t *context)
* to be used for translating the content before calculating the
* digest.
*/
-APR_DECLARE(apr_status_t) apr_md5_set_xlate(apr_md5_ctx_t *context,
+APR_DECLARE(apr_status_t) apr_md5_set_xlate(apr_md5_ctx_t *context,
apr_xlate_t *xlate)
{
#if APR_HAS_XLATE
@@ -202,7 +202,7 @@ static apr_status_t md5_update_buffer(apr_md5_ctx_t *context,
idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((apr_uint32_t)inputLen << 3))
+ if ((context->count[0] += ((apr_uint32_t)inputLen << 3))
< ((apr_uint32_t)inputLen << 3))
context->count[1]++;
context->count[1] += (apr_uint32_t)inputLen >> 29;
@@ -229,9 +229,9 @@ static apr_status_t md5_update_buffer(apr_md5_ctx_t *context,
if (inputLen >= partLen) {
if (context->xlate && (xlate_buffer == DO_XLATE)) {
inbytes_left = outbytes_left = partLen;
- apr_xlate_conv_buffer(context->xlate, (const char *)input,
+ apr_xlate_conv_buffer(context->xlate, (const char *)input,
&inbytes_left,
- (char *)&context->buffer[idx],
+ (char *)&context->buffer[idx],
&outbytes_left);
}
else {
@@ -243,8 +243,8 @@ static apr_status_t md5_update_buffer(apr_md5_ctx_t *context,
if (context->xlate && (xlate_buffer == DO_XLATE)) {
unsigned char inp_tmp[64];
inbytes_left = outbytes_left = 64;
- apr_xlate_conv_buffer(context->xlate, (const char *)&input[i],
- &inbytes_left, (char *)inp_tmp,
+ apr_xlate_conv_buffer(context->xlate, (const char *)&input[i],
+ &inbytes_left, (char *)inp_tmp,
&outbytes_left);
MD5Transform(context->state, inp_tmp);
}
@@ -261,8 +261,8 @@ static apr_status_t md5_update_buffer(apr_md5_ctx_t *context,
/* Buffer remaining input */
if (context->xlate && (xlate_buffer == DO_XLATE)) {
inbytes_left = outbytes_left = inputLen - i;
- apr_xlate_conv_buffer(context->xlate, (const char *)&input[i],
- &inbytes_left, (char *)&context->buffer[idx],
+ apr_xlate_conv_buffer(context->xlate, (const char *)&input[i],
+ &inbytes_left, (char *)&context->buffer[idx],
&outbytes_left);
}
else {
@@ -272,9 +272,9 @@ static apr_status_t md5_update_buffer(apr_md5_ctx_t *context,
return APR_SUCCESS;
}
-/* MD5 block update operation. API with the default setting
+/* MD5 block update operation. API with the default setting
* for EBCDIC translations
- */
+ */
APR_DECLARE(apr_status_t) apr_md5_update(apr_md5_ctx_t *context,
const void *input,
apr_size_t inputLen)
@@ -312,7 +312,7 @@ APR_DECLARE(apr_status_t) apr_md5_final(unsigned char digest[APR_MD5_DIGESTSIZE]
/* Zeroize sensitive information. */
memset(context, 0, sizeof(*context));
-
+
return APR_SUCCESS;
}
@@ -517,7 +517,7 @@ APR_DECLARE(apr_status_t) apr_md5_encode(const char *pw, const char *salt,
apr_md5_ctx_t ctx, ctx1;
unsigned long l;
- /*
+ /*
* Refine the salt first. It's possible we were given an already-hashed
* string as the salt argument, so extract the actual salt value from it
* if so. Otherwise just use the string up to the first '$' as the salt.
@@ -550,7 +550,7 @@ APR_DECLARE(apr_status_t) apr_md5_encode(const char *pw, const char *salt,
#if APR_CHARSET_EBCDIC
apr_md5_set_xlate(&ctx, xlate_ebcdic_to_ascii);
#endif
-
+
/*
* The password first, since that is what is most unknown
*/
diff --git a/crypto/apr_passwd.c b/crypto/apr_passwd.c
index 01e9860b8..8807e0719 100644
--- a/crypto/apr_passwd.c
+++ b/crypto/apr_passwd.c
@@ -105,7 +105,7 @@ static void crypt_mutex_unlock()
* they match, or APR_EMISMATCH if they don't. If the platform doesn't
* support crypt, then the default check is against a clear text string.
*/
-APR_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
+APR_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
const char *hash)
{
char sample[200];
diff --git a/crypto/getuuid.c b/crypto/getuuid.c
index 94845b024..d7f9c1258 100644
--- a/crypto/getuuid.c
+++ b/crypto/getuuid.c
@@ -152,7 +152,7 @@ static void get_current_time(apr_uint64_t *timestamp)
static apr_uint64_t fudge = 0;
get_system_time(&time_now);
-
+
/* if clock reading changed since last UUID generated... */
if (time_last != time_now) {
/* The clock reading has changed since the last UUID was generated.
diff --git a/dbd/apr_dbd_mysql.c b/dbd/apr_dbd_mysql.c
index 9f6fce663..238d6f53c 100644
--- a/dbd/apr_dbd_mysql.c
+++ b/dbd/apr_dbd_mysql.c
@@ -33,7 +33,7 @@
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
#else /* !defined(HAVE_MYSQL_MYSQL_H) */
-#if defined(HAVE_MY_GLOBAL_H)
+#if defined(HAVE_MY_GLOBAL_H)
#include <my_global.h>
#if defined(HAVE_MY_SYS_H)
#include <my_sys.h>
diff --git a/dbd/apr_dbd_odbc.c b/dbd/apr_dbd_odbc.c
index 552483d9b..f2661973c 100644
--- a/dbd/apr_dbd_odbc.c
+++ b/dbd/apr_dbd_odbc.c
@@ -30,7 +30,7 @@
#include <stdlib.h>
-/* If library is ODBC-V2, use macros for limited ODBC-V2 support
+/* If library is ODBC-V2, use macros for limited ODBC-V2 support
* No random access in V2.
*/
#ifdef ODBCV2
@@ -47,9 +47,9 @@
#include <odbc/sqlext.h>
#endif
-/* Driver name is "odbc" and the entry point is 'apr_dbd_odbc_driver'
+/* Driver name is "odbc" and the entry point is 'apr_dbd_odbc_driver'
* unless ODBC_DRIVER_NAME is defined and it is linked with another db library which
- * is ODBC source-compatible. e.g. DB2, Informix, TimesTen, mysql.
+ * is ODBC source-compatible. e.g. DB2, Informix, TimesTen, mysql.
*/
#ifndef ODBC_DRIVER_NAME
#define ODBC_DRIVER_NAME odbc
@@ -86,14 +86,14 @@ static void check_error(apr_dbd_t *a, const char *step, SQLRETURN rc,
#define TEXTMODE 1 /* used for text (APR 1.2) mode params */
#define BINARYMODE 0 /* used for binary (APR 1.3+) mode params */
-/* Identify datatypes which are LOBs
+/* Identify datatypes which are LOBs
* - DB2 DRDA driver uses undefined types -98 and -99 for CLOB & BLOB
*/
#define IS_LOB(t) (t == SQL_LONGVARCHAR \
|| t == SQL_LONGVARBINARY || t == SQL_VARBINARY \
|| t == -98 || t == -99)
-/* These types are CLOBs
+/* These types are CLOBs
* - DB2 DRDA driver uses undefined type -98 for CLOB
*/
#define IS_CLOB(t) \
@@ -112,7 +112,7 @@ struct apr_dbd_t
int lasterrorcode;
int lineNumber;
char lastError[MAX_ERROR_STRING];
- int defaultBufferSize; /* used for CLOBs in text mode,
+ int defaultBufferSize; /* used for CLOBs in text mode,
* and when fld size is indeterminate */
apr_intptr_t transaction_mode;
apr_intptr_t dboptions; /* driver options re SQLGetData */
@@ -136,7 +136,7 @@ struct apr_dbd_results_t
SQLSMALLINT *coltypes; /* array of SQL data types for columns */
SQLLEN *colinds; /* array of SQL data indicator/strlens */
int *colstate; /* array of column states
- * - avail, bound, present, unavail
+ * - avail, bound, present, unavail
*/
int *all_data_fetched; /* flags data as all fetched, for LOBs */
void *data; /* buffer for all data for one row */
@@ -150,7 +150,7 @@ enum /* results column states */
COL_RETRIEVED, /* all data from column has been returned */
COL_UNAVAIL /* column is unavailable because ODBC driver
* requires that columns be retrieved
- * in ascending order and a higher col
+ * in ascending order and a higher col
* was accessed
*/
};
@@ -200,8 +200,8 @@ typedef struct {
SQLSMALLINT type;
} odbc_bucket;
-/* SQL datatype mappings to DBD datatypes
- * These tables must correspond *exactly* to the apr_dbd_type_e enum
+/* SQL datatype mappings to DBD datatypes
+ * These tables must correspond *exactly* to the apr_dbd_type_e enum
* in apr_dbd.h
*/
@@ -296,7 +296,7 @@ static apr_status_t odbc_close_results(void *d)
{
apr_dbd_results_t *dbr = (apr_dbd_results_t *)d;
SQLRETURN rc = SQL_SUCCESS;
-
+
if (dbr && dbr->apr_dbd && dbr->apr_dbd->dbc) {
if (!dbr->isclosed)
rc = SQLCloseCursor(dbr->stmt);
@@ -307,7 +307,7 @@ static apr_status_t odbc_close_results(void *d)
/* close the ODBC statement handle from a prepare */
static apr_status_t odbc_close_pstmt(void *s)
-{
+{
SQLRETURN rc = APR_SUCCESS;
apr_dbd_prepared_t *statement = s;
@@ -346,7 +346,7 @@ static apr_status_t odbc_close_cleanup(void *handle)
/* close the ODBC environment handle at process termination */
static apr_status_t odbc_close_env(SQLHANDLE henv)
-{
+{
SQLRETURN rc;
rc = SQLFreeHandle(SQL_HANDLE_ENV, henv);
@@ -355,7 +355,7 @@ static apr_status_t odbc_close_env(SQLHANDLE henv)
}
/* setup the arrays in results for all the returned columns */
-static SQLRETURN odbc_set_result_column(int icol, apr_dbd_results_t *res,
+static SQLRETURN odbc_set_result_column(int icol, apr_dbd_results_t *res,
SQLHANDLE stmt)
{
SQLRETURN rc;
@@ -388,21 +388,21 @@ static SQLRETURN odbc_set_result_column(int icol, apr_dbd_results_t *res,
type += (isunsigned) ? SQL_UNSIGNED_OFFSET : SQL_SIGNED_OFFSET;
break;
/* LOB types are not changed to C types */
- case SQL_LONGVARCHAR:
- type = SQL_LONGVARCHAR;
+ case SQL_LONGVARCHAR:
+ type = SQL_LONGVARCHAR;
break;
- case SQL_LONGVARBINARY:
- type = SQL_LONGVARBINARY;
+ case SQL_LONGVARBINARY:
+ type = SQL_LONGVARBINARY;
break;
- case SQL_FLOAT :
- type = SQL_C_FLOAT;
+ case SQL_FLOAT :
+ type = SQL_C_FLOAT;
break;
- case SQL_DOUBLE :
- type = SQL_C_DOUBLE;
+ case SQL_DOUBLE :
+ type = SQL_C_DOUBLE;
break;
/* DBD wants times as strings */
- case SQL_TIMESTAMP:
+ case SQL_TIMESTAMP:
case SQL_DATE:
case SQL_TIME:
default:
@@ -449,15 +449,15 @@ static SQLRETURN odbc_set_result_column(int icol, apr_dbd_results_t *res,
res->colsizes[icol] = (SQLINTEGER)maxsize;
if (res->apr_dbd->dboptions & SQL_GD_BOUND) {
/* we are allowed to call SQLGetData if we need to */
- rc = SQLBindCol(stmt, icol + 1, res->coltypes[icol],
- res->colptrs[icol], maxsize,
+ rc = SQLBindCol(stmt, icol + 1, res->coltypes[icol],
+ res->colptrs[icol], maxsize,
&(res->colinds[icol]));
CHECK_ERROR(res->apr_dbd, "SQLBindCol", rc, SQL_HANDLE_STMT,
stmt);
res->colstate[icol] = SQL_SUCCEEDED(rc) ? COL_BOUND : COL_AVAIL;
}
else {
- /* this driver won't allow us to call SQLGetData on bound
+ /* this driver won't allow us to call SQLGetData on bound
* columns - so don't bind any
*/
res->colstate[icol] = COL_AVAIL;
@@ -599,7 +599,7 @@ static SQLRETURN odbc_bind_param(apr_pool_t *pool,
(*argp)++; /* non LOBs consume one argument */
}
}
- rc = SQLBindParameter(statement->stmt, narg, inOut, cType,
+ rc = SQLBindParameter(statement->stmt, narg, inOut, cType,
baseType, len, 0, ptr, len, indicator);
CHECK_ERROR(statement->apr_dbd, "SQLBindParameter", rc, SQL_HANDLE_STMT,
statement->stmt);
@@ -625,7 +625,7 @@ static apr_status_t odbc_lob_bucket_setaside(apr_bucket *e, apr_pool_t *pool)
/* Unlikely - but if the row pool is ancestor of this pool then it is OK */
if (apr_pool_is_ancestor(bd->row->pool, pool))
return APR_SUCCESS;
-
+
return apr_bucket_setaside_notimpl(e, pool);
}
@@ -641,12 +641,12 @@ static apr_status_t odbc_lob_bucket_read(apr_bucket *e, const char **str,
void *buf;
int bufsize = bd->row->res->apr_dbd->defaultBufferSize;
int eos;
-
+
/* C type is CHAR for CLOBs, DEFAULT for BLOBs */
type = bd->row->res->coltypes[bd->col];
type = (type == SQL_LONGVARCHAR) ? SQL_C_CHAR : SQL_C_DEFAULT;
- /* LOB buffers are always at least APR_BUCKET_BUFF_SIZE,
+ /* LOB buffers are always at least APR_BUCKET_BUFF_SIZE,
* but they may be much bigger per the BUFSIZE parameter.
*/
if (bufsize < APR_BUCKET_BUFF_SIZE)
@@ -656,13 +656,13 @@ static apr_status_t odbc_lob_bucket_read(apr_bucket *e, const char **str,
*str = NULL;
*len = 0;
- rc = SQLGetData(bd->row->res->stmt, bd->col + 1,
- type, buf, bufsize,
+ rc = SQLGetData(bd->row->res->stmt, bd->col + 1,
+ type, buf, bufsize,
&len_indicator);
- CHECK_ERROR(bd->row->res->apr_dbd, "SQLGetData", rc,
+ CHECK_ERROR(bd->row->res->apr_dbd, "SQLGetData", rc,
SQL_HANDLE_STMT, bd->row->res->stmt);
-
+
if (rc == SQL_NO_DATA || len_indicator == SQL_NULL_DATA || len_indicator < 0)
len_indicator = 0;
@@ -676,11 +676,11 @@ static apr_status_t odbc_lob_bucket_read(apr_bucket *e, const char **str,
eos = 0;
}
else {
- /* the last read - len_indicator is supposed to be the length,
+ /* the last read - len_indicator is supposed to be the length,
* but some driver get this wrong and return the total length.
* We try to handle both interpretations.
*/
- *len = (len_indicator > bufsize
+ *len = (len_indicator > bufsize
&& len_indicator >= (SQLLEN)e->start)
? (len_indicator - (SQLLEN)e->start) : len_indicator;
@@ -713,14 +713,14 @@ static apr_status_t odbc_lob_bucket_read(apr_bucket *e, const char **str,
}
/* Create a bucket brigade on the row pool for a LOB column */
-static apr_status_t odbc_create_bucket(const apr_dbd_row_t *row, const int col,
+static apr_status_t odbc_create_bucket(const apr_dbd_row_t *row, const int col,
SQLSMALLINT type, apr_bucket_brigade *bb)
{
apr_bucket_alloc_t *list = bb->bucket_alloc;
apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
odbc_bucket *bd = apr_bucket_alloc(sizeof(odbc_bucket), list);
apr_bucket *eos = apr_bucket_eos_create(list);
-
+
bd->row = row;
bd->col = col;
bd->type = type;
@@ -741,7 +741,7 @@ static apr_status_t odbc_create_bucket(const apr_dbd_row_t *row, const int col,
/* returns a data pointer for a column, returns NULL for NULL value,
* return -1 if data not available
*/
-static void *odbc_get(const apr_dbd_row_t *row, const int col,
+static void *odbc_get(const apr_dbd_row_t *row, const int col,
const SQLSMALLINT sqltype)
{
SQLRETURN rc;
@@ -756,11 +756,11 @@ static void *odbc_get(const apr_dbd_row_t *row, const int col,
return NULL;
case (COL_BOUND):
- case (COL_PRESENT):
+ case (COL_PRESENT):
if (sqltype == row->res->coltypes[col]) {
/* same type and we already have the data */
row->res->colstate[col] = COL_RETRIEVED;
- return (row->res->colinds[col] == SQL_NULL_DATA) ?
+ return (row->res->colinds[col] == SQL_NULL_DATA) ?
NULL : row->res->colptrs[col];
}
}
@@ -793,7 +793,7 @@ static void *odbc_get(const apr_dbd_row_t *row, const int col,
rc = SQLGetData(row->res->stmt, col + 1, sqltype, row->res->colptrs[col],
row->res->colsizes[col], &indicator);
- CHECK_ERROR(row->res->apr_dbd, "SQLGetData", rc, SQL_HANDLE_STMT,
+ CHECK_ERROR(row->res->apr_dbd, "SQLGetData", rc, SQL_HANDLE_STMT,
row->res->stmt);
if (indicator == SQL_NULL_DATA || rc == SQL_NO_DATA)
return NULL;
@@ -804,7 +804,7 @@ static void *odbc_get(const apr_dbd_row_t *row, const int col,
/* this allows getting CLOBs in text mode by calling get_entry
* until it returns NULL
*/
- row->res->colstate[col] =
+ row->res->colstate[col] =
(rc == SQL_SUCCESS_WITH_INFO) ? COL_AVAIL : COL_RETRIEVED;
return row->res->colptrs[col];
}
@@ -814,8 +814,8 @@ static void *odbc_get(const apr_dbd_row_t *row, const int col,
/* Parse the parameter string for open */
static apr_status_t odbc_parse_params(apr_pool_t *pool, const char *params,
- int *connect, SQLCHAR **datasource,
- SQLCHAR **user, SQLCHAR **password,
+ int *connect, SQLCHAR **datasource,
+ SQLCHAR **user, SQLCHAR **password,
int *defaultBufferSize, int *nattrs,
int **attrs, apr_intptr_t **attrvals)
{
@@ -954,7 +954,7 @@ static void check_error(apr_dbd_t *dbc, const char *step, SQLRETURN rc,
res = "unrecognized SQL return code";
}
/* these two returns are expected during normal execution */
- if (rc != SQL_SUCCESS_WITH_INFO && rc != SQL_NO_DATA
+ if (rc != SQL_SUCCESS_WITH_INFO && rc != SQL_NO_DATA
&& dbc->can_commit != APR_DBD_TRANSACTION_IGNORE_ERRORS) {
dbc->can_commit = APR_DBD_TRANSACTION_ROLLBACK;
}
@@ -964,9 +964,9 @@ static void check_error(apr_dbd_t *dbc, const char *step, SQLRETURN rc,
p += sprintf(p, "[dbd_odbc] %.64s returned %.30s (%d) at %.24s:%d ",
step, res, rc, SOURCE_FILE, line - 1);
for (i = 1, rc = 0; rc == 0; i++) {
- rc = SQLGetDiagRec(type, h, i, sqlstate, &native, buffer,
+ rc = SQLGetDiagRec(type, h, i, sqlstate, &native, buffer,
sizeof(buffer), &reslength);
- if (SQL_SUCCEEDED(rc) && (p < (end - 280)))
+ if (SQL_SUCCEEDED(rc) && (p < (end - 280)))
p += sprintf(p, "%.256s %.20s ", buffer, sqlstate);
}
apr_env_get(&logval, "apr_dbd_odbc_log", dbc->pool);
@@ -1002,21 +1002,21 @@ static void odbc_init(apr_pool_t *pool)
SQLRETURN rc;
char *step;
apr_version_t aprver;
-
+
apr_version(&aprver);
- if (aprver.major != DRIVER_APR_VERSION_MAJOR
+ if (aprver.major != DRIVER_APR_VERSION_MAJOR
|| aprver.minor != DRIVER_APR_VERSION_MINOR) {
apr_file_t *se;
apr_file_open_stderr(&se, pool);
apr_file_printf(se, "Incorrect " ODBC_DRIVER_STRING " dbd driver version\n"
"Attempt to load APR version %d.%d driver with APR version %d.%d\n",
- DRIVER_APR_VERSION_MAJOR, DRIVER_APR_VERSION_MINOR,
+ DRIVER_APR_VERSION_MAJOR, DRIVER_APR_VERSION_MINOR,
aprver.major, aprver.minor);
abort();
}
- if (henv)
+ if (henv)
return;
step = "SQLAllocHandle (SQL_HANDLE_ENV)";
@@ -1045,7 +1045,7 @@ static void *odbc_native_handle(apr_dbd_t *handle)
/** open: obtain a database connection from the server rec. **/
-/* It would be more efficient to allocate a single statement handle
+/* It would be more efficient to allocate a single statement handle
* here - but SQL_ATTR_CURSOR_SCROLLABLE must be set before
* SQLPrepare, and we don't know whether random-access is
* specified until SQLExecute so we cannot.
@@ -1199,7 +1199,7 @@ static int odbc_start_transaction(apr_pool_t *pool, apr_dbd_t *handle,
static int odbc_end_transaction(apr_dbd_transaction_t *trans)
{
SQLRETURN rc;
- int action = (trans->apr_dbd->can_commit != APR_DBD_TRANSACTION_ROLLBACK)
+ int action = (trans->apr_dbd->can_commit != APR_DBD_TRANSACTION_ROLLBACK)
? SQL_COMMIT : SQL_ROLLBACK;
rc = SQLEndTran(SQL_HANDLE_DBC, trans->dbc, action);
@@ -1283,7 +1283,7 @@ static int odbc_select(apr_pool_t *pool, apr_dbd_t *handle,
}
if (SQL_SUCCEEDED(rc)) {
rc = odbc_create_results(handle, hstmt, pool, random, res);
- apr_pool_cleanup_register(pool, *res,
+ apr_pool_cleanup_register(pool, *res,
odbc_close_results, apr_pool_cleanup_null);
}
return APR_FROM_SQL_RESULT(rc);
@@ -1327,7 +1327,7 @@ static int odbc_get_row(apr_pool_t *pool, apr_dbd_results_t *res,
}
/* some drivers do not null-term zero-len CHAR data */
if (res->colptrs[c])
- *(char *)res->colptrs[c] = 0;
+ *(char *)res->colptrs[c] = 0;
}
if (res->random && (rownum > 0)) {
fetchtype = "SQLFetchScroll";
@@ -1369,7 +1369,7 @@ static apr_status_t odbc_datum_get(const apr_dbd_row_t *row, int col,
sqltype = sqlCtype[dbdtype];
/* must not memcpy a brigade, sentinals are relative to orig loc */
- if (IS_LOB(sqltype))
+ if (IS_LOB(sqltype))
return odbc_create_bucket(row, col, sqltype, data);
p = odbc_get(row, col, sqltype);
@@ -1378,12 +1378,12 @@ static apr_status_t odbc_datum_get(const apr_dbd_row_t *row, int col,
if (p == NULL)
return APR_ENOENT; /* SQL NULL value */
-
+
if (len < 0)
*(char**)data = (char *)p;
else
memcpy(data, p, len);
-
+
return APR_SUCCESS;
}
@@ -1400,26 +1400,26 @@ static const char *odbc_get_entry(const apr_dbd_row_t *row, int col)
/* NULL or invalid (-1) */
if (p == NULL || p == (void *)-1)
- return p;
+ return p;
else
- return apr_pstrdup(row->pool, p);
+ return apr_pstrdup(row->pool, p);
}
/** error: get current error message (if any) **/
static const char *odbc_error(apr_dbd_t *handle, int errnum)
-{
+{
return (handle) ? handle->lastError : "[dbd_odbc]No error message available";
}
/** escape: escape a string so it is safe for use in query/select **/
static const char *odbc_escape(apr_pool_t *pool, const char *s,
apr_dbd_t *handle)
-{
+{
char *newstr, *src, *dst, *sq;
int qcount;
/* return the original if there are no single-quotes */
- if (!(sq = strchr(s, '\'')))
+ if (!(sq = strchr(s, '\'')))
return (char *)s;
/* count the single-quotes and allocate a new buffer */
for (qcount = 1; (sq = strchr(sq + 1, '\'')); )
@@ -1429,7 +1429,7 @@ static const char *odbc_escape(apr_pool_t *pool, const char *s,
/* move chars, doubling all single-quotes */
src = (char *)s;
for (dst = newstr; *src; src++) {
- if ((*dst++ = *src) == '\'')
+ if ((*dst++ = *src) == '\'')
*dst++ = '\'';
}
*dst = 0;
@@ -1456,7 +1456,7 @@ static int odbc_prepare(apr_pool_t *pool, apr_dbd_t *handle,
(*statement)->types =
apr_pmemdup(pool, types, nargs * sizeof(apr_dbd_type_e));
rc = SQLAllocHandle(SQL_HANDLE_STMT, handle->dbc, &((*statement)->stmt));
- apr_pool_cleanup_register(pool, *statement,
+ apr_pool_cleanup_register(pool, *statement,
odbc_close_pstmt, apr_pool_cleanup_null);
CHECK_ERROR(handle, "SQLAllocHandle (STMT)", rc,
SQL_HANDLE_DBC, handle->dbc);
diff --git a/dbd/apr_dbd_oracle.c b/dbd/apr_dbd_oracle.c
index a851e1f92..9e7ec9ce6 100644
--- a/dbd/apr_dbd_oracle.c
+++ b/dbd/apr_dbd_oracle.c
@@ -762,7 +762,7 @@ static const char *dbd_oracle_error(apr_dbd_t *sql, int n)
switch (OCIErrorGet(sql->err, 1, NULL, &errorcode,
(text*) sql->buf, sizeof(sql->buf), OCI_HTYPE_ERROR)) {
case OCI_SUCCESS:
- return sql->buf;
+ return sql->buf;
default:
return "internal error: OCIErrorGet failed";
}
@@ -2134,16 +2134,16 @@ static apr_status_t dbd_oracle_check_conn(apr_pool_t *pool, apr_dbd_t *sql)
{
apr_dbd_results_t *res = NULL;
apr_dbd_row_t *row = NULL;
-
+
if(dbd_oracle_pselect(pool, sql, &res, sql->check_conn_stmt,
0, NULL) != 0) {
return APR_EGENERAL;
}
-
+
if(dbd_oracle_get_row(pool, res, &row, -1) != 0) {
return APR_EGENERAL;
}
-
+
if(dbd_oracle_get_row(pool, res, &row, -1) != -1) {
return APR_EGENERAL;
}
diff --git a/dbd/apr_dbd_pgsql.c b/dbd/apr_dbd_pgsql.c
index af09e0a47..8eb7e5f50 100644
--- a/dbd/apr_dbd_pgsql.c
+++ b/dbd/apr_dbd_pgsql.c
@@ -424,7 +424,7 @@ static int dbd_pgsql_query(apr_dbd_t *sql, int *nrows, const char *query)
else {
ret = PGRES_FATAL_ERROR;
}
-
+
if (ret != 0){
if (TXN_IGNORE_ERRORS(sql->trans)) {
PGresult *res = PQexec(sql->conn,
@@ -501,19 +501,19 @@ static int dbd_pgsql_prepare(apr_pool_t *pool, apr_dbd_t *sql,
for (i = 0; i < nargs; i++) {
switch (types[i]) {
- case APR_DBD_TYPE_TINY:
- case APR_DBD_TYPE_UTINY:
- case APR_DBD_TYPE_SHORT:
+ case APR_DBD_TYPE_TINY:
+ case APR_DBD_TYPE_UTINY:
+ case APR_DBD_TYPE_SHORT:
case APR_DBD_TYPE_USHORT:
args[i] = "smallint";
break;
- case APR_DBD_TYPE_INT:
+ case APR_DBD_TYPE_INT:
case APR_DBD_TYPE_UINT:
args[i] = "integer";
break;
- case APR_DBD_TYPE_LONG:
- case APR_DBD_TYPE_ULONG:
- case APR_DBD_TYPE_LONGLONG:
+ case APR_DBD_TYPE_LONG:
+ case APR_DBD_TYPE_ULONG:
+ case APR_DBD_TYPE_LONGLONG:
case APR_DBD_TYPE_ULONGLONG:
args[i] = "bigint";
break;
@@ -1209,7 +1209,7 @@ static apr_dbd_t *dbd_pgsql_open(apr_pool_t *pool, const char *params,
const char **error)
{
apr_dbd_t *sql;
-
+
PGconn *conn = PQconnectdb(params);
/* if there's an error in the connect string or something we get
diff --git a/dbd/apr_dbd_sqlite2.c b/dbd/apr_dbd_sqlite2.c
index af72b931f..44b536185 100644
--- a/dbd/apr_dbd_sqlite2.c
+++ b/dbd/apr_dbd_sqlite2.c
@@ -73,7 +73,7 @@ struct apr_dbd_prepared_t {
static apr_status_t free_table(void *data)
{
- sqlite_free_table(data);
+ sqlite_free_table(data);
return APR_SUCCESS;
}
@@ -159,8 +159,8 @@ static int dbd_sqlite_get_row(apr_pool_t * pool, apr_dbd_results_t * res,
}
/* Pointer magic explanation:
- * The sqlite result is an array such that the first res->sz elements are
- * the column names and each tuple follows afterwards
+ * The sqlite result is an array such that the first res->sz elements are
+ * the column names and each tuple follows afterwards
* ex: (from the sqlite2 documentation)
SELECT employee_name, login, host FROM users WHERE login LIKE * 'd%';
diff --git a/dbd/apr_dbd_sqlite3.c b/dbd/apr_dbd_sqlite3.c
index 33f3034f7..bbdc9f73b 100644
--- a/dbd/apr_dbd_sqlite3.c
+++ b/dbd/apr_dbd_sqlite3.c
@@ -422,7 +422,7 @@ static int dbd_sqlite3_prepare(apr_pool_t *pool, apr_dbd_t *sql,
ret = sqlite3_prepare(sql->conn, query, strlen(query), &stmt, &tail);
if (ret == SQLITE_OK) {
- apr_dbd_prepared_t *prep;
+ apr_dbd_prepared_t *prep;
prep = apr_pcalloc(sql->pool, sizeof(*prep));
prep->stmt = stmt;
@@ -438,7 +438,7 @@ static int dbd_sqlite3_prepare(apr_pool_t *pool, apr_dbd_t *sql,
} else {
sqlite3_finalize(stmt);
}
-
+
apr_dbd_mutex_unlock();
return ret;
diff --git a/dbd/unsupported/apr_dbd_freetds.c b/dbd/unsupported/apr_dbd_freetds.c
index ba952e95b..dac9ea05f 100644
--- a/dbd/unsupported/apr_dbd_freetds.c
+++ b/dbd/unsupported/apr_dbd_freetds.c
@@ -216,7 +216,7 @@ static const char *dbd_statement(apr_pool_t *pool,
const char *p_in;
char *p_out;
char *q;
-
+
/* compute upper bound on length (since untaint shrinks) */
len = strlen(stmt->fmt) +1;
for (i=0; i<nargs; ++i) {
@@ -612,7 +612,7 @@ static DBPROCESS *freetds_open(apr_pool_t *pool, const char *params,
{
dbuse(process, databaseName);
}
-
+
dbloginfree(login);
if (process == NULL) {
return NULL;
diff --git a/dbm/apr_dbm.c b/dbm/apr_dbm.c
index 904543bf6..942573644 100644
--- a/dbm/apr_dbm.c
+++ b/dbm/apr_dbm.c
@@ -36,7 +36,7 @@
#include "apr_dbm_private.h"
/* ### note: the setting of DBM_VTABLE will go away once we have multiple
- ### DBMs in here.
+ ### DBMs in here.
### Well, that day is here. So, do we remove DBM_VTABLE and the old
### API entirely? Oh, what to do. We need an APU_DEFAULT_DBM #define.
### Sounds like a job for autoconf. */
@@ -143,9 +143,9 @@ APR_DECLARE(apr_status_t) apr_dbm_get_driver(const apr_dbm_driver_t **vtable,
if (!strcasecmp(type, "default")) type = DBM_NAME;
else if (!strcasecmp(type, "db")) type = "db";
else if (*type && !strcasecmp(type + 1, "dbm")) {
- if (*type == 'G' || *type == 'g') type = "gdbm";
- else if (*type == 'N' || *type == 'n') type = "ndbm";
- else if (*type == 'S' || *type == 's') type = "sdbm";
+ if (*type == 'G' || *type == 'g') type = "gdbm";
+ else if (*type == 'N' || *type == 'n') type = "ndbm";
+ else if (*type == 'S' || *type == 's') type = "sdbm";
}
else usertype = 1;
@@ -232,8 +232,8 @@ APR_DECLARE(apr_status_t) apr_dbm_get_driver(const apr_dbm_driver_t **vtable,
#endif /* APR_HAVE_MODULAR_DSO */
}
-APR_DECLARE(apr_status_t) apr_dbm_open_ex(apr_dbm_t **pdb, const char *type,
- const char *pathname,
+APR_DECLARE(apr_status_t) apr_dbm_open_ex(apr_dbm_t **pdb, const char *type,
+ const char *pathname,
apr_int32_t mode,
apr_fileperms_t perm,
apr_pool_t *pool)
@@ -245,9 +245,9 @@ APR_DECLARE(apr_status_t) apr_dbm_open_ex(apr_dbm_t **pdb, const char *type,
rv = (vtable->open)(pdb, pathname, mode, perm, pool);
}
return rv;
-}
+}
-APR_DECLARE(apr_status_t) apr_dbm_open(apr_dbm_t **pdb, const char *pathname,
+APR_DECLARE(apr_status_t) apr_dbm_open(apr_dbm_t **pdb, const char *pathname,
apr_int32_t mode, apr_fileperms_t perm,
apr_pool_t *pool)
{
@@ -319,8 +319,8 @@ APR_DECLARE(char *) apr_dbm_geterror(apr_dbm_t *dbm, int *errcode,
return errbuf;
}
-APR_DECLARE(apr_status_t) apr_dbm_get_usednames_ex(apr_pool_t *p,
- const char *type,
+APR_DECLARE(apr_status_t) apr_dbm_get_usednames_ex(apr_pool_t *p,
+ const char *type,
const char *pathname,
const char **used1,
const char **used2)
@@ -333,14 +333,14 @@ APR_DECLARE(apr_status_t) apr_dbm_get_usednames_ex(apr_pool_t *p,
return APR_SUCCESS;
}
return rv;
-}
+}
APR_DECLARE(void) apr_dbm_get_usednames(apr_pool_t *p,
const char *pathname,
const char **used1,
const char **used2)
{
- apr_dbm_get_usednames_ex(p, DBM_NAME, pathname, used1, used2);
+ apr_dbm_get_usednames_ex(p, DBM_NAME, pathname, used1, used2);
}
/* Most DBM libraries take a POSIX mode for creating files. Don't trust
diff --git a/dbm/apr_dbm_berkeleydb.c b/dbm/apr_dbm_berkeleydb.c
index 6c9457fae..0693b7d81 100644
--- a/dbm/apr_dbm_berkeleydb.c
+++ b/dbm/apr_dbm_berkeleydb.c
@@ -28,7 +28,7 @@
#include "apu.h"
#include "apr_private.h"
-#if APU_HAVE_DB
+#if APU_HAVE_DB
#include "apr_dbm_private.h"
/*
@@ -169,8 +169,8 @@ static apr_status_t vt_db_open(apr_dbm_t **pdb, const char *pathname,
#if DB_VER == 4
NULL,
#endif
- pathname, NULL,
- DB_HASH, dbmode,
+ pathname, NULL,
+ DB_HASH, dbmode,
apr_posix_perms2mode(perm))) != 0) {
/* close the DB handler */
(void) (*file.bdb->close)(file.bdb, 0);
diff --git a/dbm/sdbm/sdbm.c b/dbm/sdbm/sdbm.c
index 9ad9d20ff..0156359ca 100644
--- a/dbm/sdbm/sdbm.c
+++ b/dbm/sdbm/sdbm.c
@@ -98,7 +98,7 @@ static apr_status_t prep(apr_sdbm_t **pdb, const char *dirname, const char *pagn
db->pool = p;
/*
- * adjust user flags so that WRONLY becomes RDWR,
+ * adjust user flags so that WRONLY becomes RDWR,
* as required by this package. Also set our internal
* flag for RDONLY if needed.
*/
@@ -132,7 +132,7 @@ static apr_status_t prep(apr_sdbm_t **pdb, const char *dirname, const char *pagn
!= APR_SUCCESS)
goto error;
- if ((status = apr_sdbm_lock(db, (db->flags & SDBM_RDONLY)
+ if ((status = apr_sdbm_lock(db, (db->flags & SDBM_RDONLY)
? APR_FLOCK_SHARED
: APR_FLOCK_EXCLUSIVE))
!= APR_SUCCESS)
@@ -143,7 +143,7 @@ static apr_status_t prep(apr_sdbm_t **pdb, const char *dirname, const char *pagn
*/
/*
- * if we are opened in SHARED mode, unlock ourself
+ * if we are opened in SHARED mode, unlock ourself
*/
if (db->flags & SDBM_SHARED)
if ((status = apr_sdbm_unlock(db)) != APR_SUCCESS)
@@ -168,13 +168,13 @@ error:
return status;
}
-APR_DECLARE(apr_status_t) apr_sdbm_open(apr_sdbm_t **db, const char *file,
- apr_int32_t flags,
+APR_DECLARE(apr_status_t) apr_sdbm_open(apr_sdbm_t **db, const char *file,
+ apr_int32_t flags,
apr_fileperms_t perms, apr_pool_t *p)
{
char *dirname = apr_pstrcat(p, file, APR_SDBM_DIRFEXT, NULL);
char *pagname = apr_pstrcat(p, file, APR_SDBM_PAGFEXT, NULL);
-
+
return prep(db, dirname, pagname, flags, perms, p);
}
@@ -187,7 +187,7 @@ APR_DECLARE(apr_status_t) apr_sdbm_fetch(apr_sdbm_t *db, apr_sdbm_datum_t *val,
apr_sdbm_datum_t key)
{
apr_status_t status;
-
+
if (db == NULL || bad(key))
return APR_EINVAL;
@@ -208,23 +208,23 @@ static apr_status_t write_page(apr_sdbm_t *db, const char *buf, long pagno)
{
apr_status_t status;
apr_off_t off = OFF_PAG(pagno);
-
+
if ((status = apr_file_seek(db->pagf, APR_SET, &off)) == APR_SUCCESS)
status = apr_file_write_full(db->pagf, buf, PBLKSIZ, NULL);
return status;
}
-APR_DECLARE(apr_status_t) apr_sdbm_delete(apr_sdbm_t *db,
+APR_DECLARE(apr_status_t) apr_sdbm_delete(apr_sdbm_t *db,
const apr_sdbm_datum_t key)
{
apr_status_t status;
-
+
if (db == NULL || bad(key))
return APR_EINVAL;
if (apr_sdbm_rdonly(db))
return APR_EINVAL;
-
+
if ((status = apr_sdbm_lock(db, APR_FLOCK_EXCLUSIVE)) != APR_SUCCESS)
return status;
@@ -247,7 +247,7 @@ APR_DECLARE(apr_status_t) apr_sdbm_store(apr_sdbm_t *db, apr_sdbm_datum_t key,
int need;
register long hash;
apr_status_t status;
-
+
if (db == NULL || bad(key))
return APR_EINVAL;
if (apr_sdbm_rdonly(db))
@@ -290,7 +290,7 @@ APR_DECLARE(apr_status_t) apr_sdbm_store(apr_sdbm_t *db, apr_sdbm_datum_t key,
}
error:
- (void) apr_sdbm_unlock(db);
+ (void) apr_sdbm_unlock(db);
return status;
}
@@ -328,10 +328,10 @@ static apr_status_t makroom(apr_sdbm_t *db, long hash, int need)
* here, as sdbm_store will do so, after it inserts the incoming pair.
*/
if (hash & (db->hmask + 1)) {
- if ((status = write_page(db, db->pagbuf, db->pagbno))
+ if ((status = write_page(db, db->pagbuf, db->pagbno))
!= APR_SUCCESS)
return status;
-
+
db->pagbno = newp;
(void) memcpy(pag, new, PBLKSIZ);
}
@@ -356,11 +356,11 @@ static apr_status_t makroom(apr_sdbm_t *db, long hash, int need)
db->curbit = 2 * db->curbit
+ ((hash & (db->hmask + 1)) ? 2 : 1);
db->hmask |= db->hmask + 1;
-
+
if ((status = write_page(db, db->pagbuf, db->pagbno))
!= APR_SUCCESS)
return status;
-
+
} while (--smax);
/*
@@ -380,7 +380,7 @@ static apr_status_t makroom(apr_sdbm_t *db, long hash, int need)
* If 'create' is asked and EOF is returned while reading, this is taken
* as success (i.e. a cleared buffer is returned).
*/
-static apr_status_t read_from(apr_file_t *f, void *buf,
+static apr_status_t read_from(apr_file_t *f, void *buf,
apr_off_t off, apr_size_t len,
int create)
{
@@ -402,11 +402,11 @@ static apr_status_t read_from(apr_file_t *f, void *buf,
* the following two routines will break if
* deletions aren't taken into account. (ndbm bug)
*/
-APR_DECLARE(apr_status_t) apr_sdbm_firstkey(apr_sdbm_t *db,
+APR_DECLARE(apr_status_t) apr_sdbm_firstkey(apr_sdbm_t *db,
apr_sdbm_datum_t *key)
{
apr_status_t status;
-
+
if ((status = apr_sdbm_lock(db, APR_FLOCK_SHARED)) != APR_SUCCESS)
return status;
@@ -424,11 +424,11 @@ APR_DECLARE(apr_status_t) apr_sdbm_firstkey(apr_sdbm_t *db,
return status;
}
-APR_DECLARE(apr_status_t) apr_sdbm_nextkey(apr_sdbm_t *db,
+APR_DECLARE(apr_status_t) apr_sdbm_nextkey(apr_sdbm_t *db,
apr_sdbm_datum_t *key)
{
apr_status_t status;
-
+
if ((status = apr_sdbm_lock(db, APR_FLOCK_SHARED)) != APR_SUCCESS)
return status;
@@ -468,7 +468,7 @@ static apr_status_t getpage(apr_sdbm_t *db, long hash, int by_num, int create)
* see if the block we need is already in memory.
* note: this lookaside cache has about 10% hit rate.
*/
- if (pagb != db->pagbno) {
+ if (pagb != db->pagbno) {
/*
* note: here, we assume a "hole" is read as 0s.
* if not, must zero pagbuf first.
@@ -529,7 +529,7 @@ static apr_status_t setdbit(apr_sdbm_t *db, long dbit)
return status;
db->dirbno = dirb;
-
+
debug(("dir read: %d\n", dirb));
}
diff --git a/dbm/sdbm/sdbm_hash.c b/dbm/sdbm/sdbm_hash.c
index e4d751794..a3c6492b5 100644
--- a/dbm/sdbm/sdbm_hash.c
+++ b/dbm/sdbm/sdbm_hash.c
@@ -31,7 +31,7 @@
* [this seems to work remarkably well, in fact better
* then the ndbm hash function. Replace at your own risk]
* use: 65599 nice.
- * 65587 even better.
+ * 65587 even better.
*/
long sdbm_hash(const char *str, int len)
{
diff --git a/dbm/sdbm/sdbm_lock.c b/dbm/sdbm/sdbm_lock.c
index 9241c1fb6..d5e3df851 100644
--- a/dbm/sdbm/sdbm_lock.c
+++ b/dbm/sdbm/sdbm_lock.c
@@ -48,7 +48,7 @@ APR_DECLARE(apr_status_t) apr_sdbm_lock(apr_sdbm_t *db, int type)
* zero size: either a fresh database, or one with a single,
* unsplit data page: dirpage is all zeros.
*/
- if ((status = apr_file_lock(db->dirf, type)) == APR_SUCCESS)
+ if ((status = apr_file_lock(db->dirf, type)) == APR_SUCCESS)
{
apr_finfo_t finfo;
if ((status = apr_file_info_get(&finfo, APR_FINFO_SIZE, db->dirf))
diff --git a/dbm/sdbm/sdbm_pair.c b/dbm/sdbm/sdbm_pair.c
index 50d7965b1..3277d69dd 100644
--- a/dbm/sdbm/sdbm_pair.c
+++ b/dbm/sdbm/sdbm_pair.c
@@ -34,8 +34,8 @@
#define exhash(item) sdbm_hash((item).dptr, (item).dsize)
-/*
- * forward
+/*
+ * forward
*/
static int seepair(char *, int, char *, int);
@@ -270,7 +270,7 @@ long sbit;
n = ino[0];
for (ino++; n > 0; ino += 2) {
- key.dptr = cur + ino[0];
+ key.dptr = cur + ino[0];
key.dsize = off - ino[0];
val.dptr = cur + ino[1];
val.dsize = ino[0] - ino[1];
@@ -283,13 +283,13 @@ long sbit;
n -= 2;
}
- debug(("%d split %d/%d\n", ((short *) cur)[0] / 2,
+ debug(("%d split %d/%d\n", ((short *) cur)[0] / 2,
((short *) new)[0] / 2,
((short *) pag)[0] / 2));
}
/*
- * check page sanity:
+ * check page sanity:
* number of entries should be something
* reasonable, and all offsets in the index should be in order.
* this could be made more rigorous.
diff --git a/dso/aix/dso.c b/dso/aix/dso.c
index 25f6262af..6fa5f6968 100644
--- a/dso/aix/dso.c
+++ b/dso/aix/dso.c
@@ -33,10 +33,10 @@
* as such, and this notice is not modified.
*
* Changes marked with `--jwe' were made on April 7 1996 by
- * John W. Eaton <jwe@bevo.che.wisc.edu> to support g++
+ * John W. Eaton <jwe@bevo.che.wisc.edu> to support g++
*
- * Bundled, stripped and adjusted on April 1998 as one single source file
- * for inclusion into the Apache HTTP server by
+ * Bundled, stripped and adjusted on April 1998 as one single source file
+ * for inclusion into the Apache HTTP server by
* Ralf S. Engelschall <rse@apache.org>
*
* Added to APR by David Reid April 2000
@@ -125,7 +125,7 @@ static apr_status_t dso_cleanup(void *thedso)
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
+APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *ctx)
{
void *os_handle = dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL);
@@ -133,7 +133,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
*res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
if(os_handle == NULL) {
- (*res_handle)->errormsg = dlerror();
+ (*res_handle)->errormsg = dlerror();
return APR_EDSOOPEN;
}
@@ -151,8 +151,8 @@ APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
-APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
- apr_dso_handle_t *handle,
+APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
+ apr_dso_handle_t *handle,
const char *symname)
{
void *retval = dlsym(handle->handle, symname);
diff --git a/dso/beos/dso.c b/dso/beos/dso.c
index 91dd1b4e8..d7a4d485c 100644
--- a/dso/beos/dso.c
+++ b/dso/beos/dso.c
@@ -30,7 +30,7 @@ static apr_status_t dso_cleanup(void *thedso)
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
+APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *pool)
{
image_id newid = -1;
@@ -41,7 +41,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
(*res_handle)->errormsg = strerror(newid);
return APR_EDSOOPEN;
}
-
+
(*res_handle)->pool = pool;
(*res_handle)->handle = newid;
@@ -63,7 +63,7 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym, apr_dso_hand
if (symname == NULL)
return APR_ESYMNOTFOUND;
- err = get_image_symbol(handle->handle, symname, B_SYMBOL_TYPE_ANY,
+ err = get_image_symbol(handle->handle, symname, B_SYMBOL_TYPE_ANY,
ressym);
if(err != B_OK)
diff --git a/dso/netware/dso.c b/dso/netware/dso.c
index 4cd2ad611..4fdf527a4 100644
--- a/dso/netware/dso.c
+++ b/dso/netware/dso.c
@@ -65,7 +65,7 @@ static apr_status_t dso_cleanup(void *thedso)
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
+APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *pool)
{
@@ -73,7 +73,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
char *fullpath = NULL;
apr_status_t rv;
- if ((rv = apr_filepath_merge(&fullpath, NULL, path,
+ if ((rv = apr_filepath_merge(&fullpath, NULL, path,
APR_FILEPATH_NATIVE, pool)) != APR_SUCCESS) {
return rv;
}
@@ -97,14 +97,14 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
-APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
- apr_dso_handle_t *handle,
+APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
+ apr_dso_handle_t *handle,
const char *symname)
{
sym_list *symbol = NULL;
@@ -121,11 +121,11 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
symbol->symbol = apr_pstrdup(handle->pool, symname);
*ressym = retval;
-
+
return APR_SUCCESS;
}
-APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer,
+APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer,
apr_size_t buflen)
{
if (dso->errormsg) {
diff --git a/dso/os2/dso.c b/dso/os2/dso.c
index 1a7f7de83..0bf30e79a 100644
--- a/dso/os2/dso.c
+++ b/dso/os2/dso.c
@@ -29,7 +29,7 @@ static apr_status_t dso_cleanup(void *thedso)
if (dso->handle == 0)
return APR_SUCCESS;
-
+
rc = DosFreeModule(dso->handle);
if (rc == 0)
@@ -70,8 +70,8 @@ APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
-APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
- apr_dso_handle_t *handle,
+APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
+ apr_dso_handle_t *handle,
const char *symname)
{
PFN func;
diff --git a/dso/os390/dso.c b/dso/os390/dso.c
index 9344c71a1..235e0092f 100644
--- a/dso/os390/dso.c
+++ b/dso/os390/dso.c
@@ -25,7 +25,7 @@
APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
apr_os_dso_handle_t osdso,
apr_pool_t *pool)
-{
+{
*aprdso = apr_pcalloc(pool, sizeof **aprdso);
(*aprdso)->handle = osdso;
(*aprdso)->pool = pool;
@@ -46,7 +46,7 @@ static apr_status_t dso_cleanup(void *thedso)
if (dso->handle == 0)
return APR_SUCCESS;
-
+
rc = dllfree(dso->handle);
if (rc == 0) {
@@ -57,7 +57,7 @@ static apr_status_t dso_cleanup(void *thedso)
return errno;
}
-APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
+APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *ctx)
{
dllhandle *handle;
@@ -80,12 +80,12 @@ APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
-APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
- apr_dso_handle_t *handle,
+APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
+ apr_dso_handle_t *handle,
const char *symname)
{
void *func_ptr;
- void *var_ptr;
+ void *var_ptr;
if ((var_ptr = dllqueryvar(handle->handle, symname)) != NULL) {
*ressym = var_ptr;
@@ -99,7 +99,7 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
return APR_ESYMNOTFOUND;
}
-APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *handle, char *buffer,
+APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *handle, char *buffer,
apr_size_t buflen)
{
apr_cpystrn(buffer, strerror(handle->failing_errno), buflen);
diff --git a/dso/unix/dso.c b/dso/unix/dso.c
index fdd56f1d3..a96c7691c 100644
--- a/dso/unix/dso.c
+++ b/dso/unix/dso.c
@@ -77,7 +77,7 @@ static apr_status_t dso_cleanup(void *thedso)
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
+APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *pool)
{
#if defined(DSO_USE_SHL)
@@ -137,7 +137,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
}
#endif
os_handle = dlopen(path, flags);
-#endif
+#endif
#endif /* DSO_USE_x */
*res_handle = apr_pcalloc(pool, sizeof(**res_handle));
@@ -163,14 +163,14 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
-APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
- apr_dso_handle_t *handle,
+APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
+ apr_dso_handle_t *handle,
const char *symname)
{
#if defined(DSO_USE_SHL)
@@ -233,12 +233,12 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
}
*ressym = retval;
-
+
return APR_SUCCESS;
#endif /* DSO_USE_x */
}
-APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer,
+APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer,
apr_size_t buflen)
{
if (dso->errormsg) {
diff --git a/dso/win32/dso.c b/dso/win32/dso.c
index 5193c8553..f0a737082 100644
--- a/dso/win32/dso.c
+++ b/dso/win32/dso.c
@@ -51,7 +51,7 @@ static apr_status_t dso_cleanup(void *thedso)
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
+APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *ctx)
{
HINSTANCE os_handle;
@@ -59,7 +59,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
DWORD em;
apr_wchar_t wpath[APR_PATH_MAX];
- if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
+ if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path))
!= APR_SUCCESS) {
*res_handle = apr_pcalloc(ctx, sizeof(**res_handle));
@@ -97,14 +97,14 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_dso_unload(struct apr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
}
-APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
- struct apr_dso_handle_t *handle,
+APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
+ struct apr_dso_handle_t *handle,
const char *symname)
{
*ressym = (apr_dso_handle_sym_t)GetProcAddress(handle->handle, symname);
diff --git a/encoding/apr_base64.c b/encoding/apr_base64.c
index 6f643f742..d8e54a4ae 100644
--- a/encoding/apr_base64.c
+++ b/encoding/apr_base64.c
@@ -87,7 +87,7 @@ APR_DECLARE(apr_status_t) apr_base64init_ebcdic(apr_xlate_t *to_ascii,
apr_size_t inbytes_left, outbytes_left;
apr_status_t rv;
int onoff;
-
+
/* Only single-byte conversion is supported.
*/
rv = apr_xlate_sb_get(to_ascii, &onoff);
@@ -135,7 +135,7 @@ APR_DECLARE(int) apr_base64_decode(char *bufplain, const char *bufcoded)
apr_size_t inbytes_left, outbytes_left;
#endif /* APR_CHARSET_EBCDIC */
int len;
-
+
len = apr_base64_decode_binary((unsigned char *) bufplain, bufcoded);
#if APR_CHARSET_EBCDIC
inbytes_left = outbytes_left = len;
diff --git a/encoding/apr_escape.c b/encoding/apr_escape.c
index 6074d739e..91a4d0def 100644
--- a/encoding/apr_escape.c
+++ b/encoding/apr_escape.c
@@ -1171,7 +1171,7 @@ APR_DECLARE(apr_status_t) apr_escape_ldap(char *escaped, const void *str,
}
else {
while (((c = *s) && slen) || (slen > 0)) {
- if (((flags & APR_ESCAPE_LDAP_DN) && TEST_CHAR(c, T_ESCAPE_LDAP_DN))
+ if (((flags & APR_ESCAPE_LDAP_DN) && TEST_CHAR(c, T_ESCAPE_LDAP_DN))
|| ((flags & APR_ESCAPE_LDAP_FILTER) && TEST_CHAR(c, T_ESCAPE_LDAP_FILTER))) {
size += 2;
found = 1;
diff --git a/file_io/netware/filestat.c b/file_io/netware/filestat.c
index 85d73c30d..a61d26d0e 100644
--- a/file_io/netware/filestat.c
+++ b/file_io/netware/filestat.c
@@ -55,8 +55,8 @@ static apr_filetype_e filetype_from_mode(mode_t mode)
static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
apr_int32_t wanted)
-{
- finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
+{
+ finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
| APR_FINFO_OWNER | APR_FINFO_PROT;
finfo->protection = apr_unix_mode2perms(info->st_mode);
@@ -104,7 +104,7 @@ apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
}
}
-APR_DECLARE(apr_status_t) apr_file_info_get(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)
{
@@ -128,7 +128,7 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
}
}
-APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
+APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
apr_fileperms_t perms)
{
mode_t mode = apr_unix_perms2mode(perms);
@@ -232,14 +232,14 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
and return */
if (!gPool) {
char poolname[50];
-
+
if (apr_pool_create(&gPool, NULL) != APR_SUCCESS) {
return getstat(ctx, path, buf, requestmap);
}
-
+
setGlobalPool(gPool);
apr_pool_tag(gPool, apr_pstrdup(gPool, "cstat_mem_pool"));
-
+
statCache = apr_hash_make(gPool);
apr_pool_userdata_set ((void*)statCache, "STAT_CACHE", stat_cache_cleanup, gPool);
@@ -254,7 +254,7 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
if (!gPool || !statCache || !rwlock) {
return getstat(ctx, path, buf, requestmap);
}
-
+
for (x = 0,tr = path;*tr != '\0';tr++,x++) {
if (*tr == '\\' || *tr == '/') {
ptr = tr;
@@ -265,7 +265,7 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
len = x;
}
}
-
+
if (ptr) {
ppath = apr_pstrndup (p, path, len);
strlwr(ppath);
@@ -283,7 +283,7 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
pinfo = apr_pstrdup (p, ptr);
}
}
-
+
/* If we have a statCache then try to pull the information
from the cache. Otherwise just stat the file and return.*/
if (statCache) {
@@ -310,8 +310,8 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
}
#endif
-APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
- const char *fname,
+APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
+ const char *fname,
apr_int32_t wanted, apr_pool_t *pool)
{
struct stat info;
@@ -347,17 +347,17 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
* include files, APR cannot report a good reason why the stat()
* of the file failed; there are cases where it can fail even though
* the file exists. This opens holes in Apache, for example, because
- * it becomes possible for someone to get a directory listing of a
- * directory even though there is an index (eg. index.html) file in
- * it. If you do not have a problem with this, delete the above
+ * it becomes possible for someone to get a directory listing of a
+ * directory even though there is an index (eg. index.html) file in
+ * it. If you do not have a problem with this, delete the above
* #error lines and start the compile again. If you need to do this,
* please submit a bug report to http://www.apache.org/bug_report.html
- * letting us know that you needed to do this. Please be sure to
+ * letting us know that you needed to do this. Please be sure to
* include the operating system you are using.
*/
/* WARNING: All errors will be handled as not found
*/
-#if !defined(ENOENT)
+#if !defined(ENOENT)
return APR_ENOENT;
#else
/* WARNING: All errors but not found will be handled as not directory
@@ -388,12 +388,12 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
#ifdef HAVE_UTIMES
{
struct timeval tvp[2];
-
+
tvp[0].tv_sec = apr_time_sec(finfo.atime);
tvp[0].tv_usec = apr_time_usec(finfo.atime);
tvp[1].tv_sec = apr_time_sec(mtime);
tvp[1].tv_usec = apr_time_usec(mtime);
-
+
if (utimes(fname, tvp) == -1) {
return errno;
}
@@ -401,10 +401,10 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
#elif defined(HAVE_UTIME)
{
struct utimbuf buf;
-
+
buf.actime = (time_t) (finfo.atime / APR_USEC_PER_SEC);
buf.modtime = (time_t) (mtime / APR_USEC_PER_SEC);
-
+
if (utime(fname, &buf) == -1) {
return errno;
}
diff --git a/file_io/netware/filesys.c b/file_io/netware/filesys.c
index 05c44cecd..dac50745c 100644
--- a/file_io/netware/filesys.c
+++ b/file_io/netware/filesys.c
@@ -21,7 +21,7 @@
apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p)
{
/* See the Windows code to figure out what to do here.
- It probably checks to make sure that the root exists
+ It probably checks to make sure that the root exists
and case it correctly according to the file system.
*/
*rootpath = apr_pstrdup(p, root);
diff --git a/file_io/netware/flock.c b/file_io/netware/flock.c
index c083a0ed4..192e3307c 100644
--- a/file_io/netware/flock.c
+++ b/file_io/netware/flock.c
@@ -26,7 +26,7 @@ apr_status_t apr_file_lock(apr_file_t *thefile, int type)
if(NXFileRangeLock(thefile->filedes,fc, 0, 0) == -1)
return errno;
-
+
return APR_SUCCESS;
}
@@ -34,6 +34,6 @@ apr_status_t apr_file_unlock(apr_file_t *thefile)
{
if(NXFileRangeUnlock(thefile->filedes,NX_RANGE_LOCK_CANCEL,0 , 0) == -1)
return errno;
-
+
return APR_SUCCESS;
}
diff --git a/file_io/netware/pipe.c b/file_io/netware/pipe.c
index 1a3a5e879..eb9bfe163 100644
--- a/file_io/netware/pipe.c
+++ b/file_io/netware/pipe.c
@@ -102,7 +102,7 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
apr_pool_t *pool)
{
int *dafile = thefile;
-
+
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file)->pool = pool;
(*file)->eof_hit = 0;
@@ -156,7 +156,7 @@ static apr_status_t file_pipe_create(apr_file_t **in,
(*out)->flags = APR_INHERIT;
(*in)->is_pipe =
(*out)->is_pipe = 1;
- (*out)->fname =
+ (*out)->fname =
(*in)->fname = NULL;
(*in)->buffered =
(*out)->buffered = 0;
@@ -200,8 +200,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in,
return file_pipe_create(in, out, APR_FULL_BLOCK, pool, pool);
}
-APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
- apr_file_t **out,
+APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
+ apr_file_t **out,
apr_int32_t blocking,
apr_pool_t *pool)
{
@@ -217,11 +217,11 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create_pools(apr_file_t **in,
return file_pipe_create(in, out, blocking, pool_in, pool_out);
}
-APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
+APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
apr_fileperms_t perm, apr_pool_t *pool)
{
return APR_ENOTIMPL;
-}
+}
+
-
diff --git a/file_io/os2/buffer.c b/file_io/os2/buffer.c
index 8edc60618..6d90553c3 100644
--- a/file_io/os2/buffer.c
+++ b/file_io/os2/buffer.c
@@ -17,7 +17,7 @@
#include "apr_arch_file_io.h"
#include "apr_thread_mutex.h"
-APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
+APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
char * buffer,
apr_size_t bufsize)
{
@@ -27,7 +27,7 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
if (do_locking) {
apr_thread_mutex_lock(file->mutex);
}
-
+
if (file->buffered) {
/* Flush the existing buffer */
rv = apr_file_flush(file);
@@ -39,7 +39,7 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
return rv;
}
}
-
+
file->buffer = buffer;
file->bufsize = bufsize;
file->bufpos = 0;
@@ -51,11 +51,11 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
rv = apr_thread_mutex_create(&file->mutex, 0, file->pool);
}
- /* Setting the buffer size to zero is equivalent to turning
- * buffering off.
+ /* Setting the buffer size to zero is equivalent to turning
+ * buffering off.
*/
file->buffered = file->bufsize > 0;
-
+
if (do_locking) {
apr_thread_mutex_unlock(file->mutex);
}
diff --git a/file_io/os2/dir.c b/file_io/os2/dir.c
index f1554b6f3..dda0946f7 100644
--- a/file_io/os2/dir.c
+++ b/file_io/os2/dir.c
@@ -34,10 +34,10 @@ APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname, apr
FILESTATUS3 filestatus;
int rv;
apr_dir_t *thedir = (apr_dir_t *)apr_palloc(pool, sizeof(apr_dir_t));
-
+
if (thedir == NULL)
return APR_ENOMEM;
-
+
thedir->pool = pool;
thedir->dirname = apr_pstrdup(pool, dirname);
@@ -67,17 +67,17 @@ APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname, apr
APR_DECLARE(apr_status_t) apr_dir_close(apr_dir_t *thedir)
{
int rv = 0;
-
+
if (thedir->handle) {
rv = DosFindClose(thedir->handle);
-
+
if (rv == 0) {
thedir->handle = 0;
}
}
return APR_FROM_OS_ERROR(rv);
-}
+}
@@ -86,11 +86,11 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
{
int rv;
ULONG entries = 1;
-
+
if (thedir->handle == 0) {
thedir->handle = HDIR_CREATE;
- rv = DosFindFirst(apr_pstrcat(thedir->pool, thedir->dirname, "/*", NULL), &thedir->handle,
- FILE_ARCHIVED|FILE_DIRECTORY|FILE_SYSTEM|FILE_HIDDEN|FILE_READONLY,
+ rv = DosFindFirst(apr_pstrcat(thedir->pool, thedir->dirname, "/*", NULL), &thedir->handle,
+ FILE_ARCHIVED|FILE_DIRECTORY|FILE_SYSTEM|FILE_HIDDEN|FILE_READONLY,
&thedir->entry, sizeof(thedir->entry), &entries, FIL_STANDARD);
} else {
rv = DosFindNext(thedir->handle, &thedir->entry, sizeof(thedir->entry), &entries);
diff --git a/file_io/os2/dir_make_recurse.c b/file_io/os2/dir_make_recurse.c
index 602a621ae..09034a6da 100644
--- a/file_io/os2/dir_make_recurse.c
+++ b/file_io/os2/dir_make_recurse.c
@@ -64,7 +64,7 @@ apr_status_t apr_dir_make_recursive(const char *path, apr_fileperms_t perm,
apr_pool_t *pool)
{
apr_status_t apr_err = APR_SUCCESS;
-
+
apr_err = apr_dir_make(path, perm, pool); /* Try to make PATH right out */
if (APR_STATUS_IS_ENOENT(apr_err)) { /* Missing an intermediate dir */
diff --git a/file_io/os2/filedup.c b/file_io/os2/filedup.c
index 57e5d5771..3a9ccfcc4 100644
--- a/file_io/os2/filedup.c
+++ b/file_io/os2/filedup.c
@@ -115,7 +115,7 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
if (!(old_file->flags & APR_FOPEN_NOCLEANUP)) {
apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
apr_file_cleanup);
- apr_pool_cleanup_register(p, (void *)(*new_file),
+ apr_pool_cleanup_register(p, (void *)(*new_file),
apr_file_cleanup,
apr_file_cleanup);
}
diff --git a/file_io/os2/filestat.c b/file_io/os2/filestat.c
index 8208eb4b7..ea3e0c2f5 100644
--- a/file_io/os2/filestat.c
+++ b/file_io/os2/filestat.c
@@ -38,14 +38,14 @@ static void FS3_to_finfo(apr_finfo_t *finfo, FILESTATUS3 *fstatus)
finfo->device = 0;
finfo->size = fstatus->cbFile;
finfo->csize = fstatus->cbFileAlloc;
- apr_os2_time_to_apr_time(&finfo->atime, fstatus->fdateLastAccess,
+ apr_os2_time_to_apr_time(&finfo->atime, fstatus->fdateLastAccess,
fstatus->ftimeLastAccess );
- apr_os2_time_to_apr_time(&finfo->mtime, fstatus->fdateLastWrite,
+ apr_os2_time_to_apr_time(&finfo->mtime, fstatus->fdateLastWrite,
fstatus->ftimeLastWrite );
- apr_os2_time_to_apr_time(&finfo->ctime, fstatus->fdateCreation,
+ apr_os2_time_to_apr_time(&finfo->ctime, fstatus->fdateCreation,
fstatus->ftimeCreation );
finfo->valid = APR_FINFO_TYPE | APR_FINFO_PROT | APR_FINFO_SIZE
- | APR_FINFO_CSIZE | APR_FINFO_MTIME
+ | APR_FINFO_CSIZE | APR_FINFO_MTIME
| APR_FINFO_CTIME | APR_FINFO_ATIME | APR_FINFO_LINK;
}
@@ -84,7 +84,7 @@ static apr_status_t handle_type(apr_filetype_e *ftype, HFILE file)
-APR_DECLARE(apr_status_t) apr_file_info_get(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)
{
ULONG rc;
@@ -133,12 +133,12 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
{
ULONG rc;
FILESTATUS3 fstatus;
-
+
finfo->protection = 0;
finfo->filetype = APR_NOFILE;
finfo->name = NULL;
rc = DosQueryPathInfo(fname, FIL_STANDARD, &fstatus, sizeof(fstatus));
-
+
if (rc == 0) {
FS3_to_finfo(finfo, &fstatus);
finfo->fname = fname;
diff --git a/file_io/os2/filesys.c b/file_io/os2/filesys.c
index ae43bc0a0..0f8da8142 100644
--- a/file_io/os2/filesys.c
+++ b/file_io/os2/filesys.c
@@ -27,8 +27,8 @@
*
* Leading spaces and periods are accepted, however.
* The * ? < > codes all have wildcard side effects
- * The " / \ : are exclusively component separator tokens
- * The system doesn't accept | for any (known) purpose
+ * The " / \ : are exclusively component separator tokens
+ * The system doesn't accept | for any (known) purpose
* Oddly, \x7f _is_ acceptable ;)
*/
@@ -63,7 +63,7 @@ apr_status_t filepath_root_test(char *path, apr_pool_t *p)
}
-apr_status_t filepath_drive_get(char **rootpath, char drive,
+apr_status_t filepath_drive_get(char **rootpath, char drive,
apr_int32_t flags, apr_pool_t *p)
{
char path[APR_PATH_MAX];
@@ -130,7 +130,7 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **defpath, apr_int32_t flags,
}
return APR_SUCCESS;
-}
+}
diff --git a/file_io/os2/maperrorcode.c b/file_io/os2/maperrorcode.c
index 282338bba..f4496a84f 100644
--- a/file_io/os2/maperrorcode.c
+++ b/file_io/os2/maperrorcode.c
@@ -85,11 +85,11 @@ int apr_canonical_error(apr_status_t err)
err -= APR_OS_START_SYSERR;
for (index=0; index<MAPSIZE && errormap[index][0] != err; index++);
-
+
if (index<MAPSIZE)
rv = errormap[index][1];
else
fprintf(stderr, "apr_canonical_error: Unknown OS/2 error code %d\n", err );
-
+
return rv;
}
diff --git a/file_io/os2/open.c b/file_io/os2/open.c
index 996e68bb9..6cf85f27b 100644
--- a/file_io/os2/open.c
+++ b/file_io/os2/open.c
@@ -49,7 +49,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname, apr
dafile->flags = flag;
dafile->blocking = BLK_ON;
dafile->ungetchar = -1;
-
+
if ((flag & APR_FOPEN_READ) && (flag & APR_FOPEN_WRITE)) {
mflags |= OPEN_ACCESS_READWRITE;
} else if (flag & APR_FOPEN_READ) {
@@ -83,7 +83,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname, apr
oflags |= OPEN_ACTION_OPEN_IF_EXISTS;
}
}
-
+
if ((flag & APR_FOPEN_EXCL) && !(flag & APR_FOPEN_CREATE))
return APR_EACCES;
@@ -92,20 +92,20 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname, apr
} else if ((oflags & 0xFF) == 0) {
oflags |= OPEN_ACTION_OPEN_IF_EXISTS;
}
-
+
rv = DosOpen(fname, &(dafile->filedes), &action, 0, 0, oflags, mflags, NULL);
-
+
if (rv == 0 && (flag & APR_FOPEN_APPEND)) {
ULONG newptr;
rv = DosSetFilePtr(dafile->filedes, 0, FILE_END, &newptr );
-
+
if (rv)
DosClose(dafile->filedes);
}
-
+
if (rv != 0)
return APR_FROM_OS_ERROR(rv);
-
+
dafile->isopen = TRUE;
dafile->fname = apr_pstrdup(pool, fname);
dafile->filePtr = 0;
@@ -128,18 +128,18 @@ APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file)
{
ULONG rc;
apr_status_t status;
-
+
if (file && file->isopen) {
status = apr_file_flush(file);
rc = DosClose(file->filedes);
-
+
if (rc == 0) {
file->isopen = FALSE;
if (file->flags & APR_FOPEN_DELONCLOSE) {
status = APR_FROM_OS_ERROR(DosDelete(file->fname));
}
- /* else we return the status of the flush attempt
+ /* else we return the status of the flush attempt
* when all else succeeds
*/
} else {
@@ -217,7 +217,7 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file, apr_os_file_t *thef
}
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
@@ -226,10 +226,10 @@ APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
return APR_EOF;
}
return APR_SUCCESS;
-}
+}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -239,7 +239,7 @@ APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -249,7 +249,7 @@ APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
diff --git a/file_io/os2/pipe.c b/file_io/os2/pipe.c
index 4dbe30dbf..e0c4a4f41 100644
--- a/file_io/os2/pipe.c
+++ b/file_io/os2/pipe.c
@@ -148,8 +148,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in,
return file_pipe_create(in, out, APR_FULL_BLOCK, pool, pool);
}
-APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
- apr_file_t **out,
+APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
+ apr_file_t **out,
apr_int32_t blocking,
apr_pool_t *pool)
{
@@ -164,15 +164,15 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create_pools(apr_file_t **in,
{
return file_pipe_create(in, out, blocking, pool_in, pool_out);
}
-
-
+
+
APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, apr_fileperms_t perm, apr_pool_t *pool)
{
/* Not yet implemented, interface not suitable */
return APR_ENOTIMPL;
-}
+}
+
-
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
{
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c
index d567ef3a5..f6492439d 100644
--- a/file_io/os2/readwrite.c
+++ b/file_io/os2/readwrite.c
@@ -136,7 +136,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
}
*nbytes = bytesread;
-
+
if (bytesread == 0 && req_nbytes > 0) {
thefile->eof_hit = TRUE;
return APR_EOF;
@@ -289,12 +289,12 @@ APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
if (rc) {
return rc;
}
-
+
if (bytesread == 0) {
thefile->eof_hit = TRUE;
return APR_EOF;
}
-
+
return APR_SUCCESS;
}
@@ -305,7 +305,7 @@ APR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile)
apr_size_t len;
len = strlen(str);
- return apr_file_write(thefile, str, &len);
+ return apr_file_write(thefile, str, &len);
}
@@ -360,7 +360,7 @@ 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;
- int i;
+ int i;
for (i = 0; i < len-1; i++) {
readlen = 1;
@@ -374,7 +374,7 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
rv = APR_EOF;
break;
}
-
+
if (str[i] == '\n') {
i++;
break;
diff --git a/file_io/unix/buffer.c b/file_io/unix/buffer.c
index ba2a8a7c6..2fa553c8f 100644
--- a/file_io/unix/buffer.c
+++ b/file_io/unix/buffer.c
@@ -18,7 +18,7 @@
#include "apr_pools.h"
#include "apr_thread_mutex.h"
-APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
+APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
char * buffer,
apr_size_t bufsize)
{
@@ -34,17 +34,17 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
return rv;
}
}
-
+
file->buffer = buffer;
file->bufsize = bufsize;
file->buffered = 1;
file->bufpos = 0;
file->direction = 0;
file->dataRead = 0;
-
+
if (file->bufsize == 0) {
- /* Setting the buffer size to zero is equivalent to turning
- * buffering off.
+ /* Setting the buffer size to zero is equivalent to turning
+ * buffering off.
*/
file->buffered = 0;
}
diff --git a/file_io/unix/dir.c b/file_io/unix/dir.c
index d9b344f30..3deeea26c 100644
--- a/file_io/unix/dir.c
+++ b/file_io/unix/dir.c
@@ -37,7 +37,7 @@ static apr_status_t dir_cleanup(void *thedir)
else {
return errno;
}
-}
+}
#define PATH_SEPARATOR '/'
@@ -48,10 +48,10 @@ static const char *path_canonicalize (const char *path, apr_pool_t *pool)
* now, it just makes sure there is no trailing slash. */
apr_size_t len = strlen (path);
apr_size_t orig_len = len;
-
+
while ((len > 0) && (path[len - 1] == PATH_SEPARATOR))
len--;
-
+
if (len != orig_len)
return apr_pstrndup (pool, path, len);
else
@@ -63,7 +63,7 @@ static char *path_remove_last_component (const char *path, apr_pool_t *pool)
{
const char *newpath = path_canonicalize (path, pool);
int i;
-
+
for (i = (strlen(newpath) - 1); i >= 0; i--) {
if (path[i] == PATH_SEPARATOR)
break;
@@ -72,7 +72,7 @@ static char *path_remove_last_component (const char *path, apr_pool_t *pool)
return apr_pstrndup (pool, path, (i < 0) ? 0 : i);
}
-apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname,
+apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname,
apr_pool_t *pool)
{
DIR *dir = opendir(dirname);
@@ -89,7 +89,7 @@ apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname,
#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \
&& !defined(READDIR_IS_THREAD_SAFE)
- /* On some platforms (e.g., Linux+GNU libc), d_name[] in struct
+ /* On some platforms (e.g., Linux+GNU libc), d_name[] in struct
* dirent is declared with enough storage for the name. On other
* platforms (e.g., Solaris 8 for Intel), d_name is declared as a
* one-byte array. Note: gcc evaluates this at compile time.
@@ -248,7 +248,7 @@ apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
if (end > fspec && end[-1] != '/' && (end < fspec + APR_PATH_MAX))
*end++ = '/';
- apr_cpystrn(end, thedir->entry->d_name,
+ apr_cpystrn(end, thedir->entry->d_name,
sizeof fspec - (end - fspec));
ret = apr_stat(finfo, fspec, APR_FINFO_LINK | wanted, thedir->pool);
@@ -294,7 +294,7 @@ apr_status_t apr_dir_rewind(apr_dir_t *thedir)
return APR_SUCCESS;
}
-apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,
+apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,
apr_pool_t *pool)
{
mode_t mode = apr_unix_perms2mode(perm);
@@ -308,15 +308,15 @@ apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,
}
apr_status_t apr_dir_make_recursive(const char *path, apr_fileperms_t perm,
- apr_pool_t *pool)
+ apr_pool_t *pool)
{
apr_status_t apr_err = 0;
-
+
apr_err = apr_dir_make (path, perm, pool); /* Try to make PATH right out */
-
+
if (apr_err == ENOENT) { /* Missing an intermediate dir */
char *dir;
-
+
dir = path_remove_last_component(path, pool);
/* If there is no path left, give up. */
if (dir[0] == '\0') {
@@ -324,8 +324,8 @@ apr_status_t apr_dir_make_recursive(const char *path, apr_fileperms_t perm,
}
apr_err = apr_dir_make_recursive(dir, perm, pool);
-
- if (!apr_err)
+
+ if (!apr_err)
apr_err = apr_dir_make (path, perm, pool);
}
@@ -370,4 +370,4 @@ apr_status_t apr_os_dir_put(apr_dir_t **dir, apr_os_dir_t *thedir,
return APR_SUCCESS;
}
-
+
diff --git a/file_io/unix/fileacc.c b/file_io/unix/fileacc.c
index d44e4e17b..0dc67fed6 100644
--- a/file_io/unix/fileacc.c
+++ b/file_io/unix/fileacc.c
@@ -107,13 +107,13 @@ apr_fileperms_t apr_unix_mode2perms(mode_t mode)
APR_DECLARE(apr_status_t) apr_file_data_get(void **data, const char *key,
apr_file_t *file)
-{
+{
return apr_pool_userdata_get(data, key, file->pool);
}
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_pool_userdata_set(data, key, cleanup, file->pool);
}
diff --git a/file_io/unix/filedup.c b/file_io/unix/filedup.c
index a8e14acfb..d1c668f79 100644
--- a/file_io/unix/filedup.c
+++ b/file_io/unix/filedup.c
@@ -22,7 +22,7 @@
#include <assert.h>
-static apr_status_t file_dup(apr_file_t **new_file,
+static apr_status_t file_dup(apr_file_t **new_file,
apr_file_t *old_file, apr_pool_t *p,
int which_dup)
{
@@ -32,7 +32,7 @@ static apr_status_t file_dup(apr_file_t **new_file,
#endif
assert(which_dup == 1 || which_dup == 2);
-
+
if (which_dup == 2) {
if ((*new_file) == NULL) {
/* We can't dup2 unless we have a valid new_file */
@@ -65,7 +65,7 @@ static apr_status_t file_dup(apr_file_t **new_file,
if (rv == -1)
return errno;
-
+
if (which_dup == 1) {
(*new_file) = (apr_file_t *)apr_pcalloc(p, sizeof(apr_file_t));
(*new_file)->pool = p;
@@ -94,7 +94,7 @@ static apr_status_t file_dup(apr_file_t **new_file,
}
/* this is the way dup() works */
- (*new_file)->blocking = old_file->blocking;
+ (*new_file)->blocking = old_file->blocking;
/* make sure unget behavior is consistent */
(*new_file)->ungetchar = old_file->ungetchar;
@@ -110,8 +110,8 @@ static apr_status_t file_dup(apr_file_t **new_file,
(*new_file)->rotating->manual = old_file->rotating->manual;
}
- /* apr_file_dup2() retains the original cleanup, reflecting
- * the existing inherit and nocleanup flags. This means,
+ /* apr_file_dup2() retains the original cleanup, reflecting
+ * the existing inherit and nocleanup flags. This means,
* that apr_file_dup2() cannot be called against an apr_file_t
* already closed with apr_file_close, because the expected
* cleanup was already killed.
@@ -122,14 +122,14 @@ static apr_status_t file_dup(apr_file_t **new_file,
/* apr_file_dup() retains all old_file flags with the exceptions
* of APR_INHERIT and APR_FOPEN_NOCLEANUP.
- * The user must call apr_file_inherit_set() on the dupped
+ * The user must call apr_file_inherit_set() on the dupped
* apr_file_t when desired.
*/
(*new_file)->flags = old_file->flags
& ~(APR_INHERIT | APR_FOPEN_NOCLEANUP);
apr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file),
- apr_unix_file_cleanup,
+ apr_unix_file_cleanup,
apr_unix_child_file_cleanup);
#ifndef WAITIO_USES_POLL
/* Start out with no pollset. apr_wait_for_io_or_timeout() will
@@ -181,7 +181,7 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
if (!(old_file->flags & APR_FOPEN_NOCLEANUP)) {
apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
apr_unix_file_cleanup);
- apr_pool_cleanup_register(p, (void *)(*new_file),
+ apr_pool_cleanup_register(p, (void *)(*new_file),
apr_unix_file_cleanup,
((*new_file)->flags & APR_INHERIT)
? apr_pool_cleanup_null
diff --git a/file_io/unix/filestat.c b/file_io/unix/filestat.c
index 65918c212..4804aab71 100644
--- a/file_io/unix/filestat.c
+++ b/file_io/unix/filestat.c
@@ -69,7 +69,7 @@ static apr_filetype_e filetype_from_mode(mode_t mode)
static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info,
apr_int32_t wanted)
-{
+{
finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
| APR_FINFO_OWNER | APR_FINFO_PROT;
finfo->protection = apr_unix_mode2perms(info->st_mode);
@@ -148,7 +148,7 @@ apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
}
}
-APR_DECLARE(apr_status_t) apr_file_info_get(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)
{
@@ -171,7 +171,7 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
}
}
-APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
+APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
apr_fileperms_t perms)
{
mode_t mode = apr_unix_perms2mode(perms);
@@ -252,12 +252,12 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
#ifdef HAVE_UTIMES
{
struct timeval tvp[2];
-
+
tvp[0].tv_sec = apr_time_sec(finfo.atime);
tvp[0].tv_usec = apr_time_usec(finfo.atime);
tvp[1].tv_sec = apr_time_sec(mtime);
tvp[1].tv_usec = apr_time_usec(mtime);
-
+
if (utimes(fname, tvp) == -1) {
return errno;
}
@@ -265,10 +265,10 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
#elif defined(HAVE_UTIME)
{
struct utimbuf buf;
-
+
buf.actime = (time_t) (finfo.atime / APR_USEC_PER_SEC);
buf.modtime = (time_t) (mtime / APR_USEC_PER_SEC);
-
+
if (utime(fname, &buf) == -1) {
return errno;
}
@@ -281,8 +281,8 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
}
-APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
- const char *fname,
+APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
+ const char *fname,
apr_int32_t wanted, apr_pool_t *pool)
{
struct_stat info;
@@ -310,17 +310,17 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
* include files, APR cannot report a good reason why the stat()
* of the file failed; there are cases where it can fail even though
* the file exists. This opens holes in Apache, for example, because
- * it becomes possible for someone to get a directory listing of a
- * directory even though there is an index (eg. index.html) file in
- * it. If you do not have a problem with this, delete the above
+ * it becomes possible for someone to get a directory listing of a
+ * directory even though there is an index (eg. index.html) file in
+ * it. If you do not have a problem with this, delete the above
* #error lines and start the compile again. If you need to do this,
* please submit a bug report to http://www.apache.org/bug_report.html
- * letting us know that you needed to do this. Please be sure to
+ * letting us know that you needed to do this. Please be sure to
* include the operating system you are using.
*/
/* WARNING: All errors will be handled as not found
*/
-#if !defined(ENOENT)
+#if !defined(ENOENT)
return APR_ENOENT;
#else
/* WARNING: All errors but not found will be handled as not directory
diff --git a/file_io/unix/open.c b/file_io/unix/open.c
index 770d438ae..ee39de09a 100644
--- a/file_io/unix/open.c
+++ b/file_io/unix/open.c
@@ -88,10 +88,10 @@ apr_status_t apr_unix_child_file_cleanup(void *thefile)
return file_cleanup(thefile, 1);
}
-APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
- const char *fname,
- apr_int32_t flag,
- apr_fileperms_t perm,
+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 *pool)
{
apr_os_file_t fd;
@@ -111,7 +111,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
oflags = O_WRONLY;
}
else {
- return APR_EACCES;
+ return APR_EACCES;
}
if (flag & APR_FOPEN_CREATE) {
@@ -122,7 +122,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
}
if ((flag & APR_FOPEN_EXCL) && !(flag & APR_FOPEN_CREATE)) {
return APR_EACCES;
- }
+ }
if (flag & APR_FOPEN_APPEND) {
oflags |= O_APPEND;
@@ -151,7 +151,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
oflags |= O_CLOEXEC;
}
#endif
-
+
#if APR_HAS_LARGE_FILES && defined(_LARGEFILE64_SOURCE)
oflags |= O_LARGEFILE;
#elif defined(O_LARGEFILE)
@@ -175,7 +175,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
}
else {
fd = open(fname, oflags, apr_unix_perms2mode(perm));
- }
+ }
if (fd < 0) {
return errno;
}
@@ -243,8 +243,8 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
(*new)->pollset = NULL;
#endif
if (!(flag & APR_FOPEN_NOCLEANUP)) {
- apr_pool_cleanup_register((*new)->pool, (void *)(*new),
- apr_unix_file_cleanup,
+ apr_pool_cleanup_register((*new)->pool, (void *)(*new),
+ apr_unix_file_cleanup,
apr_unix_child_file_cleanup);
}
@@ -291,7 +291,7 @@ APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
}
}
-APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path,
+APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path,
const char *to_path,
apr_pool_t *p)
{
@@ -301,19 +301,19 @@ APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
+APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
apr_file_t *file)
{
*thefile = file->filedes;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
+APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_int32_t flags, apr_pool_t *pool)
{
int *dafile = thefile;
-
+
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file)->pool = pool;
(*file)->eof_hit = 0;
@@ -346,7 +346,7 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
#endif
}
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
{
@@ -354,9 +354,9 @@ APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
return APR_EOF;
}
return APR_SUCCESS;
-}
+}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -365,7 +365,7 @@ APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
return apr_os_file_put(thefile, &fd, flags | APR_FOPEN_WRITE, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -374,7 +374,7 @@ APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
return apr_os_file_put(thefile, &fd, flags | APR_FOPEN_WRITE, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -383,19 +383,19 @@ APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
return apr_os_file_put(thefile, &fd, flags | APR_FOPEN_READ, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile,
apr_pool_t *pool)
{
return apr_file_open_flags_stderr(thefile, 0, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile,
apr_pool_t *pool)
{
return apr_file_open_flags_stdout(thefile, 0, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile,
apr_pool_t *pool)
{
return apr_file_open_flags_stdin(thefile, 0, pool);
@@ -432,7 +432,7 @@ APR_DECLARE(apr_status_t) apr_file_inherit_unset(apr_file_t *thefile)
APR_POOL_IMPLEMENT_ACCESSOR(file)
-APR_DECLARE(apr_status_t) apr_file_link(const char *from_path,
+APR_DECLARE(apr_status_t) apr_file_link(const char *from_path,
const char *to_path)
{
if (link(from_path, to_path) == -1) {
diff --git a/file_io/unix/pipe.c b/file_io/unix/pipe.c
index b68ac6542..6c603ec9a 100644
--- a/file_io/unix/pipe.c
+++ b/file_io/unix/pipe.c
@@ -45,7 +45,7 @@ static apr_status_t pipeblock(apr_file_t *thepipe)
fd_flags &= ~O_NDELAY;
# elif defined(O_FNDELAY)
fd_flags &= ~O_FNDELAY;
-# else
+# else
/* XXXX: this breaks things, but an alternative isn't obvious...*/
return APR_ENOTIMPL;
# endif
@@ -61,8 +61,8 @@ static apr_status_t pipeblock(apr_file_t *thepipe)
}
# else /* "classic" BeOS doesn't support this at all */
return APR_ENOTIMPL;
-# endif
-
+# endif
+
#endif /* !BEOS_BLOCKING */
thepipe->blocking = BLK_ON;
@@ -87,7 +87,7 @@ static apr_status_t pipenonblock(apr_file_t *thepipe)
if (fcntl(thepipe->filedes, F_SETFL, fd_flags) == -1) {
return errno;
}
-
+
#else /* BEOS_BLOCKING */
# if BEOS_BONE /* This only works on BONE 0-6 */
@@ -139,7 +139,7 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
apr_pool_t *pool)
{
int *dafile = thefile;
-
+
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file)->pool = pool;
(*file)->eof_hit = 0;
@@ -187,7 +187,7 @@ static apr_status_t file_pipe_create(apr_file_t **in,
if (pipe(filedes) == -1) {
return errno;
}
-
+
(*in) = (apr_file_t *)apr_pcalloc(pool_in, sizeof(apr_file_t));
(*in)->pool = pool_in;
(*in)->filedes = filedes[0];
@@ -249,8 +249,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in,
return file_pipe_create(in, out, APR_FULL_BLOCK, pool, pool);
}
-APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
- apr_file_t **out,
+APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
+ apr_file_t **out,
apr_int32_t blocking,
apr_pool_t *pool)
{
@@ -266,7 +266,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create_pools(apr_file_t **in,
return file_pipe_create(in, out, blocking, pool_in, pool_out);
}
-APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
+APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
apr_fileperms_t perm, apr_pool_t *pool)
{
mode_t mode = apr_unix_perms2mode(perm);
@@ -275,7 +275,7 @@ APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
return errno;
}
return APR_SUCCESS;
-}
+}
+
-
diff --git a/file_io/unix/printf.c b/file_io/unix/printf.c
index 03c23b222..5649d9c38 100644
--- a/file_io/unix/printf.c
+++ b/file_io/unix/printf.c
@@ -32,7 +32,7 @@ static int file_printf_flush(apr_vformatter_buff_t *buff)
{
struct apr_file_printf_data *data = (struct apr_file_printf_data *)buff;
- if (apr_file_write_full(data->fptr, data->buf,
+ if (apr_file_write_full(data->fptr, data->buf,
data->vbuff.curpos - data->buf, NULL)) {
return -1;
}
@@ -41,7 +41,7 @@ static int file_printf_flush(apr_vformatter_buff_t *buff)
return 0;
}
-APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
+APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
const char *format, ...)
{
struct apr_file_printf_data data;
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c
index 593bf66a7..dbb549f71 100644
--- a/file_io/unix/readwrite.c
+++ b/file_io/unix/readwrite.c
@@ -54,7 +54,7 @@ static apr_status_t file_read_buffered(apr_file_t *thefile, void *buf,
}
while (rv == 0 && size > 0) {
if (thefile->bufpos >= thefile->dataRead) {
- int bytesread = read(thefile->filedes, thefile->buffer,
+ int bytesread = read(thefile->filedes, thefile->buffer,
thefile->bufsize);
if (bytesread == 0) {
thefile->eof_hit = TRUE;
@@ -118,8 +118,8 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
rv = read(thefile->filedes, buf, *nbytes);
} while (rv == -1 && errno == EINTR);
#ifdef USE_WAIT_FOR_IO
- if (rv == -1 &&
- (errno == EAGAIN || errno == EWOULDBLOCK) &&
+ if (rv == -1 &&
+ (errno == EAGAIN || errno == EWOULDBLOCK) &&
thefile->timeout != 0) {
apr_status_t arv = apr_wait_for_io_or_timeout(thefile, NULL, 1);
if (arv != APR_SUCCESS) {
@@ -131,7 +131,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
rv = read(thefile->filedes, buf, *nbytes);
} while (rv == -1 && errno == EINTR);
}
- }
+ }
#endif
*nbytes = bytes_read;
if (rv == 0) {
@@ -159,7 +159,7 @@ static apr_status_t do_rotating_check(apr_file_t *thefile, apr_time_t now)
rv = apr_stat(&new_finfo, thefile->fname,
APR_FINFO_DEV|APR_FINFO_INODE, tmp_pool);
- if (rv != APR_SUCCESS ||
+ if (rv != APR_SUCCESS ||
new_finfo.inode != thefile->rotating->finfo.inode ||
new_finfo.device != thefile->rotating->finfo.device) {
@@ -240,7 +240,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
file_lock(thefile);
if ( thefile->direction == 0 ) {
- /* Position file pointer for writing at the offset we are
+ /* Position file pointer for writing at the offset we are
* logically reading from
*/
apr_int64_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
@@ -256,9 +256,9 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
if (thefile->bufpos == thefile->bufsize) /* write buffer is full*/
rv = apr_file_flush_locked(thefile);
- blocksize = size > thefile->bufsize - thefile->bufpos ?
+ blocksize = size > thefile->bufsize - thefile->bufpos ?
thefile->bufsize - thefile->bufpos : size;
- memcpy(thefile->buffer + thefile->bufpos, pos, blocksize);
+ memcpy(thefile->buffer + thefile->bufpos, pos, blocksize);
thefile->bufpos += blocksize;
pos += blocksize;
size -= blocksize;
@@ -274,7 +274,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
} while (rv == (apr_size_t)-1 && errno == EINTR);
#ifdef USE_WAIT_FOR_IO
if (rv == (apr_size_t)-1 &&
- (errno == EAGAIN || errno == EWOULDBLOCK) &&
+ (errno == EAGAIN || errno == EWOULDBLOCK) &&
thefile->timeout != 0) {
apr_status_t arv = apr_wait_for_io_or_timeout(thefile, NULL, 0);
if (arv != APR_SUCCESS) {
@@ -297,7 +297,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
}
} while (1);
}
- }
+ }
#endif
if (rv == (apr_size_t)-1) {
(*nbytes) = 0;
@@ -358,14 +358,14 @@ APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile, const struct iove
/**
* The problem with trying to output the entire iovec is that we cannot
* maintain the behaviour that a real writev would have. If we iterate
- * over the iovec one at a time, we lose the atomic properties of
+ * over the iovec one at a time, we lose the atomic properties of
* writev(). The other option is to combine the entire iovec into one
- * buffer that we could then send in one call to write(). This is not
+ * buffer that we could then send in one call to write(). This is not
* reasonable since we do not know how much data an iovec could contain.
*
- * The only reasonable option, that maintains the semantics of a real
+ * The only reasonable option, that maintains the semantics of a real
* writev(), is to only write the first iovec. Callers of file_writev()
- * must deal with partial writes as they normally would. If you want to
+ * must deal with partial writes as they normally would. If you want to
* ensure an entire iovec is written, use apr_file_writev_full().
*/
@@ -384,7 +384,7 @@ APR_DECLARE(apr_status_t) apr_file_putc(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;
+ return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
@@ -506,8 +506,8 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
const char *str_start = str;
char *final = str + len - 1;
- if (len <= 1) {
- /* sort of like fgets(), which returns NULL and stores no bytes
+ if (len <= 1) {
+ /* sort of like fgets(), which returns NULL and stores no bytes
*/
return APR_SUCCESS;
}
@@ -567,7 +567,7 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
}
/* We must store a terminating '\0' if we've stored any chars. We can
- * get away with storing it if we hit an error first.
+ * get away with storing it if we hit an error first.
*/
*str = '\0';
if (str > str_start) {
diff --git a/file_io/unix/tempdir.c b/file_io/unix/tempdir.c
index 22325eff1..424372464 100644
--- a/file_io/unix/tempdir.c
+++ b/file_io/unix/tempdir.c
@@ -37,7 +37,7 @@ static int test_tempdir(const char *temp_dir, apr_pool_t *p)
}
-APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
+APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
apr_pool_t *p)
{
apr_status_t apr_err;
@@ -60,7 +60,7 @@ APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
"/var/tmp"
"/usr/tmp"
P_tmpdir (POSIX define)
- `pwd`
+ `pwd`
NOTE: This algorithm is basically the same one used by Python
2.2's tempfile.py module. */
@@ -102,16 +102,16 @@ APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
}
#ifdef P_tmpdir
- /*
- * If we have it, use the POSIX definition of where
- * the tmpdir should be
+ /*
+ * If we have it, use the POSIX definition of where
+ * the tmpdir should be
*/
if (test_tempdir(P_tmpdir, p)) {
dir = P_tmpdir;
goto end;
}
#endif
-
+
/* Finally, try the current working directory. */
if (APR_SUCCESS == apr_filepath_get(&cwd, APR_FILEPATH_NATIVE, p)) {
if (test_tempdir(cwd, p)) {
diff --git a/file_io/win32/buffer.c b/file_io/win32/buffer.c
index 7f5d9d375..92e64e2b6 100644
--- a/file_io/win32/buffer.c
+++ b/file_io/win32/buffer.c
@@ -17,7 +17,7 @@
#include "apr_arch_file_io.h"
#include "apr_thread_mutex.h"
-APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
+APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
char * buffer,
apr_size_t bufsize)
{
@@ -26,7 +26,7 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
if (file->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_lock(file->mutex);
}
-
+
if(file->buffered) {
/* Flush the existing buffer */
rv = apr_file_flush(file);
@@ -37,21 +37,21 @@ APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *file,
return rv;
}
}
-
+
file->buffer = buffer;
file->bufsize = bufsize;
file->buffered = 1;
file->bufpos = 0;
file->direction = 0;
file->dataRead = 0;
-
+
if (file->bufsize == 0) {
- /* Setting the buffer size to zero is equivalent to turning
- * buffering off.
+ /* Setting the buffer size to zero is equivalent to turning
+ * buffering off.
*/
file->buffered = 0;
}
-
+
if (file->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_unlock(file->mutex);
}
diff --git a/file_io/win32/dir.c b/file_io/win32/dir.c
index 6eb65eeaf..9c835810e 100644
--- a/file_io/win32/dir.c
+++ b/file_io/win32/dir.c
@@ -43,7 +43,7 @@ static apr_status_t dir_cleanup(void *thedir)
}
dir->dirhand = INVALID_HANDLE_VALUE;
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname,
apr_pool_t *pool)
@@ -52,7 +52,7 @@ APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname,
apr_size_t len = strlen(dirname);
(*new) = apr_pcalloc(pool, sizeof(apr_dir_t));
- /* Leave room here to add and pop the '*' wildcard for FindFirstFile
+ /* Leave room here to add and pop the '*' wildcard for FindFirstFile
* and double-null terminate so we have one character to change.
*/
(*new)->dirname = apr_palloc(pool, len + 3);
@@ -63,7 +63,7 @@ APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname,
(*new)->dirname[len++] = '\0';
(*new)->dirname[len] = '\0';
- /* Create a buffer for the longest file name we will ever see
+ /* Create a buffer for the longest file name we will ever see
*/
(*new)->entry = apr_pcalloc(pool, sizeof(WIN32_FIND_DATAW));
(*new)->name = apr_pcalloc(pool, APR_FILE_MAX * 3 + 1);
@@ -103,10 +103,10 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
/* This code path is always be invoked by apr_dir_open or
* apr_dir_rewind, so return without filling out the finfo.
*/
- if (thedir->dirhand == INVALID_HANDLE_VALUE)
+ if (thedir->dirhand == INVALID_HANDLE_VALUE)
{
- if ((rv = utf8_to_unicode_path(wdirname, sizeof(wdirname)
- / sizeof(apr_wchar_t),
+ if ((rv = utf8_to_unicode_path(wdirname, sizeof(wdirname)
+ / sizeof(apr_wchar_t),
thedir->dirname))) {
return rv;
}
@@ -130,7 +130,7 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
* either apr_dir_open or apr_dir_rewind ... use
* that first record.
*/
- thedir->bof = 0;
+ thedir->bof = 0;
}
else if (!FindNextFileW(thedir->dirhand, thedir->entry)) {
return apr_get_os_error();
@@ -143,7 +143,7 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
return apr_get_os_error();
}
}
- if ((rv = unicode_to_utf8_path(thedir->name, APR_FILE_MAX * 3 + 1,
+ if ((rv = unicode_to_utf8_path(thedir->name, APR_FILE_MAX * 3 + 1,
thedir->entry->cFileName)))
return rv;
fname = thedir->name;
@@ -227,7 +227,7 @@ static apr_status_t dir_make_parent(char *path,
*ch = '\0';
rv = apr_dir_make (path, perm, pool); /* Try to make straight off */
-
+
if (APR_STATUS_IS_ENOENT(rv)) { /* Missing an intermediate dir */
rv = dir_make_parent(path, perm, pool);
diff --git a/file_io/win32/filedup.c b/file_io/win32/filedup.c
index 4e885fddc..7a0999674 100644
--- a/file_io/win32/filedup.c
+++ b/file_io/win32/filedup.c
@@ -29,8 +29,8 @@ APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
HANDLE hproc = GetCurrentProcess();
HANDLE newhand = NULL;
- if (!DuplicateHandle(hproc, old_file->filehand,
- hproc, &newhand, 0, FALSE,
+ if (!DuplicateHandle(hproc, old_file->filehand,
+ hproc, &newhand, 0, FALSE,
DUPLICATE_SAME_ACCESS)) {
return apr_get_os_error();
}
@@ -142,13 +142,13 @@ APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
_setmode(0, _O_BINARY);
newhand = (HANDLE)_get_osfhandle(0);
}
- newflags = (new_file->flags & APR_STD_FLAGS)
+ newflags = (new_file->flags & APR_STD_FLAGS)
| (old_file->flags & ~APR_STD_FLAGS) | APR_INHERIT;
/* No need to close the old file, _dup2() above did that for us */
}
else {
- if (!DuplicateHandle(hproc, old_file->filehand,
+ if (!DuplicateHandle(hproc, old_file->filehand,
hproc, &newhand, 0,
FALSE, DUPLICATE_SAME_ACCESS)) {
return apr_get_os_error();
@@ -205,7 +205,7 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
if (!(old_file->flags & APR_FOPEN_NOCLEANUP)) {
apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
file_cleanup);
- apr_pool_cleanup_register(p, (void *)(*new_file),
+ apr_pool_cleanup_register(p, (void *)(*new_file),
file_cleanup,
file_cleanup);
}
diff --git a/file_io/win32/filepath.c b/file_io/win32/filepath.c
index 3f1e6eadf..91cf8ebdf 100644
--- a/file_io/win32/filepath.c
+++ b/file_io/win32/filepath.c
@@ -29,16 +29,16 @@
/* WinNT accepts several odd forms of a 'root' path. Under Unicode
* calls (ApiFunctionW) the //?/C:/foo or //?/UNC/mach/share/foo forms
- * are accepted. Ansi and Unicode functions both accept the //./C:/foo
- * form under WinNT/2K. Since these forms are handled in the utf-8 to
- * unicode translation phase, we don't want the user confused by them, so
+ * are accepted. Ansi and Unicode functions both accept the //./C:/foo
+ * form under WinNT/2K. Since these forms are handled in the utf-8 to
+ * unicode translation phase, we don't want the user confused by them, so
* we will accept them but always return the canonical C:/ or //mach/share/
*
* OS2 appears immune from the nonsense :)
*/
-APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
- const char **inpath,
+APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
+ const char **inpath,
apr_int32_t flags,
apr_pool_t *p)
{
@@ -73,7 +73,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
if (volsep) {
/* Split the inpath into its separate parts. */
deconstruct(testpath, server, volume, NULL, file, NULL, &elements, PATH_UNDEF);
-
+
/* If we got a volume part then continue splitting out the root.
Otherwise we either have an incomplete or relative path
*/
@@ -131,7 +131,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
#ifdef WIN32 /* //server/share isn't the only // delimited syntax */
if ((testpath[2] == '?' || testpath[2] == '.')
&& (testpath[3] == '/' || testpath[3] == '\\')) {
- if (IS_FNCHAR(testpath[4]) && testpath[5] == ':')
+ if (IS_FNCHAR(testpath[4]) && testpath[5] == ':')
{
apr_status_t rv;
testpath += 4;
@@ -144,9 +144,9 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
return rv;
}
else if (strncasecmp(testpath + 4, "UNC", 3) == 0
- && (testpath[7] == '/' || testpath[7] == '\\')
+ && (testpath[7] == '/' || testpath[7] == '\\')
&& (testpath[2] == '?')) {
- /* given '//?/UNC/machine/share, a little magic
+ /* given '//?/UNC/machine/share, a little magic
* at the end makes this all work out by using
* 'C/machine' as the starting point and replacing
* the UNC delimiters with \'s, including the 'C'
@@ -176,9 +176,9 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
/* Protect against //machine/X/ where X is illegal */
if (!IS_FNCHAR(*(delim2++)))
return APR_EBADPATH;
- }
+ }
- /* Copy the '//machine/[share[/]]' path, always providing
+ /* Copy the '//machine/[share[/]]' path, always providing
* an extra byte for the trailing slash.
*/
newpath = apr_pstrmemdup(p, testpath, delim2 - testpath + 1);
@@ -192,11 +192,11 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
}
if (flags & APR_FILEPATH_TRUENAME) {
- /* Validate the \\Machine\Share\ designation,
- * Win32 will argue about slashed in UNC paths,
+ /* Validate the \\Machine\Share\ designation,
+ * Win32 will argue about slashed in UNC paths,
* so use backslashes till we finish testing,
* and add the trailing backslash [required].
- * apr_pstrmemdup above guarentees us the new
+ * apr_pstrmemdup above guarentees us the new
* trailing null character.
*/
newpath[0] = '\\';
@@ -215,7 +215,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
newpath[delim1 - testpath] = seperator[0];
newpath[delim2 - testpath] = (*delim2 ? seperator[0] : '\0');
}
- else {
+ else {
/* Give back the caller's own choice of delimiters
*/
newpath[0] = testpath[0];
@@ -224,7 +224,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
newpath[delim2 - testpath] = *delim2;
}
- /* If this root included the trailing / or \ designation
+ /* If this root included the trailing / or \ designation
* then lop off multiple trailing slashes and give back
* appropriate delimiters.
*/
@@ -240,7 +240,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
*rootpath = newpath;
return APR_SUCCESS;
}
-
+
/* Have path of '\\[machine]', if the machine is given,
* append same trailing slash as the leading slash
*/
@@ -265,7 +265,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
return APR_EINCOMPLETE;
}
- /* Left with a path of '/', what drive are we asking about?
+ /* Left with a path of '/', what drive are we asking about?
*/
*inpath = testpath + 1;
newpath = apr_palloc(p, 2);
@@ -279,7 +279,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
}
/* Evaluate path of 'd:[/]' */
- if (IS_FNCHAR(*testpath) && testpath[1] == ':')
+ if (IS_FNCHAR(*testpath) && testpath[1] == ':')
{
apr_status_t rv;
/* Validate that D:\ drive exists, test must be rooted
@@ -349,9 +349,9 @@ static int same_drive(const char *path1, const char *path2)
}
#endif
-APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
- const char *basepath,
- const char *addpath,
+APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
+ const char *basepath,
+ const char *addpath,
apr_int32_t flags,
apr_pool_t *p)
{
@@ -370,7 +370,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
#ifndef NETWARE
int fixunc = 0; /* flag to complete an incomplete UNC basepath */
#endif
-
+
/* Treat null as an empty path, otherwise split addroot from the addpath
*/
if (!addpath) {
@@ -380,7 +380,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
else {
/* This call _should_ test the path
*/
- addtype = apr_filepath_root(&addroot, &addpath,
+ addtype = apr_filepath_root(&addroot, &addpath,
APR_FILEPATH_TRUENAME
| (flags & APR_FILEPATH_NATIVE),
p);
@@ -398,7 +398,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
/* If addpath is (even partially) rooted, then basepath is
- * unused. Ths violates any APR_FILEPATH_SECUREROOTTEST
+ * unused. Ths violates any APR_FILEPATH_SECUREROOTTEST
* and APR_FILEPATH_NOTABSOLUTE flags specified.
*/
if (addtype == APR_EABSOLUTE || addtype == APR_EINCOMPLETE)
@@ -422,8 +422,8 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
basetype = APR_ERELATIVE;
}
- /* If APR_FILEPATH_NOTABSOLUTE is specified, the caller
- * requires an absolutely relative result, So do not retrieve
+ /* If APR_FILEPATH_NOTABSOLUTE is specified, the caller
+ * requires an absolutely relative result, So do not retrieve
* the working path.
*/
if (addtype == APR_ERELATIVE && (flags & APR_FILEPATH_NOTABSOLUTE)) {
@@ -432,12 +432,12 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
}
- if (!basepath)
+ if (!basepath)
{
/* Start with the current working path. This is bass akwards,
* but required since the compiler (at least vc) doesn't like
* passing the address of a char const* for a char** arg.
- * We must grab the current path of the designated drive
+ * We must grab the current path of the designated drive
* if addroot is given in drive-relative form (e.g. d:foo)
*/
char *getpath;
@@ -471,8 +471,8 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
baselen = strlen(basepath);
- /* If APR_FILEPATH_NOTABSOLUTE is specified, the caller
- * requires an absolutely relative result. If the given
+ /* If APR_FILEPATH_NOTABSOLUTE is specified, the caller
+ * requires an absolutely relative result. If the given
* basepath is not relative then fail.
*/
if ((flags & APR_FILEPATH_NOTABSOLUTE) && basetype != APR_ERELATIVE)
@@ -485,7 +485,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
{
/* Ignore the given root path, and start with the addroot
*/
- if ((flags & APR_FILEPATH_NOTABOVEROOT)
+ if ((flags & APR_FILEPATH_NOTABOVEROOT)
&& strncmp(baseroot, addroot, strlen(baseroot)))
return APR_EABOVEROOT;
keptlen = 0;
@@ -494,22 +494,22 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
else if (addtype == APR_EINCOMPLETE)
{
- /* There are several types of incomplete paths,
+ /* There are several types of incomplete paths,
* incomplete UNC paths (//foo/ or //),
- * drives without rooted paths (d: as in d:foo),
+ * drives without rooted paths (d: as in d:foo),
* and simple roots (/ as in /foo).
* Deal with these in significantly different manners...
*/
#ifndef NETWARE
if ((addroot[0] == '/' || addroot[0] == '\\') &&
- (addroot[1] == '/' || addroot[1] == '\\'))
+ (addroot[1] == '/' || addroot[1] == '\\'))
{
/* Ignore the given root path if the incomplete addpath is UNC,
* (note that the final result will be incomplete).
*/
if (flags & APR_FILEPATH_NOTRELATIVE)
return addtype;
- if ((flags & APR_FILEPATH_NOTABOVEROOT)
+ if ((flags & APR_FILEPATH_NOTABOVEROOT)
&& strncmp(baseroot, addroot, strlen(baseroot)))
return APR_EABOVEROOT;
fixunc = 1;
@@ -518,8 +518,8 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
memcpy(path, addroot, pathlen);
}
else
-#endif
- if ((addroot[0] == '/' || addroot[0] == '\\') && !addroot[1])
+#endif
+ if ((addroot[0] == '/' || addroot[0] == '\\') && !addroot[1])
{
/* Bring together the drive or UNC root from the baseroot
* if the addpath is a simple root and basepath is rooted,
@@ -529,7 +529,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
return basetype;
if (basetype != APR_ERELATIVE) {
#ifndef NETWARE
- if (basetype == APR_INCOMPLETE
+ if (basetype == APR_INCOMPLETE
&& (baseroot[0] == '/' || baseroot[0] == '\\')
&& (baseroot[1] == '/' || baseroot[1] == '\\'))
fixunc = 1;
@@ -546,16 +546,16 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
}
#ifdef NETWARE
- else if (filepath_has_drive(addroot, DRIVE_ONLY, p))
+ else if (filepath_has_drive(addroot, DRIVE_ONLY, p))
{
/* If the addroot is a drive (without a volume root)
* use the basepath _if_ it matches this drive letter!
* Otherwise we must discard the basepath.
*/
- if (!filepath_compare_drive(addroot, baseroot, p) &&
+ if (!filepath_compare_drive(addroot, baseroot, p) &&
filepath_has_drive(baseroot, 0, p)) {
#else
- else if (addroot[0] && addroot[1] == ':' && !addroot[2])
+ else if (addroot[0] && addroot[1] == ':' && !addroot[2])
{
/* If the addroot is a drive (without a volume root)
* use the basepath _if_ it matches this drive letter!
@@ -573,7 +573,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
return APR_ENAMETOOLONG;
memcpy(path, baseroot, rootlen);
memcpy(path + rootlen, basepath, baselen);
- }
+ }
else {
if (flags & APR_FILEPATH_NOTRELATIVE)
return addtype;
@@ -600,7 +600,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
#ifndef NETWARE
/* An incomplete UNC path must be completed
*/
- if (basetype == APR_INCOMPLETE
+ if (basetype == APR_INCOMPLETE
&& (baseroot[0] == '/' || baseroot[0] == '\\')
&& (baseroot[1] == '/' || baseroot[1] == '\\'))
fixunc = 1;
@@ -624,7 +624,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
if (path[pathlen - 1] != '/' && path[pathlen - 1] != '\\') {
if (pathlen + 1 >= sizeof(path))
return APR_ENAMETOOLONG;
-
+
path[pathlen++] = ((flags & APR_FILEPATH_NATIVE) ? '\\' : '/');
}
/* XXX: wrong, but gotta figure out what I intended;
@@ -633,9 +633,9 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
*/
}
- while (*addpath)
+ while (*addpath)
{
- /* Parse each segment, find the closing '/'
+ /* Parse each segment, find the closing '/'
*/
seglen = 0;
while (addpath[seglen] && addpath[seglen] != '/'
@@ -644,7 +644,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
/* Truncate all trailing spaces and all but the first two dots */
segend = seglen;
- while (seglen && (addpath[seglen - 1] == ' '
+ while (seglen && (addpath[seglen - 1] == ' '
|| addpath[seglen - 1] == '.')) {
if (seglen > 2 || addpath[seglen - 1] != '.' || addpath[0] != '.')
--seglen;
@@ -652,7 +652,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
break;
}
- if (seglen == 0 || (seglen == 1 && addpath[0] == '.'))
+ if (seglen == 0 || (seglen == 1 && addpath[0] == '.'))
{
/* NOTE: win32 _hates_ '/ /' and '/. /' (yes, with spaces in there)
* so eliminate all preconceptions that it is valid.
@@ -667,13 +667,13 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
return APR_EBADPATH;
#endif
- /* Otherwise, this is a noop segment (/ or ./) so ignore it
+ /* Otherwise, this is a noop segment (/ or ./) so ignore it
*/
}
- else if (seglen == 2 && addpath[0] == '.' && addpath[1] == '.')
+ else if (seglen == 2 && addpath[0] == '.' && addpath[1] == '.')
{
/* NOTE: win32 _hates_ '/.. /' (yes, with a space in there)
- * and '/..../', some functions treat it as ".", and some
+ * and '/..../', some functions treat it as ".", and some
* fail! Eliminate all preconceptions that they are valid.
*/
if (seglen < segend && (seglen != 3 || addpath[2] != '.'))
@@ -687,32 +687,32 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
#endif
/* backpath (../) when an absolute path is given */
- if (rootlen && (pathlen <= rootlen))
+ if (rootlen && (pathlen <= rootlen))
{
- /* Attempt to move above root. Always die if the
+ /* Attempt to move above root. Always die if the
* APR_FILEPATH_SECUREROOTTEST flag is specified.
*/
if (flags & APR_FILEPATH_SECUREROOTTEST)
return APR_EABOVEROOT;
-
+
/* Otherwise this is simply a noop, above root is root.
*/
}
- else if (pathlen == 0
- || (pathlen >= 3
+ else if (pathlen == 0
+ || (pathlen >= 3
&& (pathlen == 3
|| path[pathlen - 4] == ':'
- || path[pathlen - 4] == '/'
+ || path[pathlen - 4] == '/'
|| path[pathlen - 4] == '\\')
- && path[pathlen - 3] == '.'
- && path[pathlen - 2] == '.'
- && (path[pathlen - 1] == '/'
+ && path[pathlen - 3] == '.'
+ && path[pathlen - 2] == '.'
+ && (path[pathlen - 1] == '/'
|| path[pathlen - 1] == '\\')))
{
/* Verified path is empty, exactly "..[/\]", or ends
* in "[:/\]..[/\]" - these patterns we will not back
* over since they aren't 'prior segements'.
- *
+ *
* If APR_FILEPATH_SECUREROOTTEST.was given, die now.
*/
if (flags & APR_FILEPATH_SECUREROOTTEST)
@@ -725,7 +725,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
path[pathlen++] = '.';
path[pathlen++] = '.';
if (addpath[segend]) {
- path[pathlen++] = ((flags & APR_FILEPATH_NATIVE)
+ path[pathlen++] = ((flags & APR_FILEPATH_NATIVE)
? '\\' : ((flags & APR_FILEPATH_TRUENAME)
? '/' : addpath[segend]));
}
@@ -735,9 +735,9 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
*/
keptlen = pathlen;
}
- else
+ else
{
- /* otherwise crop the prior segment
+ /* otherwise crop the prior segment
*/
do {
--pathlen;
@@ -747,7 +747,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
/* Now test if we are above where we started and back up
* the keptlen offset to reflect the added/altered path.
*/
- if (pathlen < keptlen)
+ if (pathlen < keptlen)
{
if (flags & APR_FILEPATH_SECUREROOTTEST)
return APR_EABOVEROOT;
@@ -763,7 +763,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
const char *testroot;
apr_status_t testtype;
apr_size_t i = (addpath[segend] != '\0');
-
+
/* This isn't legal unless the unc path is complete!
*/
if (seglen < segend)
@@ -771,10 +771,10 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
if (pathlen + seglen + 1 >= sizeof(path))
return APR_ENAMETOOLONG;
memcpy(path + pathlen, addpath, seglen + i);
-
+
/* Always add the trailing slash to a UNC segment
*/
- path[pathlen + seglen] = ((flags & APR_FILEPATH_NATIVE)
+ path[pathlen + seglen] = ((flags & APR_FILEPATH_NATIVE)
? '\\' : '/');
pathlen += seglen + 1;
@@ -785,7 +785,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
path[pathlen] = '\0';
/* This call _should_ test the path
*/
- testtype = apr_filepath_root(&testroot, &testpath,
+ testtype = apr_filepath_root(&testroot, &testpath,
APR_FILEPATH_TRUENAME
| (flags & APR_FILEPATH_NATIVE),
p);
@@ -810,7 +810,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
return APR_ENAMETOOLONG;
memcpy(path + pathlen, addpath, seglen + i);
if (i)
- path[pathlen + seglen] = ((flags & APR_FILEPATH_NATIVE)
+ path[pathlen + seglen] = ((flags & APR_FILEPATH_NATIVE)
? '\\' : '/');
pathlen += seglen + i;
}
@@ -823,23 +823,23 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
addpath += segend;
}
-
+
/* keptlen will be the baselen unless the addpath contained
* backpath elements. If so, and APR_FILEPATH_NOTABOVEROOT
* is specified (APR_FILEPATH_SECUREROOTTEST was caught above),
- * compare the string beyond the root to assure the result path
- * is still within given basepath. Note that the root path
+ * compare the string beyond the root to assure the result path
+ * is still within given basepath. Note that the root path
* segment is thoroughly tested prior to path parsing.
*/
if ((flags & APR_FILEPATH_NOTABOVEROOT) && baselen) {
if (memcmp(basepath, path + rootlen, baselen) != 0)
return APR_EABOVEROOT;
-
+
/* Ahem... if we have a basepath without a trailing slash,
* we better be sure that /foo wasn't replaced with /foobar!
*/
if (basepath[baselen - 1] != '/' && basepath[baselen - 1] != '\\'
- && path[rootlen + baselen] && path[rootlen + baselen] != '/'
+ && path[rootlen + baselen] && path[rootlen + baselen] != '/'
&& path[rootlen + baselen] != '\\')
return APR_EABOVEROOT;
}
@@ -869,7 +869,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
/* Null term for stat! */
path[keptlen + seglen] = '\0';
- if ((rv = apr_stat(&finfo, path,
+ if ((rv = apr_stat(&finfo, path,
APR_FINFO_LINK | APR_FINFO_TYPE | APR_FINFO_NAME, p))
== APR_SUCCESS) {
apr_size_t namelen = strlen(finfo.name);
@@ -881,8 +881,8 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
#else /* WIN32 || NETWARE; here there be aliases that gire and gimble and change length */
- if ((namelen != seglen) ||
- (memcmp(finfo.name, path + keptlen, seglen) != 0))
+ if ((namelen != seglen) ||
+ (memcmp(finfo.name, path + keptlen, seglen) != 0))
{
if (namelen <= seglen) {
memcpy(path + keptlen, finfo.name, namelen);
@@ -909,17 +909,17 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
#endif /* !OS2 (Whatever that alias was we're over it) */
- /* That's it, the rest is path info.
+ /* That's it, the rest is path info.
* I don't know how we aught to handle this. Should
* we define a new error to indicate 'more info'?
* Should we split out the rest of the path?
*/
- if ((finfo.filetype != APR_DIR) &&
- (finfo.filetype != APR_LNK) && saveslash)
+ if ((finfo.filetype != APR_DIR) &&
+ (finfo.filetype != APR_LNK) && saveslash)
rv = APR_ENOTDIR;
#ifdef XXX_FIGURE_THIS_OUT
{
- /* the example inserts a null between the end of
+ /* the example inserts a null between the end of
* the filename and the next segment, and increments
* the path length so we would return both segments.
*/
diff --git a/file_io/win32/filestat.c b/file_io/win32/filestat.c
index 292c030dd..00dfccf2e 100644
--- a/file_io/win32/filestat.c
+++ b/file_io/win32/filestat.c
@@ -95,7 +95,7 @@ static void resolve_prot(apr_finfo_t *finfo, apr_int32_t wanted, PACL dacl)
TRUSTEE_W ident = {NULL, NO_MULTIPLE_TRUSTEE, TRUSTEE_IS_SID};
ACCESS_MASK acc;
/*
- * This function is only invoked for WinNT,
+ * This function is only invoked for WinNT,
* there is no reason for os_level testing here.
*/
if ((wanted & APR_FINFO_WPROT) && !worldid) {
@@ -120,7 +120,7 @@ static void resolve_prot(apr_finfo_t *finfo, apr_int32_t wanted, PACL dacl)
}
/* Windows NT: did not return group rights.
* Windows 2000 returns group rights information.
- * Since WinNT kernels don't follow the unix model of
+ * Since WinNT kernels don't follow the unix model of
* group associations, this all all pretty mute.
*/
if ((wanted & APR_FINFO_GPROT) && (finfo->valid & APR_FINFO_GROUP)) {
@@ -146,7 +146,7 @@ static apr_status_t resolve_ident(apr_finfo_t *finfo, const char *fname,
{
apr_file_t *thefile = NULL;
apr_status_t rv;
- /*
+ /*
* NT5 (W2K) only supports symlinks in the same manner as mount points.
* This code should eventually take that into account, for now treat
* every reparse point as a symlink...
@@ -154,7 +154,7 @@ static apr_status_t resolve_ident(apr_finfo_t *finfo, const char *fname,
* We must open the file with READ_CONTROL if we plan to retrieve the
* user, group or permissions.
*/
-
+
if ((rv = apr_file_open(&thefile, fname, APR_OPENINFO
| ((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0)
| ((wanted & (APR_FINFO_PROT | APR_FINFO_OWNER))
@@ -164,7 +164,7 @@ static apr_status_t resolve_ident(apr_finfo_t *finfo, const char *fname,
finfo->filehand = NULL;
apr_file_close(thefile);
}
- else if (APR_STATUS_IS_EACCES(rv) && (wanted & (APR_FINFO_PROT
+ 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...
@@ -172,7 +172,7 @@ static apr_status_t resolve_ident(apr_finfo_t *finfo, const char *fname,
if ((rv = apr_file_open(&thefile, fname, APR_OPENINFO
| ((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0),
APR_FPROT_OS_DEFAULT, pool)) == APR_SUCCESS) {
- rv = apr_file_info_get(finfo, wanted & ~(APR_FINFO_PROT
+ rv = apr_file_info_get(finfo, wanted & ~(APR_FINFO_PROT
| APR_FINFO_OWNER),
thefile);
finfo->filehand = NULL;
@@ -256,7 +256,7 @@ static int reparse_point_is_link(WIN32_FILE_ATTRIBUTE_DATA *wininfo,
return IsReparseTagNameSurrogate(tag);
}
-apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
+apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
apr_int32_t wanted, int whatfile)
{
PSID user = NULL, grp = NULL;
@@ -290,7 +290,7 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
if (wcsncmp(wfile + fix, L"UNC\\", 4) == 0)
wfile[6] = L'\\', fix = 6;
}
- rv = GetNamedSecurityInfoW(wfile + fix,
+ rv = GetNamedSecurityInfoW(wfile + fix,
SE_FILE_OBJECT, sinf,
((wanted & (APR_FINFO_USER | APR_FINFO_UPROT)) ? &user : NULL),
((wanted & (APR_FINFO_GROUP | APR_FINFO_GPROT)) ? &grp : NULL),
@@ -300,7 +300,7 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
wfile[6] = L'C';
}
else if (whatfile == MORE_OF_HANDLE)
- rv = GetSecurityInfo((HANDLE)ufile,
+ rv = GetSecurityInfo((HANDLE)ufile,
SE_FILE_OBJECT, sinf,
((wanted & (APR_FINFO_USER | APR_FINFO_UPROT)) ? &user : NULL),
((wanted & (APR_FINFO_GROUP | APR_FINFO_GPROT)) ? &grp : NULL),
@@ -309,7 +309,7 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
else
return APR_INCOMPLETE; /* should not occur */
if (rv == ERROR_SUCCESS)
- apr_pool_cleanup_register(finfo->pool, pdesc, free_localheap,
+ apr_pool_cleanup_register(finfo->pool, pdesc, free_localheap,
apr_pool_cleanup_null);
else
user = grp = dacl = NULL;
@@ -349,7 +349,7 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
sizelo = GetCompressedFileSizeW((apr_wchar_t*)ufile, &sizehi);
else
return APR_EGENERAL; /* should not occur */
-
+
if (sizelo != INVALID_FILE_SIZE || GetLastError() == NO_ERROR) {
#if APR_HAS_LARGE_FILES
finfo->csize = (apr_off_t)sizelo
@@ -377,8 +377,8 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
* if this is a CHR filetype. If it's reasonably certain it can't be,
* then the function returns 0.
*/
-int fillin_fileinfo(apr_finfo_t *finfo,
- WIN32_FILE_ATTRIBUTE_DATA *wininfo,
+int fillin_fileinfo(apr_finfo_t *finfo,
+ WIN32_FILE_ATTRIBUTE_DATA *wininfo,
int byhandle,
int finddata,
const char *fname,
@@ -420,8 +420,8 @@ int fillin_fileinfo(apr_finfo_t *finfo,
* appears to be unknowable (in any trustworthy or consistent sense)
* on WinNT/2K as far as PIPE, CHR, etc are concerned.
*/
- if (!wininfo->ftLastWriteTime.dwLowDateTime
- && !wininfo->ftLastWriteTime.dwHighDateTime
+ if (!wininfo->ftLastWriteTime.dwLowDateTime
+ && !wininfo->ftLastWriteTime.dwHighDateTime
&& !finfo->size)
warn = 1;
finfo->filetype = APR_REG;
@@ -432,7 +432,7 @@ int fillin_fileinfo(apr_finfo_t *finfo,
*/
if (wininfo->dwFileAttributes & FILE_ATTRIBUTE_READONLY)
finfo->protection = APR_FREADONLY;
-
+
finfo->valid = APR_FINFO_ATIME | APR_FINFO_CTIME | APR_FINFO_MTIME
| APR_FINFO_SIZE | APR_FINFO_TYPE; /* == APR_FINFO_MIN */
@@ -547,7 +547,7 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t want
else if (FileType == FILE_TYPE_PIPE) {
finfo->filetype = APR_PIPE;
}
- /* Otherwise leave the original conclusion alone
+ /* Otherwise leave the original conclusion alone
*/
}
}
@@ -559,7 +559,7 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t want
* we pstrdup the fname into???
*/
finfo->fname = thefile->fname;
-
+
/* Extra goodies known only by GetFileInformationByHandle() */
finfo->inode = (apr_ino_t)FileInfo.nFileIndexLow
| ((apr_ino_t)FileInfo.nFileIndexHigh << 32);
@@ -568,7 +568,7 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t want
finfo->valid |= APR_FINFO_IDENT | APR_FINFO_NLINK;
- /* If we still want something more (besides the name) go get it!
+ /* If we still want something more (besides the name) go get it!
*/
if ((wanted &= ~finfo->valid) & ~APR_FINFO_NAME) {
return more_finfo(finfo, thefile->filehand, wanted, MORE_OF_HANDLE);
@@ -598,20 +598,20 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
WIN32_FILE_ATTRIBUTE_DATA i;
} FileInfo;
int finddata = 0;
-
- /* Catch fname length == MAX_PATH since GetFileAttributesEx fails
- * with PATH_NOT_FOUND. We would rather indicate length error than
+
+ /* Catch fname length == MAX_PATH since GetFileAttributesEx fails
+ * with PATH_NOT_FOUND. We would rather indicate length error than
* 'not found'
- */
+ */
if (strlen(fname) >= APR_PATH_MAX) {
return APR_ENAMETOOLONG;
}
- if ((wanted & (APR_FINFO_IDENT | APR_FINFO_NLINK))
+ if ((wanted & (APR_FINFO_IDENT | APR_FINFO_NLINK))
|| (~wanted & APR_FINFO_LINK)) {
/* FindFirstFile and GetFileAttributesEx can't figure the inode,
- * device or number of links, so we need to resolve with an open
- * file handle. If the user has asked for these fields, fall over
+ * device or number of links, so we need to resolve with an open
+ * file handle. If the user has asked for these fields, fall over
* to the get file info by handle method. If we fail, or the user
* also asks for the file name, continue by our usual means.
*
@@ -620,18 +620,18 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
* on a Junction always returns the junction, opening the target
* is the only way to resolve the target's attributes.
*/
- if ((ident_rv = resolve_ident(finfo, fname, wanted, pool))
+ if ((ident_rv = resolve_ident(finfo, fname, wanted, pool))
== APR_SUCCESS)
return ident_rv;
else if (ident_rv == APR_INCOMPLETE)
wanted &= ~finfo->valid;
}
- if ((rv = utf8_to_unicode_path(wfname, sizeof(wfname)
+ if ((rv = utf8_to_unicode_path(wfname, sizeof(wfname)
/ sizeof(apr_wchar_t), fname)))
return rv;
if (!(wanted & APR_FINFO_NAME)) {
- if (!GetFileAttributesExW(wfname, GetFileExInfoStandard,
+ if (!GetFileAttributesExW(wfname, GetFileExInfoStandard,
&FileInfo.i))
return apr_get_os_error();
}
@@ -659,7 +659,7 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
}
if (ident_rv != APR_INCOMPLETE) {
- if (fillin_fileinfo(finfo, (WIN32_FILE_ATTRIBUTE_DATA *) &FileInfo,
+ if (fillin_fileinfo(finfo, (WIN32_FILE_ATTRIBUTE_DATA *) &FileInfo,
0, finddata, fname, wanted))
{
/* Go the extra mile to assure we have a file. WinNT/2000 seems
@@ -675,9 +675,9 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
if (tmpoff == tmpname + 4) {
finfo->filetype = APR_CHR;
}
- /* For WHATEVER reason, CHR devices such as \\.\con
+ /* For WHATEVER reason, CHR devices such as \\.\con
* or \\.\lpt1 *may*not* update tmpoff; in fact the
- * resulting tmpoff is set to NULL. Guard against
+ * resulting tmpoff is set to NULL. Guard against
* either case.
*
* This code is identical for wide and narrow chars...
diff --git a/file_io/win32/filesys.c b/file_io/win32/filesys.c
index bf1a7c2bc..2d6ef839e 100644
--- a/file_io/win32/filesys.c
+++ b/file_io/win32/filesys.c
@@ -22,19 +22,19 @@
*
* Note that trailing spaces and trailing periods are never recorded
* in the file system, except by a very obscure bug where any file
- * that is created with a trailing space or period, followed by the
+ * that is created with a trailing space or period, followed by the
* ':' stream designator on an NTFS volume can never be accessed again.
* In other words, don't ever accept them when designating a stream!
*
- * An interesting side effect is that two or three periods are both
+ * An interesting side effect is that two or three periods are both
* treated as the parent directory, although the fourth and on are
* not [strongly suggest all trailing periods are trimmed off, or
* down to two if there are no other characters.]
*
* Leading spaces and periods are accepted, however.
* The * ? < > codes all have wildcard side effects
- * The " / \ : are exclusively component separator tokens
- * The system doesn't accept | for any (known) purpose
+ * The " / \ : are exclusively component separator tokens
+ * The system doesn't accept | for any (known) purpose
* Oddly, \x7f _is_ acceptable ;)
*/
@@ -68,7 +68,7 @@ apr_status_t filepath_root_test(char *path, apr_pool_t *p)
apr_status_t rv;
apr_wchar_t wpath[APR_PATH_MAX];
- if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
+ if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path)))
return rv;
rv = GetDriveTypeW(wpath);
@@ -79,7 +79,7 @@ apr_status_t filepath_root_test(char *path, apr_pool_t *p)
}
-apr_status_t filepath_drive_get(char **rootpath, char drive,
+apr_status_t filepath_drive_get(char **rootpath, char drive,
apr_int32_t flags, apr_pool_t *p)
{
char path[APR_PATH_MAX];
@@ -87,7 +87,7 @@ apr_status_t filepath_drive_get(char **rootpath, char drive,
apr_wchar_t wdrive[8];
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
- /* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
+ /* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
* as if that is useful for anything.
*/
wcscpy(wdrive, L"D:.");
@@ -113,16 +113,16 @@ apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p)
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
apr_wchar_t wroot[APR_PATH_MAX];
- /* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
+ /* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
* as if that is useful for anything.
*/
- if ((rv = utf8_to_unicode_path(wroot, sizeof(wroot)
+ if ((rv = utf8_to_unicode_path(wroot, sizeof(wroot)
/ sizeof(apr_wchar_t), root)))
return rv;
if (!GetFullPathNameW(wroot, sizeof(wpath) / sizeof(apr_wchar_t), wpath, &ignored))
return apr_get_os_error();
- /* Borrow wroot as a char buffer (twice as big as necessary)
+ /* Borrow wroot as a char buffer (twice as big as necessary)
*/
if ((rv = unicode_to_utf8_path((char*)wroot, sizeof(wroot), wpath)))
return rv;
@@ -159,7 +159,7 @@ APR_DECLARE(apr_status_t) apr_filepath_set(const char *rootpath,
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
- if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
+ if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), rootpath)))
return rv;
if (!SetCurrentDirectoryW(wpath))
diff --git a/file_io/win32/flock.c b/file_io/win32/flock.c
index f314bdccb..ebbdd1eda 100644
--- a/file_io/win32/flock.c
+++ b/file_io/win32/flock.c
@@ -19,10 +19,10 @@
APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
{
const DWORD len = 0xffffffff;
- DWORD flags;
+ DWORD flags;
flags = ((type & APR_FLOCK_NONBLOCK) ? LOCKFILE_FAIL_IMMEDIATELY : 0)
- + (((type & APR_FLOCK_TYPEMASK) == APR_FLOCK_SHARED)
+ + (((type & APR_FLOCK_TYPEMASK) == APR_FLOCK_SHARED)
? 0 : LOCKFILE_EXCLUSIVE_LOCK);
/* Syntax is correct, len is passed for LengthLow and LengthHigh*/
OVERLAPPED offset;
diff --git a/file_io/win32/open.c b/file_io/win32/open.c
index 3181d668e..8249c6cea 100644
--- a/file_io/win32/open.c
+++ b/file_io/win32/open.c
@@ -34,15 +34,15 @@
#include <io.h>
#include <winioctl.h>
-apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
+apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
const char* srcstr)
{
/* TODO: The computations could preconvert the string to determine
* the true size of the retstr, but that's a memory over speed
* tradeoff that isn't appropriate this early in development.
*
- * Allocate the maximum string length based on leading 4
- * characters of \\?\ (allowing nearly unlimited path lengths)
+ * Allocate the maximum string length based on leading 4
+ * characters of \\?\ (allowing nearly unlimited path lengths)
* plus the trailing null, then transform /'s into \\'s since
* the \\?\ form doesn't allow '/' path seperators.
*
@@ -54,15 +54,15 @@ apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
apr_status_t rv;
/* This is correct, we don't twist the filename if it is will
- * definitely be shorter than 248 characters. It merits some
+ * definitely be shorter than 248 characters. It merits some
* performance testing to see if this has any effect, but there
* seem to be applications that get confused by the resulting
* Unicode \\?\ style file names, especially if they use argv[0]
* or call the Win32 API functions such as GetModuleName, etc.
* Not every application is prepared to handle such names.
- *
- * Note also this is shorter than MAX_PATH, as directory paths
- * are actually limited to 248 characters.
+ *
+ * Note also this is shorter than MAX_PATH, as directory paths
+ * are actually limited to 248 characters.
*
* Note that a utf-8 name can never result in more wide chars
* than the original number of utf-8 narrow chars.
@@ -109,9 +109,9 @@ apr_status_t unicode_to_utf8_path(char* retstr, apr_size_t retlen,
apr_size_t srcremains = wcslen(srcstr) + 1;
apr_status_t rv;
char *t = retstr;
- if (srcstr[0] == L'\\' && srcstr[1] == L'\\' &&
+ if (srcstr[0] == L'\\' && srcstr[1] == L'\\' &&
srcstr[2] == L'?' && srcstr[3] == L'\\') {
- if (srcstr[4] == L'U' && srcstr[5] == L'N' &&
+ if (srcstr[4] == L'U' && srcstr[5] == L'N' &&
srcstr[6] == L'C' && srcstr[7] == L'\\') {
srcremains -= 8;
srcstr += 8;
@@ -125,7 +125,7 @@ apr_status_t unicode_to_utf8_path(char* retstr, apr_size_t retlen,
srcstr += 4;
}
}
-
+
if ((rv = apr_conv_utf16_to_utf8(srcstr, &srcremains, t, &retlen))) {
return rv;
}
@@ -191,7 +191,7 @@ static apr_status_t make_sparse_file(apr_file_t *file)
&bytesread, file->pOverlapped)) {
rv = APR_SUCCESS;
}
- else
+ else
{
rv = apr_get_os_error();
@@ -206,7 +206,7 @@ static apr_status_t make_sparse_file(apr_file_t *file)
CancelIoEx(file->filehand, file->pOverlapped);
}
- if (GetOverlappedResult(file->filehand, file->pOverlapped,
+ if (GetOverlappedResult(file->filehand, file->pOverlapped,
&bytesread, TRUE))
rv = APR_SUCCESS;
else
@@ -230,7 +230,7 @@ apr_status_t file_cleanup(void *thefile)
/* In order to avoid later segfaults with handle 'reuse',
* we must protect against the case that a dup2'ed handle
- * is being closed, and invalidate the corresponding StdHandle
+ * is being closed, and invalidate the corresponding StdHandle
* We also tell msvcrt when stdhandles are closed.
*/
if (file->flags & APR_STD_FLAGS)
@@ -307,8 +307,8 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
if ((flag & APR_FOPEN_EXCL) && !(flag & APR_FOPEN_CREATE)) {
return APR_EACCES;
- }
-
+ }
+
if (flag & APR_FOPEN_DELONCLOSE) {
attributes |= FILE_FLAG_DELETE_ON_CLOSE;
}
@@ -336,7 +336,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
}
if (flag & APR_FOPEN_XTHREAD) {
- /* This win32 specific feature is required
+ /* This win32 specific feature is required
* to allow multiple threads to work with the file.
*/
attributes |= FILE_FLAG_OVERLAPPED;
@@ -350,7 +350,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
attributes |= FILE_FLAG_SEQUENTIAL_SCAN | FILE_FLAG_OVERLAPPED;
}
- if ((rv = utf8_to_unicode_path(wfname, sizeof(wfname)
+ if ((rv = utf8_to_unicode_path(wfname, sizeof(wfname)
/ sizeof(apr_wchar_t), fname)))
return rv;
handle = CreateFileW(wfname, oflags, sharemode,
@@ -377,7 +377,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
}
/* Need the mutex to share an apr_file_t across multiple threads */
if (flag & APR_FOPEN_XTHREAD) {
- rv = apr_thread_mutex_create(&(*new)->mutex,
+ rv = apr_thread_mutex_create(&(*new)->mutex,
APR_THREAD_MUTEX_DEFAULT, pool);
if (rv) {
if (file_cleanup(*new) == APR_SUCCESS) {
@@ -431,7 +431,7 @@ APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
- if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
+ if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path))) {
return rv;
}
@@ -463,7 +463,7 @@ APR_DECLARE(apr_status_t) apr_file_rename(const char *frompath,
return apr_get_os_error();
}
-APR_DECLARE(apr_status_t) apr_file_link(const char *from_path,
+APR_DECLARE(apr_status_t) apr_file_link(const char *from_path,
const char *to_path)
{
apr_status_t rv = APR_SUCCESS;
@@ -513,7 +513,7 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
}
if (flags & APR_FOPEN_XTHREAD) {
apr_status_t rv;
- rv = apr_thread_mutex_create(&(*file)->mutex,
+ rv = apr_thread_mutex_create(&(*file)->mutex,
APR_THREAD_MUTEX_DEFAULT, pool);
if (rv) {
return rv;
@@ -525,13 +525,13 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
/* ### check return codes */
(void) apr_pollset_create(&(*file)->pollset, 1, pool, 0);
#endif
- /* Should we be testing if thefile is a handle to
+ /* Should we be testing if thefile is a handle to
* a PIPE and set up the mechanics appropriately?
*
* (*file)->pipe;
*/
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
{
@@ -539,10 +539,10 @@ APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
return APR_EOF;
}
return APR_SUCCESS;
-}
+}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
- apr_int32_t flags,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
+ apr_int32_t flags,
apr_pool_t *pool)
{
apr_os_file_t file_handle;
@@ -556,7 +556,7 @@ APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile,
flags | APR_FOPEN_WRITE | APR_STDERR_FLAG, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -571,7 +571,7 @@ APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile,
flags | APR_FOPEN_WRITE | APR_STDOUT_FLAG, pool);
}
-APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
+APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile,
apr_int32_t flags,
apr_pool_t *pool)
{
@@ -604,5 +604,5 @@ APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile, apr_pool_t *
APR_POOL_IMPLEMENT_ACCESSOR(file);
APR_IMPLEMENT_INHERIT_SET(file, flags, pool, file_cleanup)
-
+
APR_IMPLEMENT_INHERIT_UNSET(file, flags, pool, file_cleanup)
diff --git a/file_io/win32/readwrite.c b/file_io/win32/readwrite.c
index c9d4864ed..66cdee604 100644
--- a/file_io/win32/readwrite.c
+++ b/file_io/win32/readwrite.c
@@ -26,7 +26,7 @@
#include <malloc.h>
/*
- * read_with_timeout()
+ * read_with_timeout()
* Uses async i/o to emulate unix non-blocking i/o with timeouts.
*/
static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t len_in, apr_size_t *nbytes)
@@ -61,7 +61,7 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
}
}
else {
- /* ToDo: Handle zero timeout non-blocking file i/o
+ /* ToDo: Handle zero timeout non-blocking file i/o
* This is not needed until an APR application needs to
* timeout file i/o (which means setting file i/o non-blocking)
*/
@@ -73,7 +73,7 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
file->pOverlapped->OffsetHigh = (DWORD)(file->filePtr >> 32);
}
- if (ReadFile(file->filehand, buf, len,
+ if (ReadFile(file->filehand, buf, len,
&bytesread, file->pOverlapped)) {
rv = APR_SUCCESS;
}
@@ -86,7 +86,7 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
* when I/O operation completed syncronously.
* Use fast macro to check that overlapped I/O already
* completed to avoid kernel call.
- */
+ */
if (HasOverlappedIoCompleted(file->pOverlapped)) {
res = WAIT_OBJECT_0;
}
@@ -115,7 +115,7 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
* fail if the handle is closed, yet the read may have
* completed before we attempted to CancelIo...
*/
- if (GetOverlappedResult(file->filehand, file->pOverlapped,
+ if (GetOverlappedResult(file->filehand, file->pOverlapped,
&bytesread, TRUE)) {
rv = APR_SUCCESS;
}
@@ -135,11 +135,11 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
rv = APR_EOF;
}
}
-
+
/* OK and 0 bytes read ==> end of file */
if (rv == APR_SUCCESS && bytesread == 0)
rv = APR_EOF;
-
+
if (rv == APR_SUCCESS && file->pOverlapped && file->ftype == APR_FILETYPE_FILE) {
file->filePtr += bytesread;
}
@@ -242,11 +242,11 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
}
/* If the file is open for xthread support, allocate and
- * initialize the overlapped and io completion event (hEvent).
+ * initialize the overlapped and io completion event (hEvent).
* Threads should NOT share an apr_file_t or its hEvent.
*/
if ((thefile->flags & APR_FOPEN_XTHREAD) && !thefile->pOverlapped ) {
- thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
+ thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
sizeof(OVERLAPPED));
thefile->pOverlapped->hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!thefile->pOverlapped->hEvent) {
@@ -275,7 +275,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
if (thefile->flags & APR_FOPEN_XTHREAD) {
apr_thread_mutex_unlock(thefile->mutex);
}
- } else {
+ } else {
/* Unbuffered i/o */
apr_size_t nbytes;
rv = read_with_timeout(thefile, buf, *len, &nbytes);
@@ -389,11 +389,11 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
DWORD bwrote = 0;
/* If the file is open for xthread support, allocate and
- * initialize the overlapped and io completion event (hEvent).
+ * initialize the overlapped and io completion event (hEvent).
* Threads should NOT share an apr_file_t or its hEvent.
*/
if ((thefile->flags & APR_FOPEN_XTHREAD) && !thefile->pOverlapped ) {
- thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
+ thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
sizeof(OVERLAPPED));
thefile->pOverlapped->hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!thefile->pOverlapped->hEvent) {
@@ -498,7 +498,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
rv = apr_get_os_error();
if (rv == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) {
-
+
DWORD res;
/* It seems that WriteFile() return ERROR_IO_PENDING even
@@ -557,7 +557,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
*/
APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile,
const struct iovec *vec,
- apr_size_t nvec,
+ apr_size_t nvec,
apr_size_t *nbytes)
{
apr_status_t rv = APR_SUCCESS;
@@ -602,12 +602,12 @@ APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
if (rc) {
return rc;
}
-
+
if (bread == 0) {
thefile->eof_hit = TRUE;
return APR_EOF;
}
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile)
@@ -745,7 +745,7 @@ APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile)
/* There isn't anything to do if we aren't buffering the output
* so just return success.
*/
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_sync(apr_file_t *thefile){
@@ -786,7 +786,7 @@ static int file_printf_flush(apr_vformatter_buff_t *buff)
return 0;
}
-APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
+APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
const char *format, ...)
{
struct apr_file_printf_data data;
diff --git a/file_io/win32/seek.c b/file_io/win32/seek.c
index 673c6f578..4de829bca 100644
--- a/file_io/win32/seek.c
+++ b/file_io/win32/seek.c
@@ -33,7 +33,7 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
thefile->direction = 0;
}
- /* We may be truncating to size here.
+ /* We may be truncating to size here.
* XXX: testing an 'unsigned' as >= 0 below indicates a bug
*/
newbufpos = pos - (thefile->filePtr - thefile->dataRead);
@@ -44,7 +44,7 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
} else {
LARGE_INTEGER li;
li.QuadPart = pos;
-
+
if (!SetFilePointerEx(thefile->filehand, li, NULL, FILE_BEGIN)) {
rv = apr_get_os_error();
}
@@ -78,7 +78,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
break;
case APR_CUR:
- rc = setptr(thefile, thefile->filePtr - thefile->dataRead
+ rc = setptr(thefile, thefile->filePtr - thefile->dataRead
+ thefile->bufpos + *offset);
break;
@@ -103,11 +103,11 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
case APR_SET:
thefile->filePtr = *offset;
break;
-
+
case APR_CUR:
thefile->filePtr += *offset;
break;
-
+
case APR_END:
rc = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
if (rc == APR_SUCCESS && finfo.size + *offset >= 0)
diff --git a/locks/beos/proc_mutex.c b/locks/beos/proc_mutex.c
index 35a5e8f10..47789a1e2 100644
--- a/locks/beos/proc_mutex.c
+++ b/locks/beos/proc_mutex.c
@@ -17,7 +17,7 @@
/*Read/Write locking implementation based on the MultiLock code from
* Stephen Beaulieu <hippo@be.com>
*/
-
+
#include "apr_arch_proc_mutex.h"
#include "apr_strings.h"
#include "apr_portable.h"
@@ -28,7 +28,7 @@ static apr_status_t _proc_mutex_cleanup(void * data)
if (lock->LockCount != 0) {
/* we're still locked... */
while (atomic_add(&lock->LockCount , -1) > 1){
- /* OK we had more than one person waiting on the lock so
+ /* OK we had more than one person waiting on the lock so
* the sem is also locked. Release it until we have no more
* locks left.
*/
@@ -37,7 +37,7 @@ static apr_status_t _proc_mutex_cleanup(void * data)
}
delete_sem(lock->Lock);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex,
const char *fname,
@@ -46,7 +46,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex,
{
apr_proc_mutex_t *new;
apr_status_t stat = APR_SUCCESS;
-
+
if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
return APR_ENOTIMPL;
}
@@ -55,13 +55,13 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex,
if (new == NULL){
return APR_ENOMEM;
}
-
+
if ((stat = create_sem(0, "APR_Lock")) < B_NO_ERROR) {
_proc_mutex_cleanup(new);
return stat;
}
new->LockCount = 0;
- new->Lock = stat;
+ new->Lock = stat;
new->pool = pool;
apr_pool_cleanup_register(new->pool, (void *)new, _proc_mutex_cleanup,
@@ -77,11 +77,11 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,
{
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_proc_mutex_lock(apr_proc_mutex_t *mutex)
{
int32 stat;
-
+
if (atomic_add(&mutex->LockCount, 1) > 0) {
if ((stat = acquire_sem(mutex->Lock)) < B_NO_ERROR) {
atomic_add(&mutex->LockCount, -1);
@@ -135,7 +135,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_timedlock(apr_proc_mutex_t *mutex,
APR_DECLARE(apr_status_t) apr_proc_mutex_unlock(apr_proc_mutex_t *mutex)
{
int32 stat;
-
+
if (atomic_add(&mutex->LockCount, -1) > 1) {
if ((stat = release_sem(mutex->Lock)) < B_NO_ERROR) {
atomic_add(&mutex->LockCount, 1);
@@ -187,7 +187,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
diff --git a/locks/beos/thread_cond.c b/locks/beos/thread_cond.c
index a0978c008..33b77cf71 100644
--- a/locks/beos/thread_cond.c
+++ b/locks/beos/thread_cond.c
@@ -36,16 +36,16 @@ static struct waiter_t *make_waiter(apr_pool_t *pool)
apr_palloc(pool, sizeof(struct waiter_t));
if (w == NULL)
return NULL;
-
+
w->sem = create_sem(0, "apr conditional waiter");
if (w->sem < 0)
return NULL;
APR_RING_ELEM_INIT(w, link);
-
+
return w;
}
-
+
APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
apr_pool_t *pool)
{
@@ -60,12 +60,12 @@ APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
if ((rv = create_sem(1, "apr conditional lock")) < B_OK)
return rv;
-
+
new_cond->lock = rv;
new_cond->pool = pool;
APR_RING_INIT(&new_cond->alist, waiter_t, link);
APR_RING_INIT(&new_cond->flist, waiter_t, link);
-
+
for (i=0;i < 10 ;i++) {
struct waiter_t *nw = make_waiter(pool);
APR_RING_INSERT_TAIL(&new_cond->flist, nw, waiter_t, link);
@@ -87,8 +87,8 @@ static apr_status_t do_wait(apr_thread_cond_t *cond, apr_thread_mutex_t *mutex,
thread_id cth = find_thread(NULL);
apr_status_t rv;
int flags = B_RELATIVE_TIMEOUT;
-
- /* We must be the owner of the mutex or we can't do this... */
+
+ /* We must be the owner of the mutex or we can't do this... */
if (mutex->owner != cth) {
/* What should we return??? */
return APR_EINVAL;
@@ -99,31 +99,31 @@ static apr_status_t do_wait(apr_thread_cond_t *cond, apr_thread_mutex_t *mutex,
if (wait)
APR_RING_REMOVE(wait, link);
else
- wait = make_waiter(cond->pool);
+ wait = make_waiter(cond->pool);
APR_RING_INSERT_TAIL(&cond->alist, wait, waiter_t, link);
cond->condlock = mutex;
release_sem(cond->lock);
-
+
apr_thread_mutex_unlock(cond->condlock);
if (timeout == 0)
flags = 0;
-
+
rv = acquire_sem_etc(wait->sem, 1, flags, timeout);
apr_thread_mutex_lock(cond->condlock);
-
+
if (rv != B_OK) {
if (rv == B_TIMED_OUT)
return APR_TIMEUP;
- return rv;
+ return rv;
}
acquire_sem(cond->lock);
APR_RING_REMOVE(wait, link);
APR_RING_INSERT_TAIL(&cond->flist, wait, waiter_t, link);
release_sem(cond->lock);
-
+
return APR_SUCCESS;
}
@@ -144,7 +144,7 @@ APR_DECLARE(apr_status_t) apr_thread_cond_signal(apr_thread_cond_t *cond)
{
struct waiter_t *wake;
- acquire_sem(cond->lock);
+ acquire_sem(cond->lock);
if (!APR_RING_EMPTY(&cond->alist, waiter_t, link)) {
wake = APR_RING_FIRST(&cond->alist);
APR_RING_REMOVE(wake, link);
@@ -152,14 +152,14 @@ APR_DECLARE(apr_status_t) apr_thread_cond_signal(apr_thread_cond_t *cond)
APR_RING_INSERT_TAIL(&cond->flist, wake, waiter_t, link);
}
release_sem(cond->lock);
-
+
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_thread_cond_broadcast(apr_thread_cond_t *cond)
{
struct waiter_t *wake;
-
+
acquire_sem(cond->lock);
while (! APR_RING_EMPTY(&cond->alist, waiter_t, link)) {
wake = APR_RING_FIRST(&cond->alist);
@@ -168,7 +168,7 @@ APR_DECLARE(apr_status_t) apr_thread_cond_broadcast(apr_thread_cond_t *cond)
APR_RING_INSERT_TAIL(&cond->flist, wake, waiter_t, link);
}
release_sem(cond->lock);
-
+
return APR_SUCCESS;
}
diff --git a/locks/beos/thread_mutex.c b/locks/beos/thread_mutex.c
index e4099d882..2cc1c6cc6 100644
--- a/locks/beos/thread_mutex.c
+++ b/locks/beos/thread_mutex.c
@@ -17,7 +17,7 @@
/*Read/Write locking implementation based on the MultiLock code from
* Stephen Beaulieu <hippo@be.com>
*/
-
+
#include "apr_arch_thread_mutex.h"
#include "apr_strings.h"
#include "apr_portable.h"
@@ -28,7 +28,7 @@ static apr_status_t _thread_mutex_cleanup(void * data)
if (lock->LockCount != 0) {
/* we're still locked... */
while (atomic_add(&lock->LockCount , -1) > 1){
- /* OK we had more than one person waiting on the lock so
+ /* OK we had more than one person waiting on the lock so
* the sem is also locked. Release it until we have no more
* locks left.
*/
@@ -37,7 +37,7 @@ static apr_status_t _thread_mutex_cleanup(void * data)
}
delete_sem(lock->Lock);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
unsigned int flags,
@@ -45,21 +45,21 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
{
apr_thread_mutex_t *new_m;
apr_status_t stat = APR_SUCCESS;
-
+
new_m = (apr_thread_mutex_t *)apr_pcalloc(pool, sizeof(apr_thread_mutex_t));
if (new_m == NULL){
return APR_ENOMEM;
}
-
+
if ((stat = create_sem(0, "APR_Lock")) < B_NO_ERROR) {
_thread_mutex_cleanup(new_m);
return stat;
}
new_m->LockCount = 0;
- new_m->Lock = stat;
+ new_m->Lock = stat;
new_m->pool = pool;
- /* Optimal default is APR_THREAD_MUTEX_UNNESTED,
+ /* Optimal default is APR_THREAD_MUTEX_UNNESTED,
* no additional checks required for either flag.
*/
new_m->nested = flags & APR_THREAD_MUTEX_NESTED;
@@ -78,19 +78,19 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create_np(apr_thread_mutex_t **mutex,
apr_pool_t *pool)
{
return APR_ENOTIMPL;
-}
+}
#endif
-
+
APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex)
{
int32 stat;
thread_id me = find_thread(NULL);
-
+
if (mutex->nested && mutex->owner == me) {
mutex->owner_ref++;
return APR_SUCCESS;
}
-
+
if (atomic_add(&mutex->LockCount, 1) > 0) {
if ((stat = acquire_sem(mutex->Lock)) < B_NO_ERROR) {
/* Oh dear, acquire_sem failed!! */
@@ -101,7 +101,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex)
mutex->owner = me;
mutex->owner_ref = 1;
-
+
return APR_SUCCESS;
}
@@ -109,12 +109,12 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)
{
int32 stat;
thread_id me = find_thread(NULL);
-
+
if (mutex->nested && mutex->owner == me) {
mutex->owner_ref++;
return APR_SUCCESS;
}
-
+
if (atomic_add(&mutex->LockCount, 1) > 0) {
if ((stat = acquire_sem_etc(mutex->Lock, 1, 0, 0)) < B_NO_ERROR) {
atomic_add(&mutex->LockCount, -1);
@@ -127,7 +127,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)
mutex->owner = me;
mutex->owner_ref = 1;
-
+
return APR_SUCCESS;
}
@@ -136,12 +136,12 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_timedlock(apr_thread_mutex_t *mutex,
{
int32 stat;
thread_id me = find_thread(NULL);
-
+
if (mutex->nested && mutex->owner == me) {
mutex->owner_ref++;
return APR_SUCCESS;
}
-
+
if (atomic_add(&mutex->LockCount, 1) > 0) {
if (timeout <= 0) {
stat = B_TIMED_OUT;
@@ -161,20 +161,20 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_timedlock(apr_thread_mutex_t *mutex,
mutex->owner = me;
mutex->owner_ref = 1;
-
+
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
{
int32 stat;
-
+
if (mutex->nested && mutex->owner == find_thread(NULL)) {
mutex->owner_ref--;
if (mutex->owner_ref > 0)
return APR_SUCCESS;
}
-
+
if (atomic_add(&mutex->LockCount, -1) > 1) {
if ((stat = release_sem(mutex->Lock)) < B_NO_ERROR) {
atomic_add(&mutex->LockCount, 1);
diff --git a/locks/beos/thread_rwlock.c b/locks/beos/thread_rwlock.c
index a540b4455..363455a7a 100644
--- a/locks/beos/thread_rwlock.c
+++ b/locks/beos/thread_rwlock.c
@@ -17,7 +17,7 @@
/*Read/Write locking implementation based on the MultiLock code from
* Stephen Beaulieu <hippo@be.com>
*/
-
+
#include "apr_arch_thread_rwlock.h"
#include "apr_strings.h"
#include "apr_portable.h"
@@ -43,23 +43,23 @@ static apr_status_t _thread_rw_cleanup(void * data)
release_sem (mutex->Lock);
}
}
-
+
delete_sem(mutex->Read);
delete_sem(mutex->Write);
delete_sem(mutex->Lock);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,
apr_pool_t *pool)
{
apr_thread_rwlock_t *new;
-
+
new = (apr_thread_rwlock_t *)apr_pcalloc(pool, sizeof(apr_thread_rwlock_t));
if (new == NULL){
return APR_ENOMEM;
}
-
+
new->pool = pool;
/* we need to make 3 locks... */
new->ReadCount = 0;
@@ -68,7 +68,7 @@ APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,
new->Read = create_sem(0, "APR_ReadLock");
new->Write = create_sem(0, "APR_WriteLock");
new->Lock = create_sem(0, "APR_Lock");
-
+
if (new->Lock < 0 || new->Read < 0 || new->Write < 0) {
_thread_rw_cleanup(new);
return -1;
@@ -132,7 +132,7 @@ APR_DECLARE(apr_status_t) apr_thread_rwlock_wrlock(apr_thread_rwlock_t *rwlock)
rwlock->writer = find_thread(NULL);
}
}
-
+
return rv;
}
diff --git a/locks/netware/proc_mutex.c b/locks/netware/proc_mutex.c
index 287011b06..999ad3549 100644
--- a/locks/netware/proc_mutex.c
+++ b/locks/netware/proc_mutex.c
@@ -40,8 +40,8 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex,
new_mutex = (apr_proc_mutex_t *)apr_pcalloc(pool, sizeof(apr_proc_mutex_t));
if (new_mutex == NULL) {
return APR_ENOMEM;
- }
-
+ }
+
new_mutex->pool = pool;
ret = apr_thread_mutex_create(&(new_mutex->mutex), flags, pool);
@@ -57,7 +57,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,
{
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_proc_mutex_lock(apr_proc_mutex_t *mutex)
{
if (mutex)
@@ -125,7 +125,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
diff --git a/locks/netware/thread_cond.c b/locks/netware/thread_cond.c
index 432b0d290..51934a53a 100644
--- a/locks/netware/thread_cond.c
+++ b/locks/netware/thread_cond.c
@@ -28,9 +28,9 @@ static apr_status_t thread_cond_cleanup(void *data)
{
apr_thread_cond_t *cond = (apr_thread_cond_t *)data;
- NXCondFree(cond->cond);
+ NXCondFree(cond->cond);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
apr_pool_t *pool)
@@ -38,18 +38,18 @@ APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
apr_thread_cond_t *new_cond = NULL;
new_cond = (apr_thread_cond_t *)apr_pcalloc(pool, sizeof(apr_thread_cond_t));
-
+
if(new_cond ==NULL) {
return APR_ENOMEM;
- }
+ }
new_cond->pool = pool;
new_cond->cond = NXCondAlloc(NULL);
-
+
if(new_cond->cond == NULL)
return APR_ENOMEM;
- apr_pool_cleanup_register(new_cond->pool, new_cond,
+ apr_pool_cleanup_register(new_cond->pool, new_cond,
(void*)thread_cond_cleanup,
apr_pool_cleanup_null);
*cond = new_cond;
diff --git a/locks/netware/thread_mutex.c b/locks/netware/thread_mutex.c
index 435abebba..9698b1f98 100644
--- a/locks/netware/thread_mutex.c
+++ b/locks/netware/thread_mutex.c
@@ -26,7 +26,7 @@ static apr_status_t thread_mutex_cleanup(void *data)
{
apr_thread_mutex_t *mutex = (apr_thread_mutex_t *)data;
- NXMutexFree(mutex->mutex);
+ NXMutexFree(mutex->mutex);
return APR_SUCCESS;
}
@@ -45,23 +45,23 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
if (new_mutex == NULL) {
return APR_ENOMEM;
- }
+ }
new_mutex->pool = pool;
new_mutex->mutex = NXMutexAlloc(NX_MUTEX_RECURSIVE, 0, NULL);
-
+
if(new_mutex->mutex == NULL)
return APR_ENOMEM;
if (flags & APR_THREAD_MUTEX_TIMED) {
apr_status_t rv = apr_thread_cond_create(&new_mutex->cond, pool);
if (rv != APR_SUCCESS) {
- NXMutexFree(new_mutex->mutex);
+ NXMutexFree(new_mutex->mutex);
return rv;
}
}
- apr_pool_cleanup_register(new_mutex->pool, new_mutex,
+ apr_pool_cleanup_register(new_mutex->pool, new_mutex,
(void*)thread_mutex_cleanup,
apr_pool_cleanup_null);
*mutex = new_mutex;
diff --git a/locks/netware/thread_rwlock.c b/locks/netware/thread_rwlock.c
index f971aefd4..010b9de6f 100644
--- a/locks/netware/thread_rwlock.c
+++ b/locks/netware/thread_rwlock.c
@@ -27,13 +27,13 @@ static apr_status_t thread_rwlock_cleanup(void *data)
NXRwLockFree (rwlock->rwlock);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,
apr_pool_t *pool)
{
apr_thread_rwlock_t *new_rwlock = NULL;
-
+
NXHierarchy_t hierarchy = 1; /* for libc NKS NXRwLockAlloc */
NXLockInfo_t *info; /* for libc NKS NXRwLockAlloc */
@@ -41,9 +41,9 @@ APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,
if(new_rwlock ==NULL) {
return APR_ENOMEM;
- }
+ }
new_rwlock->pool = pool;
-
+
info = (NXLockInfo_t *)apr_pcalloc(pool, sizeof(NXLockInfo_t));
new_rwlock->rwlock = NXRwLockAlloc(hierarchy, info);
if(new_rwlock->rwlock == NULL)
diff --git a/locks/os2/proc_mutex.c b/locks/os2/proc_mutex.c
index a86c208b3..0dde9a06f 100644
--- a/locks/os2/proc_mutex.c
+++ b/locks/os2/proc_mutex.c
@@ -165,7 +165,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_timedlock(apr_proc_mutex_t *mutex,
apr_interval_time_t timeout)
{
ULONG rc;
-
+
if (timeout <= 0) {
rc = DosRequestMutexSem(mutex->hMutex, SEM_IMMEDIATE_RETURN);
}
@@ -234,7 +234,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
diff --git a/locks/unix/proc_mutex.c b/locks/unix/proc_mutex.c
index ef3676152..22a79d4b7 100644
--- a/locks/unix/proc_mutex.c
+++ b/locks/unix/proc_mutex.c
@@ -38,7 +38,7 @@ static apr_status_t proc_mutex_no_child_init(apr_proc_mutex_t **mutex,
{
return APR_SUCCESS;
}
-#endif
+#endif
#if APR_HAS_POSIXSEM_SERIALIZE || APR_HAS_PROC_PTHREAD_SERIALIZE
static apr_status_t proc_mutex_no_perms_set(apr_proc_mutex_t *mutex,
@@ -48,7 +48,7 @@ static apr_status_t proc_mutex_no_perms_set(apr_proc_mutex_t *mutex,
{
return APR_ENOTIMPL;
}
-#endif
+#endif
#if APR_HAS_FCNTL_SERIALIZE \
|| APR_HAS_FLOCK_SERIALIZE \
@@ -98,13 +98,13 @@ static apr_status_t proc_mutex_spinsleep_timedacquire(apr_proc_mutex_t *mutex,
static apr_status_t proc_mutex_posix_cleanup(void *mutex_)
{
apr_proc_mutex_t *mutex = mutex_;
-
+
if (sem_close(mutex->os.psem_interproc) < 0) {
return errno;
}
return APR_SUCCESS;
-}
+}
static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,
const char *fname)
@@ -113,7 +113,7 @@ static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,
#define APR_POSIXSEM_NAME_MIN 13
sem_t *psem;
char semname[APR_MD5_DIGESTSIZE * 2 + 2];
-
+
/*
* This bogusness is to follow what appears to be the
* lowest common denominator in Posix semaphore naming:
@@ -179,7 +179,7 @@ static apr_status_t proc_mutex_posix_create(apr_proc_mutex_t *new_mutex,
new_mutex->os.psem_interproc = psem;
new_mutex->fname = apr_pstrdup(new_mutex->pool, semname);
apr_pool_cleanup_register(new_mutex->pool, (void *)new_mutex,
- apr_proc_mutex_cleanup,
+ apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -230,7 +230,7 @@ static apr_status_t proc_mutex_posix_timedacquire(apr_proc_mutex_t *mutex,
timeout += apr_time_now();
abstime.tv_sec = apr_time_sec(timeout);
abstime.tv_nsec = apr_time_usec(timeout) * 1000; /* nanoseconds */
-
+
do {
rc = sem_timedwait(mutex->os.psem_interproc, &abstime);
} while (rc < 0 && errno == EINTR);
@@ -305,20 +305,20 @@ static apr_status_t proc_mutex_sysv_cleanup(void *mutex_)
{
apr_proc_mutex_t *mutex=mutex_;
union semun ick;
-
+
if (mutex->os.crossproc != -1) {
ick.val = 0;
semctl(mutex->os.crossproc, 0, IPC_RMID, ick);
}
return APR_SUCCESS;
-}
+}
static apr_status_t proc_mutex_sysv_create(apr_proc_mutex_t *new_mutex,
const char *fname)
{
union semun ick;
apr_status_t rv;
-
+
new_mutex->os.crossproc = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);
if (new_mutex->os.crossproc == -1) {
rv = errno;
@@ -334,7 +334,7 @@ static apr_status_t proc_mutex_sysv_create(apr_proc_mutex_t *new_mutex,
}
new_mutex->curr_locked = 0;
apr_pool_cleanup_register(new_mutex->pool,
- (void *)new_mutex, apr_proc_mutex_cleanup,
+ (void *)new_mutex, apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -588,7 +588,7 @@ static apr_status_t proc_mutex_pthread_create(apr_proc_mutex_t *new_mutex,
new_mutex->os.pthread_interproc = mmap(NULL, sizeof(proc_pthread_mutex_t),
PROT_READ | PROT_WRITE, MAP_SHARED,
- fd, 0);
+ fd, 0);
if (new_mutex->os.pthread_interproc == MAP_FAILED) {
new_mutex->os.pthread_interproc = NULL;
rv = errno;
@@ -665,18 +665,18 @@ static apr_status_t proc_mutex_pthread_create(apr_proc_mutex_t *new_mutex,
apr_pool_cleanup_register(new_mutex->pool,
(void *)new_mutex,
- apr_proc_mutex_cleanup,
+ apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
return APR_SUCCESS;
}
static apr_status_t proc_mutex_pthread_child_init(apr_proc_mutex_t **mutex,
- apr_pool_t *pool,
+ apr_pool_t *pool,
const char *fname)
{
(*mutex)->curr_locked = 0;
if (proc_pthread_mutex_inc(*mutex)) {
- apr_pool_cleanup_register(pool, *mutex, proc_pthread_mutex_unref,
+ apr_pool_cleanup_register(pool, *mutex, proc_pthread_mutex_unref,
apr_pool_cleanup_null);
}
return APR_SUCCESS;
@@ -690,7 +690,7 @@ static apr_status_t proc_mutex_pthread_acquire_ex(apr_proc_mutex_t *mutex,
#if APR_USE_PROC_PTHREAD_MUTEX_COND
if (proc_pthread_mutex_is_cond(mutex)) {
if ((rv = pthread_mutex_lock(&proc_pthread_mutex(mutex)))) {
-#ifdef HAVE_ZOS_PTHREADS
+#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
#if defined(HAVE_PTHREAD_MUTEX_ROBUST) || defined(HAVE_PTHREAD_MUTEX_ROBUST_NP)
@@ -800,7 +800,7 @@ static apr_status_t proc_mutex_pthread_acquire_ex(apr_proc_mutex_t *mutex,
rv = pthread_mutex_timedlock(&proc_pthread_mutex(mutex), &abstime);
if (rv) {
-#ifdef HAVE_ZOS_PTHREADS
+#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
if (rv == ETIMEDOUT) {
@@ -856,7 +856,7 @@ static apr_status_t proc_mutex_pthread_release(apr_proc_mutex_t *mutex)
#if APR_USE_PROC_PTHREAD_MUTEX_COND
if (proc_pthread_mutex_is_cond(mutex)) {
if ((rv = pthread_mutex_lock(&proc_pthread_mutex(mutex)))) {
-#ifdef HAVE_ZOS_PTHREADS
+#ifdef HAVE_ZOS_PTHREADS
rv = errno;
#endif
#if defined(HAVE_PTHREAD_MUTEX_ROBUST) || defined(HAVE_PTHREAD_MUTEX_ROBUST_NP)
@@ -940,7 +940,7 @@ static apr_status_t proc_mutex_pthread_cond_create(apr_proc_mutex_t *new_mutex,
rv = errno;
#endif
apr_pool_cleanup_run(new_mutex->pool, new_mutex,
- apr_proc_mutex_cleanup);
+ apr_proc_mutex_cleanup);
return rv;
}
if ((rv = pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_SHARED))) {
@@ -949,7 +949,7 @@ static apr_status_t proc_mutex_pthread_cond_create(apr_proc_mutex_t *new_mutex,
#endif
pthread_condattr_destroy(&cattr);
apr_pool_cleanup_run(new_mutex->pool, new_mutex,
- apr_proc_mutex_cleanup);
+ apr_proc_mutex_cleanup);
return rv;
}
if ((rv = pthread_cond_init(&proc_pthread_mutex_cond(new_mutex),
@@ -959,7 +959,7 @@ static apr_status_t proc_mutex_pthread_cond_create(apr_proc_mutex_t *new_mutex,
#endif
pthread_condattr_destroy(&cattr);
apr_pool_cleanup_run(new_mutex->pool, new_mutex,
- apr_proc_mutex_cleanup);
+ apr_proc_mutex_cleanup);
return rv;
}
pthread_condattr_destroy(&cattr);
@@ -1019,7 +1019,7 @@ static apr_status_t proc_mutex_fcntl_cleanup(void *mutex_)
if (status != APR_SUCCESS)
return status;
}
-
+
if (mutex->interproc) {
status = apr_file_close(mutex->interproc);
}
@@ -1030,13 +1030,13 @@ static apr_status_t proc_mutex_fcntl_cleanup(void *mutex_)
status = errno;
}
return status;
-}
+}
static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,
const char *fname)
{
int rv;
-
+
if (fname) {
new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);
rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
@@ -1050,7 +1050,7 @@ static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,
APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_EXCL,
new_mutex->pool);
}
-
+
if (rv != APR_SUCCESS) {
return rv;
}
@@ -1061,9 +1061,9 @@ static apr_status_t proc_mutex_fcntl_create(apr_proc_mutex_t *new_mutex,
unlink(new_mutex->fname);
apr_pool_cleanup_register(new_mutex->pool,
(void*)new_mutex,
- apr_proc_mutex_cleanup,
+ apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
static apr_status_t proc_mutex_fcntl_acquire(apr_proc_mutex_t *mutex)
@@ -1179,13 +1179,13 @@ static apr_status_t proc_mutex_flock_cleanup(void *mutex_)
unlink(mutex->fname);
}
return status;
-}
+}
static apr_status_t proc_mutex_flock_create(apr_proc_mutex_t *new_mutex,
const char *fname)
{
int rv;
-
+
if (fname) {
new_mutex->fname = apr_pstrdup(new_mutex->pool, fname);
rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
@@ -1199,7 +1199,7 @@ static apr_status_t proc_mutex_flock_create(apr_proc_mutex_t *new_mutex,
APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_EXCL,
new_mutex->pool);
}
-
+
if (rv != APR_SUCCESS) {
proc_mutex_flock_cleanup(new_mutex);
return rv;
@@ -1260,7 +1260,7 @@ static apr_status_t proc_mutex_flock_release(apr_proc_mutex_t *mutex)
}
static apr_status_t proc_mutex_flock_child_init(apr_proc_mutex_t **mutex,
- apr_pool_t *pool,
+ apr_pool_t *pool,
const char *fname)
{
apr_proc_mutex_t *new_mutex;
@@ -1521,7 +1521,7 @@ APR_DECLARE(const char *) apr_proc_mutex_defname(void)
return apr_proc_mutex_name(&mutex);
}
-
+
static apr_status_t proc_mutex_create(apr_proc_mutex_t *new_mutex, apr_lockmech_e mech, const char *fname)
{
apr_status_t rv;
@@ -1626,7 +1626,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
@@ -1668,7 +1668,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex,
#endif
if (rv == APR_SUCCESS && register_cleanup) {
- apr_pool_cleanup_register(pool, *pmutex, apr_proc_mutex_cleanup,
+ apr_pool_cleanup_register(pool, *pmutex, apr_proc_mutex_cleanup,
apr_pool_cleanup_null);
}
return rv;
diff --git a/locks/unix/thread_cond.c b/locks/unix/thread_cond.c
index 3c8e3170a..5a31a1f03 100644
--- a/locks/unix/thread_cond.c
+++ b/locks/unix/thread_cond.c
@@ -33,7 +33,7 @@ static apr_status_t thread_cond_cleanup(void *data)
}
#endif
return rv;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
apr_pool_t *pool)
diff --git a/locks/unix/thread_mutex.c b/locks/unix/thread_mutex.c
index 9cd643bec..10cb7bab6 100644
--- a/locks/unix/thread_mutex.c
+++ b/locks/unix/thread_mutex.c
@@ -32,7 +32,7 @@ static apr_status_t thread_mutex_cleanup(void *data)
}
#endif
return rv;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
unsigned int flags,
@@ -40,7 +40,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
{
apr_thread_mutex_t *new_mutex;
apr_status_t rv;
-
+
#ifndef HAVE_PTHREAD_MUTEX_RECURSIVE
if (flags & APR_THREAD_MUTEX_NESTED) {
return APR_ENOTIMPL;
@@ -53,18 +53,18 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE
if (flags & APR_THREAD_MUTEX_NESTED) {
pthread_mutexattr_t mattr;
-
+
rv = pthread_mutexattr_init(&mattr);
if (rv) return rv;
-
+
rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);
if (rv) {
pthread_mutexattr_destroy(&mattr);
return rv;
}
-
+
rv = pthread_mutex_init(&new_mutex->mutex, &mattr);
-
+
pthread_mutexattr_destroy(&mattr);
} else
#endif
@@ -74,7 +74,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
rv = pthread_mutexattr_init(&mattr);
if (rv) return rv;
-
+
rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_ERRORCHECK);
if (rv) {
pthread_mutexattr_destroy(&mattr);
@@ -351,7 +351,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_destroy(apr_thread_mutex_t *mutex)
if (rv == APR_SUCCESS) {
rv = rv2;
}
-
+
return rv;
}
diff --git a/locks/unix/thread_rwlock.c b/locks/unix/thread_rwlock.c
index 0f8b7a79f..91e39f72c 100644
--- a/locks/unix/thread_rwlock.c
+++ b/locks/unix/thread_rwlock.c
@@ -35,7 +35,7 @@ static apr_status_t thread_rwlock_cleanup(void *data)
}
#endif
return stat;
-}
+}
APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,
apr_pool_t *pool)
diff --git a/locks/win32/proc_mutex.c b/locks/win32/proc_mutex.c
index 79236237b..2cf994d94 100644
--- a/locks/win32/proc_mutex.c
+++ b/locks/win32/proc_mutex.c
@@ -67,7 +67,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex,
(*mutex)->pool = pool;
(*mutex)->handle = hMutex;
(*mutex)->fname = fname;
- apr_pool_cleanup_register((*mutex)->pool, *mutex,
+ apr_pool_cleanup_register((*mutex)->pool, *mutex,
proc_mutex_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -99,11 +99,11 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_child_init(apr_proc_mutex_t **mutex,
(*mutex)->pool = pool;
(*mutex)->handle = hMutex;
(*mutex)->fname = fname;
- apr_pool_cleanup_register((*mutex)->pool, *mutex,
+ apr_pool_cleanup_register((*mutex)->pool, *mutex,
proc_mutex_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_proc_mutex_lock(apr_proc_mutex_t *mutex)
{
DWORD rv;
@@ -124,7 +124,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_trylock(apr_proc_mutex_t *mutex)
if (rv == WAIT_OBJECT_0 || rv == WAIT_ABANDONED) {
return APR_SUCCESS;
- }
+ }
else if (rv == WAIT_TIMEOUT) {
return APR_EBUSY;
}
@@ -143,7 +143,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_timedlock(apr_proc_mutex_t *mutex,
}
if (rv == WAIT_OBJECT_0 || rv == WAIT_ABANDONED) {
return APR_SUCCESS;
- }
+ }
return apr_get_os_error();
}
@@ -197,7 +197,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(proc_mutex)
/* Implement OS-specific accessors defined in apr_portable.h */
-APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
+APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex,
apr_proc_mutex_t *pmutex,
apr_lockmech_e *mech)
{
diff --git a/memcache/apr_memcache.c b/memcache/apr_memcache.c
index cfaf5db92..5f8135c52 100644
--- a/memcache/apr_memcache.c
+++ b/memcache/apr_memcache.c
@@ -30,7 +30,7 @@ struct apr_memcache_conn_t
apr_bucket_brigade *bb;
apr_bucket_brigade *tb;
apr_memcache_server_t *ms;
-};
+};
/* Strings for Client Commands */
@@ -124,7 +124,7 @@ static apr_status_t make_server_dead(apr_memcache_t *mc, apr_memcache_server_t *
static apr_status_t make_server_live(apr_memcache_t *mc, apr_memcache_server_t *ms)
{
- ms->status = APR_MC_SERVER_LIVE;
+ ms->status = APR_MC_SERVER_LIVE;
return APR_SUCCESS;
}
@@ -145,7 +145,7 @@ APR_DECLARE(apr_status_t) apr_memcache_add_server(apr_memcache_t *mc, apr_memcac
static apr_status_t mc_version_ping(apr_memcache_server_t *ms);
-APR_DECLARE(apr_memcache_server_t *)
+APR_DECLARE(apr_memcache_server_t *)
apr_memcache_find_server_hash(apr_memcache_t *mc, const apr_uint32_t hash)
{
if (mc->server_func) {
@@ -154,9 +154,9 @@ apr_memcache_find_server_hash(apr_memcache_t *mc, const apr_uint32_t hash)
else {
return apr_memcache_find_server_hash_default(NULL, mc, hash);
}
-}
+}
-APR_DECLARE(apr_memcache_server_t *)
+APR_DECLARE(apr_memcache_server_t *)
apr_memcache_find_server_hash_default(void *baton, apr_memcache_t *mc,
const apr_uint32_t hash)
{
@@ -164,7 +164,7 @@ apr_memcache_find_server_hash_default(void *baton, apr_memcache_t *mc,
apr_uint32_t h = hash ? hash : 1;
apr_uint32_t i = 0;
apr_time_t curtime = 0;
-
+
if(mc->ntotal == 0) {
return NULL;
}
@@ -222,7 +222,7 @@ APR_DECLARE(apr_memcache_server_t *) apr_memcache_find_server(apr_memcache_t *mc
return NULL;
}
-static apr_status_t ms_find_conn(apr_memcache_server_t *ms, apr_memcache_conn_t **conn)
+static apr_status_t ms_find_conn(apr_memcache_server_t *ms, apr_memcache_conn_t **conn)
{
apr_status_t rv;
apr_bucket_alloc_t *balloc;
@@ -249,7 +249,7 @@ static apr_status_t ms_find_conn(apr_memcache_server_t *ms, apr_memcache_conn_t
return rv;
}
-static apr_status_t ms_bad_conn(apr_memcache_server_t *ms, apr_memcache_conn_t *conn)
+static apr_status_t ms_bad_conn(apr_memcache_server_t *ms, apr_memcache_conn_t *conn)
{
#if APR_HAS_THREADS
return apr_reslist_invalidate(ms->conns, conn);
@@ -258,7 +258,7 @@ static apr_status_t ms_bad_conn(apr_memcache_server_t *ms, apr_memcache_conn_t *
#endif
}
-static apr_status_t ms_release_conn(apr_memcache_server_t *ms, apr_memcache_conn_t *conn)
+static apr_status_t ms_release_conn(apr_memcache_server_t *ms, apr_memcache_conn_t *conn)
{
apr_pool_clear(conn->tp);
#if APR_HAS_THREADS
@@ -367,7 +367,7 @@ mc_conn_construct(void **conn_, void *params, apr_pool_t *pool)
else {
*conn_ = conn;
}
-
+
return rv;
}
@@ -378,26 +378,26 @@ mc_conn_destruct(void *conn_, void *params, apr_pool_t *pool)
apr_memcache_conn_t *conn = (apr_memcache_conn_t*)conn_;
struct iovec vec[2];
apr_size_t written;
-
+
/* send a quit message to the memcached server to be nice about it. */
vec[0].iov_base = MC_QUIT;
vec[0].iov_len = MC_QUIT_LEN;
vec[1].iov_base = MC_EOL;
vec[1].iov_len = MC_EOL_LEN;
-
+
/* Return values not checked, since we just want to make it go away. */
apr_socket_sendv(conn->sock, vec, 2, &written);
apr_socket_close(conn->sock);
apr_pool_destroy(conn->p);
-
+
return APR_SUCCESS;
}
#endif
-APR_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p,
- const char *host, apr_port_t port,
+APR_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p,
+ const char *host, apr_port_t port,
apr_uint32_t min, apr_uint32_t smax,
apr_uint32_t max, apr_uint32_t ttl,
apr_memcache_server_t **ms)
@@ -423,7 +423,7 @@ APR_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p,
return rv;
}
- rv = apr_reslist_create(&server->conns,
+ rv = apr_reslist_create(&server->conns,
min, /* hard minimum */
smax, /* soft maximum */
max, /* hard maximum */
@@ -450,11 +450,11 @@ APR_DECLARE(apr_status_t) apr_memcache_server_create(apr_pool_t *p,
APR_DECLARE(apr_status_t) apr_memcache_create(apr_pool_t *p,
apr_uint16_t max_servers, apr_uint32_t flags,
- apr_memcache_t **memcache)
+ apr_memcache_t **memcache)
{
apr_status_t rv = APR_SUCCESS;
apr_memcache_t *mc;
-
+
mc = apr_palloc(p, sizeof(apr_memcache_t));
mc->p = p;
mc->nalloc = max_servers;
@@ -473,7 +473,7 @@ APR_DECLARE(apr_status_t) apr_memcache_create(apr_pool_t *p,
* Garrett <srg@quick.com> and was gleaned from the PostgreSQL source
* tree via the files contrib/ltree/crc32.[ch] and from FreeBSD at
* src/usr.bin/cksum/crc32.c.
- */
+ */
static const apr_uint32_t crc32tab[256] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
@@ -542,21 +542,21 @@ static const apr_uint32_t crc32tab[256] = {
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
};
-APR_DECLARE(apr_uint32_t) apr_memcache_hash_crc32(void *baton,
+APR_DECLARE(apr_uint32_t) apr_memcache_hash_crc32(void *baton,
const char *data,
const apr_size_t data_len)
{
apr_uint32_t i;
apr_uint32_t crc;
crc = ~0;
-
+
for (i = 0; i < data_len; i++)
crc = (crc >> 8) ^ crc32tab[(crc ^ (data[i])) & 0xff];
-
+
return ~crc;
}
-APR_DECLARE(apr_uint32_t) apr_memcache_hash_default(void *baton,
+APR_DECLARE(apr_uint32_t) apr_memcache_hash_default(void *baton,
const char *data,
const apr_size_t data_len)
{
@@ -708,7 +708,7 @@ apr_memcache_add(apr_memcache_t *mc,
apr_uint32_t timeout,
apr_uint16_t flags)
{
- return storage_cmd_write(mc,
+ return storage_cmd_write(mc,
MC_ADD, MC_ADD_LEN,
key,
data, data_size,
@@ -771,7 +771,7 @@ apr_memcache_getp(apr_memcache_t *mc,
ms = apr_memcache_find_server_hash(mc, hash);
if (ms == NULL)
return APR_NOTFOUND;
-
+
rv = ms_find_conn(ms, &conn);
if (rv != APR_SUCCESS) {
@@ -835,7 +835,7 @@ apr_memcache_getp(apr_memcache_t *mc,
apr_memcache_disable_server(mc, ms);
return rv;
}
-
+
bbb = apr_brigade_split(conn->bb, e);
rv = apr_brigade_pflatten(conn->bb, baton, &len, p);
@@ -855,7 +855,7 @@ apr_memcache_getp(apr_memcache_t *mc,
*new_length = len - 2;
(*baton)[*new_length] = '\0';
}
-
+
rv = get_server_line(conn);
if (rv != APR_SUCCESS) {
ms_bad_conn(ms, conn);
@@ -900,7 +900,7 @@ apr_memcache_delete(apr_memcache_t *mc,
ms = apr_memcache_find_server_hash(mc, hash);
if (ms == NULL)
return APR_NOTFOUND;
-
+
rv = ms_find_conn(ms, &conn);
if (rv != APR_SUCCESS) {
@@ -969,7 +969,7 @@ static apr_status_t num_cmd_write(apr_memcache_t *mc,
ms = apr_memcache_find_server_hash(mc, hash);
if (ms == NULL)
return APR_NOTFOUND;
-
+
rv = ms_find_conn(ms, &conn);
if (rv != APR_SUCCESS) {
@@ -1032,7 +1032,7 @@ apr_memcache_incr(apr_memcache_t *mc,
MC_INCR,
MC_INCR_LEN,
key,
- inc,
+ inc,
new_value);
}
@@ -1047,7 +1047,7 @@ apr_memcache_decr(apr_memcache_t *mc,
MC_DECR,
MC_DECR_LEN,
key,
- inc,
+ inc,
new_value);
}
@@ -1090,7 +1090,7 @@ apr_memcache_version(apr_memcache_server_t *ms,
}
if (strncmp(MS_VERSION, conn->buffer, MS_VERSION_LEN) == 0) {
- *baton = apr_pstrmemdup(p, conn->buffer+MS_VERSION_LEN+1,
+ *baton = apr_pstrmemdup(p, conn->buffer+MS_VERSION_LEN+1,
conn->blen - MS_VERSION_LEN - 2);
rv = APR_SUCCESS;
}
@@ -1136,7 +1136,7 @@ apr_status_t mc_version_ping(apr_memcache_server_t *ms)
}
-APR_DECLARE(void)
+APR_DECLARE(void)
apr_memcache_add_multget_key(apr_pool_t *data_pool,
const char* key,
apr_hash_t **values)
@@ -1170,7 +1170,7 @@ static void mget_conn_result(int serverup,
{
apr_int32_t j;
apr_memcache_value_t* value;
-
+
apr_hash_set(server_queries, &ms, sizeof(ms), NULL);
if (connup) {
@@ -1182,12 +1182,12 @@ static void mget_conn_result(int serverup,
apr_memcache_disable_server(mc, ms);
}
}
-
+
for (j = 1; j < server_query->query_vec_count ; j+=2) {
if (server_query->query_vec[j].iov_base) {
value = apr_hash_get(values, server_query->query_vec[j].iov_base,
strlen(server_query->query_vec[j].iov_base));
-
+
if (value->status == APR_NOTFOUND) {
value->status = rv;
}
@@ -1295,7 +1295,7 @@ apr_memcache_multgetp(apr_memcache_t *mc,
/* create polling structures */
pollfds = apr_pcalloc(temp_pool, apr_hash_count(server_queries) * sizeof(apr_pollfd_t));
-
+
rv = apr_pollset_create(&pollset, apr_hash_count(server_queries), temp_pool,
APR_POLLSET_NOCOPY);
@@ -1462,26 +1462,26 @@ apr_memcache_multgetp(apr_memcache_t *mc,
}
} /* /for */
} /* /while */
-
+
query_hash_index = apr_hash_first(temp_pool, server_queries);
while (query_hash_index) {
void *v;
apr_hash_this(query_hash_index, NULL, NULL, &v);
server_query = v;
query_hash_index = apr_hash_next(query_hash_index);
-
+
conn = server_query->conn;
ms = server_query->ms;
-
+
mget_conn_result(TRUE, (rv == APR_SUCCESS), rv, mc, ms, conn,
server_query, values, server_queries);
continue;
}
-
+
apr_pollset_destroy(pollset);
apr_pool_clear(temp_pool);
return APR_SUCCESS;
-
+
}
@@ -1600,7 +1600,7 @@ static apr_time_t stat_read_rtime(apr_pool_t *p, char *buf, apr_size_t len)
}
/**
- * I got tired of Typing. Meh.
+ * I got tired of Typing. Meh.
*
* TODO: Convert it to static tables to make it cooler.
*/
@@ -1632,9 +1632,9 @@ static apr_time_t stat_read_rtime(apr_pool_t *p, char *buf, apr_size_t len)
#define mc_do_stat(name, type) \
if (mc_stat_cmp(name)) { \
stats-> name = mc_stat_ ## type ((STAT_ ## name ## _LEN)); \
- }
+ }
-static void update_stats(apr_pool_t *p, apr_memcache_conn_t *conn,
+static void update_stats(apr_pool_t *p, apr_memcache_conn_t *conn,
apr_memcache_stats_t *stats)
{
@@ -1665,7 +1665,7 @@ static void update_stats(apr_pool_t *p, apr_memcache_conn_t *conn,
APR_DECLARE(apr_status_t)
apr_memcache_stats(apr_memcache_server_t *ms,
apr_pool_t *p,
- apr_memcache_stats_t **stats)
+ apr_memcache_stats_t **stats)
{
apr_memcache_stats_t *ret;
apr_status_t rv;
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 8ed3830a1..9d2b7d533 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -95,9 +95,9 @@ static unsigned int boundary_size;
#define GUARDPAGE_SIZE 0
#endif /* APR_ALLOCATOR_GUARD_PAGES */
-/*
+/*
* Timing constants for killing subprocesses
- * There is a total 3-second delay between sending a SIGINT
+ * There is a total 3-second delay between sending a SIGINT
* and sending of the final SIGKILL.
* TIMEOUT_INTERVAL should be set to TIMEOUT_USECS / 64
* for the exponetial timeout alogrithm.
@@ -295,7 +295,7 @@ apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
* dividing its size by the boundary size
*/
index = (size >> BOUNDARY_INDEX) - 1;
-
+
if (index > APR_UINT32_MAX) {
return NULL;
}
@@ -1167,7 +1167,7 @@ APR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex(apr_pool_t **newpool,
abort_fn(APR_ENOMEM);
apr_allocator_destroy(pool_allocator);
-
+
return APR_ENOMEM;
}
}
@@ -2396,7 +2396,7 @@ APR_DECLARE(apr_abortfunc_t) apr_pool_abort_get(apr_pool_t *pool)
APR_DECLARE(apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool)
{
#ifdef NETWARE
- /* On NetWare, don't return the global_pool, return the application pool
+ /* On NetWare, don't return the global_pool, return the application pool
as the top most pool */
if (pool->parent == global_pool)
return pool;
@@ -2722,7 +2722,7 @@ APR_DECLARE(void) apr_pool_cleanup_for_exec(void)
APR_DECLARE(void) apr_pool_cleanup_for_exec(void)
{
/*
- * Don't need to do anything on NT or OS/2, because
+ * Don't need to do anything on NT or OS/2, because
* these platforms will spawn the new process - not
* fork for exec. All handles that are not inheritable,
* will be automajically closed. The only problem is
diff --git a/misc/netware/libprews.c b/misc/netware/libprews.c
index 9f9db5c9c..d8562d6d5 100644
--- a/misc/netware/libprews.c
+++ b/misc/netware/libprews.c
@@ -61,7 +61,7 @@ int _NonAppStart
WSADATA wsaData;
#endif
apr_status_t status;
-
+
NX_LOCK_INFO_ALLOC(liblock, "Per-Application Data Lock", 0);
gLibId = register_library(DisposeLibraryData);
diff --git a/misc/netware/rand.c b/misc/netware/rand.c
index a2baae7ec..4d4b30598 100644
--- a/misc/netware/rand.c
+++ b/misc/netware/rand.c
@@ -33,7 +33,7 @@ static int NXSeedRandomInternal( size_t width, void *seed )
srand(NXGetSystemTick());
init = 1;
}
-
+
if (width > 3)
{
do
@@ -42,21 +42,21 @@ static int NXSeedRandomInternal( size_t width, void *seed )
}
while ((width -= 4) > 3);
}
-
+
if (width > 0)
{
char *p = (char *) s;
u.x = rand();
-
+
while (width > 0)
*p++ = u.y[width--];
}
-
+
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
+APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
apr_size_t length)
{
if (NXSeedRandom(length, buf) != 0) {
diff --git a/misc/netware/start.c b/misc/netware/start.c
index e044a1022..3522ba946 100644
--- a/misc/netware/start.c
+++ b/misc/netware/start.c
@@ -53,7 +53,7 @@ int (*WSACleanupWithNLMHandle)( void *handle ) = NULL;
static int wsa_startup_with_handle (WORD wVersionRequested, LPWSADATA data, void *handle)
{
APP_DATA *app_data;
-
+
if (!(app_data = (APP_DATA*) get_app_data(gLibId)))
return APR_EGENERAL;
@@ -63,18 +63,18 @@ static int wsa_startup_with_handle (WORD wVersionRequested, LPWSADATA data, void
app_data->gs_event_rtag = AllocateResourceTag(handle, "WinSock Event", WS_WSAEVENT_SIGNATURE);
app_data->gs_pcp_rtag = AllocateResourceTag(handle, "WinSock C-Port", WS_CPORT_SIGNATURE);
- return WSAStartupRTags(wVersionRequested, data,
- app_data->gs_startup_rtag,
- app_data->gs_socket_rtag,
- app_data->gs_lookup_rtag,
- app_data->gs_event_rtag,
+ return WSAStartupRTags(wVersionRequested, data,
+ app_data->gs_startup_rtag,
+ app_data->gs_socket_rtag,
+ app_data->gs_lookup_rtag,
+ app_data->gs_event_rtag,
app_data->gs_pcp_rtag);
}
static int wsa_cleanup_with_handle (void *handle)
{
APP_DATA *app_data;
-
+
if (!(app_data = (APP_DATA*) get_app_data(gLibId)))
return APR_EGENERAL;
@@ -108,7 +108,7 @@ static int RegisterAppWithWinSock (void *nlm_handle)
if (LOBYTE(wsaData.wVersion) != WSAHighByte ||
HIBYTE(wsaData.wVersion) != WSALowByte) {
-
+
UnregisterAppWithWinSock (nlm_handle);
return APR_EEXIST;
}
@@ -119,8 +119,8 @@ static int RegisterAppWithWinSock (void *nlm_handle)
-APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
- const char * const * *argv,
+APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
+ const char * const * *argv,
const char * const * *env)
{
/* An absolute noop. At present, only Win32 requires this stub, but it's
@@ -143,9 +143,9 @@ APR_DECLARE(apr_status_t) apr_initialize(void)
}
/* apr_pool_initialize() is being called from the library
- startup code since all of the memory resources belong
+ startup code since all of the memory resources belong
to the library rather than the application. */
-
+
if (apr_pool_create(&pool, NULL) != APR_SUCCESS) {
return APR_ENOPOOL;
}
@@ -180,7 +180,7 @@ APR_DECLARE_NONSTD(void) apr_terminate(void)
return;
}
- /* apr_pool_terminate() is being called from the
+ /* apr_pool_terminate() is being called from the
library shutdown code since the memory resources
belong to the library rather than the application */
diff --git a/misc/unix/errorcodes.c b/misc/unix/errorcodes.c
index 08c7a31b7..1afd60823 100644
--- a/misc/unix/errorcodes.c
+++ b/misc/unix/errorcodes.c
@@ -170,17 +170,17 @@ static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
ULONG len;
char *pos;
int c;
-
+
if (err >= 10000 && err < 12000) { /* socket error codes */
return stuffbuffer(buf, bufsize,
strerror(apr_canonical_error(err+APR_OS_START_SYSERR)));
- }
+ }
else if (DosGetMessage(NULL, 0, message, HUGE_STRING_LEN, err,
"OSO001.MSG", &len) == 0) {
len--;
message[len] = 0;
pos = result;
-
+
if (len >= sizeof(result))
len = sizeof(result) - 1;
@@ -190,17 +190,17 @@ static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
c++;
*(pos++) = apr_isspace(message[c]) ? ' ' : message[c];
}
-
+
*pos = 0;
- }
+ }
else {
sprintf(result, "OS/2 error %d", err);
}
- /* Stuff the string into the caller supplied buffer, then return
+ /* Stuff the string into the caller supplied buffer, then return
* a pointer to it.
*/
- return stuffbuffer(buf, bufsize, result);
+ return stuffbuffer(buf, bufsize, result);
}
#elif defined(WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
@@ -267,7 +267,7 @@ static char *apr_os_strerror(char *buf, apr_size_t bufsize, apr_status_t errcode
apr_size_t len=0, i;
#ifndef NETWARE
- len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM
+ len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM
| FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
errcode,
@@ -311,10 +311,10 @@ static char *apr_os_strerror(char *buf, apr_size_t bufsize, apr_status_t errcode
}
#else
-/* On Unix, apr_os_strerror() handles error codes from the resolver
- * (h_errno).
+/* On Unix, apr_os_strerror() handles error codes from the resolver
+ * (h_errno).
*/
-static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
+static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
{
#ifdef HAVE_HSTRERROR
return stuffbuffer(buf, bufsize, hstrerror(err));
@@ -351,7 +351,7 @@ static char *native_strerror(apr_status_t statcode, char *buf,
apr_size_t bufsize)
{
if (strerror_r(statcode, buf, bufsize) < 0) {
- return stuffbuffer(buf, bufsize,
+ return stuffbuffer(buf, bufsize,
"APR does not understand this error code");
}
else {
@@ -384,7 +384,7 @@ static char *native_strerror(apr_status_t statcode, char *buf,
}
}
#else
-/* plain old strerror();
+/* plain old strerror();
* thread-safe on some platforms (e.g., Solaris, OS/390)
*/
static char *native_strerror(apr_status_t statcode, char *buf,
@@ -394,7 +394,7 @@ static char *native_strerror(apr_status_t statcode, char *buf,
if (err) {
return stuffbuffer(buf, bufsize, err);
} else {
- return stuffbuffer(buf, bufsize,
+ return stuffbuffer(buf, bufsize,
"APR does not understand this error code");
}
}
diff --git a/misc/unix/getopt.c b/misc/unix/getopt.c
index 24be3c82f..b6bcf1902 100644
--- a/misc/unix/getopt.c
+++ b/misc/unix/getopt.c
@@ -68,7 +68,7 @@ APR_DECLARE(apr_status_t) apr_getopt_init(apr_getopt_t **os, apr_pool_t *cont,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts,
+APR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts,
char *optch, const char **optarg)
{
const char *oli; /* option letter list index */
@@ -121,7 +121,7 @@ APR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts,
return (APR_BADARG);
}
if (os->errfn) {
- (os->errfn)(os->errarg,
+ (os->errfn)(os->errarg,
"%s: option requires an argument -- %c\n",
apr_filepath_name_get(*os->argv), os->opt);
}
@@ -182,7 +182,7 @@ static apr_status_t serr(apr_getopt_t *os, const char *err, const char *str,
apr_status_t status)
{
if (os->errfn)
- (os->errfn)(os->errarg, "%s: %s: %s\n",
+ (os->errfn)(os->errarg, "%s: %s: %s\n",
apr_filepath_name_get(*os->argv), err, str);
return status;
}
@@ -192,7 +192,7 @@ static apr_status_t cerr(apr_getopt_t *os, const char *err, int ch,
apr_status_t status)
{
if (os->errfn)
- (os->errfn)(os->errarg, "%s: %s: %c\n",
+ (os->errfn)(os->errarg, "%s: %s: %c\n",
apr_filepath_name_get(*os->argv), err, ch);
return status;
}
@@ -251,7 +251,7 @@ APR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os,
if (opts[i].has_arg) {
if (p[len] == '=') /* Argument inline */
*optarg = p + len + 1;
- else {
+ else {
if (os->ind >= os->argc) /* Argument missing */
return serr(os, "missing argument", p - 2, APR_BADARG);
else /* Argument in next arg */
@@ -270,7 +270,7 @@ APR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os,
os->ind = os->skip_start;
return APR_EOF;
}
- else
+ else
if (*p == '\0') /* Bare "-" is illegal */
return serr(os, "invalid option", p, APR_BADCH);
}
@@ -292,7 +292,7 @@ APR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os,
if (opts[i].has_arg) {
if (*p != '\0') /* Argument inline */
*optarg = p;
- else {
+ else {
if (os->ind >= os->argc) /* Argument missing */
return cerr(os, "missing argument", *optch, APR_BADARG);
else /* Argument in next arg */
diff --git a/misc/unix/otherchild.c b/misc/unix/otherchild.c
index a2fef19ac..be035a735 100644
--- a/misc/unix/otherchild.c
+++ b/misc/unix/otherchild.c
@@ -65,7 +65,7 @@ APR_DECLARE(void) apr_proc_other_child_register(apr_proc_t *proc,
ocr->data = data;
ocr->next = other_children;
other_children = ocr;
- apr_pool_cleanup_register(p, ocr->data, other_child_cleanup,
+ apr_pool_cleanup_register(p, ocr->data, other_child_cleanup,
apr_pool_cleanup_null);
}
@@ -107,7 +107,7 @@ APR_DECLARE(apr_status_t) apr_proc_other_child_alert(apr_proc_t *proc,
APR_DECLARE(void) apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,
int reason)
{
- /* Todo:
+ /* Todo:
* Implement code to detect if pipes are still alive.
*/
#ifdef WIN32
@@ -168,7 +168,7 @@ APR_DECLARE(void) apr_proc_other_child_refresh(apr_other_child_rec_t *ocr,
break;
}
#else /* ndef Win32 */
- pid_t waitret;
+ pid_t waitret;
int status;
if (ocr->proc == NULL)
diff --git a/misc/unix/rand.c b/misc/unix/rand.c
index c0567a667..4af86ee16 100644
--- a/misc/unix/rand.c
+++ b/misc/unix/rand.c
@@ -103,13 +103,13 @@ APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
return APR_SUCCESS;
}
-#endif
+#endif
#endif /* APR_HAS_OS_UUID */
#if APR_HAS_RANDOM
-APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
+APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
apr_size_t length)
{
#if defined(HAVE_EGD)
@@ -121,9 +121,9 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
* 0xMM (bytes granted) MM bytes
* 0x02 (read entropy blocking) 0xNN (bytes desired)
* [block] NN bytes
- * 0x03 (write entropy) 0xMM 0xLL (bits of entropy) 0xNN (bytes of data)
+ * 0x03 (write entropy) 0xMM 0xLL (bits of entropy) 0xNN (bytes of data)
* NN bytes
- * (no response - write only)
+ * (no response - write only)
* 0x04 (report PID)
* 0xMM (length of PID string, not null-terminated) MM chars
*/
@@ -139,7 +139,7 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
for (egdsockname = egd_sockets; *egdsockname && length > 0; egdsockname++) {
egd_path_len = strlen(*egdsockname);
-
+
if (egd_path_len > sizeof(addr.sun_path)) {
return APR_EINVAL;
}
@@ -147,8 +147,8 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
memset(&addr, 0, sizeof(struct sockaddr_un));
addr.sun_family = AF_UNIX;
memcpy(addr.sun_path, *egdsockname, egd_path_len);
- egd_addr_len = APR_OFFSETOF(struct sockaddr_un, sun_path) +
- egd_path_len;
+ egd_addr_len = APR_OFFSETOF(struct sockaddr_un, sun_path) +
+ egd_path_len;
egd_socket = socket(PF_UNIX, SOCK_STREAM, 0);
@@ -163,7 +163,7 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
continue;
}
- /* EGD can only return 255 bytes of data at a time. Silly. */
+ /* EGD can only return 255 bytes of data at a time. Silly. */
while (length > 0) {
apr_ssize_t srv;
req[0] = 2; /* We'll block for now. */
@@ -182,7 +182,7 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
close(egd_socket);
return APR_EGENERAL;
}
-
+
resp_expected = req[1];
srv = read(egd_socket, resp, resp_expected);
if (srv == -1) {
@@ -191,12 +191,12 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
close(egd_socket);
return bad_errno;
}
-
+
memcpy(curbuf, resp, srv);
curbuf += srv;
length -= srv;
}
-
+
shutdown(egd_socket, SHUT_RDWR);
close(egd_socket);
}
@@ -242,7 +242,7 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
if (fd == -1)
if ((fd = open(DEV_RANDOM, O_RDONLY)) == -1)
return errno;
-
+
do {
rc = read(fd, buf, length);
} while (rc == -1 && errno == EINTR);
@@ -261,7 +261,7 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char *buf,
length -= rc;
}
} while (length > 0);
-
+
close(fd);
#elif defined(OS2)
diff --git a/misc/unix/start.c b/misc/unix/start.c
index 8dcc1d989..8ebe2726e 100644
--- a/misc/unix/start.c
+++ b/misc/unix/start.c
@@ -24,8 +24,8 @@
#include "apr_arch_internal_time.h"
-APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
- const char * const * *argv,
+APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
+ const char * const * *argv,
const char * const * *env)
{
/* An absolute noop. At present, only Win32 requires this stub, but it's
@@ -54,7 +54,7 @@ APR_DECLARE(apr_status_t) apr_initialize(void)
if ((status = apr_pool_initialize()) != APR_SUCCESS)
return status;
-
+
if (apr_pool_create(&pool, NULL) != APR_SUCCESS) {
return APR_ENOPOOL;
}
@@ -80,7 +80,7 @@ APR_DECLARE_NONSTD(void) apr_terminate(void)
return;
}
apr_pool_terminate();
-
+
}
APR_DECLARE(void) apr_terminate2(void)
diff --git a/misc/win32/apr_app.c b/misc/win32/apr_app.c
index 6d29b1411..71f51d1d6 100644
--- a/misc/win32/apr_app.c
+++ b/misc/win32/apr_app.c
@@ -31,7 +31,7 @@
* _dbg_malloc/realloc is used in place of the usual API, in order
* to convince the MSVCRT that it created these entities. If we
* do not create them as _CRT_BLOCK entities, the crt will fault
- * on an assert. We are not worrying about the crt's locks here,
+ * on an assert. We are not worrying about the crt's locks here,
* since we are single threaded [so far].
*/
diff --git a/misc/win32/internal.c b/misc/win32/internal.c
index 783a8dc29..6582a5014 100644
--- a/misc/win32/internal.c
+++ b/misc/win32/internal.c
@@ -29,7 +29,7 @@
*/
-/* Shared by apr_app.c and start.c
+/* Shared by apr_app.c and start.c
*
* An internal apr function to convert an array of strings (either
* a counted or NULL terminated list, such as an argv[argc] or env[]
@@ -37,7 +37,7 @@
* These are allocated from the MSVCRT's _CRT_BLOCK to trick the system
* into trusting our store.
*/
-int apr_wastrtoastr(char const * const * *retarr,
+int apr_wastrtoastr(char const * const * *retarr,
wchar_t const * const *arr, int args)
{
apr_size_t elesize = 0;
diff --git a/misc/win32/misc.c b/misc/win32/misc.c
index 0ae3b6ff0..2e39cd6f6 100644
--- a/misc/win32/misc.c
+++ b/misc/win32/misc.c
@@ -25,7 +25,7 @@ APR_DECLARE_DATA apr_oslevel_e apr_os_level = APR_WIN_UNK;
apr_status_t apr_get_oslevel(apr_oslevel_e *level)
{
- if (apr_os_level == APR_WIN_UNK)
+ if (apr_os_level == APR_WIN_UNK)
{
OSVERSIONINFOEXW oslev;
oslev.dwOSVersionInfoSize = sizeof(oslev);
@@ -33,7 +33,7 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level)
return apr_get_os_error();
}
- if (oslev.dwPlatformId == VER_PLATFORM_WIN32_NT)
+ if (oslev.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
unsigned int servpack = oslev.wServicePackMajor;
@@ -94,7 +94,7 @@ apr_status_t apr_get_oslevel(apr_oslevel_e *level)
}
-/* This is the helper code to resolve late bound entry points
+/* This is the helper code to resolve late bound entry points
* missing from one or more releases of the Win32 API
*/
@@ -222,7 +222,7 @@ DWORD apr_wait_for_single_object(HANDLE handle, apr_interval_time_t timeout)
/* Declared in include/arch/win32/apr_dbg_win32_handles.h
*/
-APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(char* fn, HANDLE ha, char* fl, int ln,
+APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(char* fn, HANDLE ha, char* fl, int ln,
int nh, /* HANDLE hv, char *dsc */...)
{
static DWORD tlsid = 0xFFFFFFFF;
@@ -232,7 +232,7 @@ APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(char* fn, HANDLE ha, char* fl, int ln,
long seq;
DWORD wrote;
char *sbuf;
-
+
seq = (InterlockedIncrement)(&ctr);
if (tlsid == 0xFFFFFFFF) {
@@ -248,7 +248,7 @@ APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(char* fn, HANDLE ha, char* fl, int ln,
(GetModuleFileNameA)(NULL, sbuf, 250);
sprintf(strchr(sbuf, '\0'), ".%u",
(unsigned int)(GetCurrentProcessId)());
- fh = (CreateFileA)(sbuf, GENERIC_WRITE, 0, NULL,
+ fh = (CreateFileA)(sbuf, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, 0, NULL);
(InitializeCriticalSection)(&cs);
}
@@ -261,7 +261,7 @@ APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(char* fn, HANDLE ha, char* fl, int ln,
(EnterCriticalSection)(&cs);
(WriteFile)(fh, sbuf, (DWORD)strlen(sbuf), &wrote, NULL);
(LeaveCriticalSection)(&cs);
- }
+ }
else {
va_list a;
va_start(a,nh);
@@ -270,7 +270,7 @@ APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(char* fn, HANDLE ha, char* fl, int ln,
HANDLE *hv = va_arg(a, HANDLE*);
char *dsc = va_arg(a, char*);
if (strcmp(dsc, "Signaled") == 0) {
- if ((apr_ssize_t)ha >= STATUS_WAIT_0
+ if ((apr_ssize_t)ha >= STATUS_WAIT_0
&& (apr_ssize_t)ha < STATUS_ABANDONED_WAIT_0) {
hv += (apr_ssize_t)ha;
}
@@ -285,7 +285,7 @@ APR_DECLARE_NONSTD(HANDLE) apr_dbg_log(char* fn, HANDLE ha, char* fl, int ln,
}
(sprintf)(sbuf, "%p %08x %08x %s(%s) %s:%d\n",
*hv, (unsigned int)seq,
- (unsigned int)GetCurrentThreadId(),
+ (unsigned int)GetCurrentThreadId(),
fn, dsc, fl, ln);
(WriteFile)(fh, sbuf, (DWORD)strlen(sbuf), &wrote, NULL);
} while (--nh);
diff --git a/misc/win32/rand.c b/misc/win32/rand.c
index 855fbe4fd..38689eb15 100644
--- a/misc/win32/rand.c
+++ b/misc/win32/rand.c
@@ -46,7 +46,7 @@ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char * buf,
APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
{
- /* Note: this call doesn't actually require CoInitialize() first
+ /* Note: this call doesn't actually require CoInitialize() first
*
* XXX: we should scramble the bytes or some such to eliminate the
* possible misuse/abuse since uuid is based on the NIC address, and
diff --git a/misc/win32/utf8.c b/misc/win32/utf8.c
index cba5d4934..9fceea362 100644
--- a/misc/win32/utf8.c
+++ b/misc/win32/utf8.c
@@ -27,10 +27,10 @@
* used as the actual storage conventions by that archicture, these functions
* exist to transform or validate utf-16 strings into APR's 'char' type
* convention. It is left up to the operating system to determine the
- * validitity of the string, e.g. normative forms, in the context of
- * its native language support. Other file systems which support filename
+ * validitity of the string, e.g. normative forms, in the context of
+ * its native language support. Other file systems which support filename
* characters of 0x80-0xff but have no explicit requirement for Unicode
- * will find this function useful only for validating the character sequences
+ * will find this function useful only for validating the character sequences
* and rejecting poorly encoded utf-8 sequences.
*
* len utf-4 range (hex) utf-8 octet sequence (binary)
@@ -46,10 +46,10 @@
* For conversion into utf-16, the 4th form is limited in range to 0010 FFFF,
* and the final two forms are used only by full utf-32, per RFC 3629;
*
- * "Pairs of UCS-2 values between D800 and DFFF (surrogate pairs in
- * Unicode parlance), being actually UCS-4 characters transformed
- * through UTF-16, need special treatment: the UTF-16 transformation
- * must be undone, yielding a UCS-4 character that is then transformed
+ * "Pairs of UCS-2 values between D800 and DFFF (surrogate pairs in
+ * Unicode parlance), being actually UCS-4 characters transformed
+ * through UTF-16, need special treatment: the UTF-16 transformation
+ * must be undone, yielding a UCS-4 character that is then transformed
* as above."
*
* From RFC2781 UTF-16: the compressed ISO 10646 encoding bitmask
@@ -62,7 +62,7 @@
* Max U = 0000 00010000 11111111 11111111
*
* Also note ISO/IEC 10646:2014 Clause 9.4: "Because surrogate code points
- * are not UCS scalar values, UTF-32 code units in the range
+ * are not UCS scalar values, UTF-32 code units in the range
* 0000 D800-0000 DFFF are ill-formed" for future reference in adding any
* utf-32 accessor functions.
*
@@ -73,16 +73,16 @@
* apr_conv_utf16_to_utf8 out words:sizeof(in) / 2 <= Req <= sizeof(in) * 3 / 2
*/
-APR_DECLARE(apr_status_t) apr_conv_utf8_to_utf16(const char *in,
+APR_DECLARE(apr_status_t) apr_conv_utf8_to_utf16(const char *in,
apr_size_t *inbytes,
- apr_wchar_t *out,
+ apr_wchar_t *out,
apr_size_t *outwords)
{
apr_int64_t newch, mask;
apr_size_t expect, eating;
int ch;
-
- while (*inbytes && *outwords)
+
+ while (*inbytes && *outwords)
{
ch = (unsigned char)(*in++);
if (!(ch & 0200)) {
@@ -94,7 +94,7 @@ APR_DECLARE(apr_status_t) apr_conv_utf8_to_utf16(const char *in,
}
else
{
- if ((ch & 0300) != 0300) {
+ if ((ch & 0300) != 0300) {
/* Multibyte Continuation is out of place
*/
return APR_EINVAL;
@@ -147,7 +147,7 @@ APR_DECLARE(apr_status_t) apr_conv_utf8_to_utf16(const char *in,
/* Where the boolean (expect > 2) is true, we will need
* an extra word for the output.
*/
- if (*outwords < (apr_size_t)(expect > 2) + 1)
+ if (*outwords < (apr_size_t)(expect > 2) + 1)
break; /* buffer full */
while (expect--)
{
@@ -162,17 +162,17 @@ APR_DECLARE(apr_status_t) apr_conv_utf8_to_utf16(const char *in,
*
* now we need to fold to utf-16
*/
- if (newch < 0x10000)
+ if (newch < 0x10000)
{
--*outwords;
*(out++) = (apr_wchar_t) newch;
}
- else
+ else
{
*outwords -= 2;
newch -= 0x10000;
*(out++) = (apr_wchar_t) (0xD800 | (newch >> 10));
- *(out++) = (apr_wchar_t) (0xDC00 | (newch & 0x03FF));
+ *(out++) = (apr_wchar_t) (0xDC00 | (newch & 0x03FF));
}
}
}
@@ -183,17 +183,17 @@ APR_DECLARE(apr_status_t) apr_conv_utf8_to_utf16(const char *in,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_conv_utf16_to_utf8(const apr_wchar_t *in,
+APR_DECLARE(apr_status_t) apr_conv_utf16_to_utf8(const apr_wchar_t *in,
apr_size_t *inwords,
- char *out,
+ char *out,
apr_size_t *outbytes)
{
apr_int64_t newch, require;
apr_size_t need;
char *invout;
int ch;
-
- while (*inwords && *outbytes)
+
+ while (*inwords && *outbytes)
{
ch = (unsigned short)(*in++);
if (ch < 0x80)
@@ -202,7 +202,7 @@ APR_DECLARE(apr_status_t) apr_conv_utf16_to_utf8(const apr_wchar_t *in,
--*outbytes;
*(out++) = (unsigned char) ch;
}
- else
+ else
{
if ((ch & 0xFC00) == 0xDC00) {
/* Invalid Leading utf-16 Multiword Continuation Character
@@ -259,5 +259,5 @@ APR_DECLARE(apr_status_t) apr_conv_utf16_to_utf8(const apr_wchar_t *in,
/* Buffer full 'errors' aren't errors, the client must inspect both
* the inwords and outbytes values
*/
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
diff --git a/mmap/unix/common.c b/mmap/unix/common.c
index 1172f3c89..dcd71c691 100644
--- a/mmap/unix/common.c
+++ b/mmap/unix/common.c
@@ -17,7 +17,7 @@
/* common .c
* This file has any function that is truly common and platform
* neutral. Or at least that's the theory.
- *
+ *
* The header files are a problem so there are a few #ifdef's to take
* care of those.
*
@@ -35,7 +35,7 @@ APR_DECLARE(apr_status_t) apr_mmap_offset(void **addr, apr_mmap_t *mmap,
{
if (offset < 0 || (apr_size_t)offset > mmap->size)
return APR_EINVAL;
-
+
(*addr) = (char *) mmap->mm + offset;
return APR_SUCCESS;
}
diff --git a/mmap/unix/mmap.c b/mmap/unix/mmap.c
index cc0c838dc..66955bb97 100644
--- a/mmap/unix/mmap.c
+++ b/mmap/unix/mmap.c
@@ -76,9 +76,9 @@ static apr_status_t mmap_cleanup(void *themmap)
return errno;
}
-APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new,
- apr_file_t *file, apr_off_t offset,
- apr_size_t size, apr_int32_t flag,
+APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new,
+ apr_file_t *file, apr_off_t offset,
+ apr_size_t size, apr_int32_t flag,
apr_pool_t *cont)
{
void *mm;
@@ -101,11 +101,11 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new,
if (size == 0)
return APR_EINVAL;
-
+
if (file == NULL || file->filedes == -1 || file->buffered)
return APR_EBADF;
(*new) = (apr_mmap_t *)apr_pcalloc(cont, sizeof(apr_mmap_t));
-
+
#ifdef BEOS
/* XXX: mmap shouldn't really change the seek offset */
apr_file_seek(file, APR_SET, &offset);
@@ -126,7 +126,7 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new,
if (aid >= B_NO_ERROR)
read(file->filedes, mm, size);
-
+
(*new)->area = aid;
#else
diff --git a/mmap/win32/mmap.c b/mmap/win32/mmap.c
index d7a3186ce..d6dbf790e 100644
--- a/mmap/win32/mmap.c
+++ b/mmap/win32/mmap.c
@@ -51,7 +51,7 @@ static apr_status_t mmap_cleanup(void *themmap)
}
mm->mv = NULL;
}
- if (mm->mhandle)
+ if (mm->mhandle)
{
if (!CloseHandle(mm->mhandle))
{
@@ -80,7 +80,7 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new, apr_file_t *file,
if (size == 0)
return APR_EINVAL;
-
+
if (flag & APR_MMAP_WRITE)
fmaccess |= PAGE_READWRITE;
else if (flag & APR_MMAP_READ)
@@ -100,14 +100,14 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new, apr_file_t *file,
SYSTEM_INFO si;
GetSystemInfo(&si);
memblock = si.dwAllocationGranularity;
- }
-
+ }
+
*new = apr_pcalloc(cont, sizeof(apr_mmap_t));
pstart = (offset / memblock) * memblock;
poffset = offset - pstart;
psize = (apr_size_t)poffset + size;
/* The size of the CreateFileMapping object is the current size
- * of the size of the mmap object (e.g. file size), not the size
+ * of the size of the mmap object (e.g. file size), not the size
* of the mapped region!
*/
diff --git a/network_io/beos/sendrecv.c b/network_io/beos/sendrecv.c
index 201abf89c..e28512133 100644
--- a/network_io/beos/sendrecv.c
+++ b/network_io/beos/sendrecv.c
@@ -40,7 +40,7 @@ static apr_status_t wait_for_io_or_timeout(apr_socket_t *sock, int for_read)
}
srv = select(sock->socketdes + 1,
for_read ? &fdset : NULL,
- for_read ? NULL : &fdset,
+ for_read ? NULL : &fdset,
NULL,
tvptr);
/* TODO - timeout should be smaller on repeats of this loop */
@@ -61,15 +61,15 @@ APR_DECLARE(apr_status_t) apr_socket_send(apr_socket_t *sock, const char *buf,
apr_size_t *len)
{
apr_ssize_t rv;
-
+
do {
rv = send(sock->socketdes, buf, (*len), 0);
} while (rv == -1 && errno == EINTR);
if (rv == -1 && errno == EWOULDBLOCK && sock->timeout > 0) {
apr_int32_t snooze_val = SEND_WAIT;
- apr_int32_t zzz = 0;
-
+ apr_int32_t zzz = 0;
+
do {
rv = send(sock->socketdes, buf, (*len), 0);
if (rv == -1 && errno == EWOULDBLOCK){
@@ -91,11 +91,11 @@ APR_DECLARE(apr_status_t) apr_socket_send(apr_socket_t *sock, const char *buf,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_socket_recv(apr_socket_t *sock, char *buf,
+APR_DECLARE(apr_status_t) apr_socket_recv(apr_socket_t *sock, char *buf,
apr_size_t *len)
{
apr_ssize_t rv;
-
+
do {
rv = recv(sock->socketdes, buf, (*len), 0);
} while (rv == -1 && errno == EINTR);
@@ -124,7 +124,7 @@ APR_DECLARE(apr_status_t) apr_socket_recv(apr_socket_t *sock, char *buf,
/* BeOS doesn't have writev for sockets so we use the following instead...
*/
-APR_DECLARE(apr_status_t) apr_socket_sendv(apr_socket_t * sock,
+APR_DECLARE(apr_status_t) apr_socket_sendv(apr_socket_t * sock,
const struct iovec *vec,
apr_int32_t nvec, apr_size_t *len)
{
@@ -132,7 +132,7 @@ APR_DECLARE(apr_status_t) apr_socket_sendv(apr_socket_t * sock,
return apr_socket_send(sock, vec[0].iov_base, len);
}
-APR_DECLARE(apr_status_t) apr_socket_sendto(apr_socket_t *sock,
+APR_DECLARE(apr_status_t) apr_socket_sendto(apr_socket_t *sock,
apr_sockaddr_t *where,
apr_int32_t flags, const char *buf,
apr_size_t *len)
@@ -203,9 +203,9 @@ APR_DECLARE(apr_status_t) apr_socket_recvfrom(apr_sockaddr_t *from,
(*len) = 0;
return errno;
}
-
+
from->port = ntohs(from->sa.sin.sin_port);
-
+
(*len) = rv;
if (rv == 0)
return APR_EOF;
diff --git a/network_io/os2/sendrecv.c b/network_io/os2/sendrecv.c
index 4f67b3b31..fa2f63779 100644
--- a/network_io/os2/sendrecv.c
+++ b/network_io/os2/sendrecv.c
@@ -105,8 +105,8 @@ APR_DECLARE(apr_status_t) apr_socket_recv(apr_socket_t *sock, char *buf,
-APR_DECLARE(apr_status_t) apr_socket_sendv(apr_socket_t *sock,
- const struct iovec *vec,
+APR_DECLARE(apr_status_t) apr_socket_sendv(apr_socket_t *sock,
+ const struct iovec *vec,
apr_int32_t nvec, apr_size_t *len)
{
apr_status_t rv;
@@ -159,7 +159,7 @@ APR_DECLARE(apr_status_t) apr_socket_sendv(apr_socket_t *sock,
APR_DECLARE(apr_status_t) apr_socket_wait(apr_socket_t *sock, apr_wait_type_t direction)
{
int pollsocket = sock->socketdes;
- int wait_rc = select(&pollsocket, direction == APR_WAIT_READ,
+ int wait_rc = select(&pollsocket, direction == APR_WAIT_READ,
direction == APR_WAIT_WRITE, 0, sock->timeout / 1000);
if (wait_rc == 0) {
diff --git a/network_io/os2/sendrecv_udp.c b/network_io/os2/sendrecv_udp.c
index 1aea02c25..7bd414fea 100644
--- a/network_io/os2/sendrecv_udp.c
+++ b/network_io/os2/sendrecv_udp.c
@@ -48,7 +48,7 @@ APR_DECLARE(apr_status_t) apr_socket_sendto(apr_socket_t *sock,
int serrno;
do {
- rv = sendto(sock->socketdes, buf, (*len), flags,
+ rv = sendto(sock->socketdes, buf, (*len), flags,
(struct sockaddr*)&where->sa,
where->salen);
diff --git a/network_io/os2/sockets.c b/network_io/os2/sockets.c
index 89d987603..60223d177 100644
--- a/network_io/os2/sockets.c
+++ b/network_io/os2/sockets.c
@@ -115,13 +115,13 @@ APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new, int family, int
(*new)->timeout = -1;
(*new)->nonblock = FALSE;
- apr_pool_cleanup_register((*new)->pool, (void *)(*new),
+ apr_pool_cleanup_register((*new)->pool, (void *)(*new),
socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
-}
+}
-APR_DECLARE(apr_status_t) apr_socket_shutdown(apr_socket_t *thesocket,
+APR_DECLARE(apr_status_t) apr_socket_shutdown(apr_socket_t *thesocket,
apr_shutdown_how_e how)
{
if (shutdown(thesocket->socketdes, how) == 0) {
@@ -141,7 +141,7 @@ APR_DECLARE(apr_status_t) apr_socket_close(apr_socket_t *thesocket)
APR_DECLARE(apr_status_t) apr_socket_bind(apr_socket_t *sock,
apr_sockaddr_t *sa)
{
- if (bind(sock->socketdes,
+ if (bind(sock->socketdes,
(struct sockaddr *)&sa->sa,
sa->salen) == -1)
return APR_FROM_OS_ERROR(sock_errno());
@@ -155,7 +155,7 @@ APR_DECLARE(apr_status_t) apr_socket_bind(apr_socket_t *sock,
}
}
-APR_DECLARE(apr_status_t) apr_socket_listen(apr_socket_t *sock,
+APR_DECLARE(apr_status_t) apr_socket_listen(apr_socket_t *sock,
apr_int32_t backlog)
{
if (listen(sock->socketdes, backlog) == -1)
@@ -164,7 +164,7 @@ APR_DECLARE(apr_status_t) apr_socket_listen(apr_socket_t *sock,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
+APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
apr_socket_t *sock,
apr_pool_t *connection_context)
{
@@ -174,7 +174,7 @@ APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
(*new)->timeout = -1;
(*new)->nonblock = FALSE;
- (*new)->socketdes = accept(sock->socketdes,
+ (*new)->socketdes = accept(sock->socketdes,
(struct sockaddr *)&(*new)->remote_addr->sa,
&(*new)->remote_addr->salen);
@@ -191,7 +191,7 @@ APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
(*new)->local_addr->ipaddr_ptr = &(*new)->local_addr->sa.sin.sin_addr;
}
- apr_pool_cleanup_register((*new)->pool, (void *)(*new),
+ apr_pool_cleanup_register((*new)->pool, (void *)(*new),
socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -199,14 +199,14 @@ APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
APR_DECLARE(apr_status_t) apr_socket_connect(apr_socket_t *sock,
apr_sockaddr_t *sa)
{
- if ((connect(sock->socketdes, (struct sockaddr *)&sa->sa.sin,
+ if ((connect(sock->socketdes, (struct sockaddr *)&sa->sa.sin,
sa->salen) < 0) &&
(sock_errno() != SOCEINPROGRESS)) {
return APR_FROM_OS_ERROR(sock_errno());
}
else {
int namelen = sizeof(sock->local_addr->sa.sin);
- getsockname(sock->socketdes, (struct sockaddr *)&sock->local_addr->sa.sin,
+ getsockname(sock->socketdes, (struct sockaddr *)&sock->local_addr->sa.sin,
&namelen);
sock->remote_addr = sa;
return APR_SUCCESS;
@@ -262,8 +262,8 @@ APR_DECLARE(apr_status_t) apr_os_sock_get(apr_os_sock_t *thesock, apr_socket_t *
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
- apr_os_sock_info_t *os_sock_info,
+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)
{
alloc_socket(apr_sock, cont);
@@ -271,8 +271,8 @@ APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
(*apr_sock)->timeout = -1;
(*apr_sock)->socketdes = *os_sock_info->os_sock;
if (os_sock_info->local) {
- memcpy(&(*apr_sock)->local_addr->sa.sin,
- os_sock_info->local,
+ memcpy(&(*apr_sock)->local_addr->sa.sin,
+ os_sock_info->local,
(*apr_sock)->local_addr->salen);
/* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
(*apr_sock)->local_addr->port = ntohs((*apr_sock)->local_addr->sa.sin.sin_port);
@@ -281,7 +281,7 @@ APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
(*apr_sock)->local_port_unknown = (*apr_sock)->local_interface_unknown = 1;
}
if (os_sock_info->remote) {
- memcpy(&(*apr_sock)->remote_addr->sa.sin,
+ memcpy(&(*apr_sock)->remote_addr->sa.sin,
os_sock_info->remote,
(*apr_sock)->remote_addr->salen);
/* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
@@ -290,8 +290,8 @@ APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
else {
(*apr_sock)->remote_addr_unknown = 1;
}
-
- apr_pool_cleanup_register((*apr_sock)->pool, (void *)(*apr_sock),
+
+ apr_pool_cleanup_register((*apr_sock)->pool, (void *)(*apr_sock),
socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
diff --git a/network_io/os2/sockopt.c b/network_io/os2/sockopt.c
index 0cce8d78e..80da886b4 100644
--- a/network_io/os2/sockopt.c
+++ b/network_io/os2/sockopt.c
@@ -29,7 +29,7 @@
#include <sys/so_ioctl.h>
-APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock,
+APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock,
apr_interval_time_t t)
{
apr_status_t rv = APR_SUCCESS;
@@ -44,14 +44,14 @@ APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock,
}
else if (t != 0 && sock->timeout == 0) {
rv = apr_socket_opt_set(sock, APR_SO_NONBLOCK, 0);
- }
+ }
sock->timeout = t;
return rv;
}
-APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
+APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
apr_int32_t opt, apr_int32_t on)
{
int one;
@@ -110,7 +110,7 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
}
-APR_DECLARE(apr_status_t) apr_socket_timeout_get(apr_socket_t *sock,
+APR_DECLARE(apr_status_t) apr_socket_timeout_get(apr_socket_t *sock,
apr_interval_time_t *t)
{
*t = sock->timeout;
@@ -118,7 +118,7 @@ APR_DECLARE(apr_status_t) apr_socket_timeout_get(apr_socket_t *sock,
}
-APR_DECLARE(apr_status_t) apr_socket_opt_get(apr_socket_t *sock,
+APR_DECLARE(apr_status_t) apr_socket_opt_get(apr_socket_t *sock,
apr_int32_t opt, apr_int32_t *on)
{
switch(opt) {
@@ -143,7 +143,7 @@ APR_DECLARE(apr_status_t) apr_socket_atmark(apr_socket_t *sock, int *atmark)
}
-APR_DECLARE(apr_status_t) apr_gethostname(char *buf, apr_int32_t len,
+APR_DECLARE(apr_status_t) apr_gethostname(char *buf, apr_int32_t len,
apr_pool_t *cont)
{
if (gethostname(buf, len) == -1) {
diff --git a/network_io/unix/multicast.c b/network_io/unix/multicast.c
index a8c85ce69..98d949818 100644
--- a/network_io/unix/multicast.c
+++ b/network_io/unix/multicast.c
@@ -47,15 +47,15 @@ static void fill_mip_v4(struct ip_mreq *mip, apr_sockaddr_t *mcast,
static unsigned int find_if_index(const apr_sockaddr_t *iface)
{
unsigned int index = 0;
-#if defined(HAVE_GETIFADDRS) && APR_HAVE_IFADDRS_H && APR_HAVE_IPV6
+#if defined(HAVE_GETIFADDRS) && APR_HAVE_IFADDRS_H && APR_HAVE_IPV6
struct ifaddrs *ifp, *ifs;
/**
- * TODO: getifaddrs is only portable to *BSD and OS X. Using ioctl
+ * TODO: getifaddrs is only portable to *BSD and OS X. Using ioctl
* and SIOCGIFCONF is needed for Linux/Solaris support.
- *
- * There is a wrapper that takes the messy ioctl interface into
- * getifaddrs. The license is acceptable, but, It is a fairly large
+ *
+ * There is a wrapper that takes the messy ioctl interface into
+ * getifaddrs. The license is acceptable, but, It is a fairly large
* chunk of code.
*/
if (getifaddrs(&ifs) != 0) {
@@ -129,7 +129,7 @@ static apr_status_t do_mcast(int type, apr_socket_t *sock,
#ifdef GROUP_FILTER_SIZE
if (sock_is_ipv4(sock)) {
ip_proto = IPPROTO_IP;
- }
+ }
#if APR_HAVE_IPV6
else if (sock_is_ipv6(sock)) {
ip_proto = IPPROTO_IPV6;
diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
index 6721a66e9..34e4b8e45 100644
--- a/network_io/unix/sendrecv.c
+++ b/network_io/unix/sendrecv.c
@@ -27,11 +27,11 @@
#include <osreldate.h>
#endif
-apr_status_t apr_socket_send(apr_socket_t *sock, const char *buf,
+apr_status_t apr_socket_send(apr_socket_t *sock, const char *buf,
apr_size_t *len)
{
apr_ssize_t rv;
-
+
if (sock->options & APR_INCOMPLETE_WRITE) {
sock->options &= ~APR_INCOMPLETE_WRITE;
goto do_select;
@@ -41,7 +41,7 @@ apr_status_t apr_socket_send(apr_socket_t *sock, const char *buf,
rv = write(sock->socketdes, buf, (*len));
} while (rv == -1 && errno == EINTR);
- while (rv == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)
+ while (rv == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)
&& (sock->timeout > 0)) {
apr_status_t arv;
do_select:
@@ -116,8 +116,8 @@ apr_status_t apr_socket_sendto(apr_socket_t *sock, apr_sockaddr_t *where,
apr_ssize_t rv;
do {
- rv = sendto(sock->socketdes, buf, (*len), flags,
- (const struct sockaddr*)&where->sa,
+ rv = sendto(sock->socketdes, buf, (*len), flags,
+ (const struct sockaddr*)&where->sa,
where->salen);
} while (rv == -1 && errno == EINTR);
@@ -144,15 +144,15 @@ apr_status_t apr_socket_sendto(apr_socket_t *sock, apr_sockaddr_t *where,
}
apr_status_t apr_socket_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock,
- apr_int32_t flags, char *buf,
+ apr_int32_t flags, char *buf,
apr_size_t *len)
{
apr_ssize_t rv;
-
+
from->salen = sizeof(from->sa);
do {
- rv = recvfrom(sock->socketdes, buf, (*len), flags,
+ rv = recvfrom(sock->socketdes, buf, (*len), flags,
(struct sockaddr*)&from->sa, &from->salen);
} while (rv == -1 && errno == EINTR);
@@ -207,7 +207,7 @@ apr_status_t apr_socket_sendv(apr_socket_t * sock, const struct iovec *vec,
rv = writev(sock->socketdes, vec, nvec);
} while (rv == -1 && errno == EINTR);
- while ((rv == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
+ while ((rv == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
&& (sock->timeout > 0)) {
apr_status_t arv;
do_select:
@@ -279,12 +279,12 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
/* 64-bit apr_off_t but no sendfile64(): fail if trying to send
* past the 2Gb limit. */
off_t off;
-
+
if ((apr_int64_t)*offset + bytes_to_send > INT_MAX) {
*len = 0;
return EINVAL;
}
-
+
off = *offset;
#else
@@ -325,8 +325,8 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
return arv;
}
- /* If this was a partial write and we aren't doing timeouts,
- * return now with the partial byte count; this is a non-blocking
+ /* If this was a partial write and we aren't doing timeouts,
+ * return now with the partial byte count; this is a non-blocking
* socket.
*/
total_hdrbytes = 0;
@@ -353,7 +353,7 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
bytes_to_send); /* number of bytes to send */
} while (rv == -1 && errno == EINTR);
- while ((rv == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
+ while ((rv == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
&& (sock->timeout > 0)) {
do_select:
arv = apr_wait_for_io_or_timeout(NULL, sock, 0);
@@ -388,8 +388,8 @@ do_select:
arv = APR_SUCCESS;
}
if (rv > 0) {
-
- /* If this was a partial write, return now with the
+
+ /* If this was a partial write, return now with the
* partial byte count; this is a non-blocking socket.
*/
@@ -400,7 +400,7 @@ do_select:
}
else {
/* If the file got smaller mid-request, eventually the offset
- * becomes equal to the new file size and the kernel returns 0.
+ * becomes equal to the new file size and the kernel returns 0.
* Make this an error so the caller knows to log something and
* exit.
*/
@@ -446,8 +446,8 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
hdtr = &no_hdtr;
}
- /* OS X can send the headers/footers as part of the system call,
- * but how it counts bytes isn't documented properly. We use
+ /* OS X can send the headers/footers as part of the system call,
+ * but how it counts bytes isn't documented properly. We use
* apr_socket_sendv() instead.
*/
if (hdtr->numheaders > 0) {
@@ -566,9 +566,9 @@ apr_status_t apr_socket_sendfile(apr_socket_t * sock, apr_file_t * file,
#if defined(__FreeBSD_version) && __FreeBSD_version < 460001
else if (hdtr->numheaders) {
- /* On early versions of FreeBSD sendfile, the number of bytes to send
- * must include the length of the headers. Don't look at the man page
- * for this :( Instead, look at the logic in
+ /* On early versions of FreeBSD sendfile, the number of bytes to send
+ * must include the length of the headers. Don't look at the man page
+ * for this :( Instead, look at the logic in
* src/sys/kern/uipc_syscalls::sendfile().
*
* This was fixed in the middle of 4.6-STABLE
@@ -635,7 +635,7 @@ apr_status_t apr_socket_sendfile(apr_socket_t * sock, apr_file_t * file,
}
*len += nbytes;
}
- }
+ }
else {
/* just trailer bytes... use writev()
*/
@@ -673,7 +673,7 @@ apr_status_t apr_socket_sendfile(apr_socket_t * sock, apr_file_t * file,
/* ssize_t sendfile(int s, int fd, off_t offset, size_t nbytes,
* const struct iovec *hdtrl, int flags);
*
- * nbytes is the number of bytes to send just from the file; as with FreeBSD,
+ * nbytes is the number of bytes to send just from the file; as with FreeBSD,
* if nbytes == 0, the rest of the file (from offset) is sent
*/
@@ -728,7 +728,7 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
headerlen = 0;
for (i = 0; i < hdtr->numheaders; i++) {
headerlen += hdtr->headers[i].iov_len;
- }
+ }
/* XXX: BUHHH? wow, what a memory leak! */
headerbuf = hdtrarray[0].iov_base = apr_palloc(sock->pool, headerlen);
@@ -780,7 +780,7 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
}
} while (rc == -1 && errno == EINTR);
- while ((rc == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
+ while ((rc == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
&& (sock->timeout > 0)) {
apr_status_t arv = apr_wait_for_io_or_timeout(NULL, sock, 0);
@@ -927,7 +927,7 @@ apr_status_t apr_socket_sendfile(apr_socket_t * sock, apr_file_t * file,
flags); /* flags */
} while (rv == -1 && errno == EINTR);
- while ((rv == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
+ while ((rv == -1) && (errno == EAGAIN || errno == EWOULDBLOCK)
&& (sock->timeout > 0)) {
do_select:
arv = apr_wait_for_io_or_timeout(NULL, sock, 0);
@@ -957,7 +957,7 @@ do_select:
}
if ((sock->timeout > 0)
- && (parms.bytes_sent
+ && (parms.bytes_sent
< (parms.file_bytes + parms.header_length + parms.trailer_length))) {
sock->options |= APR_INCOMPLETE_WRITE;
}
@@ -970,7 +970,7 @@ do_select:
* hang the machine and the only way to fix it is a reboot.
*/
#elif defined(HAVE_SENDFILEV)
-/* Solaris 8's sendfilev() interface
+/* Solaris 8's sendfilev() interface
*
* SFV_FD_SELF refers to our memory space.
*
@@ -1027,7 +1027,7 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
sfv[curvec].sfv_fd = file->filedes;
sfv[curvec].sfv_flag = 0;
sfv[curvec].sfv_off = *offset;
- sfv[curvec].sfv_len = *len;
+ sfv[curvec].sfv_len = *len;
requested_len += sfv[curvec].sfv_len;
curvec++;
@@ -1056,14 +1056,14 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
return arv;
}
}
-
+
/* Actually do the sendfilev
*
* Solaris may return -1/EAGAIN even if it sent bytes on a non-block sock.
*
- * If no bytes were originally sent (nbytes == 0) and we are on a TIMEOUT
- * socket (which as far as the OS is concerned is a non-blocking socket),
- * we want to retry after waiting for the other side to read the data (as
+ * If no bytes were originally sent (nbytes == 0) and we are on a TIMEOUT
+ * socket (which as far as the OS is concerned is a non-blocking socket),
+ * we want to retry after waiting for the other side to read the data (as
* determined by poll). Once it is clear to send, we want to retry
* sending the sendfilevec_t once more.
*/
@@ -1087,7 +1087,7 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
return t;
}
- arv = 1;
+ arv = 1;
repeat = 1;
}
}
@@ -1115,7 +1115,7 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
}
#else
#error APR has detected sendfile on your system, but nobody has written a
-#error version of it for APR yet. To get past this, either write
+#error version of it for APR yet. To get past this, either write
#error apr_socket_sendfile or change APR_HAS_SENDFILE in apr.h to 0.
#endif /* __linux__, __FreeBSD__, __DragonFly__, __HPUX__, _AIX, __MVS__,
Tru64/OSF1 */
diff --git a/network_io/unix/sockaddr.c b/network_io/unix/sockaddr.c
index 16712fec2..d3bce601c 100644
--- a/network_io/unix/sockaddr.c
+++ b/network_io/unix/sockaddr.c
@@ -122,7 +122,7 @@ APR_DECLARE(apr_status_t) apr_sockaddr_ip_getbuf(char *buf, apr_size_t buflen,
}
#if APR_HAVE_IPV6
- if (sockaddr->family == AF_INET6
+ if (sockaddr->family == AF_INET6
&& IN6_IS_ADDR_V4MAPPED((struct in6_addr *)sockaddr->ipaddr_ptr)
&& buflen > strlen("::ffff:")) {
/* This is an IPv4-mapped IPv6 address; drop the leading
@@ -153,7 +153,7 @@ APR_DECLARE(apr_status_t) apr_sockaddr_ip_getbuf(char *buf, apr_size_t buflen,
*p++ = '%';
memcpy(p, scbuf, strlen(scbuf) + 1);
}
- }
+ }
#endif /* HAVE_IF_INDEXTONAME */
#endif /* APR_HAVE_IPV6 */
@@ -283,9 +283,9 @@ APR_DECLARE(apr_status_t) apr_parse_addr_port(char **addr,
/* now handle the hostname */
addrlen = lastchar - str + 1;
-/* XXX we don't really have to require APR_HAVE_IPV6 for this;
+/* XXX we don't really have to require APR_HAVE_IPV6 for this;
* just pass char[] for ipaddr (so we don't depend on struct in6_addr)
- * and always define APR_INET6
+ * and always define APR_INET6
*/
#if APR_HAVE_IPV6
if (*str == '[') {
@@ -320,10 +320,10 @@ APR_DECLARE(apr_status_t) apr_parse_addr_port(char **addr,
return APR_EINVAL;
}
}
- else
+ else
#endif
{
- /* XXX If '%' is not a valid char in a DNS name, we *could* check
+ /* XXX If '%' is not a valid char in a DNS name, we *could* check
* for bogus scope ids first.
*/
*addr = apr_pstrmemdup(p, str, addrlen);
@@ -335,13 +335,13 @@ APR_DECLARE(apr_status_t) apr_parse_addr_port(char **addr,
static apr_status_t call_resolver(apr_sockaddr_t **sa,
const char *hostname, apr_int32_t family,
- apr_port_t port, apr_int32_t flags,
+ apr_port_t port, apr_int32_t flags,
apr_pool_t *p)
{
struct addrinfo hints, *ai, *ai_list;
apr_sockaddr_t *prev_sa;
int error;
- char *servname = NULL;
+ char *servname = NULL;
memset(&hints, 0, sizeof(hints));
hints.ai_family = family;
@@ -356,16 +356,16 @@ static apr_status_t call_resolver(apr_sockaddr_t **sa,
#endif
#ifdef __MVS__
- /* z/OS will not return IPv4 address under AF_UNSPEC if any IPv6 results
- * are returned, w/o AI_ALL.
+ /* z/OS will not return IPv4 address under AF_UNSPEC if any IPv6 results
+ * are returned, w/o AI_ALL.
*/
- if (family == APR_UNSPEC) {
+ if (family == APR_UNSPEC) {
hints.ai_flags |= AI_ALL;
}
#endif
if(hostname == NULL) {
-#ifdef AI_PASSIVE
+#ifdef AI_PASSIVE
/* If hostname is NULL, assume we are trying to bind to all
* interfaces. */
hints.ai_flags |= AI_PASSIVE;
@@ -426,11 +426,11 @@ static apr_status_t call_resolver(apr_sockaddr_t **sa,
if (error == EAI_SYSTEM) {
return errno ? errno : APR_EGENERAL;
}
- else
+ else
{
/* issues with representing this with APR's error scheme:
- * glibc uses negative values for these numbers, perhaps so
- * they don't conflict with h_errno values... Tru64 uses
+ * glibc uses negative values for these numbers, perhaps so
+ * they don't conflict with h_errno values... Tru64 uses
* positive values which conflict with h_errno values
*/
#if defined(NEGATIVE_EAI)
@@ -491,9 +491,9 @@ static apr_status_t call_resolver(apr_sockaddr_t **sa,
return APR_SUCCESS;
}
-static apr_status_t find_addresses(apr_sockaddr_t **sa,
+static apr_status_t find_addresses(apr_sockaddr_t **sa,
const char *hostname, apr_int32_t family,
- apr_port_t port, apr_int32_t flags,
+ apr_port_t port, apr_int32_t flags,
apr_pool_t *p)
{
if (flags & APR_IPV4_ADDR_OK) {
@@ -525,9 +525,9 @@ static apr_status_t find_addresses(apr_sockaddr_t **sa,
#else /* end of HAVE_GETADDRINFO code */
-static apr_status_t find_addresses(apr_sockaddr_t **sa,
+static apr_status_t find_addresses(apr_sockaddr_t **sa,
const char *hostname, apr_int32_t family,
- apr_port_t port, apr_int32_t flags,
+ apr_port_t port, apr_int32_t flags,
apr_pool_t *p)
{
struct hostent *hp;
@@ -573,7 +573,7 @@ static apr_status_t find_addresses(apr_sockaddr_t **sa,
#else
#if defined(GETHOSTBYNAME_R_GLIBC2)
/* Linux glibc2+ */
- gethostbyname_r(hostname, &hs, tmp, GETHOSTBYNAME_BUFLEN - 1,
+ gethostbyname_r(hostname, &hs, tmp, GETHOSTBYNAME_BUFLEN - 1,
&hp, &hosterror);
#else
/* Solaris, Irix et alia */
@@ -632,7 +632,7 @@ static apr_status_t find_addresses(apr_sockaddr_t **sa,
#endif /* end of !HAVE_GETADDRINFO code */
APR_DECLARE(apr_status_t) apr_sockaddr_info_get(apr_sockaddr_t **sa,
- const char *hostname,
+ const char *hostname,
apr_int32_t family, apr_port_t port,
apr_int32_t flags, apr_pool_t *p)
{
@@ -791,7 +791,7 @@ APR_DECLARE(apr_status_t) apr_getnameinfo(char **hostname,
return errno + APR_OS_START_SYSERR;
}
}
- else
+ else
#endif
{
#if defined(NEGATIVE_EAI)
@@ -800,7 +800,7 @@ APR_DECLARE(apr_status_t) apr_getnameinfo(char **hostname,
return rc + APR_OS_START_EAIERR; /* return the EAI_ error */
}
}
- *hostname = sockaddr->hostname = apr_pstrdup(sockaddr->pool,
+ *hostname = sockaddr->hostname = apr_pstrdup(sockaddr->pool,
tmphostname);
return APR_SUCCESS;
#else
@@ -816,18 +816,18 @@ APR_DECLARE(apr_status_t) apr_getnameinfo(char **hostname,
#if defined(GETHOSTBYNAME_R_HOSTENT_DATA)
/* AIX, HP/UX, D/UX et alia */
- gethostbyaddr_r((char *)&sockaddr->sa.sin.sin_addr,
+ gethostbyaddr_r((char *)&sockaddr->sa.sin.sin_addr,
sizeof(struct in_addr), AF_INET, &hs, &hd);
hptr = &hs;
#else
#if defined(GETHOSTBYNAME_R_GLIBC2)
/* Linux glibc2+ */
- gethostbyaddr_r((char *)&sockaddr->sa.sin.sin_addr,
+ gethostbyaddr_r((char *)&sockaddr->sa.sin.sin_addr,
sizeof(struct in_addr), AF_INET,
&hs, tmp, GETHOSTBYNAME_BUFLEN - 1, &hptr, &hosterror);
#else
/* Solaris, Irix et alia */
- hptr = gethostbyaddr_r((char *)&sockaddr->sa.sin.sin_addr,
+ hptr = gethostbyaddr_r((char *)&sockaddr->sa.sin.sin_addr,
sizeof(struct in_addr), AF_INET,
&hs, tmp, GETHOSTBYNAME_BUFLEN, &hosterror);
#endif /* !defined(GETHOSTBYNAME_R_GLIBC2) */
@@ -838,7 +838,7 @@ APR_DECLARE(apr_status_t) apr_getnameinfo(char **hostname,
#endif /* !defined(GETHOSTBYNAME_R_HOSTENT_DATA) */
#else
struct hostent *hptr;
- hptr = gethostbyaddr((char *)&sockaddr->sa.sin.sin_addr,
+ hptr = gethostbyaddr((char *)&sockaddr->sa.sin.sin_addr,
sizeof(struct in_addr), AF_INET);
#endif
@@ -1046,7 +1046,7 @@ static apr_status_t parse_ip(apr_ipsubnet_t *ipsub, const char *ipstr, int netwo
/* supported flavors of IP:
*
* . IPv6 numeric address string (e.g., "fe80::1")
- *
+ *
* IMPORTANT: Don't store IPv4-mapped IPv6 address as an IPv6 address.
*
* . IPv4 numeric address string (e.g., "127.0.0.1")
@@ -1093,7 +1093,7 @@ static int looks_like_ip(const char *ipstr)
if (strlen(ipstr) == 0) {
return 0;
}
-
+
if (strchr(ipstr, ':')) {
/* definitely not a hostname; assume it is intended to be an IPv6 address */
return 1;
@@ -1118,14 +1118,14 @@ static void fix_subnet(apr_ipsubnet_t *ipsub)
}
/* be sure not to store any IPv4 address as a v4-mapped IPv6 address */
-APR_DECLARE(apr_status_t) apr_ipsubnet_create(apr_ipsubnet_t **ipsub, const char *ipstr,
+APR_DECLARE(apr_status_t) apr_ipsubnet_create(apr_ipsubnet_t **ipsub, const char *ipstr,
const char *mask_or_numbits, apr_pool_t *p)
{
apr_status_t rv;
char *endptr;
long bits, maxbits = 32;
- /* filter out stuff which doesn't look remotely like an IP address; this helps
+ /* filter out stuff which doesn't look remotely like an IP address; this helps
* callers like mod_access which have a syntax allowing hostname or IP address;
* APR_EINVAL tells the caller that it was probably not intended to be an IP
* address
@@ -1227,7 +1227,7 @@ APR_DECLARE(apr_status_t) apr_sockaddr_zone_set(apr_sockaddr_t *sa,
return APR_ENOTIMPL;
#else
unsigned int idx;
-
+
if (sa->family != APR_INET6
|| !IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)sa->ipaddr_ptr)) {
return APR_EBADIP;
@@ -1266,7 +1266,7 @@ APR_DECLARE(apr_status_t) apr_sockaddr_zone_get(const apr_sockaddr_t *sa,
#else
if (sa->family != APR_INET6 || !sa->sa.sin6.sin6_scope_id) {
return APR_EBADIP;
- }
+ }
if (name) {
char *buf = apr_palloc(p, IF_NAMESIZE);
@@ -1276,7 +1276,7 @@ APR_DECLARE(apr_status_t) apr_sockaddr_zone_get(const apr_sockaddr_t *sa,
}
if (id) *id = sa->sa.sin6.sin6_scope_id;
-
+
return APR_SUCCESS;
#endif
}
diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c
index e95ce2c7d..be992d4f7 100644
--- a/network_io/unix/sockets.c
+++ b/network_io/unix/sockets.c
@@ -50,7 +50,7 @@ static apr_status_t socket_cleanup(void *sock)
/* XXX: Check for return values ? */
unlink(thesocket->local_addr->hostname);
}
-#endif
+#endif
if (close(sd) == 0) {
return APR_SUCCESS;
}
@@ -200,9 +200,9 @@ apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
socket_child_cleanup);
return APR_SUCCESS;
-}
+}
-apr_status_t apr_socket_shutdown(apr_socket_t *thesocket,
+apr_status_t apr_socket_shutdown(apr_socket_t *thesocket,
apr_shutdown_how_e how)
{
return (shutdown(thesocket->socketdes, how) == -1) ? errno : APR_SUCCESS;
@@ -215,7 +215,7 @@ apr_status_t apr_socket_close(apr_socket_t *thesocket)
apr_status_t apr_socket_bind(apr_socket_t *sock, apr_sockaddr_t *sa)
{
- if (bind(sock->socketdes,
+ if (bind(sock->socketdes,
(struct sockaddr *)&sa->sa, sa->salen) == -1) {
return errno;
}
@@ -275,7 +275,7 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr_socket_t *sock,
return errno;
}
#ifdef TPF
- if (s == 0) {
+ if (s == 0) {
/* 0 is an invalid socket for TPF */
return APR_EINTR;
}
@@ -304,8 +304,8 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr_socket_t *sock,
*(*new)->local_addr = *sock->local_addr;
- /* The above assignment just overwrote the pool entry. Setting the local_addr
- pool for the accepted socket back to what it should be. Otherwise all
+ /* The above assignment just overwrote the pool entry. Setting the local_addr
+ pool for the accepted socket back to what it should be. Otherwise all
allocations for this socket will come from a server pool that is not
freed until the process goes down.*/
(*new)->local_addr->pool = connection_context;
@@ -348,7 +348,7 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr_socket_t *sock,
!memcmp(sock->local_addr->ipaddr_ptr,
generic_inaddr_any,
sock->local_addr->ipaddr_len)) {
- /* If the interface address inside the listening socket's local_addr wasn't
+ /* If the interface address inside the listening socket's local_addr wasn't
* up-to-date, we don't know local interface of the connected socket either.
*
* If the listening socket was not bound to a specific interface, we
@@ -387,7 +387,7 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr_socket_t *sock,
apr_status_t apr_socket_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
{
- int rc;
+ int rc;
do {
rc = connect(sock->socketdes,
@@ -409,7 +409,7 @@ apr_status_t apr_socket_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
{
int error;
apr_socklen_t len = sizeof(error);
- if ((rc = getsockopt(sock->socketdes, SOL_SOCKET, SO_ERROR,
+ if ((rc = getsockopt(sock->socketdes, SOL_SOCKET, SO_ERROR,
(char *)&error, &len)) < 0) {
return errno;
}
@@ -509,8 +509,8 @@ apr_status_t apr_os_sock_get(apr_os_sock_t *thesock, apr_socket_t *sock)
return APR_SUCCESS;
}
-apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,
- apr_os_sock_info_t *os_sock_info,
+apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,
+ apr_os_sock_info_t *os_sock_info,
apr_pool_t *cont)
{
alloc_socket(apr_sock, cont);
@@ -518,8 +518,8 @@ apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,
(*apr_sock)->timeout = -1;
(*apr_sock)->socketdes = *os_sock_info->os_sock;
if (os_sock_info->local) {
- memcpy(&(*apr_sock)->local_addr->sa.sin,
- os_sock_info->local,
+ memcpy(&(*apr_sock)->local_addr->sa.sin,
+ os_sock_info->local,
(*apr_sock)->local_addr->salen);
/* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
(*apr_sock)->local_addr->port = ntohs((*apr_sock)->local_addr->sa.sin.sin_port);
@@ -531,7 +531,7 @@ apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,
#ifndef HAVE_POLL
(*apr_sock)->connected = 1;
#endif
- memcpy(&(*apr_sock)->remote_addr->sa.sin,
+ memcpy(&(*apr_sock)->remote_addr->sa.sin,
os_sock_info->remote,
(*apr_sock)->remote_addr->salen);
/* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
@@ -540,14 +540,14 @@ apr_status_t apr_os_sock_make(apr_socket_t **apr_sock,
else {
(*apr_sock)->remote_addr_unknown = 1;
}
-
+
(*apr_sock)->inherit = 0;
- apr_pool_cleanup_register((*apr_sock)->pool, (void *)(*apr_sock),
+ apr_pool_cleanup_register((*apr_sock)->pool, (void *)(*apr_sock),
socket_cleanup, socket_cleanup);
return APR_SUCCESS;
}
-apr_status_t apr_os_sock_put(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)
{
/* XXX Bogus assumption that *sock points at anything legit */
diff --git a/network_io/unix/sockopt.c b/network_io/unix/sockopt.c
index c48ab06a5..8579f5d7d 100644
--- a/network_io/unix/sockopt.c
+++ b/network_io/unix/sockopt.c
@@ -90,14 +90,14 @@ apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t)
}
apr_set_option(sock, APR_SO_NONBLOCK, 1);
}
- }
+ }
else if (t < 0 && sock->timeout >= 0) {
- if (apr_is_option_set(sock, APR_SO_NONBLOCK) != 0) {
- if ((stat = soblock(sock->socketdes)) != APR_SUCCESS) {
- return stat;
+ if (apr_is_option_set(sock, APR_SO_NONBLOCK) != 0) {
+ if ((stat = soblock(sock->socketdes)) != APR_SUCCESS) {
+ return stat;
}
apr_set_option(sock, APR_SO_NONBLOCK, 0);
- }
+ }
}
/* must disable the incomplete read support if we disable
* a timeout
@@ -110,7 +110,7 @@ apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t)
}
-apr_status_t apr_socket_opt_set(apr_socket_t *sock,
+apr_status_t apr_socket_opt_set(apr_socket_t *sock,
apr_int32_t opt, apr_int32_t on)
{
int one;
@@ -182,7 +182,7 @@ apr_status_t apr_socket_opt_set(apr_socket_t *sock,
case APR_SO_NONBLOCK:
if (apr_is_option_set(sock, APR_SO_NONBLOCK) != on) {
if (on) {
- if ((rv = sononblock(sock->socketdes)) != APR_SUCCESS)
+ if ((rv = sononblock(sock->socketdes)) != APR_SUCCESS)
return rv;
}
else {
@@ -213,7 +213,7 @@ apr_status_t apr_socket_opt_set(apr_socket_t *sock,
int optlevel = IPPROTO_TCP;
int optname = TCP_DEFER_ACCEPT;
- if (setsockopt(sock->socketdes, optlevel, optname,
+ if (setsockopt(sock->socketdes, optlevel, optname,
(void *)&on, sizeof(int)) == -1) {
return errno;
}
@@ -348,8 +348,8 @@ apr_status_t apr_socket_opt_set(apr_socket_t *sock,
return APR_EINVAL;
}
- return APR_SUCCESS;
-}
+ return APR_SUCCESS;
+}
apr_status_t apr_socket_timeout_get(apr_socket_t *sock, apr_interval_time_t *t)
@@ -359,7 +359,7 @@ apr_status_t apr_socket_timeout_get(apr_socket_t *sock, apr_interval_time_t *t)
}
-apr_status_t apr_socket_opt_get(apr_socket_t *sock,
+apr_status_t apr_socket_opt_get(apr_socket_t *sock,
apr_int32_t opt, apr_int32_t *on)
{
switch(opt) {
@@ -392,7 +392,7 @@ apr_status_t apr_gethostname(char *buf, apr_int32_t len, apr_pool_t *cont)
if (gethostname(buf, len) == 0) {
#else
if (gethostname(buf, len) != 0) {
-#endif
+#endif
buf[0] = '\0';
return errno;
}
diff --git a/network_io/win32/sendrecv.c b/network_io/win32/sendrecv.c
index b3e2a1c90..d98201746 100644
--- a/network_io/win32/sendrecv.c
+++ b/network_io/win32/sendrecv.c
@@ -25,10 +25,10 @@
#endif
/* MAX_SEGMENT_SIZE is the maximum amount of data that will be sent to a client
- * in one call of TransmitFile. This number must be small enough to give the
+ * in one call of TransmitFile. This number must be small enough to give the
* slowest client time to receive the data before the socket timeout triggers.
* The same problem can exist with apr_socket_send(). In that case, we rely on
- * the application to adjust socket timeouts and max send segment
+ * the application to adjust socket timeouts and max send segment
* sizes appropriately.
* For example, Apache will in most cases call apr_socket_send() with less
* than 8193 bytes.
@@ -61,7 +61,7 @@ APR_DECLARE(apr_status_t) apr_socket_send(apr_socket_t *sock, const char *buf,
APR_DECLARE(apr_status_t) apr_socket_recv(apr_socket_t *sock, char *buf,
- apr_size_t *len)
+ apr_size_t *len)
{
apr_ssize_t rv;
WSABUF wsaData;
@@ -129,13 +129,13 @@ APR_DECLARE(apr_status_t) apr_socket_sendv(apr_socket_t *sock,
APR_DECLARE(apr_status_t) apr_socket_sendto(apr_socket_t *sock,
apr_sockaddr_t *where,
- apr_int32_t flags, const char *buf,
+ apr_int32_t flags, const char *buf,
apr_size_t *len)
{
apr_ssize_t rv;
- rv = sendto(sock->socketdes, buf, (int)*len, flags,
- (const struct sockaddr*)&where->sa,
+ rv = sendto(sock->socketdes, buf, (int)*len, flags,
+ (const struct sockaddr*)&where->sa,
where->salen);
if (rv == SOCKET_ERROR) {
*len = 0;
@@ -147,23 +147,23 @@ APR_DECLARE(apr_status_t) apr_socket_sendto(apr_socket_t *sock,
}
-APR_DECLARE(apr_status_t) apr_socket_recvfrom(apr_sockaddr_t *from,
+APR_DECLARE(apr_status_t) apr_socket_recvfrom(apr_sockaddr_t *from,
apr_socket_t *sock,
- apr_int32_t flags,
+ apr_int32_t flags,
char *buf, apr_size_t *len)
{
apr_ssize_t rv;
from->salen = sizeof(from->sa);
- rv = recvfrom(sock->socketdes, buf, (int)*len, flags,
+ rv = recvfrom(sock->socketdes, buf, (int)*len, flags,
(struct sockaddr*)&from->sa, &from->salen);
if (rv == SOCKET_ERROR) {
(*len) = 0;
return apr_get_netos_error();
}
- apr_sockaddr_vars_set(from, from->sa.sin.sin_family,
+ apr_sockaddr_vars_set(from, from->sa.sin.sin_family,
ntohs(from->sa.sin.sin_port));
(*len) = rv;
@@ -175,8 +175,8 @@ APR_DECLARE(apr_status_t) apr_socket_recvfrom(apr_sockaddr_t *from,
#if APR_HAS_SENDFILE
-static apr_status_t collapse_iovec(char **off, apr_size_t *len,
- struct iovec *iovec, int numvec,
+static apr_status_t collapse_iovec(char **off, apr_size_t *len,
+ struct iovec *iovec, int numvec,
char *buf, apr_size_t buflen)
{
if (numvec == 1) {
@@ -206,9 +206,9 @@ static apr_status_t collapse_iovec(char **off, apr_size_t *len,
/*
- * apr_status_t apr_socket_sendfile(apr_socket_t *, apr_file_t *, apr_hdtr_t *,
+ * apr_status_t apr_socket_sendfile(apr_socket_t *, apr_file_t *, apr_hdtr_t *,
* apr_off_t *, apr_size_t *, apr_int32_t flags)
- * Send a file from an open file descriptor to a socket, along with
+ * Send a file from an open file descriptor to a socket, along with
* optional headers and trailers
* arg 1) The socket to which we're writing
* arg 2) The open file from which to read
@@ -217,12 +217,12 @@ static apr_status_t collapse_iovec(char **off, apr_size_t *len,
* arg 5) Number of bytes to send out of the file
* arg 6) APR flags that are mapped to OS specific flags
*/
-APR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock,
+APR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock,
apr_file_t *file,
apr_hdtr_t *hdtr,
apr_off_t *offset,
apr_size_t *len,
- apr_int32_t flags)
+ apr_int32_t flags)
{
apr_status_t status = APR_SUCCESS;
apr_status_t rv;
@@ -263,7 +263,7 @@ APR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock,
* Long TransmitFile requests are defined as requests that require more
* than a single read from the file or a cache; the request therefore
* depends on the size of the file and the specified length of the send
- * packet.
+ * packet.
*
* Use of TF_USE_KERNEL_APC can deliver significant performance benefits.
* It is possible (though unlikely), however, that the thread in which
@@ -281,7 +281,7 @@ APR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock,
/* Handle the goofy case of sending headers/trailers and a zero byte file */
if (!bytes_to_send && hdtr) {
if (hdtr->numheaders) {
- rv = apr_socket_sendv(sock, hdtr->headers, hdtr->numheaders,
+ rv = apr_socket_sendv(sock, hdtr->headers, hdtr->numheaders,
&nbytes);
if (rv != APR_SUCCESS)
return rv;
@@ -304,8 +304,8 @@ APR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock,
apr_size_t head_length = tfb.HeadLength;
ptfb = &tfb;
nbytes = 0;
- rv = collapse_iovec((char **)&ptfb->Head, &head_length,
- hdtr->headers, hdtr->numheaders,
+ rv = collapse_iovec((char **)&ptfb->Head, &head_length,
+ hdtr->headers, hdtr->numheaders,
hdtrbuf, sizeof(hdtrbuf));
tfb.HeadLength = (DWORD)head_length;
@@ -356,7 +356,7 @@ APR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock,
sock->overlapped->Offset = (DWORD)(curoff);
#if APR_HAS_LARGE_FILES
sock->overlapped->OffsetHigh = (DWORD)(curoff >> 32);
-#endif
+#endif
/* XXX BoundsChecker claims dwFlags must not be zero. */
rv = pfn_transmit_file(sock->socketdes, /* socket */
file->filehand, /* open file descriptor of the file to be sent */
@@ -368,10 +368,10 @@ APR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock,
if (!rv) {
status = apr_get_netos_error();
if ((status == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) ||
- (status == APR_FROM_OS_ERROR(WSA_IO_PENDING)))
+ (status == APR_FROM_OS_ERROR(WSA_IO_PENDING)))
{
- rv = WaitForSingleObject(sock->overlapped->hEvent,
- (DWORD)(sock->timeout >= 0
+ rv = WaitForSingleObject(sock->overlapped->hEvent,
+ (DWORD)(sock->timeout >= 0
? sock->timeout_ms : INFINITE));
if (rv == WAIT_OBJECT_0) {
status = APR_SUCCESS;
diff --git a/network_io/win32/sockets.c b/network_io/win32/sockets.c
index 8d7404df7..f94533c23 100644
--- a/network_io/win32/sockets.c
+++ b/network_io/win32/sockets.c
@@ -64,7 +64,7 @@ static void set_socket_vars(apr_socket_t *sock, int family, int type, int protoc
apr_set_option(sock, APR_IPV6_V6ONLY, 1);
}
#endif
-}
+}
static void alloc_socket(apr_socket_t **new, apr_pool_t *p)
{
*new = (apr_socket_t *)apr_pcalloc(p, sizeof(apr_socket_t));
@@ -72,7 +72,7 @@ static void alloc_socket(apr_socket_t **new, apr_pool_t *p)
(*new)->local_addr = (apr_sockaddr_t *)apr_pcalloc((*new)->pool,
sizeof(apr_sockaddr_t));
(*new)->local_addr->pool = p;
-
+
(*new)->remote_addr = (apr_sockaddr_t *)apr_pcalloc((*new)->pool,
sizeof(apr_sockaddr_t));
(*new)->remote_addr->pool = p;
@@ -91,7 +91,7 @@ APR_DECLARE(apr_status_t) apr_socket_protocol_get(apr_socket_t *sock,
}
APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new, int family,
- int type, int protocol,
+ int type, int protocol,
apr_pool_t *cont)
{
DWORD flags;
@@ -153,11 +153,11 @@ APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new, int family,
(*new)->timeout = -1;
(*new)->disconnected = 0;
- apr_pool_cleanup_register((*new)->pool, (void *)(*new),
+ apr_pool_cleanup_register((*new)->pool, (void *)(*new),
socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
-}
+}
APR_DECLARE(apr_status_t) apr_socket_shutdown(apr_socket_t *thesocket,
apr_shutdown_how_e how)
@@ -199,8 +199,8 @@ APR_DECLARE(apr_status_t) apr_socket_close(apr_socket_t *thesocket)
APR_DECLARE(apr_status_t) apr_socket_bind(apr_socket_t *sock,
apr_sockaddr_t *sa)
{
- if (bind(sock->socketdes,
- (struct sockaddr *)&sa->sa,
+ if (bind(sock->socketdes,
+ (struct sockaddr *)&sa->sa,
sa->salen) == -1) {
return apr_get_netos_error();
}
@@ -236,7 +236,7 @@ APR_DECLARE(apr_status_t) apr_socket_listen(apr_socket_t *sock,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
+APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
apr_socket_t *sock, apr_pool_t *p)
{
SOCKET s;
@@ -255,10 +255,10 @@ APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
}
alloc_socket(new, p);
- set_socket_vars(*new, sock->local_addr->sa.sin.sin_family, SOCK_STREAM,
+ set_socket_vars(*new, sock->local_addr->sa.sin.sin_family, SOCK_STREAM,
sock->protocol);
- (*new)->timeout = -1;
+ (*new)->timeout = -1;
(*new)->disconnected = 0;
(*new)->socketdes = s;
@@ -269,8 +269,8 @@ APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
*(*new)->local_addr = *sock->local_addr;
- /* The above assignment just overwrote the pool entry. Setting the local_addr
- pool for the accepted socket back to what it should be. Otherwise all
+ /* The above assignment just overwrote the pool entry. Setting the local_addr
+ pool for the accepted socket back to what it should be. Otherwise all
allocations for this socket will come from a server pool that is not
freed until the process goes down.*/
(*new)->local_addr->pool = p;
@@ -314,7 +314,7 @@ APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new,
(*new)->local_interface_unknown = 1;
}
- apr_pool_cleanup_register((*new)->pool, (void *)(*new),
+ apr_pool_cleanup_register((*new)->pool, (void *)(*new),
socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -360,7 +360,7 @@ static apr_status_t wait_for_connect(apr_socket_t *sock)
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_socket_connect(apr_socket_t *sock,
+APR_DECLARE(apr_status_t) apr_socket_connect(apr_socket_t *sock,
apr_sockaddr_t *sa)
{
apr_status_t rv;
@@ -380,8 +380,8 @@ APR_DECLARE(apr_status_t) apr_socket_connect(apr_socket_t *sock,
if (rv == APR_FROM_OS_ERROR(WSAEWOULDBLOCK)) {
if (sock->timeout == 0) {
/* Tell the app that the connect is in progress...
- * Gotta play some games here. connect on Unix will return
- * EINPROGRESS under the same circumstances that Windows
+ * Gotta play some games here. connect on Unix will return
+ * EINPROGRESS under the same circumstances that Windows
* returns WSAEWOULDBLOCK. Do some adhoc canonicalization...
*/
rv = APR_FROM_OS_ERROR(WSAEINPROGRESS);
@@ -483,8 +483,8 @@ APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
(*apr_sock)->disconnected = 0;
(*apr_sock)->socketdes = *os_sock_info->os_sock;
if (os_sock_info->local) {
- memcpy(&(*apr_sock)->local_addr->sa.sin,
- os_sock_info->local,
+ memcpy(&(*apr_sock)->local_addr->sa.sin,
+ os_sock_info->local,
(*apr_sock)->local_addr->salen);
(*apr_sock)->local_addr->pool = cont;
/* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
@@ -494,7 +494,7 @@ APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
(*apr_sock)->local_port_unknown = (*apr_sock)->local_interface_unknown = 1;
}
if (os_sock_info->remote) {
- memcpy(&(*apr_sock)->remote_addr->sa.sin,
+ memcpy(&(*apr_sock)->remote_addr->sa.sin,
os_sock_info->remote,
(*apr_sock)->remote_addr->salen);
(*apr_sock)->remote_addr->pool = cont;
@@ -502,8 +502,8 @@ APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
(*apr_sock)->remote_addr->port = ntohs((*apr_sock)->remote_addr->sa.sin.sin_port);
(*apr_sock)->remote_addr_unknown = 0;
}
-
- apr_pool_cleanup_register((*apr_sock)->pool, (void *)(*apr_sock),
+
+ apr_pool_cleanup_register((*apr_sock)->pool, (void *)(*apr_sock),
socket_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
@@ -533,14 +533,14 @@ APR_DECLARE(apr_status_t) apr_os_sock_put(apr_socket_t **sock,
* This is not trivial to implement.
*/
-APR_DECLARE(apr_status_t) apr_socket_inherit_set(apr_socket_t *socket)
-{
+APR_DECLARE(apr_status_t) apr_socket_inherit_set(apr_socket_t *socket)
+{
return APR_ENOTIMPL;
-}
+}
-APR_DECLARE(apr_status_t) apr_socket_inherit_unset(apr_socket_t *socket)
-{
+APR_DECLARE(apr_status_t) apr_socket_inherit_unset(apr_socket_t *socket)
+{
return APR_ENOTIMPL;
-}
+}
APR_POOL_IMPLEMENT_ACCESSOR(socket);
diff --git a/network_io/win32/sockopt.c b/network_io/win32/sockopt.c
index 463eeebf5..780b5bd7b 100644
--- a/network_io/win32/sockopt.c
+++ b/network_io/win32/sockopt.c
@@ -69,15 +69,15 @@ APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock, apr_interva
apr_set_option(sock, APR_SO_NONBLOCK, 0);
}
/* Reset socket timeouts if the new timeout differs from the old timeout */
- if (sock->timeout != t)
+ if (sock->timeout != t)
{
/* Win32 timeouts are in msec, represented as int */
sock->timeout_ms = (int)apr_time_as_msec(t);
- setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVTIMEO,
- (char *) &sock->timeout_ms,
+ setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVTIMEO,
+ (char *) &sock->timeout_ms,
sizeof(sock->timeout_ms));
- setsockopt(sock->socketdes, SOL_SOCKET, SO_SNDTIMEO,
- (char *) &sock->timeout_ms,
+ setsockopt(sock->socketdes, SOL_SOCKET, SO_SNDTIMEO,
+ (char *) &sock->timeout_ms,
sizeof(sock->timeout_ms));
}
}
@@ -86,9 +86,9 @@ APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock, apr_interva
/* Set the socket to blocking with infinite timeouts */
if ((stat = soblock(sock->socketdes)) != APR_SUCCESS)
return stat;
- setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVTIMEO,
+ setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVTIMEO,
(char *) &zero, sizeof(zero));
- setsockopt(sock->socketdes, SOL_SOCKET, SO_SNDTIMEO,
+ setsockopt(sock->socketdes, SOL_SOCKET, SO_SNDTIMEO,
(char *) &zero, sizeof(zero));
}
sock->timeout = t;
@@ -107,7 +107,7 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
switch (opt) {
case APR_SO_KEEPALIVE:
if (on != apr_is_option_set(sock, APR_SO_KEEPALIVE)) {
- if (setsockopt(sock->socketdes, SOL_SOCKET, SO_KEEPALIVE,
+ if (setsockopt(sock->socketdes, SOL_SOCKET, SO_KEEPALIVE,
(void *)&one, sizeof(int)) == -1) {
return apr_get_netos_error();
}
@@ -116,7 +116,7 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
break;
case APR_SO_DEBUG:
if (on != apr_is_option_set(sock, APR_SO_DEBUG)) {
- if (setsockopt(sock->socketdes, SOL_SOCKET, SO_DEBUG,
+ if (setsockopt(sock->socketdes, SOL_SOCKET, SO_DEBUG,
(void *)&one, sizeof(int)) == -1) {
return apr_get_netos_error();
}
@@ -137,7 +137,7 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
break;
case APR_SO_BROADCAST:
if (on != apr_is_option_set(sock, APR_SO_BROADCAST)) {
- if (setsockopt(sock->socketdes, SOL_SOCKET, SO_BROADCAST,
+ if (setsockopt(sock->socketdes, SOL_SOCKET, SO_BROADCAST,
(void *)&one, sizeof(int)) == -1) {
return apr_get_netos_error();
}
@@ -146,7 +146,7 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
break;
case APR_SO_REUSEADDR:
if (on != apr_is_option_set(sock, APR_SO_REUSEADDR)) {
- if (setsockopt(sock->socketdes, SOL_SOCKET, SO_REUSEADDR,
+ if (setsockopt(sock->socketdes, SOL_SOCKET, SO_REUSEADDR,
(void *)&one, sizeof(int)) == -1) {
return apr_get_netos_error();
}
@@ -156,7 +156,7 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
case APR_SO_NONBLOCK:
if (apr_is_option_set(sock, APR_SO_NONBLOCK) != on) {
if (on) {
- if ((stat = sononblock(sock->socketdes)) != APR_SUCCESS)
+ if ((stat = sononblock(sock->socketdes)) != APR_SUCCESS)
return stat;
}
else {
@@ -172,7 +172,7 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
struct linger li;
li.l_onoff = on;
li.l_linger = APR_MAX_SECS_TO_LINGER;
- if (setsockopt(sock->socketdes, SOL_SOCKET, SO_LINGER,
+ if (setsockopt(sock->socketdes, SOL_SOCKET, SO_LINGER,
(char *) &li, sizeof(struct linger)) == -1) {
return apr_get_netos_error();
}
@@ -186,7 +186,7 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
int optlevel = IPPROTO_TCP;
int optname = TCP_DEFER_ACCEPT;
- if (setsockopt(sock->socketdes, optlevel, optname,
+ if (setsockopt(sock->socketdes, optlevel, optname,
(void *)&on, sizeof(int)) == -1) {
return apr_get_netos_error();
}
@@ -215,7 +215,7 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
break;
case APR_IPV6_V6ONLY:
#if APR_HAVE_IPV6
- if (apr_os_level < APR_WIN_VISTA &&
+ if (apr_os_level < APR_WIN_VISTA &&
sock->local_addr->family == AF_INET6) {
/* apr_set_option() called at socket creation */
if (on) {
diff --git a/passwd/apr_getpass.c b/passwd/apr_getpass.c
index 5426b8a36..b4bdb5356 100644
--- a/passwd/apr_getpass.c
+++ b/passwd/apr_getpass.c
@@ -112,20 +112,20 @@ static char *get_password(const char *prompt)
/* WCE lacks console. So the getpass is unsuported
* The only way is to use the GUI so the getpass should be implemented
* on per-application basis.
- */
+ */
static char password[128];
int n = 0;
int ch;
fputs(prompt, stderr);
-
+
while ((ch = _getch()) != '\r') {
if (ch == EOF) /* EOF */ {
fputs("[EOF]\n", stderr);
return NULL;
}
else if (ch == 0 || ch == 0xE0) {
- /* FN Keys (0 or E0) are a sentinal for a FN code */
+ /* FN Keys (0 or E0) are a sentinal for a FN code */
ch = (ch << 4) | _getch();
/* Catch {DELETE}, {<--}, Num{DEL} and Num{<--} */
if ((ch == 0xE53 || ch == 0xE4B || ch == 0x053 || ch == 0x04b) && n) {
@@ -162,7 +162,7 @@ static char *get_password(const char *prompt)
fputc('\a', stderr);
}
}
-
+
fputc('\n', stderr);
password[n] = '\0';
return password;
@@ -194,7 +194,7 @@ static char *get_password(const char *prompt)
n = 0;
}
}
-
+
password[n] = '\0';
printf("\n");
if (n > (MAX_STRING_LEN - 1)) {
diff --git a/poll/unix/epoll.c b/poll/unix/epoll.c
index 485747732..77caa6767 100644
--- a/poll/unix/epoll.c
+++ b/poll/unix/epoll.c
@@ -239,7 +239,7 @@ static apr_status_t impl_pollset_remove(apr_pollset_t *pollset,
ep != APR_RING_SENTINEL(&(pollset->p->query_ring),
pfd_elem_t, link);
ep = APR_RING_NEXT(ep, link)) {
-
+
if (descriptor->desc.s == ep->pfd.desc.s) {
APR_RING_REMOVE(ep, link);
APR_RING_INSERT_TAIL(&(pollset->p->dead_ring),
@@ -347,13 +347,13 @@ static apr_status_t impl_pollcb_create(apr_pollcb_t *pollcb,
apr_uint32_t flags)
{
int fd;
-
+
#ifdef HAVE_EPOLL_CREATE1
fd = epoll_create1(EPOLL_CLOEXEC);
#else
fd = epoll_create(size);
#endif
-
+
if (fd < 0) {
return apr_get_netos_error();
}
@@ -379,7 +379,7 @@ static apr_status_t impl_pollcb_create(apr_pollcb_t *pollcb,
}
}
#endif
-
+
pollcb->fd = fd;
pollcb->pollset.epoll = apr_palloc(p, size * sizeof(struct epoll_event));
@@ -391,7 +391,7 @@ static apr_status_t impl_pollcb_add(apr_pollcb_t *pollcb,
{
struct epoll_event ev = { 0 };
int ret;
-
+
ev.events = get_epoll_event(descriptor->reqevents);
ev.data.ptr = (void *) descriptor;
@@ -403,11 +403,11 @@ static apr_status_t impl_pollcb_add(apr_pollcb_t *pollcb,
ret = epoll_ctl(pollcb->fd, EPOLL_CTL_ADD,
descriptor->desc.f->filedes, &ev);
}
-
+
if (ret == -1) {
return apr_get_netos_error();
}
-
+
return APR_SUCCESS;
}
@@ -419,7 +419,7 @@ static apr_status_t impl_pollcb_remove(apr_pollcb_t *pollcb,
* kernel < 2.6.9
*/
int ret;
-
+
if (descriptor->desc_type == APR_POLL_SOCKET) {
ret = epoll_ctl(pollcb->fd, EPOLL_CTL_DEL,
descriptor->desc.s->socketdes, &ev);
@@ -428,11 +428,11 @@ static apr_status_t impl_pollcb_remove(apr_pollcb_t *pollcb,
ret = epoll_ctl(pollcb->fd, EPOLL_CTL_DEL,
descriptor->desc.f->filedes, &ev);
}
-
+
if (ret < 0) {
rv = APR_NOTFOUND;
}
-
+
return rv;
}
@@ -444,11 +444,11 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
{
int ret, i;
apr_status_t rv = APR_SUCCESS;
-
+
if (timeout > 0) {
timeout = (timeout + 999) / 1000;
}
-
+
ret = epoll_wait(pollcb->fd, pollcb->pollset.epoll, pollcb->nalloc,
timeout);
if (ret < 0) {
@@ -476,7 +476,7 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
}
}
}
-
+
return rv;
}
diff --git a/poll/unix/kqueue.c b/poll/unix/kqueue.c
index 7fbfbb882..2d904a2a2 100644
--- a/poll/unix/kqueue.c
+++ b/poll/unix/kqueue.c
@@ -368,7 +368,7 @@ static apr_status_t impl_pollcb_create(apr_pollcb_t *pollcb,
apr_uint32_t flags)
{
int fd;
-
+
fd = kqueue();
if (fd < 0) {
return apr_get_netos_error();
@@ -393,10 +393,10 @@ static apr_status_t impl_pollcb_create(apr_pollcb_t *pollcb,
return rv;
}
}
-
+
pollcb->fd = fd;
pollcb->pollset.ke = (struct kevent *) apr_pcalloc(p, 2 * size * sizeof(struct kevent));
-
+
return APR_SUCCESS;
}
@@ -406,30 +406,30 @@ static apr_status_t impl_pollcb_add(apr_pollcb_t *pollcb,
apr_os_sock_t fd;
struct kevent ev;
apr_status_t rv = APR_SUCCESS;
-
+
if (descriptor->desc_type == APR_POLL_SOCKET) {
fd = descriptor->desc.s->socketdes;
}
else {
fd = descriptor->desc.f->filedes;
}
-
+
if (descriptor->reqevents & APR_POLLIN) {
EV_SET(&ev, fd, EVFILT_READ, EV_ADD, 0, 0, descriptor);
-
+
if (kevent(pollcb->fd, &ev, 1, NULL, 0, NULL) == -1) {
rv = apr_get_netos_error();
}
}
-
+
if (descriptor->reqevents & APR_POLLOUT && rv == APR_SUCCESS) {
EV_SET(&ev, fd, EVFILT_WRITE, EV_ADD, 0, 0, descriptor);
-
+
if (kevent(pollcb->fd, &ev, 1, NULL, 0, NULL) == -1) {
rv = apr_get_netos_error();
}
}
-
+
return rv;
}
@@ -439,7 +439,7 @@ static apr_status_t impl_pollcb_remove(apr_pollcb_t *pollcb,
apr_status_t rv;
struct kevent ev;
apr_os_sock_t fd;
-
+
if (descriptor->desc_type == APR_POLL_SOCKET) {
fd = descriptor->desc.s->socketdes;
}
@@ -450,20 +450,20 @@ static apr_status_t impl_pollcb_remove(apr_pollcb_t *pollcb,
rv = APR_NOTFOUND; /* unless at least one of the specified conditions is */
if (descriptor->reqevents & APR_POLLIN) {
EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
-
+
if (kevent(pollcb->fd, &ev, 1, NULL, 0, NULL) != -1) {
rv = APR_SUCCESS;
}
}
-
+
if (descriptor->reqevents & APR_POLLOUT) {
EV_SET(&ev, fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL);
-
+
if (kevent(pollcb->fd, &ev, 1, NULL, 0, NULL) != -1) {
rv = APR_SUCCESS;
}
}
-
+
return rv;
}
@@ -476,7 +476,7 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
int ret, i;
struct timespec tv, *tvptr;
apr_status_t rv = APR_SUCCESS;
-
+
if (timeout < 0) {
tvptr = NULL;
}
@@ -485,7 +485,7 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
tv.tv_nsec = (long) apr_time_usec(timeout) * 1000;
tvptr = &tv;
}
-
+
ret = kevent(pollcb->fd, NULL, 0, pollcb->pollset.ke, 2 * pollcb->nalloc,
tvptr);
@@ -508,9 +508,9 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
pollfd->rtnevents = get_kqueue_revent(pollcb->pollset.ke[i].filter,
pollcb->pollset.ke[i].flags);
-
+
rv = func(baton, pollfd);
-
+
if (rv) {
return rv;
}
diff --git a/poll/unix/poll.c b/poll/unix/poll.c
index c33157296..de55f3022 100644
--- a/poll/unix/poll.c
+++ b/poll/unix/poll.c
@@ -69,7 +69,7 @@ static apr_int16_t get_revent(apr_int16_t event)
#define SMALL_POLLSET_LIMIT 8
APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t num,
- apr_int32_t *nsds,
+ apr_int32_t *nsds,
apr_interval_time_t timeout)
{
int i, num_to_poll;
@@ -129,7 +129,7 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t num,
aprset[i].rtnevents = get_revent(pollset[i].revents);
}
}
-
+
#if !defined(HAVE_VLA) && !defined(HAVE_ALLOCA)
if (num > SMALL_POLLSET_LIMIT) {
free(pollset);
@@ -160,7 +160,7 @@ static apr_status_t impl_pollset_create(apr_pollset_t *pollset,
apr_pool_t *p,
apr_uint32_t flags)
{
- if (flags & APR_POLLSET_THREADSAFE) {
+ if (flags & APR_POLLSET_THREADSAFE) {
return APR_ENOTIMPL;
}
@@ -355,7 +355,7 @@ static apr_status_t impl_pollcb_add(apr_pollcb_t *pollcb,
get_event(descriptor->reqevents);
pollcb->copyset[pollcb->nelts] = descriptor;
pollcb->nelts++;
-
+
return APR_SUCCESS;
}
@@ -442,7 +442,7 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
return APR_EINTR;
}
#endif
- pollfd->rtnevents = get_revent(pollcb->pollset.ps[i].revents);
+ pollfd->rtnevents = get_revent(pollcb->pollset.ps[i].revents);
rv = func(baton, pollfd);
if (rv) {
return rv;
diff --git a/poll/unix/port.c b/poll/unix/port.c
index 638a8cba7..b3c6e2fbd 100644
--- a/poll/unix/port.c
+++ b/poll/unix/port.c
@@ -86,7 +86,7 @@ struct apr_pollset_private_t
volatile apr_uint32_t waiting;
};
-static apr_status_t call_port_getn(int port, port_event_t list[],
+static apr_status_t call_port_getn(int port, port_event_t list[],
unsigned int max, unsigned int *nget,
apr_interval_time_t timeout)
{
@@ -108,7 +108,7 @@ static apr_status_t call_port_getn(int port, port_event_t list[],
*/
ret = port_getn(port, list, max, nget, tvptr);
- /* Note: 32-bit port_getn() on Solaris 10 x86 returns large negative
+ /* Note: 32-bit port_getn() on Solaris 10 x86 returns large negative
* values instead of 0 when returning immediately.
*/
@@ -246,7 +246,7 @@ static apr_status_t impl_pollset_add(apr_pollset_t *pollset,
* wait until the next call to apr_pollset_poll().
*/
if (apr_atomic_read32(&pollset->p->waiting)) {
- res = port_associate(pollset->p->port_fd, PORT_SOURCE_FD, fd,
+ res = port_associate(pollset->p->port_fd, PORT_SOURCE_FD, fd,
get_event(descriptor->reqevents), (void *)elem);
if (res < 0) {
@@ -257,7 +257,7 @@ static apr_status_t impl_pollset_add(apr_pollset_t *pollset,
elem->on_query_ring = 1;
APR_RING_INSERT_TAIL(&(pollset->p->query_ring), elem, pfd_elem_t, link);
}
- }
+ }
else {
APR_RING_INSERT_TAIL(&(pollset->p->add_ring), elem, pfd_elem_t, link);
}
@@ -287,10 +287,10 @@ static apr_status_t impl_pollset_remove(apr_pollset_t *pollset,
}
/* Search the add ring first. This ring is often shorter,
- * and it often contains the descriptor being removed.
- * (For the common scenario where apr_pollset_poll()
+ * and it often contains the descriptor being removed.
+ * (For the common scenario where apr_pollset_poll()
* returns activity for the descriptor and the descriptor
- * is then removed from the pollset, it will have just
+ * is then removed from the pollset, it will have just
* been moved to the add ring by apr_pollset_poll().)
*
* If it is on the add ring, it isn't associated with the
@@ -317,7 +317,7 @@ static apr_status_t impl_pollset_remove(apr_pollset_t *pollset,
if (res < 0) {
/* The expected case for this failure is that another
* thread's call to port_getn() returned this fd and
- * disassociated the fd from the event port, and
+ * disassociated the fd from the event port, and
* impl_pollset_poll() is blocked on the ring lock,
* which this thread holds.
*/
@@ -378,7 +378,7 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
fd = ep->pfd.desc.f->filedes;
}
- ret = port_associate(pollset->p->port_fd, PORT_SOURCE_FD,
+ ret = port_associate(pollset->p->port_fd, PORT_SOURCE_FD,
fd, get_event(ep->pfd.reqevents), ep);
if (ret < 0) {
rv = apr_get_netos_error();
@@ -397,10 +397,10 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
return rv;
}
- rv = call_port_getn(pollset->p->port_fd, pollset->p->port_set,
+ rv = call_port_getn(pollset->p->port_fd, pollset->p->port_set,
pollset->nalloc, &nget, timeout);
- /* decrease the waiting ASAP to reduce the window for calling
+ /* decrease the waiting ASAP to reduce the window for calling
port_associate within apr_pollset_add() */
apr_atomic_dec32(&pollset->p->waiting);
diff --git a/poll/unix/select.c b/poll/unix/select.c
index 562ced7f6..70df4126e 100644
--- a/poll/unix/select.c
+++ b/poll/unix/select.c
@@ -199,7 +199,7 @@ static apr_status_t impl_pollset_create(apr_pollset_t *pollset,
apr_pool_t *p,
apr_uint32_t flags)
{
- if (flags & APR_POLLSET_THREADSAFE) {
+ if (flags & APR_POLLSET_THREADSAFE) {
pollset->p = NULL;
return APR_ENOTIMPL;
}
diff --git a/poll/unix/z_asio.c b/poll/unix/z_asio.c
index e7d9d9da3..0181dd384 100644
--- a/poll/unix/z_asio.c
+++ b/poll/unix/z_asio.c
@@ -247,7 +247,7 @@ static apr_status_t asio_pollset_cleanup(apr_pollset_t *pollset)
int rv;
DBG(4, "entered\n");
- if (pollset->flags & APR_POLLSET_THREADSAFE) {
+ if (pollset->flags & APR_POLLSET_THREADSAFE) {
rv = msgctl(pollset->p->msg_q, IPC_RMID, NULL);
DBG1(4, "asio_pollset_cleanup: msgctl(IPC_RMID) returned %d\n", rv);
}
@@ -484,7 +484,7 @@ static apr_status_t asio_pollset_remove(apr_pollset_t *pollset,
apr_status_t rv = APR_SUCCESS;
apr_pollset_private_t *priv = pollset->p;
/* AIO_CANCEL is synchronous, so autodata works fine. */
- struct aiocb cancel_a = {0};
+ struct aiocb cancel_a = {0};
int fd;
@@ -519,7 +519,7 @@ static apr_status_t asio_pollset_remove(apr_pollset_t *pollset,
cancel_a.aio_cflags = 0;
cancel_a.aio_cflags2 = 0;
- /* we want the original aiocb to show up on the pollset message queue
+ /* we want the original aiocb to show up on the pollset message queue
* before recycling its memory to eliminate race conditions
*/
@@ -650,12 +650,12 @@ static apr_status_t asio_pollset_poll(apr_pollset_t *pollset,
if (elem->state == ASIO_REMOVED) {
- /*
+ /*
* async i/o is done since it was found on prior_ready
- * the state says the caller is done with it too
- * so recycle the elem
+ * the state says the caller is done with it too
+ * so recycle the elem
*/
-
+
APR_RING_INSERT_TAIL(&(priv->free_ring), elem,
asio_elem_t, link);
continue; /* do not re-add if it has been _removed */
diff --git a/random/unix/apr_random.c b/random/unix/apr_random.c
index 9aee3e989..c8d23eb4d 100644
--- a/random/unix/apr_random.c
+++ b/random/unix/apr_random.c
@@ -177,10 +177,10 @@ APR_DECLARE(void) apr_random_after_fork(apr_proc_t *proc)
apr_random_t *r;
for (r = all_random; r; r = r->next)
- /*
- * XXX Note: the pid does not provide sufficient entropy to
- * actually call this secure. See Ben's paper referenced at
- * the top of this file.
+ /*
+ * XXX Note: the pid does not provide sufficient entropy to
+ * actually call this secure. See Ben's paper referenced at
+ * the top of this file.
*/
mixer(r,proc->pid);
}
@@ -188,7 +188,7 @@ APR_DECLARE(void) apr_random_after_fork(apr_proc_t *proc)
APR_DECLARE(apr_random_t *) apr_random_standard_new(apr_pool_t *p)
{
apr_random_t *r = apr_palloc(p,sizeof *r);
-
+
apr_random_init(r,p,apr_crypto_sha256_new(p),apr_crypto_sha256_new(p),
apr_crypto_sha256_new(p));
return r;
diff --git a/random/unix/sha2.c b/random/unix/sha2.c
index 8059a9d78..229737ff8 100644
--- a/random/unix/sha2.c
+++ b/random/unix/sha2.c
@@ -341,11 +341,11 @@ void apr__SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
/* Part of the message block expansion: */
s0 = W256[(j+1)&0x0f];
s0 = sigma0_256(s0);
- s1 = W256[(j+14)&0x0f];
+ s1 = W256[(j+14)&0x0f];
s1 = sigma1_256(s1);
/* Apply the SHA-256 compression function to update a..h */
- T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
+ T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
(W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0);
T2 = Sigma0_256(a) + Maj(a, b, c);
h = g;
@@ -387,7 +387,7 @@ void apr__SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len)
/* Sanity check: */
assert(context != (SHA256_CTX*)0 && data != (sha2_byte*)0);
- usedspace = (unsigned int)((context->bitcount >> 3)
+ usedspace = (unsigned int)((context->bitcount >> 3)
% SHA256_BLOCK_LENGTH);
if (usedspace > 0) {
/* Calculate how much free space is available in the buffer */
@@ -434,7 +434,7 @@ void apr__SHA256_Final(sha2_byte digest[SHA256_DIGEST_LENGTH], SHA256_CTX* conte
/* If no digest buffer is passed, we don't bother doing this: */
if (digest != (sha2_byte*)0) {
- usedspace = (unsigned int)((context->bitcount >> 3)
+ usedspace = (unsigned int)((context->bitcount >> 3)
% SHA256_BLOCK_LENGTH);
#if !APR_IS_BIGENDIAN
/* Convert FROM host byte order */
diff --git a/shmem/beos/shm.c b/shmem/beos/shm.c
index fcd7c84d1..77d0fd884 100644
--- a/shmem/beos/shm.c
+++ b/shmem/beos/shm.c
@@ -33,20 +33,20 @@ struct apr_shm_t {
area_id aid;
};
-APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
- apr_size_t reqsize,
- const char *filename,
+APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
+ apr_size_t reqsize,
+ const char *filename,
apr_pool_t *p)
{
apr_size_t pagesize;
area_id newid;
char *addr;
char shname[B_OS_NAME_LENGTH];
-
+
(*m) = (apr_shm_t *)apr_pcalloc(p, sizeof(apr_shm_t));
/* we MUST allocate in pages, so calculate how big an area we need... */
pagesize = ((reqsize + B_PAGE_SIZE - 1) / B_PAGE_SIZE) * B_PAGE_SIZE;
-
+
if (!filename) {
int num = 0;
snprintf(shname, B_OS_NAME_LENGTH, "apr_shmem_%ld", find_thread(NULL));
@@ -54,7 +54,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
snprintf(shname, B_OS_NAME_LENGTH, "apr_shmem_%ld_%d",
find_thread(NULL), num++);
}
- newid = create_area(filename ? filename : shname,
+ newid = create_area(filename ? filename : shname,
(void*)&addr, B_ANY_ADDRESS,
pagesize, B_LAZY_LOCK, B_READ_AREA|B_WRITE_AREA);
@@ -71,9 +71,9 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
- apr_size_t reqsize,
- const char *filename,
+APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
+ apr_size_t reqsize,
+ const char *filename,
apr_pool_t *p,
apr_int32_t flags)
{
@@ -92,7 +92,7 @@ APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename,
apr_pool_t *pool)
{
area_id deleteme = find_area(filename);
-
+
if (deleteme == B_NAME_NOT_FOUND)
return APR_EINVAL;
@@ -108,7 +108,7 @@ APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m)
else {
return APR_ENOTIMPL;
}
-}
+}
APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
const char *filename,
@@ -132,13 +132,13 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
if (ti.team != ai.team) {
area_id narea;
-
+
narea = clone_area(ai.name, &(ai.address), B_CLONE_ADDRESS,
B_READ_AREA|B_WRITE_AREA, ai.area);
if (narea < B_OK)
return narea;
-
+
get_area_info(narea, &ai);
new_m->aid = narea;
new_m->memblock = ai.address;
@@ -148,7 +148,7 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
}
(*m) = new_m;
-
+
return APR_SUCCESS;
}
@@ -191,5 +191,5 @@ APR_DECLARE(apr_status_t) apr_os_shm_put(apr_shm_t **m,
apr_pool_t *pool)
{
return APR_ENOTIMPL;
-}
+}
diff --git a/shmem/os2/shm.c b/shmem/os2/shm.c
index b6ef7811a..958fd321f 100644
--- a/shmem/os2/shm.c
+++ b/shmem/os2/shm.c
@@ -56,9 +56,9 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
- apr_size_t reqsize,
- const char *filename,
+APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
+ apr_size_t reqsize,
+ const char *filename,
apr_pool_t *p,
apr_int32_t flags)
{
@@ -80,7 +80,7 @@ APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename,
APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m)
{
return APR_ENOTIMPL;
-}
+}
APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
const char *filename,
@@ -164,5 +164,5 @@ APR_DECLARE(apr_status_t) apr_os_shm_put(apr_shm_t **m,
*m = newm;
return APR_SUCCESS;
-}
+}
diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c
index f93efb5fc..2a42aadee 100644
--- a/shmem/unix/shm.c
+++ b/shmem/unix/shm.c
@@ -24,7 +24,7 @@
#include "apr_hash.h"
#if APR_USE_SHMEM_MMAP_SHM
-/*
+/*
* For portable use, a shared memory object should be identified by a name of
* the form /somename; that is, a null-terminated string of up to NAME_MAX
* (i.e., 255) characters consisting of an initial slash, followed by one or
@@ -142,7 +142,7 @@ static apr_status_t shm_cleanup_owner(void *m_)
}
APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
- apr_size_t reqsize,
+ apr_size_t reqsize,
const char *filename,
apr_pool_t *pool)
{
@@ -171,12 +171,12 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
new_m = apr_palloc(pool, sizeof(apr_shm_t));
new_m->pool = pool;
new_m->reqsize = reqsize;
- new_m->realsize = reqsize +
+ new_m->realsize = reqsize +
APR_ALIGN_DEFAULT(sizeof(apr_size_t)); /* room for metadata */
new_m->filename = NULL;
-
+
#if APR_USE_SHMEM_MMAP_ZERO
- status = apr_file_open(&file, "/dev/zero", APR_FOPEN_READ | APR_FOPEN_WRITE,
+ status = apr_file_open(&file, "/dev/zero", APR_FOPEN_READ | APR_FOPEN_WRITE,
APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
return status;
@@ -280,15 +280,15 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
const char *shm_name = make_shm_open_safe_name(filename, pool);
#endif
#if APR_USE_SHMEM_MMAP_TMP || APR_USE_SHMEM_MMAP_SHM
- new_m->realsize = reqsize +
+ new_m->realsize = reqsize +
APR_ALIGN_DEFAULT(sizeof(apr_size_t)); /* room for metadata */
/* FIXME: Ignore error for now. *
* status = apr_file_remove(file, pool);*/
status = APR_SUCCESS;
-
+
#if APR_USE_SHMEM_MMAP_TMP
/* FIXME: Is APR_FPROT_OS_DEFAULT sufficient? */
- status = apr_file_open(&file, filename,
+ status = apr_file_open(&file, filename,
APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
@@ -327,7 +327,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
status = apr_os_file_put(&file, &tmpfd,
APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
- pool);
+ pool);
if (status != APR_SUCCESS) {
return status;
}
@@ -362,7 +362,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
new_m->realsize = reqsize;
/* FIXME: APR_FPROT_OS_DEFAULT is too permissive, switch to 600 I think. */
- status = apr_file_open(&file, filename,
+ status = apr_file_open(&file, filename,
APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
@@ -415,7 +415,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
apr_pool_cleanup_register(new_m->pool, new_m, shm_cleanup_owner,
apr_pool_cleanup_null);
- *m = new_m;
+ *m = new_m;
return APR_SUCCESS;
#else
@@ -424,9 +424,9 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
}
}
-APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
- apr_size_t reqsize,
- const char *filename,
+APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
+ apr_size_t reqsize,
+ const char *filename,
apr_pool_t *p,
apr_int32_t flags)
{
@@ -438,7 +438,7 @@ APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename,
{
#if APR_USE_SHMEM_SHMGET
apr_status_t status;
- apr_file_t *file;
+ apr_file_t *file;
key_t shmkey;
int shmid;
#endif
@@ -452,7 +452,7 @@ APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename,
}
return APR_SUCCESS;
#elif APR_USE_SHMEM_SHMGET
- /* Presume that the file already exists; just open for writing */
+ /* Presume that the file already exists; just open for writing */
status = apr_file_open(&file, filename, APR_FOPEN_WRITE,
APR_FPROT_OS_DEFAULT, pool);
if (status) {
@@ -490,7 +490,7 @@ shm_remove_failed:
/* No support for anonymous shm */
return APR_ENOTIMPL;
#endif
-}
+}
APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m)
{
@@ -500,7 +500,7 @@ APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m)
else {
return APR_ENOTIMPL;
}
-}
+}
APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shm_t *m)
{
@@ -563,13 +563,13 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
status = apr_os_file_put(&file, &tmpfd,
APR_READ | APR_WRITE,
- pool);
+ pool);
if (status != APR_SUCCESS) {
return status;
}
#elif APR_USE_SHMEM_MMAP_TMP
- status = apr_file_open(&file, filename,
+ status = apr_file_open(&file, filename,
APR_FOPEN_READ | APR_FOPEN_WRITE,
APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
@@ -602,7 +602,7 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
new_m->base = mmap(NULL, new_m->realsize, PROT_READ | PROT_WRITE,
MAP_SHARED, tmpfd, 0);
/* FIXME: check for errors */
-
+
status = apr_file_close(file);
if (status != APR_SUCCESS) {
return status;
@@ -624,7 +624,7 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
new_m = apr_palloc(pool, sizeof(apr_shm_t));
- status = apr_file_open(&file, filename,
+ status = apr_file_open(&file, filename,
APR_FOPEN_READ, APR_FPROT_OS_DEFAULT, pool);
if (status != APR_SUCCESS) {
return status;
@@ -727,5 +727,5 @@ APR_DECLARE(apr_status_t) apr_os_shm_put(apr_shm_t **m,
apr_pool_t *pool)
{
return APR_ENOTIMPL;
-}
+}
diff --git a/shmem/win32/shm.c b/shmem/win32/shm.c
index b873942ce..9486f0f1f 100644
--- a/shmem/win32/shm.c
+++ b/shmem/win32/shm.c
@@ -41,7 +41,7 @@ static apr_status_t shm_cleanup(void* shm)
{
apr_status_t rv = APR_SUCCESS;
apr_shm_t *m = shm;
-
+
if (!UnmapViewOfFile(m->memblk)) {
rv = apr_get_os_error();
}
@@ -140,7 +140,7 @@ APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
SYSTEM_INFO si;
GetSystemInfo(&si);
memblock = si.dwAllocationGranularity;
- }
+ }
/* Compute the granualar multiple of the pagesize */
size = memblock * (1 + (reqsize - 1) / memblock);
@@ -159,7 +159,7 @@ APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
else {
int global;
- /* Do file backed, which is not an inherited handle
+ /* Do file backed, which is not an inherited handle
* While we could open APR_FOPEN_EXCL, it doesn't seem that Unix
* ever did. Ignore that error here, but fail later when
* we discover we aren't the creator of the file map object.
@@ -189,7 +189,7 @@ APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
mapkey = res_name_from_filename(file, global, pool);
}
- hMap = CreateFileMappingW(hFile, NULL, PAGE_READWRITE,
+ hMap = CreateFileMappingW(hFile, NULL, PAGE_READWRITE,
sizehi, sizelo, mapkey);
err = apr_get_os_error();
@@ -204,14 +204,14 @@ APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
if (!hMap) {
return err;
}
-
+
base = MapViewOfFile(hMap, FILE_MAP_READ | FILE_MAP_WRITE,
0, 0, size);
if (!base) {
CloseHandle(hMap);
return apr_get_os_error();
}
-
+
*m = (apr_shm_t *) apr_palloc(pool, sizeof(apr_shm_t));
(*m)->pool = pool;
(*m)->hMap = hMap;
@@ -220,12 +220,12 @@ APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
(*m)->usrmem = (char*)base + sizeof(memblock_t);
(*m)->length = reqsize - sizeof(memblock_t);;
-
+
(*m)->memblk->length = (*m)->length;
(*m)->memblk->size = (*m)->size;
(*m)->filename = file ? apr_pstrdup(pool, file) : NULL;
- apr_pool_cleanup_register((*m)->pool, *m,
+ apr_pool_cleanup_register((*m)->pool, *m,
shm_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -238,7 +238,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
return apr_shm_create_ex(m, reqsize, file, pool, 0);
}
-APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shm_t *m)
+APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shm_t *m)
{
apr_status_t rv = shm_cleanup(m);
apr_pool_cleanup_kill(m->pool, m, shm_cleanup);
@@ -259,7 +259,7 @@ APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m)
else {
return APR_ENOTIMPL;
}
-}
+}
static apr_status_t shm_attach_internal(apr_shm_t **m,
const char *file,
@@ -280,13 +280,13 @@ static apr_status_t shm_attach_internal(apr_shm_t **m,
if (!hMap) {
return apr_get_os_error();
}
-
+
base = MapViewOfFile(hMap, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
if (!base) {
CloseHandle(hMap);
return apr_get_os_error();
}
-
+
*m = (apr_shm_t *) apr_palloc(pool, sizeof(apr_shm_t));
(*m)->pool = pool;
(*m)->memblk = base;
@@ -297,7 +297,7 @@ static apr_status_t shm_attach_internal(apr_shm_t **m,
(*m)->usrmem = (char*)base + sizeof(memblock_t);
(*m)->filename = NULL;
- apr_pool_cleanup_register((*m)->pool, *m,
+ apr_pool_cleanup_register((*m)->pool, *m,
shm_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -388,7 +388,7 @@ APR_DECLARE(apr_status_t) apr_os_shm_put(apr_shm_t **m,
if (!base) {
return apr_get_os_error();
}
-
+
*m = (apr_shm_t *) apr_palloc(pool, sizeof(apr_shm_t));
(*m)->pool = pool;
(*m)->hMap = *osshm;
@@ -399,8 +399,8 @@ APR_DECLARE(apr_status_t) apr_os_shm_put(apr_shm_t **m,
(*m)->length = (*m)->memblk->length;
(*m)->filename = NULL;
- apr_pool_cleanup_register((*m)->pool, *m,
+ apr_pool_cleanup_register((*m)->pool, *m,
shm_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
-}
+}
diff --git a/strings/apr_cpystrn.c b/strings/apr_cpystrn.c
index fb96025a0..b70b1048b 100644
--- a/strings/apr_cpystrn.c
+++ b/strings/apr_cpystrn.c
@@ -70,10 +70,10 @@ APR_DECLARE(char *) apr_cpystrn(char *dst, const char *src, apr_size_t dst_size)
/*
* This function provides a way to parse a generic argument string
- * into a standard argv[] form of argument list. It respects the
+ * into a standard argv[] form of argument list. It respects the
* usual "whitespace" and quoteing rules. In the future this could
* be expanded to include support for the apr_call_exec command line
- * string processing (including converting '+' to ' ' and doing the
+ * string processing (including converting '+' to ' ' and doing the
* url processing. It does not currently support this function.
*
* token_context: Context from which pool allocations will occur.
@@ -82,9 +82,9 @@ APR_DECLARE(char *) apr_cpystrn(char *dst, const char *src, apr_size_t dst_size)
* of pointers to strings (ie. &(char *argv[]).
* This value will be allocated from the contexts
* pool and filled in with copies of the tokens
- * found during parsing of the arg_str.
+ * found during parsing of the arg_str.
*/
-APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str,
+APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str,
char ***argv_out,
apr_pool_t *token_context)
{
@@ -127,7 +127,7 @@ APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str,
break; \
} \
}
-
+
/* REMOVE_ESCAPE_CHARS:
* Compresses the arg string to remove all of the '\' escape chars.
* The final argv strings should not have any extra escape chars in it.
@@ -151,7 +151,7 @@ APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str,
ct = cp;
/* This is ugly and expensive, but if anyone wants to figure a
- * way to support any number of args without counting and
+ * way to support any number of args without counting and
* allocating, please go ahead and change the code.
*
* Must account for the trailing NULL arg.
@@ -220,7 +220,7 @@ APR_DECLARE(const char *) apr_filepath_name_get(const char *pathname)
APR_DECLARE(char *) apr_collapse_spaces(char *dest, const char *src)
{
while (*src) {
- if (!apr_isspace(*src))
+ if (!apr_isspace(*src))
*dest++ = *src;
++src;
}
diff --git a/strings/apr_cstr.c b/strings/apr_cstr.c
index e65077a6e..2abd325c2 100644
--- a/strings/apr_cstr.c
+++ b/strings/apr_cstr.c
@@ -238,7 +238,7 @@ static const unsigned char ucharmap[256] = {
* conformance, arbitrary election of an ISO-8859-1 ordering, and
* very arbitrary control code assignments into C1 to achieve
* identity and a reversible mapping of code points),
- * then folding the equivalences of ASCII 41-5A into 61-7A,
+ * then folding the equivalences of ASCII 41-5A into 61-7A,
* presenting comparison results in a somewhat ISO/IEC 10646
* (ASCII-like) order, depending on the EBCDIC code page in use.
*
diff --git a/strings/apr_fnmatch.c b/strings/apr_fnmatch.c
index 7dfa84699..e0ef875d2 100644
--- a/strings/apr_fnmatch.c
+++ b/strings/apr_fnmatch.c
@@ -12,7 +12,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- */
+ */
/* Derived from The Open Group Base Specifications Issue 7, IEEE Std 1003.1-2008
@@ -22,9 +22,9 @@
* Filename pattern matches defined in section 2.13, "Pattern Matching Notation"
* from chapter 2. "Shell Command Language"
* http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13
- * where; 1. A bracket expression starting with an unquoted <circumflex> '^'
- * character CONTINUES to specify a non-matching list; 2. an explicit <period> '.'
- * in a bracket expression matching list, e.g. "[.abc]" does NOT match a leading
+ * where; 1. A bracket expression starting with an unquoted <circumflex> '^'
+ * character CONTINUES to specify a non-matching list; 2. an explicit <period> '.'
+ * in a bracket expression matching list, e.g. "[.abc]" does NOT match a leading
* <period> in a filename; 3. a <left-square-bracket> '[' which does not introduce
* a valid bracket expression is treated as an ordinary character; 4. a differing
* number of consecutive slashes within pattern and string will NOT match;
@@ -33,10 +33,10 @@
* Bracket expansion defined in section 9.3.5, "RE Bracket Expression",
* from chapter 9, "Regular Expressions"
* http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05
- * with no support for collating symbols, equivalence class expressions or
- * character class expressions. A partial range expression with a leading
+ * with no support for collating symbols, equivalence class expressions or
+ * character class expressions. A partial range expression with a leading
* hyphen following a valid range expression will match only the ordinary
- * <hyphen> and the ending character (e.g. "[a-m-z]" will match characters
+ * <hyphen> and the ending character (e.g. "[a-m-z]" will match characters
* 'a' through 'm', a <hyphen> '-', or a 'z').
*
* NOTE: Only POSIX/C single byte locales are correctly supported at this time.
@@ -65,7 +65,7 @@
/* Most MBCS/collation/case issues handled here. Wildcard '*' is not handled.
- * EOS '\0' and the FNM_PATHNAME '/' delimiters are not advanced over,
+ * EOS '\0' and the FNM_PATHNAME '/' delimiters are not advanced over,
* however the "\/" sequence is advanced to '/'.
*
* Both pattern and string are **char to support pointer increment of arbitrary
@@ -116,7 +116,7 @@ static APR_INLINE int fnmatch_ch(const char **pattern, const char **string, int
break;
leadingclosebrace:
- /* Look at only well-formed range patterns;
+ /* Look at only well-formed range patterns;
* "x-]" is not allowed unless escaped ("x-\]")
* XXX: Fix for locale/MBCS character width
*/
@@ -125,7 +125,7 @@ leadingclosebrace:
startch = *pattern;
*pattern += (escape && ((*pattern)[2] == '\\')) ? 3 : 2;
- /* NOT a properly balanced [expr] pattern, EOS terminated
+ /* NOT a properly balanced [expr] pattern, EOS terminated
* or ranges containing a slash in FNM_PATHNAME mode pattern
* fall out to to the rewind and test '[' literal code path
*/
@@ -137,7 +137,7 @@ leadingclosebrace:
result = 0;
else if (nocase && (isupper(**string) || isupper(*startch)
|| isupper(**pattern))
- && (tolower(**string) >= tolower(*startch))
+ && (tolower(**string) >= tolower(*startch))
&& (tolower(**string) <= tolower(**pattern)))
result = 0;
@@ -220,7 +220,7 @@ APR_DECLARE(int) apr_fnmatch(const char *pattern, const char *string, int flags)
if (slash && (*pattern == '/') && (*string == '/')) {
++pattern;
++string;
- }
+ }
firstsegment:
/* At the beginning of each segment, validate leading period behavior.
@@ -289,7 +289,7 @@ firstsegment:
*/
for (matchptr = pattern, matchlen = 0; 1; ++matchlen)
{
- if ((*matchptr == '\0')
+ if ((*matchptr == '\0')
|| (slash && ((*matchptr == '/')
|| (escape && (*matchptr == '\\')
&& (matchptr[1] == '/')))))
@@ -321,7 +321,7 @@ firstsegment:
/* Skip forward in pattern by a single character match
* Use a dummy fnmatch_ch() test to count one "[range]" escape
- */
+ */
/* XXX: Adjust for MBCS */
if (escape && (*matchptr == '\\') && matchptr[1]) {
matchptr += 2;
@@ -357,7 +357,7 @@ firstsegment:
if (!fnmatch_ch(&pattern, &string, flags))
continue;
- /* Failed to match, loop against next char offset of string segment
+ /* Failed to match, loop against next char offset of string segment
* until not enough string chars remain to match the fixed pattern
*/
if (wild) {
@@ -396,7 +396,7 @@ firstsegment:
/* This function is an Apache addition
* return non-zero if pattern has any glob chars in it
* @bug Function does not distinguish for FNM_PATHNAME mode, which renders
- * a false positive for test[/]this (which is not a range, but
+ * a false positive for test[/]this (which is not a range, but
* seperate test[ and ]this segments and no glob.)
* @bug Function does not distinguish for non-FNM_ESCAPE mode.
* @bug Function does not parse []] correctly
@@ -435,7 +435,7 @@ APR_DECLARE(int) apr_fnmatch_test(const char *pattern)
/* Find all files matching the specified pattern */
-APR_DECLARE(apr_status_t) apr_match_glob(const char *pattern,
+APR_DECLARE(apr_status_t) apr_match_glob(const char *pattern,
apr_array_header_t **result,
apr_pool_t *p)
{
@@ -454,7 +454,7 @@ APR_DECLARE(apr_status_t) apr_match_glob(const char *pattern,
* I get to it. rbb
*/
char *idx = strrchr(pattern, '/');
-
+
if (idx == NULL) {
idx = strrchr(pattern, '\\');
}
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c
index 4acbe2fa5..6c2549f42 100644
--- a/strings/apr_snprintf.c
+++ b/strings/apr_snprintf.c
@@ -83,13 +83,13 @@ static const char null_string[] = "(null)";
#define NDIG 80
/* buf must have at least NDIG bytes */
-static char *apr_cvt(double arg, int ndigits, int *decpt, int *sign,
+static char *apr_cvt(double arg, int ndigits, int *decpt, int *sign,
int eflag, char *buf)
{
register int r2;
double fi, fj;
register char *p, *p1;
-
+
if (ndigits >= NDIG - 1)
ndigits = NDIG - 2;
r2 = 0;
@@ -340,7 +340,7 @@ static char *conv_10(register apr_int32_t num, register int is_unsigned,
*is_negative = (num < 0);
/*
- * On a 2's complement machine, negating the most negative integer
+ * On a 2's complement machine, negating the most negative integer
* results in a number that cannot be represented as a signed integer.
* Here is what we do to obtain the number's magnitude:
* a. add 1 to the number
@@ -355,7 +355,7 @@ static char *conv_10(register apr_int32_t num, register int is_unsigned,
}
/*
- * We use a do-while loop so that we write at least 1 digit
+ * We use a do-while loop so that we write at least 1 digit
*/
do {
register apr_uint32_t new_magnitude = magnitude / 10;
@@ -392,7 +392,7 @@ static char *conv_10_quad(apr_int64_t num, register int is_unsigned,
*is_negative = (num < 0);
/*
- * On a 2's complement machine, negating the most negative integer
+ * On a 2's complement machine, negating the most negative integer
* results in a number that cannot be represented as a signed integer.
* Here is what we do to obtain the number's magnitude:
* a. add 1 to the number
@@ -407,7 +407,7 @@ static char *conv_10_quad(apr_int64_t num, register int is_unsigned,
}
/*
- * We use a do-while loop so that we write at least 1 digit
+ * We use a do-while loop so that we write at least 1 digit
*/
do {
apr_uint64_t new_magnitude = magnitude / 10;
@@ -823,7 +823,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
(sizeof(APR_OFF_T_FMT) == 3 &&
fmt[0] == APR_OFF_T_FMT[0]) ||
(sizeof(APR_OFF_T_FMT) > 4 &&
- strncmp(fmt, APR_OFF_T_FMT,
+ strncmp(fmt, APR_OFF_T_FMT,
sizeof(APR_OFF_T_FMT) - 2) == 0))) {
/* Need to account for trailing 'd' and null in sizeof() */
var_type = IS_QUAD;
@@ -835,7 +835,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
(sizeof(APR_INT64_T_FMT) == 3 &&
fmt[0] == APR_INT64_T_FMT[0]) ||
(sizeof(APR_INT64_T_FMT) > 4 &&
- strncmp(fmt, APR_INT64_T_FMT,
+ strncmp(fmt, APR_INT64_T_FMT,
sizeof(APR_INT64_T_FMT) - 2) == 0)) {
/* Need to account for trailing 'd' and null in sizeof() */
var_type = IS_QUAD;
@@ -1323,7 +1323,7 @@ APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
}
/*
- * Print the string s.
+ * Print the string s.
*/
if (print_something == YES) {
for (i = s_len; i != 0; i--) {
@@ -1352,7 +1352,7 @@ static int snprintf_flush(apr_vformatter_buff_t *vbuff)
}
-APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, apr_size_t len,
+APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, apr_size_t len,
const char *format, ...)
{
int cc;
diff --git a/strings/apr_strings.c b/strings/apr_strings.c
index 2519f95b9..ad8c05508 100644
--- a/strings/apr_strings.c
+++ b/strings/apr_strings.c
@@ -160,7 +160,7 @@ APR_DECLARE_NONSTD(char *) apr_pstrcat(apr_pool_t *a, ...)
else {
len = strlen(argp);
}
-
+
memcpy(cp, argp, len);
cp += len;
}
@@ -196,7 +196,7 @@ APR_DECLARE(char *) apr_pstrcatv(apr_pool_t *a, const struct iovec *vec,
/* Allocate the required string */
res = (char *) apr_palloc(a, len + 1);
-
+
/* Pass two --- copy the argument strings into the result space */
src = vec;
dst = res;
@@ -325,7 +325,7 @@ APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base)
* in both the mult and add/sub operation. Unlike the bsd impl,
* we also work strictly in a signed int64 word as we haven't
* implemented the unsigned type in win32.
- *
+ *
* Set 'any' if any `digits' consumed; make it negative to indicate
* overflow.
*/
@@ -352,7 +352,7 @@ APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base)
else if (c >= 's' && c <= 'z')
c -= 'z' - 28;
#else
-#error "CANNOT COMPILE apr_strtoi64(), only ASCII and EBCDIC supported"
+#error "CANNOT COMPILE apr_strtoi64(), only ASCII and EBCDIC supported"
#endif
else
break;
diff --git a/strings/apr_strnatcmp.c b/strings/apr_strnatcmp.c
index 0e960e8a9..befb89e4b 100644
--- a/strings/apr_strnatcmp.c
+++ b/strings/apr_strnatcmp.c
@@ -37,7 +37,7 @@ static int
compare_right(char const *a, char const *b)
{
int bias = 0;
-
+
/* The longest run of digits wins. That aside, the greatest
value wins, but we can't know that it will until we've scanned
both numbers to know that they have the same magnitude, so we
@@ -80,7 +80,7 @@ compare_left(char const *a, char const *b)
else if (*a > *b)
return +1;
}
-
+
return 0;
}
@@ -124,7 +124,7 @@ static int strnatcmp0(char const *a, char const *b, int fold_case)
ca = apr_toupper(ca);
cb = apr_toupper(cb);
}
-
+
if (ca < cb)
return -1;
else if (ca > cb)
diff --git a/strings/apr_strtok.c b/strings/apr_strtok.c
index 517b319d4..6be8f0034 100644
--- a/strings/apr_strtok.c
+++ b/strings/apr_strtok.c
@@ -41,7 +41,7 @@ APR_DECLARE(char *) apr_strtok(char *str, const char *sep, char **last)
token = str;
/* skip valid token characters to terminate token and
- * prepare for the next call (will terminate at '\0)
+ * prepare for the next call (will terminate at '\0)
*/
*last = token + 1;
while (**last && !strchr(sep, **last))
diff --git a/tables/apr_hash.c b/tables/apr_hash.c
index d4567710d..49ff7623c 100644
--- a/tables/apr_hash.c
+++ b/tables/apr_hash.c
@@ -213,7 +213,7 @@ static unsigned int hashfunc_default(const char *char_key, apr_ssize_t *klen,
const unsigned char *key = (const unsigned char *)char_key;
const unsigned char *p;
apr_ssize_t i;
-
+
/*
* This is the popular `times 33' hash algorithm which is used by
* perl and also appears in Berkeley DB. This is one of the best
diff --git a/tables/apr_skiplist.c b/tables/apr_skiplist.c
index 8013ed781..eb6f40f31 100644
--- a/tables/apr_skiplist.c
+++ b/tables/apr_skiplist.c
@@ -29,7 +29,7 @@ typedef struct {
apr_skiplistnode **data;
size_t size, pos;
apr_pool_t *p;
-} apr_skiplist_q;
+} apr_skiplist_q;
struct apr_skiplist {
apr_skiplist_compare compare;
diff --git a/tables/apr_tables.c b/tables/apr_tables.c
index 9dc594c13..141dc1c16 100644
--- a/tables/apr_tables.c
+++ b/tables/apr_tables.c
@@ -100,7 +100,7 @@ APR_DECLARE(void *) apr_array_pop(apr_array_header_t *arr)
if (apr_is_empty_array(arr)) {
return NULL;
}
-
+
return arr->elts + (arr->elt_size * (--arr->nelts));
}
@@ -366,7 +366,7 @@ typedef struct
} table_getm_t;
/*
- * NOTICE: if you tweak this you should look at is_empty_table()
+ * NOTICE: if you tweak this you should look at is_empty_table()
* and table_elts() in alloc.h
*/
#ifdef MAKE_TABLE_PROFILE
@@ -895,15 +895,15 @@ APR_DECLARE(apr_table_t *) apr_table_overlay(apr_pool_t *p,
* caller can pass additional info for the task.
*
* ADDENDUM for apr_table_vdo():
- *
+ *
* The caching api will allow a user to walk the header values:
*
- * apr_status_t apr_cache_el_header_walk(apr_cache_el *el,
+ * apr_status_t apr_cache_el_header_walk(apr_cache_el *el,
* int (*comp)(void *, const char *, const char *), void *rec, ...);
*
* So it can be ..., however from there I use a callback that use a va_list:
*
- * apr_status_t (*cache_el_header_walk)(apr_cache_el *el,
+ * apr_status_t (*cache_el_header_walk)(apr_cache_el *el,
* int (*comp)(void *, const char *, const char *), void *rec, va_list);
*
* To pass those ...'s on down to the actual module that will handle walking
@@ -911,7 +911,7 @@ APR_DECLARE(apr_table_t *) apr_table_overlay(apr_pool_t *p,
* rather than reimplementing apr_table_do (which IMHO would be bad) I just
* called it with the va_list. For mod_shmem_cache I don't need it since I
* can't use apr_table's, but mod_file_cache should (though a good hash would
- * be better, but that's a different issue :).
+ * be better, but that's a different issue :).
*
* So to make mod_file_cache easier to maintain, it's a good thing
*/
@@ -926,7 +926,7 @@ APR_DECLARE_NONSTD(int) apr_table_do(apr_table_do_callback_fn_t *comp,
va_end(vp);
return rv;
-}
+}
/* XXX: do the semantics of this routine make any sense? Right now,
* if the caller passed in a non-empty va_list of keys to search for,
@@ -1000,7 +1000,7 @@ APR_DECLARE(int) apr_table_vdo(apr_table_do_callback_fn_t *comp,
}
static apr_table_entry_t **table_mergesort(apr_pool_t *pool,
- apr_table_entry_t **values,
+ apr_table_entry_t **values,
apr_size_t n)
{
/* Bottom-up mergesort, based on design in Sedgewick's "Algorithms
diff --git a/test/abts.c b/test/abts.c
index e03ccc461..eb029d402 100644
--- a/test/abts.c
+++ b/test/abts.c
@@ -97,7 +97,7 @@ abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full)
char *p;
const char *suite_name;
curr_char = 0;
-
+
/* Only end the suite if we actually ran it */
if (suite && suite->tail &&!suite->tail->not_run) {
end_suite(suite);
@@ -108,7 +108,7 @@ abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full)
subsuite->failed = 0;
subsuite->skipped = 0;
subsuite->next = NULL;
- /* suite_name_full may be an absolute path depending on __FILE__
+ /* suite_name_full may be an absolute path depending on __FILE__
* expansion */
suite_name = strrchr(suite_name_full, '/');
if (!suite_name) {
@@ -131,7 +131,7 @@ abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full)
if (list_tests) {
fprintf(stdout, "%s\n", subsuite->name);
}
-
+
subsuite->not_run = 0;
if (suite == NULL) {
@@ -185,12 +185,12 @@ void abts_run_test(abts_suite *ts, test_func f, void *value)
tc.failed = 0;
tc.skipped = 0;
tc.suite = ss;
-
+
ss->num_test++;
update_status();
f(&tc, value);
-
+
if (tc.failed) {
ss->failed++;
}
@@ -373,7 +373,7 @@ void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno)
fflush(stderr);
}
}
-
+
void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno)
{
update_status();
@@ -456,7 +456,7 @@ int main(int argc, const char *const argv[]) {
int rv;
int list_provided = 0;
abts_suite *suite = NULL;
-
+
initialize();
quiet = !isatty(STDOUT_FILENO);
@@ -503,4 +503,4 @@ int main(int argc, const char *const argv[]) {
abts_free_suite(suite);
return rv;
}
-
+
diff --git a/test/echod.c b/test/echod.c
index 052e47d87..537c03cf5 100644
--- a/test/echod.c
+++ b/test/echod.c
@@ -28,7 +28,7 @@
#define BUF_SIZE 4096
-static void reportError(const char *msg, apr_status_t rv,
+static void reportError(const char *msg, apr_status_t rv,
apr_pool_t *pool)
{
fprintf(stderr, "%s\nError: %d\n'%s'\n", msg, rv,
diff --git a/test/globalmutexchild.c b/test/globalmutexchild.c
index 4b8737b02..d5149fb46 100644
--- a/test/globalmutexchild.c
+++ b/test/globalmutexchild.c
@@ -37,7 +37,7 @@ int main(int argc, const char * const argv[])
apr_initialize();
atexit(apr_terminate);
-
+
apr_pool_create(&p, NULL);
if (argc >= 2) {
mech = (apr_lockmech_e)apr_strtoi64(argv[1], NULL, 0);
@@ -50,7 +50,7 @@ int main(int argc, const char * const argv[])
exit(-rv);
}
apr_global_mutex_child_init(&global_lock, LOCKNAME, p);
-
+
while (1) {
apr_global_mutex_lock(global_lock);
if (i == MAX_ITER) {
diff --git a/test/internal/testregex.c b/test/internal/testregex.c
index 20dcfdebe..5fc4d9ec8 100644
--- a/test/internal/testregex.c
+++ b/test/internal/testregex.c
@@ -34,14 +34,14 @@ int main( int argc, char** argv) {
apr_time_t now;
apr_time_t end;
apr_hash_t *h;
-
+
if (argc !=4 ) {
fprintf(stderr, "Usage %s match string #iterations\n",argv[0]);
return -1;
}
iters = atoi( argv[3]);
-
+
apr_initialize() ;
atexit(apr_terminate);
if (apr_pool_create(&context, NULL) != APR_SUCCESS) {
@@ -86,6 +86,6 @@ int main( int argc, char** argv) {
}
end=apr_time_now();
puts(apr_psprintf( context, "Time to run %d hash (find)'s %8lld\n",iters,end-now));
-
+
return 0;
}
diff --git a/test/internal/testutf.c b/test/internal/testutf.c
index a5b167170..db0c812f5 100644
--- a/test/internal/testutf.c
+++ b/test/internal/testutf.c
@@ -82,7 +82,7 @@ void displaynw(struct testval *f, struct testval *l)
apr_size_t i;
for (i = 0; i < f->nl; ++i)
t += sprintf(t, "%02X ", f->n[i]);
- *(t++) = '-';
+ *(t++) = '-';
for (i = 0; i < l->nl; ++i)
t += sprintf(t, " %02X", l->n[i]);
*(t++) = ' ';
@@ -98,7 +98,7 @@ void displaynw(struct testval *f, struct testval *l)
}
/*
- * Test every possible byte value.
+ * Test every possible byte value.
* If the test passes or fails at this byte value we are done.
* Otherwise iterate test_nrange again, appending another byte.
*/
@@ -107,10 +107,10 @@ void test_nrange(struct testval *p)
struct testval f, l, s;
apr_status_t rc;
int success = 0;
-
+
memcpy (&s, p, sizeof(s));
- ++s.nl;
-
+ ++s.nl;
+
do {
apr_size_t nl = s.nl, wl = sizeof(s.w) / 2;
rc = apr_conv_utf8_to_utf16(s.n, &nl, s.w, &wl);
@@ -121,13 +121,13 @@ void test_nrange(struct testval *p)
success = -1;
}
else {
- if (s.wl != l.wl
+ if (s.wl != l.wl
|| memcmp(s.w, l.w, (s.wl - 1) * 2) != 0
|| s.w[s.wl - 1] != l.w[l.wl - 1] + 1) {
displaynw(&f, &l);
memcpy(&f, &s, sizeof(s));
}
- }
+ }
memcpy(&l, &s, sizeof(s));
}
else {
@@ -147,10 +147,10 @@ void test_nrange(struct testval *p)
}
}
-/*
- * Test every possible word value.
+/*
+ * Test every possible word value.
* Once we are finished, retest every possible word value.
- * if the test fails on the following null word, iterate test_nrange
+ * if the test fails on the following null word, iterate test_nrange
* again, appending another word.
* This assures the output order of the two tests are in sync.
*/
@@ -159,12 +159,12 @@ void test_wrange(struct testval *p)
struct testval f, l, s;
apr_status_t rc;
int success = 0;
-
+
memcpy (&s, p, sizeof(s));
- ++s.wl;
-
+ ++s.wl;
+
do {
- apr_size_t nl = sizeof(s.n), wl = s.wl;
+ apr_size_t nl = sizeof(s.n), wl = s.wl;
rc = apr_conv_utf16_to_utf8(s.w, &wl, s.n, &nl);
s.nl = sizeof(s.n) - nl;
if (!wl && rc == APR_SUCCESS) {
@@ -173,13 +173,13 @@ void test_wrange(struct testval *p)
success = -1;
}
else {
- if (s.nl != l.nl
+ if (s.nl != l.nl
|| memcmp(s.n, l.n, s.nl - 1) != 0
|| s.n[s.nl - 1] != l.n[l.nl - 1] + 1) {
displaynw(&f, &l);
memcpy(&f, &s, sizeof(s));
}
- }
+ }
memcpy(&l, &s, sizeof(s));
}
else {
@@ -206,7 +206,7 @@ void test_wrange(struct testval *p)
}
/*
- * Test every possible byte value.
+ * Test every possible byte value.
* If the test passes or fails at this byte value we are done.
* Otherwise iterate test_nrange again, appending another byte.
*/
diff --git a/test/proc_child.c b/test/proc_child.c
index 9f458b9a3..56c036f5a 100644
--- a/test/proc_child.c
+++ b/test/proc_child.c
@@ -12,7 +12,7 @@ int main(void)
{
char buf[256];
int bytes, rv = 0;
-
+
bytes = (int)read(STDIN_FILENO, buf, 256);
if (bytes > 0)
rv = write(STDOUT_FILENO, buf, (unsigned int)bytes) == bytes ? 0 : 1;
diff --git a/test/readchild.c b/test/readchild.c
index f8443cceb..eb1ed987b 100644
--- a/test/readchild.c
+++ b/test/readchild.c
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
apr_pool_t *p;
char buf[128];
apr_status_t rv;
-
+
apr_initialize();
atexit(apr_terminate);
apr_pool_create(&p, NULL);
diff --git a/test/sendfile.c b/test/sendfile.c
index a09df421f..32e04d488 100644
--- a/test/sendfile.c
+++ b/test/sendfile.c
@@ -30,7 +30,7 @@
#if !APR_HAS_SENDFILE
int main(void)
{
- fprintf(stderr,
+ fprintf(stderr,
"This program won't work on this platform because there is no "
"support for sendfile().\n");
return 0;
@@ -95,13 +95,13 @@ static void create_testfile(apr_pool_t *p, const char *fname)
apr_finfo_t finfo;
printf("Creating a test file...\n");
- rv = apr_file_open(&f, fname,
+ rv = apr_file_open(&f, fname,
APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_TRUNCATE | APR_FOPEN_BUFFERED,
APR_FPROT_UREAD | APR_FPROT_UWRITE, p);
if (rv) {
aprerr("apr_file_open()", rv);
}
-
+
buf[0] = FILE_DATA_CHAR;
buf[1] = '\0';
for (i = 0; i < FILE_LENGTH; i++) {
@@ -131,7 +131,7 @@ static void create_testfile(apr_pool_t *p, const char *fname)
}
if (finfo.size != FILE_LENGTH) {
- fprintf(stderr,
+ fprintf(stderr,
"test file %s should be %ld-bytes long\n"
"instead it is %ld-bytes long\n",
fname,
@@ -290,11 +290,11 @@ static int client(apr_pool_t *p, client_socket_mode_t socket_mode,
memset(hdtr.trailers[2].iov_base, TRL3_CHAR, TRL3_LEN);
hdtr.trailers[2].iov_len = TRL3_LEN;
- expected_len =
+ expected_len =
strlen(HDR1) + strlen(HDR2) + HDR3_LEN +
strlen(TRL1) + strlen(TRL2) + TRL3_LEN +
FILE_LENGTH;
-
+
if (socket_mode == BLK) {
current_file_offset = 0;
len = FILE_LENGTH;
@@ -302,13 +302,13 @@ static int client(apr_pool_t *p, client_socket_mode_t socket_mode,
if (rv != APR_SUCCESS) {
aprerr("apr_socket_sendfile()", rv);
}
-
+
printf("apr_socket_sendfile() updated offset with %ld\n",
(long int)current_file_offset);
-
+
printf("apr_socket_sendfile() updated len with %ld\n",
(long int)len);
-
+
printf("bytes really sent: %" APR_SIZE_T_FMT "\n",
expected_len);
@@ -333,7 +333,7 @@ static int client(apr_pool_t *p, client_socket_mode_t socket_mode,
pfd.desc.s = sock;
pfd.client_data = NULL;
- rv = apr_pollset_add(pset, &pfd);
+ rv = apr_pollset_add(pset, &pfd);
assert(!rv);
total_bytes_sent = 0;
@@ -388,7 +388,7 @@ static int client(apr_pool_t *p, client_socket_mode_t socket_mode,
}
else {
hdtr.headers[0].iov_len -= tmplen;
- hdtr.headers[0].iov_base =
+ hdtr.headers[0].iov_base =
(char*) hdtr.headers[0].iov_base + tmplen;
tmplen = 0;
}
@@ -421,14 +421,14 @@ static int client(apr_pool_t *p, client_socket_mode_t socket_mode,
}
else {
hdtr.trailers[0].iov_len -= tmplen;
- hdtr.trailers[0].iov_base =
+ hdtr.trailers[0].iov_base =
(char *)hdtr.trailers[0].iov_base + tmplen;
tmplen = 0;
}
}
} while (total_bytes_sent < expected_len &&
- (rv == APR_SUCCESS ||
+ (rv == APR_SUCCESS ||
(APR_STATUS_IS_EAGAIN(rv) && socket_mode != TIMEOUT)));
if (total_bytes_sent != expected_len) {
fprintf(stderr,
@@ -444,7 +444,7 @@ static int client(apr_pool_t *p, client_socket_mode_t socket_mode,
exit(1);
}
}
-
+
current_file_offset = 0;
rv = apr_file_seek(f, APR_CUR, &current_file_offset);
if (rv != APR_SUCCESS) {
@@ -467,7 +467,7 @@ static int client(apr_pool_t *p, client_socket_mode_t socket_mode,
if (rv != APR_SUCCESS) {
aprerr("apr_socket_timeout_set()", rv);
}
-
+
bytes_read = 1;
rv = apr_socket_recv(sock, buf, &bytes_read);
if (rv != APR_EOF) {
@@ -575,7 +575,7 @@ static int server(apr_pool_t *p)
(int)bytes_read, buf, HDR1);
exit(1);
}
-
+
assert(sizeof buf > strlen(HDR2));
bytes_read = strlen(HDR2);
rv = apr_socket_recv(newsock, buf, &bytes_read);
@@ -614,7 +614,7 @@ static int server(apr_pool_t *p)
exit(1);
}
}
-
+
for (i = 0; i < FILE_LENGTH; i++) {
bytes_read = 1;
rv = apr_socket_recv(newsock, buf, &bytes_read);
@@ -636,7 +636,7 @@ static int server(apr_pool_t *p)
exit(1);
}
}
-
+
assert(sizeof buf > strlen(TRL1));
bytes_read = strlen(TRL1);
rv = apr_socket_recv(newsock, buf, &bytes_read);
@@ -653,7 +653,7 @@ static int server(apr_pool_t *p)
(int)bytes_read, buf, TRL1);
exit(1);
}
-
+
assert(sizeof buf > strlen(TRL2));
bytes_read = strlen(TRL2);
rv = apr_socket_recv(newsock, buf, &bytes_read);
@@ -692,7 +692,7 @@ static int server(apr_pool_t *p)
exit(1);
}
}
-
+
bytes_read = 1;
rv = apr_socket_recv(newsock, buf, &bytes_read);
if (rv != APR_EOF) {
@@ -752,7 +752,7 @@ int main(int argc, char *argv[])
}
else {
host = argv[i];
- }
+ }
}
return client(p, mode, host, start_server);
}
@@ -760,7 +760,7 @@ int main(int argc, char *argv[])
return server(p);
}
- fprintf(stderr,
+ fprintf(stderr,
"Usage: %s client {blocking|nonblocking|timeout} [startserver] [server-host]\n"
" %s server\n",
argv[0], argv[0]);
diff --git a/test/sockchild.c b/test/sockchild.c
index a1116af2b..29e261aa8 100644
--- a/test/sockchild.c
+++ b/test/sockchild.c
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
}
apr_socket_connect(sock, remote_sa);
-
+
if (!strcmp("read", argv[1])) {
char datarecv[STRLEN];
apr_size_t length = STRLEN;
@@ -60,13 +60,13 @@ int main(int argc, char *argv[])
rv = apr_socket_recv(sock, datarecv, &length);
apr_socket_close(sock);
if (APR_STATUS_IS_TIMEUP(rv)) {
- exit(SOCKET_TIMEOUT);
+ exit(SOCKET_TIMEOUT);
}
if (strcmp(datarecv, DATASTR)) {
exit(-1);
}
-
+
exit((int)length);
}
else if (!strcmp("write", argv[1])
diff --git a/test/sockperf.c b/test/sockperf.c
index b21becac2..02509af8f 100644
--- a/test/sockperf.c
+++ b/test/sockperf.c
@@ -58,14 +58,14 @@ struct testResult {
static apr_int16_t testPort = 4747;
static apr_sockaddr_t *sockAddr = NULL;
-static void reportError(const char *msg, apr_status_t rv,
+static void reportError(const char *msg, apr_status_t rv,
apr_pool_t *pool)
{
fprintf(stderr, "%s\n", msg);
if (rv != APR_SUCCESS)
fprintf(stderr, "Error: %d\n'%s'\n", rv,
apr_psprintf(pool, "%pm", &rv));
-
+
}
static void closeConnection(apr_socket_t *sock)
@@ -74,7 +74,7 @@ static void closeConnection(apr_socket_t *sock)
apr_socket_send(sock, NULL, &len);
}
-static apr_status_t sendRecvBuffer(apr_time_t *t, const char *buf,
+static apr_status_t sendRecvBuffer(apr_time_t *t, const char *buf,
apr_size_t size, apr_pool_t *pool)
{
apr_socket_t *sock;
@@ -142,14 +142,14 @@ static apr_status_t sendRecvBuffer(apr_time_t *t, const char *buf,
rv = apr_socket_send(sock, buf, &len);
if (rv != APR_SUCCESS || len != size) {
- reportError(apr_psprintf(pool,
+ reportError(apr_psprintf(pool,
"Unable to send data correctly (iteration %d of 3)",
i) , rv, pool);
closeConnection(sock);
apr_socket_close(sock);
return rv;
}
-
+
do {
len = thistime;
rv = apr_socket_recv(sock, &recvBuf[size - thistime], &len);
@@ -169,7 +169,7 @@ static apr_status_t sendRecvBuffer(apr_time_t *t, const char *buf,
if (thistime) {
reportError("Received less than we sent :-(", rv, pool);
return rv;
- }
+ }
if (strncmp(recvBuf, buf, size) != 0) {
reportError("Received corrupt data :-(", 0, pool);
printf("We sent:\n%s\nWe received:\n%s\n", buf, recvBuf);
@@ -186,7 +186,7 @@ static apr_status_t runTest(struct testSet *ts, struct testResult *res,
apr_status_t rv = APR_SUCCESS;
int i;
apr_size_t sz = ts->size * TEST_SIZE;
-
+
buffer = apr_palloc(pool, sz);
if (!buffer) {
reportError("Unable to allocate buffer", ENOMEM, pool);
@@ -224,7 +224,7 @@ int main(int argc, char **argv)
apr_pool_create(&pool, NULL);
- results = (struct testResult *)apr_pcalloc(pool,
+ results = (struct testResult *)apr_pcalloc(pool,
sizeof(*results) * nTests);
for (i = 0; i < nTests; i++) {
diff --git a/test/testargs.c b/test/testargs.c
index 405b3bed6..8c3829a02 100644
--- a/test/testargs.c
+++ b/test/testargs.c
@@ -52,7 +52,7 @@ static void no_options_found(abts_case *tc, void *data)
str[0] = '\0';
rv = apr_getopt_init(&opt, p, largc, largv);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
while (apr_getopt(opt, "abcd", &ch, &opt_arg) == APR_SUCCESS) {
switch (ch) {
case 'a':
@@ -85,7 +85,7 @@ static void no_options(abts_case *tc, void *data)
opt->errfn = unknown_arg;
opt->errarg = str;
-
+
while (apr_getopt(opt, "efgh", &ch, &opt_arg) == APR_SUCCESS) {
switch (ch) {
case 'a':
@@ -117,7 +117,7 @@ static void required_option(abts_case *tc, void *data)
opt->errfn = unknown_arg;
opt->errarg = str;
-
+
while (apr_getopt(opt, "a:", &ch, &opt_arg) == APR_SUCCESS) {
switch (ch) {
case 'a':
@@ -146,7 +146,7 @@ static void required_option_notgiven(abts_case *tc, void *data)
opt->errfn = unknown_arg;
opt->errarg = str;
-
+
while (apr_getopt(opt, "a:", &ch, &opt_arg) == APR_SUCCESS) {
switch (ch) {
case 'a':
@@ -175,7 +175,7 @@ static void optional_option(abts_case *tc, void *data)
opt->errfn = unknown_arg;
opt->errarg = str;
-
+
while (apr_getopt(opt, "a::", &ch, &opt_arg) == APR_SUCCESS) {
switch (ch) {
case 'a':
@@ -204,7 +204,7 @@ static void optional_option_notgiven(abts_case *tc, void *data)
opt->errfn = unknown_arg;
opt->errarg = str;
-
+
while (apr_getopt(opt, "a::", &ch, &opt_arg) == APR_SUCCESS) {
switch (ch) {
case 'a':
diff --git a/test/testbuckets.c b/test/testbuckets.c
index 3957f0e2d..34466e5e3 100644
--- a/test/testbuckets.c
+++ b/test/testbuckets.c
@@ -39,10 +39,10 @@ static void test_simple(abts_case *tc, void *data)
apr_bucket_alloc_t *ba;
apr_bucket_brigade *bb;
apr_bucket *fb, *tb;
-
+
ba = apr_bucket_alloc_create(p);
bb = apr_brigade_create(p, ba);
-
+
fb = APR_BRIGADE_FIRST(bb);
ABTS_ASSERT(tc, "first bucket of empty brigade is sentinel",
fb == APR_BRIGADE_SENTINEL(bb));
@@ -75,12 +75,12 @@ static void test_simple(abts_case *tc, void *data)
}
static apr_bucket_brigade *make_simple_brigade(apr_bucket_alloc_t *ba,
- const char *first,
+ const char *first,
const char *second)
{
apr_bucket_brigade *bb = apr_brigade_create(p, ba);
apr_bucket *e;
-
+
e = apr_bucket_transient_create(first, strlen(first), ba);
APR_BRIGADE_INSERT_TAIL(bb, e);
@@ -120,7 +120,7 @@ static void test_flatten(abts_case *tc, void *data)
flatten_match(tc, "flatten brigade", bb, "hello, world");
apr_brigade_destroy(bb);
- apr_bucket_alloc_destroy(ba);
+ apr_bucket_alloc_destroy(ba);
}
static int count_buckets(apr_bucket_brigade *bb)
@@ -128,12 +128,12 @@ static int count_buckets(apr_bucket_brigade *bb)
apr_bucket *e;
int count = 0;
- for (e = APR_BRIGADE_FIRST(bb);
+ for (e = APR_BRIGADE_FIRST(bb);
e != APR_BRIGADE_SENTINEL(bb);
e = APR_BUCKET_NEXT(e)) {
count++;
}
-
+
return count;
}
@@ -173,7 +173,7 @@ static void test_bwrite(abts_case *tc, void *data)
int n;
for (n = 0; n < COUNT; n++) {
- APR_ASSERT_SUCCESS(tc, "brigade_write",
+ APR_ASSERT_SUCCESS(tc, "brigade_write",
apr_brigade_write(bb, NULL, NULL,
THESTR, sizeof THESTR));
}
@@ -183,7 +183,7 @@ static void test_bwrite(abts_case *tc, void *data)
ABTS_ASSERT(tc, "brigade has correct length",
length == (COUNT * sizeof THESTR));
-
+
apr_brigade_destroy(bb);
apr_bucket_alloc_destroy(ba);
}
@@ -275,7 +275,7 @@ static void test_bucket_content(abts_case *tc,
apr_size_t alen;
APR_ASSERT_SUCCESS(tc, "read from bucket",
- apr_bucket_read(e, &adata, &alen,
+ apr_bucket_read(e, &adata, &alen,
APR_BLOCK_READ));
ABTS_ASSERT(tc, "read expected length", alen == elen);
@@ -294,19 +294,19 @@ static void test_splits(abts_case *tc, void *ctx)
APR_BRIGADE_INSERT_TAIL(bb,
apr_bucket_immortal_create(str, 9, ba));
- APR_BRIGADE_INSERT_TAIL(bb,
+ APR_BRIGADE_INSERT_TAIL(bb,
apr_bucket_transient_create(str, 9, ba));
- APR_BRIGADE_INSERT_TAIL(bb,
+ APR_BRIGADE_INSERT_TAIL(bb,
apr_bucket_heap_create(strdup(str), 9, free, ba));
- APR_BRIGADE_INSERT_TAIL(bb,
- apr_bucket_pool_create(apr_pstrdup(p, str), 9, p,
+ APR_BRIGADE_INSERT_TAIL(bb,
+ apr_bucket_pool_create(apr_pstrdup(p, str), 9, p,
ba));
ABTS_ASSERT(tc, "four buckets inserted", count_buckets(bb) == 4);
-
+
/* now split each of the buckets after byte 5 */
for (n = 0, e = APR_BRIGADE_FIRST(bb); n < 4; n++) {
- ABTS_ASSERT(tc, "reached end of brigade",
+ ABTS_ASSERT(tc, "reached end of brigade",
e != APR_BRIGADE_SENTINEL(bb));
ABTS_ASSERT(tc, "split bucket OK",
apr_bucket_split(e, 5) == APR_SUCCESS);
@@ -314,14 +314,14 @@ static void test_splits(abts_case *tc, void *ctx)
ABTS_ASSERT(tc, "split OK", e != APR_BRIGADE_SENTINEL(bb));
e = APR_BUCKET_NEXT(e);
}
-
- ABTS_ASSERT(tc, "four buckets split into eight",
+
+ ABTS_ASSERT(tc, "four buckets split into eight",
count_buckets(bb) == 8);
for (n = 0, e = APR_BRIGADE_FIRST(bb); n < 4; n++) {
const char *data;
apr_size_t len;
-
+
APR_ASSERT_SUCCESS(tc, "read alpha from bucket",
apr_bucket_read(e, &data, &len, APR_BLOCK_READ));
ABTS_ASSERT(tc, "read 5 bytes", len == 5);
@@ -346,9 +346,9 @@ static void test_splits(abts_case *tc, void *ctx)
f = APR_BUCKET_NEXT(e);
apr_bucket_delete(e);
e = APR_BUCKET_NEXT(f);
- }
-
- ABTS_ASSERT(tc, "eight buckets reduced to four",
+ }
+
+ ABTS_ASSERT(tc, "eight buckets reduced to four",
count_buckets(bb) == 4);
flatten_match(tc, "flatten beta brigade", bb,
@@ -381,11 +381,11 @@ static void test_insertfile(abts_case *tc, void *ctx)
ABTS_NOT_IMPL(tc, "Skipped: could not create large file");
return;
}
-
+
bb = apr_brigade_create(p, ba);
e = apr_brigade_insert_file(bb, f, 0, bignum, p);
-
+
ABTS_ASSERT(tc, "inserted file was not at end of brigade",
e == APR_BRIGADE_LAST(bb));
@@ -426,7 +426,7 @@ static apr_file_t *make_test_file(abts_case *tc, const char *fname,
apr_file_open(&f, fname,
APR_FOPEN_READ|APR_FOPEN_WRITE|APR_FOPEN_TRUNCATE|APR_FOPEN_CREATE,
APR_FPROT_OS_DEFAULT, p) == APR_SUCCESS);
-
+
ABTS_ASSERT(tc, "write test file contents",
apr_file_puts(contents, f) == APR_SUCCESS);
@@ -486,7 +486,7 @@ static void test_truncfile(abts_case *tc, void *data)
apr_bucket_read(e, &buf, &len, APR_BLOCK_READ) == APR_EOF);
ABTS_ASSERT(tc, "read length 0", len == 0);
-
+
ABTS_ASSERT(tc, "still a single bucket in brigade",
APR_BUCKET_NEXT(e) == APR_BRIGADE_SENTINEL(bb));
diff --git a/test/testcond.c b/test/testcond.c
index b5a20bc46..e6428b8dc 100644
--- a/test/testcond.c
+++ b/test/testcond.c
@@ -387,7 +387,7 @@ static void pipe_consumer(toolbox_t *box)
} while (1);
/* naive fairness test - it would be good to introduce or solidify
- * a solid test to ensure one thread is not starved.
+ * a solid test to ensure one thread is not starved.
* ABTS_INT_EQUAL(tc, 1, !!consumed);
*/
}
diff --git a/test/testdate.c b/test/testdate.c
index 3d74b5c8a..49cdc47c3 100644
--- a/test/testdate.c
+++ b/test/testdate.c
@@ -200,7 +200,7 @@ static void test_date_exp_get(abts_case *tc, void *data)
1, 2, 10, 100, 1000, 9000, 10000, 100000,
-1, -2, -10, -100, -1000, -9000, -10000, -100000,
};
-
+
tm.tm_mday = 1;
tm.tm_year = 70;
diff --git a/test/testdir.c b/test/testdir.c
index db8d1bc06..1521d2040 100644
--- a/test/testdir.c
+++ b/test/testdir.c
@@ -45,7 +45,7 @@ static void test_mkdir_recurs(abts_case *tc, void *data)
apr_status_t rv;
apr_finfo_t finfo;
- rv = apr_dir_make_recursive("data/one/two/three",
+ rv = apr_dir_make_recursive("data/one/two/three",
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_UEXECUTE,
p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -325,7 +325,7 @@ static void test_uncleared_errno(abts_case *tc, void *data)
apr_finfo_t finfo;
apr_int32_t finfo_flags = APR_FINFO_TYPE | APR_FINFO_NAME;
apr_dir_t *this_dir;
- apr_status_t rv;
+ apr_status_t rv;
rv = apr_dir_make("dir1", APR_FPROT_OS_DEFAULT, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -343,7 +343,7 @@ static void test_uncleared_errno(abts_case *tc, void *data)
`errno' will be set as a result. */
rv = apr_dir_remove("dir1", p);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOTEMPTY(rv));
-
+
/* Read `.' and `..' out of dir2. */
rv = apr_dir_open(&this_dir, "dir2", p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -361,7 +361,7 @@ static void test_uncleared_errno(abts_case *tc, void *data)
rv = apr_dir_close(this_dir);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
/* Cleanup */
rv = apr_file_remove("dir1/file1", p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
diff --git a/test/testdso.c b/test/testdso.c
index 0d9f27bb2..5ba07768c 100644
--- a/test/testdso.c
+++ b/test/testdso.c
@@ -36,8 +36,8 @@
#elif defined(WIN32)
# define MOD_NAME TESTBINPATH "mod_test.dll"
#elif defined(DARWIN)
-# define MOD_NAME ".libs/mod_test.so"
-# define LIB_NAME ".libs/libmod_test.dylib"
+# define MOD_NAME ".libs/mod_test.so"
+# define LIB_NAME ".libs/libmod_test.dylib"
#elif (defined(__hpux__) || defined(__hpux)) && !defined(__ia64)
# define MOD_NAME ".libs/mod_test.sl"
# define LIB_NAME ".libs/libmod_test.sl"
@@ -230,7 +230,7 @@ static void test_load_notthere(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_EDSOOPEN(status));
ABTS_PTR_NOTNULL(tc, h);
-}
+}
#endif /* APR_HAS_DSO */
@@ -240,7 +240,7 @@ abts_suite *testdso(abts_suite *suite)
#if APR_HAS_DSO
apr_filepath_merge(&modname, NULL, MOD_NAME, 0, p);
-
+
abts_run_test(suite, test_load_module, NULL);
abts_run_test(suite, test_dso_sym, NULL);
abts_run_test(suite, test_dso_sym_return_value, NULL);
@@ -248,7 +248,7 @@ abts_suite *testdso(abts_suite *suite)
#ifdef LIB_NAME
apr_filepath_merge(&libname, NULL, LIB_NAME, 0, p);
-
+
abts_run_test(suite, test_load_library, NULL);
abts_run_test(suite, test_dso_sym_library, NULL);
abts_run_test(suite, test_dso_sym_return_value_library, NULL);
diff --git a/test/testdup.c b/test/testdup.c
index 2a261f2d7..31a196db9 100644
--- a/test/testdup.c
+++ b/test/testdup.c
@@ -33,7 +33,7 @@ static void test_file_dup(abts_case *tc, void *data)
apr_finfo_t finfo;
/* First, create a new file, empty... */
- rv = apr_file_open(&file1, FILEPATH "testdup.file",
+ rv = apr_file_open(&file1, FILEPATH "testdup.file",
APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE |
APR_FOPEN_DELONCLOSE, APR_FPROT_OS_DEFAULT, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -51,7 +51,7 @@ static void test_file_dup(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
rv = apr_stat(&finfo, FILEPATH "testdup.file", APR_FINFO_NORM, p);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOENT(rv));
-}
+}
static void test_file_readwrite(abts_case *tc, void *data)
{
@@ -64,7 +64,7 @@ static void test_file_readwrite(abts_case *tc, void *data)
apr_off_t fpos;
/* First, create a new file, empty... */
- rv = apr_file_open(&file1, FILEPATH "testdup.readwrite.file",
+ rv = apr_file_open(&file1, FILEPATH "testdup.readwrite.file",
APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE |
APR_FOPEN_DELONCLOSE, APR_FPROT_OS_DEFAULT, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -96,7 +96,7 @@ static void test_file_readwrite(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
rv = apr_stat(&finfo, FILEPATH "testdup.readwrite.file", APR_FINFO_NORM, p);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOENT(rv));
-}
+}
static void test_dup2(abts_case *tc, void *data)
{
@@ -105,7 +105,7 @@ static void test_dup2(abts_case *tc, void *data)
apr_file_t *saveerr = NULL;
apr_status_t rv;
- rv = apr_file_open(&testfile, FILEPATH "testdup2.file",
+ rv = apr_file_open(&testfile, FILEPATH "testdup2.file",
APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE |
APR_FOPEN_DELONCLOSE, APR_FPROT_OS_DEFAULT, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -142,7 +142,7 @@ static void test_dup2_readwrite(abts_case *tc, void *data)
char buff[50];
apr_off_t fpos;
- rv = apr_file_open(&testfile, FILEPATH "testdup2.readwrite.file",
+ rv = apr_file_open(&testfile, FILEPATH "testdup2.readwrite.file",
APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE |
APR_FOPEN_DELONCLOSE, APR_FPROT_OS_DEFAULT, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -174,7 +174,7 @@ static void test_dup2_readwrite(abts_case *tc, void *data)
rv = apr_file_read(testfile, buff, &txtlen);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_STR_EQUAL(tc, TEST2, buff);
-
+
apr_file_close(testfile);
rv = apr_file_dup2(errfile, saveerr, p);
diff --git a/test/testfile.c b/test/testfile.c
index 591f7acb5..34654521a 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -44,7 +44,7 @@ static void test_open_noreadwrite(abts_case *tc, void *data)
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_TRUE(tc, rv != APR_SUCCESS);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_EACCES(rv));
- ABTS_PTR_EQUAL(tc, NULL, thefile);
+ ABTS_PTR_EQUAL(tc, NULL, thefile);
}
static void test_open_excl(abts_case *tc, void *data)
@@ -57,7 +57,7 @@ static void test_open_excl(abts_case *tc, void *data)
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_TRUE(tc, rv != APR_SUCCESS);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_EEXIST(rv));
- ABTS_PTR_EQUAL(tc, NULL, thefile);
+ ABTS_PTR_EQUAL(tc, NULL, thefile);
}
static void test_open_read(abts_case *tc, void *data)
@@ -65,7 +65,7 @@ static void test_open_read(abts_case *tc, void *data)
apr_status_t rv;
apr_file_t *filetest = NULL;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_READ,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -76,7 +76,7 @@ static void test_open_read(abts_case *tc, void *data)
static void link_existing(abts_case *tc, void *data)
{
apr_status_t rv;
-
+
rv = apr_file_link("data/file_datafile.txt", "data/file_datafile2.txt");
apr_file_remove("data/file_datafile2.txt", p);
ABTS_ASSERT(tc, "Couldn't create hardlink to file", rv == APR_SUCCESS);
@@ -85,7 +85,7 @@ static void link_existing(abts_case *tc, void *data)
static void link_nonexisting(abts_case *tc, void *data)
{
apr_status_t rv;
-
+
rv = apr_file_link("data/does_not_exist.txt", "data/fake.txt");
ABTS_ASSERT(tc, "", rv != APR_SUCCESS);
}
@@ -96,8 +96,8 @@ static void test_read(abts_case *tc, void *data)
apr_size_t nbytes = 256;
char *str = apr_pcalloc(p, nbytes + 1);
apr_file_t *filetest = NULL;
-
- rv = apr_file_open(&filetest, FILENAME,
+
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_READ,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
@@ -116,7 +116,7 @@ static void test_readzero(abts_case *tc, void *data)
apr_size_t nbytes = 0;
char *str = NULL;
apr_file_t *filetest;
-
+
rv = apr_file_open(&filetest, FILENAME, APR_FOPEN_READ, APR_FPROT_OS_DEFAULT, p);
APR_ASSERT_SUCCESS(tc, "Opening test file " FILENAME, rv);
@@ -132,8 +132,8 @@ static void test_filename(abts_case *tc, void *data)
const char *str;
apr_status_t rv;
apr_file_t *filetest = NULL;
-
- rv = apr_file_open(&filetest, FILENAME,
+
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_READ,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
APR_ASSERT_SUCCESS(tc, "Opening test file " FILENAME, rv);
@@ -144,15 +144,15 @@ static void test_filename(abts_case *tc, void *data)
apr_file_close(filetest);
}
-
+
static void test_fileclose(abts_case *tc, void *data)
{
char str;
apr_status_t rv;
apr_size_t one = 1;
apr_file_t *filetest = NULL;
-
- rv = apr_file_open(&filetest, FILENAME,
+
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_READ,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
APR_ASSERT_SUCCESS(tc, "Opening test file " FILENAME, rv);
@@ -183,7 +183,7 @@ static void test_open_write(abts_case *tc, void *data)
apr_file_t *filetest = NULL;
filetest = NULL;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_WRITE,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOENT(rv));
@@ -196,7 +196,7 @@ static void test_open_writecreate(abts_case *tc, void *data)
apr_file_t *filetest = NULL;
filetest = NULL;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_WRITE | APR_FOPEN_CREATE,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -210,7 +210,7 @@ static void test_write(abts_case *tc, void *data)
apr_size_t bytes = strlen(TESTSTR);
apr_file_t *filetest = NULL;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_WRITE | APR_FOPEN_CREATE,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -227,7 +227,7 @@ static void test_open_readwrite(abts_case *tc, void *data)
apr_file_t *filetest = NULL;
filetest = NULL;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_READ | APR_FOPEN_WRITE,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -244,7 +244,7 @@ static void test_seek(abts_case *tc, void *data)
char *str = apr_pcalloc(p, nbytes + 1);
apr_file_t *filetest = NULL;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_READ,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
APR_ASSERT_SUCCESS(tc, "Open test file " FILENAME, rv);
@@ -258,7 +258,7 @@ static void test_seek(abts_case *tc, void *data)
rv = apr_file_seek(filetest, SEEK_SET, &offset);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
rv = apr_file_read(filetest, str, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_SIZE_EQUAL(tc, strlen(TESTSTR) - 5, nbytes);
@@ -286,14 +286,14 @@ static void test_seek(abts_case *tc, void *data)
ABTS_STR_EQUAL(tc, &TESTSTR[strlen(TESTSTR) - 5], str);
apr_file_close(filetest);
-}
+}
static void test_userdata_set(abts_case *tc, void *data)
{
apr_status_t rv;
apr_file_t *filetest = NULL;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_WRITE,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -311,7 +311,7 @@ static void test_userdata_get(abts_case *tc, void *data)
char *teststr;
apr_file_t *filetest = NULL;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_WRITE,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -334,7 +334,7 @@ static void test_userdata_getnokey(abts_case *tc, void *data)
void *teststr;
apr_file_t *filetest = NULL;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_WRITE,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -352,27 +352,27 @@ static void test_buffer_set_get(abts_case *tc, void *data)
apr_file_t *filetest = NULL;
char * buffer;
- rv = apr_file_open(&filetest, FILENAME,
+ rv = apr_file_open(&filetest, FILENAME,
APR_FOPEN_WRITE | APR_FOPEN_BUFFERED,
APR_FPROT_UREAD | APR_FPROT_UWRITE | APR_FPROT_GREAD, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
bufsize = apr_file_buffer_size_get(filetest);
ABTS_SIZE_EQUAL(tc, APR_BUFFERSIZE, bufsize);
-
+
buffer = apr_pcalloc(p, 10240);
rv = apr_file_buffer_set(filetest, buffer, 10240);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
bufsize = apr_file_buffer_size_get(filetest);
ABTS_SIZE_EQUAL(tc, 10240, bufsize);
-
+
rv = apr_file_buffer_set(filetest, buffer, 12);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
bufsize = apr_file_buffer_size_get(filetest);
ABTS_SIZE_EQUAL(tc, 12, bufsize);
-
+
apr_file_close(filetest);
}
static void test_getc(abts_case *tc, void *data)
@@ -679,7 +679,7 @@ static void test_bigread(abts_case *tc, void *data)
/* Create a test file with known content.
*/
- rv = apr_file_open(&f, "data/created_file",
+ rv = apr_file_open(&f, "data/created_file",
APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_TRUNCATE,
APR_FPROT_UREAD | APR_FPROT_UWRITE, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -724,7 +724,7 @@ static void test_mod_neg(abts_case *tc, void *data)
apr_off_t cur;
const char *fname = "data/modneg.dat";
- rv = apr_file_open(&f, fname,
+ rv = apr_file_open(&f, fname,
APR_FOPEN_CREATE | APR_FOPEN_WRITE,
APR_FPROT_UREAD | APR_FPROT_UWRITE, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -734,7 +734,7 @@ static void test_mod_neg(abts_case *tc, void *data)
rv = apr_file_write(f, s, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
-
+
for (i = 0; i < 7980; i++) {
s = "0";
nbytes = strlen(s);
@@ -742,7 +742,7 @@ static void test_mod_neg(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
}
-
+
s = "end456789\n";
nbytes = strlen(s);
rv = apr_file_write(f, s, &nbytes);
@@ -756,7 +756,7 @@ static void test_mod_neg(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_SIZE_EQUAL(tc, strlen(s), nbytes);
}
-
+
rv = apr_file_close(f);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -808,7 +808,7 @@ static void file_contents_equal(abts_case *tc,
0, p));
APR_ASSERT_SUCCESS(tc, "read from file",
apr_file_read_full(f, actual, expectlen, NULL));
-
+
ABTS_ASSERT(tc, "matched expected file contents",
memcmp(expect, actual, expectlen) == 0);
@@ -824,15 +824,15 @@ static void test_puts(abts_case *tc, void *data)
const char *fname = "data/testputs.dat";
APR_ASSERT_SUCCESS(tc, "open file for writing",
- apr_file_open(&f, fname,
+ apr_file_open(&f, fname,
APR_FOPEN_WRITE|APR_FOPEN_CREATE|APR_FOPEN_TRUNCATE,
APR_FPROT_OS_DEFAULT, p));
-
- APR_ASSERT_SUCCESS(tc, "write line to file",
+
+ APR_ASSERT_SUCCESS(tc, "write line to file",
apr_file_puts(LINE1, f));
- APR_ASSERT_SUCCESS(tc, "write second line to file",
+ APR_ASSERT_SUCCESS(tc, "write second line to file",
apr_file_puts(LINE2, f));
-
+
APR_ASSERT_SUCCESS(tc, "close for writing",
apr_file_close(f));
@@ -847,10 +847,10 @@ static void test_writev(abts_case *tc, void *data)
const char *fname = "data/testwritev.dat";
APR_ASSERT_SUCCESS(tc, "open file for writing",
- apr_file_open(&f, fname,
+ apr_file_open(&f, fname,
APR_FOPEN_WRITE|APR_FOPEN_CREATE|APR_FOPEN_TRUNCATE,
APR_FPROT_OS_DEFAULT, p));
-
+
vec[0].iov_base = LINE1;
vec[0].iov_len = strlen(LINE1);
@@ -858,7 +858,7 @@ static void test_writev(abts_case *tc, void *data)
apr_file_writev(f, vec, 1, &nbytes));
file_contents_equal(tc, fname, LINE1, strlen(LINE1));
-
+
vec[0].iov_base = LINE1;
vec[0].iov_len = strlen(LINE1);
vec[1].iov_base = LINE2;
@@ -876,7 +876,7 @@ static void test_writev(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "close for writing",
apr_file_close(f));
- file_contents_equal(tc, fname, LINE1 LINE1 LINE2 LINE1 LINE1 LINE2,
+ file_contents_equal(tc, fname, LINE1 LINE1 LINE2 LINE1 LINE1 LINE2,
strlen(LINE1)*4 + strlen(LINE2)*2);
}
@@ -889,10 +889,10 @@ static void test_writev_full(abts_case *tc, void *data)
const char *fname = "data/testwritev_full.dat";
APR_ASSERT_SUCCESS(tc, "open file for writing",
- apr_file_open(&f, fname,
+ apr_file_open(&f, fname,
APR_FOPEN_WRITE|APR_FOPEN_CREATE|APR_FOPEN_TRUNCATE,
APR_FPROT_OS_DEFAULT, p));
-
+
vec[0].iov_base = LINE1;
vec[0].iov_len = strlen(LINE1);
vec[1].iov_base = LINE2;
@@ -912,7 +912,7 @@ static void test_writev_full(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "close for writing",
apr_file_close(f));
- file_contents_equal(tc, fname, LINE1 LINE2 LINE1 LINE1 LINE2,
+ file_contents_equal(tc, fname, LINE1 LINE2 LINE1 LINE1 LINE2,
strlen(LINE1)*3 + strlen(LINE2)*2);
}
@@ -1002,7 +1002,7 @@ static void test_truncate(abts_case *tc, void *data)
APR_FOPEN_CREATE | APR_FOPEN_WRITE,
APR_FPROT_UREAD | APR_FPROT_UWRITE, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
s = "some data";
nbytes = strlen(s);
rv = apr_file_write(f, s, &nbytes);
@@ -1232,7 +1232,7 @@ static void test_bigfprintf(abts_case *tc, void *data)
apr_file_open(&f, fname,
APR_FOPEN_CREATE|APR_FOPEN_WRITE,
APR_FPROT_UREAD|APR_FPROT_UWRITE, p));
-
+
to_write = malloc(HUGE_STRING_LEN + 3);
@@ -1335,7 +1335,7 @@ static void test_xthread(abts_case *tc, void *data)
apr_int32_t flags = APR_FOPEN_CREATE|APR_FOPEN_READ|APR_FOPEN_WRITE|APR_FOPEN_APPEND|APR_FOPEN_XTHREAD;
char buf[128] = { 0 };
- /* Test for bug 38438, opening file with append + xthread and seeking to
+ /* Test for bug 38438, opening file with append + xthread and seeking to
the end of the file resulted in writes going to the beginning not the
end. */
@@ -1349,7 +1349,7 @@ static void test_xthread(abts_case *tc, void *data)
apr_file_puts("hello", f));
apr_file_close(f);
-
+
APR_ASSERT_SUCCESS(tc, "open test file",
apr_file_open(&f, fname, flags,
APR_FPROT_UREAD|APR_FPROT_UWRITE, p));
@@ -1368,11 +1368,11 @@ static void test_xthread(abts_case *tc, void *data)
/* Back to the beginning. */
{
apr_off_t offset = 0;
-
+
rv = apr_file_seek(f, APR_SET, &offset);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
}
-
+
apr_file_read_full(f, buf, sizeof(buf), NULL);
ABTS_STR_EQUAL(tc, "helloworld", buf);
@@ -2258,8 +2258,8 @@ abts_suite *testfile(abts_suite *suite)
abts_run_test(suite, test_open_readwrite, NULL);
abts_run_test(suite, link_existing, NULL);
abts_run_test(suite, link_nonexisting, NULL);
- abts_run_test(suite, test_read, NULL);
- abts_run_test(suite, test_readzero, NULL);
+ abts_run_test(suite, test_read, NULL);
+ abts_run_test(suite, test_readzero, NULL);
abts_run_test(suite, test_seek, NULL);
abts_run_test(suite, test_filename, NULL);
abts_run_test(suite, test_fileclose, NULL);
diff --git a/test/testfilecopy.c b/test/testfilecopy.c
index fc2dea48b..3cec04967 100644
--- a/test/testfilecopy.c
+++ b/test/testfilecopy.c
@@ -28,9 +28,9 @@ static void copy_helper(abts_case *tc, const char *from, const char * to,
apr_finfo_t copy;
apr_finfo_t orig;
apr_finfo_t dest;
-
+
dest_rv = apr_stat(&dest, to, APR_FINFO_SIZE, p);
-
+
if (!append) {
rv = apr_file_copy(from, to, perms, p);
}
@@ -49,8 +49,8 @@ static void copy_helper(abts_case *tc, const char *from, const char * to,
ABTS_ASSERT(tc, "File size differs", orig.size == copy.size);
}
else {
- ABTS_ASSERT(tc, "File size differs",
- ((dest_rv == APR_SUCCESS)
+ ABTS_ASSERT(tc, "File size differs",
+ ((dest_rv == APR_SUCCESS)
? dest.size : 0) + orig.size == copy.size);
}
}
@@ -61,8 +61,8 @@ static void copy_short_file(abts_case *tc, void *data)
/* make absolutely sure that the dest file doesn't exist. */
apr_file_remove("data/file_copy.txt", p);
-
- copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt",
+
+ copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt",
APR_FPROT_FILE_SOURCE_PERMS, 0, p);
rv = apr_file_remove("data/file_copy.txt", p);
APR_ASSERT_SUCCESS(tc, "Couldn't remove copy file", rv);
@@ -71,20 +71,20 @@ static void copy_short_file(abts_case *tc, void *data)
static void copy_over_existing(abts_case *tc, void *data)
{
apr_status_t rv;
-
+
/* make absolutely sure that the dest file doesn't exist. */
apr_file_remove("data/file_copy.txt", p);
-
+
/* This is a cheat. I don't want to create a new file, so I just copy
* one file, then I copy another. If the second copy succeeds, then
* this works.
*/
- copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt",
+ copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt",
APR_FPROT_FILE_SOURCE_PERMS, 0, p);
-
- copy_helper(tc, "data/mmap_datafile.txt", "data/file_copy.txt",
+
+ copy_helper(tc, "data/mmap_datafile.txt", "data/file_copy.txt",
APR_FPROT_FILE_SOURCE_PERMS, 0, p);
-
+
rv = apr_file_remove("data/file_copy.txt", p);
APR_ASSERT_SUCCESS(tc, "Couldn't remove copy file", rv);
}
@@ -96,7 +96,7 @@ static void append_nonexist(abts_case *tc, void *data)
/* make absolutely sure that the dest file doesn't exist. */
apr_file_remove("data/file_copy.txt", p);
- copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt",
+ copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt",
APR_FPROT_FILE_SOURCE_PERMS, 0, p);
rv = apr_file_remove("data/file_copy.txt", p);
APR_ASSERT_SUCCESS(tc, "Couldn't remove copy file", rv);
@@ -105,20 +105,20 @@ static void append_nonexist(abts_case *tc, void *data)
static void append_exist(abts_case *tc, void *data)
{
apr_status_t rv;
-
+
/* make absolutely sure that the dest file doesn't exist. */
apr_file_remove("data/file_copy.txt", p);
-
+
/* This is a cheat. I don't want to create a new file, so I just copy
* one file, then I copy another. If the second copy succeeds, then
* this works.
*/
- copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt",
+ copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt",
APR_FPROT_FILE_SOURCE_PERMS, 0, p);
-
- copy_helper(tc, "data/mmap_datafile.txt", "data/file_copy.txt",
+
+ copy_helper(tc, "data/mmap_datafile.txt", "data/file_copy.txt",
APR_FPROT_FILE_SOURCE_PERMS, 1, p);
-
+
rv = apr_file_remove("data/file_copy.txt", p);
APR_ASSERT_SUCCESS(tc, "Couldn't remove copy file", rv);
}
diff --git a/test/testfileinfo.c b/test/testfileinfo.c
index ce3f461fc..9f6d85239 100644
--- a/test/testfileinfo.c
+++ b/test/testfileinfo.c
@@ -40,13 +40,13 @@ static const struct view_fileinfo
{APR_FINFO_INODE, "INODE"},
{APR_FINFO_NLINK, "NLINK"},
{APR_FINFO_TYPE, "TYPE"},
- {APR_FINFO_USER, "USER"},
- {APR_FINFO_GROUP, "GROUP"},
- {APR_FINFO_UPROT, "UPROT"},
+ {APR_FINFO_USER, "USER"},
+ {APR_FINFO_GROUP, "GROUP"},
+ {APR_FINFO_UPROT, "UPROT"},
{APR_FINFO_GPROT, "GPROT"},
{APR_FINFO_WPROT, "WPROT"},
{0, NULL}
-};
+};
static void finfo_equal(abts_case *tc, apr_finfo_t *f1, apr_finfo_t *f2)
{
@@ -160,7 +160,7 @@ static void test_stat_eq_finfo(abts_case *tc, void *data)
rv = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
/* Opening the file may have toggled the atime member (time last
- * accessed), so fetch our apr_stat() after getting the fileinfo
+ * accessed), so fetch our apr_stat() after getting the fileinfo
* of the open file...
*/
rv = apr_stat(&stat_finfo, FILENAME, APR_FINFO_NORM, p);
diff --git a/test/testflock.c b/test/testflock.c
index 2cf9f358e..82ecf848c 100644
--- a/test/testflock.c
+++ b/test/testflock.c
@@ -62,7 +62,7 @@ static void test_withlock(abts_case *tc, void *data)
apr_file_t *file;
apr_status_t rv;
int code;
-
+
rv = apr_file_open(&file, TESTFILE, APR_FOPEN_WRITE|APR_FOPEN_CREATE,
APR_FPROT_OS_DEFAULT, p);
APR_ASSERT_SUCCESS(tc, "Could not create file.", rv);
@@ -81,7 +81,7 @@ static void test_withlock(abts_case *tc, void *data)
static void test_withoutlock(abts_case *tc, void *data)
{
int code;
-
+
code = launch_reader(tc);
ABTS_INT_EQUAL(tc, SUCCESSFUL_READ, code);
}
@@ -91,7 +91,7 @@ static void remove_lockfile(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "Couldn't remove lock file.",
apr_file_remove(TESTFILE, p));
}
-
+
abts_suite *testflock(abts_suite *suite)
{
suite = ADD_SUITE(suite)
diff --git a/test/testfnmatch.c b/test/testfnmatch.c
index 572fd4b3e..1303d5571 100644
--- a/test/testfnmatch.c
+++ b/test/testfnmatch.c
@@ -192,7 +192,7 @@ static void test_fnmatch_test(abts_case *tc, void *data)
for (t = ft_tests; t->pattern != NULL; t++) {
int res = apr_fnmatch_test(t->pattern);
-
+
if (res != t->result) {
char buf[128];
@@ -208,7 +208,7 @@ static void test_glob(abts_case *tc, void *data)
int i;
char **list;
apr_array_header_t *result;
-
+
APR_ASSERT_SUCCESS(tc, "glob match against data/*.txt",
apr_match_glob("data\\*.txt", &result, p));
@@ -227,7 +227,7 @@ static void test_glob_currdir(abts_case *tc, void *data)
char **list;
apr_array_header_t *result;
apr_filepath_set("data", p);
-
+
APR_ASSERT_SUCCESS(tc, "glob match against *.txt with data as current",
apr_match_glob("*.txt", &result, p));
diff --git a/test/testglobalmutex.c b/test/testglobalmutex.c
index c79884cfc..8460396e6 100644
--- a/test/testglobalmutex.c
+++ b/test/testglobalmutex.c
@@ -82,7 +82,7 @@ static void test_exclusive(abts_case *tc, void *data)
int x = 0;
abts_log_message("lock mechanism is: ");
abts_log_message(mutexname(mech));
-
+
rv = apr_global_mutex_create(&global_lock, LOCKNAME, mech, p);
if (rv == APR_ENOTIMPL) {
/* MacOS lacks TIMED implementation, so don't fail for ENOTIMPL */
@@ -95,7 +95,7 @@ static void test_exclusive(abts_case *tc, void *data)
launch_child(tc, mech, &p2, p);
launch_child(tc, mech, &p3, p);
launch_child(tc, mech, &p4, p);
-
+
x += wait_child(tc, &p1);
x += wait_child(tc, &p2);
x += wait_child(tc, &p3);
diff --git a/test/testhash.c b/test/testhash.c
index 9dd5804b8..3ce255787 100644
--- a/test/testhash.c
+++ b/test/testhash.c
@@ -29,7 +29,7 @@ static int comp_string(const void *str1, const void *str2)
return strcmp(str1,str2);
}
-static void dump_hash(apr_pool_t *p, apr_hash_t *h, char str[][MAX_LTH])
+static void dump_hash(apr_pool_t *p, apr_hash_t *h, char str[][MAX_LTH])
{
apr_hash_index_t *hi;
int i = 0;
@@ -58,7 +58,7 @@ static void dump_hash(apr_pool_t *p, apr_hash_t *h, char str[][MAX_LTH])
);
}
-static void sum_hash(apr_pool_t *p, apr_hash_t *h, int *pcount, int *keySum, int *valSum)
+static void sum_hash(apr_pool_t *p, apr_hash_t *h, int *pcount, int *keySum, int *valSum)
{
apr_hash_index_t *hi;
void *val, *key;
@@ -218,7 +218,7 @@ static void hash_clear(abts_case *tc, void *data)
}
/* This is kind of a hack, but I am just keeping an existing test. This is
- * really testing apr_hash_first, apr_hash_next, and apr_hash_this which
+ * really testing apr_hash_first, apr_hash_next, and apr_hash_this which
* should be tested in three separate tests, but this will do for now.
*/
static void hash_traverse(abts_case *tc, void *data)
@@ -252,7 +252,7 @@ static void hash_traverse(abts_case *tc, void *data)
}
/* This is kind of a hack, but I am just keeping an existing test. This is
- * really testing apr_hash_first, apr_hash_next, and apr_hash_this which
+ * really testing apr_hash_first, apr_hash_next, and apr_hash_this which
* should be tested in three separate tests, but this will do for now.
*/
static void summation_test(abts_case *tc, void *data)
diff --git a/test/testhooks.c b/test/testhooks.c
index b2b16d4c1..ab73f7164 100644
--- a/test/testhooks.c
+++ b/test/testhooks.c
@@ -152,7 +152,7 @@ static void test_basic_ordering(abts_case *tc, void *data)
probe_buf_pool = p;
test_run_toyhook(buf, sizeof buf);
-
+
ABTS_STR_EQUAL(tc, "12345", buf);
ABTS_STR_EQUAL(tc, "EI1CI2CI3CI4CI5CR", probe_buf);
}
@@ -179,7 +179,7 @@ static void test_pred_ordering(abts_case *tc, void *data)
probe_buf_pool = p;
test_run_toyhook(buf, sizeof buf);
-
+
/* FAILS ABTS_STR_EQUAL(tc, "1223", buf); */
}
diff --git a/test/testipsub.c b/test/testipsub.c
index 1182d7a47..692ad4dd0 100644
--- a/test/testipsub.c
+++ b/test/testipsub.c
@@ -77,7 +77,7 @@ static void test_singleton_subnets(abts_case *tc, void *data)
{
const char *v4addrs[] = {
"127.0.0.1", "129.42.18.99", "63.161.155.20", "207.46.230.229", "64.208.42.36",
- "198.144.203.195", "192.18.97.241", "198.137.240.91", "62.156.179.119",
+ "198.144.203.195", "192.18.97.241", "198.137.240.91", "62.156.179.119",
"204.177.92.181"
};
apr_ipsubnet_t *ipsub;
@@ -201,14 +201,14 @@ static void test_parse_addr_port(abts_case *tc, void *data)
/* ,{ "localhost:-1", APR_EINVAL, NULL, NULL, 0 } <- should fail, doesn't */
};
unsigned i;
-
+
for (i = 0; i < (sizeof testcases / sizeof testcases[0]); i++) {
char *addr, *scope_id;
apr_port_t port;
apr_status_t rv;
test = &testcases[i];
-
+
rv = apr_parse_addr_port(&addr, &scope_id, &port, test->input, p);
ABTS_INT_EQUAL(tc, test->rv, rv);
diff --git a/test/testlfs.c b/test/testlfs.c
index aa5357389..0475fb4f9 100644
--- a/test/testlfs.c
+++ b/test/testlfs.c
@@ -78,7 +78,7 @@ static void test_open(abts_case *tc, void *data)
ABTS_NOT_IMPL(tc, "Creation of large file (apparently not sparse)");
madefile = 0;
- }
+ }
else {
/* Proceed with our 8GB sparse file now */
rv = apr_file_trunc(f, eightGB);
@@ -91,7 +91,7 @@ static void test_open(abts_case *tc, void *data)
#endif
) {
ABTS_NOT_IMPL(tc, "Creation of large file (rlimit, quota or fs)");
- }
+ }
else {
APR_ASSERT_SUCCESS(tc, "truncate file to 8gb", rv);
}
@@ -112,14 +112,14 @@ static void test_reopen(abts_case *tc, void *data)
apr_status_t rv;
PRECOND;
-
+
rv = apr_file_open(&fh, TESTFN, APR_FOPEN_SPARSE | APR_FOPEN_READ,
APR_FPROT_OS_DEFAULT, p);
APR_ASSERT_SUCCESS(tc, "re-open 8GB file", rv);
APR_ASSERT_SUCCESS(tc, "file_info_get failed",
apr_file_info_get(&finfo, APR_FINFO_NORM, fh));
-
+
ABTS_ASSERT(tc, "file_info_get gave incorrect size",
finfo.size == eightGB);
@@ -132,9 +132,9 @@ static void test_stat(abts_case *tc, void *data)
PRECOND;
- APR_ASSERT_SUCCESS(tc, "stat large file",
+ APR_ASSERT_SUCCESS(tc, "stat large file",
apr_stat(&finfo, TESTFN, APR_FINFO_NORM, p));
-
+
ABTS_ASSERT(tc, "stat gave incorrect size", finfo.size == eightGB);
}
@@ -145,25 +145,25 @@ static void test_readdir(abts_case *tc, void *data)
PRECOND;
- APR_ASSERT_SUCCESS(tc, "open test directory",
+ APR_ASSERT_SUCCESS(tc, "open test directory",
apr_dir_open(&dh, TESTDIR, p));
do {
apr_finfo_t finfo;
-
+
rv = apr_dir_read(&finfo, APR_FINFO_MIN, dh);
-
+
if (rv == APR_SUCCESS && strcmp(finfo.name, TESTFILE) == 0) {
- ABTS_ASSERT(tc, "apr_dir_read gave incorrect size for large file",
+ ABTS_ASSERT(tc, "apr_dir_read gave incorrect size for large file",
finfo.size == eightGB);
}
} while (rv == APR_SUCCESS);
-
+
if (!APR_STATUS_IS_ENOENT(rv)) {
APR_ASSERT_SUCCESS(tc, "apr_dir_read failed", rv);
}
-
+
APR_ASSERT_SUCCESS(tc, "close test directory",
apr_dir_close(dh));
}
@@ -175,11 +175,11 @@ static void test_append(abts_case *tc, void *data)
apr_file_t *fh;
apr_finfo_t finfo;
apr_status_t rv;
-
+
PRECOND;
- rv = apr_file_open(&fh, TESTFN, APR_FOPEN_SPARSE | APR_FOPEN_WRITE
- | APR_FOPEN_APPEND,
+ rv = apr_file_open(&fh, TESTFN, APR_FOPEN_SPARSE | APR_FOPEN_WRITE
+ | APR_FOPEN_APPEND,
APR_FPROT_OS_DEFAULT, p);
APR_ASSERT_SUCCESS(tc, "open 8GB file for append", rv);
@@ -188,7 +188,7 @@ static void test_append(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "file_info_get failed",
apr_file_info_get(&finfo, APR_FINFO_NORM, fh));
-
+
ABTS_ASSERT(tc, "file_info_get gave incorrect size",
finfo.size == eightGB + strlen(TESTSTR));
@@ -202,16 +202,16 @@ static void test_seek(abts_case *tc, void *data)
apr_status_t rv;
PRECOND;
-
+
rv = apr_file_open(&fh, TESTFN, APR_FOPEN_SPARSE | APR_FOPEN_WRITE,
APR_FPROT_OS_DEFAULT, p);
APR_ASSERT_SUCCESS(tc, "open 8GB file for writing", rv);
pos = 0;
- APR_ASSERT_SUCCESS(tc, "relative seek to end",
+ APR_ASSERT_SUCCESS(tc, "relative seek to end",
apr_file_seek(fh, APR_END, &pos));
ABTS_ASSERT(tc, "seek to END gave 8GB", pos == eightGB);
-
+
pos = eightGB;
APR_ASSERT_SUCCESS(tc, "seek to 8GB", apr_file_seek(fh, APR_SET, &pos));
ABTS_ASSERT(tc, "seek gave 8GB offset", pos == eightGB);
@@ -235,7 +235,7 @@ static void test_write(abts_case *tc, void *data)
APR_FPROT_OS_DEFAULT, p);
APR_ASSERT_SUCCESS(tc, "re-open 8GB file", rv);
- APR_ASSERT_SUCCESS(tc, "seek to 8GB - 4",
+ APR_ASSERT_SUCCESS(tc, "seek to 8GB - 4",
apr_file_seek(fh, APR_SET, &pos));
ABTS_ASSERT(tc, "seek gave 8GB-4 offset", pos == eightGB - 4);
@@ -252,7 +252,7 @@ static void test_mmap(abts_case *tc, void *data)
apr_mmap_t *map;
apr_file_t *fh;
apr_size_t len = 65536; /* hopefully a multiple of the page size */
- apr_off_t off = eightGB - len;
+ apr_off_t off = eightGB - len;
apr_status_t rv;
void *ptr;
@@ -261,14 +261,14 @@ static void test_mmap(abts_case *tc, void *data)
rv = apr_file_open(&fh, TESTFN, APR_FOPEN_SPARSE | APR_FOPEN_READ,
APR_FPROT_OS_DEFAULT, p);
APR_ASSERT_SUCCESS(tc, "open 8gb file for mmap", rv);
-
+
APR_ASSERT_SUCCESS(tc, "mmap 8GB file",
apr_mmap_create(&map, fh, off, len, APR_MMAP_READ, p));
APR_ASSERT_SUCCESS(tc, "close file", apr_file_close(fh));
ABTS_ASSERT(tc, "mapped a 64K block", map->size == len);
-
+
APR_ASSERT_SUCCESS(tc, "get pointer into mmaped region",
apr_mmap_offset(&ptr, map, len - 4));
ABTS_ASSERT(tc, "pointer was not NULL", ptr != NULL);
diff --git a/test/testlock.c b/test/testlock.c
index c5479d678..2851d4361 100644
--- a/test/testlock.c
+++ b/test/testlock.c
@@ -81,7 +81,7 @@ static void *APR_THREAD_FUNC thread_rwlock_func(apr_thread_t *thd, void *data)
apr_thread_rwlock_unlock(rwlock);
}
return NULL;
-}
+}
static void *APR_THREAD_FUNC thread_mutex_function(apr_thread_t *thd, void *data)
{
@@ -89,10 +89,10 @@ static void *APR_THREAD_FUNC thread_mutex_function(apr_thread_t *thd, void *data
/* slight delay to allow things to settle */
apr_sleep (1);
-
+
while (1) {
apr_status_t rv;
-
+
if (data) {
rv = apr_thread_mutex_timedlock(thread_mutex, *(apr_interval_time_t *)data);
}
@@ -105,10 +105,10 @@ static void *APR_THREAD_FUNC thread_mutex_function(apr_thread_t *thd, void *data
apr_thread_exit(thd, rv);
break;
}
-
+
if (i == MAX_ITER)
exitLoop = 0;
- else
+ else
{
i++;
x++;
@@ -156,7 +156,7 @@ static void *APR_THREAD_FUNC thread_mutex_sleep_function(apr_thread_t *thd, void
apr_thread_exit(thd, APR_SUCCESS);
return NULL;
-}
+}
static void *APR_THREAD_FUNC thread_cond_producer(apr_thread_t *thd, void *data)
{
@@ -231,7 +231,7 @@ static void test_thread_mutex(abts_case *tc, void *data)
JOIN_WITH_SUCCESS(tc, t2);
JOIN_WITH_SUCCESS(tc, t3);
JOIN_WITH_SUCCESS(tc, t4);
-
+
ABTS_INT_EQUAL(tc, MAX_ITER, x);
}
@@ -308,14 +308,14 @@ static void test_cond(abts_case *tc, void *data)
apr_status_t s0, s1, s2, s3, s4;
int count1, count2, count3, count4;
int sum;
-
+
APR_ASSERT_SUCCESS(tc, "create put mutex",
- apr_thread_mutex_create(&put.mutex,
+ apr_thread_mutex_create(&put.mutex,
APR_THREAD_MUTEX_DEFAULT, p));
ABTS_PTR_NOTNULL(tc, put.mutex);
APR_ASSERT_SUCCESS(tc, "create nready mutex",
- apr_thread_mutex_create(&nready.mutex,
+ apr_thread_mutex_create(&nready.mutex,
APR_THREAD_MUTEX_DEFAULT, p));
ABTS_PTR_NOTNULL(tc, nready.mutex);
@@ -346,7 +346,7 @@ static void test_cond(abts_case *tc, void *data)
apr_thread_join(&s3, p4);
apr_thread_join(&s4, c1);
- APR_ASSERT_SUCCESS(tc, "destroy condvar",
+ APR_ASSERT_SUCCESS(tc, "destroy condvar",
apr_thread_cond_destroy(nready.cond));
sum = count1 + count2 + count3 + count4;
@@ -381,7 +381,7 @@ static void test_timeoutcond(abts_case *tc, void *data)
s = apr_thread_cond_timedwait(timeout_cond, timeout_mutex, timeout);
end = apr_time_now();
apr_thread_mutex_unlock(timeout_mutex);
-
+
if (s != APR_SUCCESS && !APR_STATUS_IS_TIMEUP(s)) {
continue;
}
@@ -419,7 +419,7 @@ static void test_timeoutmutex(abts_case *tc, void *data)
wait_for_flag(flag, 1); /* the thread will set flag to 1 once the
* timeout_mutex is locked. */
-
+
timeout = apr_time_from_sec(5);
for (i = 0; i < MAX_RETRY; i++) {
diff --git a/test/testlockperf.c b/test/testlockperf.c
index f89d7900b..077aced52 100644
--- a/test/testlockperf.c
+++ b/test/testlockperf.c
@@ -104,7 +104,7 @@ int test_thread_mutex(int num_threads)
apr_thread_mutex_lock(thread_lock);
/* set_concurrency(4)? -aaron */
- printf(" Starting %d threads ", num_threads);
+ printf(" Starting %d threads ", num_threads);
for (i = 0; i < num_threads; ++i) {
s[i] = apr_thread_create(&t[i], NULL, thread_mutex_func, NULL, pool);
if (s[i] != APR_SUCCESS) {
@@ -152,7 +152,7 @@ int test_thread_mutex_nested(int num_threads)
apr_thread_mutex_lock(thread_lock);
/* set_concurrency(4)? -aaron */
- printf(" Starting %d threads ", num_threads);
+ printf(" Starting %d threads ", num_threads);
for (i = 0; i < num_threads; ++i) {
s[i] = apr_thread_create(&t[i], NULL, thread_mutex_func, NULL, pool);
if (s[i] != APR_SUCCESS) {
@@ -203,7 +203,7 @@ static int test_thread_mutex_timed(int num_threads)
apr_thread_mutex_lock(thread_lock);
/* set_concurrency(4)? -aaron */
- printf(" Starting %d threads ", num_threads);
+ printf(" Starting %d threads ", num_threads);
for (i = 0; i < num_threads; ++i) {
s[i] = apr_thread_create(&t[i], NULL, thread_mutex_func, &timeout, pool);
if (s[i] != APR_SUCCESS) {
@@ -251,7 +251,7 @@ int test_thread_rwlock(int num_threads)
apr_thread_rwlock_wrlock(thread_rwlock);
/* set_concurrency(4)? -aaron */
- printf(" Starting %d threads ", num_threads);
+ printf(" Starting %d threads ", num_threads);
for (i = 0; i < num_threads; ++i) {
s[i] = apr_thread_create(&t[i], NULL, thread_rwlock_func, NULL, pool);
if (s[i] != APR_SUCCESS) {
@@ -288,7 +288,7 @@ int main(int argc, const char * const *argv)
const char *optarg;
printf("APR Lock Performance Test\n==============\n\n");
-
+
apr_initialize();
atexit(apr_terminate);
@@ -300,7 +300,7 @@ int main(int argc, const char * const *argv)
rv, apr_strerror(rv, errmsg, sizeof errmsg));
exit(-1);
}
-
+
while ((rv = apr_getopt(opt, "c:v", &optchar, &optarg)) == APR_SUCCESS) {
if (optchar == 'c') {
max_counter = atol(optarg);
diff --git a/test/testmd4.c b/test/testmd4.c
index eb80408fa..734c2c67e 100644
--- a/test/testmd4.c
+++ b/test/testmd4.c
@@ -42,9 +42,9 @@
static struct {
const char *string;
const char *md4sum;
-} md4sums[] =
+} md4sums[] =
{
-/*
+/*
* Taken from the old md4 test suite.
* MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0
* MD4 ("a") = bde52cb31de33e46245e05fbdbd6fb24
@@ -53,25 +53,25 @@ static struct {
* MD4 ("abcdefghijklmnopqrstuvwxyz") = d79e1c308aa5bbcdeea8ed63df412da9
* MD4 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
* MD4 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = e33b4ddc9c38f2199c3e7b164fcc0536
-*
+*
*/
- {"",
+ {"",
"\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0"},
- {"a",
+ {"a",
"\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46\x24\x5e\x05\xfb\xdb\xd6\xfb\x24"},
- {"abc",
+ {"abc",
"\xa4\x48\x01\x7a\xaf\x21\xd8\x52\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d"},
- {"message digest",
+ {"message digest",
"\xd9\x13\x0a\x81\x64\x54\x9f\xe8\x18\x87\x48\x06\xe1\xc7\x01\x4b"},
- {"abcdefghijklmnopqrstuvwxyz",
+ {"abcdefghijklmnopqrstuvwxyz",
"\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd\xee\xa8\xed\x63\xdf\x41\x2d\xa9"},
- {"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
+ {"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
"\x04\x3f\x85\x82\xf2\x41\xdb\x35\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4"},
- {"12345678901234567890123456789012345678901234567890123456789012345678901234567890",
+ {"12345678901234567890123456789012345678901234567890123456789012345678901234567890",
"\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19\x9c\x3e\x7b\x16\x4f\xcc\x05\x36"}
};
-static int num_sums = sizeof(md4sums) / sizeof(md4sums[0]);
+static int num_sums = sizeof(md4sums) / sizeof(md4sums[0]);
static int count;
#if 0
@@ -98,12 +98,12 @@ static void test_md4sum(abts_case *tc, void *data)
size_t len = strlen(string);
ABTS_ASSERT(tc, "apr_md4_init", (apr_md4_init(&context) == 0));
- ABTS_ASSERT(tc, "apr_md4_update",
- (apr_md4_update(&context,
+ ABTS_ASSERT(tc, "apr_md4_update",
+ (apr_md4_update(&context,
(unsigned char *)string, len) == 0));
-
+
ABTS_ASSERT(tc, "apr_md4_final", (apr_md4_final(digest, &context) ==0));
- ABTS_ASSERT(tc, "check for correct md4 digest",
+ ABTS_ASSERT(tc, "check for correct md4 digest",
(memcmp(digest, sum, APR_MD4_DIGESTSIZE) == 0));
}
diff --git a/test/testmd5.c b/test/testmd5.c
index a9355d20d..6d149d983 100644
--- a/test/testmd5.c
+++ b/test/testmd5.c
@@ -28,7 +28,7 @@
static struct {
const char *string;
const char *digest;
-} md5sums[] =
+} md5sums[] =
{
{"Jeff was here!",
"\xa5\x25\x8a\x89\x11\xb2\x9d\x1f\x81\x75\x96\x3b\x60\x94\x49\xc0"},
@@ -58,7 +58,7 @@ static void test_md5sum(abts_case *tc, void *data)
unsigned int len = (unsigned int)strlen(string);
ABTS_ASSERT(tc, "apr_md5_init", (apr_md5_init(&context) == 0));
- ABTS_ASSERT(tc, "apr_md5_update",
+ ABTS_ASSERT(tc, "apr_md5_update",
(apr_md5_update(&context, string, len) == 0));
ABTS_ASSERT(tc, "apr_md5_final", (apr_md5_final(digest, &context)
== 0));
@@ -93,7 +93,7 @@ static void test_md5sum_unaligned(abts_case *tc, void *data)
abts_suite *testmd5(abts_suite *suite)
{
suite = ADD_SUITE(suite);
-
+
for (count=0; count < num_sums; count++) {
abts_run_test(suite, test_md5sum, NULL);
}
diff --git a/test/testmemcache.c b/test/testmemcache.c
index d9d3f4034..33e0e7c45 100644
--- a/test/testmemcache.c
+++ b/test/testmemcache.c
@@ -424,7 +424,7 @@ static void test_memcache_addreplace(abts_case * tc, void *data)
ABTS_SKIP(tc, data, "Memcache server not found.");
return;
}
-
+
rv = apr_memcache_create(pool, 1, 0, &memcache);
ABTS_ASSERT(tc, "memcache create failed", rv == APR_SUCCESS);
@@ -488,7 +488,7 @@ static void test_memcache_incrdecr(abts_case * tc, void *data)
ABTS_SKIP(tc, data, "Memcache server not found.");
return;
}
-
+
rv = apr_memcache_create(pool, 1, 0, &memcache);
ABTS_ASSERT(tc, "memcache create failed", rv == APR_SUCCESS);
diff --git a/test/testmmap.c b/test/testmmap.c
index a50569c41..a54866438 100644
--- a/test/testmmap.c
+++ b/test/testmmap.c
@@ -81,7 +81,7 @@ static void test_file_close(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
thefile = NULL;
}
-
+
static void test_file_open(abts_case *tc, void *data)
{
apr_status_t rv;
@@ -91,7 +91,7 @@ static void test_file_open(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_PTR_NOTNULL(tc, thefile);
}
-
+
static void test_get_filesize(abts_case *tc, void *data)
{
apr_status_t rv;
diff --git a/test/testmutexscope.c b/test/testmutexscope.c
index 8dc1afcaf..13950f5cd 100644
--- a/test/testmutexscope.c
+++ b/test/testmutexscope.c
@@ -121,7 +121,7 @@ static void test_mech_mode(apr_lockmech_e mech, const char *mech_name,
assert(apr_thread_mutex_create(&thread_mutex, 0, p) == APR_SUCCESS);
assert(apr_thread_mutex_lock(thread_mutex) == APR_SUCCESS);
-
+
rv = lock_init(mech, test_mode);
if (rv != APR_SUCCESS) {
char errmsg[256];
@@ -170,7 +170,7 @@ static void test_mech_mode(apr_lockmech_e mech, const char *mech_name,
printf(" no problem encountered...\n");
}
}
-
+
assert(apr_thread_mutex_unlock(thread_mutex) == APR_SUCCESS);
i = 0;
@@ -220,13 +220,13 @@ int main(void)
,{APR_LOCK_DEFAULT_TIMED, "default_timed"}
};
int i;
-
+
assert(apr_initialize() == APR_SUCCESS);
for (i = 0; i < sizeof(lockmechs) / sizeof(lockmechs[0]); i++) {
test_mech(lockmechs[i].mech, lockmechs[i].mech_name);
}
-
+
apr_terminate();
return 0;
}
diff --git a/test/testnames.c b/test/testnames.c
index 4fcd3c033..00ec4116b 100644
--- a/test/testnames.c
+++ b/test/testnames.c
@@ -54,7 +54,7 @@ static void merge_belowroot(abts_case *tc, void *data)
apr_status_t rv;
char *dstpath = NULL;
- rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo", ABS_ROOT"foo/bar",
+ rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo", ABS_ROOT"foo/bar",
APR_FILEPATH_NOTABOVEROOT, p);
ABTS_PTR_NOTNULL(tc, dstpath);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -101,13 +101,13 @@ static void merge_dotdot_dotdot_dotdot(abts_case *tc, void *data)
apr_status_t rv;
char *dstpath = NULL;
- rv = apr_filepath_merge(&dstpath, "",
+ rv = apr_filepath_merge(&dstpath, "",
"../../..", APR_FILEPATH_TRUENAME, p);
ABTS_PTR_NOTNULL(tc, dstpath);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_STR_EQUAL(tc, "../../..", dstpath);
- rv = apr_filepath_merge(&dstpath, "",
+ rv = apr_filepath_merge(&dstpath, "",
"../../../", APR_FILEPATH_TRUENAME, p);
ABTS_PTR_NOTNULL(tc, dstpath);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -143,7 +143,7 @@ static void merge_notrelfail(abts_case *tc, void *data)
char *dstpath = NULL;
char errmsg[256];
- rv = apr_filepath_merge(&dstpath, "foo/bar", "../baz",
+ rv = apr_filepath_merge(&dstpath, "foo/bar", "../baz",
APR_FILEPATH_NOTRELATIVE, p);
apr_strerror(rv, errmsg, sizeof(errmsg));
@@ -158,7 +158,7 @@ static void merge_notabsfail(abts_case *tc, void *data)
char *dstpath = NULL;
char errmsg[256];
- rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo/bar", "../baz",
+ rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo/bar", "../baz",
APR_FILEPATH_NOTABSOLUTE, p);
apr_strerror(rv, errmsg, sizeof(errmsg));
@@ -172,7 +172,7 @@ static void merge_notabs(abts_case *tc, void *data)
apr_status_t rv;
char *dstpath = NULL;
- rv = apr_filepath_merge(&dstpath, "foo/bar", "../baz",
+ rv = apr_filepath_merge(&dstpath, "foo/bar", "../baz",
APR_FILEPATH_NOTABSOLUTE, p);
ABTS_PTR_NOTNULL(tc, dstpath);
@@ -338,7 +338,7 @@ static void root_from_cwd_and_back(abts_case *tc, void *data)
ABTS_STR_EQUAL(tc, origpath + 1, path);
#endif
- rv = apr_filepath_merge(&testpath, root, path,
+ rv = apr_filepath_merge(&testpath, root, path,
APR_FILEPATH_TRUENAME
| APR_FILEPATH_NOTABOVEROOT
| APR_FILEPATH_NOTRELATIVE, p);
@@ -346,7 +346,7 @@ static void root_from_cwd_and_back(abts_case *tc, void *data)
#if defined(WIN32) || defined(OS2) || defined(NETWARE)
hadfailed = tc->failed;
#endif
- /* The API doesn't promise equality!!!
+ /* The API doesn't promise equality!!!
* apr_filepath_get never promised a canonical filepath.
* We'll emit noise under verbose so the user is aware,
* but translate this back to success.
diff --git a/test/testoc.c b/test/testoc.c
index 923bd4b6d..a98fba78a 100644
--- a/test/testoc.c
+++ b/test/testoc.c
@@ -29,19 +29,19 @@ static void ocmaint(int reason, void *data, int status)
{
switch (reason) {
case APR_OC_REASON_DEATH:
- apr_cpystrn(reasonstr, "APR_OC_REASON_DEATH",
+ apr_cpystrn(reasonstr, "APR_OC_REASON_DEATH",
strlen("APR_OC_REASON_DEATH") + 1);
break;
case APR_OC_REASON_LOST:
- apr_cpystrn(reasonstr, "APR_OC_REASON_LOST",
+ apr_cpystrn(reasonstr, "APR_OC_REASON_LOST",
strlen("APR_OC_REASON_LOST") + 1);
break;
case APR_OC_REASON_UNWRITABLE:
- apr_cpystrn(reasonstr, "APR_OC_REASON_UNWRITEABLE",
+ apr_cpystrn(reasonstr, "APR_OC_REASON_UNWRITEABLE",
strlen("APR_OC_REASON_UNWRITEABLE") + 1);
break;
case APR_OC_REASON_RESTART:
- apr_cpystrn(reasonstr, "APR_OC_REASON_RESTART",
+ apr_cpystrn(reasonstr, "APR_OC_REASON_RESTART",
strlen("APR_OC_REASON_RESTART") + 1);
break;
}
@@ -69,7 +69,7 @@ static void test_child_kill(abts_case *tc, void *data)
rv = apr_procattr_create(&procattr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- rv = apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_NO_PIPE,
+ rv = apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_NO_PIPE,
APR_NO_PIPE);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -89,13 +89,13 @@ static void test_child_kill(abts_case *tc, void *data)
apr_sleep(apr_time_from_sec(1));
rv = apr_proc_kill(&newproc, SIGKILL);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
/* allow time for things to settle... */
apr_sleep(apr_time_from_sec(3));
-
+
apr_proc_other_child_refresh_all(APR_OC_REASON_RUNNING);
ABTS_STR_EQUAL(tc, "APR_OC_REASON_DEATH", reasonstr);
-}
+}
#else
static void oc_not_impl(abts_case *tc, void *data)
@@ -112,7 +112,7 @@ abts_suite *testoc(abts_suite *suite)
abts_run_test(suite, oc_not_impl, NULL);
#else
- abts_run_test(suite, test_child_kill, NULL);
+ abts_run_test(suite, test_child_kill, NULL);
#endif
return suite;
diff --git a/test/testpass.c b/test/testpass.c
index e11fe81cb..069f5fbd7 100644
--- a/test/testpass.c
+++ b/test/testpass.c
@@ -48,7 +48,7 @@ static struct {
{
/*
passwords and hashes created with Apache's htpasswd utility like this:
-
+
htpasswd -c -b passwords pass1 pass1
htpasswd -b passwords pass2 pass2
htpasswd -b passwords pass3 pass3
@@ -183,7 +183,7 @@ static void test_bcryptpass(abts_case *tc, void *data)
const char *hash2 = "$2a$08$qipUJiI9fySUN38hcbz.lucXvAmtgowKOWYtB9y3CXyl6lTknruou";
const char *pass3 = "foobar";
- APR_ASSERT_SUCCESS(tc, "bcrypt encode password",
+ APR_ASSERT_SUCCESS(tc, "bcrypt encode password",
apr_bcrypt_encode(pass, 5, salt, sizeof(salt), hash,
sizeof(hash)));
@@ -200,7 +200,7 @@ abts_suite *testpass(abts_suite *suite)
{
suite = ADD_SUITE(suite);
-#if CRYPT_ALGO_SUPPORTED
+#if CRYPT_ALGO_SUPPORTED
abts_run_test(suite, test_crypt, NULL);
#if APR_HAS_THREADS
abts_run_test(suite, test_threadsafe, NULL);
@@ -212,6 +212,6 @@ abts_suite *testpass(abts_suite *suite)
#ifdef GLIBCSHA_ALGO_SUPPORTED
abts_run_test(suite, test_glibc_shapass, NULL);
#endif
-
+
return suite;
}
diff --git a/test/testpipe.c b/test/testpipe.c
index 4965d57de..2f9dafbfa 100644
--- a/test/testpipe.c
+++ b/test/testpipe.c
@@ -35,7 +35,7 @@ static void create_pipe(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_PTR_NOTNULL(tc, readp);
ABTS_PTR_NOTNULL(tc, writep);
-}
+}
static void close_pipe(abts_case *tc, void *data)
{
@@ -49,7 +49,7 @@ static void close_pipe(abts_case *tc, void *data)
rv = apr_file_read(readp, buf, &nbytes);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_EBADF(rv));
-}
+}
static void set_timeout(abts_case *tc, void *data)
{
@@ -70,7 +70,7 @@ static void set_timeout(abts_case *tc, void *data)
rv = apr_file_pipe_timeout_get(readp, &timeout);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_ASSERT(tc, "Timeout mismatch, expected 1 second",
+ ABTS_ASSERT(tc, "Timeout mismatch, expected 1 second",
timeout == apr_time_from_sec(1));
}
@@ -79,7 +79,7 @@ static void read_write(abts_case *tc, void *data)
apr_status_t rv;
char *buf;
apr_size_t nbytes;
-
+
nbytes = strlen("this is a test");
buf = (char *)apr_palloc(p, nbytes + 1);
@@ -104,7 +104,7 @@ static void read_write_notimeout(abts_case *tc, void *data)
char *buf = "this is a test";
char *input;
apr_size_t nbytes;
-
+
nbytes = strlen("this is a test");
rv = apr_file_pipe_create(&readp, &writep, p);
@@ -138,7 +138,7 @@ static void test_pipe_writefull(abts_case *tc, void *data)
const char *args[2];
apr_status_t rv;
apr_exit_why_e why;
-
+
rv = apr_procattr_create(&procattr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -173,7 +173,7 @@ static void test_pipe_writefull(abts_case *tc, void *data)
rv = apr_file_close(proc.in);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
nbytes = sizeof(responsebuf);
rv = apr_file_read(proc.out, responsebuf, &nbytes);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -182,7 +182,7 @@ static void test_pipe_writefull(abts_case *tc, void *data)
ABTS_ASSERT(tc, "wait for child process",
apr_proc_wait(&proc, NULL, &why, APR_WAIT) == APR_CHILD_DONE);
-
+
ABTS_ASSERT(tc, "child terminated normally", why == APR_PROC_EXIT);
}
diff --git a/test/testpoll.c b/test/testpoll.c
index fe3520137..f22ec9253 100644
--- a/test/testpoll.c
+++ b/test/testpoll.c
@@ -47,7 +47,7 @@ static apr_pollfd_t *pollarray_large;
*/
static int default_pollset_impl = APR_POLLSET_DEFAULT;
-static void make_socket(apr_socket_t **sock, apr_sockaddr_t **sa,
+static void make_socket(apr_socket_t **sock, apr_sockaddr_t **sa,
apr_port_t port, apr_pool_t *p, abts_case *tc)
{
apr_status_t rv;
@@ -63,15 +63,15 @@ static void make_socket(apr_socket_t **sock, apr_sockaddr_t **sa,
}
#ifdef OLD_POLL_INTERFACE
-static void check_sockets(const apr_pollfd_t *pollarray,
- apr_socket_t **sockarray, int which, int pollin,
+static void check_sockets(const apr_pollfd_t *pollarray,
+ apr_socket_t **sockarray, int which, int pollin,
abts_case *tc)
{
apr_status_t rv;
apr_int16_t event;
char *str;
- rv = apr_poll_revents_get(&event, sockarray[which],
+ rv = apr_poll_revents_get(&event, sockarray[which],
(apr_pollfd_t *)pollarray);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
if (pollin) {
@@ -99,7 +99,7 @@ static void send_msg(apr_socket_t **sockarray, apr_sockaddr_t **sas, int which,
ABTS_SIZE_EQUAL(tc, strlen("hello"), len);
}
-static void recv_msg(apr_socket_t **sockarray, int which, apr_pool_t *p,
+static void recv_msg(apr_socket_t **sockarray, int which, apr_pool_t *p,
abts_case *tc)
{
apr_size_t buflen = 5;
@@ -117,7 +117,7 @@ static void recv_msg(apr_socket_t **sockarray, int which, apr_pool_t *p,
ABTS_STR_EQUAL(tc, "hello", buffer);
}
-
+
static void create_all_sockets(abts_case *tc, void *data)
{
int i;
@@ -126,7 +126,7 @@ static void create_all_sockets(abts_case *tc, void *data)
make_socket(&s[i], &sa[i], 7777 + i, p, tc);
}
}
-
+
#ifdef OLD_POLL_INTERFACE
static void setup_small_poll(abts_case *tc, void *data)
{
@@ -135,7 +135,7 @@ static void setup_small_poll(abts_case *tc, void *data)
rv = apr_poll_setup(&pollarray, SMALL_NUM_SOCKETS, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
for (i = 0; i < SMALL_NUM_SOCKETS;i++){
ABTS_INT_EQUAL(tc, 0, pollarray[i].reqevents);
ABTS_INT_EQUAL(tc, 0, pollarray[i].rtnevents);
@@ -153,7 +153,7 @@ static void setup_large_poll(abts_case *tc, void *data)
rv = apr_poll_setup(&pollarray_large, LARGE_NUM_SOCKETS, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
for (i = 0; i < LARGE_NUM_SOCKETS;i++){
ABTS_INT_EQUAL(tc, 0, pollarray_large[i].reqevents);
ABTS_INT_EQUAL(tc, 0, pollarray_large[i].rtnevents);
@@ -257,7 +257,7 @@ static void send_large_pollarray(abts_case *tc, void *data)
send_msg(s, sa, LARGE_NUM_SOCKETS - 1, tc);
- rv = apr_poll(pollarray_large, LARGE_NUM_SOCKETS, &lrv,
+ rv = apr_poll(pollarray_large, LARGE_NUM_SOCKETS, &lrv,
2 * APR_USEC_PER_SEC);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -279,7 +279,7 @@ static void recv_large_pollarray(abts_case *tc, void *data)
recv_msg(s, LARGE_NUM_SOCKETS - 1, p, tc);
- rv = apr_poll(pollarray_large, LARGE_NUM_SOCKETS, &lrv,
+ rv = apr_poll(pollarray_large, LARGE_NUM_SOCKETS, &lrv,
2 * APR_USEC_PER_SEC);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
@@ -350,7 +350,7 @@ static void multi_event_pollset(abts_case *tc, void *data)
rv = apr_pollset_remove(pollset, &socket_pollfd);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
}
-
+
static void add_sockets_pollset(abts_case *tc, void *data)
{
apr_status_t rv;
@@ -416,7 +416,7 @@ static void send_middle_pollset(abts_case *tc, void *data)
apr_status_t rv;
const apr_pollfd_t *descs = NULL;
int num;
-
+
send_msg(s, sa, 2, tc);
send_msg(s, sa, 5, tc);
rv = apr_pollset_poll(pollset, -1, &num, &descs);
@@ -454,7 +454,7 @@ static void send_last_pollset(abts_case *tc, void *data)
apr_status_t rv;
const apr_pollfd_t *descs = NULL;
int num;
-
+
send_msg(s, sa, LARGE_NUM_SOCKETS - 1, tc);
rv = apr_pollset_poll(pollset, -1, &num, &descs);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -546,7 +546,7 @@ static void pollset_remove(abts_case *tc, void *data)
ABTS_PTR_EQUAL(tc, s[2], hot_files[1].desc.s);
ABTS_PTR_EQUAL(tc, (void *)4, hot_files[2].client_data);
ABTS_PTR_EQUAL(tc, s[3], hot_files[2].desc.s);
-
+
/* now remove the pollset elements referring to desc s[2] */
pfd.desc.s = s[2];
pfd.client_data = (void *)999; /* not used on this call */
@@ -607,7 +607,7 @@ static void trigger_pollcb(abts_case *tc, void *data)
apr_status_t rv;
apr_pollfd_t socket_pollfd;
pollcb_baton_t pcb;
-
+
POLLCB_PREREQ;
ABTS_PTR_NOTNULL(tc, s[0]);
@@ -617,7 +617,7 @@ static void trigger_pollcb(abts_case *tc, void *data)
socket_pollfd.client_data = s[0];
rv = apr_pollcb_add(pollcb, &socket_pollfd);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
send_msg(s, sa, 0, tc);
pcb.tc = tc;
pcb.count = 0;
@@ -639,7 +639,7 @@ static void timeout_pollcb(abts_case *tc, void *data)
pcb.count = 0;
pcb.tc = tc;
- rv = apr_pollcb_poll(pollcb, 1, trigger_pollcb_cb, &pcb);
+ rv = apr_pollcb_poll(pollcb, 1, trigger_pollcb_cb, &pcb);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, pcb.count);
}
@@ -653,7 +653,7 @@ static void timeout_pollin_pollcb(abts_case *tc, void *data)
POLLCB_PREREQ;
recv_msg(s, 0, p, tc);
-
+
ABTS_PTR_NOTNULL(tc, s[0]);
socket_pollfd.desc_type = APR_POLL_SOCKET;
socket_pollfd.reqevents = APR_POLLIN;
@@ -661,11 +661,11 @@ static void timeout_pollin_pollcb(abts_case *tc, void *data)
socket_pollfd.client_data = s[0];
rv = apr_pollcb_add(pollcb, &socket_pollfd);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
pcb.count = 0;
pcb.tc = tc;
-
- rv = apr_pollcb_poll(pollcb, 1, trigger_pollcb_cb, &pcb);
+
+ rv = apr_pollcb_poll(pollcb, 1, trigger_pollcb_cb, &pcb);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, pcb.count);
@@ -688,7 +688,7 @@ static void pollset_default(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv1);
ABTS_PTR_NOTNULL(tc, pollset);
-
+
rv1 = apr_pollset_create_ex(&pollset, 1, p, 0, APR_POLLSET_KQUEUE);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv1);
ABTS_PTR_NOTNULL(tc, pollset);
@@ -705,13 +705,13 @@ static void pollset_default(abts_case *tc, void *data)
if (rv1 == APR_SUCCESS) {
ABTS_PTR_NOTNULL(tc, pollset);
}
-
+
rv2 = apr_pollset_create_ex(&pollset, 1, p, APR_POLLSET_NODEFAULT,
APR_POLLSET_KQUEUE);
if (rv2 == APR_SUCCESS) {
ABTS_PTR_NOTNULL(tc, pollset);
}
-
+
ABTS_ASSERT(tc,
"failure using APR_POLLSET_NODEFAULT with unsupported method",
rv1 != APR_SUCCESS || rv2 != APR_SUCCESS);
@@ -736,7 +736,7 @@ static void pollcb_default(abts_case *tc, void *data)
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv1);
ABTS_PTR_NOTNULL(tc, pollcb);
-
+
rv1 = apr_pollcb_create_ex(&pollcb, 1, p, 0, APR_POLLSET_KQUEUE);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv1);
ABTS_PTR_NOTNULL(tc, pollcb);
@@ -753,13 +753,13 @@ static void pollcb_default(abts_case *tc, void *data)
if (rv1 == APR_SUCCESS) {
ABTS_PTR_NOTNULL(tc, pollcb);
}
-
+
rv2 = apr_pollcb_create_ex(&pollcb, 1, p, APR_POLLSET_NODEFAULT,
APR_POLLSET_KQUEUE);
if (rv2 == APR_SUCCESS) {
ABTS_PTR_NOTNULL(tc, pollcb);
}
-
+
ABTS_ASSERT(tc,
"failure using APR_POLLSET_NODEFAULT with unsupported method",
rv1 != APR_SUCCESS || rv2 != APR_SUCCESS);
diff --git a/test/testpools.c b/test/testpools.c
index c92a3f95a..3a633b1ca 100644
--- a/test/testpools.c
+++ b/test/testpools.c
@@ -36,7 +36,7 @@ static void alloc_bytes(abts_case *tc, void *data)
{
int i;
char *alloc;
-
+
alloc = apr_palloc(pmain, ALLOC_BYTES);
ABTS_PTR_NOTNULL(tc, alloc);
@@ -54,7 +54,7 @@ static void calloc_bytes(abts_case *tc, void *data)
{
int i;
char *alloc;
-
+
alloc = apr_pcalloc(pmain, ALLOC_BYTES);
ABTS_PTR_NOTNULL(tc, alloc);
@@ -109,7 +109,7 @@ static char *another_data = "Hello again, world.";
static apr_status_t another_cleanup(void *data)
{
return data == another_data ? APR_SUCCESS : APR_EGENERAL;
-}
+}
/* A few places in httpd modify the cleanup list for a pool while
* cleanups are being run. An example is close_listeners_on_exec ->
@@ -121,7 +121,7 @@ static apr_status_t another_cleanup(void *data)
static apr_status_t dodgy_cleanup(void *data)
{
apr_pool_t *p = data;
-
+
return apr_pool_cleanup_run(p, another_data, another_cleanup);
}
@@ -136,7 +136,7 @@ static void test_cleanups(abts_case *tc, void *data)
success_cleanup);
apr_pool_cleanup_register(pchild, checker_data, checker_cleanup,
success_cleanup);
- apr_pool_cleanup_register(pchild, NULL, checker_cleanup,
+ apr_pool_cleanup_register(pchild, NULL, checker_cleanup,
success_cleanup);
apr_pool_cleanup_register(pchild, another_data, another_cleanup,
another_cleanup);
diff --git a/test/testproc.c b/test/testproc.c
index f62a5f9a8..cd8ccf9c2 100644
--- a/test/testproc.c
+++ b/test/testproc.c
@@ -41,7 +41,7 @@ static void test_create_proc(abts_case *tc, void *data)
rv = apr_procattr_create(&attr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- rv = apr_procattr_io_set(attr, APR_FULL_BLOCK, APR_FULL_BLOCK,
+ rv = apr_procattr_io_set(attr, APR_FULL_BLOCK, APR_FULL_BLOCK,
APR_NO_PIPE);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -53,8 +53,8 @@ static void test_create_proc(abts_case *tc, void *data)
args[0] = "proc_child" EXTENSION;
args[1] = NULL;
-
- rv = apr_proc_create(&newproc, proc_child, args, NULL,
+
+ rv = apr_proc_create(&newproc, proc_child, args, NULL,
attr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
@@ -130,7 +130,7 @@ static void test_file_redir(abts_case *tc, void *data)
args[0] = "proc_child";
args[1] = NULL;
- rv = apr_proc_create(&newproc, proc_child, args, NULL,
+ rv = apr_proc_create(&newproc, proc_child, args, NULL,
attr, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
diff --git a/test/testprocmutex.c b/test/testprocmutex.c
index 24cc44189..573942bca 100644
--- a/test/testprocmutex.c
+++ b/test/testprocmutex.c
@@ -106,7 +106,7 @@ static void make_child(abts_case *tc, int trylock, apr_proc_t **proc, apr_pool_t
exit(1);
} while (i < MAX_ITER);
exit(0);
- }
+ }
ABTS_ASSERT(tc, "fork failed", rv == APR_INPARENT);
}
@@ -123,22 +123,22 @@ static void await_child(abts_case *tc, apr_proc_t *proc)
rv == APR_CHILD_DONE && why == APR_PROC_EXIT && code == 0);
}
-static void test_exclusive(abts_case *tc, const char *lockname,
+static void test_exclusive(abts_case *tc, const char *lockname,
lockmech_t *mech)
{
apr_proc_t *child[CHILDREN];
apr_status_t rv;
int n;
-
+
rv = apr_proc_mutex_create(&proc_lock, lockname, mech->num, p);
APR_ASSERT_SUCCESS(tc, "create the mutex", rv);
-
+
for (n = 0; n < CHILDREN; n++)
make_child(tc, 0, &child[n], p);
for (n = 0; n < CHILDREN; n++)
await_child(tc, child[n]);
-
+
ABTS_ASSERT(tc, "Locks don't appear to work", *x == MAX_COUNTER);
rv = apr_proc_mutex_trylock(proc_lock);
@@ -174,7 +174,7 @@ static void test_exclusive(abts_case *tc, const char *lockname,
for (n = 0; n < CHILDREN; n++)
await_child(tc, child[n]);
-
+
ABTS_ASSERT(tc, "Locks don't appear to work with trylock",
*x == MAX_COUNTER);
}
@@ -211,7 +211,7 @@ static void test_exclusive(abts_case *tc, const char *lockname,
for (n = 0; n < CHILDREN; n++)
await_child(tc, child[n]);
-
+
ABTS_ASSERT(tc, "Locks don't appear to work with timedlock",
*x == MAX_COUNTER);
}
diff --git a/test/testredis.c b/test/testredis.c
index c91fa6fc8..c7fc7dda5 100644
--- a/test/testredis.c
+++ b/test/testredis.c
@@ -61,7 +61,7 @@ static const char txt[] =
* this datatype is for our custom server determination function. this might
* be useful if you don't want to rely on simply hashing keys to determine
* where a key belongs, but instead want to write something fancy, or use some
- * other kind of configuration data, i.e. a hash plus some data about a
+ * other kind of configuration data, i.e. a hash plus some data about a
* namespace, or whatever. see my_server_func, and test_redis_user_funcs
* for the examples.
*/
@@ -71,7 +71,7 @@ typedef struct {
} my_hash_server_baton;
-/* this could do something fancy and return some hash result.
+/* this could do something fancy and return some hash result.
* for simplicity, just return the same value, so we can test it later on.
* if you wanted to use some external hashing library or functions for
* consistent hashing, for example, this would be a good place to do it.
@@ -86,7 +86,7 @@ static apr_uint32_t my_hash_func(void *baton, const char *data,
/*
* a fancy function to determine which server to use given some kind of data
* and a hash value. this example actually ignores the hash value itself
- * and pulls some number from the *baton, which is a struct that has some
+ * and pulls some number from the *baton, which is a struct that has some
* kind of meaningful stuff in it.
*/
static apr_redis_server_t *my_server_func(void *baton,
@@ -98,7 +98,7 @@ static apr_redis_server_t *my_server_func(void *baton,
if(mc->ntotal == 0) {
return NULL;
- }
+ }
if(mc->ntotal < mhsb->which_server) {
return NULL;
@@ -238,40 +238,40 @@ static void test_redis_create(abts_case * tc, void *data)
rv = apr_redis_create(pool, max_servers, 0, &redis);
ABTS_ASSERT(tc, "redis create failed", rv == APR_SUCCESS);
-
+
for (i = 1; i <= max_servers; i++) {
apr_port_t port;
-
+
port = PORT + i;
rv =
apr_redis_server_create(pool, HOST, PORT + i, 0, 1, 1, 60, 60, &server);
ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS);
-
+
rv = apr_redis_add_server(redis, server);
ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS);
-
+
s = apr_redis_find_server(redis, HOST, port);
ABTS_PTR_EQUAL(tc, server, s);
-
+
rv = apr_redis_disable_server(redis, s);
ABTS_ASSERT(tc, "server disable failed", rv == APR_SUCCESS);
-
+
rv = apr_redis_enable_server(redis, s);
ABTS_ASSERT(tc, "server enable failed", rv == APR_SUCCESS);
-
+
hash = apr_redis_hash(redis, prefix, strlen(prefix));
ABTS_ASSERT(tc, "hash failed", hash > 0);
-
+
s = apr_redis_find_server_hash(redis, hash);
ABTS_PTR_NOTNULL(tc, s);
}
rv = apr_redis_server_create(pool, HOST, PORT, 0, 1, 1, 60, 60, &server);
ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS);
-
+
rv = apr_redis_add_server(redis, server);
ABTS_ASSERT(tc, "server add should have failed", rv != APR_SUCCESS);
-
+
}
/* install our own custom hashing and server selection routines. */
@@ -279,13 +279,13 @@ static void test_redis_create(abts_case * tc, void *data)
static int create_test_hash(apr_pool_t *p, apr_hash_t *h)
{
int i;
-
+
for (i = 0; i < TDATA_SIZE; i++) {
char *k, *v;
-
+
k = apr_pstrcat(p, prefix, apr_itoa(p, i), NULL);
v = apr_pstrndup(p, txt, randval((apr_uint32_t)strlen(txt)));
-
+
apr_hash_set(h, k, APR_HASH_KEY_STRING, v);
}
@@ -301,7 +301,7 @@ static void test_redis_user_funcs(abts_case * tc, void *data)
apr_uint32_t max_servers = 10;
apr_uint32_t hres;
apr_uint32_t i;
- my_hash_server_baton *baton =
+ my_hash_server_baton *baton =
apr_pcalloc(pool, sizeof(my_hash_server_baton));
if (!has_redis_server()) {
@@ -312,7 +312,7 @@ static void test_redis_user_funcs(abts_case * tc, void *data)
rv = apr_redis_create(pool, max_servers, 0, &redis);
ABTS_ASSERT(tc, "redis create failed", rv == APR_SUCCESS);
- /* as noted above, install our custom hash function, and call
+ /* as noted above, install our custom hash function, and call
* apr_redis_hash. the return value should be our predefined number,
* and our function just ignores the other args, for simplicity.
*/
@@ -320,20 +320,20 @@ static void test_redis_user_funcs(abts_case * tc, void *data)
hres = apr_redis_hash(redis, "whatever", sizeof("whatever") - 1);
ABTS_INT_EQUAL(tc, HASH_FUNC_RESULT, hres);
-
+
/* add some servers */
for(i = 1; i <= 10; i++) {
apr_redis_server_t *ms;
rv = apr_redis_server_create(pool, HOST, i, 0, 1, 1, 60, 60, &ms);
ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS);
-
+
rv = apr_redis_add_server(redis, ms);
ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS);
}
- /*
- * set 'which_server' in our server_baton to find the third server
+ /*
+ * set 'which_server' in our server_baton to find the third server
* which should have the same port.
*/
baton->which_server = 3;
@@ -373,7 +373,7 @@ static void test_redis_meta(abts_case * tc, void *data)
apr_redis_stats(server, p, &stats);
ABTS_PTR_NOTNULL(tc, stats);
- /*
+ /*
* no way to know exactly what will be in most of these, so
* just make sure there is something.
*/
@@ -418,19 +418,19 @@ static void test_redis_incrdecr(abts_case * tc, void *data)
ABTS_SKIP(tc, data, "Redis server not found.");
return;
}
-
+
rv = apr_redis_create(pool, 1, 0, &redis);
ABTS_ASSERT(tc, "redis create failed", rv == APR_SUCCESS);
-
+
rv = apr_redis_server_create(pool, HOST, PORT, 0, 1, 1, 60, 60, &server);
ABTS_ASSERT(tc, "server create failed", rv == APR_SUCCESS);
-
+
rv = apr_redis_add_server(redis, server);
ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS);
rv = apr_redis_set(redis, prefix, "271", sizeof("271") - 1, 27);
ABTS_ASSERT(tc, "set failed", rv == APR_SUCCESS);
-
+
for( i = 1; i <= TDATA_SIZE; i++) {
apr_uint32_t expect;
diff --git a/test/testshm.c b/test/testshm.c
index 12b6f3542..c04ec1848 100644
--- a/test/testshm.c
+++ b/test/testshm.c
@@ -182,7 +182,7 @@ static void test_named(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "Couldn't set copy environment", rv);
args[0] = apr_pstrdup(p, "testshmconsumer" EXTENSION);
- rv = apr_proc_create(&pidconsumer, TESTBINPATH "testshmconsumer" EXTENSION, args,
+ rv = apr_proc_create(&pidconsumer, TESTBINPATH "testshmconsumer" EXTENSION, args,
NULL, attr2, p);
APR_ASSERT_SUCCESS(tc, "Couldn't launch consumer", rv);
@@ -198,9 +198,9 @@ static void test_named(abts_case *tc, void *data)
* This way, if they didn't succeed, we can just run this test again
* without having to cleanup manually.
*/
- APR_ASSERT_SUCCESS(tc, "Error destroying shared memory",
+ APR_ASSERT_SUCCESS(tc, "Error destroying shared memory",
apr_shm_destroy(shm));
-
+
ABTS_INT_EQUAL(tc, sent, received);
}
@@ -298,9 +298,9 @@ abts_suite *testshm(abts_suite *suite)
#if APR_HAS_FORK
abts_run_test(suite, test_anon, NULL);
#endif
- abts_run_test(suite, test_named, NULL);
- abts_run_test(suite, test_named_remove, NULL);
- abts_run_test(suite, test_named_delete, NULL);
+ abts_run_test(suite, test_named, NULL);
+ abts_run_test(suite, test_named_remove, NULL);
+ abts_run_test(suite, test_named_delete, NULL);
#endif
return suite;
diff --git a/test/testshmconsumer.c b/test/testshmconsumer.c
index bf70e728c..adde4fc16 100644
--- a/test/testshmconsumer.c
+++ b/test/testshmconsumer.c
@@ -38,7 +38,7 @@ int main(void)
int recvd;
apr_initialize();
-
+
if (apr_pool_create(&pool, NULL) != APR_SUCCESS) {
exit(-1);
}
@@ -66,7 +66,7 @@ int main(void)
int main(void)
{
/* Just return, this program will never be called, so we don't need
- * to print a message
+ * to print a message
*/
return 0;
}
diff --git a/test/testshmproducer.c b/test/testshmproducer.c
index eb61e76b9..ad8cff898 100644
--- a/test/testshmproducer.c
+++ b/test/testshmproducer.c
@@ -39,7 +39,7 @@ int main(void)
int sent = 0;
apr_initialize();
-
+
if (apr_pool_create(&pool, NULL) != APR_SUCCESS) {
exit(-1);
}
diff --git a/test/testskiplist.c b/test/testskiplist.c
index e698dfc0a..9101c0ec1 100644
--- a/test/testskiplist.c
+++ b/test/testskiplist.c
@@ -337,7 +337,7 @@ static int ecomp(void *a, void *b)
* Using apr_skiplist_remove_compare(..., scomp, NULL) would not work because
* it will likely remove any duplicate (the first one) encountered on the path,
* hence possibly not the expected one.
- *
+ *
* Using apr_skiplist_remove_compare(..., ecomp, NULL) works provided all the
* duplicates (same a) don't also have the same b (which is the case in the
* test below), hence uniqueness is cooked in the elem itself.
@@ -385,7 +385,7 @@ static void skiplist_test(abts_case *tc, void *data) {
ABTS_INT_EQUAL(tc, APR_SUCCESS, apr_skiplist_init(&list, ptmp));
apr_skiplist_set_compare(list, comp, comp);
-
+
/* insert 10 objects */
for (i = 0; i < test_elems; ++i){
add_int_to_skiplist(tc, list, i);
@@ -412,7 +412,7 @@ static void skiplist_test(abts_case *tc, void *data) {
add_int_to_skiplist(tc, list, 42);
val = apr_skiplist_pop(list, NULL);
- ABTS_INT_EQUAL(tc, *val, 42);
+ ABTS_INT_EQUAL(tc, *val, 42);
/* empty */
val = apr_skiplist_pop(list, NULL);
diff --git a/test/testsock.c b/test/testsock.c
index 23a0073fe..74bb66c7e 100644
--- a/test/testsock.c
+++ b/test/testsock.c
@@ -59,7 +59,7 @@ static void launch_child(abts_case *tc, apr_proc_t *proc, const char *arg1, apr_
APR_ASSERT_SUCCESS(tc, "Couldn't launch program", rv);
}
-static int wait_child(abts_case *tc, apr_proc_t *proc)
+static int wait_child(abts_case *tc, apr_proc_t *proc)
{
int exitcode;
apr_exit_why_e why;
@@ -181,11 +181,11 @@ static apr_socket_t *setup_socket(abts_case *tc)
rv = apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);
APR_ASSERT_SUCCESS(tc, "Could not set REUSEADDR on socket", rv);
-
+
rv = apr_socket_bind(sock, sa);
APR_ASSERT_SUCCESS(tc, "Problem binding to port", rv);
if (rv) return NULL;
-
+
rv = apr_socket_listen(sock, 5);
APR_ASSERT_SUCCESS(tc, "Problem listening on socket", rv);
@@ -196,9 +196,9 @@ static void test_create_bind_listen(abts_case *tc, void *data)
{
apr_status_t rv;
apr_socket_t *sock = setup_socket(tc);
-
+
if (!sock) return;
-
+
rv = apr_socket_close(sock);
APR_ASSERT_SUCCESS(tc, "Problem closing socket", rv);
}
@@ -216,13 +216,13 @@ static void test_send(abts_case *tc, void *data)
if (!sock) return;
launch_child(tc, &proc, "read", p);
-
+
rv = apr_socket_accept(&sock2, sock, p);
APR_ASSERT_SUCCESS(tc, "Problem with receiving connection", rv);
apr_socket_protocol_get(sock2, &protocol);
ABTS_INT_EQUAL(tc, APR_PROTO_TCP, protocol);
-
+
length = strlen(DATASTR);
apr_socket_send(sock2, DATASTR, &length);
@@ -244,18 +244,18 @@ static void test_recv(abts_case *tc, void *data)
int protocol;
apr_size_t length = STRLEN;
char datastr[STRLEN];
-
+
sock = setup_socket(tc);
if (!sock) return;
launch_child(tc, &proc, "write", p);
-
+
rv = apr_socket_accept(&sock2, sock, p);
APR_ASSERT_SUCCESS(tc, "Problem with receiving connection", rv);
apr_socket_protocol_get(sock2, &protocol);
ABTS_INT_EQUAL(tc, APR_PROTO_TCP, protocol);
-
+
memset(datastr, 0, STRLEN);
apr_socket_recv(sock2, datastr, &length);
@@ -338,19 +338,19 @@ static void test_timeout(abts_case *tc, void *data)
apr_proc_t proc;
int protocol;
int exit;
-
+
sock = setup_socket(tc);
if (!sock) return;
launch_child(tc, &proc, "read", p);
-
+
rv = apr_socket_accept(&sock2, sock, p);
APR_ASSERT_SUCCESS(tc, "Problem with receiving connection", rv);
apr_socket_protocol_get(sock2, &protocol);
ABTS_INT_EQUAL(tc, APR_PROTO_TCP, protocol);
-
- exit = wait_child(tc, &proc);
+
+ exit = wait_child(tc, &proc);
ABTS_INT_EQUAL(tc, SOCKET_TIMEOUT, exit);
/* We didn't write any data, so make sure the child program returns
@@ -389,10 +389,10 @@ static void test_print_addr(abts_case *tc, void *data)
ABTS_INT_NEQUAL(tc, 0, rc);
memset(buf, 'z', sizeof buf);
-
+
APR_ASSERT_SUCCESS(tc, "could not get IP address",
apr_sockaddr_ip_getbuf(buf, 22, sa));
-
+
ABTS_STR_EQUAL(tc, "0.0.0.0", buf);
}
#endif
@@ -443,7 +443,7 @@ static void test_get_addr(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "accept connection",
apr_socket_accept(&sd, ld, subp));
-
+
{
/* wait for writability */
apr_pollfd_t pfd;
@@ -488,7 +488,7 @@ static void test_get_addr(abts_case *tc, void *data)
ABTS_PTR_EQUAL(tc, subp, sa->pool);
ABTS_PTR_EQUAL(tc, subp, ca->pool);
-
+
apr_socket_close(cd);
apr_socket_close(sd);
apr_socket_close(ld);
@@ -614,11 +614,11 @@ static void test_freebind(abts_case *tc, void *data)
apr_socket_t *sock;
apr_sockaddr_t *sa;
apr_int32_t on;
-
+
/* RFC 5737 address */
rv = apr_sockaddr_info_get(&sa, "192.0.2.1", APR_INET, 8080, 0, p);
APR_ASSERT_SUCCESS(tc, "Problem generating sockaddr", rv);
-
+
rv = apr_socket_create(&sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, p);
APR_ASSERT_SUCCESS(tc, "Problem creating socket", rv);
@@ -627,14 +627,14 @@ static void test_freebind(abts_case *tc, void *data)
rv = apr_socket_opt_set(sock, APR_SO_FREEBIND, 1);
APR_ASSERT_SUCCESS(tc, "Could not enable FREEBIND option", rv);
-
+
rv = apr_socket_opt_get(sock, APR_SO_FREEBIND, &on);
APR_ASSERT_SUCCESS(tc, "Could not retrieve FREEBIND option", rv);
ABTS_INT_EQUAL(tc, 1, on);
-
+
rv = apr_socket_bind(sock, sa);
APR_ASSERT_SUCCESS(tc, "Problem binding to port with FREEBIND", rv);
-
+
rv = apr_socket_close(sock);
APR_ASSERT_SUCCESS(tc, "Problem closing socket", rv);
#endif
@@ -648,7 +648,7 @@ static void test_freebind(abts_case *tc, void *data)
/* ... fill in other platforms here */
#endif
-#ifdef TEST_ZONE_NAME
+#ifdef TEST_ZONE_NAME
#define TEST_ZONE_FULLADDR TEST_ZONE_ADDR "%" TEST_ZONE_NAME
#endif
@@ -659,7 +659,7 @@ static void test_zone(abts_case *tc, void *data)
apr_status_t rv;
const char *name = NULL;
apr_uint32_t id = 0;
-
+
rv = apr_sockaddr_info_get(&sa, "127.0.0.1", APR_INET, 8080, 0, p);
APR_ASSERT_SUCCESS(tc, "Problem generating sockaddr", rv);
@@ -668,7 +668,7 @@ static void test_zone(abts_case *tc, void *data)
apr_sockaddr_zone_set(sa, "1"));
ABTS_INT_EQUAL(tc, APR_EBADIP,
apr_sockaddr_zone_get(sa, &name, &id, p));
-
+
rv = apr_sockaddr_info_get(&sa, "::1", APR_INET6, 8080, 0, p);
APR_ASSERT_SUCCESS(tc, "Problem generating sockaddr", rv);
@@ -684,13 +684,13 @@ static void test_zone(abts_case *tc, void *data)
{
apr_sockaddr_t *sa2;
char buf[50];
-
+
APR_ASSERT_SUCCESS(tc, "Set zone to " TEST_ZONE_NAME,
apr_sockaddr_zone_set(sa, TEST_ZONE_NAME));
-
+
APR_ASSERT_SUCCESS(tc, "Get zone",
apr_sockaddr_zone_get(sa, NULL, NULL, p));
-
+
APR_ASSERT_SUCCESS(tc, "Get zone",
apr_sockaddr_zone_get(sa, &name, &id, p));
ABTS_STR_EQUAL(tc, TEST_ZONE_NAME, name);
@@ -704,12 +704,12 @@ static void test_zone(abts_case *tc, void *data)
memset(buf, 'A', sizeof buf);
ABTS_INT_EQUAL(tc, APR_ENOSPC, apr_sockaddr_ip_getbuf(buf, strlen(TEST_ZONE_ADDR), sa));
ABTS_INT_EQUAL(tc, APR_ENOSPC, apr_sockaddr_ip_getbuf(buf, strlen(TEST_ZONE_FULLADDR), sa));
-
+
APR_ASSERT_SUCCESS(tc, "get IP address",
apr_sockaddr_ip_getbuf(buf, strlen(TEST_ZONE_FULLADDR) + 1, sa));
/* Check for overflow. */
ABTS_INT_EQUAL(tc, 'A', buf[strlen(buf) + 1]);
-
+
rv = apr_sockaddr_info_copy(&sa2, sa, p);
APR_ASSERT_SUCCESS(tc, "Problem copying sockaddr", rv);
@@ -733,7 +733,7 @@ static void test_zone(abts_case *tc, void *data)
#endif /* TEST_ZONE_NAME */
#endif /* APR_HAVE_IPV6 */
}
-
+
abts_suite *testsock(abts_suite *suite)
{
suite = ADD_SUITE(suite)
diff --git a/test/testsockets.c b/test/testsockets.c
index 5b0db3e0b..8be857963 100644
--- a/test/testsockets.c
+++ b/test/testsockets.c
@@ -234,7 +234,7 @@ abts_suite *testsockets(abts_suite *suite)
#endif
abts_run_test(suite, socket_userdata, NULL);
-
+
return suite;
}
diff --git a/test/testsockopt.c b/test/testsockopt.c
index 203e2c39f..0a53e9af5 100644
--- a/test/testsockopt.c
+++ b/test/testsockopt.c
@@ -48,7 +48,7 @@ static void set_debug(abts_case *tc, void *data)
{
apr_status_t rv1, rv2;
apr_int32_t ck;
-
+
/* On some platforms APR_SO_DEBUG can only be set as root; just test
* for get/set consistency of this option. */
rv1 = apr_socket_opt_set(sock, APR_SO_DEBUG, 1);
@@ -108,7 +108,7 @@ static void corkable(abts_case *tc, void *data)
rv = apr_socket_opt_set(sock, APR_TCP_NOPUSH, 0);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
-
+
rv = apr_socket_opt_get(sock, APR_TCP_NODELAY, &ck);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
ABTS_INT_EQUAL(tc, 1, ck);
diff --git a/test/teststr.c b/test/teststr.c
index 432fb6b21..baa9b9d68 100644
--- a/test/teststr.c
+++ b/test/teststr.c
@@ -106,7 +106,7 @@ static void snprintf_noNULL(abts_case *tc, void *data)
testing[4] = 'i';
testing[5] = 'n';
testing[6] = 'g';
-
+
/* If this test fails, we are going to seg fault. */
apr_snprintf(buff, sizeof(buff), "%.*s", 7, testing);
ABTS_STR_NEQUAL(tc, buff, testing, 7);
@@ -138,11 +138,11 @@ static void snprintf_underflow(abts_case *tc, void *data)
rv = apr_snprintf(buf, sizeof buf, "%.2f", (double)0.0001);
ABTS_INT_EQUAL(tc, 4, rv);
ABTS_STR_EQUAL(tc, "0.00", buf);
-
+
rv = apr_snprintf(buf, sizeof buf, "%.2f", (double)0.001);
ABTS_INT_EQUAL(tc, 4, rv);
ABTS_STR_EQUAL(tc, "0.00", buf);
-
+
rv = apr_snprintf(buf, sizeof buf, "%.2f", (double)0.01);
ABTS_INT_EQUAL(tc, 4, rv);
ABTS_STR_EQUAL(tc, "0.01", buf);
@@ -161,7 +161,7 @@ static void string_error(abts_case *tc, void *data)
rv = apr_strerror(APR_TIMEUP, buf, sizeof buf);
ABTS_PTR_EQUAL(tc, buf, rv);
ABTS_STR_EQUAL(tc, "The timeout specified has expired", buf);
-
+
/* throw some randomish numbers at it to check for robustness */
for (n = 1; n < 1000000; n *= 2) {
apr_strerror(n, buf, sizeof buf);
@@ -190,7 +190,7 @@ static void string_strtoi64(abts_case *tc, void *data)
const char *in, *end;
apr_int64_t result;
} ts[] = {
-
+
/* base 10 tests */
{ 0, 10, "123545", NULL, APR_INT64_C(123545) },
{ 0, 10, " 123545", NULL, APR_INT64_C(123545) },
@@ -245,17 +245,17 @@ static void string_strtoi64(abts_case *tc, void *data)
char *end = "end ptr not changed";
apr_int64_t result;
int errnum;
-
+
errno = 0;
result = apr_strtoi64(ts[n].in, &end, ts[n].base);
errnum = errno;
ABTS_ASSERT(tc,
- apr_psprintf(p, "for '%s': result was %" APR_INT64_T_FMT
+ apr_psprintf(p, "for '%s': result was %" APR_INT64_T_FMT
" not %" APR_INT64_T_FMT, ts[n].in,
result, ts[n].result),
result == ts[n].result);
-
+
if (ts[n].errnum != -1) {
ABTS_ASSERT(tc,
apr_psprintf(p, "for '%s': errno was %d not %d", ts[n].in,
@@ -339,7 +339,7 @@ static void string_strfsize(abts_case *tc, void *data)
for (n = 0; n < sizeof(ts)/sizeof(ts[0]); n++) {
char buf[6], *ret;
-
+
buf[5] = '%';
ret = apr_strfsize(ts[n].size, buf);
@@ -353,7 +353,7 @@ static void string_strfsize(abts_case *tc, void *data)
static void string_cpystrn(abts_case *tc, void *data)
{
char buf[6], *ret;
-
+
buf[5] = 'Z';
ret = apr_cpystrn(buf, "123456", 5);
@@ -368,7 +368,7 @@ static void snprintf_overflow(abts_case *tc, void *data)
{
char buf[4];
int rv;
-
+
buf[2] = '4';
buf[3] = '2';
diff --git a/test/teststrmatch.c b/test/teststrmatch.c
index b6a4a1226..959b0e35d 100644
--- a/test/teststrmatch.c
+++ b/test/teststrmatch.c
@@ -43,7 +43,7 @@ static void test_str(abts_case *tc, void *data)
pattern = apr_strmatch_precompile(pool, "pattern", 1);
ABTS_PTR_NOTNULL(tc, pattern);
-
+
pattern_nocase = apr_strmatch_precompile(pool, "pattern", 0);
ABTS_PTR_NOTNULL(tc, pattern_nocase);
diff --git a/test/testtable.c b/test/testtable.c
index 0a9960f12..c0eda9c02 100644
--- a/test/testtable.c
+++ b/test/testtable.c
@@ -160,7 +160,7 @@ static void table_overlap(abts_case *tc, void *data)
apr_table_addn(t2, "b", "2.");
apr_table_addn(t2, "f", "6");
apr_table_overlap(t1, t2, APR_OVERLAP_TABLES_SET);
-
+
ABTS_INT_EQUAL(tc, 7, apr_table_elts(t1)->nelts);
val = apr_table_get(t1, "a");
ABTS_STR_EQUAL(tc, "1", val);
@@ -189,11 +189,11 @@ static void table_overlap2(abts_case *tc, void *data)
t2 = apr_table_make(p, 1);
apr_table_addn(t1, "t1", "one");
apr_table_addn(t2, "t2", "two");
-
+
apr_table_overlap(t1, t2, APR_OVERLAP_TABLES_SET);
-
+
ABTS_INT_EQUAL(tc, 2, apr_table_elts(t1)->nelts);
-
+
ABTS_STR_EQUAL(tc, "one", apr_table_get(t1, "t1"));
ABTS_STR_EQUAL(tc, "two", apr_table_get(t1, "t2"));
diff --git a/test/testtemp.c b/test/testtemp.c
index 1f1143ee3..a642292e8 100644
--- a/test/testtemp.c
+++ b/test/testtemp.c
@@ -37,7 +37,7 @@ static void test_mktemp(abts_case *tc, void *data)
rv = apr_temp_dir_get(&tempdir, p);
APR_ASSERT_SUCCESS(tc, "Error finding Temporary Directory", rv);
-
+
filetemplate = apr_pstrcat(p, tempdir, "/tempfileXXXXXX", NULL);
rv = apr_file_mktemp(&f, filetemplate, 0, p);
APR_ASSERT_SUCCESS(tc, "Error opening Temporary file", rv);
diff --git a/test/testthread.c b/test/testthread.c
index e64bdd4b7..6eb8ebc6d 100644
--- a/test/testthread.c
+++ b/test/testthread.c
@@ -56,7 +56,7 @@ static void * APR_THREAD_FUNC thread_func1(apr_thread_t *thd, void *data)
}
apr_thread_exit(thd, exit_ret_val);
return NULL;
-}
+}
static void thread_init(abts_case *tc, void *data)
{
@@ -65,7 +65,7 @@ static void thread_init(abts_case *tc, void *data)
rv = apr_thread_once_init(&control, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- rv = apr_thread_mutex_create(&thread_lock, APR_THREAD_MUTEX_DEFAULT, p);
+ rv = apr_thread_mutex_create(&thread_lock, APR_THREAD_MUTEX_DEFAULT, p);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
}
diff --git a/test/testuri.c b/test/testuri.c
index 4c5405aef..bb77b2818 100644
--- a/test/testuri.c
+++ b/test/testuri.c
@@ -228,7 +228,7 @@ static void show_info(apr_status_t rv, apr_status_t expected, const apr_uri_t *i
fprintf(stderr, " actual rv: %d expected rv: %d\n", rv, expected);
}
else {
- fprintf(stderr,
+ fprintf(stderr,
" scheme: %s\n"
" hostinfo: %s\n"
" user: %s\n"
diff --git a/test/testuser.c b/test/testuser.c
index e75782e90..3ecf25495 100644
--- a/test/testuser.c
+++ b/test/testuser.c
@@ -39,7 +39,7 @@ static void username(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "apr_uid_current failed",
apr_uid_current(&uid, &gid, p));
-
+
APR_ASSERT_SUCCESS(tc, "apr_uid_name_get failed",
apr_uid_name_get(&uname, uid, p));
ABTS_PTR_NOTNULL(tc, uname);
@@ -65,7 +65,7 @@ static void username(abts_case *tc, void *data)
}
else {
ABTS_NOT_IMPL(tc, "Groups from apr_uid_get");
- }
+ }
}
else {
#endif
diff --git a/test/testutil.c b/test/testutil.c
index 3a9e25cb4..db11dacdd 100644
--- a/test/testutil.c
+++ b/test/testutil.c
@@ -26,8 +26,8 @@
apr_pool_t *p;
-void apr_assert_success(abts_case* tc, const char* context, apr_status_t rv,
- int lineno)
+void apr_assert_success(abts_case* tc, const char* context, apr_status_t rv,
+ int lineno)
{
if (rv == APR_ENOTIMPL) {
abts_not_impl(tc, context, lineno);
@@ -54,7 +54,7 @@ void apr_assert_failure(abts_case* tc, const char* context, apr_status_t rv,
void initialize(void) {
apr_initialize();
atexit(apr_terminate);
-
+
apr_pool_create(&p, NULL);
#if _MSC_VER >= 1400
diff --git a/test/testxml.c b/test/testxml.c
index a50c9f196..fd3ba262b 100644
--- a/test/testxml.c
+++ b/test/testxml.c
@@ -155,7 +155,7 @@ static void test_billion_laughs(abts_case *tc, void *data)
apr_xml_doc *doc;
apr_status_t rv;
- rv = apr_file_open(&fd, "data/billion-laughs.xml",
+ rv = apr_file_open(&fd, "data/billion-laughs.xml",
APR_FOPEN_READ, 0, p);
APR_ASSERT_SUCCESS(tc, "open billion-laughs.xml", rv);
diff --git a/test/tryread.c b/test/tryread.c
index 843abe70a..3225750c8 100644
--- a/test/tryread.c
+++ b/test/tryread.c
@@ -35,7 +35,7 @@ int main(int argc, const char * const *argv)
if (apr_file_open(&file, TESTFILE, APR_FOPEN_WRITE, APR_FPROT_OS_DEFAULT, p)
!= APR_SUCCESS) {
-
+
exit(UNEXPECTED_ERROR);
}
status = apr_file_lock(file, APR_FLOCK_EXCLUSIVE | APR_FLOCK_NONBLOCK);
diff --git a/threadproc/beos/apr_proc_stub.c b/threadproc/beos/apr_proc_stub.c
index 011d793e3..482dee986 100644
--- a/threadproc/beos/apr_proc_stub.c
+++ b/threadproc/beos/apr_proc_stub.c
@@ -27,7 +27,7 @@ struct pipefd {
int main(int argc, char *argv[]) {
/* we expect the following...
- *
+ *
* argv[0] = this stub
* argv[1] = directory to run in...
* argv[2] = progname to execute
@@ -40,14 +40,14 @@ int main(int argc, char *argv[]) {
void *buffer;
char ** newargs;
int i = 0;
-
+
newargs = (char**)malloc(sizeof(char*) * (argc - 1));
-
+
buffer = (void*)malloc(sizeof(struct pipefd));
/* this will block until we get the data */
receive_data(&sender, buffer, sizeof(struct pipefd));
pfd = (struct pipefd*)buffer;
-
+
if (pfd->in > STDERR_FILENO) {
if (dup2(pfd->in, STDIN_FILENO) != STDIN_FILENO) return (-1);
close (pfd->in);
@@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
for (i=3;i<=argc;i++){
newargs[i-3] = argv[i];
}
-
+
/* tell the caller we're OK to start */
send_data(sender,1,NULL,0);
diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c
index cb09c9ff9..d35123916 100644
--- a/threadproc/beos/proc.c
+++ b/threadproc/beos/proc.c
@@ -30,7 +30,7 @@ struct send_pipe {
APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *pool)
{
- (*new) = (apr_procattr_t *)apr_palloc(pool,
+ (*new) = (apr_procattr_t *)apr_palloc(pool,
sizeof(apr_procattr_t));
if ((*new) == NULL) {
@@ -43,7 +43,7 @@ APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *
(*new)->child_out = NULL;
(*new)->parent_err = NULL;
(*new)->child_err = NULL;
- (*new)->currdir = NULL;
+ (*new)->currdir = NULL;
(*new)->cmdtype = APR_PROGRAM;
(*new)->detached = 0;
return APR_SUCCESS;
@@ -58,7 +58,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
if ((in != APR_NO_PIPE) && (in != APR_NO_FILE)) {
/* APR_CHILD_BLOCK maps to APR_WRITE_BLOCK, while
- * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
+ * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
* the CHILD/PARENT blocking flags for the stdin pipe.
* stdout/stderr map to the correct mode by default.
*/
@@ -99,8 +99,8 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
- const char *dir)
+APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
+ const char *dir)
{
char * cwd;
if (dir[0] != '/') {
@@ -118,13 +118,13 @@ APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
}
APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,
- apr_cmdtype_e cmd)
+ apr_cmdtype_e cmd)
{
attr->cmdtype = cmd;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
+APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
{
attr->detached = detach;
return APR_SUCCESS;
@@ -133,7 +133,7 @@ APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int3
APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
{
int pid;
-
+
if ((pid = fork()) < 0) {
return errno;
}
@@ -154,7 +154,7 @@ APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
area_info ai;
int32 cookie = 0;
area_id highest = 0;
-
+
while (get_next_area_info(0, &cookie, &ai) == B_OK)
if (ai.area > highest)
highest = ai.area;
@@ -169,20 +169,20 @@ APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
ai.protection, original);
}
}
-
+
#if APR_HAS_THREAD_LOCAL
apr_thread_current_after_fork();
#endif
proc->pid = pid;
- proc->in = NULL;
- proc->out = NULL;
+ proc->in = NULL;
+ proc->out = NULL;
proc->err = NULL;
return APR_INCHILD;
}
proc->pid = pid;
- proc->in = NULL;
- proc->out = NULL;
- proc->err = NULL;
+ proc->in = NULL;
+ proc->out = NULL;
+ proc->err = NULL;
return APR_INPARENT;
}
@@ -207,18 +207,18 @@ APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname,
+APR_DECLARE(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,
+ const char * const *env,
+ apr_procattr_t *attr,
apr_pool_t *pool)
{
int i=0,nargs=0;
char **newargs = NULL;
thread_id newproc, sender;
- struct send_pipe *sp;
+ struct send_pipe *sp;
char * dir = NULL;
-
+
sp = (struct send_pipe *)apr_palloc(pool, sizeof(struct send_pipe));
new->in = attr->parent_in;
@@ -261,7 +261,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname,
while (--nargs >= 0)
free (newargs[nargs]);
free(newargs);
-
+
if (newproc < B_NO_ERROR) {
return errno;
}
@@ -281,26 +281,26 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname,
send_data(newproc, 0, (void*)sp, sizeof(struct send_pipe));
new->pid = newproc;
- /* before we go charging on we need the new process to get to a
+ /* before we go charging on we need the new process to get to a
* certain point. When it gets there it'll let us know and we
* can carry on. */
receive_data(&sender, (void*)NULL,0);
-
+
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_proc_wait_all_procs(apr_proc_t *proc,
int *exitcode,
apr_exit_why_e *exitwhy,
- apr_wait_how_e waithow,
+ apr_wait_how_e waithow,
apr_pool_t *p)
{
proc->pid = -1;
return apr_proc_wait(proc, exitcode, exitwhy, waithow);
-}
+}
APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
- int *exitcode,
+ int *exitcode,
apr_exit_why_e *exitwhy,
apr_wait_how_e waithow)
{
@@ -343,7 +343,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
}
return errno;
-}
+}
APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in,
apr_file_t *parent_in)
@@ -394,7 +394,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_f
rv = apr_file_inherit_set(attr->child_out);
}
}
-
+
if (parent_out != NULL && rv == APR_SUCCESS)
rv = apr_file_dup(&attr->parent_out, parent_out, attr->pool);
@@ -422,20 +422,20 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
rv = apr_file_inherit_set(attr->child_err);
}
}
-
+
if (parent_err != NULL && rv == APR_SUCCESS)
rv = apr_file_dup(&attr->parent_err, parent_err, attr->pool);
return rv;
}
-APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,
+APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,
void *limit)
{
return APR_ENOTIMPL;
}
-APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
const char *username,
const char *password)
{
diff --git a/threadproc/beos/thread.c b/threadproc/beos/thread.c
index 0d59a58f7..4f9d0408e 100644
--- a/threadproc/beos/thread.c
+++ b/threadproc/beos/thread.c
@@ -19,7 +19,7 @@
APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *pool)
{
- (*new) = (apr_threadattr_t *)apr_palloc(pool,
+ (*new) = (apr_threadattr_t *)apr_palloc(pool,
sizeof(apr_threadattr_t));
if ((*new) == NULL) {
@@ -38,7 +38,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr, apr_
attr->detached = 1;
} else {
attr->detached = 0;
- }
+ }
return APR_SUCCESS;
}
@@ -62,7 +62,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr,
return APR_ENOTIMPL;
}
-APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
+APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
apr_size_t size)
{
attr->max_free = size;
@@ -149,7 +149,7 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
temp = B_NORMAL_PRIORITY;
/* First we create the new thread...*/
- (*new)->td = spawn_thread((thread_func)dummy_worker,
+ (*new)->td = spawn_thread((thread_func)dummy_worker,
"apr thread", temp, (*new));
/* Now we try to run it...*/
@@ -290,7 +290,7 @@ APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, apr_thread
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd, apr_os_thread_t *thethd,
+APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd, apr_os_thread_t *thethd,
apr_pool_t *pool)
{
if (pool == NULL) {
@@ -332,7 +332,7 @@ APR_DECLARE(apr_status_t) apr_thread_once_init(apr_thread_once_t **control,
-APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
+APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
void (*func)(void))
{
if (!control->hit) {
diff --git a/threadproc/beos/threadpriv.c b/threadproc/beos/threadpriv.c
index 162e37f6e..a19b1fe4f 100644
--- a/threadproc/beos/threadpriv.c
+++ b/threadproc/beos/threadpriv.c
@@ -81,7 +81,7 @@ APR_DECLARE(apr_status_t) apr_threadkey_private_set(void *priv, apr_threadkey_t
thread_id tid;
int i,index = 0, ret = 0;
- tid = find_thread(NULL);
+ tid = find_thread(NULL);
for (i=0; i < BEOS_MAX_DATAKEYS; i++){
if (beos_data[i]->data){
if (beos_data[i]->td == tid){index = i;}
@@ -165,7 +165,7 @@ APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_t
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_threadkey_put(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 *pool)
{
if (pool == NULL) {
diff --git a/threadproc/beos/threadproc_common.c b/threadproc/beos/threadproc_common.c
index 95e162544..14d40e658 100644
--- a/threadproc/beos/threadproc_common.c
+++ b/threadproc/beos/threadproc_common.c
@@ -18,4 +18,4 @@
code duplication */
#include "../unix/signals.c"
#include "../unix/procsup.c"
-
+
diff --git a/threadproc/netware/proc.c b/threadproc/netware/proc.c
index 06baea3ad..607ac2e48 100644
--- a/threadproc/netware/proc.c
+++ b/threadproc/netware/proc.c
@@ -65,7 +65,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
if ((in != APR_NO_PIPE) && (in != APR_NO_FILE)) {
/* APR_CHILD_BLOCK maps to APR_WRITE_BLOCK, while
- * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
+ * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
* the CHILD/PARENT blocking flags for the stdin pipe.
* stdout/stderr map to the correct mode by default.
*/
@@ -158,7 +158,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_f
rv = apr_file_inherit_set(attr->child_out);
}
}
-
+
if (parent_out != NULL && rv == APR_SUCCESS) {
rv = apr_file_dup(&attr->parent_out, parent_out, attr->pool);
}
@@ -188,7 +188,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
rv = apr_file_inherit_set(attr->child_err);
}
}
-
+
if (parent_err != NULL && rv == APR_SUCCESS) {
rv = apr_file_dup(&attr->parent_err, parent_err, attr->pool);
}
@@ -197,21 +197,21 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
}
-APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
- const char *dir)
+APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
+ const char *dir)
{
- return apr_filepath_merge(&attr->currdir, NULL, dir,
+ return apr_filepath_merge(&attr->currdir, NULL, dir,
APR_FILEPATH_NATIVE, attr->pool);
}
APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,
- apr_cmdtype_e cmd)
+ apr_cmdtype_e cmd)
{
/* won't ever be called on this platform, so don't save the function pointer */
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
+APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
{
attr->detached = detach;
return APR_SUCCESS;
@@ -221,7 +221,7 @@ APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int3
APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
{
int pid;
-
+
if ((pid = fork()) < 0) {
return errno;
}
@@ -230,15 +230,15 @@ APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
apr_thread_current_after_fork();
#endif
proc->pid = pid;
- proc->in = NULL;
- proc->out = NULL;
- proc->err = NULL;
+ proc->in = NULL;
+ proc->out = NULL;
+ proc->err = NULL;
return APR_INCHILD;
}
proc->pid = pid;
- proc->in = NULL;
- proc->out = NULL;
- proc->err = NULL;
+ proc->in = NULL;
+ proc->out = NULL;
+ proc->err = NULL;
return APR_INPARENT;
}
#endif
@@ -310,25 +310,25 @@ APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr,
}
APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *newproc,
- const char *progname,
- const char * const *args,
+ const char *progname,
+ const char * const *args,
const char * const *env,
- apr_procattr_t *attr,
+ apr_procattr_t *attr,
apr_pool_t *pool)
{
wiring_t wire;
int addr_space;
- wire.infd = attr->child_in
- ? (attr->child_in->filedes != -1 ? attr->child_in->filedes
+ wire.infd = attr->child_in
+ ? (attr->child_in->filedes != -1 ? attr->child_in->filedes
: FD_UNUSED)
: fileno(stdin);
wire.outfd = attr->child_out
- ? (attr->child_out->filedes != -1 ? attr->child_out->filedes
+ ? (attr->child_out->filedes != -1 ? attr->child_out->filedes
: FD_UNUSED)
: fileno(stdout);
wire.errfd = attr->child_err
- ? (attr->child_err->filedes != -1 ? attr->child_err->filedes
+ ? (attr->child_err->filedes != -1 ? attr->child_err->filedes
: FD_UNUSED)
: fileno(stderr);
@@ -346,30 +346,30 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *newproc,
char *fullpath = NULL;
apr_status_t rv;
- if ((rv = apr_filepath_merge(&fullpath, attr->currdir, progname,
+ if ((rv = apr_filepath_merge(&fullpath, attr->currdir, progname,
APR_FILEPATH_NATIVE, pool)) != APR_SUCCESS) {
return rv;
}
progname = fullpath;
- }
+ }
- if ((newproc->pid = procve(progname, addr_space, (const char**)env, &wire,
+ if ((newproc->pid = procve(progname, addr_space, (const char**)env, &wire,
NULL, NULL, 0, NULL, (const char **)args)) == -1) {
return errno;
}
if (attr->child_in && (attr->child_in->filedes != -1)) {
- apr_pool_cleanup_kill(apr_file_pool_get(attr->child_in),
+ apr_pool_cleanup_kill(apr_file_pool_get(attr->child_in),
attr->child_in, apr_unix_file_cleanup);
apr_file_close(attr->child_in);
}
if (attr->child_out && (attr->child_out->filedes != -1)) {
- apr_pool_cleanup_kill(apr_file_pool_get(attr->child_out),
+ apr_pool_cleanup_kill(apr_file_pool_get(attr->child_out),
attr->child_out, apr_unix_file_cleanup);
apr_file_close(attr->child_out);
}
if (attr->child_err && (attr->child_err->filedes != -1)) {
- apr_pool_cleanup_kill(apr_file_pool_get(attr->child_err),
+ apr_pool_cleanup_kill(apr_file_pool_get(attr->child_err),
attr->child_err, apr_unix_file_cleanup);
apr_file_close(attr->child_err);
}
@@ -412,13 +412,13 @@ APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
waitpid_options |= WNOHANG;
}
- /* If the pid is 0 then the process was started detached. There
- is no need to wait since there is nothing to wait for on a
+ /* If the pid is 0 then the process was started detached. There
+ is no need to wait since there is nothing to wait for on a
detached process. Starting a process as non-detached and
then calling wait or waitpid could cause the thread to hang.
- The reason for this is because NetWare does not have a way
- to kill or even signal a process to be killed. Starting
- all processes as detached avoids the possibility of a
+ The reason for this is because NetWare does not have a way
+ to kill or even signal a process to be killed. Starting
+ all processes as detached avoids the possibility of a
thread hanging. */
if (proc->pid == 0) {
*exitwhy = APR_PROC_EXIT;
@@ -453,7 +453,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
#if APR_HAVE_STRUCT_RLIMIT
APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
- apr_int32_t what,
+ apr_int32_t what,
struct rlimit *limit)
{
switch(what) {
@@ -491,10 +491,10 @@ APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
}
return APR_SUCCESS;
-}
+}
#endif /* APR_HAVE_STRUCT_RLIMIT */
-APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
const char *username,
const char *password)
{
diff --git a/threadproc/netware/thread.c b/threadproc/netware/thread.c
index f91957b2f..8d3bfd2b0 100644
--- a/threadproc/netware/thread.c
+++ b/threadproc/netware/thread.c
@@ -24,7 +24,7 @@ static int thread_count = 0;
apr_status_t apr_threadattr_create(apr_threadattr_t **new,
apr_pool_t *pool)
{
- (*new) = (apr_threadattr_t *)apr_palloc(pool,
+ (*new) = (apr_threadattr_t *)apr_palloc(pool,
sizeof(apr_threadattr_t));
if ((*new) == NULL) {
@@ -41,7 +41,7 @@ apr_status_t apr_threadattr_create(apr_threadattr_t **new,
apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,apr_int32_t on)
{
attr->detach = on;
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)
@@ -64,7 +64,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr,
return APR_ENOTIMPL;
}
-APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
+APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
apr_size_t size)
{
attr->max_free = size;
@@ -265,7 +265,7 @@ void apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
apr_status_t apr_thread_join(apr_status_t *retval,
apr_thread_t *thd)
{
- apr_status_t stat;
+ apr_status_t stat;
NXThreadId_t dthr;
if (thd->detached) {
diff --git a/threadproc/netware/threadpriv.c b/threadproc/netware/threadpriv.c
index a908f4eb2..3538559ec 100644
--- a/threadproc/netware/threadpriv.c
+++ b/threadproc/netware/threadpriv.c
@@ -17,11 +17,11 @@
#include "apr_portable.h"
#include "apr_arch_threadproc.h"
-apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,
- void (*dest)(void *), apr_pool_t *pool)
+apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,
+ void (*dest)(void *), apr_pool_t *pool)
{
apr_status_t stat;
-
+
(*key) = (apr_threadkey_t *)apr_palloc(pool, sizeof(apr_threadkey_t));
if ((*key) == NULL) {
return APR_ENOMEM;
@@ -38,12 +38,12 @@ apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,
apr_status_t apr_threadkey_private_get(void **new, apr_threadkey_t *key)
{
apr_status_t stat;
-
+
if ((stat = NXKeyGetValue(key->key, new)) == 0) {
return APR_SUCCESS;
}
else {
- return stat;
+ return stat;
}
}
@@ -62,7 +62,7 @@ apr_status_t apr_threadkey_private_delete(apr_threadkey_t *key)
{
apr_status_t stat;
if ((stat = NXKeyDelete(key->key)) == 0) {
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
return stat;
}
@@ -86,7 +86,7 @@ apr_status_t apr_os_threadkey_get(apr_os_threadkey_t *thekey,
return APR_SUCCESS;
}
-apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,
+apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,
apr_os_threadkey_t *thekey, apr_pool_t *pool)
{
if (pool == NULL) {
@@ -98,5 +98,5 @@ apr_status_t apr_os_threadkey_put(apr_threadkey_t **key,
}
(*key)->key = *thekey;
return APR_SUCCESS;
-}
+}
diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c
index 3f024f18d..ebff5dfb9 100644
--- a/threadproc/os2/proc.c
+++ b/threadproc/os2/proc.c
@@ -41,7 +41,7 @@ static apr_file_t no_file = { NULL, -1, };
APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *pool)
{
- (*new) = (apr_procattr_t *)apr_palloc(pool,
+ (*new) = (apr_procattr_t *)apr_palloc(pool,
sizeof(apr_procattr_t));
if ((*new) == NULL) {
@@ -54,7 +54,7 @@ APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new, apr_pool_t *
(*new)->child_out = NULL;
(*new)->parent_err = NULL;
(*new)->child_err = NULL;
- (*new)->currdir = NULL;
+ (*new)->currdir = NULL;
(*new)->cmdtype = APR_PROGRAM;
(*new)->detached = FALSE;
return APR_SUCCESS;
@@ -69,7 +69,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
if ((in != APR_NO_PIPE) && (in != APR_NO_FILE)) {
/* APR_CHILD_BLOCK maps to APR_WRITE_BLOCK, while
- * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
+ * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
* the CHILD/PARENT blocking flags for the stdin pipe.
* stdout/stderr map to the correct mode by default.
*/
@@ -160,7 +160,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_f
rv = apr_file_inherit_set(attr->child_out);
}
}
-
+
if (parent_out != NULL && rv == APR_SUCCESS) {
rv = apr_file_dup(&attr->parent_out, parent_out, attr->pool);
}
@@ -189,7 +189,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
rv = apr_file_inherit_set(attr->child_err);
}
}
-
+
if (parent_err != NULL && rv == APR_SUCCESS) {
rv = apr_file_dup(&attr->parent_err, parent_err, attr->pool);
}
@@ -207,13 +207,13 @@ APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr, const char
}
APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,
- apr_cmdtype_e cmd)
+ apr_cmdtype_e cmd)
{
attr->cmdtype = cmd;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
+APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
{
attr->detached = detach;
return APR_SUCCESS;
@@ -222,7 +222,7 @@ APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int3
APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
{
int pid;
-
+
if ((pid = fork()) < 0) {
return errno;
}
@@ -231,15 +231,15 @@ APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
apr_thread_current_after_fork();
#endif
proc->pid = pid;
- proc->in = NULL;
- proc->out = NULL;
- proc->err = NULL;
+ proc->in = NULL;
+ proc->out = NULL;
+ proc->err = NULL;
return APR_INCHILD;
}
proc->pid = pid;
- proc->in = NULL;
- proc->out = NULL;
- proc->err = NULL;
+ proc->in = NULL;
+ proc->out = NULL;
+ proc->err = NULL;
return APR_INPARENT;
}
@@ -253,20 +253,20 @@ static char *double_quotes(apr_pool_t *pool, const char *str)
int num_quotes = 0;
int len = 0;
char *quote_doubled_str, *dest;
-
+
while (str[len]) {
num_quotes += str[len++] == '\"';
}
-
+
quote_doubled_str = apr_palloc(pool, len + num_quotes + 1);
dest = quote_doubled_str;
-
+
while (*str) {
if (*str == '\"')
*(dest++) = '\"';
*(dest++) = *(str++);
}
-
+
*dest = 0;
return quote_doubled_str;
}
@@ -336,7 +336,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
else
DosDupHandle(attr->child_in->filedes, &dup);
}
-
+
if (attr->child_out) {
save_out = -1;
DosDupHandle(STDOUT_FILENO, &save_out);
@@ -346,7 +346,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
else
DosDupHandle(attr->child_out->filedes, &dup);
}
-
+
if (attr->child_err) {
save_err = -1;
DosDupHandle(STDERR_FILENO, &save_err);
@@ -361,7 +361,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
if (attr->currdir != NULL) {
_getcwd2(savedir, sizeof(savedir));
-
+
if (_chdir2(attr->currdir) < 0) {
if (criticalsection)
DosExitCritSec();
@@ -516,7 +516,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
DosDupHandle(save_in, &dup);
DosClose(save_in);
}
-
+
if (attr->child_out) {
if (attr->child_out->filedes != -1) {
apr_file_close(attr->child_out);
@@ -526,7 +526,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
DosDupHandle(save_out, &dup);
DosClose(save_out);
}
-
+
if (attr->child_err) {
if (attr->child_err->filedes != -1) {
apr_file_close(attr->child_err);
@@ -545,8 +545,8 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname
-static void proces_result_codes(RESULTCODES codes,
- int *exitcode,
+static void proces_result_codes(RESULTCODES codes,
+ int *exitcode,
apr_exit_why_e *exitwhy)
{
int result = 0;
@@ -624,7 +624,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait_all_procs(apr_proc_t *proc,
}
return APR_FROM_OS_ERROR(rc);
-}
+}
@@ -645,7 +645,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
}
return APR_FROM_OS_ERROR(rc);
-}
+}
@@ -654,7 +654,7 @@ APR_DECLARE(apr_status_t) apr_proc_detach(int daemonize)
return APR_ENOTIMPL;
}
-APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
const char *username,
const char *password)
{
diff --git a/threadproc/os2/thread.c b/threadproc/os2/thread.c
index 2756baf28..32acb3704 100644
--- a/threadproc/os2/thread.c
+++ b/threadproc/os2/thread.c
@@ -68,7 +68,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr,
return APR_ENOTIMPL;
}
-APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
+APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
apr_size_t size)
{
attr->max_free = size;
@@ -278,7 +278,7 @@ APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, apr_thread
-APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd, apr_os_thread_t *thethd,
+APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd, apr_os_thread_t *thethd,
apr_pool_t *pool)
{
if ((*thd) == NULL) {
@@ -348,7 +348,7 @@ APR_DECLARE(apr_status_t) apr_thread_once_init(apr_thread_once_t **control,
-APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
+APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
void (*func)(void))
{
if (!control->hit) {
diff --git a/threadproc/os2/threadpriv.c b/threadproc/os2/threadpriv.c
index c0f709c31..36a05bc6a 100644
--- a/threadproc/os2/threadpriv.c
+++ b/threadproc/os2/threadpriv.c
@@ -23,7 +23,7 @@
#include "apr_arch_file_io.h"
APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key,
- void (*dest)(void *),
+ void (*dest)(void *),
apr_pool_t *pool)
{
(*key) = (apr_threadkey_t *)apr_palloc(pool, sizeof(apr_threadkey_t));
@@ -72,8 +72,8 @@ APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey, apr_t
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
- apr_os_threadkey_t *thekey,
+APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
+ apr_os_threadkey_t *thekey,
apr_pool_t *pool)
{
if (pool == NULL) {
@@ -85,4 +85,4 @@ APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
}
(*key)->key = *thekey;
return APR_SUCCESS;
-}
+}
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c
index ee05e147d..695c621ec 100644
--- a/threadproc/unix/proc.c
+++ b/threadproc/unix/proc.c
@@ -49,7 +49,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
if ((in != APR_NO_PIPE) && (in != APR_NO_FILE)) {
/* APR_CHILD_BLOCK maps to APR_WRITE_BLOCK, while
- * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
+ * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
* the CHILD/PARENT blocking flags for the stdin pipe.
* stdout/stderr map to the correct mode by default.
*/
@@ -220,7 +220,7 @@ APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr,
APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
{
int pid;
-
+
memset(proc, 0, sizeof(apr_proc_t));
/* Rekey PRNG(s) to clear buffer(s) and make sure that the
@@ -343,7 +343,7 @@ APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
attr->uid = -1;
return rv;
}
-
+
/* Use default user group if not already set */
if (attr->gid == -1) {
attr->gid = gid;
@@ -548,7 +548,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
default:
{
char *ch, *onearg;
-
+
ch = onearg = apr_palloc(pool, onearg_len);
i = 0;
while (args[i]) {
diff --git a/threadproc/unix/signals.c b/threadproc/unix/signals.c
index 9a83c124c..061d3dc6f 100644
--- a/threadproc/unix/signals.c
+++ b/threadproc/unix/signals.c
@@ -85,7 +85,7 @@ APR_DECLARE(apr_sigfunc_t *) apr_signal(int signo, apr_sigfunc_t * func)
/* XXX jeff thinks this should be enabled whenever SA_NOCLDWAIT is defined */
/* this is required on Tru64 to cause child processes to
- * disappear gracefully - XPG4 compatible
+ * disappear gracefully - XPG4 compatible
*/
if ((signo == SIGCHLD) && (func == SIG_IGN)) {
act.sa_flags |= SA_NOCLDWAIT;
@@ -93,7 +93,7 @@ APR_DECLARE(apr_sigfunc_t *) apr_signal(int signo, apr_sigfunc_t * func)
#endif
#if defined(__NetBSD__) || defined(DARWIN)
/* ignoring SIGCHLD or leaving the default disposition doesn't avoid zombies,
- * and there is no SA_NOCLDWAIT flag, so catch the signal and reap status in
+ * and there is no SA_NOCLDWAIT flag, so catch the signal and reap status in
* the handler to avoid zombies
*/
if ((signo == SIGCHLD) && (func == SIG_IGN)) {
@@ -321,7 +321,7 @@ APR_DECLARE(apr_status_t) apr_signal_thread(int(*signal_handler)(int signum))
sigfillset(&sig_mask);
/* On certain platforms, sigwait() returns EINVAL if any of various
- * unblockable signals are included in the mask. This was first
+ * unblockable signals are included in the mask. This was first
* observed on AIX and Tru64.
*/
#ifdef SIGKILL
@@ -378,7 +378,7 @@ APR_DECLARE(apr_status_t) apr_signal_thread(int(*signal_handler)(int signum))
{
/* handle sigwait() error here */
}
-
+
if (sig_func(signal_received) == 1) {
return APR_SUCCESS;
}
@@ -401,7 +401,7 @@ APR_DECLARE(apr_status_t) apr_setup_signal_thread(void)
* No thread should ever block synchronous signals.
* See the Solaris man page for pthread_sigmask() for
* some information. Solaris chooses to knock out such
- * processes when a blocked synchronous signal is
+ * processes when a blocked synchronous signal is
* delivered, skipping any registered signal handler.
* AIX doesn't call a signal handler either. At least
* one level of linux+glibc does call the handler even
diff --git a/threadproc/unix/thread.c b/threadproc/unix/thread.c
index 68b14db3c..d90d05f46 100644
--- a/threadproc/unix/thread.c
+++ b/threadproc/unix/thread.c
@@ -73,7 +73,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr,
if ((stat = pthread_attr_setdetachstate(&attr->attr, &arg)) == 0) {
#else
- if ((stat = pthread_attr_setdetachstate(&attr->attr,
+ if ((stat = pthread_attr_setdetachstate(&attr->attr,
DETACH_ARG(on))) == 0) {
#endif
return APR_SUCCESS;
@@ -136,7 +136,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr,
#endif
}
-APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
+APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
apr_size_t size)
{
attr->max_free = size;
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index a1d201ce8..38e09ad6f 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -45,7 +45,7 @@ static apr_file_t no_file = { NULL, INVALID_HANDLE_VALUE, };
#define LOGON32_LOGON_NETWORK 3
#endif
-/*
+/*
* some of the ideas expressed herein are based off of Microsoft
* Knowledge Base article: Q190351
*
@@ -60,7 +60,7 @@ APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new,
}
APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
- apr_int32_t in,
+ apr_int32_t in,
apr_int32_t out,
apr_int32_t err)
{
@@ -68,7 +68,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
if (in) {
/* APR_CHILD_BLOCK maps to APR_WRITE_BLOCK, while
- * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
+ * APR_PARENT_BLOCK maps to APR_READ_BLOCK, so transpose
* the CHILD/PARENT blocking flags for the stdin pipe.
* stdout/stderr map to the correct mode by default.
*/
@@ -79,7 +79,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
if (in == APR_NO_FILE)
attr->child_in = &no_file;
- else {
+ else {
stat = apr_file_pipe_create_ex(&attr->child_in, &attr->parent_in,
in, attr->pool);
}
@@ -89,7 +89,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
if (out && stat == APR_SUCCESS) {
if (out == APR_NO_FILE)
attr->child_out = &no_file;
- else {
+ else {
stat = apr_file_pipe_create_ex(&attr->parent_out, &attr->child_out,
out, attr->pool);
}
@@ -99,7 +99,7 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
if (err && stat == APR_SUCCESS) {
if (err == APR_NO_FILE)
attr->child_err = &no_file;
- else {
+ else {
stat = apr_file_pipe_create_ex(&attr->parent_err, &attr->child_err,
err, attr->pool);
}
@@ -109,8 +109,8 @@ APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
return stat;
}
-APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr,
- apr_file_t *child_in,
+APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr,
+ apr_file_t *child_in,
apr_file_t *parent_in)
{
apr_status_t rv = APR_SUCCESS;
@@ -188,24 +188,24 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr,
}
APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
- const char *dir)
+ const char *dir)
{
/* curr dir must be in native format, there are all sorts of bugs in
* the NT library loading code that flunk the '/' parsing test.
*/
- return apr_filepath_merge(&attr->currdir, NULL, dir,
+ return apr_filepath_merge(&attr->currdir, NULL, dir,
APR_FILEPATH_NATIVE, attr->pool);
}
APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,
- apr_cmdtype_e cmd)
+ apr_cmdtype_e cmd)
{
attr->cmdtype = cmd;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr,
- apr_int32_t det)
+ apr_int32_t det)
{
attr->detached = det;
return APR_SUCCESS;
@@ -213,14 +213,14 @@ APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr,
static apr_status_t attr_cleanup(void *theattr)
{
- apr_procattr_t *attr = (apr_procattr_t *)theattr;
+ apr_procattr_t *attr = (apr_procattr_t *)theattr;
if (attr->user_token)
CloseHandle(attr->user_token);
attr->user_token = NULL;
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
+APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
const char *username,
const char *password)
{
@@ -230,14 +230,14 @@ APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
apr_status_t rv;
apr_size_t len, wlen;
- if (apr_os_level >= APR_WIN_NT_4)
+ if (apr_os_level >= APR_WIN_NT_4)
{
if (attr->user_token) {
/* Cannot set that twice */
if (attr->errfn) {
- attr->errfn(attr->pool, 0,
- apr_pstrcat(attr->pool,
- "function called twice"
+ attr->errfn(attr->pool, 0,
+ apr_pstrcat(attr->pool,
+ "function called twice"
" on username: ", username, NULL));
}
return APR_EINVAL;
@@ -248,8 +248,8 @@ APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
if ((rv = apr_conv_utf8_to_utf16(username, &len, wusername, &wlen))
!= APR_SUCCESS) {
if (attr->errfn) {
- attr->errfn(attr->pool, rv,
- apr_pstrcat(attr->pool, "utf8 to utf16 conversion failed"
+ attr->errfn(attr->pool, rv,
+ apr_pstrcat(attr->pool, "utf8 to utf16 conversion failed"
" on username: ", username, NULL));
}
return rv;
@@ -261,26 +261,26 @@ APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
if ((rv = apr_conv_utf8_to_utf16(password, &len, wpassword, &wlen))
!= APR_SUCCESS) {
if (attr->errfn) {
- attr->errfn(attr->pool, rv, "utf8 to utf16 conversion"
+ attr->errfn(attr->pool, rv, "utf8 to utf16 conversion"
" failed on password: <redacted>");
}
return rv;
}
}
- if (!LogonUserW(wusername,
- NULL,
+ if (!LogonUserW(wusername,
+ NULL,
wpassword ? wpassword : L"",
LOGON32_LOGON_NETWORK,
LOGON32_PROVIDER_DEFAULT,
&user)) {
- /* Logon Failed */
+ /* Logon Failed */
return apr_get_os_error();
}
if (wpassword)
memset(wpassword, 0, wlen * sizeof(apr_wchar_t));
/* Get the primary token for user */
- if (!DuplicateTokenEx(user,
- TOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_ASSIGN_PRIMARY,
+ if (!DuplicateTokenEx(user,
+ TOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_ASSIGN_PRIMARY,
NULL,
SecurityImpersonation,
TokenPrimary,
@@ -424,7 +424,7 @@ static char *apr_caret_escape_args(apr_pool_t *p, const char *str)
s = (const unsigned char *)str;
for (; *s; ++s) {
- /*
+ /*
* Newlines to Win32/OS2 CreateProcess() are ill advised.
* Convert them to spaces since they are effectively white
* space to most applications
@@ -519,14 +519,14 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
* not manage the stdio handles properly when running old 16
* bit executables if the detached attribute is set.
*/
- /*
- * XXX DETACHED_PROCESS won't on Win9x at all; on NT/W2K
+ /*
+ * XXX DETACHED_PROCESS won't on Win9x at all; on NT/W2K
* 16 bit executables fail (MS KB: Q150956)
*/
dwCreationFlags |= DETACHED_PROCESS;
}
- /* progname must be unquoted, in native format, as there are all sorts
+ /* progname must be unquoted, in native format, as there are all sorts
* of bugs in the NT library loader code that fault when parsing '/'.
* XXX progname must be NULL if this is a 16 bit app running in WOW
*/
@@ -536,18 +536,18 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
if (attr->cmdtype == APR_PROGRAM || attr->cmdtype == APR_PROGRAM_ENV) {
char *fullpath = NULL;
- if ((rv = apr_filepath_merge(&fullpath, attr->currdir, progname,
+ if ((rv = apr_filepath_merge(&fullpath, attr->currdir, progname,
APR_FILEPATH_NATIVE, pool)) != APR_SUCCESS) {
if (attr->errfn) {
- attr->errfn(pool, rv,
- apr_pstrcat(pool, "filepath_merge failed.",
- " currdir: ", attr->currdir,
+ attr->errfn(pool, rv,
+ apr_pstrcat(pool, "filepath_merge failed.",
+ " currdir: ", attr->currdir,
" progname: ", progname, NULL));
}
return rv;
}
progname = fullpath;
- }
+ }
else {
/* Do not fail if the path isn't parseable for APR_PROGRAM_PATH
* or APR_SHELLCMD. We only invoke apr_filepath_merge (with no
@@ -557,10 +557,10 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
* built-in shell command.)
*/
char *fullpath = NULL;
- if ((rv = apr_filepath_merge(&fullpath, "", progname,
+ if ((rv = apr_filepath_merge(&fullpath, "", progname,
APR_FILEPATH_NATIVE, pool)) == APR_SUCCESS) {
progname = fullpath;
- }
+ }
}
if (has_space(progname)) {
@@ -600,8 +600,8 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
}
cmdline = apr_pstrcat(pool, shellcmd, " /C \"", argv0, cmdline, "\"", NULL);
- }
- else
+ }
+ else
{
/* Win32 is _different_ than unix. While unix will find the given
* program since it's already chdir'ed, Win32 cannot since the parent
@@ -645,7 +645,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
* is not a shellcmd, and the source of argv[] is untrusted.
* Notice we escape ALL the cmdline args, including the quotes
* around the individual args themselves. No sense in allowing
- * the shift-state to be toggled, and the application will
+ * the shift-state to be toggled, and the application will
* not see the caret escapes.
*/
cmdline = apr_caret_escape_args(pool, cmdline);
@@ -690,14 +690,14 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
* Win32's CreateProcess call requires that the environment
* be passed in an environment block, a null terminated block of
* null terminated strings.
- */
+ */
i = 0;
iEnvBlockLen = 1;
while (env[i]) {
iEnvBlockLen += strlen(env[i]) + 1;
i++;
}
- if (!i)
+ if (!i)
++iEnvBlockLen;
{
@@ -709,12 +709,12 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
pNext = (apr_wchar_t*)pEnvBlock;
while (env[i]) {
apr_size_t in = strlen(env[i]) + 1;
- if ((rv = apr_conv_utf8_to_utf16(env[i], &in,
- pNext, &iEnvBlockLen))
+ if ((rv = apr_conv_utf8_to_utf16(env[i], &in,
+ pNext, &iEnvBlockLen))
!= APR_SUCCESS) {
if (attr->errfn) {
- attr->errfn(pool, rv,
- apr_pstrcat(pool, "utf8 to utf16 conversion failed"
+ attr->errfn(pool, rv,
+ apr_pstrcat(pool, "utf8 to utf16 conversion failed"
" on this string: ", env[i], NULL));
}
return rv;
@@ -726,7 +726,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
*(pNext++) = L'\0';
*pNext = L'\0';
}
- }
+ }
new->invoked = cmdline;
@@ -746,8 +746,8 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
if ((rv = apr_conv_utf8_to_utf16(progname, &nprg, wprg, &nwprg))
!= APR_SUCCESS) {
if (attr->errfn) {
- attr->errfn(pool, rv,
- apr_pstrcat(pool, "utf8 to utf16 conversion failed"
+ attr->errfn(pool, rv,
+ apr_pstrcat(pool, "utf8 to utf16 conversion failed"
" on progname: ", progname, NULL));
}
return rv;
@@ -761,8 +761,8 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
if ((rv = apr_conv_utf8_to_utf16(cmdline, &ncmd, wcmd, &nwcmd))
!= APR_SUCCESS) {
if (attr->errfn) {
- attr->errfn(pool, rv,
- apr_pstrcat(pool, "utf8 to utf16 conversion failed"
+ attr->errfn(pool, rv,
+ apr_pstrcat(pool, "utf8 to utf16 conversion failed"
" on cmdline: ", cmdline, NULL));
}
return rv;
@@ -774,12 +774,12 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
apr_size_t ncwd = strlen(attr->currdir) + 1;
apr_size_t nwcwd = ncwd;
wcwd = apr_palloc(pool, ncwd * sizeof(wcwd[0]));
- if ((rv = apr_conv_utf8_to_utf16(attr->currdir, &ncwd,
+ if ((rv = apr_conv_utf8_to_utf16(attr->currdir, &ncwd,
wcwd, &nwcwd))
!= APR_SUCCESS) {
if (attr->errfn) {
- attr->errfn(pool, rv,
- apr_pstrcat(pool, "utf8 to utf16 conversion failed"
+ attr->errfn(pool, rv,
+ apr_pstrcat(pool, "utf8 to utf16 conversion failed"
" on currdir: ", attr->currdir, NULL));
}
return rv;
@@ -794,7 +794,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
si.wShowWindow = SW_HIDE;
}
- /* LOCK CRITICAL SECTION
+ /* LOCK CRITICAL SECTION
* before we begin to manipulate the inherited handles
*/
EnterCriticalSection(&proc_lock);
@@ -814,12 +814,12 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
SetHandleInformation(si.hStdInput,
HANDLE_FLAG_INHERIT, 0);
- if ( (si.hStdInput = attr->child_in->filehand)
+ if ( (si.hStdInput = attr->child_in->filehand)
!= INVALID_HANDLE_VALUE )
SetHandleInformation(si.hStdInput, HANDLE_FLAG_INHERIT,
HANDLE_FLAG_INHERIT);
}
-
+
si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
if (attr->child_out && attr->child_out->filehand)
{
@@ -829,7 +829,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
SetHandleInformation(si.hStdOutput,
HANDLE_FLAG_INHERIT, 0);
- if ( (si.hStdOutput = attr->child_out->filehand)
+ if ( (si.hStdOutput = attr->child_out->filehand)
!= INVALID_HANDLE_VALUE )
SetHandleInformation(si.hStdOutput, HANDLE_FLAG_INHERIT,
HANDLE_FLAG_INHERIT);
@@ -844,7 +844,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
SetHandleInformation(si.hStdError,
HANDLE_FLAG_INHERIT, 0);
- if ( (si.hStdError = attr->child_err->filehand)
+ if ( (si.hStdError = attr->child_err->filehand)
!= INVALID_HANDLE_VALUE )
SetHandleInformation(si.hStdError, HANDLE_FLAG_INHERIT,
HANDLE_FLAG_INHERIT);
@@ -852,7 +852,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
}
if (attr->user_token) {
/* XXX: for terminal services, handles can't be cannot be
- * inherited across sessions. This process must be created
+ * inherited across sessions. This process must be created
* in our existing session. lpDesktop assignment appears
* to be wrong according to these rules.
*/
@@ -903,14 +903,14 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
SetHandleInformation(GetStdHandle(STD_ERROR_HANDLE),
stderr_reset, stderr_reset);
}
- /* RELEASE CRITICAL SECTION
+ /* RELEASE CRITICAL SECTION
* The state of the inherited handles has been restored.
*/
LeaveCriticalSection(&proc_lock);
}
- /* Check CreateProcess result
+ /* Check CreateProcess result
*/
if (!rv)
return apr_get_os_error();
@@ -938,7 +938,7 @@ static apr_exit_why_e why_from_exit_code(DWORD exit) {
/* See WinNT.h STATUS_ACCESS_VIOLATION and family for how
* this class of failures was determined
*/
- if (((exit & 0xC0000000) == 0xC0000000)
+ if (((exit & 0xC0000000) == 0xC0000000)
&& !(exit & 0x3FFF0000))
return APR_PROC_SIGNAL;
else
@@ -993,7 +993,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait_all_procs(apr_proc_t *proc,
else
CloseHandle(hProcess);
}
- else {
+ else {
/* Process has exited.
* No need to wait for its termination.
*/
diff --git a/threadproc/win32/signals.c b/threadproc/win32/signals.c
index 48676d856..15733622a 100644
--- a/threadproc/win32/signals.c
+++ b/threadproc/win32/signals.c
@@ -28,9 +28,9 @@
#include <sys/wait.h>
#endif
-/* Windows only really support killing process, but that will do for now.
+/* Windows only really support killing process, but that will do for now.
*
- * ### Actually, closing the input handle to the proc should also do fine
+ * ### Actually, closing the input handle to the proc should also do fine
* for most console apps. This definitely needs improvement...
*/
APR_DECLARE(apr_status_t) apr_proc_kill(apr_proc_t *proc, int signal)
@@ -39,7 +39,7 @@ APR_DECLARE(apr_status_t) apr_proc_kill(apr_proc_t *proc, int signal)
if (TerminateProcess(proc->hproc, signal) == 0) {
return apr_get_os_error();
}
- /* On unix, SIGKILL leaves a apr_proc_wait()able pid lying around,
+ /* On unix, SIGKILL leaves a apr_proc_wait()able pid lying around,
* so we will leave hproc alone until the app calls apr_proc_wait().
*/
return APR_SUCCESS;
diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c
index 7ae7ca062..9d1a0f5d3 100644
--- a/threadproc/win32/thread.c
+++ b/threadproc/win32/thread.c
@@ -23,7 +23,7 @@
#ifdef HAVE_PROCESS_H
#include <process.h>
#endif
-#include "apr_arch_misc.h"
+#include "apr_arch_misc.h"
/* Chosen for us by apr_initialize */
DWORD tls_apr_thread = 0;
@@ -31,7 +31,7 @@ DWORD tls_apr_thread = 0;
APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new,
apr_pool_t *pool)
{
- (*new) = (apr_threadattr_t *)apr_palloc(pool,
+ (*new) = (apr_threadattr_t *)apr_palloc(pool,
sizeof(apr_threadattr_t));
if ((*new) == NULL) {
@@ -72,7 +72,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr,
return APR_ENOTIMPL;
}
-APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
+APR_DECLARE(apr_status_t) apr_threadattr_max_free_set(apr_threadattr_t *attr,
apr_size_t size)
{
attr->max_free = size;
@@ -238,7 +238,7 @@ APR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval,
{
apr_status_t rv = APR_SUCCESS;
DWORD ret;
-
+
if (!thd->td) {
/* Can not join on detached threads */
return APR_DETACH;
@@ -312,11 +312,11 @@ APR_DECLARE(apr_os_thread_t) apr_os_thread_current(void)
if (hthread) {
return hthread;
}
-
+
hproc = GetCurrentProcess();
hthread = GetCurrentThread();
- if (!DuplicateHandle(hproc, hthread,
- hproc, &hthread, 0, FALSE,
+ if (!DuplicateHandle(hproc, hthread,
+ hproc, &hthread, 0, FALSE,
DUPLICATE_SAME_ACCESS)) {
return NULL;
}
diff --git a/threadproc/win32/threadpriv.c b/threadproc/win32/threadpriv.c
index 1cce0c667..f6d0dc2b3 100644
--- a/threadproc/win32/threadpriv.c
+++ b/threadproc/win32/threadpriv.c
@@ -59,7 +59,7 @@ APR_DECLARE(apr_status_t) apr_threadkey_private_set(void *priv,
APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key)
{
if (TlsFree(key->key)) {
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
return apr_get_os_error();
}
@@ -97,5 +97,5 @@ APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
}
(*key)->key = *thekey;
return APR_SUCCESS;
-}
+}
diff --git a/time/unix/time.c b/time/unix/time.c
index 0a9377f55..0c0401b1d 100644
--- a/time/unix/time.c
+++ b/time/unix/time.c
@@ -38,7 +38,7 @@
#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && !defined(HAVE_STRUCT_TM___TM_GMTOFF)
static apr_int32_t server_gmt_offset;
#define NO_GMTOFF_IN_STRUCT_TM
-#endif
+#endif
static apr_int32_t get_offset(struct tm *tm)
{
@@ -164,7 +164,7 @@ APR_DECLARE(apr_status_t) apr_time_exp_get(apr_time_t *t, apr_time_exp_t *xt)
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_time_exp_gmt_get(apr_time_t *t,
+APR_DECLARE(apr_status_t) apr_time_exp_gmt_get(apr_time_t *t,
apr_time_exp_t *xt)
{
apr_status_t status = apr_time_exp_get(t, xt);
@@ -244,7 +244,7 @@ APR_DECLARE(void) apr_sleep(apr_interval_time_t t)
delay((t + 999) / 1000);
#elif defined(HAVE_NANOSLEEP)
struct timespec ts;
- ts.tv_sec = t / APR_USEC_PER_SEC;
+ ts.tv_sec = t / APR_USEC_PER_SEC;
ts.tv_nsec = (t % APR_USEC_PER_SEC) * 1000;
nanosleep(&ts, NULL);
#else
diff --git a/time/unix/timestr.c b/time/unix/timestr.c
index f74febac1..9817ecc44 100644
--- a/time/unix/timestr.c
+++ b/time/unix/timestr.c
@@ -129,7 +129,7 @@ apr_status_t apr_ctime(char *date_str, apr_time_t t)
return APR_SUCCESS;
}
-apr_status_t apr_strftime(char *s, apr_size_t *retsize, apr_size_t max,
+apr_status_t apr_strftime(char *s, apr_size_t *retsize, apr_size_t max,
const char *format, apr_time_exp_t *xt)
{
struct tm tm;
diff --git a/time/win32/time.c b/time/win32/time.c
index e0ac4738b..4000a3ef3 100644
--- a/time/win32/time.c
+++ b/time/win32/time.c
@@ -79,7 +79,7 @@ static void SystemTimeToAprExpTime(apr_time_exp_t *xt, SYSTEMTIME *tm)
xt->tm_yday++;
}
-APR_DECLARE(apr_status_t) apr_time_ansi_put(apr_time_t *result,
+APR_DECLARE(apr_status_t) apr_time_ansi_put(apr_time_t *result,
time_t input)
{
*result = (apr_time_t) input * APR_USEC_PER_SEC;
@@ -94,7 +94,7 @@ APR_DECLARE(apr_time_t) apr_time_now(void)
GetSystemTimeAsFileTime(&time);
FileTimeToAprTime(&aprtime, &time);
- return aprtime;
+ return aprtime;
}
APR_DECLARE(apr_status_t) apr_time_exp_gmt(apr_time_exp_t *result,
@@ -113,8 +113,8 @@ APR_DECLARE(apr_status_t) apr_time_exp_gmt(apr_time_exp_t *result,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_time_exp_tz(apr_time_exp_t *result,
- apr_time_t input,
+APR_DECLARE(apr_status_t) apr_time_exp_tz(apr_time_exp_t *result,
+ apr_time_t input,
apr_int32_t offs)
{
FILETIME ft;
@@ -159,14 +159,14 @@ APR_DECLARE(apr_status_t) apr_time_exp_lt(apr_time_exp_t *result,
/* Recover the resulting time as an apr time and use the
- * delta for gmtoff in seconds (and ignore msec rounding)
+ * delta for gmtoff in seconds (and ignore msec rounding)
*/
SystemTimeToFileTime(&localst, &localft);
FileTimeToAprTime(&localtime, &localft);
- result->tm_gmtoff = (int)apr_time_sec(localtime)
+ result->tm_gmtoff = (int)apr_time_sec(localtime)
- (int)apr_time_sec(input);
- /* To compute the dst flag, we compare the expected
+ /* To compute the dst flag, we compare the expected
* local (standard) timezone bias to the delta.
* [Note, in war time or double daylight time the
* resulting tm_isdst is, desireably, 2 hours]
@@ -225,7 +225,7 @@ APR_DECLARE(apr_status_t) apr_os_imp_time_get(apr_os_imp_time_t **ostime,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime,
+APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime,
apr_time_exp_t *aprexptime)
{
(*ostime)->wYear = aprexptime->tm_year + 1900;
diff --git a/time/win32/timestr.c b/time/win32/timestr.c
index 4fbdf825f..4b5978c5d 100644
--- a/time/win32/timestr.c
+++ b/time/win32/timestr.c
@@ -123,7 +123,7 @@ APR_DECLARE(apr_status_t) apr_ctime(char *date_str, apr_time_t t)
static apr_size_t win32_strftime_extra(char *s, size_t max, const char *format,
- const struct tm *tm)
+ const struct tm *tm)
{
/* If the new format string is bigger than max, the result string won't fit
* anyway. If format strings are added, made sure the padding below is
diff --git a/uri/apr_uri.c b/uri/apr_uri.c
index 8b22d462f..21fb38d8d 100644
--- a/uri/apr_uri.c
+++ b/uri/apr_uri.c
@@ -16,7 +16,7 @@
/*
* apr_uri.c: URI related utility things
- *
+ *
*/
#include <stdlib.h>
@@ -87,8 +87,8 @@ APR_DECLARE(apr_port_t) apr_uri_port_of_scheme(const char *scheme_str)
/* Unparse a apr_uri_t structure to an URI string.
* Optionally suppress the password for security reasons.
*/
-APR_DECLARE(char *) apr_uri_unparse(apr_pool_t *p,
- const apr_uri_t *uptr,
+APR_DECLARE(char *) apr_uri_unparse(apr_pool_t *p,
+ const apr_uri_t *uptr,
unsigned flags)
{
char *ret = "";
@@ -110,7 +110,7 @@ APR_DECLARE(char *) apr_uri_unparse(apr_pool_t *p,
: "",
((uptr->user && !(flags & APR_URI_UNP_OMITUSER)) ||
(uptr->password && !(flags & APR_URI_UNP_OMITPASSWORD)))
- ? "@" : "",
+ ? "@" : "",
NULL);
}
@@ -138,7 +138,7 @@ APR_DECLARE(char *) apr_uri_unparse(apr_pool_t *p,
ret = apr_pstrcat(p, uptr->scheme, ":", ret, NULL);
}
}
-
+
/* Should we suppress all path info? */
if (!(flags & APR_URI_UNP_OMITPATHINFO)) {
/* Append path, query and fragment strings: */
@@ -719,7 +719,7 @@ static const unsigned char uri_delims[256] = {
* - fills in fields of uri_components *uptr
* - none on any of the r->* fields
*/
-APR_DECLARE(apr_status_t) apr_uri_parse(apr_pool_t *p, const char *uri,
+APR_DECLARE(apr_status_t) apr_uri_parse(apr_pool_t *p, const char *uri,
apr_uri_t *uptr)
{
const char *s;
@@ -913,8 +913,8 @@ deal_with_host:
* currently at http://www.mcom.com/newsref/std/tunneling_ssl.html
* for the format of the "CONNECT host:port HTTP/1.0" request
*/
-APR_DECLARE(apr_status_t) apr_uri_parse_hostinfo(apr_pool_t *p,
- const char *hostinfo,
+APR_DECLARE(apr_status_t) apr_uri_parse_hostinfo(apr_pool_t *p,
+ const char *hostinfo,
apr_uri_t *uptr)
{
const char *s;
diff --git a/user/netware/groupinfo.c b/user/netware/groupinfo.c
index e7cfd9b26..deb330c3b 100644
--- a/user/netware/groupinfo.c
+++ b/user/netware/groupinfo.c
@@ -33,8 +33,8 @@ APR_DECLARE(apr_status_t) apr_gid_name_get(char **groupname, apr_gid_t groupid,
{
return APR_ENOTIMPL;
}
-
-APR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *groupid,
+
+APR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *groupid,
const char *groupname, apr_pool_t *p)
{
return APR_ENOTIMPL;
diff --git a/user/unix/groupinfo.c b/user/unix/groupinfo.c
index 7967219f8..78b686aa9 100644
--- a/user/unix/groupinfo.c
+++ b/user/unix/groupinfo.c
@@ -57,8 +57,8 @@ APR_DECLARE(apr_status_t) apr_gid_name_get(char **groupname, apr_gid_t groupid,
*groupname = apr_pstrdup(p, gr->gr_name);
return APR_SUCCESS;
}
-
-APR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *groupid,
+
+APR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *groupid,
const char *groupname, apr_pool_t *p)
{
struct group *gr;
diff --git a/user/unix/userinfo.c b/user/unix/userinfo.c
index 516445b56..6469a9553 100644
--- a/user/unix/userinfo.c
+++ b/user/unix/userinfo.c
@@ -94,7 +94,7 @@ APR_DECLARE(apr_status_t) apr_uid_current(apr_uid_t *uid,
{
*uid = getuid();
*gid = getgid();
-
+
return APR_SUCCESS;
}
@@ -107,7 +107,7 @@ APR_DECLARE(apr_status_t) apr_uid_get(apr_uid_t *uid, apr_gid_t *gid,
struct passwd pw;
char pwbuf[PWBUF_SIZE];
apr_status_t rv;
-
+
if ((rv = getpwnam_safe(username, &pw, pwbuf)) != APR_SUCCESS)
return rv;
diff --git a/user/win32/groupinfo.c b/user/win32/groupinfo.c
index 115e8e956..20061b48e 100644
--- a/user/win32/groupinfo.c
+++ b/user/win32/groupinfo.c
@@ -22,7 +22,7 @@
#include <sys/types.h>
#endif
-APR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *gid,
+APR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *gid,
const char *groupname, apr_pool_t *p)
{
SID_NAME_USE sidtype;
@@ -44,16 +44,16 @@ APR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *gid,
else {
domain = NULL;
}
- /* Get nothing on the first pass ... need to size the sid buffer
+ /* Get nothing on the first pass ... need to size the sid buffer
*/
- rv = LookupAccountName(domain, groupname, domain, &sidlen,
+ rv = LookupAccountName(domain, groupname, domain, &sidlen,
anydomain, &domlen, &sidtype);
if (sidlen) {
/* Give it back on the second pass
*/
*gid = apr_palloc(p, sidlen);
domlen = sizeof(anydomain);
- rv = LookupAccountName(domain, groupname, *gid, &sidlen,
+ rv = LookupAccountName(domain, groupname, *gid, &sidlen,
anydomain, &domlen, &sidtype);
}
if (!sidlen || !rv) {
@@ -71,13 +71,13 @@ APR_DECLARE(apr_status_t) apr_gid_name_get(char **groupname, apr_gid_t groupid,
return APR_EINVAL;
if (!LookupAccountSid(NULL, groupid, name, &cbname, domain, &cbdomain, &type))
return apr_get_os_error();
- if (type != SidTypeGroup && type != SidTypeWellKnownGroup
+ if (type != SidTypeGroup && type != SidTypeWellKnownGroup
&& type != SidTypeAlias)
return APR_EINVAL;
*groupname = apr_pstrdup(p, name);
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_gid_compare(apr_gid_t left, apr_gid_t right)
{
if (!left || !right)
diff --git a/user/win32/userinfo.c b/user/win32/userinfo.c
index 894da40f1..038a56808 100644
--- a/user/win32/userinfo.c
+++ b/user/win32/userinfo.c
@@ -36,7 +36,7 @@ static void get_sid_string(char *buf, apr_size_t blen, apr_uid_t id)
DWORD sa;
int slen;
- /* Determine authority values (these is a big-endian value,
+ /* Determine authority values (these is a big-endian value,
* and NT records the value as hex if the value is > 2^32.)
*/
psia = GetSidIdentifierAuthority(id);
@@ -58,13 +58,13 @@ static void get_sid_string(char *buf, apr_size_t blen, apr_uid_t id)
slen += apr_snprintf(buf + slen, blen - slen, "-%lu",
*GetSidSubAuthority(id, sa));
}
-}
+}
/* Query the ProfileImagePath from the version-specific branch, where the
* regkey uses the user's name on 9x, and user's sid string on NT.
*/
-APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
- const char *username,
+APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
+ const char *username,
apr_pool_t *p)
{
apr_status_t rv;
@@ -77,7 +77,7 @@ APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
if (apr_os_level >= APR_WIN_NT) {
apr_uid_t uid;
apr_gid_t gid;
-
+
if ((rv = apr_uid_get(&uid, &gid, username, p)) != APR_SUCCESS)
return rv;
@@ -93,7 +93,7 @@ APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
apr_cpystrn(regkey + keylen, username, sizeof(regkey) - keylen);
}
- if ((rv = RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey, 0,
+ if ((rv = RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey, 0,
KEY_QUERY_VALUE, &key)) != ERROR_SUCCESS)
return APR_FROM_OS_ERROR(rv);
@@ -105,7 +105,7 @@ APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
return APR_FROM_OS_ERROR(rv);
if (type == REG_SZ) {
char retdir[MAX_PATH];
- if ((rv = unicode_to_utf8_path(retdir, sizeof(retdir),
+ if ((rv = unicode_to_utf8_path(retdir, sizeof(retdir),
(apr_wchar_t*)regkey)) != APR_SUCCESS)
return rv;
*dirname = apr_pstrdup(p, retdir);
@@ -113,7 +113,7 @@ APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
else if (type == REG_EXPAND_SZ) {
apr_wchar_t path[MAX_PATH];
char retdir[MAX_PATH];
- ExpandEnvironmentStringsW((apr_wchar_t*)regkey, path,
+ ExpandEnvironmentStringsW((apr_wchar_t*)regkey, path,
sizeof(path) / 2);
if ((rv = unicode_to_utf8_path(retdir, sizeof(retdir), path))
!= APR_SUCCESS)
@@ -156,7 +156,7 @@ APR_DECLARE(apr_status_t) apr_uid_current(apr_uid_t *uid,
}
if (!GetTokenInformation(threadtok, TokenPrimaryGroup, NULL, 0, &needed)
- && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+ && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
&& (grp = apr_palloc(p, needed))
&& GetTokenInformation(threadtok, TokenPrimaryGroup, grp, needed, &needed)) {
*gid = grp->PrimaryGroup;
@@ -194,16 +194,16 @@ APR_DECLARE(apr_status_t) apr_uid_get(apr_uid_t *uid, apr_gid_t *gid,
else {
domain = NULL;
}
- /* Get nothing on the first pass ... need to size the sid buffer
+ /* Get nothing on the first pass ... need to size the sid buffer
*/
- rv = LookupAccountName(domain, username, domain, &sidlen,
+ rv = LookupAccountName(domain, username, domain, &sidlen,
anydomain, &domlen, &sidtype);
if (sidlen) {
/* Give it back on the second pass
*/
*uid = apr_palloc(p, sidlen);
domlen = sizeof(anydomain);
- rv = LookupAccountName(domain, username, *uid, &sidlen,
+ rv = LookupAccountName(domain, username, *uid, &sidlen,
anydomain, &domlen, &sidtype);
}
if (!sidlen || !rv) {
@@ -230,7 +230,7 @@ APR_DECLARE(apr_status_t) apr_uid_name_get(char **username, apr_uid_t userid,
*username = apr_pstrdup(p, name);
return APR_SUCCESS;
}
-
+
APR_DECLARE(apr_status_t) apr_uid_compare(apr_uid_t left, apr_uid_t right)
{
if (!left || !right)
diff --git a/util-misc/apr_date.c b/util-misc/apr_date.c
index e28e967fb..92933b7f2 100644
--- a/util-misc/apr_date.c
+++ b/util-misc/apr_date.c
@@ -17,12 +17,12 @@
/*
* apr_date.c: date parsing utility routines
* These routines are (hopefully) platform independent.
- *
+ *
* 27 Oct 1996 Roy Fielding
* Extracted (with many modifications) from mod_proxy.c and
* tested with over 50,000 randomly chosen valid date strings
* and several hundred variations of invalid date strings.
- *
+ *
*/
#include "apr.h"
@@ -49,7 +49,7 @@
* & - hex digit
* # - digit
* ~ - digit or space
- * * - swallow remaining characters
+ * * - swallow remaining characters
* <x> - exact match for any other character
*/
APR_DECLARE(int) apr_date_checkmask(const char *data, const char *mask)
@@ -102,11 +102,11 @@ APR_DECLARE(int) apr_date_checkmask(const char *data, const char *mask)
* Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
* Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
*
- * and returns the apr_time_t number of microseconds since 1 Jan 1970 GMT,
+ * and returns the apr_time_t number of microseconds since 1 Jan 1970 GMT,
* or APR_DATE_BAD if this would be out of range or if the date is invalid.
*
* The restricted HTTP syntax is
- *
+ *
* HTTP-date = rfc1123-date | rfc850-date | asctime-date
*
* rfc1123-date = wkday "," SP date1 SP time SP "GMT"
@@ -163,7 +163,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_http(const char *date)
while (*date && apr_isspace(*date)) /* Find first non-whitespace char */
++date;
- if (*date == '\0')
+ if (*date == '\0')
return APR_DATE_BAD;
if ((date = strchr(date, ' ')) == NULL) /* Find space after weekday */
@@ -186,7 +186,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_http(const char *date)
monstr = date + 3;
timstr = date + 12;
}
- else if (apr_date_checkmask(date, "##-@$$-## ##:##:## *")) {
+ else if (apr_date_checkmask(date, "##-@$$-## ##:##:## *")) {
/* RFC 850 format */
ds.tm_year = ((date[7] - '0') * 10) + (date[8] - '0');
if (ds.tm_year < 70)
@@ -200,7 +200,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_http(const char *date)
else if (apr_date_checkmask(date, "@$$ ~# ##:##:## ####*")) {
/* asctime format */
ds.tm_year = ((date[16] - '0') * 10 + (date[17] - '0') - 19) * 100;
- if (ds.tm_year < 0)
+ if (ds.tm_year < 0)
return APR_DATE_BAD;
ds.tm_year += ((date[18] - '0') * 10) + (date[19] - '0');
@@ -238,7 +238,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_http(const char *date)
ds.tm_min = ((timstr[3] - '0') * 10) + (timstr[4] - '0');
ds.tm_sec = ((timstr[6] - '0') * 10) + (timstr[7] - '0');
- if ((ds.tm_hour > 23) || (ds.tm_min > 59) || (ds.tm_sec > 61))
+ if ((ds.tm_hour > 23) || (ds.tm_min > 59) || (ds.tm_sec > 61))
return APR_DATE_BAD;
mint = (monstr[0] << 16) | (monstr[1] << 8) | monstr[2];
@@ -254,7 +254,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_http(const char *date)
/* February gets special check for leapyear */
if ((mon == 1) &&
- ((ds.tm_mday > 29) ||
+ ((ds.tm_mday > 29) ||
((ds.tm_mday == 29)
&& ((ds.tm_year & 3)
|| (((ds.tm_year % 100) == 0)
@@ -263,26 +263,26 @@ APR_DECLARE(apr_time_t) apr_date_parse_http(const char *date)
ds.tm_mon = mon;
- /* ap_mplode_time uses tm_usec and tm_gmtoff fields, but they haven't
- * been set yet.
+ /* ap_mplode_time uses tm_usec and tm_gmtoff fields, but they haven't
+ * been set yet.
* It should be safe to just zero out these values.
* tm_usec is the number of microseconds into the second. HTTP only
* cares about second granularity.
* tm_gmtoff is the number of seconds off of GMT the time is. By
* definition all times going through this function are in GMT, so this
- * is zero.
+ * is zero.
*/
ds.tm_usec = 0;
ds.tm_gmtoff = 0;
- if (apr_time_exp_get(&result, &ds) != APR_SUCCESS)
+ if (apr_time_exp_get(&result, &ds) != APR_SUCCESS)
return APR_DATE_BAD;
-
+
return result;
}
/*
* Parses a string resembling an RFC 822 date. This is meant to be
- * leinent in its parsing of dates. Hence, this will parse a wider
+ * leinent in its parsing of dates. Hence, this will parse a wider
* range of dates than apr_date_parse_http.
*
* The prominent mailer (or poster, if mailer is unknown) that has
@@ -294,10 +294,10 @@ APR_DECLARE(apr_time_t) apr_date_parse_http(const char *date)
* Sun, 6 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
* Sun, 06 Nov 94 08:49:37 GMT ; RFC 822
* Sun, 6 Nov 94 08:49:37 GMT ; RFC 822
- * Sun, 06 Nov 94 08:49 GMT ; Unknown [drtr@ast.cam.ac.uk]
+ * Sun, 06 Nov 94 08:49 GMT ; Unknown [drtr@ast.cam.ac.uk]
* Sun, 6 Nov 94 08:49 GMT ; Unknown [drtr@ast.cam.ac.uk]
* Sun, 06 Nov 94 8:49:37 GMT ; Unknown [Elm 70.85]
- * Sun, 6 Nov 94 8:49:37 GMT ; Unknown [Elm 70.85]
+ * Sun, 6 Nov 94 8:49:37 GMT ; Unknown [Elm 70.85]
* Mon, 7 Jan 2002 07:21:22 GMT ; Unknown [Postfix]
* Sun, 06-Nov-1994 08:49:37 GMT ; RFC 850 with four digit years
*
@@ -340,7 +340,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
while (*date && apr_isspace(*date)) /* Find first non-whitespace char */
++date;
- if (*date == '\0')
+ if (*date == '\0')
return APR_DATE_BAD;
if ((date = strchr(date, ' ')) == NULL) /* Find space after weekday */
@@ -382,7 +382,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
else if (apr_date_checkmask(date, "@$$ ~# ##:##:## ####*")) {
/* asctime format */
ds.tm_year = ((date[16] - '0') * 10 + (date[17] - '0') - 19) * 100;
- if (ds.tm_year < 0)
+ if (ds.tm_year < 0)
return APR_DATE_BAD;
ds.tm_year += ((date[18] - '0') * 10) + (date[19] - '0');
@@ -433,7 +433,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
gmtstr = date + 19;
TIMEPARSE_STD(ds, timstr);
- }
+ }
else if (apr_date_checkmask(date, " # @$$ ## ##:##:## *")) {
/* This is the old RFC 1123 date format - many many years ago, people
* used two-digit years. Oh, how foolish.
@@ -451,7 +451,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
gmtstr = date + 19;
TIMEPARSE_STD(ds, timstr);
- }
+ }
else if (apr_date_checkmask(date, "# @$$ ## ##:##:## *")) {
/* This is the old RFC 1123 date format - many many years ago, people
* used two-digit years. Oh, how foolish.
@@ -469,7 +469,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
gmtstr = date + 18;
TIMEPARSE_STD(ds, timstr);
- }
+ }
else if (apr_date_checkmask(date, "## @$$ ## ##:## *")) {
/* Loser format. This is quite bogus. */
ds.tm_year = ((date[7] - '0') * 10) + (date[8] - '0');
@@ -484,7 +484,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
gmtstr = NULL;
TIMEPARSE(ds, timstr[0],timstr[1], timstr[3],timstr[4], '0','0');
- }
+ }
else if (apr_date_checkmask(date, "# @$$ ## ##:## *")) {
/* Loser format. This is quite bogus. */
ds.tm_year = ((date[6] - '0') * 10) + (date[7] - '0');
@@ -530,7 +530,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
TIMEPARSE(ds, '0',timstr[1], timstr[3],timstr[4], timstr[6],timstr[7]);
}
- else if (apr_date_checkmask(date, " # @$$ #### ##:##:## *")) {
+ else if (apr_date_checkmask(date, " # @$$ #### ##:##:## *")) {
/* RFC 1123 format with a space instead of a leading zero. */
ds.tm_year = ((date[7] - '0') * 10 + (date[8] - '0') - 19) * 100;
@@ -571,7 +571,7 @@ APR_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
if (ds.tm_mday <= 0 || ds.tm_mday > 31)
return APR_DATE_BAD;
- if ((ds.tm_hour > 23) || (ds.tm_min > 59) || (ds.tm_sec > 61))
+ if ((ds.tm_hour > 23) || (ds.tm_min > 59) || (ds.tm_sec > 61))
return APR_DATE_BAD;
mint = (monstr[0] << 16) | (monstr[1] << 8) | monstr[2];
@@ -623,15 +623,15 @@ APR_DECLARE(apr_time_t) apr_date_parse_rfc(const char *date)
}
}
- /* apr_time_exp_get uses tm_usec field, but it hasn't been set yet.
+ /* apr_time_exp_get uses tm_usec field, but it hasn't been set yet.
* It should be safe to just zero out this value.
* tm_usec is the number of microseconds into the second. HTTP only
* cares about second granularity.
*/
ds.tm_usec = 0;
- if (apr_time_exp_gmt_get(&result, &ds) != APR_SUCCESS)
+ if (apr_time_exp_gmt_get(&result, &ds) != APR_SUCCESS)
return APR_DATE_BAD;
-
+
return result;
}
diff --git a/util-misc/apr_queue.c b/util-misc/apr_queue.c
index dbc879b35..3eaec06b2 100644
--- a/util-misc/apr_queue.c
+++ b/util-misc/apr_queue.c
@@ -34,7 +34,7 @@
#include "apr_queue.h"
#if APR_HAS_THREADS
-/*
+/*
* define this to get debug messages
*
#define QUEUE_DEBUG
@@ -56,14 +56,14 @@ struct apr_queue_t {
#ifdef QUEUE_DEBUG
static void Q_DBG(char*msg, apr_queue_t *q) {
- fprintf(stderr, "%ld\t#%d in %d out %d\t%s\n",
+ fprintf(stderr, "%ld\t#%d in %d out %d\t%s\n",
apr_os_thread_current(),
q->nelts, q->in, q->out,
msg
);
}
#else
-#define Q_DBG(x,y)
+#define Q_DBG(x,y)
#endif
/**
@@ -82,7 +82,7 @@ static void Q_DBG(char*msg, apr_queue_t *q) {
* Callback routine that is called to destroy this
* apr_queue_t when its pool is destroyed.
*/
-static apr_status_t queue_destroy(void *data)
+static apr_status_t queue_destroy(void *data)
{
apr_queue_t *queue = data;
@@ -98,8 +98,8 @@ static apr_status_t queue_destroy(void *data)
/**
* Initialize the apr_queue_t.
*/
-APR_DECLARE(apr_status_t) apr_queue_create(apr_queue_t **q,
- unsigned int queue_capacity,
+APR_DECLARE(apr_status_t) apr_queue_create(apr_queue_t **q,
+ unsigned int queue_capacity,
apr_pool_t *a)
{
apr_status_t rv;
@@ -302,7 +302,7 @@ static apr_status_t queue_pop(apr_queue_t *queue, void **data,
return APR_EINTR;
}
}
- }
+ }
*data = queue->data[queue->out];
queue->nelts--;
@@ -342,7 +342,7 @@ APR_DECLARE(apr_status_t) apr_queue_timedpop(apr_queue_t *queue, void **data,
APR_DECLARE(apr_status_t) apr_queue_interrupt_all(apr_queue_t *queue)
{
apr_status_t rv;
- Q_DBG("intr all", queue);
+ Q_DBG("intr all", queue);
if ((rv = apr_thread_mutex_lock(queue->one_big_mutex)) != APR_SUCCESS) {
return rv;
}
@@ -365,7 +365,7 @@ APR_DECLARE(apr_status_t) apr_queue_term(apr_queue_t *queue)
}
/* we must hold one_big_mutex when setting this... otherwise,
- * we could end up setting it and waking everybody up just after a
+ * we could end up setting it and waking everybody up just after a
* would-be popper checks it but right before they block
*/
queue->terminated = 1;
diff --git a/util-misc/apr_reslist.c b/util-misc/apr_reslist.c
index 7e87be828..81f846edf 100644
--- a/util-misc/apr_reslist.c
+++ b/util-misc/apr_reslist.c
@@ -392,7 +392,7 @@ static apr_status_t reslist_acquire(apr_reslist_t *reslist,
while (reslist->ntotal >= reslist->hmax && reslist->nidle <= 0) {
#if APR_HAS_THREADS
if (reslist->timeout) {
- if ((rv = apr_thread_cond_timedwait(reslist->avail,
+ if ((rv = apr_thread_cond_timedwait(reslist->avail,
reslist->listlock, reslist->timeout)) != APR_SUCCESS) {
apr_thread_mutex_unlock(reslist->listlock);
return rv;
diff --git a/util-misc/apr_rmm.c b/util-misc/apr_rmm.c
index 91e30885f..a9c0c7cbb 100644
--- a/util-misc/apr_rmm.c
+++ b/util-misc/apr_rmm.c
@@ -73,7 +73,7 @@ struct apr_rmm_t {
apr_anylock_t lock;
};
-static apr_rmm_off_t find_block_by_offset(apr_rmm_t *rmm, apr_rmm_off_t next,
+static apr_rmm_off_t find_block_by_offset(apr_rmm_t *rmm, apr_rmm_off_t next,
apr_rmm_off_t find, int includes)
{
apr_rmm_off_t prev = 0;
@@ -107,7 +107,7 @@ static apr_rmm_off_t find_block_of_size(apr_rmm_t *rmm, apr_size_t size)
return next;
if (blk->size >= size) {
- /* XXX: sub optimal algorithm
+ /* XXX: sub optimal algorithm
* We need the most thorough best-fit logic, since we can
* never grow our rmm, we are SOL when we hit the wall.
*/
@@ -141,7 +141,7 @@ static apr_rmm_off_t find_block_of_size(apr_rmm_t *rmm, apr_size_t size)
}
static void move_block(apr_rmm_t *rmm, apr_rmm_off_t this, int free)
-{
+{
struct rmm_block_t *blk = (rmm_block_t*)((char*)rmm->base + this);
/* close the gap */
@@ -210,14 +210,14 @@ static void move_block(apr_rmm_t *rmm, apr_rmm_off_t this, int free)
}
}
-APR_DECLARE(apr_status_t) apr_rmm_init(apr_rmm_t **rmm, apr_anylock_t *lock,
+APR_DECLARE(apr_status_t) apr_rmm_init(apr_rmm_t **rmm, apr_anylock_t *lock,
void *base, apr_size_t size,
apr_pool_t *p)
{
apr_status_t rv;
rmm_block_t *blk;
apr_anylock_t nulllock;
-
+
if (!lock) {
nulllock.type = apr_anylock_none;
nulllock.lock.pm = NULL;
@@ -298,7 +298,7 @@ APR_DECLARE(apr_status_t) apr_rmm_attach(apr_rmm_t **rmm, apr_anylock_t *lock,
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_rmm_detach(apr_rmm_t *rmm)
+APR_DECLARE(apr_status_t) apr_rmm_detach(apr_rmm_t *rmm)
{
/* A noop until we introduce locked/refcounts */
return APR_SUCCESS;
@@ -308,7 +308,7 @@ APR_DECLARE(apr_rmm_off_t) apr_rmm_malloc(apr_rmm_t *rmm, apr_size_t reqsize)
{
apr_size_t size;
apr_rmm_off_t this;
-
+
size = APR_ALIGN_DEFAULT(reqsize) + RMM_BLOCK_SIZE;
if (size < reqsize) {
return 0;
@@ -331,7 +331,7 @@ APR_DECLARE(apr_rmm_off_t) apr_rmm_calloc(apr_rmm_t *rmm, apr_size_t reqsize)
{
apr_size_t size;
apr_rmm_off_t this;
-
+
size = APR_ALIGN_DEFAULT(reqsize) + RMM_BLOCK_SIZE;
if (size < reqsize) {
return 0;
@@ -427,11 +427,11 @@ APR_DECLARE(apr_status_t) apr_rmm_free(apr_rmm_t *rmm, apr_rmm_off_t this)
/* Ok, it remained [apparently] sane, so unlink it
*/
move_block(rmm, this, 1);
-
+
return APR_ANYLOCK_UNLOCK(&rmm->lock);
}
-APR_DECLARE(void *) apr_rmm_addr_get(apr_rmm_t *rmm, apr_rmm_off_t entity)
+APR_DECLARE(void *) apr_rmm_addr_get(apr_rmm_t *rmm, apr_rmm_off_t entity)
{
/* debug-sanity checking here would be good
*/
@@ -448,7 +448,7 @@ APR_DECLARE(apr_rmm_off_t) apr_rmm_offset_get(apr_rmm_t *rmm, void* entity)
return ((char*)entity - (char*)rmm->base);
}
-APR_DECLARE(apr_size_t) apr_rmm_overhead_get(int n)
+APR_DECLARE(apr_size_t) apr_rmm_overhead_get(int n)
{
/* overhead per block is at most APR_ALIGN_DEFAULT(1) wasted bytes
* for alignment overhead, plus the size of the rmm_block_t
diff --git a/util-misc/apr_thread_pool.c b/util-misc/apr_thread_pool.c
index b4f903c76..d0d1247f3 100644
--- a/util-misc/apr_thread_pool.c
+++ b/util-misc/apr_thread_pool.c
@@ -339,7 +339,7 @@ static void *APR_THREAD_FUNC thread_pool_func(apr_thread_t * t, void *param)
++me->idle_cnt;
APR_RING_INSERT_TAIL(me->idle_thds, elt, apr_thread_list_elt, link);
- /*
+ /*
* If there is a scheduled task, always scheduled to perform that task.
* Since there is no guarantee that current idle threads are scheduled
* for next scheduled task.
@@ -432,8 +432,8 @@ APR_DECLARE(apr_status_t) apr_thread_pool_create(apr_thread_pool_t ** me,
return rv;
apr_pool_pre_cleanup_register(tp->pool, tp, thread_pool_cleanup);
- /* Grab the mutex as apr_thread_create() and thread_pool_func() will
- * allocate from (*me)->pool. This is dangerous if there are multiple
+ /* Grab the mutex as apr_thread_create() and thread_pool_func() will
+ * allocate from (*me)->pool. This is dangerous if there are multiple
* initial threads to create.
*/
apr_thread_mutex_lock(tp->lock);
@@ -498,8 +498,8 @@ static apr_thread_pool_task_t *task_new(apr_thread_pool_t * me,
}
/*
- * Test it the task is the only one within the priority segment.
- * If it is not, return the first element with same or lower priority.
+ * Test it the task is the only one within the priority segment.
+ * If it is not, return the first element with same or lower priority.
* Otherwise, add the task into the queue and return NULL.
*
* NOTE: This function is not thread safe by itself. Caller should hold the lock
@@ -978,7 +978,7 @@ APR_DECLARE(apr_size_t) apr_thread_pool_thread_max_set(apr_thread_pool_t *me,
n = i; /* stop all idle threads */
}
stop_idle_threads(me, i - n);
-
+
return n;
}
diff --git a/xlate/xlate.c b/xlate/xlate.c
index 6a84c3144..cdd66b575 100644
--- a/xlate/xlate.c
+++ b/xlate/xlate.c
@@ -175,7 +175,7 @@ static void check_sbcs(apr_xlate_t *convset)
/* reset the iconv descriptor, since it's now in an undefined
* state. */
apr_iconv_close(convset->ich, convset->pool);
- rv = apr_iconv_open(convset->topage, convset->frompage,
+ rv = apr_iconv_open(convset->topage, convset->frompage,
convset->pool, &convset->ich);
}
}