summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan@13f79535-47bb-0310-9956-ffa450edef68>2022-07-08 20:55:13 +0000
committerivan <ivan@13f79535-47bb-0310-9956-ffa450edef68>2022-07-08 20:55:13 +0000
commite14eabe505f7fd2754677e7aa115a71ec97ae584 (patch)
treef32898df4cd25c2acc1e6f9a5d8e9a55480a118a
parent34937dc22217195188b95b3ed8fb521d60f0d821 (diff)
downloadlibapr-e14eabe505f7fd2754677e7aa115a71ec97ae584.tar.gz
Replace tabs to spaces.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902583 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/apr_file_io.h10
-rw-r--r--include/apr_hooks.h26
-rw-r--r--include/apr_network_io.h20
-rw-r--r--include/apr_ring.h218
-rw-r--r--include/arch/beos/apr_arch_threadproc.h20
-rw-r--r--include/arch/win32/apr_arch_misc.h2
-rw-r--r--include/arch/win32/apr_private.h4
-rw-r--r--mmap/win32/mmap.c4
-rw-r--r--network_io/unix/sendrecv.c2
-rw-r--r--test/testredis.c30
-rw-r--r--threadproc/beos/thread.c20
-rw-r--r--threadproc/beos/threadpriv.c198
-rw-r--r--threadproc/netware/threadpriv.c2
-rw-r--r--threadproc/win32/proc.c20
-rw-r--r--time/win32/time.c68
15 files changed, 322 insertions, 322 deletions
diff --git a/include/apr_file_io.h b/include/apr_file_io.h
index 4611b1a15..b1c088db4 100644
--- a/include/apr_file_io.h
+++ b/include/apr_file_io.h
@@ -58,8 +58,8 @@ extern "C" {
#define APR_FOPEN_TRUNCATE 0x00010 /**< Open the file and truncate
to 0 length */
#define APR_FOPEN_BINARY 0x00020 /**< Open the file in binary mode
- (This flag is ignored on UNIX
- because it has no meaning)*/
+ (This flag is ignored on UNIX
+ because it has no meaning)*/
#define APR_FOPEN_EXCL 0x00040 /**< Open should fail if #APR_FOPEN_CREATE
and file exists. */
#define APR_FOPEN_BUFFERED 0x00080 /**< Open the file for buffered I/O */
@@ -73,9 +73,9 @@ extern "C" {
process/machines */
#define APR_FOPEN_NOCLEANUP 0x00800 /**< Do not register a cleanup
when the file is opened. The
- apr_os_file_t handle in apr_file_t
- will not be closed when the pool
- is destroyed. */
+ apr_os_file_t handle in apr_file_t
+ will not be closed when the pool
+ is destroyed. */
#define APR_FOPEN_SENDFILE_ENABLED 0x01000 /**< Advisory flag that this
file should support
apr_socket_sendfile operation */
diff --git a/include/apr_hooks.h b/include/apr_hooks.h
index 896ea72f3..206f0d8dd 100644
--- a/include/apr_hooks.h
+++ b/include/apr_hooks.h
@@ -146,10 +146,10 @@ link##_DECLARE(void) ns##_hook_##name(ns##_HOOK_##name##_t *pf,const char * cons
{ \
ns##_LINK_##name##_t *pHook; \
if(!_hooks.link_##name) \
- { \
- _hooks.link_##name=apr_array_make(apr_hook_global_pool,1,sizeof(ns##_LINK_##name##_t)); \
- apr_hook_sort_register(#name,&_hooks.link_##name); \
- } \
+ { \
+ _hooks.link_##name=apr_array_make(apr_hook_global_pool,1,sizeof(ns##_LINK_##name##_t)); \
+ apr_hook_sort_register(#name,&_hooks.link_##name); \
+ } \
pHook=apr_array_push(_hooks.link_##name); \
pHook->pFunc=pf; \
pHook->aszPredecessors=aszPre; \
@@ -157,7 +157,7 @@ link##_DECLARE(void) ns##_hook_##name(ns##_HOOK_##name##_t *pf,const char * cons
pHook->nOrder=nOrder; \
pHook->szName=apr_hook_debug_current; \
if(apr_hook_debug_enabled) \
- apr_hook_debug_show(#name,aszPre,aszSucc); \
+ apr_hook_debug_show(#name,aszPre,aszSucc); \
} \
APR_IMPLEMENT_HOOK_GET_PROTO(ns,link,name) \
{ \
@@ -191,9 +191,9 @@ link##_DECLARE(void) ns##_run_##name args_decl \
pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \
for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \
{ \
- APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \
- pHook[n].pFunc args_use; \
- APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, 0, args_use); \
+ APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \
+ pHook[n].pFunc args_use; \
+ APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, 0, args_use); \
} \
} \
\
@@ -296,15 +296,15 @@ link##_DECLARE(ret) ns##_run_##name args_decl \
/* Hook orderings */
/** run this hook first, before ANYTHING */
-#define APR_HOOK_REALLY_FIRST (-10)
+#define APR_HOOK_REALLY_FIRST (-10)
/** run this hook first */
-#define APR_HOOK_FIRST 0
+#define APR_HOOK_FIRST 0
/** run this hook somewhere */
-#define APR_HOOK_MIDDLE 10
+#define APR_HOOK_MIDDLE 10
/** run this hook after every other hook which is defined*/
-#define APR_HOOK_LAST 20
+#define APR_HOOK_LAST 20
/** run this hook last, after EVERYTHING */
-#define APR_HOOK_REALLY_LAST 30
+#define APR_HOOK_REALLY_LAST 30
/**
* The global pool used to allocate any memory needed by the hooks.
diff --git a/include/apr_network_io.h b/include/apr_network_io.h
index d47592625..b3536d802 100644
--- a/include/apr_network_io.h
+++ b/include/apr_network_io.h
@@ -83,16 +83,16 @@ extern "C" {
* again when NOPUSH is turned off
*/
#define APR_INCOMPLETE_READ 4096 /**< Set on non-blocking sockets
- * (timeout != 0) on which the
- * previous read() did not fill a buffer
- * completely. the next apr_socket_recv()
- * will first call select()/poll() rather than
- * going straight into read(). (Can also
- * be set by an application to force a
- * select()/poll() call before the next
- * read, in cases where the app expects
- * that an immediate read would fail.)
- */
+ * (timeout != 0) on which the
+ * previous read() did not fill a buffer
+ * completely. the next apr_socket_recv()
+ * will first call select()/poll() rather than
+ * going straight into read(). (Can also
+ * be set by an application to force a
+ * select()/poll() call before the next
+ * read, in cases where the app expects
+ * that an immediate read would fail.)
+ */
#define APR_INCOMPLETE_WRITE 8192 /**< like APR_INCOMPLETE_READ, but for write
* @see APR_INCOMPLETE_READ
*/
diff --git a/include/apr_ring.h b/include/apr_ring.h
index 7280245e1..f45e80199 100644
--- a/include/apr_ring.h
+++ b/include/apr_ring.h
@@ -67,10 +67,10 @@
* object with enough earlier fields to accommodate the offsetof() used
* to compute the ring sentinel below. You can usually ignore this caveat.
*/
-#define APR_RING_ENTRY(elem) \
- struct { \
- struct elem * volatile next; \
- struct elem * volatile prev; \
+#define APR_RING_ENTRY(elem) \
+ struct { \
+ struct elem * volatile next; \
+ struct elem * volatile prev; \
}
/**
@@ -88,10 +88,10 @@
* The first element in the ring is next after the head, and the last
* element is just before the head.
*/
-#define APR_RING_HEAD(head, elem) \
- struct head { \
- struct elem * volatile next; \
- struct elem * volatile prev; \
+#define APR_RING_HEAD(head, elem) \
+ struct head { \
+ struct elem * volatile next; \
+ struct elem * volatile prev; \
}
/**
@@ -156,31 +156,31 @@
* @param elem The name of the element struct
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_SENTINEL(hp, elem, link) \
+#define APR_RING_SENTINEL(hp, elem, link) \
(struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))
/**
* The first element of the ring
* @param hp The head of the ring
*/
-#define APR_RING_FIRST(hp) (hp)->next
+#define APR_RING_FIRST(hp) (hp)->next
/**
* The last element of the ring
* @param hp The head of the ring
*/
-#define APR_RING_LAST(hp) (hp)->prev
+#define APR_RING_LAST(hp) (hp)->prev
/**
* The next element in the ring
* @param ep The current element
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_NEXT(ep, link) (ep)->link.next
+#define APR_RING_NEXT(ep, link) (ep)->link.next
/**
* The previous element in the ring
* @param ep The current element
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_PREV(ep, link) (ep)->link.prev
+#define APR_RING_PREV(ep, link) (ep)->link.prev
/**
@@ -189,9 +189,9 @@
* @param elem The name of the element struct
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_INIT(hp, elem, link) do { \
- APR_RING_FIRST((hp)) = APR_RING_SENTINEL((hp), elem, link); \
- APR_RING_LAST((hp)) = APR_RING_SENTINEL((hp), elem, link); \
+#define APR_RING_INIT(hp, elem, link) do { \
+ APR_RING_FIRST((hp)) = APR_RING_SENTINEL((hp), elem, link); \
+ APR_RING_LAST((hp)) = APR_RING_SENTINEL((hp), elem, link); \
} while (0)
/**
@@ -201,7 +201,7 @@
* @param link The name of the APR_RING_ENTRY in the element struct
* @return true or false
*/
-#define APR_RING_EMPTY(hp, elem, link) \
+#define APR_RING_EMPTY(hp, elem, link) \
(APR_RING_FIRST((hp)) == APR_RING_SENTINEL((hp), elem, link))
/**
@@ -209,9 +209,9 @@
* @param ep The element
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_ELEM_INIT(ep, link) do { \
- APR_RING_NEXT((ep), link) = (ep); \
- APR_RING_PREV((ep), link) = (ep); \
+#define APR_RING_ELEM_INIT(ep, link) do { \
+ APR_RING_NEXT((ep), link) = (ep); \
+ APR_RING_PREV((ep), link) = (ep); \
} while (0)
@@ -225,11 +225,11 @@
* @param epN Last element in the sequence to splice in
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_SPLICE_BEFORE(lep, ep1, epN, link) do { \
- APR_RING_NEXT((epN), link) = (lep); \
- APR_RING_PREV((ep1), link) = APR_RING_PREV((lep), link); \
- APR_RING_NEXT(APR_RING_PREV((lep), link), link) = (ep1); \
- APR_RING_PREV((lep), link) = (epN); \
+#define APR_RING_SPLICE_BEFORE(lep, ep1, epN, link) do { \
+ APR_RING_NEXT((epN), link) = (lep); \
+ APR_RING_PREV((ep1), link) = APR_RING_PREV((lep), link); \
+ APR_RING_NEXT(APR_RING_PREV((lep), link), link) = (ep1); \
+ APR_RING_PREV((lep), link) = (epN); \
} while (0)
/**
@@ -242,11 +242,11 @@
* @param epN Last element in the sequence to splice in
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_SPLICE_AFTER(lep, ep1, epN, link) do { \
- APR_RING_PREV((ep1), link) = (lep); \
- APR_RING_NEXT((epN), link) = APR_RING_NEXT((lep), link); \
- APR_RING_PREV(APR_RING_NEXT((lep), link), link) = (epN); \
- APR_RING_NEXT((lep), link) = (ep1); \
+#define APR_RING_SPLICE_AFTER(lep, ep1, epN, link) do { \
+ APR_RING_PREV((ep1), link) = (lep); \
+ APR_RING_NEXT((epN), link) = APR_RING_NEXT((lep), link); \
+ APR_RING_PREV(APR_RING_NEXT((lep), link), link) = (epN); \
+ APR_RING_NEXT((lep), link) = (ep1); \
} while (0)
/**
@@ -258,8 +258,8 @@
* @param nep Element to insert
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_INSERT_BEFORE(lep, nep, link) \
- APR_RING_SPLICE_BEFORE((lep), (nep), (nep), link)
+#define APR_RING_INSERT_BEFORE(lep, nep, link) \
+ APR_RING_SPLICE_BEFORE((lep), (nep), (nep), link)
/**
* Insert the element nep into the ring after element lep
@@ -270,8 +270,8 @@
* @param nep Element to insert
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_INSERT_AFTER(lep, nep, link) \
- APR_RING_SPLICE_AFTER((lep), (nep), (nep), link)
+#define APR_RING_INSERT_AFTER(lep, nep, link) \
+ APR_RING_SPLICE_AFTER((lep), (nep), (nep), link)
/**
@@ -283,11 +283,11 @@
* @param elem The name of the element struct
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_SPLICE_HEAD(hp, ep1, epN, elem, link) do { \
- APR_RING_PREV((ep1), link) = APR_RING_SENTINEL((hp), elem, link);\
- APR_RING_NEXT((epN), link) = APR_RING_FIRST((hp)); \
- APR_RING_PREV(APR_RING_FIRST((hp)), link) = (epN); \
- APR_RING_FIRST((hp)) = (ep1); \
+#define APR_RING_SPLICE_HEAD(hp, ep1, epN, elem, link) do { \
+ APR_RING_PREV((ep1), link) = APR_RING_SENTINEL((hp), elem, link);\
+ APR_RING_NEXT((epN), link) = APR_RING_FIRST((hp)); \
+ APR_RING_PREV(APR_RING_FIRST((hp)), link) = (epN); \
+ APR_RING_FIRST((hp)) = (ep1); \
} while (0)
/**
@@ -299,11 +299,11 @@
* @param elem The name of the element struct
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_SPLICE_TAIL(hp, ep1, epN, elem, link) do { \
- APR_RING_NEXT((epN), link) = APR_RING_SENTINEL((hp), elem, link);\
- APR_RING_PREV((ep1), link) = APR_RING_LAST((hp)); \
- APR_RING_NEXT(APR_RING_LAST((hp)), link) = (ep1); \
- APR_RING_LAST((hp)) = (epN); \
+#define APR_RING_SPLICE_TAIL(hp, ep1, epN, elem, link) do { \
+ APR_RING_NEXT((epN), link) = APR_RING_SENTINEL((hp), elem, link);\
+ APR_RING_PREV((ep1), link) = APR_RING_LAST((hp)); \
+ APR_RING_NEXT(APR_RING_LAST((hp)), link) = (ep1); \
+ APR_RING_LAST((hp)) = (epN); \
} while (0)
/**
@@ -314,8 +314,8 @@
* @param elem The name of the element struct
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_INSERT_HEAD(hp, nep, elem, link) \
- APR_RING_SPLICE_HEAD((hp), (nep), (nep), elem, link)
+#define APR_RING_INSERT_HEAD(hp, nep, elem, link) \
+ APR_RING_SPLICE_HEAD((hp), (nep), (nep), elem, link)
/**
* Insert the element nep into the ring after the last element
@@ -325,8 +325,8 @@
* @param elem The name of the element struct
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_INSERT_TAIL(hp, nep, elem, link) \
- APR_RING_SPLICE_TAIL((hp), (nep), (nep), elem, link)
+#define APR_RING_INSERT_TAIL(hp, nep, elem, link) \
+ APR_RING_SPLICE_TAIL((hp), (nep), (nep), elem, link)
/**
* Concatenate ring h2 onto the end of ring h1, leaving h2 empty.
@@ -335,12 +335,12 @@
* @param elem The name of the element struct
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_CONCAT(h1, h2, elem, link) do { \
- if (!APR_RING_EMPTY((h2), elem, link)) { \
- APR_RING_SPLICE_TAIL((h1), APR_RING_FIRST((h2)), \
- APR_RING_LAST((h2)), elem, link); \
- APR_RING_INIT((h2), elem, link); \
- } \
+#define APR_RING_CONCAT(h1, h2, elem, link) do { \
+ if (!APR_RING_EMPTY((h2), elem, link)) { \
+ APR_RING_SPLICE_TAIL((h1), APR_RING_FIRST((h2)), \
+ APR_RING_LAST((h2)), elem, link); \
+ APR_RING_INIT((h2), elem, link); \
+ } \
} while (0)
/**
@@ -350,12 +350,12 @@
* @param elem The name of the element struct
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_PREPEND(h1, h2, elem, link) do { \
- if (!APR_RING_EMPTY((h2), elem, link)) { \
- APR_RING_SPLICE_HEAD((h1), APR_RING_FIRST((h2)), \
- APR_RING_LAST((h2)), elem, link); \
- APR_RING_INIT((h2), elem, link); \
- } \
+#define APR_RING_PREPEND(h1, h2, elem, link) do { \
+ if (!APR_RING_EMPTY((h2), elem, link)) { \
+ APR_RING_SPLICE_HEAD((h1), APR_RING_FIRST((h2)), \
+ APR_RING_LAST((h2)), elem, link); \
+ APR_RING_INIT((h2), elem, link); \
+ } \
} while (0)
/**
@@ -365,11 +365,11 @@
* @param epN Last element in the sequence to unsplice
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_UNSPLICE(ep1, epN, link) do { \
- APR_RING_NEXT(APR_RING_PREV((ep1), link), link) = \
- APR_RING_NEXT((epN), link); \
- APR_RING_PREV(APR_RING_NEXT((epN), link), link) = \
- APR_RING_PREV((ep1), link); \
+#define APR_RING_UNSPLICE(ep1, epN, link) do { \
+ APR_RING_NEXT(APR_RING_PREV((ep1), link), link) = \
+ APR_RING_NEXT((epN), link); \
+ APR_RING_PREV(APR_RING_NEXT((epN), link), link) = \
+ APR_RING_PREV((ep1), link); \
} while (0)
/**
@@ -378,7 +378,7 @@
* @param ep Element to remove
* @param link The name of the APR_RING_ENTRY in the element struct
*/
-#define APR_RING_REMOVE(ep, link) \
+#define APR_RING_REMOVE(ep, link) \
APR_RING_UNSPLICE((ep), (ep), link)
/**
@@ -412,51 +412,51 @@
#include <stdio.h>
#include <assert.h>
-#define APR_RING_CHECK_ONE(msg, ptr) \
- fprintf(stderr, "*** %s %p\n", msg, ptr)
-
-#define APR_RING_CHECK(hp, elem, link, msg) \
- APR_RING_CHECK_ELEM(APR_RING_SENTINEL(hp, elem, link), elem, link, msg)
-
-#define APR_RING_CHECK_ELEM(ep, elem, link, msg) do { \
- struct elem *start = (ep); \
- struct elem *here = start; \
- fprintf(stderr, "*** ring check start -- %s\n", msg); \
- do { \
- fprintf(stderr, "\telem %p\n", here); \
- fprintf(stderr, "\telem->next %p\n", \
- APR_RING_NEXT(here, link)); \
- fprintf(stderr, "\telem->prev %p\n", \
- APR_RING_PREV(here, link)); \
- fprintf(stderr, "\telem->next->prev %p\n", \
- APR_RING_PREV(APR_RING_NEXT(here, link), link)); \
- fprintf(stderr, "\telem->prev->next %p\n", \
- APR_RING_NEXT(APR_RING_PREV(here, link), link)); \
- if (APR_RING_PREV(APR_RING_NEXT(here, link), link) != here) { \
- fprintf(stderr, "\t*** elem->next->prev != elem\n"); \
- break; \
- } \
- if (APR_RING_NEXT(APR_RING_PREV(here, link), link) != here) { \
- fprintf(stderr, "\t*** elem->prev->next != elem\n"); \
- break; \
- } \
- here = APR_RING_NEXT(here, link); \
- } while (here != start); \
- fprintf(stderr, "*** ring check end\n"); \
+#define APR_RING_CHECK_ONE(msg, ptr) \
+ fprintf(stderr, "*** %s %p\n", msg, ptr)
+
+#define APR_RING_CHECK(hp, elem, link, msg) \
+ APR_RING_CHECK_ELEM(APR_RING_SENTINEL(hp, elem, link), elem, link, msg)
+
+#define APR_RING_CHECK_ELEM(ep, elem, link, msg) do { \
+ struct elem *start = (ep); \
+ struct elem *here = start; \
+ fprintf(stderr, "*** ring check start -- %s\n", msg); \
+ do { \
+ fprintf(stderr, "\telem %p\n", here); \
+ fprintf(stderr, "\telem->next %p\n", \
+ APR_RING_NEXT(here, link)); \
+ fprintf(stderr, "\telem->prev %p\n", \
+ APR_RING_PREV(here, link)); \
+ fprintf(stderr, "\telem->next->prev %p\n", \
+ APR_RING_PREV(APR_RING_NEXT(here, link), link)); \
+ fprintf(stderr, "\telem->prev->next %p\n", \
+ APR_RING_NEXT(APR_RING_PREV(here, link), link)); \
+ if (APR_RING_PREV(APR_RING_NEXT(here, link), link) != here) { \
+ fprintf(stderr, "\t*** elem->next->prev != elem\n"); \
+ break; \
+ } \
+ if (APR_RING_NEXT(APR_RING_PREV(here, link), link) != here) { \
+ fprintf(stderr, "\t*** elem->prev->next != elem\n"); \
+ break; \
+ } \
+ here = APR_RING_NEXT(here, link); \
+ } while (here != start); \
+ fprintf(stderr, "*** ring check end\n"); \
} while (0)
-#define APR_RING_CHECK_CONSISTENCY(hp, elem, link) \
- APR_RING_CHECK_ELEM_CONSISTENCY(APR_RING_SENTINEL(hp, elem, link),\
- elem, link)
-
-#define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link) do { \
- struct elem *start = (ep); \
- struct elem *here = start; \
- do { \
- assert(APR_RING_PREV(APR_RING_NEXT(here, link), link) == here); \
- assert(APR_RING_NEXT(APR_RING_PREV(here, link), link) == here); \
- here = APR_RING_NEXT(here, link); \
- } while (here != start); \
+#define APR_RING_CHECK_CONSISTENCY(hp, elem, link) \
+ APR_RING_CHECK_ELEM_CONSISTENCY(APR_RING_SENTINEL(hp, elem, link),\
+ elem, link)
+
+#define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link) do { \
+ struct elem *start = (ep); \
+ struct elem *here = start; \
+ do { \
+ assert(APR_RING_PREV(APR_RING_NEXT(here, link), link) == here); \
+ assert(APR_RING_NEXT(APR_RING_PREV(here, link), link) == here); \
+ here = APR_RING_NEXT(here, link); \
+ } while (here != start); \
} while (0)
#else
diff --git a/include/arch/beos/apr_arch_threadproc.h b/include/arch/beos/apr_arch_threadproc.h
index b7db0a300..6754681c8 100644
--- a/include/arch/beos/apr_arch_threadproc.h
+++ b/include/arch/beos/apr_arch_threadproc.h
@@ -37,7 +37,7 @@
#define PTHREAD_CANCEL_ENABLE CANCEL_ENABLE;
#define PTHREAD_CANCEL_DISABLE CANCEL_DISABLE;
-#define BEOS_MAX_DATAKEYS 128
+#define BEOS_MAX_DATAKEYS 128
struct apr_thread_t {
apr_pool_t *pool;
@@ -57,21 +57,21 @@ struct apr_threadattr_t {
struct apr_threadkey_t {
apr_pool_t *pool;
- int32 key;
+ int32 key;
};
struct beos_private_data {
- const void ** data;
- int count;
- volatile thread_id td;
+ const void ** data;
+ int count;
+ volatile thread_id td;
};
struct beos_key {
- int assigned;
- int count;
- sem_id lock;
- int32 ben_lock;
- void (* destructor) (void *);
+ int assigned;
+ int count;
+ sem_id lock;
+ int32 ben_lock;
+ void (* destructor) (void *);
};
struct apr_procattr_t {
diff --git a/include/arch/win32/apr_arch_misc.h b/include/arch/win32/apr_arch_misc.h
index fb5bb6102..6be12892f 100644
--- a/include/arch/win32/apr_arch_misc.h
+++ b/include/arch/win32/apr_arch_misc.h
@@ -84,7 +84,7 @@ typedef enum {
APR_WIN_98_SE = 16,
APR_WIN_ME = 18,
- APR_WIN_UNICODE = 20, /* Prior versions support only narrow chars */
+ APR_WIN_UNICODE = 20, /* Prior versions support only narrow chars */
APR_WIN_CE_3 = 23, /* CE is an odd beast, not supporting */
/* some pre-NT features, such as the */
diff --git a/include/arch/win32/apr_private.h b/include/arch/win32/apr_private.h
index c023d27bc..8842638cc 100644
--- a/include/arch/win32/apr_private.h
+++ b/include/arch/win32/apr_private.h
@@ -136,7 +136,7 @@ APR_DECLARE_DATA int errno;
/* MSVC 7.0 introduced _strtoi64 */
#if _MSC_VER >= 1300 && _INTEGRAL_MAX_BITS >= 64
-#define APR_INT64_STRFN _strtoi64
+#define APR_INT64_STRFN _strtoi64
#endif
#if APR_HAS_LARGE_FILES
@@ -171,7 +171,7 @@ APR_DECLARE_DATA int errno;
/* Windows ODBC sql.h is always present */
#define HAVE_SQL_H 1
-#define HAVE_ICONV_H APR_HAVE_ICONV
+#define HAVE_ICONV_H APR_HAVE_ICONV
/*
* Windows does not have GDBM, and we always use the bundled (new) Expat
diff --git a/mmap/win32/mmap.c b/mmap/win32/mmap.c
index 324848f1b..d7a3186ce 100644
--- a/mmap/win32/mmap.c
+++ b/mmap/win32/mmap.c
@@ -111,8 +111,8 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new, apr_file_t *file,
* of the mapped region!
*/
- (*new)->mhandle = CreateFileMappingW(file->filehand, NULL, fmaccess,
- 0, 0, NULL);
+ (*new)->mhandle = CreateFileMappingW(file->filehand, NULL, fmaccess,
+ 0, 0, NULL);
if (!(*new)->mhandle || (*new)->mhandle == INVALID_HANDLE_VALUE)
{
*new = NULL;
diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
index 1b965af50..ae7de9f64 100644
--- a/network_io/unix/sendrecv.c
+++ b/network_io/unix/sendrecv.c
@@ -1119,6 +1119,6 @@ apr_status_t apr_socket_sendfile(apr_socket_t *sock, apr_file_t *file,
#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 */
+ Tru64/OSF1 */
#endif /* APR_HAS_SENDFILE */
diff --git a/test/testredis.c b/test/testredis.c
index e079171ad..c91fa6fc8 100644
--- a/test/testredis.c
+++ b/test/testredis.c
@@ -116,8 +116,8 @@ static int randval(apr_uint32_t high)
double d = 0;
if (firsttime == 0) {
- srand((unsigned) (getpid()));
- firsttime = 1;
+ srand((unsigned) (getpid()));
+ firsttime = 1;
}
d = (double) rand() / ((double) RAND_MAX + 1);
@@ -493,17 +493,17 @@ static void test_redis_setget(abts_case * tc, void *data)
create_test_hash(pool, tdata);
for (hi = apr_hash_first(p, tdata); hi; hi = apr_hash_next(hi)) {
- const void *k;
- void *v;
+ const void *k;
+ void *v;
const char *key;
- apr_hash_this(hi, &k, NULL, &v);
+ apr_hash_this(hi, &k, NULL, &v);
key = k;
- rv = apr_redis_set(redis, key, v, strlen(v), 27);
- ABTS_ASSERT(tc, "set failed", rv == APR_SUCCESS);
- rv = apr_redis_getp(redis, pool, key, &result, &len, NULL);
- ABTS_ASSERT(tc, "get failed", rv == APR_SUCCESS);
+ rv = apr_redis_set(redis, key, v, strlen(v), 27);
+ ABTS_ASSERT(tc, "set failed", rv == APR_SUCCESS);
+ rv = apr_redis_getp(redis, pool, key, &result, &len, NULL);
+ ABTS_ASSERT(tc, "get failed", rv == APR_SUCCESS);
}
rv = apr_redis_getp(redis, pool, "nothere3423", &result, &len, NULL);
@@ -511,14 +511,14 @@ static void test_redis_setget(abts_case * tc, void *data)
ABTS_ASSERT(tc, "get should have failed", rv != APR_SUCCESS);
for (hi = apr_hash_first(p, tdata); hi; hi = apr_hash_next(hi)) {
- const void *k;
- const char *key;
+ const void *k;
+ const char *key;
- apr_hash_this(hi, &k, NULL, NULL);
- key = k;
+ apr_hash_this(hi, &k, NULL, NULL);
+ key = k;
- rv = apr_redis_delete(redis, key, 0);
- ABTS_ASSERT(tc, "delete failed", rv == APR_SUCCESS);
+ rv = apr_redis_delete(redis, key, 0);
+ ABTS_ASSERT(tc, "delete failed", rv == APR_SUCCESS);
}
}
diff --git a/threadproc/beos/thread.c b/threadproc/beos/thread.c
index f5752a81e..f14ef076e 100644
--- a/threadproc/beos/thread.c
+++ b/threadproc/beos/thread.c
@@ -27,27 +27,27 @@ APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool
}
(*new)->pool = pool;
- (*new)->attr = (int32)B_NORMAL_PRIORITY;
+ (*new)->attr = (int32)B_NORMAL_PRIORITY;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr, apr_int32_t on)
{
- if (on == 1){
- attr->detached = 1;
- } else {
- attr->detached = 0;
- }
+ if (on == 1){
+ attr->detached = 1;
+ } else {
+ attr->detached = 0;
+ }
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr)
{
- if (attr->detached == 1){
- return APR_DETACH;
- }
- return APR_NOTDETACH;
+ if (attr->detached == 1){
+ return APR_DETACH;
+ }
+ return APR_NOTDETACH;
}
APR_DECLARE(apr_status_t) apr_threadattr_stacksize_set(apr_threadattr_t *attr,
diff --git a/threadproc/beos/threadpriv.c b/threadproc/beos/threadpriv.c
index 442235f7d..162e37f6e 100644
--- a/threadproc/beos/threadpriv.c
+++ b/threadproc/beos/threadpriv.c
@@ -29,121 +29,121 @@ APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t **key,
}
(*key)->pool = pool;
-
- acquire_sem(lock);
- for ((*key)->key=0; (*key)->key < BEOS_MAX_DATAKEYS; (*key)->key++){
- if (key_table[(*key)->key].assigned == 0){
- key_table[(*key)->key].assigned = 1;
- key_table[(*key)->key].destructor = dest;
- release_sem(lock);
- return APR_SUCCESS;
- }
- }
- release_sem(lock);
+ acquire_sem(lock);
+ for ((*key)->key=0; (*key)->key < BEOS_MAX_DATAKEYS; (*key)->key++){
+ if (key_table[(*key)->key].assigned == 0){
+ key_table[(*key)->key].assigned = 1;
+ key_table[(*key)->key].destructor = dest;
+ release_sem(lock);
+ return APR_SUCCESS;
+ }
+
+ }
+ release_sem(lock);
return APR_ENOMEM;
}
APR_DECLARE(apr_status_t) apr_threadkey_private_get(void **new, apr_threadkey_t *key)
{
- thread_id tid;
- int i, index=0;
- tid = find_thread(NULL);
- for (i=0;i<BEOS_MAX_DATAKEYS;i++){
- if (beos_data[i]->data){
- /* it's been used */
- if (beos_data[i]->td == tid){
- index = i;
- }
- }
- }
- if (index == 0){
- /* no storage for thread so we can't get anything... */
- return APR_ENOMEM;
- }
+ thread_id tid;
+ int i, index=0;
+ tid = find_thread(NULL);
+ for (i=0;i<BEOS_MAX_DATAKEYS;i++){
+ if (beos_data[i]->data){
+ /* it's been used */
+ if (beos_data[i]->td == tid){
+ index = i;
+ }
+ }
+ }
+ if (index == 0){
+ /* no storage for thread so we can't get anything... */
+ return APR_ENOMEM;
+ }
- if ((key->key < BEOS_MAX_DATAKEYS) && (key_table)){
- acquire_sem(key_table[key->key].lock);
- if (key_table[key->key].count){
- (*new) = (void*)beos_data[index]->data[key->key];
- } else {
- (*new) = NULL;
- }
- release_sem(key_table[key->key].lock);
- } else {
- (*new) = NULL;
- }
- return APR_SUCCESS;
+ if ((key->key < BEOS_MAX_DATAKEYS) && (key_table)){
+ acquire_sem(key_table[key->key].lock);
+ if (key_table[key->key].count){
+ (*new) = (void*)beos_data[index]->data[key->key];
+ } else {
+ (*new) = NULL;
+ }
+ release_sem(key_table[key->key].lock);
+ } else {
+ (*new) = NULL;
+ }
+ return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_threadkey_private_set(void *priv, apr_threadkey_t *key)
{
- thread_id tid;
- int i,index = 0, ret = 0;
+ thread_id tid;
+ int i,index = 0, ret = 0;
- 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;}
- }
- }
- if (index==0){
- /* not yet been allocated */
- for (i=0; i< BEOS_MAX_DATAKEYS; i++){
- if (! beos_data[i]->data){
- /* we'll take this one... */
- index = i;
- beos_data[i]->data = (const void **)malloc(sizeof(void *) * BEOS_MAX_DATAKEYS);
- memset((void *)beos_data[i]->data, 0, sizeof(void *) * BEOS_MAX_DATAKEYS);
- beos_data[i]->count = (int)malloc(sizeof(int));
- beos_data[i]->td = (thread_id)malloc(sizeof(thread_id));
- beos_data[i]->td = tid;
- }
- }
- }
- if (index == 0){
- /* we're out of luck.. */
- return APR_ENOMEM;
- }
- if ((key->key < BEOS_MAX_DATAKEYS) && (key_table)){
- acquire_sem(key_table[key->key].lock);
- if (key_table[key->key].count){
- if (beos_data[index]->data[key->key] == NULL){
- if (priv != NULL){
- beos_data[index]->count++;
- key_table[key->key].count++;
- }
- } else {
- if (priv == NULL){
- beos_data[index]->count--;
- key_table[key->key].count--;
- }
- }
- beos_data[index]->data[key->key] = priv;
- ret = 1;
- } else {
- ret = 0;
- }
- release_sem(key_table[key->key].lock);
- }
- if (ret)
- return APR_SUCCESS;
- return APR_ENOMEM;
+ 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;}
+ }
+ }
+ if (index==0){
+ /* not yet been allocated */
+ for (i=0; i< BEOS_MAX_DATAKEYS; i++){
+ if (! beos_data[i]->data){
+ /* we'll take this one... */
+ index = i;
+ beos_data[i]->data = (const void **)malloc(sizeof(void *) * BEOS_MAX_DATAKEYS);
+ memset((void *)beos_data[i]->data, 0, sizeof(void *) * BEOS_MAX_DATAKEYS);
+ beos_data[i]->count = (int)malloc(sizeof(int));
+ beos_data[i]->td = (thread_id)malloc(sizeof(thread_id));
+ beos_data[i]->td = tid;
+ }
+ }
+ }
+ if (index == 0){
+ /* we're out of luck.. */
+ return APR_ENOMEM;
+ }
+ if ((key->key < BEOS_MAX_DATAKEYS) && (key_table)){
+ acquire_sem(key_table[key->key].lock);
+ if (key_table[key->key].count){
+ if (beos_data[index]->data[key->key] == NULL){
+ if (priv != NULL){
+ beos_data[index]->count++;
+ key_table[key->key].count++;
+ }
+ } else {
+ if (priv == NULL){
+ beos_data[index]->count--;
+ key_table[key->key].count--;
+ }
+ }
+ beos_data[index]->data[key->key] = priv;
+ ret = 1;
+ } else {
+ ret = 0;
+ }
+ release_sem(key_table[key->key].lock);
+ }
+ if (ret)
+ return APR_SUCCESS;
+ return APR_ENOMEM;
}
APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key)
{
- if (key->key < BEOS_MAX_DATAKEYS){
- acquire_sem(key_table[key->key].lock);
- if (key_table[key->key].count == 1){
- key_table[key->key].destructor = NULL;
- key_table[key->key].count = 0;
- }
- release_sem(key_table[key->key].lock);
- } else {
- return APR_ENOMEM;
- }
- return APR_SUCCESS;
+ if (key->key < BEOS_MAX_DATAKEYS){
+ acquire_sem(key_table[key->key].lock);
+ if (key_table[key->key].count == 1){
+ key_table[key->key].destructor = NULL;
+ key_table[key->key].count = 0;
+ }
+ release_sem(key_table[key->key].lock);
+ } else {
+ return APR_ENOMEM;
+ }
+ return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key,
diff --git a/threadproc/netware/threadpriv.c b/threadproc/netware/threadpriv.c
index 54680a563..a908f4eb2 100644
--- a/threadproc/netware/threadpriv.c
+++ b/threadproc/netware/threadpriv.c
@@ -23,7 +23,7 @@ apr_status_t apr_threadkey_private_create(apr_threadkey_t **key,
apr_status_t stat;
(*key) = (apr_threadkey_t *)apr_palloc(pool, sizeof(apr_threadkey_t));
- if ((*key) == NULL) {
+ if ((*key) == NULL) {
return APR_ENOMEM;
}
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index 283e19afd..a1d201ce8 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -419,7 +419,7 @@ static char *apr_caret_escape_args(apr_pool_t *p, const char *str)
unsigned char *d;
const unsigned char *s;
- cmd = apr_palloc(p, 2 * strlen(str) + 1); /* Be safe */
+ cmd = apr_palloc(p, 2 * strlen(str) + 1); /* Be safe */
d = (unsigned char *)cmd;
s = (const unsigned char *)str;
for (; *s; ++s) {
@@ -429,15 +429,15 @@ static char *apr_caret_escape_args(apr_pool_t *p, const char *str)
* Convert them to spaces since they are effectively white
* space to most applications
*/
- if (*s == '\r' || *s == '\n') {
- *d++ = ' ';
+ if (*s == '\r' || *s == '\n') {
+ *d++ = ' ';
continue;
- }
+ }
- if (IS_SHCHAR(*s)) {
- *d++ = '^';
- }
- *d++ = *s;
+ if (IS_SHCHAR(*s)) {
+ *d++ = '^';
+ }
+ *d++ = *s;
}
*d = '\0';
@@ -722,9 +722,9 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
pNext = wcschr(pNext, L'\0') + 1;
i++;
}
- if (!i)
+ if (!i)
*(pNext++) = L'\0';
- *pNext = L'\0';
+ *pNext = L'\0';
}
}
diff --git a/time/win32/time.c b/time/win32/time.c
index a9b067f3a..e0ac4738b 100644
--- a/time/win32/time.c
+++ b/time/win32/time.c
@@ -136,43 +136,43 @@ APR_DECLARE(apr_status_t) apr_time_exp_lt(apr_time_exp_t *result,
{
SYSTEMTIME st;
FILETIME ft, localft;
- TIME_ZONE_INFORMATION *tz;
- SYSTEMTIME localst;
- apr_time_t localtime;
+ TIME_ZONE_INFORMATION *tz;
+ SYSTEMTIME localst;
+ apr_time_t localtime;
AprTimeToFileTime(&ft, input);
- get_local_timezone(&tz);
-
- FileTimeToSystemTime(&ft, &st);
-
- /* The Platform SDK documents that SYSTEMTIME/FILETIME are
- * generally UTC. We use SystemTimeToTzSpecificLocalTime
- * because FileTimeToLocalFileFime is documented that the
- * resulting time local file time would have DST relative
- * to the *present* date, not the date converted.
- * The time value makes a roundtrip, localst cannot be invalid below.
- */
- SystemTimeToTzSpecificLocalTime(tz, &st, &localst);
- SystemTimeToAprExpTime(result, &localst);
- result->tm_usec = (apr_int32_t) (input % APR_USEC_PER_SEC);
-
-
- /* Recover the resulting time as an apr time and use the
- * delta for gmtoff in seconds (and ignore msec rounding)
- */
- SystemTimeToFileTime(&localst, &localft);
- FileTimeToAprTime(&localtime, &localft);
- result->tm_gmtoff = (int)apr_time_sec(localtime)
- - (int)apr_time_sec(input);
-
- /* 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]
- */
- result->tm_isdst = (result->tm_gmtoff / 3600)
- - (-(tz->Bias + tz->StandardBias) / 60);
+ get_local_timezone(&tz);
+
+ FileTimeToSystemTime(&ft, &st);
+
+ /* The Platform SDK documents that SYSTEMTIME/FILETIME are
+ * generally UTC. We use SystemTimeToTzSpecificLocalTime
+ * because FileTimeToLocalFileFime is documented that the
+ * resulting time local file time would have DST relative
+ * to the *present* date, not the date converted.
+ * The time value makes a roundtrip, localst cannot be invalid below.
+ */
+ SystemTimeToTzSpecificLocalTime(tz, &st, &localst);
+ SystemTimeToAprExpTime(result, &localst);
+ result->tm_usec = (apr_int32_t) (input % APR_USEC_PER_SEC);
+
+
+ /* Recover the resulting time as an apr time and use the
+ * delta for gmtoff in seconds (and ignore msec rounding)
+ */
+ SystemTimeToFileTime(&localst, &localft);
+ FileTimeToAprTime(&localtime, &localft);
+ result->tm_gmtoff = (int)apr_time_sec(localtime)
+ - (int)apr_time_sec(input);
+
+ /* 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]
+ */
+ result->tm_isdst = (result->tm_gmtoff / 3600)
+ - (-(tz->Bias + tz->StandardBias) / 60);
return APR_SUCCESS;
}