summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Engert <kaie@kuix.de>2019-09-24 00:31:15 +0000
committerKai Engert <kaie@kuix.de>2019-09-24 00:31:15 +0000
commit0b459aa3d16773bf7bbc893af0baca9464d1bf75 (patch)
treedc5fb7e16f3fd5adda7e65c98b27c843c9614ccb
parentbd4448ee1d97d90adb236a6342bfc7121a3edc15 (diff)
downloadnspr-hg-0b459aa3d16773bf7bbc893af0baca9464d1bf75.tar.gz
Bug 1581890 - remove whitespace from end of line in h/c/cpp. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D46189
-rw-r--r--config/libc_r.h6
-rw-r--r--config/nsinstall.c4
-rw-r--r--lib/ds/plarena.c16
-rw-r--r--lib/ds/plvrsion.c2
-rw-r--r--lib/libc/include/plbase64.h8
-rw-r--r--lib/libc/include/plgetopt.h56
-rw-r--r--lib/libc/include/plstr.h30
-rw-r--r--lib/libc/src/base64.c8
-rw-r--r--lib/libc/src/plgetopt.c22
-rw-r--r--lib/libc/src/plvrsion.c2
-rw-r--r--lib/libc/src/strcpy.c4
-rw-r--r--lib/libc/src/strlen.c2
-rw-r--r--lib/libc/src/strtok.c6
-rw-r--r--lib/prstreams/plvrsion.c2
-rw-r--r--lib/prstreams/tests/testprstrm/testprstrm.cpp14
-rw-r--r--lib/tests/arena.c44
-rw-r--r--lib/tests/base64t.c774
-rw-r--r--lib/tests/getopt.c4
-rw-r--r--lib/tests/string.c72
-rw-r--r--pr/include/gencfg.c16
-rw-r--r--pr/include/md/_bsdi.h2
-rw-r--r--pr/include/md/_darwin.h2
-rw-r--r--pr/include/md/_hpux.h4
-rw-r--r--pr/include/md/_nspr_pthread.h6
-rw-r--r--pr/include/md/_os2.h12
-rw-r--r--pr/include/md/_os2_errors.h2
-rw-r--r--pr/include/md/_pth.h4
-rw-r--r--pr/include/md/_solaris.h8
-rw-r--r--pr/include/md/_unixos.h8
-rw-r--r--pr/include/md/_unixware.h2
-rw-r--r--pr/include/md/_win95.h18
-rw-r--r--pr/include/md/_winnt.h14
-rw-r--r--pr/include/obsolete/pralarm.h22
-rw-r--r--pr/include/obsolete/probslet.h48
-rw-r--r--pr/include/obsolete/prsem.h26
-rw-r--r--pr/include/prbit.h8
-rw-r--r--pr/include/prcountr.h296
-rw-r--r--pr/include/prcvar.h2
-rw-r--r--pr/include/prenv.h52
-rw-r--r--pr/include/prerror.h10
-rw-r--r--pr/include/prinrval.h16
-rw-r--r--pr/include/prio.h70
-rw-r--r--pr/include/private/pprio.h18
-rw-r--r--pr/include/private/pprthred.h32
-rw-r--r--pr/include/private/primpl.h120
-rw-r--r--pr/include/prlink.h6
-rw-r--r--pr/include/prlock.h6
-rw-r--r--pr/include/prlog.h36
-rw-r--r--pr/include/prlong.h2
-rw-r--r--pr/include/prmwait.h4
-rw-r--r--pr/include/prnetdb.h30
-rw-r--r--pr/include/prolock.h82
-rw-r--r--pr/include/prproces.h2
-rw-r--r--pr/include/prrng.h6
-rw-r--r--pr/include/prrwlock.h2
-rw-r--r--pr/include/prshm.h42
-rw-r--r--pr/include/prshma.h48
-rw-r--r--pr/include/prsystem.h4
-rw-r--r--pr/include/prthread.h28
-rw-r--r--pr/include/prtrace.h350
-rw-r--r--pr/include/prtypes.h2
-rwxr-xr-xpr/include/prvrsion.h16
-rw-r--r--pr/include/prwin16.h22
-rw-r--r--pr/src/cplus/rcascii.h2
-rw-r--r--pr/src/cplus/rcinrval.h2
-rw-r--r--pr/src/cplus/rcnetio.cpp4
-rwxr-xr-xpr/src/cplus/rcthread.cpp6
-rw-r--r--pr/src/cplus/rcthread.h16
-rw-r--r--pr/src/cplus/rctime.h2
-rw-r--r--pr/src/cplus/tests/ranfile.cpp4
-rw-r--r--pr/src/cplus/tests/switch.cpp2
-rw-r--r--pr/src/cplus/tests/thread.cpp2
-rw-r--r--pr/src/cplus/tests/tpd.cpp10
-rw-r--r--pr/src/io/prdir.c18
-rw-r--r--pr/src/io/prfdcach.c4
-rw-r--r--pr/src/io/prfile.c118
-rw-r--r--pr/src/io/prio.c2
-rw-r--r--pr/src/io/priometh.c36
-rw-r--r--pr/src/io/pripv6.c4
-rw-r--r--pr/src/io/prlayer.c2
-rw-r--r--pr/src/io/prlog.c2
-rw-r--r--pr/src/io/prmapopt.c4
-rw-r--r--pr/src/io/prmwait.c22
-rw-r--r--pr/src/io/prpolevt.c44
-rw-r--r--pr/src/io/prprf.c10
-rw-r--r--pr/src/io/prscanf.c8
-rw-r--r--pr/src/io/prsocket.c84
-rw-r--r--pr/src/linking/prlink.c70
-rw-r--r--pr/src/malloc/prmalloc.c36
-rw-r--r--pr/src/malloc/prmem.c20
-rw-r--r--pr/src/md/os2/os2_errors.c2
-rw-r--r--pr/src/md/os2/os2cv.c10
-rw-r--r--pr/src/md/os2/os2gc.c10
-rw-r--r--pr/src/md/os2/os2inrval.c6
-rw-r--r--pr/src/md/os2/os2io.c54
-rw-r--r--pr/src/md/os2/os2misc.c36
-rw-r--r--pr/src/md/os2/os2poll.c28
-rw-r--r--pr/src/md/os2/os2sem.c2
-rw-r--r--pr/src/md/os2/os2sock.c16
-rw-r--r--pr/src/md/os2/os2thred.c20
-rw-r--r--pr/src/md/prosdep.c2
-rw-r--r--pr/src/md/unix/hpux.c6
-rw-r--r--pr/src/md/unix/pthreads_user.c10
-rw-r--r--pr/src/md/unix/solaris.c2
-rw-r--r--pr/src/md/unix/unix.c18
-rw-r--r--pr/src/md/unix/unix_errors.c6
-rw-r--r--pr/src/md/unix/unixware.c40
-rw-r--r--pr/src/md/unix/uxpoll.c6
-rw-r--r--pr/src/md/unix/uxproces.c4
-rw-r--r--pr/src/md/unix/uxrng.c2
-rw-r--r--pr/src/md/unix/uxshm.c116
-rw-r--r--pr/src/md/unix/uxwrap.c14
-rw-r--r--pr/src/md/windows/ntgc.c16
-rw-r--r--pr/src/md/windows/ntinrval.c4
-rw-r--r--pr/src/md/windows/ntio.c220
-rw-r--r--pr/src/md/windows/ntmisc.c78
-rw-r--r--pr/src/md/windows/ntsem.c10
-rw-r--r--pr/src/md/windows/ntthread.c30
-rw-r--r--pr/src/md/windows/w32ipcsem.c6
-rw-r--r--pr/src/md/windows/w32poll.c4
-rw-r--r--pr/src/md/windows/w32shm.c52
-rw-r--r--pr/src/md/windows/w95cv.c10
-rw-r--r--pr/src/md/windows/w95io.c52
-rw-r--r--pr/src/md/windows/w95sock.c76
-rw-r--r--pr/src/md/windows/w95thred.c22
-rw-r--r--pr/src/md/windows/win32_errors.c6
-rw-r--r--pr/src/memory/prshm.c16
-rw-r--r--pr/src/memory/prshma.c22
-rw-r--r--pr/src/misc/pralarm.c4
-rw-r--r--pr/src/misc/pratom.c6
-rw-r--r--pr/src/misc/praton.c8
-rw-r--r--pr/src/misc/prcountr.c148
-rw-r--r--pr/src/misc/prdtoa.c4
-rw-r--r--pr/src/misc/prerrortable.c6
-rw-r--r--pr/src/misc/prinit.c20
-rw-r--r--pr/src/misc/prnetdb.c46
-rw-r--r--pr/src/misc/prolock.c26
-rw-r--r--pr/src/misc/prrng.c12
-rw-r--r--pr/src/misc/prsystem.c10
-rw-r--r--pr/src/misc/prthinfo.c4
-rw-r--r--pr/src/misc/prtime.c126
-rw-r--r--pr/src/misc/prtpool.c18
-rw-r--r--pr/src/misc/prtrace.c118
-rw-r--r--pr/src/prvrsion.c2
-rw-r--r--pr/src/pthreads/ptio.c266
-rw-r--r--pr/src/pthreads/ptmisc.c4
-rw-r--r--pr/src/pthreads/ptsynch.c20
-rw-r--r--pr/src/pthreads/ptthread.c64
-rw-r--r--pr/src/threads/combined/prucpu.c8
-rw-r--r--pr/src/threads/combined/prucv.c20
-rw-r--r--pr/src/threads/combined/prulock.c24
-rw-r--r--pr/src/threads/combined/prustack.c2
-rw-r--r--pr/src/threads/combined/pruthr.c98
-rw-r--r--pr/src/threads/prcthr.c14
-rw-r--r--pr/src/threads/prdump.c4
-rw-r--r--pr/src/threads/prrwlock.c20
-rw-r--r--pr/src/threads/prsem.c26
-rw-r--r--pr/src/threads/prtpd.c24
-rw-r--r--pr/tests/accept.c62
-rw-r--r--pr/tests/acceptread.c8
-rw-r--r--pr/tests/acceptreademu.c12
-rw-r--r--pr/tests/addrstr.c12
-rw-r--r--pr/tests/affinity.c8
-rw-r--r--pr/tests/alarm.c50
-rw-r--r--pr/tests/anonfm.c38
-rw-r--r--pr/tests/atomic.c2
-rw-r--r--pr/tests/attach.c18
-rw-r--r--pr/tests/bigfile.c4
-rw-r--r--pr/tests/bug1test.c12
-rw-r--r--pr/tests/cleanup.c4
-rw-r--r--pr/tests/cltsrv.c30
-rw-r--r--pr/tests/concur.c4
-rw-r--r--pr/tests/cvar.c28
-rw-r--r--pr/tests/cvar2.c34
-rw-r--r--pr/tests/dbmalloc.c10
-rw-r--r--pr/tests/dbmalloc1.c6
-rw-r--r--pr/tests/dceemu.c22
-rw-r--r--pr/tests/depend.c4
-rw-r--r--pr/tests/dll/mygetval.c2
-rw-r--r--pr/tests/dlltest.c4
-rw-r--r--pr/tests/dtoa.c2
-rw-r--r--pr/tests/env.c6
-rw-r--r--pr/tests/exit.c4
-rw-r--r--pr/tests/fdcach.c16
-rw-r--r--pr/tests/fileio.c40
-rw-r--r--pr/tests/foreign.c40
-rw-r--r--pr/tests/forktest.c2
-rw-r--r--pr/tests/gethost.c2
-rw-r--r--pr/tests/i2l.c2
-rw-r--r--pr/tests/inrval.c10
-rw-r--r--pr/tests/instrumt.c80
-rw-r--r--pr/tests/intrupt.c2
-rw-r--r--pr/tests/io_timeout.c20
-rw-r--r--pr/tests/io_timeoutk.c20
-rw-r--r--pr/tests/io_timeoutu.c20
-rw-r--r--pr/tests/ioconthr.c2
-rw-r--r--pr/tests/join.c22
-rw-r--r--pr/tests/joinkk.c14
-rw-r--r--pr/tests/joinku.c18
-rw-r--r--pr/tests/joinuk.c16
-rw-r--r--pr/tests/joinuu.c16
-rw-r--r--pr/tests/layer.c4
-rw-r--r--pr/tests/lazyinit.c40
-rw-r--r--pr/tests/lltest.c236
-rw-r--r--pr/tests/lock.c20
-rw-r--r--pr/tests/lockfile.c14
-rw-r--r--pr/tests/logger.c6
-rw-r--r--pr/tests/many_cv.c4
-rw-r--r--pr/tests/mbcs.c26
-rw-r--r--pr/tests/nameshm1.c52
-rw-r--r--pr/tests/nbconn.c2
-rw-r--r--pr/tests/nblayer.c4
-rw-r--r--pr/tests/nonblock.c4
-rw-r--r--pr/tests/ntioto.c18
-rw-r--r--pr/tests/obsints.c2
-rw-r--r--pr/tests/op_2long.c8
-rw-r--r--pr/tests/op_excl.c4
-rw-r--r--pr/tests/op_filnf.c2
-rw-r--r--pr/tests/op_filok.c2
-rw-r--r--pr/tests/op_nofil.c2
-rw-r--r--pr/tests/openfile.c2
-rw-r--r--pr/tests/parent.c2
-rw-r--r--pr/tests/parsetm.c2
-rw-r--r--pr/tests/perf.c16
-rwxr-xr-xpr/tests/poll_er.c14
-rw-r--r--pr/tests/poll_nm.c34
-rw-r--r--pr/tests/poll_to.c14
-rw-r--r--pr/tests/prftest1.c8
-rw-r--r--pr/tests/prftest2.c2
-rw-r--r--pr/tests/provider.c36
-rw-r--r--pr/tests/prpollml.c4
-rw-r--r--pr/tests/prselect.c8
-rw-r--r--pr/tests/randseed.c14
-rw-r--r--pr/tests/ranfile.c8
-rw-r--r--pr/tests/rmdir.c8
-rw-r--r--pr/tests/rwlocktest.c12
-rw-r--r--pr/tests/sel_spd.c42
-rwxr-xr-xpr/tests/selct_er.c4
-rw-r--r--pr/tests/selct_nm.c4
-rw-r--r--pr/tests/selct_to.c4
-rw-r--r--pr/tests/select2.c16
-rw-r--r--pr/tests/sem.c24
-rw-r--r--pr/tests/semaerr1.c2
-rw-r--r--pr/tests/sendzlf.c2
-rw-r--r--pr/tests/server_test.c70
-rw-r--r--pr/tests/servr_kk.c60
-rw-r--r--pr/tests/servr_ku.c58
-rw-r--r--pr/tests/servr_uk.c60
-rw-r--r--pr/tests/servr_uu.c64
-rw-r--r--pr/tests/short_thread.c6
-rw-r--r--pr/tests/socket.c36
-rw-r--r--pr/tests/sockopt.c60
-rw-r--r--pr/tests/stack.c6
-rw-r--r--pr/tests/stat.c6
-rw-r--r--pr/tests/strod.c2
-rw-r--r--pr/tests/suspend.c6
-rw-r--r--pr/tests/switch.c2
-rw-r--r--pr/tests/testfile.c58
-rw-r--r--pr/tests/threads.c10
-rw-r--r--pr/tests/thrpool_client.c4
-rw-r--r--pr/tests/thrpool_server.c6
-rw-r--r--pr/tests/thruput.c4
-rw-r--r--pr/tests/time.c10
-rw-r--r--pr/tests/timemac.c2
-rw-r--r--pr/tests/timetest.c14
-rw-r--r--pr/tests/tmoacc.c4
-rw-r--r--pr/tests/tmocon.c4
-rw-r--r--pr/tests/tpd.c12
-rw-r--r--pr/tests/udpsrv.c92
-rw-r--r--pr/tests/version.c2
-rw-r--r--pr/tests/writev.c2
-rw-r--r--pr/tests/xnotify.c4
-rw-r--r--pr/tests/y2k.c40
-rw-r--r--pr/tests/y2ktmo.c4
-rw-r--r--pr/tests/yield.c2
-rw-r--r--pr/tests/zerolen.c2
-rw-r--r--tools/httpget.c2
277 files changed, 3738 insertions, 3738 deletions
diff --git a/config/libc_r.h b/config/libc_r.h
index 8f144e35..2af8f2ef 100644
--- a/config/libc_r.h
+++ b/config/libc_r.h
@@ -25,7 +25,7 @@
#define R_STRTOK_INIT_R() \
char *r_strtok_r=NULL
-#define R_STRTOK_R(return,source,delim) \
+#define R_STRTOK_R(return,source,delim) \
return=strtok_r(source,delim,&r_strtok_r)
#define R_STRTOK_NORET_R(source,delim) \
@@ -68,14 +68,14 @@
#define R_LOCALTIME_R(val) \
localtime_r(val,&r_localtime_r)
-
+
/***********/
/* crypt */
/***********/
#include <crypt.h>
#define R_CRYPT_INIT_R() \
CRYPTD r_cryptd_r; \
- bzero(&r_cryptd_r,sizeof(CRYPTD))
+ bzero(&r_cryptd_r,sizeof(CRYPTD))
#define R_CRYPT_R(pass,salt) \
crypt_r(pass,salt,&r_cryptd_r)
diff --git a/config/nsinstall.c b/config/nsinstall.c
index 478cd47b..48041ea2 100644
--- a/config/nsinstall.c
+++ b/config/nsinstall.c
@@ -39,7 +39,7 @@
#define GETCWD_CAN_MALLOC
#endif
-#if defined(LINUX) || defined(__GNU__) || defined(__GLIBC__)
+#if defined(LINUX) || defined(__GNU__) || defined(__GLIBC__)
#include <getopt.h>
#endif
@@ -69,7 +69,7 @@ mkdirs(char *path, mode_t mode)
char *cp;
struct stat sb;
int res;
-
+
while (*path == '/' && path[1] == '/')
path++;
for (cp = strrchr(path, '/'); cp && cp != path && cp[-1] == '/'; cp--)
diff --git a/lib/ds/plarena.c b/lib/ds/plarena.c
index a582ac63..e1edb134 100644
--- a/lib/ds/plarena.c
+++ b/lib/ds/plarena.c
@@ -74,15 +74,15 @@ PR_IMPLEMENT(void) PL_InitArenaPool(
/*
** PL_ArenaAllocate() -- allocate space from an arena pool
-**
+**
** Description: PL_ArenaAllocate() allocates space from an arena
-** pool.
+** pool.
**
** First, try to satisfy the request from arenas starting at
** pool->current. Then try to allocate a new arena from the heap.
**
** Returns: pointer to allocated space or NULL
-**
+**
** Notes: The original implementation had some difficult to
** solve bugs; the code was difficult to read. Sometimes it's
** just easier to rewrite it. I did that. larryh.
@@ -93,12 +93,12 @@ PR_IMPLEMENT(void) PL_InitArenaPool(
PR_IMPLEMENT(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb)
{
- PLArena *a;
+ PLArena *a;
char *rp; /* returned pointer */
PRUint32 nbOld;
PR_ASSERT((nb & pool->mask) == 0);
-
+
nbOld = nb;
nb = (PRUword)PL_ARENA_ALIGN(pool, nb); /* force alignment */
if (nb < nbOld)
@@ -117,8 +117,8 @@ PR_IMPLEMENT(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb)
} while( NULL != (a = a->next) );
}
- /* attempt to allocate from the heap */
- {
+ /* attempt to allocate from the heap */
+ {
PRUint32 sz = PR_MAX(pool->arenasize, nb);
if (PR_UINT32_MAX - sz < sizeof *a + pool->mask) {
a = NULL;
@@ -133,7 +133,7 @@ PR_IMPLEMENT(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb)
rp = (char *)a->avail;
a->avail += nb;
PR_ASSERT(a->avail <= a->limit);
- /* the newly allocated arena is linked after pool->current
+ /* the newly allocated arena is linked after pool->current
* and becomes pool->current */
a->next = pool->current->next;
pool->current->next = a;
diff --git a/lib/ds/plvrsion.c b/lib/ds/plvrsion.c
index 8bbf6765..1af25417 100644
--- a/lib/ds/plvrsion.c
+++ b/lib/ds/plvrsion.c
@@ -86,7 +86,7 @@ PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint()
* from being optimized away as unused variables.
*/
const char *dummy;
-
+
dummy = rcsid;
dummy = sccsid;
#endif
diff --git a/lib/libc/include/plbase64.h b/lib/libc/include/plbase64.h
index 7d17ea78..8f2117cc 100644
--- a/lib/libc/include/plbase64.h
+++ b/lib/libc/include/plbase64.h
@@ -19,11 +19,11 @@ PR_BEGIN_EXTERN_C
* is zero, the source data is assumed to be null-terminated, and PL_strlen
* is used to determine the source length. If the "dest" parameter is not
* null, it is assumed to point to a buffer of sufficient size (which may be
- * calculated: ((srclen + 2)/3)*4) into which the encoded data is placed
+ * calculated: ((srclen + 2)/3)*4) into which the encoded data is placed
* (without any termination). If the "dest" parameter is null, a buffer is
* allocated from the heap to hold the encoded data, and the result *will*
- * be terminated with an extra null character. It is the caller's
- * responsibility to free the result when it is allocated. A null is returned
+ * be terminated with an extra null character. It is the caller's
+ * responsibility to free the result when it is allocated. A null is returned
* if the allocation fails.
*
* NOTE: when calculating ((srclen + 2)/3)*4), first ensure that
@@ -56,7 +56,7 @@ PL_Base64Encode
* caller's responsibility to free the result when it is allocated. A null
* is retuned if the allocation fails, or if the source is not well-coded.
*
- * NOTE: when calculating (srclen * 3)/4, first ensure that
+ * NOTE: when calculating (srclen * 3)/4, first ensure that
* srclen <= PR_UINT32_MAX/3
* to avoid PRUint32 overflow. Alternatively, calculate
* (srclen/4) * 3 + ((srclen%4) * 3)/4
diff --git a/lib/libc/include/plgetopt.h b/lib/libc/include/plgetopt.h
index 19cafa60..87891e85 100644
--- a/lib/libc/include/plgetopt.h
+++ b/lib/libc/include/plgetopt.h
@@ -16,7 +16,7 @@
PR_BEGIN_EXTERN_C
-typedef struct PLOptionInternal PLOptionInternal;
+typedef struct PLOptionInternal PLOptionInternal;
typedef enum
{
@@ -47,26 +47,26 @@ typedef struct PLOptState
/*
* PL_CreateOptState
*
- * The argument "options" points to a string of single-character option
- * names. Option names that may have an option argument value must be
- * followed immediately by a ':' character.
+ * The argument "options" points to a string of single-character option
+ * names. Option names that may have an option argument value must be
+ * followed immediately by a ':' character.
*/
PR_EXTERN(PLOptState*) PL_CreateOptState(
PRIntn argc, char **argv, const char *options);
-/*
+/*
* PL_CreateLongOptState
*
- * Alternative to PL_CreateOptState.
- * Allows caller to specify BOTH a string of single-character option names,
- * AND an array of structures describing "long" (keyword) option names.
- * The array is terminated by a structure in which longOptName is NULL.
+ * Alternative to PL_CreateOptState.
+ * Allows caller to specify BOTH a string of single-character option names,
+ * AND an array of structures describing "long" (keyword) option names.
+ * The array is terminated by a structure in which longOptName is NULL.
* Long option values (arguments) may always be given as "--name=value".
- * If PLLongOpt.valueRequired is not PR_FALSE, and the option name was not
- * followed by '=' then the next argument from argv is taken as the value.
+ * If PLLongOpt.valueRequired is not PR_FALSE, and the option name was not
+ * followed by '=' then the next argument from argv is taken as the value.
*/
PR_EXTERN(PLOptState*) PL_CreateLongOptState(
- PRIntn argc, char **argv, const char *options,
+ PRIntn argc, char **argv, const char *options,
const PLLongOpt *longOpts);
/*
* PL_DestroyOptState
@@ -79,39 +79,39 @@ PR_EXTERN(void) PL_DestroyOptState(PLOptState *opt);
/*
* PL_GetNextOpt
*
- * When this function returns PL_OPT_OK,
- * - opt->option will hold the single-character option name that was parsed,
- * or zero.
- * When opt->option is zero, the token parsed was either a "long" (keyword)
- * option or a positional parameter.
- * For a positional parameter,
+ * When this function returns PL_OPT_OK,
+ * - opt->option will hold the single-character option name that was parsed,
+ * or zero.
+ * When opt->option is zero, the token parsed was either a "long" (keyword)
+ * option or a positional parameter.
+ * For a positional parameter,
* - opt->longOptIndex will contain -1, and
* - opt->value will point to the positional parameter string.
- * For a long option name,
- * - opt->longOptIndex will contain the non-negative index of the
- * PLLongOpt structure in the caller's array of PLLongOpt structures
- * corresponding to the long option name, and
- * For a single-character or long option,
+ * For a long option name,
+ * - opt->longOptIndex will contain the non-negative index of the
+ * PLLongOpt structure in the caller's array of PLLongOpt structures
+ * corresponding to the long option name, and
+ * For a single-character or long option,
* - opt->longOption will contain the value of the single-character option
* name, or the value of the longOption from the PLLongOpt structure
* for that long option. See notes below.
* - opt->value will point to the argument option string, or will
* be NULL if option does not require argument. If option requires
* argument but it is not provided, PL_OPT_BAD is returned.
- * When opt->option is non-zero,
+ * When opt->option is non-zero,
* - opt->longOptIndex will be -1
* When this function returns PL_OPT_EOL, or PL_OPT_BAD, the contents of
* opt are undefined.
*
- * Notes: It is possible to ignore opt->option, and always look at
+ * Notes: It is possible to ignore opt->option, and always look at
* opt->longOption instead. opt->longOption will contain the same value
* as opt->option for single-character option names, and will contain the
* value of longOption from the PLLongOpt structure for long option names.
- * This means that it is possible to equivalence long option names to
+ * This means that it is possible to equivalence long option names to
* single character names by giving the longOption in the PLLongOpt struct
- * the same value as the single-character option name.
+ * the same value as the single-character option name.
* For long options that are NOT intended to be equivalent to any single-
- * character option, the longOption value should be chosen to not match
+ * character option, the longOption value should be chosen to not match
* any possible single character name. It might be advisable to choose
* longOption values greater than 0xff for such long options.
*/
diff --git a/lib/libc/include/plstr.h b/lib/libc/include/plstr.h
index 57814c70..ea59832a 100644
--- a/lib/libc/include/plstr.h
+++ b/lib/libc/include/plstr.h
@@ -10,13 +10,13 @@
* plstr.h
*
* This header file exports the API to the NSPR portable library or string-
- * handling functions.
- *
- * This API was not designed as an "optimal" or "ideal" string library; it
+ * handling functions.
+ *
+ * This API was not designed as an "optimal" or "ideal" string library; it
* was based on the good ol' unix string.3 functions, and was written to
*
- * 1) replace the libc functions, for cross-platform consistency,
- * 2) complete the API on platforms lacking common functions (e.g.,
+ * 1) replace the libc functions, for cross-platform consistency,
+ * 2) complete the API on platforms lacking common functions (e.g.,
* strcase*), and
* 3) to implement some obvious "closure" functions that I've seen
* people hacking around in our code.
@@ -76,13 +76,13 @@ PL_strncpy(char *dest, const char *src, PRUint32 max);
/*
* PL_strncpyz
*
- * Copies the source string into the destination buffer, up to and including
- * the trailing '\0' or up but not including the max'th character, whichever
+ * Copies the source string into the destination buffer, up to and including
+ * the trailing '\0' or up but not including the max'th character, whichever
* comes first. It does not (can not) verify that the destination buffer is
* large enough. The destination string is always terminated with a '\0',
* unlike the traditional libc implementation. It returns the "dest" argument.
*
- * NOTE: If you call this with a source "abcdefg" and a max of 5, the
+ * NOTE: If you call this with a source "abcdefg" and a max of 5, the
* destination will end up with "abcd\0" (i.e., its strlen length will be 4)!
*
* This means you can do this:
@@ -152,7 +152,7 @@ PL_strcat(char *dst, const char *src);
* Appends a copy of the string pointed to by the second argument, up to
* the maximum size specified, to the end of the string pointed to by the
* first. The destination buffer is not (can not be) checked for sufficient
- * size. A null destination argument returns null; otherwise, the first
+ * size. A null destination argument returns null; otherwise, the first
* argument is returned. If the maximum size limits the copy, then the
* result will *not* be null-terminated (JLRU). A null destination
* returns null; otherwise, the destination argument is returned.
@@ -189,10 +189,10 @@ PL_strcmp(const char *a, const char *b);
/*
* PL_strncmp
- *
+ *
* Returns an integer, the sign of which -- positive, zero, or negative --
* reflects the lexical sorting order of the two strings indicated, up to
- * the maximum specified. The result is positive if the first string comes
+ * the maximum specified. The result is positive if the first string comes
* after the second. The NSPR implementation is not i18n. If the maximum
* is zero, only the existance or non-existance (pointer is null) of the
* strings is compared.
@@ -206,7 +206,7 @@ PL_strncmp(const char *a, const char *b, PRUint32 max);
*
* Returns an integer, the sign of which -- positive, zero or negative --
* reflects the case-insensitive lexical sorting order of the two strings
- * indicated. The result is positive if the first string comes after the
+ * indicated. The result is positive if the first string comes after the
* second. The NSPR implementation is not i18n.
*/
@@ -218,7 +218,7 @@ PL_strcasecmp(const char *a, const char *b);
*
* Returns an integer, the sign of which -- positive, zero or negative --
* reflects the case-insensitive lexical sorting order of the first n characters
- * of the two strings indicated. The result is positive if the first string comes
+ * of the two strings indicated. The result is positive if the first string comes
* after the second. The NSPR implementation is not i18n.
*/
@@ -249,7 +249,7 @@ PL_strrchr(const char *s, char c);
/*
* PL_strnchr
- *
+ *
* Returns a pointer to the first instance of the specified character within the
* first n characters of the provided string. It returns null if the character
* is not found, or if the provided string is null. The character may be the
@@ -386,7 +386,7 @@ PL_strcaserstr(const char *big, const char *little);
* PL_strncasestr
*
* Returns a pointer to the first instance of the little string within the first
- * n characters of the big one, ignoring case. It returns null if either string is
+ * n characters of the big one, ignoring case. It returns null if either string is
* null. It returns null if the length of the little string is greater than n.
*/
diff --git a/lib/libc/src/base64.c b/lib/libc/src/base64.c
index 07a4902f..fc1cc51e 100644
--- a/lib/libc/src/base64.c
+++ b/lib/libc/src/base64.c
@@ -100,8 +100,8 @@ encode
/*
* PL_Base64Encode
*
- * If the destination argument is NULL, a return buffer is
- * allocated, and the data therein will be null-terminated.
+ * If the destination argument is NULL, a return buffer is
+ * allocated, and the data therein will be null-terminated.
* If the destination argument is not NULL, it is assumed to
* be of sufficient size, and the contents will not be null-
* terminated by this routine.
@@ -341,8 +341,8 @@ decode
* If the destination argument is not null, it is assumed
* to be of sufficient size, and the data will not be null-
* terminated by this routine.
- *
- * Returns null if the allocation fails, or if the source string is
+ *
+ * Returns null if the allocation fails, or if the source string is
* not well-formed.
*/
diff --git a/lib/libc/src/plgetopt.c b/lib/libc/src/plgetopt.c
index 960decfe..264a88ae 100644
--- a/lib/libc/src/plgetopt.c
+++ b/lib/libc/src/plgetopt.c
@@ -45,20 +45,20 @@ PR_IMPLEMENT(PLOptState*) PL_CreateOptState(
} /* PL_CreateOptState */
PR_IMPLEMENT(PLOptState*) PL_CreateLongOptState(
- PRIntn argc, char **argv, const char *options,
+ PRIntn argc, char **argv, const char *options,
const PLLongOpt *longOpts)
{
PLOptState *opt = NULL;
PLOptionInternal *internal;
- if (NULL == options)
+ if (NULL == options)
{
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
return opt;
}
opt = PR_NEWZAP(PLOptState);
- if (NULL == opt)
+ if (NULL == opt)
{
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
return opt;
@@ -124,15 +124,15 @@ PR_IMPLEMENT(PLOptStatus) PL_GetNextOpt(PLOptState *opt)
}
internal->xargv = internal->argv[internal->xargc];
internal->minus = 0;
- if (!internal->endOfOpts && ('-' == *internal->xargv))
+ if (!internal->endOfOpts && ('-' == *internal->xargv))
{
internal->minus++;
internal->xargv++; /* and consume */
- if ('-' == *internal->xargv && internal->longOpts)
+ if ('-' == *internal->xargv && internal->longOpts)
{
internal->minus++;
internal->xargv++;
- if (0 == *internal->xargv)
+ if (0 == *internal->xargv)
{
internal->endOfOpts = PR_TRUE;
}
@@ -145,7 +145,7 @@ PR_IMPLEMENT(PLOptStatus) PL_GetNextOpt(PLOptState *opt)
** option. See if we can find a match in the list of possible
** options supplied.
*/
- if (internal->minus == 2)
+ if (internal->minus == 2)
{
char * foundEqual = strchr(internal->xargv,'=');
PRIntn optNameLen = foundEqual ? (foundEqual - internal->xargv) :
@@ -156,7 +156,7 @@ PR_IMPLEMENT(PLOptStatus) PL_GetNextOpt(PLOptState *opt)
opt->option = 0;
opt->value = NULL;
- for (; longOpt->longOptName; ++longOpt)
+ for (; longOpt->longOptName; ++longOpt)
{
if (strncmp(longOpt->longOptName, internal->xargv, optNameLen))
continue; /* not a possible match */
@@ -168,7 +168,7 @@ PR_IMPLEMENT(PLOptStatus) PL_GetNextOpt(PLOptState *opt)
/* value is part of the current argv[] element if = was found */
/* note: this sets value even for long options that do not
* require option if specified as --long=value */
- if (foundEqual)
+ if (foundEqual)
{
opt->value = foundEqual + 1;
}
@@ -227,8 +227,8 @@ PR_IMPLEMENT(PLOptStatus) PL_GetNextOpt(PLOptState *opt)
internal->xargv = &static_Nul;
internal->minus = 0;
}
- else
- opt->value = NULL;
+ else
+ opt->value = NULL;
return PL_OPT_OK;
}
}
diff --git a/lib/libc/src/plvrsion.c b/lib/libc/src/plvrsion.c
index f2b6278b..1831f504 100644
--- a/lib/libc/src/plvrsion.c
+++ b/lib/libc/src/plvrsion.c
@@ -86,7 +86,7 @@ PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint()
* from being optimized away as unused variables.
*/
const char *dummy;
-
+
dummy = rcsid;
dummy = sccsid;
#endif
diff --git a/lib/libc/src/strcpy.c b/lib/libc/src/strcpy.c
index 9d319aa1..62f11a15 100644
--- a/lib/libc/src/strcpy.c
+++ b/lib/libc/src/strcpy.c
@@ -18,7 +18,7 @@ PR_IMPLEMENT(char *)
PL_strncpy(char *dest, const char *src, PRUint32 max)
{
char *rv;
-
+
if( (char *)0 == dest ) return (char *)0;
if( (const char *)0 == src ) return (char *)0;
@@ -38,7 +38,7 @@ PR_IMPLEMENT(char *)
PL_strncpyz(char *dest, const char *src, PRUint32 max)
{
char *rv;
-
+
if( (char *)0 == dest ) return (char *)0;
if( (const char *)0 == src ) return (char *)0;
if( 0 == max ) return (char *)0;
diff --git a/lib/libc/src/strlen.c b/lib/libc/src/strlen.c
index ba6c612d..ffcf5eed 100644
--- a/lib/libc/src/strlen.c
+++ b/lib/libc/src/strlen.c
@@ -19,7 +19,7 @@ PL_strlen(const char *str)
/* error checking in case we have a 64-bit platform -- make sure
* we don't have ultra long strings that overflow an int32
- */
+ */
if( sizeof(PRUint32) < sizeof(size_t) )
{
if( l > PR_INT32_MAX )
diff --git a/lib/libc/src/strtok.c b/lib/libc/src/strtok.c
index 2daaea36..b23b2c5c 100644
--- a/lib/libc/src/strtok.c
+++ b/lib/libc/src/strtok.c
@@ -19,7 +19,7 @@ PL_strtok_r(char *s1, const char *s2, char **lasts)
s1 = *lasts;
}
-
+
for( ; (c = *s1) != 0; s1++ )
{
for( sepp = s2 ; (sc = *sepp) != 0 ; sepp++ )
@@ -28,7 +28,7 @@ PL_strtok_r(char *s1, const char *s2, char **lasts)
break;
}
if( sc == 0 )
- break;
+ break;
}
if( c == 0 )
@@ -36,7 +36,7 @@ PL_strtok_r(char *s1, const char *s2, char **lasts)
*lasts = NULL;
return NULL;
}
-
+
tok = s1++;
for( ; (c = *s1) != 0; s1++ )
diff --git a/lib/prstreams/plvrsion.c b/lib/prstreams/plvrsion.c
index 4832e708..bb32e88d 100644
--- a/lib/prstreams/plvrsion.c
+++ b/lib/prstreams/plvrsion.c
@@ -86,7 +86,7 @@ PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint()
* from being optimized away as unused variables.
*/
const char *dummy;
-
+
dummy = rcsid;
dummy = sccsid;
#endif
diff --git a/lib/prstreams/tests/testprstrm/testprstrm.cpp b/lib/prstreams/tests/testprstrm/testprstrm.cpp
index 12011c8a..8ab455b5 100644
--- a/lib/prstreams/tests/testprstrm/testprstrm.cpp
+++ b/lib/prstreams/tests/testprstrm/testprstrm.cpp
@@ -28,7 +28,7 @@ typedef struct threadarg {
void threadwork(threadarg *arg);
-void
+void
threadmain(void *mytag)
{
threadarg arg;
@@ -143,22 +143,22 @@ main()
{
PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 256);
threadmain(const_cast<char *>("TestFile"));
- PRThread *thr1 = PR_CreateThread(PR_SYSTEM_THREAD,
- threadmain,
+ PRThread *thr1 = PR_CreateThread(PR_SYSTEM_THREAD,
+ threadmain,
const_cast<char *>("TestFile1"),
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_JOINABLE_THREAD,
STACKSIZE);
- PRThread *thr2 = PR_CreateThread(PR_SYSTEM_THREAD,
- threadmain,
+ PRThread *thr2 = PR_CreateThread(PR_SYSTEM_THREAD,
+ threadmain,
const_cast<char *>("TestFile2"),
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_JOINABLE_THREAD,
STACKSIZE);
- PRThread *thr3 = PR_CreateThread(PR_SYSTEM_THREAD,
- threadmain,
+ PRThread *thr3 = PR_CreateThread(PR_SYSTEM_THREAD,
+ threadmain,
const_cast<char *>("TestFile3"),
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
diff --git a/lib/tests/arena.c b/lib/tests/arena.c
index e82e4f8b..b74db893 100644
--- a/lib/tests/arena.c
+++ b/lib/tests/arena.c
@@ -46,13 +46,13 @@ static void ArenaAllocate( void )
PRInt32 i;
PL_InitArenaPool( &ap, "AllocArena", 2048, sizeof(double));
- PR_LOG( tLM, PR_LOG_DEBUG, ("AA, InitPool -- Pool: %p. first: %p, current: %p, size: %d",
+ PR_LOG( tLM, PR_LOG_DEBUG, ("AA, InitPool -- Pool: %p. first: %p, current: %p, size: %d",
&ap, ap.first, ap.current, ap.arenasize ));
for( i = 0; i < 150; i++ )
{
PL_ARENA_ALLOCATE( ptr, &ap, 512 );
- PR_LOG( tLM, PR_LOG_DEBUG,("AA, after alloc -- Pool: %p. first: %p, current: %p, size: %d",
+ PR_LOG( tLM, PR_LOG_DEBUG,("AA, after alloc -- Pool: %p. first: %p, current: %p, size: %d",
&ap, ap.first, ap.current, ap.arenasize ));
PR_LOG( tLM, PR_LOG_DEBUG,(
"AA -- Pool: %p. alloc: %p ", &ap, ptr ));
@@ -63,14 +63,14 @@ static void ArenaAllocate( void )
for( i = 0; i < 221; i++ )
{
PL_ARENA_ALLOCATE( ptr, &ap, 512 );
- PR_LOG( tLM, PR_LOG_DEBUG,("AA, after alloc -- Pool: %p. first: %p, current: %p, size: %d",
+ PR_LOG( tLM, PR_LOG_DEBUG,("AA, after alloc -- Pool: %p. first: %p, current: %p, size: %d",
&ap, ap.first, ap.current, ap.arenasize ));
PR_LOG( tLM, PR_LOG_DEBUG,(
"AA -- Pool: %p. alloc: %p ", &ap, ptr ));
}
PL_FreeArenaPool( &ap );
-
+
return;
} /* end ArenaGrow() */
/*
@@ -111,20 +111,20 @@ static void MarkAndRelease( void )
PL_InitArenaPool( &ap, "TheArena", 4096, sizeof(double));
mark0 = PL_ARENA_MARK( &ap );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("mark0. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p, m0: %p",
+ ("mark0. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p, m0: %p",
&ap, ap.first.next, ap.current, ap.arenasize, ptr, mark0 ));
for( i = 0; i < 201; i++ )
{
PL_ARENA_ALLOCATE( ptr, &ap, 512 );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("mr. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
+ ("mr. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
&ap, ap.first.next, ap.current, ap.arenasize, ptr ));
}
mark1 = PL_ARENA_MARK( &ap );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("mark1. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p, m1: %p",
+ ("mark1. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p, m1: %p",
&ap, ap.first.next, ap.current, ap.arenasize, ptr, mark1 ));
@@ -132,48 +132,48 @@ static void MarkAndRelease( void )
{
PL_ARENA_ALLOCATE( ptr, &ap, 512 );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("mr. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
+ ("mr. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
&ap, ap.first.next, ap.current, ap.arenasize, ptr ));
}
PL_ARENA_RELEASE( &ap, mark1 );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("Release-1: %p -- Pool: %p. first: %p, current: %p, size: %d",
+ ("Release-1: %p -- Pool: %p. first: %p, current: %p, size: %d",
mark1, &ap, ap.first, ap.current, ap.arenasize ));
for( i = 0; i < 20; i++ )
{
PL_ARENA_ALLOCATE( ptr, &ap, 512 );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("mr. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
+ ("mr. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
&ap, ap.first.next, ap.current, ap.arenasize, ptr ));
}
PL_ARENA_RELEASE( &ap, mark1 );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("Release-1. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
+ ("Release-1. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
&ap, ap.first.next, ap.current, ap.arenasize, ptr ));
PL_ARENA_RELEASE( &ap, mark0 );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("Release-0. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
+ ("Release-0. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
&ap, ap.first.next, ap.current, ap.arenasize, ptr ));
PL_FreeArenaPool( &ap );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("Free. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
+ ("Free. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
&ap, ap.first.next, ap.current, ap.arenasize, ptr ));
-
+
PL_FinishArenaPool( &ap );
PR_LOG( tLM, PR_LOG_DEBUG,
- ("Finish. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
+ ("Finish. ap: %p, ap.f: %p, ap.c: %p, ap.siz: %d, alloc: %p",
&ap, ap.first.next, ap.current, ap.arenasize, ptr ));
return;
} /* end MarkAndRelease() */
/*
-** RandSize() returns a random number in the range
+** RandSize() returns a random number in the range
** min..max, rounded to the next doubleword
**
*/
@@ -230,15 +230,15 @@ static void PR_CALLBACK StressThread( void *arg )
PR_EnterMonitor(tMon);
threadCount--;
PR_Notify(tMon);
- PR_ExitMonitor(tMon);
+ PR_ExitMonitor(tMon);
return;
-}
+}
/*
** Stress()
** Flog the hell out of arenas multi-threaded.
** Do NOT pass an individual arena to another thread.
-**
+**
*/
static void Stress( void )
{
@@ -263,7 +263,7 @@ static void Stress( void )
/* Wait for all threads to exit */
PR_EnterMonitor(tMon);
- while ( threadCount != 0 )
+ while ( threadCount != 0 )
{
PR_Wait(tMon, PR_INTERVAL_NO_TIMEOUT);
}
@@ -286,7 +286,7 @@ static PRIntn EvaluateResults(void)
{
PR_LOG( tLM, PR_LOG_DEBUG, ("FAIL\n"));
rc =1;
- }
+ }
else
{
PR_LOG( tLM, PR_LOG_DEBUG, ("PASS\n"));
@@ -308,7 +308,7 @@ void Help( void )
printf("-d enable debug mode\n");
printf("\n");
exit(1);
-}
+}
PRIntn main(PRIntn argc, char *argv[])
{
diff --git a/lib/tests/base64t.c b/lib/tests/base64t.c
index d225c657..2a6e3eb2 100644
--- a/lib/tests/base64t.c
+++ b/lib/tests/base64t.c
@@ -1032,755 +1032,755 @@ PRBool test_003(void)
{ "zoo", "em9v" },
{ "z's", "eidz" },
/* the false rumors file */
- { "\"So when I die, the first thing I will see in heaven is a score list?\"",
+ { "\"So when I die, the first thing I will see in heaven is a score list?\"",
"IlNvIHdoZW4gSSBkaWUsIHRoZSBmaXJzdCB0aGluZyBJIHdpbGwgc2VlIGluIGhlYXZlbiBpcyBhIHNjb3JlIGxpc3Q/Ig==" },
- { "1st Law of Hacking: leaving is much more difficult than entering.",
+ { "1st Law of Hacking: leaving is much more difficult than entering.",
"MXN0IExhdyBvZiBIYWNraW5nOiBsZWF2aW5nIGlzIG11Y2ggbW9yZSBkaWZmaWN1bHQgdGhhbiBlbnRlcmluZy4=" },
- { "2nd Law of Hacking: first in, first out.",
+ { "2nd Law of Hacking: first in, first out.",
"Mm5kIExhdyBvZiBIYWNraW5nOiBmaXJzdCBpbiwgZmlyc3Qgb3V0Lg==" },
- { "3rd Law of Hacking: the last blow counts most.",
+ { "3rd Law of Hacking: the last blow counts most.",
"M3JkIExhdyBvZiBIYWNraW5nOiB0aGUgbGFzdCBibG93IGNvdW50cyBtb3N0Lg==" },
- { "4th Law of Hacking: you will find the exit at the entrance.",
+ { "4th Law of Hacking: you will find the exit at the entrance.",
"NHRoIExhdyBvZiBIYWNraW5nOiB5b3Ugd2lsbCBmaW5kIHRoZSBleGl0IGF0IHRoZSBlbnRyYW5jZS4=" },
- { "A chameleon imitating a mail daemon often delivers scrolls of fire.",
+ { "A chameleon imitating a mail daemon often delivers scrolls of fire.",
"QSBjaGFtZWxlb24gaW1pdGF0aW5nIGEgbWFpbCBkYWVtb24gb2Z0ZW4gZGVsaXZlcnMgc2Nyb2xscyBvZiBmaXJlLg==" },
- { "A cockatrice corpse is guaranteed to be untainted!",
+ { "A cockatrice corpse is guaranteed to be untainted!",
"QSBjb2NrYXRyaWNlIGNvcnBzZSBpcyBndWFyYW50ZWVkIHRvIGJlIHVudGFpbnRlZCE=" },
- { "A dead cockatrice is just a dead lizard.",
+ { "A dead cockatrice is just a dead lizard.",
"QSBkZWFkIGNvY2thdHJpY2UgaXMganVzdCBhIGRlYWQgbGl6YXJkLg==" },
- { "A dragon is just a snake that ate a scroll of fire.",
+ { "A dragon is just a snake that ate a scroll of fire.",
"QSBkcmFnb24gaXMganVzdCBhIHNuYWtlIHRoYXQgYXRlIGEgc2Nyb2xsIG9mIGZpcmUu" },
- { "A fading corridor enlightens your insight.",
+ { "A fading corridor enlightens your insight.",
"QSBmYWRpbmcgY29ycmlkb3IgZW5saWdodGVucyB5b3VyIGluc2lnaHQu" },
- { "A glowing potion is too hot to drink.",
+ { "A glowing potion is too hot to drink.",
"QSBnbG93aW5nIHBvdGlvbiBpcyB0b28gaG90IHRvIGRyaW5rLg==" },
- { "A good amulet may protect you against guards.",
+ { "A good amulet may protect you against guards.",
"QSBnb29kIGFtdWxldCBtYXkgcHJvdGVjdCB5b3UgYWdhaW5zdCBndWFyZHMu" },
- { "A lizard corpse is a good thing to turn undead.",
+ { "A lizard corpse is a good thing to turn undead.",
"QSBsaXphcmQgY29ycHNlIGlzIGEgZ29vZCB0aGluZyB0byB0dXJuIHVuZGVhZC4=" },
- { "A long worm can be defined recursively. So how should you attack it?",
+ { "A long worm can be defined recursively. So how should you attack it?",
"QSBsb25nIHdvcm0gY2FuIGJlIGRlZmluZWQgcmVjdXJzaXZlbHkuIFNvIGhvdyBzaG91bGQgeW91IGF0dGFjayBpdD8=" },
- { "A monstrous mind is a toy forever.",
+ { "A monstrous mind is a toy forever.",
"QSBtb25zdHJvdXMgbWluZCBpcyBhIHRveSBmb3JldmVyLg==" },
- { "A nymph will be very pleased if you call her by her real name: Lorelei.",
+ { "A nymph will be very pleased if you call her by her real name: Lorelei.",
"QSBueW1waCB3aWxsIGJlIHZlcnkgcGxlYXNlZCBpZiB5b3UgY2FsbCBoZXIgYnkgaGVyIHJlYWwgbmFtZTogTG9yZWxlaS4=" },
- { "A ring of dungeon master control is a great find.",
+ { "A ring of dungeon master control is a great find.",
"QSByaW5nIG9mIGR1bmdlb24gbWFzdGVyIGNvbnRyb2wgaXMgYSBncmVhdCBmaW5kLg==" },
- { "A ring of extra ring finger is useless if not enchanted.",
+ { "A ring of extra ring finger is useless if not enchanted.",
"QSByaW5nIG9mIGV4dHJhIHJpbmcgZmluZ2VyIGlzIHVzZWxlc3MgaWYgbm90IGVuY2hhbnRlZC4=" },
- { "A rope may form a trail in a maze.",
+ { "A rope may form a trail in a maze.",
"QSByb3BlIG1heSBmb3JtIGEgdHJhaWwgaW4gYSBtYXplLg==" },
- { "A staff may recharge if you drop it for awhile.",
+ { "A staff may recharge if you drop it for awhile.",
"QSBzdGFmZiBtYXkgcmVjaGFyZ2UgaWYgeW91IGRyb3AgaXQgZm9yIGF3aGlsZS4=" },
- { "A visit to the Zoo is very educational; you meet interesting animals.",
+ { "A visit to the Zoo is very educational; you meet interesting animals.",
"QSB2aXNpdCB0byB0aGUgWm9vIGlzIHZlcnkgZWR1Y2F0aW9uYWw7IHlvdSBtZWV0IGludGVyZXN0aW5nIGFuaW1hbHMu" },
- { "A wand of deaf is a more dangerous weapon than a wand of sheep.",
+ { "A wand of deaf is a more dangerous weapon than a wand of sheep.",
"QSB3YW5kIG9mIGRlYWYgaXMgYSBtb3JlIGRhbmdlcm91cyB3ZWFwb24gdGhhbiBhIHdhbmQgb2Ygc2hlZXAu" },
- { "A wand of vibration might bring the whole cave crashing about your ears.",
+ { "A wand of vibration might bring the whole cave crashing about your ears.",
"QSB3YW5kIG9mIHZpYnJhdGlvbiBtaWdodCBicmluZyB0aGUgd2hvbGUgY2F2ZSBjcmFzaGluZyBhYm91dCB5b3VyIGVhcnMu" },
- { "A winner never quits. A quitter never wins.",
+ { "A winner never quits. A quitter never wins.",
"QSB3aW5uZXIgbmV2ZXIgcXVpdHMuIEEgcXVpdHRlciBuZXZlciB3aW5zLg==" },
- { "A wish? Okay, make me a fortune cookie!",
+ { "A wish? Okay, make me a fortune cookie!",
"QSB3aXNoPyBPa2F5LCBtYWtlIG1lIGEgZm9ydHVuZSBjb29raWUh" },
- { "Afraid of mimics? Try to wear a ring of true seeing.",
+ { "Afraid of mimics? Try to wear a ring of true seeing.",
"QWZyYWlkIG9mIG1pbWljcz8gVHJ5IHRvIHdlYXIgYSByaW5nIG9mIHRydWUgc2VlaW5nLg==" },
- { "All monsters are created evil, but some are more evil than others.",
+ { "All monsters are created evil, but some are more evil than others.",
"QWxsIG1vbnN0ZXJzIGFyZSBjcmVhdGVkIGV2aWwsIGJ1dCBzb21lIGFyZSBtb3JlIGV2aWwgdGhhbiBvdGhlcnMu" },
- { "Always attack a floating eye from behind!",
+ { "Always attack a floating eye from behind!",
"QWx3YXlzIGF0dGFjayBhIGZsb2F0aW5nIGV5ZSBmcm9tIGJlaGluZCE=" },
- { "An elven cloak is always the height of fashion.",
+ { "An elven cloak is always the height of fashion.",
"QW4gZWx2ZW4gY2xvYWsgaXMgYWx3YXlzIHRoZSBoZWlnaHQgb2YgZmFzaGlvbi4=" },
- { "Any small object that is accidentally dropped will hide under a larger object.",
+ { "Any small object that is accidentally dropped will hide under a larger object.",
"QW55IHNtYWxsIG9iamVjdCB0aGF0IGlzIGFjY2lkZW50YWxseSBkcm9wcGVkIHdpbGwgaGlkZSB1bmRlciBhIGxhcmdlciBvYmplY3Qu" },
- { "Balrogs do not appear above level 20.",
+ { "Balrogs do not appear above level 20.",
"QmFscm9ncyBkbyBub3QgYXBwZWFyIGFib3ZlIGxldmVsIDIwLg==" },
- { "Banana peels work especially well against Keystone Kops.",
+ { "Banana peels work especially well against Keystone Kops.",
"QmFuYW5hIHBlZWxzIHdvcmsgZXNwZWNpYWxseSB3ZWxsIGFnYWluc3QgS2V5c3RvbmUgS29wcy4=" },
- { "Be careful when eating bananas. Monsters might slip on the peels.",
+ { "Be careful when eating bananas. Monsters might slip on the peels.",
"QmUgY2FyZWZ1bCB3aGVuIGVhdGluZyBiYW5hbmFzLiBNb25zdGVycyBtaWdodCBzbGlwIG9uIHRoZSBwZWVscy4=" },
- { "Better leave the dungeon; otherwise you might get hurt badly.",
+ { "Better leave the dungeon; otherwise you might get hurt badly.",
"QmV0dGVyIGxlYXZlIHRoZSBkdW5nZW9uOyBvdGhlcndpc2UgeW91IG1pZ2h0IGdldCBodXJ0IGJhZGx5Lg==" },
- { "Beware of the potion of nitroglycerin -- it's not for the weak of heart.",
+ { "Beware of the potion of nitroglycerin -- it's not for the weak of heart.",
"QmV3YXJlIG9mIHRoZSBwb3Rpb24gb2Ygbml0cm9nbHljZXJpbiAtLSBpdCdzIG5vdCBmb3IgdGhlIHdlYWsgb2YgaGVhcnQu" },
- { "Beware: there's always a chance that your wand explodes as you try to zap it!",
+ { "Beware: there's always a chance that your wand explodes as you try to zap it!",
"QmV3YXJlOiB0aGVyZSdzIGFsd2F5cyBhIGNoYW5jZSB0aGF0IHlvdXIgd2FuZCBleHBsb2RlcyBhcyB5b3UgdHJ5IHRvIHphcCBpdCE=" },
- { "Beyond the 23rd level lies a happy retirement in a room of your own.",
+ { "Beyond the 23rd level lies a happy retirement in a room of your own.",
"QmV5b25kIHRoZSAyM3JkIGxldmVsIGxpZXMgYSBoYXBweSByZXRpcmVtZW50IGluIGEgcm9vbSBvZiB5b3VyIG93bi4=" },
- { "Changing your suit without dropping your sword? You must be kidding!",
+ { "Changing your suit without dropping your sword? You must be kidding!",
"Q2hhbmdpbmcgeW91ciBzdWl0IHdpdGhvdXQgZHJvcHBpbmcgeW91ciBzd29yZD8gWW91IG11c3QgYmUga2lkZGluZyE=" },
- { "Cockatrices might turn themselves to stone faced with a mirror.",
+ { "Cockatrices might turn themselves to stone faced with a mirror.",
"Q29ja2F0cmljZXMgbWlnaHQgdHVybiB0aGVtc2VsdmVzIHRvIHN0b25lIGZhY2VkIHdpdGggYSBtaXJyb3Iu" },
- { "Consumption of home-made food is strictly forbidden in this dungeon.",
+ { "Consumption of home-made food is strictly forbidden in this dungeon.",
"Q29uc3VtcHRpb24gb2YgaG9tZS1tYWRlIGZvb2QgaXMgc3RyaWN0bHkgZm9yYmlkZGVuIGluIHRoaXMgZHVuZ2Vvbi4=" },
- { "Dark room? Your chance to develop your photographs!",
+ { "Dark room? Your chance to develop your photographs!",
"RGFyayByb29tPyBZb3VyIGNoYW5jZSB0byBkZXZlbG9wIHlvdXIgcGhvdG9ncmFwaHMh" },
- { "Dark rooms are not *completely* dark: just wait and let your eyes adjust...",
+ { "Dark rooms are not *completely* dark: just wait and let your eyes adjust...",
"RGFyayByb29tcyBhcmUgbm90ICpjb21wbGV0ZWx5KiBkYXJrOiBqdXN0IHdhaXQgYW5kIGxldCB5b3VyIGV5ZXMgYWRqdXN0Li4u" },
- { "David London sez, \"Hey guys, *WIELD* a lizard corpse against a cockatrice!\"",
+ { "David London sez, \"Hey guys, *WIELD* a lizard corpse against a cockatrice!\"",
"RGF2aWQgTG9uZG9uIHNleiwgIkhleSBndXlzLCAqV0lFTEQqIGEgbGl6YXJkIGNvcnBzZSBhZ2FpbnN0IGEgY29ja2F0cmljZSEi" },
- { "Death is just life's way of telling you you've been fired.",
+ { "Death is just life's way of telling you you've been fired.",
"RGVhdGggaXMganVzdCBsaWZlJ3Mgd2F5IG9mIHRlbGxpbmcgeW91IHlvdSd2ZSBiZWVuIGZpcmVkLg==" },
- { "Demi-gods don't need any help from the gods.",
+ { "Demi-gods don't need any help from the gods.",
"RGVtaS1nb2RzIGRvbid0IG5lZWQgYW55IGhlbHAgZnJvbSB0aGUgZ29kcy4=" },
- { "Demons *HATE* Priests and Priestesses.",
+ { "Demons *HATE* Priests and Priestesses.",
"RGVtb25zICpIQVRFKiBQcmllc3RzIGFuZCBQcmllc3Rlc3Nlcy4=" },
- { "Didn't you forget to pay?",
+ { "Didn't you forget to pay?",
"RGlkbid0IHlvdSBmb3JnZXQgdG8gcGF5Pw==" },
- { "Didn't your mother tell you not to eat food off the floor?",
+ { "Didn't your mother tell you not to eat food off the floor?",
"RGlkbid0IHlvdXIgbW90aGVyIHRlbGwgeW91IG5vdCB0byBlYXQgZm9vZCBvZmYgdGhlIGZsb29yPw==" },
- { "Direct a direct hit on your direct opponent, directing in the right direction.",
+ { "Direct a direct hit on your direct opponent, directing in the right direction.",
"RGlyZWN0IGEgZGlyZWN0IGhpdCBvbiB5b3VyIGRpcmVjdCBvcHBvbmVudCwgZGlyZWN0aW5nIGluIHRoZSByaWdodCBkaXJlY3Rpb24u" },
- { "Do you want to make more money? Sure, we all do! Join the Fort Ludios guard!",
+ { "Do you want to make more money? Sure, we all do! Join the Fort Ludios guard!",
"RG8geW91IHdhbnQgdG8gbWFrZSBtb3JlIG1vbmV5PyBTdXJlLCB3ZSBhbGwgZG8hIEpvaW4gdGhlIEZvcnQgTHVkaW9zIGd1YXJkIQ==" },
- { "Don't eat too much: you might start hiccoughing!",
+ { "Don't eat too much: you might start hiccoughing!",
"RG9uJ3QgZWF0IHRvbyBtdWNoOiB5b3UgbWlnaHQgc3RhcnQgaGljY291Z2hpbmch" },
- { "Don't play hack at your work; your boss might hit you!",
+ { "Don't play hack at your work; your boss might hit you!",
"RG9uJ3QgcGxheSBoYWNrIGF0IHlvdXIgd29yazsgeW91ciBib3NzIG1pZ2h0IGhpdCB5b3Uh" },
- { "Don't tell a soul you found a secret door, otherwise it isn't a secret anymore.",
+ { "Don't tell a soul you found a secret door, otherwise it isn't a secret anymore.",
"RG9uJ3QgdGVsbCBhIHNvdWwgeW91IGZvdW5kIGEgc2VjcmV0IGRvb3IsIG90aGVyd2lzZSBpdCBpc24ndCBhIHNlY3JldCBhbnltb3JlLg==" },
- { "Drinking potions of booze may land you in jail if you are under 21.",
+ { "Drinking potions of booze may land you in jail if you are under 21.",
"RHJpbmtpbmcgcG90aW9ucyBvZiBib296ZSBtYXkgbGFuZCB5b3UgaW4gamFpbCBpZiB5b3UgYXJlIHVuZGVyIDIxLg==" },
- { "Drop your vanity and get rid of your jewels! Pickpockets about!",
+ { "Drop your vanity and get rid of your jewels! Pickpockets about!",
"RHJvcCB5b3VyIHZhbml0eSBhbmQgZ2V0IHJpZCBvZiB5b3VyIGpld2VscyEgUGlja3BvY2tldHMgYWJvdXQh" },
- { "Eat 10 cloves of garlic and keep all humans at a two-square distance.",
+ { "Eat 10 cloves of garlic and keep all humans at a two-square distance.",
"RWF0IDEwIGNsb3ZlcyBvZiBnYXJsaWMgYW5kIGtlZXAgYWxsIGh1bWFucyBhdCBhIHR3by1zcXVhcmUgZGlzdGFuY2Uu" },
- { "Eels hide under mud. Use a unicorn to clear the water and make them visible.",
+ { "Eels hide under mud. Use a unicorn to clear the water and make them visible.",
"RWVscyBoaWRlIHVuZGVyIG11ZC4gVXNlIGEgdW5pY29ybiB0byBjbGVhciB0aGUgd2F0ZXIgYW5kIG1ha2UgdGhlbSB2aXNpYmxlLg==" },
- { "Engrave your wishes with a wand of wishing.",
+ { "Engrave your wishes with a wand of wishing.",
"RW5ncmF2ZSB5b3VyIHdpc2hlcyB3aXRoIGEgd2FuZCBvZiB3aXNoaW5nLg==" },
- { "Eventually you will come to admire the swift elegance of a retreating nymph.",
+ { "Eventually you will come to admire the swift elegance of a retreating nymph.",
"RXZlbnR1YWxseSB5b3Ugd2lsbCBjb21lIHRvIGFkbWlyZSB0aGUgc3dpZnQgZWxlZ2FuY2Ugb2YgYSByZXRyZWF0aW5nIG55bXBoLg==" },
- { "Ever heard hissing outside? I *knew* you hadn't!",
+ { "Ever heard hissing outside? I *knew* you hadn't!",
"RXZlciBoZWFyZCBoaXNzaW5nIG91dHNpZGU/IEkgKmtuZXcqIHlvdSBoYWRuJ3Qh" },
- { "Ever lifted a dragon corpse?",
+ { "Ever lifted a dragon corpse?",
"RXZlciBsaWZ0ZWQgYSBkcmFnb24gY29ycHNlPw==" },
- { "Ever seen a leocrotta dancing the tengu?",
+ { "Ever seen a leocrotta dancing the tengu?",
"RXZlciBzZWVuIGEgbGVvY3JvdHRhIGRhbmNpbmcgdGhlIHRlbmd1Pw==" },
- { "Ever seen your weapon glow plaid?",
+ { "Ever seen your weapon glow plaid?",
"RXZlciBzZWVuIHlvdXIgd2VhcG9uIGdsb3cgcGxhaWQ/" },
- { "Ever tamed a shopkeeper?",
+ { "Ever tamed a shopkeeper?",
"RXZlciB0YW1lZCBhIHNob3BrZWVwZXI/" },
- { "Ever tried digging through a Vault Guard?",
+ { "Ever tried digging through a Vault Guard?",
"RXZlciB0cmllZCBkaWdnaW5nIHRocm91Z2ggYSBWYXVsdCBHdWFyZD8=" },
- { "Ever tried enchanting a rope?",
+ { "Ever tried enchanting a rope?",
"RXZlciB0cmllZCBlbmNoYW50aW5nIGEgcm9wZT8=" },
- { "Floating eyes can't stand Hawaiian shirts.",
+ { "Floating eyes can't stand Hawaiian shirts.",
"RmxvYXRpbmcgZXllcyBjYW4ndCBzdGFuZCBIYXdhaWlhbiBzaGlydHMu" },
- { "For any remedy there is a misery.",
+ { "For any remedy there is a misery.",
"Rm9yIGFueSByZW1lZHkgdGhlcmUgaXMgYSBtaXNlcnku" },
- { "Giant bats turn into giant vampires.",
+ { "Giant bats turn into giant vampires.",
"R2lhbnQgYmF0cyB0dXJuIGludG8gZ2lhbnQgdmFtcGlyZXMu" },
- { "Good day for overcoming obstacles. Try a steeplechase.",
+ { "Good day for overcoming obstacles. Try a steeplechase.",
"R29vZCBkYXkgZm9yIG92ZXJjb21pbmcgb2JzdGFjbGVzLiBUcnkgYSBzdGVlcGxlY2hhc2Uu" },
- { "Half Moon tonight. (At least it's better than no Moon at all.)",
+ { "Half Moon tonight. (At least it's better than no Moon at all.)",
"SGFsZiBNb29uIHRvbmlnaHQuIChBdCBsZWFzdCBpdCdzIGJldHRlciB0aGFuIG5vIE1vb24gYXQgYWxsLik=" },
- { "Help! I'm being held prisoner in a fortune cookie factory!",
+ { "Help! I'm being held prisoner in a fortune cookie factory!",
"SGVscCEgSSdtIGJlaW5nIGhlbGQgcHJpc29uZXIgaW4gYSBmb3J0dW5lIGNvb2tpZSBmYWN0b3J5IQ==" },
- { "Housecats have nine lives, kittens only one.",
+ { "Housecats have nine lives, kittens only one.",
"SG91c2VjYXRzIGhhdmUgbmluZSBsaXZlcywga2l0dGVucyBvbmx5IG9uZS4=" },
- { "How long can you tread water?",
+ { "How long can you tread water?",
"SG93IGxvbmcgY2FuIHlvdSB0cmVhZCB3YXRlcj8=" },
- { "Hungry? There is an abundance of food on the next level.",
+ { "Hungry? There is an abundance of food on the next level.",
"SHVuZ3J5PyBUaGVyZSBpcyBhbiBhYnVuZGFuY2Ugb2YgZm9vZCBvbiB0aGUgbmV4dCBsZXZlbC4=" },
- { "I guess you've never hit a mail daemon with the Amulet of Yendor...",
+ { "I guess you've never hit a mail daemon with the Amulet of Yendor...",
"SSBndWVzcyB5b3UndmUgbmV2ZXIgaGl0IGEgbWFpbCBkYWVtb24gd2l0aCB0aGUgQW11bGV0IG9mIFllbmRvci4uLg==" },
- { "If you are the shopkeeper, you can take things for free.",
+ { "If you are the shopkeeper, you can take things for free.",
"SWYgeW91IGFyZSB0aGUgc2hvcGtlZXBlciwgeW91IGNhbiB0YWtlIHRoaW5ncyBmb3IgZnJlZS4=" },
- { "If you can't learn to do it well, learn to enjoy doing it badly.",
+ { "If you can't learn to do it well, learn to enjoy doing it badly.",
"SWYgeW91IGNhbid0IGxlYXJuIHRvIGRvIGl0IHdlbGwsIGxlYXJuIHRvIGVuam95IGRvaW5nIGl0IGJhZGx5Lg==" },
- { "If you thought the Wizard was bad, just wait till you meet the Warlord!",
+ { "If you thought the Wizard was bad, just wait till you meet the Warlord!",
"SWYgeW91IHRob3VnaHQgdGhlIFdpemFyZCB3YXMgYmFkLCBqdXN0IHdhaXQgdGlsbCB5b3UgbWVldCB0aGUgV2FybG9yZCE=" },
- { "If you turn blind, don't expect your dog to be turned into a seeing-eye dog.",
+ { "If you turn blind, don't expect your dog to be turned into a seeing-eye dog.",
"SWYgeW91IHR1cm4gYmxpbmQsIGRvbid0IGV4cGVjdCB5b3VyIGRvZyB0byBiZSB0dXJuZWQgaW50byBhIHNlZWluZy1leWUgZG9nLg==" },
- { "If you want to feel great, you must eat something real big.",
+ { "If you want to feel great, you must eat something real big.",
"SWYgeW91IHdhbnQgdG8gZmVlbCBncmVhdCwgeW91IG11c3QgZWF0IHNvbWV0aGluZyByZWFsIGJpZy4=" },
- { "If you want to float, you'd better eat a floating eye.",
+ { "If you want to float, you'd better eat a floating eye.",
"SWYgeW91IHdhbnQgdG8gZmxvYXQsIHlvdSdkIGJldHRlciBlYXQgYSBmbG9hdGluZyBleWUu" },
- { "If your ghost kills a player, it increases your score.",
+ { "If your ghost kills a player, it increases your score.",
"SWYgeW91ciBnaG9zdCBraWxscyBhIHBsYXllciwgaXQgaW5jcmVhc2VzIHlvdXIgc2NvcmUu" },
- { "Increase mindpower: Tame your own ghost!",
+ { "Increase mindpower: Tame your own ghost!",
"SW5jcmVhc2UgbWluZHBvd2VyOiBUYW1lIHlvdXIgb3duIGdob3N0IQ==" },
- { "It furthers one to see the great man.",
+ { "It furthers one to see the great man.",
"SXQgZnVydGhlcnMgb25lIHRvIHNlZSB0aGUgZ3JlYXQgbWFuLg==" },
- { "It's easy to overlook a monster in a wood.",
+ { "It's easy to overlook a monster in a wood.",
"SXQncyBlYXN5IHRvIG92ZXJsb29rIGEgbW9uc3RlciBpbiBhIHdvb2Qu" },
- { "Just below any trapdoor there may be another one. Just keep falling!",
+ { "Just below any trapdoor there may be another one. Just keep falling!",
"SnVzdCBiZWxvdyBhbnkgdHJhcGRvb3IgdGhlcmUgbWF5IGJlIGFub3RoZXIgb25lLiBKdXN0IGtlZXAgZmFsbGluZyE=" },
- { "Katanas are very sharp; watch you don't cut yourself.",
+ { "Katanas are very sharp; watch you don't cut yourself.",
"S2F0YW5hcyBhcmUgdmVyeSBzaGFycDsgd2F0Y2ggeW91IGRvbid0IGN1dCB5b3Vyc2VsZi4=" },
- { "Keep a clear mind: quaff clear potions.",
+ { "Keep a clear mind: quaff clear potions.",
"S2VlcCBhIGNsZWFyIG1pbmQ6IHF1YWZmIGNsZWFyIHBvdGlvbnMu" },
- { "Kicking the terminal doesn't hurt the monsters.",
+ { "Kicking the terminal doesn't hurt the monsters.",
"S2lja2luZyB0aGUgdGVybWluYWwgZG9lc24ndCBodXJ0IHRoZSBtb25zdGVycy4=" },
- { "Killer bees keep appearing till you kill their queen.",
+ { "Killer bees keep appearing till you kill their queen.",
"S2lsbGVyIGJlZXMga2VlcCBhcHBlYXJpbmcgdGlsbCB5b3Uga2lsbCB0aGVpciBxdWVlbi4=" },
- { "Killer bunnies can be tamed with carrots only.",
+ { "Killer bunnies can be tamed with carrots only.",
"S2lsbGVyIGJ1bm5pZXMgY2FuIGJlIHRhbWVkIHdpdGggY2Fycm90cyBvbmx5Lg==" },
- { "Latest news? Put `rec.games.roguelike.nethack' in your .newsrc!",
+ { "Latest news? Put `rec.games.roguelike.nethack' in your .newsrc!",
"TGF0ZXN0IG5ld3M/IFB1dCBgcmVjLmdhbWVzLnJvZ3VlbGlrZS5uZXRoYWNrJyBpbiB5b3VyIC5uZXdzcmMh" },
- { "Learn how to spell. Play NetHack!",
+ { "Learn how to spell. Play NetHack!",
"TGVhcm4gaG93IHRvIHNwZWxsLiBQbGF5IE5ldEhhY2sh" },
- { "Leprechauns hide their gold in a secret room.",
+ { "Leprechauns hide their gold in a secret room.",
"TGVwcmVjaGF1bnMgaGlkZSB0aGVpciBnb2xkIGluIGEgc2VjcmV0IHJvb20u" },
- { "Let your fingers do the walking on the yulkjhnb keys.",
+ { "Let your fingers do the walking on the yulkjhnb keys.",
"TGV0IHlvdXIgZmluZ2VycyBkbyB0aGUgd2Fsa2luZyBvbiB0aGUgeXVsa2pobmIga2V5cy4=" },
- { "Let's face it: this time you're not going to win.",
+ { "Let's face it: this time you're not going to win.",
"TGV0J3MgZmFjZSBpdDogdGhpcyB0aW1lIHlvdSdyZSBub3QgZ29pbmcgdG8gd2luLg==" },
- { "Let's have a party, drink a lot of booze.",
+ { "Let's have a party, drink a lot of booze.",
"TGV0J3MgaGF2ZSBhIHBhcnR5LCBkcmluayBhIGxvdCBvZiBib296ZS4=" },
- { "Liquor sellers do not drink; they hate to see you twice.",
+ { "Liquor sellers do not drink; they hate to see you twice.",
"TGlxdW9yIHNlbGxlcnMgZG8gbm90IGRyaW5rOyB0aGV5IGhhdGUgdG8gc2VlIHlvdSB0d2ljZS4=" },
- { "Lunar eclipse tonight. May as well quit now!",
+ { "Lunar eclipse tonight. May as well quit now!",
"THVuYXIgZWNsaXBzZSB0b25pZ2h0LiBNYXkgYXMgd2VsbCBxdWl0IG5vdyE=" },
- { "Meeting your own ghost decreases your luck considerably!",
+ { "Meeting your own ghost decreases your luck considerably!",
"TWVldGluZyB5b3VyIG93biBnaG9zdCBkZWNyZWFzZXMgeW91ciBsdWNrIGNvbnNpZGVyYWJseSE=" },
- { "Money to invest? Take it to the local branch of the Magic Memory Vault!",
+ { "Money to invest? Take it to the local branch of the Magic Memory Vault!",
"TW9uZXkgdG8gaW52ZXN0PyBUYWtlIGl0IHRvIHRoZSBsb2NhbCBicmFuY2ggb2YgdGhlIE1hZ2ljIE1lbW9yeSBWYXVsdCE=" },
- { "Monsters come from nowhere to hit you everywhere.",
+ { "Monsters come from nowhere to hit you everywhere.",
"TW9uc3RlcnMgY29tZSBmcm9tIG5vd2hlcmUgdG8gaGl0IHlvdSBldmVyeXdoZXJlLg==" },
- { "Monsters sleep because you are boring, not because they ever get tired.",
+ { "Monsters sleep because you are boring, not because they ever get tired.",
"TW9uc3RlcnMgc2xlZXAgYmVjYXVzZSB5b3UgYXJlIGJvcmluZywgbm90IGJlY2F1c2UgdGhleSBldmVyIGdldCB0aXJlZC4=" },
- { "Most monsters prefer minced meat. That's why they are hitting you!",
+ { "Most monsters prefer minced meat. That's why they are hitting you!",
"TW9zdCBtb25zdGVycyBwcmVmZXIgbWluY2VkIG1lYXQuIFRoYXQncyB3aHkgdGhleSBhcmUgaGl0dGluZyB5b3Uh" },
- { "Most of the bugs in NetHack are on the floor.",
+ { "Most of the bugs in NetHack are on the floor.",
"TW9zdCBvZiB0aGUgYnVncyBpbiBOZXRIYWNrIGFyZSBvbiB0aGUgZmxvb3Iu" },
- { "Much ado Nothing Happens.",
+ { "Much ado Nothing Happens.",
"TXVjaCBhZG8gTm90aGluZyBIYXBwZW5zLg==" },
- { "Multi-player NetHack is a myth.",
+ { "Multi-player NetHack is a myth.",
"TXVsdGktcGxheWVyIE5ldEhhY2sgaXMgYSBteXRoLg==" },
- { "NetHack is addictive. Too late, you're already hooked.",
+ { "NetHack is addictive. Too late, you're already hooked.",
"TmV0SGFjayBpcyBhZGRpY3RpdmUuIFRvbyBsYXRlLCB5b3UncmUgYWxyZWFkeSBob29rZWQu" },
- { "Never ask a shopkeeper for a price list.",
+ { "Never ask a shopkeeper for a price list.",
"TmV2ZXIgYXNrIGEgc2hvcGtlZXBlciBmb3IgYSBwcmljZSBsaXN0Lg==" },
- { "Never burn a tree, unless you like getting whacked with a +5 shovel.",
+ { "Never burn a tree, unless you like getting whacked with a +5 shovel.",
"TmV2ZXIgYnVybiBhIHRyZWUsIHVubGVzcyB5b3UgbGlrZSBnZXR0aW5nIHdoYWNrZWQgd2l0aCBhICs1IHNob3ZlbC4=" },
- { "Never eat with glowing hands!",
+ { "Never eat with glowing hands!",
"TmV2ZXIgZWF0IHdpdGggZ2xvd2luZyBoYW5kcyE=" },
- { "Never mind the monsters hitting you: they just replace the charwomen.",
+ { "Never mind the monsters hitting you: they just replace the charwomen.",
"TmV2ZXIgbWluZCB0aGUgbW9uc3RlcnMgaGl0dGluZyB5b3U6IHRoZXkganVzdCByZXBsYWNlIHRoZSBjaGFyd29tZW4u" },
- { "Never play leapfrog with a unicorn.",
+ { "Never play leapfrog with a unicorn.",
"TmV2ZXIgcGxheSBsZWFwZnJvZyB3aXRoIGEgdW5pY29ybi4=" },
- { "Never step on a cursed engraving.",
+ { "Never step on a cursed engraving.",
"TmV2ZXIgc3RlcCBvbiBhIGN1cnNlZCBlbmdyYXZpbmcu" },
- { "Never swim with a camera: there's nothing to take pictures of.",
+ { "Never swim with a camera: there's nothing to take pictures of.",
"TmV2ZXIgc3dpbSB3aXRoIGEgY2FtZXJhOiB0aGVyZSdzIG5vdGhpbmcgdG8gdGFrZSBwaWN0dXJlcyBvZi4=" },
- { "Never teach your pet rust monster to fetch.",
+ { "Never teach your pet rust monster to fetch.",
"TmV2ZXIgdGVhY2ggeW91ciBwZXQgcnVzdCBtb25zdGVyIHRvIGZldGNoLg==" },
- { "Never trust a random generator in magic fields.",
+ { "Never trust a random generator in magic fields.",
"TmV2ZXIgdHJ1c3QgYSByYW5kb20gZ2VuZXJhdG9yIGluIG1hZ2ljIGZpZWxkcy4=" },
- { "Never use a wand of death.",
+ { "Never use a wand of death.",
"TmV2ZXIgdXNlIGEgd2FuZCBvZiBkZWF0aC4=" },
- { "No level contains two shops. The maze is no level. So...",
+ { "No level contains two shops. The maze is no level. So...",
"Tm8gbGV2ZWwgY29udGFpbnMgdHdvIHNob3BzLiBUaGUgbWF6ZSBpcyBubyBsZXZlbC4gU28uLi4=" },
- { "No part of this fortune may be reproduced, stored in a retrieval system, ...",
+ { "No part of this fortune may be reproduced, stored in a retrieval system, ...",
"Tm8gcGFydCBvZiB0aGlzIGZvcnR1bmUgbWF5IGJlIHJlcHJvZHVjZWQsIHN0b3JlZCBpbiBhIHJldHJpZXZhbCBzeXN0ZW0sIC4uLg==" },
- { "Not all rumors are as misleading as this one.",
+ { "Not all rumors are as misleading as this one.",
"Tm90IGFsbCBydW1vcnMgYXJlIGFzIG1pc2xlYWRpbmcgYXMgdGhpcyBvbmUu" },
- { "Nymphs and nurses like beautiful rings.",
+ { "Nymphs and nurses like beautiful rings.",
"TnltcGhzIGFuZCBudXJzZXMgbGlrZSBiZWF1dGlmdWwgcmluZ3Mu" },
- { "Nymphs are blondes. Are you a gentleman?",
+ { "Nymphs are blondes. Are you a gentleman?",
"TnltcGhzIGFyZSBibG9uZGVzLiBBcmUgeW91IGEgZ2VudGxlbWFuPw==" },
- { "Offering a unicorn a worthless piece of glass might prove to be fatal!",
+ { "Offering a unicorn a worthless piece of glass might prove to be fatal!",
"T2ZmZXJpbmcgYSB1bmljb3JuIGEgd29ydGhsZXNzIHBpZWNlIG9mIGdsYXNzIG1pZ2h0IHByb3ZlIHRvIGJlIGZhdGFsIQ==" },
- { "Old hackers never die: young ones do.",
+ { "Old hackers never die: young ones do.",
"T2xkIGhhY2tlcnMgbmV2ZXIgZGllOiB5b3VuZyBvbmVzIGRvLg==" },
- { "One has to leave shops before closing time.",
+ { "One has to leave shops before closing time.",
"T25lIGhhcyB0byBsZWF2ZSBzaG9wcyBiZWZvcmUgY2xvc2luZyB0aW1lLg==" },
- { "One homunculus a day keeps the doctor away.",
+ { "One homunculus a day keeps the doctor away.",
"T25lIGhvbXVuY3VsdXMgYSBkYXkga2VlcHMgdGhlIGRvY3RvciBhd2F5Lg==" },
- { "One level further down somebody is getting killed, right now.",
+ { "One level further down somebody is getting killed, right now.",
"T25lIGxldmVsIGZ1cnRoZXIgZG93biBzb21lYm9keSBpcyBnZXR0aW5nIGtpbGxlZCwgcmlnaHQgbm93Lg==" },
- { "Only a wizard can use a magic whistle.",
+ { "Only a wizard can use a magic whistle.",
"T25seSBhIHdpemFyZCBjYW4gdXNlIGEgbWFnaWMgd2hpc3RsZS4=" },
- { "Only adventurers of evil alignment think of killing their dog.",
+ { "Only adventurers of evil alignment think of killing their dog.",
"T25seSBhZHZlbnR1cmVycyBvZiBldmlsIGFsaWdubWVudCB0aGluayBvZiBraWxsaW5nIHRoZWlyIGRvZy4=" },
- { "Only chaotic evils kill sleeping monsters.",
+ { "Only chaotic evils kill sleeping monsters.",
"T25seSBjaGFvdGljIGV2aWxzIGtpbGwgc2xlZXBpbmcgbW9uc3RlcnMu" },
- { "Only real trappers escape traps.",
+ { "Only real trappers escape traps.",
"T25seSByZWFsIHRyYXBwZXJzIGVzY2FwZSB0cmFwcy4=" },
- { "Only real wizards can write scrolls.",
+ { "Only real wizards can write scrolls.",
"T25seSByZWFsIHdpemFyZHMgY2FuIHdyaXRlIHNjcm9sbHMu" },
- { "Operation OVERKILL has started now.",
+ { "Operation OVERKILL has started now.",
"T3BlcmF0aW9uIE9WRVJLSUxMIGhhcyBzdGFydGVkIG5vdy4=" },
- { "PLEASE ignore previous rumor.",
+ { "PLEASE ignore previous rumor.",
"UExFQVNFIGlnbm9yZSBwcmV2aW91cyBydW1vci4=" },
- { "Polymorph into an ettin; meet your opponents face to face to face.",
+ { "Polymorph into an ettin; meet your opponents face to face to face.",
"UG9seW1vcnBoIGludG8gYW4gZXR0aW47IG1lZXQgeW91ciBvcHBvbmVudHMgZmFjZSB0byBmYWNlIHRvIGZhY2Uu" },
- { "Praying will frighten demons.",
+ { "Praying will frighten demons.",
"UHJheWluZyB3aWxsIGZyaWdodGVuIGRlbW9ucy4=" },
- { "Row (3x) that boat gently down the stream, Charon (4x), death is but a dream.",
+ { "Row (3x) that boat gently down the stream, Charon (4x), death is but a dream.",
"Um93ICgzeCkgdGhhdCBib2F0IGdlbnRseSBkb3duIHRoZSBzdHJlYW0sIENoYXJvbiAoNHgpLCBkZWF0aCBpcyBidXQgYSBkcmVhbS4=" },
- { "Running is good for your legs.",
+ { "Running is good for your legs.",
"UnVubmluZyBpcyBnb29kIGZvciB5b3VyIGxlZ3Mu" },
- { "Screw up your courage! You've screwed up everything else.",
+ { "Screw up your courage! You've screwed up everything else.",
"U2NyZXcgdXAgeW91ciBjb3VyYWdlISBZb3UndmUgc2NyZXdlZCB1cCBldmVyeXRoaW5nIGVsc2Uu" },
- { "Seepage? Leaky pipes? Rising damp? Summon the plumber!",
+ { "Seepage? Leaky pipes? Rising damp? Summon the plumber!",
"U2VlcGFnZT8gTGVha3kgcGlwZXM/IFJpc2luZyBkYW1wPyBTdW1tb24gdGhlIHBsdW1iZXIh" },
- { "Segmentation fault (core dumped).",
+ { "Segmentation fault (core dumped).",
"U2VnbWVudGF0aW9uIGZhdWx0IChjb3JlIGR1bXBlZCku" },
- { "Shopkeepers sometimes die from old age.",
+ { "Shopkeepers sometimes die from old age.",
"U2hvcGtlZXBlcnMgc29tZXRpbWVzIGRpZSBmcm9tIG9sZCBhZ2Uu" },
- { "Some mazes (especially small ones) have no solutions, says man 6 maze.",
+ { "Some mazes (especially small ones) have no solutions, says man 6 maze.",
"U29tZSBtYXplcyAoZXNwZWNpYWxseSBzbWFsbCBvbmVzKSBoYXZlIG5vIHNvbHV0aW9ucywgc2F5cyBtYW4gNiBtYXplLg==" },
- { "Some questions the Sphynx asks just *don't* have any answers.",
+ { "Some questions the Sphynx asks just *don't* have any answers.",
"U29tZSBxdWVzdGlvbnMgdGhlIFNwaHlueCBhc2tzIGp1c3QgKmRvbid0KiBoYXZlIGFueSBhbnN3ZXJzLg==" },
- { "Sometimes \"mu\" is the answer.",
+ { "Sometimes \"mu\" is the answer.",
"U29tZXRpbWVzICJtdSIgaXMgdGhlIGFuc3dlci4=" },
- { "Sorry, no fortune this time. Better luck next cookie!",
+ { "Sorry, no fortune this time. Better luck next cookie!",
"U29ycnksIG5vIGZvcnR1bmUgdGhpcyB0aW1lLiBCZXR0ZXIgbHVjayBuZXh0IGNvb2tpZSE=" },
- { "Spare your scrolls of make-edible until it's really necessary!",
+ { "Spare your scrolls of make-edible until it's really necessary!",
"U3BhcmUgeW91ciBzY3JvbGxzIG9mIG1ha2UtZWRpYmxlIHVudGlsIGl0J3MgcmVhbGx5IG5lY2Vzc2FyeSE=" },
- { "Suddenly, the dungeon will collapse...",
+ { "Suddenly, the dungeon will collapse...",
"U3VkZGVubHksIHRoZSBkdW5nZW9uIHdpbGwgY29sbGFwc2UuLi4=" },
- { "Taming a mail daemon may cause a system security violation.",
+ { "Taming a mail daemon may cause a system security violation.",
"VGFtaW5nIGEgbWFpbCBkYWVtb24gbWF5IGNhdXNlIGEgc3lzdGVtIHNlY3VyaXR5IHZpb2xhdGlvbi4=" },
- { "The crowd was so tough, the Stooges won't play the Dungeon anymore, nyuk nyuk.",
+ { "The crowd was so tough, the Stooges won't play the Dungeon anymore, nyuk nyuk.",
"VGhlIGNyb3dkIHdhcyBzbyB0b3VnaCwgdGhlIFN0b29nZXMgd29uJ3QgcGxheSB0aGUgRHVuZ2VvbiBhbnltb3JlLCBueXVrIG55dWsu" },
- { "The leprechauns hide their treasure in a small hidden room.",
+ { "The leprechauns hide their treasure in a small hidden room.",
"VGhlIGxlcHJlY2hhdW5zIGhpZGUgdGhlaXIgdHJlYXN1cmUgaW4gYSBzbWFsbCBoaWRkZW4gcm9vbS4=" },
- { "The longer the wand the better.",
+ { "The longer the wand the better.",
"VGhlIGxvbmdlciB0aGUgd2FuZCB0aGUgYmV0dGVyLg==" },
- { "The magic word is \"XYZZY\".",
+ { "The magic word is \"XYZZY\".",
"VGhlIG1hZ2ljIHdvcmQgaXMgIlhZWlpZIi4=" },
- { "The meek shall inherit your bones files.",
+ { "The meek shall inherit your bones files.",
"VGhlIG1lZWsgc2hhbGwgaW5oZXJpdCB5b3VyIGJvbmVzIGZpbGVzLg==" },
- { "The mines are dark and deep, and I have levels to go before I sleep.",
+ { "The mines are dark and deep, and I have levels to go before I sleep.",
"VGhlIG1pbmVzIGFyZSBkYXJrIGFuZCBkZWVwLCBhbmQgSSBoYXZlIGxldmVscyB0byBnbyBiZWZvcmUgSSBzbGVlcC4=" },
- { "The use of dynamite is dangerous.",
+ { "The use of dynamite is dangerous.",
"VGhlIHVzZSBvZiBkeW5hbWl0ZSBpcyBkYW5nZXJvdXMu" },
- { "There are no worms in the UNIX version.",
+ { "There are no worms in the UNIX version.",
"VGhlcmUgYXJlIG5vIHdvcm1zIGluIHRoZSBVTklYIHZlcnNpb24u" },
- { "There is a trap on this level!",
+ { "There is a trap on this level!",
"VGhlcmUgaXMgYSB0cmFwIG9uIHRoaXMgbGV2ZWwh" },
- { "They say that Demogorgon, Asmodeus, Orcus, Yeenoghu & Juiblex is no law firm.",
+ { "They say that Demogorgon, Asmodeus, Orcus, Yeenoghu & Juiblex is no law firm.",
"VGhleSBzYXkgdGhhdCBEZW1vZ29yZ29uLCBBc21vZGV1cywgT3JjdXMsIFllZW5vZ2h1ICYgSnVpYmxleCBpcyBubyBsYXcgZmlybS4=" },
- { "They say that Geryon has an evil twin, beware!",
+ { "They say that Geryon has an evil twin, beware!",
"VGhleSBzYXkgdGhhdCBHZXJ5b24gaGFzIGFuIGV2aWwgdHdpbiwgYmV3YXJlIQ==" },
- { "They say that Medusa would make a terrible pet.",
+ { "They say that Medusa would make a terrible pet.",
"VGhleSBzYXkgdGhhdCBNZWR1c2Egd291bGQgbWFrZSBhIHRlcnJpYmxlIHBldC4=" },
- { "They say that NetHack bugs are Seldon planned.",
+ { "They say that NetHack bugs are Seldon planned.",
"VGhleSBzYXkgdGhhdCBOZXRIYWNrIGJ1Z3MgYXJlIFNlbGRvbiBwbGFubmVkLg==" },
- { "They say that NetHack comes in 256 flavors.",
+ { "They say that NetHack comes in 256 flavors.",
"VGhleSBzYXkgdGhhdCBOZXRIYWNrIGNvbWVzIGluIDI1NiBmbGF2b3JzLg==" },
- { "They say that NetHack is just a computer game.",
+ { "They say that NetHack is just a computer game.",
"VGhleSBzYXkgdGhhdCBOZXRIYWNrIGlzIGp1c3QgYSBjb21wdXRlciBnYW1lLg==" },
- { "They say that NetHack is more than just a computer game.",
+ { "They say that NetHack is more than just a computer game.",
"VGhleSBzYXkgdGhhdCBOZXRIYWNrIGlzIG1vcmUgdGhhbiBqdXN0IGEgY29tcHV0ZXIgZ2FtZS4=" },
- { "They say that NetHack is never what it used to be.",
+ { "They say that NetHack is never what it used to be.",
"VGhleSBzYXkgdGhhdCBOZXRIYWNrIGlzIG5ldmVyIHdoYXQgaXQgdXNlZCB0byBiZS4=" },
- { "They say that a baby dragon is too small to hurt or help you.",
+ { "They say that a baby dragon is too small to hurt or help you.",
"VGhleSBzYXkgdGhhdCBhIGJhYnkgZHJhZ29uIGlzIHRvbyBzbWFsbCB0byBodXJ0IG9yIGhlbHAgeW91Lg==" },
- { "They say that a black pudding is simply a brown pudding gone bad.",
+ { "They say that a black pudding is simply a brown pudding gone bad.",
"VGhleSBzYXkgdGhhdCBhIGJsYWNrIHB1ZGRpbmcgaXMgc2ltcGx5IGEgYnJvd24gcHVkZGluZyBnb25lIGJhZC4=" },
- { "They say that a black sheep has 3 bags full of wool.",
+ { "They say that a black sheep has 3 bags full of wool.",
"VGhleSBzYXkgdGhhdCBhIGJsYWNrIHNoZWVwIGhhcyAzIGJhZ3MgZnVsbCBvZiB3b29sLg==" },
- { "They say that a blank scroll is like a blank check.",
+ { "They say that a blank scroll is like a blank check.",
"VGhleSBzYXkgdGhhdCBhIGJsYW5rIHNjcm9sbCBpcyBsaWtlIGEgYmxhbmsgY2hlY2su" },
- { "They say that a cat named Morris has nine lives.",
+ { "They say that a cat named Morris has nine lives.",
"VGhleSBzYXkgdGhhdCBhIGNhdCBuYW1lZCBNb3JyaXMgaGFzIG5pbmUgbGl2ZXMu" },
- { "They say that a desperate shopper might pay any price in a shop.",
+ { "They say that a desperate shopper might pay any price in a shop.",
"VGhleSBzYXkgdGhhdCBhIGRlc3BlcmF0ZSBzaG9wcGVyIG1pZ2h0IHBheSBhbnkgcHJpY2UgaW4gYSBzaG9wLg==" },
- { "They say that a diamond dog is everybody's best friend.",
+ { "They say that a diamond dog is everybody's best friend.",
"VGhleSBzYXkgdGhhdCBhIGRpYW1vbmQgZG9nIGlzIGV2ZXJ5Ym9keSdzIGJlc3QgZnJpZW5kLg==" },
- { "They say that a dwarf lord can carry a pick-axe because his armor is light.",
+ { "They say that a dwarf lord can carry a pick-axe because his armor is light.",
"VGhleSBzYXkgdGhhdCBhIGR3YXJmIGxvcmQgY2FuIGNhcnJ5IGEgcGljay1heGUgYmVjYXVzZSBoaXMgYXJtb3IgaXMgbGlnaHQu" },
- { "They say that a floating eye can defeat Medusa.",
+ { "They say that a floating eye can defeat Medusa.",
"VGhleSBzYXkgdGhhdCBhIGZsb2F0aW5nIGV5ZSBjYW4gZGVmZWF0IE1lZHVzYS4=" },
- { "They say that a fortune only has 1 line and you can't read between it.",
+ { "They say that a fortune only has 1 line and you can't read between it.",
"VGhleSBzYXkgdGhhdCBhIGZvcnR1bmUgb25seSBoYXMgMSBsaW5lIGFuZCB5b3UgY2FuJ3QgcmVhZCBiZXR3ZWVuIGl0Lg==" },
- { "They say that a fortune only has 1 line, but you can read between it.",
+ { "They say that a fortune only has 1 line, but you can read between it.",
"VGhleSBzYXkgdGhhdCBhIGZvcnR1bmUgb25seSBoYXMgMSBsaW5lLCBidXQgeW91IGNhbiByZWFkIGJldHdlZW4gaXQu" },
- { "They say that a fountain looks nothing like a regularly erupting geyser.",
+ { "They say that a fountain looks nothing like a regularly erupting geyser.",
"VGhleSBzYXkgdGhhdCBhIGZvdW50YWluIGxvb2tzIG5vdGhpbmcgbGlrZSBhIHJlZ3VsYXJseSBlcnVwdGluZyBnZXlzZXIu" },
- { "They say that a gold doubloon is worth more than its weight in gold.",
+ { "They say that a gold doubloon is worth more than its weight in gold.",
"VGhleSBzYXkgdGhhdCBhIGdvbGQgZG91Ymxvb24gaXMgd29ydGggbW9yZSB0aGFuIGl0cyB3ZWlnaHQgaW4gZ29sZC4=" },
- { "They say that a grid bug won't pay a shopkeeper for zapping you in a shop.",
+ { "They say that a grid bug won't pay a shopkeeper for zapping you in a shop.",
"VGhleSBzYXkgdGhhdCBhIGdyaWQgYnVnIHdvbid0IHBheSBhIHNob3BrZWVwZXIgZm9yIHphcHBpbmcgeW91IGluIGEgc2hvcC4=" },
- { "They say that a gypsy could tell your fortune for a price.",
+ { "They say that a gypsy could tell your fortune for a price.",
"VGhleSBzYXkgdGhhdCBhIGd5cHN5IGNvdWxkIHRlbGwgeW91ciBmb3J0dW5lIGZvciBhIHByaWNlLg==" },
- { "They say that a hacker named Alice once level teleported by using a mirror.",
+ { "They say that a hacker named Alice once level teleported by using a mirror.",
"VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBBbGljZSBvbmNlIGxldmVsIHRlbGVwb3J0ZWQgYnkgdXNpbmcgYSBtaXJyb3Iu" },
- { "They say that a hacker named David once slew a giant with a sling and a rock.",
+ { "They say that a hacker named David once slew a giant with a sling and a rock.",
"VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBEYXZpZCBvbmNlIHNsZXcgYSBnaWFudCB3aXRoIGEgc2xpbmcgYW5kIGEgcm9jay4=" },
- { "They say that a hacker named Dorothy once rode a fog cloud to Oz.",
+ { "They say that a hacker named Dorothy once rode a fog cloud to Oz.",
"VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBEb3JvdGh5IG9uY2Ugcm9kZSBhIGZvZyBjbG91ZCB0byBPei4=" },
- { "They say that a hacker named Mary once lost a white sheep in the mazes.",
+ { "They say that a hacker named Mary once lost a white sheep in the mazes.",
"VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBNYXJ5IG9uY2UgbG9zdCBhIHdoaXRlIHNoZWVwIGluIHRoZSBtYXplcy4=" },
- { "They say that a helm of brilliance is not to be taken lightly.",
+ { "They say that a helm of brilliance is not to be taken lightly.",
"VGhleSBzYXkgdGhhdCBhIGhlbG0gb2YgYnJpbGxpYW5jZSBpcyBub3QgdG8gYmUgdGFrZW4gbGlnaHRseS4=" },
- { "They say that a hot dog and a hell hound are the same thing.",
+ { "They say that a hot dog and a hell hound are the same thing.",
"VGhleSBzYXkgdGhhdCBhIGhvdCBkb2cgYW5kIGEgaGVsbCBob3VuZCBhcmUgdGhlIHNhbWUgdGhpbmcu" },
- { "They say that a lamp named Aladdin's Lamp contains a djinni with 3 wishes.",
+ { "They say that a lamp named Aladdin's Lamp contains a djinni with 3 wishes.",
"VGhleSBzYXkgdGhhdCBhIGxhbXAgbmFtZWQgQWxhZGRpbidzIExhbXAgY29udGFpbnMgYSBkamlubmkgd2l0aCAzIHdpc2hlcy4=" },
- { "They say that a large dog named Lassie will lead you to the amulet.",
+ { "They say that a large dog named Lassie will lead you to the amulet.",
"VGhleSBzYXkgdGhhdCBhIGxhcmdlIGRvZyBuYW1lZCBMYXNzaWUgd2lsbCBsZWFkIHlvdSB0byB0aGUgYW11bGV0Lg==" },
- { "They say that a long sword is not a light sword.",
+ { "They say that a long sword is not a light sword.",
"VGhleSBzYXkgdGhhdCBhIGxvbmcgc3dvcmQgaXMgbm90IGEgbGlnaHQgc3dvcmQu" },
- { "They say that a manes won't mince words with you.",
+ { "They say that a manes won't mince words with you.",
"VGhleSBzYXkgdGhhdCBhIG1hbmVzIHdvbid0IG1pbmNlIHdvcmRzIHdpdGggeW91Lg==" },
- { "They say that a mind is a terrible thing to waste.",
+ { "They say that a mind is a terrible thing to waste.",
"VGhleSBzYXkgdGhhdCBhIG1pbmQgaXMgYSB0ZXJyaWJsZSB0aGluZyB0byB3YXN0ZS4=" },
- { "They say that a plain nymph will only wear a wire ring in one ear.",
+ { "They say that a plain nymph will only wear a wire ring in one ear.",
"VGhleSBzYXkgdGhhdCBhIHBsYWluIG55bXBoIHdpbGwgb25seSB3ZWFyIGEgd2lyZSByaW5nIGluIG9uZSBlYXIu" },
- { "They say that a plumed hat could be a previously used crested helmet.",
+ { "They say that a plumed hat could be a previously used crested helmet.",
"VGhleSBzYXkgdGhhdCBhIHBsdW1lZCBoYXQgY291bGQgYmUgYSBwcmV2aW91c2x5IHVzZWQgY3Jlc3RlZCBoZWxtZXQu" },
- { "They say that a potion of oil is difficult to grasp.",
+ { "They say that a potion of oil is difficult to grasp.",
"VGhleSBzYXkgdGhhdCBhIHBvdGlvbiBvZiBvaWwgaXMgZGlmZmljdWx0IHRvIGdyYXNwLg==" },
- { "They say that a potion of yogurt is a cancelled potion of sickness.",
+ { "They say that a potion of yogurt is a cancelled potion of sickness.",
"VGhleSBzYXkgdGhhdCBhIHBvdGlvbiBvZiB5b2d1cnQgaXMgYSBjYW5jZWxsZWQgcG90aW9uIG9mIHNpY2tuZXNzLg==" },
- { "They say that a purple worm is not a baby purple dragon.",
+ { "They say that a purple worm is not a baby purple dragon.",
"VGhleSBzYXkgdGhhdCBhIHB1cnBsZSB3b3JtIGlzIG5vdCBhIGJhYnkgcHVycGxlIGRyYWdvbi4=" },
- { "They say that a quivering blob tastes different than a gelatinous cube.",
+ { "They say that a quivering blob tastes different than a gelatinous cube.",
"VGhleSBzYXkgdGhhdCBhIHF1aXZlcmluZyBibG9iIHRhc3RlcyBkaWZmZXJlbnQgdGhhbiBhIGdlbGF0aW5vdXMgY3ViZS4=" },
- { "They say that a runed broadsword named Stormbringer attracts vortices.",
+ { "They say that a runed broadsword named Stormbringer attracts vortices.",
"VGhleSBzYXkgdGhhdCBhIHJ1bmVkIGJyb2Fkc3dvcmQgbmFtZWQgU3Rvcm1icmluZ2VyIGF0dHJhY3RzIHZvcnRpY2VzLg==" },
- { "They say that a scroll of summoning has other names.",
+ { "They say that a scroll of summoning has other names.",
"VGhleSBzYXkgdGhhdCBhIHNjcm9sbCBvZiBzdW1tb25pbmcgaGFzIG90aGVyIG5hbWVzLg==" },
- { "They say that a shaman can bestow blessings but usually doesn't.",
+ { "They say that a shaman can bestow blessings but usually doesn't.",
"VGhleSBzYXkgdGhhdCBhIHNoYW1hbiBjYW4gYmVzdG93IGJsZXNzaW5ncyBidXQgdXN1YWxseSBkb2Vzbid0Lg==" },
- { "They say that a shaman will bless you for an eye of newt and wing of bat.",
+ { "They say that a shaman will bless you for an eye of newt and wing of bat.",
"VGhleSBzYXkgdGhhdCBhIHNoYW1hbiB3aWxsIGJsZXNzIHlvdSBmb3IgYW4gZXllIG9mIG5ld3QgYW5kIHdpbmcgb2YgYmF0Lg==" },
- { "They say that a shimmering gold shield is not a polished silver shield.",
+ { "They say that a shimmering gold shield is not a polished silver shield.",
"VGhleSBzYXkgdGhhdCBhIHNoaW1tZXJpbmcgZ29sZCBzaGllbGQgaXMgbm90IGEgcG9saXNoZWQgc2lsdmVyIHNoaWVsZC4=" },
- { "They say that a spear will hit a neo-otyugh. (Do YOU know what that is?)",
+ { "They say that a spear will hit a neo-otyugh. (Do YOU know what that is?)",
"VGhleSBzYXkgdGhhdCBhIHNwZWFyIHdpbGwgaGl0IGEgbmVvLW90eXVnaC4gKERvIFlPVSBrbm93IHdoYXQgdGhhdCBpcz8p" },
- { "They say that a spotted dragon is the ultimate shape changer.",
+ { "They say that a spotted dragon is the ultimate shape changer.",
"VGhleSBzYXkgdGhhdCBhIHNwb3R0ZWQgZHJhZ29uIGlzIHRoZSB1bHRpbWF0ZSBzaGFwZSBjaGFuZ2VyLg==" },
- { "They say that a stethoscope is no good if you can only hear your heartbeat.",
+ { "They say that a stethoscope is no good if you can only hear your heartbeat.",
"VGhleSBzYXkgdGhhdCBhIHN0ZXRob3Njb3BlIGlzIG5vIGdvb2QgaWYgeW91IGNhbiBvbmx5IGhlYXIgeW91ciBoZWFydGJlYXQu" },
- { "They say that a succubus named Suzy will sometimes warn you of danger.",
+ { "They say that a succubus named Suzy will sometimes warn you of danger.",
"VGhleSBzYXkgdGhhdCBhIHN1Y2N1YnVzIG5hbWVkIFN1enkgd2lsbCBzb21ldGltZXMgd2FybiB5b3Ugb2YgZGFuZ2VyLg==" },
- { "They say that a wand of cancellation is not like a wand of polymorph.",
+ { "They say that a wand of cancellation is not like a wand of polymorph.",
"VGhleSBzYXkgdGhhdCBhIHdhbmQgb2YgY2FuY2VsbGF0aW9uIGlzIG5vdCBsaWtlIGEgd2FuZCBvZiBwb2x5bW9ycGgu" },
- { "They say that a wood golem named Pinocchio would be easy to control.",
+ { "They say that a wood golem named Pinocchio would be easy to control.",
"VGhleSBzYXkgdGhhdCBhIHdvb2QgZ29sZW0gbmFtZWQgUGlub2NjaGlvIHdvdWxkIGJlIGVhc3kgdG8gY29udHJvbC4=" },
- { "They say that after killing a dragon it's time for a change of scenery.",
+ { "They say that after killing a dragon it's time for a change of scenery.",
"VGhleSBzYXkgdGhhdCBhZnRlciBraWxsaW5nIGEgZHJhZ29uIGl0J3MgdGltZSBmb3IgYSBjaGFuZ2Ugb2Ygc2NlbmVyeS4=" },
- { "They say that an amulet of strangulation is worse than ring around the collar.",
+ { "They say that an amulet of strangulation is worse than ring around the collar.",
"VGhleSBzYXkgdGhhdCBhbiBhbXVsZXQgb2Ygc3RyYW5ndWxhdGlvbiBpcyB3b3JzZSB0aGFuIHJpbmcgYXJvdW5kIHRoZSBjb2xsYXIu" },
- { "They say that an attic is the best place to hide your toys.",
+ { "They say that an attic is the best place to hide your toys.",
"VGhleSBzYXkgdGhhdCBhbiBhdHRpYyBpcyB0aGUgYmVzdCBwbGFjZSB0byBoaWRlIHlvdXIgdG95cy4=" },
- { "They say that an axe named Cleaver once belonged to a hacker named Beaver.",
+ { "They say that an axe named Cleaver once belonged to a hacker named Beaver.",
"VGhleSBzYXkgdGhhdCBhbiBheGUgbmFtZWQgQ2xlYXZlciBvbmNlIGJlbG9uZ2VkIHRvIGEgaGFja2VyIG5hbWVkIEJlYXZlci4=" },
- { "They say that an eye of newt and a wing of bat are double the trouble.",
+ { "They say that an eye of newt and a wing of bat are double the trouble.",
"VGhleSBzYXkgdGhhdCBhbiBleWUgb2YgbmV3dCBhbmQgYSB3aW5nIG9mIGJhdCBhcmUgZG91YmxlIHRoZSB0cm91YmxlLg==" },
- { "They say that an incubus named Izzy sometimes makes women feel sensitive.",
+ { "They say that an incubus named Izzy sometimes makes women feel sensitive.",
"VGhleSBzYXkgdGhhdCBhbiBpbmN1YnVzIG5hbWVkIEl6enkgc29tZXRpbWVzIG1ha2VzIHdvbWVuIGZlZWwgc2Vuc2l0aXZlLg==" },
- { "They say that an opulent throne room is rarely a place to wish you'd be in.",
+ { "They say that an opulent throne room is rarely a place to wish you'd be in.",
"VGhleSBzYXkgdGhhdCBhbiBvcHVsZW50IHRocm9uZSByb29tIGlzIHJhcmVseSBhIHBsYWNlIHRvIHdpc2ggeW91J2QgYmUgaW4u" },
- { "They say that an unlucky hacker once had a nose bleed at an altar and died.",
+ { "They say that an unlucky hacker once had a nose bleed at an altar and died.",
"VGhleSBzYXkgdGhhdCBhbiB1bmx1Y2t5IGhhY2tlciBvbmNlIGhhZCBhIG5vc2UgYmxlZWQgYXQgYW4gYWx0YXIgYW5kIGRpZWQu" },
- { "They say that and they say this but they never say never, never!",
+ { "They say that and they say this but they never say never, never!",
"VGhleSBzYXkgdGhhdCBhbmQgdGhleSBzYXkgdGhpcyBidXQgdGhleSBuZXZlciBzYXkgbmV2ZXIsIG5ldmVyIQ==" },
- { "They say that any quantum mechanic knows that speed kills.",
+ { "They say that any quantum mechanic knows that speed kills.",
"VGhleSBzYXkgdGhhdCBhbnkgcXVhbnR1bSBtZWNoYW5pYyBrbm93cyB0aGF0IHNwZWVkIGtpbGxzLg==" },
- { "They say that applying a unicorn horn means you've missed the point.",
+ { "They say that applying a unicorn horn means you've missed the point.",
"VGhleSBzYXkgdGhhdCBhcHBseWluZyBhIHVuaWNvcm4gaG9ybiBtZWFucyB5b3UndmUgbWlzc2VkIHRoZSBwb2ludC4=" },
- { "They say that blue stones are radioactive, beware.",
+ { "They say that blue stones are radioactive, beware.",
"VGhleSBzYXkgdGhhdCBibHVlIHN0b25lcyBhcmUgcmFkaW9hY3RpdmUsIGJld2FyZS4=" },
- { "They say that building a dungeon is a team effort.",
+ { "They say that building a dungeon is a team effort.",
"VGhleSBzYXkgdGhhdCBidWlsZGluZyBhIGR1bmdlb24gaXMgYSB0ZWFtIGVmZm9ydC4=" },
- { "They say that chaotic characters never get a kick out of altars.",
+ { "They say that chaotic characters never get a kick out of altars.",
"VGhleSBzYXkgdGhhdCBjaGFvdGljIGNoYXJhY3RlcnMgbmV2ZXIgZ2V0IGEga2ljayBvdXQgb2YgYWx0YXJzLg==" },
- { "They say that collapsing a dungeon often creates a panic.",
+ { "They say that collapsing a dungeon often creates a panic.",
"VGhleSBzYXkgdGhhdCBjb2xsYXBzaW5nIGEgZHVuZ2VvbiBvZnRlbiBjcmVhdGVzIGEgcGFuaWMu" },
- { "They say that counting your eggs before they hatch shows that you care.",
+ { "They say that counting your eggs before they hatch shows that you care.",
"VGhleSBzYXkgdGhhdCBjb3VudGluZyB5b3VyIGVnZ3MgYmVmb3JlIHRoZXkgaGF0Y2ggc2hvd3MgdGhhdCB5b3UgY2FyZS4=" },
- { "They say that dipping a bag of tricks in a fountain won't make it an icebox.",
+ { "They say that dipping a bag of tricks in a fountain won't make it an icebox.",
"VGhleSBzYXkgdGhhdCBkaXBwaW5nIGEgYmFnIG9mIHRyaWNrcyBpbiBhIGZvdW50YWluIHdvbid0IG1ha2UgaXQgYW4gaWNlYm94Lg==" },
- { "They say that dipping an eel and brown mold in hot water makes bouillabaisse.",
+ { "They say that dipping an eel and brown mold in hot water makes bouillabaisse.",
"VGhleSBzYXkgdGhhdCBkaXBwaW5nIGFuIGVlbCBhbmQgYnJvd24gbW9sZCBpbiBob3Qgd2F0ZXIgbWFrZXMgYm91aWxsYWJhaXNzZS4=" },
- { "They say that donating a doubloon is extremely pious charity.",
+ { "They say that donating a doubloon is extremely pious charity.",
"VGhleSBzYXkgdGhhdCBkb25hdGluZyBhIGRvdWJsb29uIGlzIGV4dHJlbWVseSBwaW91cyBjaGFyaXR5Lg==" },
- { "They say that eating royal jelly attracts grizzly owlbears.",
+ { "They say that eating royal jelly attracts grizzly owlbears.",
"VGhleSBzYXkgdGhhdCBlYXRpbmcgcm95YWwgamVsbHkgYXR0cmFjdHMgZ3JpenpseSBvd2xiZWFycy4=" },
- { "They say that eggs, pancakes and juice are just a mundane breakfast.",
+ { "They say that eggs, pancakes and juice are just a mundane breakfast.",
"VGhleSBzYXkgdGhhdCBlZ2dzLCBwYW5jYWtlcyBhbmQganVpY2UgYXJlIGp1c3QgYSBtdW5kYW5lIGJyZWFrZmFzdC4=" },
- { "They say that everyone knows why Medusa stands alone in the dark.",
+ { "They say that everyone knows why Medusa stands alone in the dark.",
"VGhleSBzYXkgdGhhdCBldmVyeW9uZSBrbm93cyB3aHkgTWVkdXNhIHN0YW5kcyBhbG9uZSBpbiB0aGUgZGFyay4=" },
- { "They say that everyone wanted rec.games.hack to undergo a name change.",
+ { "They say that everyone wanted rec.games.hack to undergo a name change.",
"VGhleSBzYXkgdGhhdCBldmVyeW9uZSB3YW50ZWQgcmVjLmdhbWVzLmhhY2sgdG8gdW5kZXJnbyBhIG5hbWUgY2hhbmdlLg==" },
- { "They say that finding a winning strategy is a deliberate move on your part.",
+ { "They say that finding a winning strategy is a deliberate move on your part.",
"VGhleSBzYXkgdGhhdCBmaW5kaW5nIGEgd2lubmluZyBzdHJhdGVneSBpcyBhIGRlbGliZXJhdGUgbW92ZSBvbiB5b3VyIHBhcnQu" },
- { "They say that finding worthless glass is worth something.",
+ { "They say that finding worthless glass is worth something.",
"VGhleSBzYXkgdGhhdCBmaW5kaW5nIHdvcnRobGVzcyBnbGFzcyBpcyB3b3J0aCBzb21ldGhpbmcu" },
- { "They say that fortune cookies are food for thought.",
+ { "They say that fortune cookies are food for thought.",
"VGhleSBzYXkgdGhhdCBmb3J0dW5lIGNvb2tpZXMgYXJlIGZvb2QgZm9yIHRob3VnaHQu" },
- { "They say that gold is only wasted on a pet dragon.",
+ { "They say that gold is only wasted on a pet dragon.",
"VGhleSBzYXkgdGhhdCBnb2xkIGlzIG9ubHkgd2FzdGVkIG9uIGEgcGV0IGRyYWdvbi4=" },
- { "They say that good things come to those that wait.",
+ { "They say that good things come to those that wait.",
"VGhleSBzYXkgdGhhdCBnb29kIHRoaW5ncyBjb21lIHRvIHRob3NlIHRoYXQgd2FpdC4=" },
- { "They say that greased objects will slip out of monsters' hands.",
+ { "They say that greased objects will slip out of monsters' hands.",
"VGhleSBzYXkgdGhhdCBncmVhc2VkIG9iamVjdHMgd2lsbCBzbGlwIG91dCBvZiBtb25zdGVycycgaGFuZHMu" },
- { "They say that if you can't spell then you'll wish you had a spell book.",
+ { "They say that if you can't spell then you'll wish you had a spell book.",
"VGhleSBzYXkgdGhhdCBpZiB5b3UgY2FuJ3Qgc3BlbGwgdGhlbiB5b3UnbGwgd2lzaCB5b3UgaGFkIGEgc3BlbGwgYm9vay4=" },
- { "They say that if you live by the sword, you'll die by the sword.",
+ { "They say that if you live by the sword, you'll die by the sword.",
"VGhleSBzYXkgdGhhdCBpZiB5b3UgbGl2ZSBieSB0aGUgc3dvcmQsIHlvdSdsbCBkaWUgYnkgdGhlIHN3b3JkLg==" },
- { "They say that if you play like a monster you'll have a better game.",
+ { "They say that if you play like a monster you'll have a better game.",
"VGhleSBzYXkgdGhhdCBpZiB5b3UgcGxheSBsaWtlIGEgbW9uc3RlciB5b3UnbGwgaGF2ZSBhIGJldHRlciBnYW1lLg==" },
- { "They say that if you sleep with a demon you might awake with a headache.",
+ { "They say that if you sleep with a demon you might awake with a headache.",
"VGhleSBzYXkgdGhhdCBpZiB5b3Ugc2xlZXAgd2l0aCBhIGRlbW9uIHlvdSBtaWdodCBhd2FrZSB3aXRoIGEgaGVhZGFjaGUu" },
- { "They say that if you step on a crack you could break your mother's back.",
+ { "They say that if you step on a crack you could break your mother's back.",
"VGhleSBzYXkgdGhhdCBpZiB5b3Ugc3RlcCBvbiBhIGNyYWNrIHlvdSBjb3VsZCBicmVhayB5b3VyIG1vdGhlcidzIGJhY2su" },
- { "They say that if you're invisible you can still be heard!",
+ { "They say that if you're invisible you can still be heard!",
"VGhleSBzYXkgdGhhdCBpZiB5b3UncmUgaW52aXNpYmxlIHlvdSBjYW4gc3RpbGwgYmUgaGVhcmQh" },
- { "They say that if you're lucky you can feel the runes on a scroll.",
+ { "They say that if you're lucky you can feel the runes on a scroll.",
"VGhleSBzYXkgdGhhdCBpZiB5b3UncmUgbHVja3kgeW91IGNhbiBmZWVsIHRoZSBydW5lcyBvbiBhIHNjcm9sbC4=" },
- { "They say that in the big picture gold is only small change.",
+ { "They say that in the big picture gold is only small change.",
"VGhleSBzYXkgdGhhdCBpbiB0aGUgYmlnIHBpY3R1cmUgZ29sZCBpcyBvbmx5IHNtYWxsIGNoYW5nZS4=" },
- { "They say that in the dungeon it's not what you know that really matters.",
+ { "They say that in the dungeon it's not what you know that really matters.",
"VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiBpdCdzIG5vdCB3aGF0IHlvdSBrbm93IHRoYXQgcmVhbGx5IG1hdHRlcnMu" },
- { "They say that in the dungeon moon rocks are really dilithium crystals.",
+ { "They say that in the dungeon moon rocks are really dilithium crystals.",
"VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiBtb29uIHJvY2tzIGFyZSByZWFsbHkgZGlsaXRoaXVtIGNyeXN0YWxzLg==" },
- { "They say that in the dungeon the boorish customer is never right.",
+ { "They say that in the dungeon the boorish customer is never right.",
"VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB0aGUgYm9vcmlzaCBjdXN0b21lciBpcyBuZXZlciByaWdodC4=" },
- { "They say that in the dungeon you don't need a watch to tell time.",
+ { "They say that in the dungeon you don't need a watch to tell time.",
"VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB5b3UgZG9uJ3QgbmVlZCBhIHdhdGNoIHRvIHRlbGwgdGltZS4=" },
- { "They say that in the dungeon you need something old, new, burrowed and blue.",
+ { "They say that in the dungeon you need something old, new, burrowed and blue.",
"VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB5b3UgbmVlZCBzb21ldGhpbmcgb2xkLCBuZXcsIGJ1cnJvd2VkIGFuZCBibHVlLg==" },
- { "They say that in the dungeon you should always count your blessings.",
+ { "They say that in the dungeon you should always count your blessings.",
"VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB5b3Ugc2hvdWxkIGFsd2F5cyBjb3VudCB5b3VyIGJsZXNzaW5ncy4=" },
- { "They say that iron golem plate mail isn't worth wishing for.",
+ { "They say that iron golem plate mail isn't worth wishing for.",
"VGhleSBzYXkgdGhhdCBpcm9uIGdvbGVtIHBsYXRlIG1haWwgaXNuJ3Qgd29ydGggd2lzaGluZyBmb3Iu" },
- { "They say that it takes four quarterstaffs to make one staff.",
+ { "They say that it takes four quarterstaffs to make one staff.",
"VGhleSBzYXkgdGhhdCBpdCB0YWtlcyBmb3VyIHF1YXJ0ZXJzdGFmZnMgdG8gbWFrZSBvbmUgc3RhZmYu" },
- { "They say that it's not over till the fat ladies sing.",
+ { "They say that it's not over till the fat ladies sing.",
"VGhleSBzYXkgdGhhdCBpdCdzIG5vdCBvdmVyIHRpbGwgdGhlIGZhdCBsYWRpZXMgc2luZy4=" },
- { "They say that it's not over till the fat lady shouts `Off with its head'.",
+ { "They say that it's not over till the fat lady shouts `Off with its head'.",
"VGhleSBzYXkgdGhhdCBpdCdzIG5vdCBvdmVyIHRpbGwgdGhlIGZhdCBsYWR5IHNob3V0cyBgT2ZmIHdpdGggaXRzIGhlYWQnLg==" },
- { "They say that kicking a heavy statue is really a dumb move.",
+ { "They say that kicking a heavy statue is really a dumb move.",
"VGhleSBzYXkgdGhhdCBraWNraW5nIGEgaGVhdnkgc3RhdHVlIGlzIHJlYWxseSBhIGR1bWIgbW92ZS4=" },
- { "They say that kicking a valuable gem doesn't seem to make sense.",
+ { "They say that kicking a valuable gem doesn't seem to make sense.",
"VGhleSBzYXkgdGhhdCBraWNraW5nIGEgdmFsdWFibGUgZ2VtIGRvZXNuJ3Qgc2VlbSB0byBtYWtlIHNlbnNlLg==" },
- { "They say that leprechauns know Latin and you should too.",
+ { "They say that leprechauns know Latin and you should too.",
"VGhleSBzYXkgdGhhdCBsZXByZWNoYXVucyBrbm93IExhdGluIGFuZCB5b3Ugc2hvdWxkIHRvby4=" },
- { "They say that minotaurs get lost outside of the mazes.",
+ { "They say that minotaurs get lost outside of the mazes.",
"VGhleSBzYXkgdGhhdCBtaW5vdGF1cnMgZ2V0IGxvc3Qgb3V0c2lkZSBvZiB0aGUgbWF6ZXMu" },
- { "They say that most trolls are born again.",
+ { "They say that most trolls are born again.",
"VGhleSBzYXkgdGhhdCBtb3N0IHRyb2xscyBhcmUgYm9ybiBhZ2Fpbi4=" },
- { "They say that naming your cat Garfield will make you more attractive.",
+ { "They say that naming your cat Garfield will make you more attractive.",
"VGhleSBzYXkgdGhhdCBuYW1pbmcgeW91ciBjYXQgR2FyZmllbGQgd2lsbCBtYWtlIHlvdSBtb3JlIGF0dHJhY3RpdmUu" },
- { "They say that no one knows everything about everything in the dungeon.",
+ { "They say that no one knows everything about everything in the dungeon.",
"VGhleSBzYXkgdGhhdCBubyBvbmUga25vd3MgZXZlcnl0aGluZyBhYm91dCBldmVyeXRoaW5nIGluIHRoZSBkdW5nZW9uLg==" },
- { "They say that no one plays NetHack just for the fun of it.",
+ { "They say that no one plays NetHack just for the fun of it.",
"VGhleSBzYXkgdGhhdCBubyBvbmUgcGxheXMgTmV0SGFjayBqdXN0IGZvciB0aGUgZnVuIG9mIGl0Lg==" },
- { "They say that no one really subscribes to rec.games.roguelike.nethack.",
+ { "They say that no one really subscribes to rec.games.roguelike.nethack.",
"VGhleSBzYXkgdGhhdCBubyBvbmUgcmVhbGx5IHN1YnNjcmliZXMgdG8gcmVjLmdhbWVzLnJvZ3VlbGlrZS5uZXRoYWNrLg==" },
- { "They say that no one will admit to starting a rumor.",
+ { "They say that no one will admit to starting a rumor.",
"VGhleSBzYXkgdGhhdCBubyBvbmUgd2lsbCBhZG1pdCB0byBzdGFydGluZyBhIHJ1bW9yLg==" },
- { "They say that nurses sometimes carry scalpels and never use them.",
+ { "They say that nurses sometimes carry scalpels and never use them.",
"VGhleSBzYXkgdGhhdCBudXJzZXMgc29tZXRpbWVzIGNhcnJ5IHNjYWxwZWxzIGFuZCBuZXZlciB1c2UgdGhlbS4=" },
- { "They say that once you've met one wizard you've met them all.",
+ { "They say that once you've met one wizard you've met them all.",
"VGhleSBzYXkgdGhhdCBvbmNlIHlvdSd2ZSBtZXQgb25lIHdpemFyZCB5b3UndmUgbWV0IHRoZW0gYWxsLg==" },
- { "They say that one troll is worth 10,000 newts.",
+ { "They say that one troll is worth 10,000 newts.",
"VGhleSBzYXkgdGhhdCBvbmUgdHJvbGwgaXMgd29ydGggMTAsMDAwIG5ld3RzLg==" },
- { "They say that only David can find the zoo!",
+ { "They say that only David can find the zoo!",
"VGhleSBzYXkgdGhhdCBvbmx5IERhdmlkIGNhbiBmaW5kIHRoZSB6b28h" },
- { "They say that only angels play their harps for their pets.",
+ { "They say that only angels play their harps for their pets.",
"VGhleSBzYXkgdGhhdCBvbmx5IGFuZ2VscyBwbGF5IHRoZWlyIGhhcnBzIGZvciB0aGVpciBwZXRzLg==" },
- { "They say that only big spenders carry gold.",
+ { "They say that only big spenders carry gold.",
"VGhleSBzYXkgdGhhdCBvbmx5IGJpZyBzcGVuZGVycyBjYXJyeSBnb2xkLg==" },
- { "They say that orc shamans are healthy, wealthy and wise.",
+ { "They say that orc shamans are healthy, wealthy and wise.",
"VGhleSBzYXkgdGhhdCBvcmMgc2hhbWFucyBhcmUgaGVhbHRoeSwgd2VhbHRoeSBhbmQgd2lzZS4=" },
- { "They say that playing NetHack is like walking into a death trap.",
+ { "They say that playing NetHack is like walking into a death trap.",
"VGhleSBzYXkgdGhhdCBwbGF5aW5nIE5ldEhhY2sgaXMgbGlrZSB3YWxraW5nIGludG8gYSBkZWF0aCB0cmFwLg==" },
- { "They say that problem breathing is best treated by a proper diet.",
+ { "They say that problem breathing is best treated by a proper diet.",
"VGhleSBzYXkgdGhhdCBwcm9ibGVtIGJyZWF0aGluZyBpcyBiZXN0IHRyZWF0ZWQgYnkgYSBwcm9wZXIgZGlldC4=" },
- { "They say that quaffing many potions of levitation can give you a headache.",
+ { "They say that quaffing many potions of levitation can give you a headache.",
"VGhleSBzYXkgdGhhdCBxdWFmZmluZyBtYW55IHBvdGlvbnMgb2YgbGV2aXRhdGlvbiBjYW4gZ2l2ZSB5b3UgYSBoZWFkYWNoZS4=" },
- { "They say that queen bees get that way by eating royal jelly.",
+ { "They say that queen bees get that way by eating royal jelly.",
"VGhleSBzYXkgdGhhdCBxdWVlbiBiZWVzIGdldCB0aGF0IHdheSBieSBlYXRpbmcgcm95YWwgamVsbHku" },
- { "They say that reading a scare monster scroll is the same as saying Elbereth.",
+ { "They say that reading a scare monster scroll is the same as saying Elbereth.",
"VGhleSBzYXkgdGhhdCByZWFkaW5nIGEgc2NhcmUgbW9uc3RlciBzY3JvbGwgaXMgdGhlIHNhbWUgYXMgc2F5aW5nIEVsYmVyZXRoLg==" },
- { "They say that real hackers always are controlled.",
+ { "They say that real hackers always are controlled.",
"VGhleSBzYXkgdGhhdCByZWFsIGhhY2tlcnMgYWx3YXlzIGFyZSBjb250cm9sbGVkLg==" },
- { "They say that real hackers never sleep.",
+ { "They say that real hackers never sleep.",
"VGhleSBzYXkgdGhhdCByZWFsIGhhY2tlcnMgbmV2ZXIgc2xlZXAu" },
- { "They say that shopkeepers are insured by Croesus himself!",
+ { "They say that shopkeepers are insured by Croesus himself!",
"VGhleSBzYXkgdGhhdCBzaG9wa2VlcGVycyBhcmUgaW5zdXJlZCBieSBDcm9lc3VzIGhpbXNlbGYh" },
- { "They say that shopkeepers never carry more than 20 gold pieces, at night.",
+ { "They say that shopkeepers never carry more than 20 gold pieces, at night.",
"VGhleSBzYXkgdGhhdCBzaG9wa2VlcGVycyBuZXZlciBjYXJyeSBtb3JlIHRoYW4gMjAgZ29sZCBwaWVjZXMsIGF0IG5pZ2h0Lg==" },
- { "They say that shopkeepers never sell blessed potions of invisibility.",
+ { "They say that shopkeepers never sell blessed potions of invisibility.",
"VGhleSBzYXkgdGhhdCBzaG9wa2VlcGVycyBuZXZlciBzZWxsIGJsZXNzZWQgcG90aW9ucyBvZiBpbnZpc2liaWxpdHku" },
- { "They say that soldiers wear kid gloves and silly helmets.",
+ { "They say that soldiers wear kid gloves and silly helmets.",
"VGhleSBzYXkgdGhhdCBzb2xkaWVycyB3ZWFyIGtpZCBnbG92ZXMgYW5kIHNpbGx5IGhlbG1ldHMu" },
- { "They say that some Kops are on the take.",
+ { "They say that some Kops are on the take.",
"VGhleSBzYXkgdGhhdCBzb21lIEtvcHMgYXJlIG9uIHRoZSB0YWtlLg==" },
- { "They say that some guards' palms can be greased.",
+ { "They say that some guards' palms can be greased.",
"VGhleSBzYXkgdGhhdCBzb21lIGd1YXJkcycgcGFsbXMgY2FuIGJlIGdyZWFzZWQu" },
- { "They say that some monsters may kiss your boots to stop your drum playing.",
+ { "They say that some monsters may kiss your boots to stop your drum playing.",
"VGhleSBzYXkgdGhhdCBzb21lIG1vbnN0ZXJzIG1heSBraXNzIHlvdXIgYm9vdHMgdG8gc3RvcCB5b3VyIGRydW0gcGxheWluZy4=" },
- { "They say that sometimes you can be the hit of the party when playing a horn.",
+ { "They say that sometimes you can be the hit of the party when playing a horn.",
"VGhleSBzYXkgdGhhdCBzb21ldGltZXMgeW91IGNhbiBiZSB0aGUgaGl0IG9mIHRoZSBwYXJ0eSB3aGVuIHBsYXlpbmcgYSBob3JuLg==" },
- { "They say that the NetHack gods generally welcome your sacrifices.",
+ { "They say that the NetHack gods generally welcome your sacrifices.",
"VGhleSBzYXkgdGhhdCB0aGUgTmV0SGFjayBnb2RzIGdlbmVyYWxseSB3ZWxjb21lIHlvdXIgc2FjcmlmaWNlcy4=" },
- { "They say that the Three Rings are named Vilya, Nenya and Narya.",
+ { "They say that the Three Rings are named Vilya, Nenya and Narya.",
"VGhleSBzYXkgdGhhdCB0aGUgVGhyZWUgUmluZ3MgYXJlIG5hbWVkIFZpbHlhLCBOZW55YSBhbmQgTmFyeWEu" },
- { "They say that the Wizard of Yendor has a death wish.",
+ { "They say that the Wizard of Yendor has a death wish.",
"VGhleSBzYXkgdGhhdCB0aGUgV2l6YXJkIG9mIFllbmRvciBoYXMgYSBkZWF0aCB3aXNoLg==" },
- { "They say that the `hair of the dog' is sometimes an effective remedy.",
+ { "They say that the `hair of the dog' is sometimes an effective remedy.",
"VGhleSBzYXkgdGhhdCB0aGUgYGhhaXIgb2YgdGhlIGRvZycgaXMgc29tZXRpbWVzIGFuIGVmZmVjdGl2ZSByZW1lZHku" },
- { "They say that the best time to save your game is now before its too late.",
+ { "They say that the best time to save your game is now before its too late.",
"VGhleSBzYXkgdGhhdCB0aGUgYmVzdCB0aW1lIHRvIHNhdmUgeW91ciBnYW1lIGlzIG5vdyBiZWZvcmUgaXRzIHRvbyBsYXRlLg==" },
- { "They say that the biggest obstacle in NetHack is your mind.",
+ { "They say that the biggest obstacle in NetHack is your mind.",
"VGhleSBzYXkgdGhhdCB0aGUgYmlnZ2VzdCBvYnN0YWNsZSBpbiBOZXRIYWNrIGlzIHlvdXIgbWluZC4=" },
- { "They say that the gods are angry when they hit you with objects.",
+ { "They say that the gods are angry when they hit you with objects.",
"VGhleSBzYXkgdGhhdCB0aGUgZ29kcyBhcmUgYW5ncnkgd2hlbiB0aGV5IGhpdCB5b3Ugd2l0aCBvYmplY3RzLg==" },
- { "They say that the priesthood are specially favored by the gods.",
+ { "They say that the priesthood are specially favored by the gods.",
"VGhleSBzYXkgdGhhdCB0aGUgcHJpZXN0aG9vZCBhcmUgc3BlY2lhbGx5IGZhdm9yZWQgYnkgdGhlIGdvZHMu" },
- { "They say that the way to make a unicorn happy is to give it what it wants.",
+ { "They say that the way to make a unicorn happy is to give it what it wants.",
"VGhleSBzYXkgdGhhdCB0aGUgd2F5IHRvIG1ha2UgYSB1bmljb3JuIGhhcHB5IGlzIHRvIGdpdmUgaXQgd2hhdCBpdCB3YW50cy4=" },
- { "They say that there are no black or white stones, only gray.",
+ { "They say that there are no black or white stones, only gray.",
"VGhleSBzYXkgdGhhdCB0aGVyZSBhcmUgbm8gYmxhY2sgb3Igd2hpdGUgc3RvbmVzLCBvbmx5IGdyYXku" },
- { "They say that there are no skeletons hence there are no skeleton keys.",
+ { "They say that there are no skeletons hence there are no skeleton keys.",
"VGhleSBzYXkgdGhhdCB0aGVyZSBhcmUgbm8gc2tlbGV0b25zIGhlbmNlIHRoZXJlIGFyZSBubyBza2VsZXRvbiBrZXlzLg==" },
- { "They say that there is a clever rogue in every hacker just dying to escape.",
+ { "They say that there is a clever rogue in every hacker just dying to escape.",
"VGhleSBzYXkgdGhhdCB0aGVyZSBpcyBhIGNsZXZlciByb2d1ZSBpbiBldmVyeSBoYWNrZXIganVzdCBkeWluZyB0byBlc2NhcGUu" },
- { "They say that there is no such thing as free advice.",
+ { "They say that there is no such thing as free advice.",
"VGhleSBzYXkgdGhhdCB0aGVyZSBpcyBubyBzdWNoIHRoaW5nIGFzIGZyZWUgYWR2aWNlLg==" },
- { "They say that there is only one way to win at NetHack.",
+ { "They say that there is only one way to win at NetHack.",
"VGhleSBzYXkgdGhhdCB0aGVyZSBpcyBvbmx5IG9uZSB3YXkgdG8gd2luIGF0IE5ldEhhY2su" },
- { "They say that there once was a fearsome chaotic samurai named Luk No.",
+ { "They say that there once was a fearsome chaotic samurai named Luk No.",
"VGhleSBzYXkgdGhhdCB0aGVyZSBvbmNlIHdhcyBhIGZlYXJzb21lIGNoYW90aWMgc2FtdXJhaSBuYW1lZCBMdWsgTm8u" },
- { "They say that there was a time when cursed holy water wasn't water.",
+ { "They say that there was a time when cursed holy water wasn't water.",
"VGhleSBzYXkgdGhhdCB0aGVyZSB3YXMgYSB0aW1lIHdoZW4gY3Vyc2VkIGhvbHkgd2F0ZXIgd2Fzbid0IHdhdGVyLg==" },
- { "They say that there's no point in crying over a gray ooze.",
+ { "They say that there's no point in crying over a gray ooze.",
"VGhleSBzYXkgdGhhdCB0aGVyZSdzIG5vIHBvaW50IGluIGNyeWluZyBvdmVyIGEgZ3JheSBvb3plLg==" },
- { "They say that there's only hope left after you've opened Pandora's box.",
+ { "They say that there's only hope left after you've opened Pandora's box.",
"VGhleSBzYXkgdGhhdCB0aGVyZSdzIG9ubHkgaG9wZSBsZWZ0IGFmdGVyIHlvdSd2ZSBvcGVuZWQgUGFuZG9yYSdzIGJveC4=" },
- { "They say that trapdoors should always be marked `Caution: Trap Door'.",
+ { "They say that trapdoors should always be marked `Caution: Trap Door'.",
"VGhleSBzYXkgdGhhdCB0cmFwZG9vcnMgc2hvdWxkIGFsd2F5cyBiZSBtYXJrZWQgYENhdXRpb246IFRyYXAgRG9vcicu" },
- { "They say that using an amulet of change isn't a difficult operation.",
+ { "They say that using an amulet of change isn't a difficult operation.",
"VGhleSBzYXkgdGhhdCB1c2luZyBhbiBhbXVsZXQgb2YgY2hhbmdlIGlzbid0IGEgZGlmZmljdWx0IG9wZXJhdGlvbi4=" },
- { "They say that water walking boots are better if you are fast like Hermes.",
+ { "They say that water walking boots are better if you are fast like Hermes.",
"VGhleSBzYXkgdGhhdCB3YXRlciB3YWxraW5nIGJvb3RzIGFyZSBiZXR0ZXIgaWYgeW91IGFyZSBmYXN0IGxpa2UgSGVybWVzLg==" },
- { "They say that when you wear a circular amulet you might resemble a troll.",
+ { "They say that when you wear a circular amulet you might resemble a troll.",
"VGhleSBzYXkgdGhhdCB3aGVuIHlvdSB3ZWFyIGEgY2lyY3VsYXIgYW11bGV0IHlvdSBtaWdodCByZXNlbWJsZSBhIHRyb2xsLg==" },
- { "They say that when you're hungry you can get a pizza in 30 moves or it's free.",
+ { "They say that when you're hungry you can get a pizza in 30 moves or it's free.",
"VGhleSBzYXkgdGhhdCB3aGVuIHlvdSdyZSBodW5ncnkgeW91IGNhbiBnZXQgYSBwaXp6YSBpbiAzMCBtb3ZlcyBvciBpdCdzIGZyZWUu" },
- { "They say that when your god is angry you should try another one.",
+ { "They say that when your god is angry you should try another one.",
"VGhleSBzYXkgdGhhdCB3aGVuIHlvdXIgZ29kIGlzIGFuZ3J5IHlvdSBzaG91bGQgdHJ5IGFub3RoZXIgb25lLg==" },
- { "They say that wielding a unicorn horn takes strength.",
+ { "They say that wielding a unicorn horn takes strength.",
"VGhleSBzYXkgdGhhdCB3aWVsZGluZyBhIHVuaWNvcm4gaG9ybiB0YWtlcyBzdHJlbmd0aC4=" },
- { "They say that with speed boots you never worry about hit and run accidents.",
+ { "They say that with speed boots you never worry about hit and run accidents.",
"VGhleSBzYXkgdGhhdCB3aXRoIHNwZWVkIGJvb3RzIHlvdSBuZXZlciB3b3JyeSBhYm91dCBoaXQgYW5kIHJ1biBhY2NpZGVudHMu" },
- { "They say that you can defeat a killer bee with a unicorn horn.",
+ { "They say that you can defeat a killer bee with a unicorn horn.",
"VGhleSBzYXkgdGhhdCB5b3UgY2FuIGRlZmVhdCBhIGtpbGxlciBiZWUgd2l0aCBhIHVuaWNvcm4gaG9ybi4=" },
- { "They say that you can only cross the River Styx in Charon's boat.",
+ { "They say that you can only cross the River Styx in Charon's boat.",
"VGhleSBzYXkgdGhhdCB5b3UgY2FuIG9ubHkgY3Jvc3MgdGhlIFJpdmVyIFN0eXggaW4gQ2hhcm9uJ3MgYm9hdC4=" },
- { "They say that you can only kill a lich once and then you'd better be careful.",
+ { "They say that you can only kill a lich once and then you'd better be careful.",
"VGhleSBzYXkgdGhhdCB5b3UgY2FuIG9ubHkga2lsbCBhIGxpY2ggb25jZSBhbmQgdGhlbiB5b3UnZCBiZXR0ZXIgYmUgY2FyZWZ1bC4=" },
- { "They say that you can only wish for things you've already had.",
+ { "They say that you can only wish for things you've already had.",
"VGhleSBzYXkgdGhhdCB5b3UgY2FuIG9ubHkgd2lzaCBmb3IgdGhpbmdzIHlvdSd2ZSBhbHJlYWR5IGhhZC4=" },
- { "They say that you can train a cat by talking gently to it.",
+ { "They say that you can train a cat by talking gently to it.",
"VGhleSBzYXkgdGhhdCB5b3UgY2FuIHRyYWluIGEgY2F0IGJ5IHRhbGtpbmcgZ2VudGx5IHRvIGl0Lg==" },
- { "They say that you can train a dog by talking firmly to it.",
+ { "They say that you can train a dog by talking firmly to it.",
"VGhleSBzYXkgdGhhdCB5b3UgY2FuIHRyYWluIGEgZG9nIGJ5IHRhbGtpbmcgZmlybWx5IHRvIGl0Lg==" },
- { "They say that you can trust your gold with the king.",
+ { "They say that you can trust your gold with the king.",
"VGhleSBzYXkgdGhhdCB5b3UgY2FuIHRydXN0IHlvdXIgZ29sZCB3aXRoIHRoZSBraW5nLg==" },
- { "They say that you can't wipe your greasy bare hands on a blank scroll.",
+ { "They say that you can't wipe your greasy bare hands on a blank scroll.",
"VGhleSBzYXkgdGhhdCB5b3UgY2FuJ3Qgd2lwZSB5b3VyIGdyZWFzeSBiYXJlIGhhbmRzIG9uIGEgYmxhbmsgc2Nyb2xsLg==" },
- { "They say that you cannot trust scrolls of rumor.",
+ { "They say that you cannot trust scrolls of rumor.",
"VGhleSBzYXkgdGhhdCB5b3UgY2Fubm90IHRydXN0IHNjcm9sbHMgb2YgcnVtb3Iu" },
- { "They say that you could fall head over heels for an energy vortex.",
+ { "They say that you could fall head over heels for an energy vortex.",
"VGhleSBzYXkgdGhhdCB5b3UgY291bGQgZmFsbCBoZWFkIG92ZXIgaGVlbHMgZm9yIGFuIGVuZXJneSB2b3J0ZXgu" },
- { "They say that you need a key in order to open locked doors.",
+ { "They say that you need a key in order to open locked doors.",
"VGhleSBzYXkgdGhhdCB5b3UgbmVlZCBhIGtleSBpbiBvcmRlciB0byBvcGVuIGxvY2tlZCBkb29ycy4=" },
- { "They say that you need a mirror to notice a mimic in an antique shop.",
+ { "They say that you need a mirror to notice a mimic in an antique shop.",
"VGhleSBzYXkgdGhhdCB5b3UgbmVlZCBhIG1pcnJvciB0byBub3RpY2UgYSBtaW1pYyBpbiBhbiBhbnRpcXVlIHNob3Au" },
- { "They say that you really can use a pick-axe unless you really can't.",
+ { "They say that you really can use a pick-axe unless you really can't.",
"VGhleSBzYXkgdGhhdCB5b3UgcmVhbGx5IGNhbiB1c2UgYSBwaWNrLWF4ZSB1bmxlc3MgeW91IHJlYWxseSBjYW4ndC4=" },
- { "They say that you should always store your tools in the cellar.",
+ { "They say that you should always store your tools in the cellar.",
"VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIGFsd2F5cyBzdG9yZSB5b3VyIHRvb2xzIGluIHRoZSBjZWxsYXIu" },
- { "They say that you should be careful while climbing the ladder to success.",
+ { "They say that you should be careful while climbing the ladder to success.",
"VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIGJlIGNhcmVmdWwgd2hpbGUgY2xpbWJpbmcgdGhlIGxhZGRlciB0byBzdWNjZXNzLg==" },
- { "They say that you should call your armor `rustproof'.",
+ { "They say that you should call your armor `rustproof'.",
"VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIGNhbGwgeW91ciBhcm1vciBgcnVzdHByb29mJy4=" },
- { "They say that you should name your dog Spuds to have a cool pet.",
+ { "They say that you should name your dog Spuds to have a cool pet.",
"VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5hbWUgeW91ciBkb2cgU3B1ZHMgdG8gaGF2ZSBhIGNvb2wgcGV0Lg==" },
- { "They say that you should name your weapon after your first monster kill.",
+ { "They say that you should name your weapon after your first monster kill.",
"VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5hbWUgeW91ciB3ZWFwb24gYWZ0ZXIgeW91ciBmaXJzdCBtb25zdGVyIGtpbGwu" },
- { "They say that you should never introduce a rope golem to a succubus.",
+ { "They say that you should never introduce a rope golem to a succubus.",
"VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5ldmVyIGludHJvZHVjZSBhIHJvcGUgZ29sZW0gdG8gYSBzdWNjdWJ1cy4=" },
- { "They say that you should never sleep near invisible ring wraiths.",
+ { "They say that you should never sleep near invisible ring wraiths.",
"VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5ldmVyIHNsZWVwIG5lYXIgaW52aXNpYmxlIHJpbmcgd3JhaXRocy4=" },
- { "They say that you should never try to leave the dungeon with a bag of gems.",
+ { "They say that you should never try to leave the dungeon with a bag of gems.",
"VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5ldmVyIHRyeSB0byBsZWF2ZSB0aGUgZHVuZ2VvbiB3aXRoIGEgYmFnIG9mIGdlbXMu" },
- { "They say that you should remove your armor before sitting on a throne.",
+ { "They say that you should remove your armor before sitting on a throne.",
"VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIHJlbW92ZSB5b3VyIGFybW9yIGJlZm9yZSBzaXR0aW5nIG9uIGEgdGhyb25lLg==" },
- { "This fortune cookie is copy protected.",
+ { "This fortune cookie is copy protected.",
"VGhpcyBmb3J0dW5lIGNvb2tpZSBpcyBjb3B5IHByb3RlY3RlZC4=" },
- { "This fortune cookie is the property of Fortune Cookies, Inc.",
+ { "This fortune cookie is the property of Fortune Cookies, Inc.",
"VGhpcyBmb3J0dW5lIGNvb2tpZSBpcyB0aGUgcHJvcGVydHkgb2YgRm9ydHVuZSBDb29raWVzLCBJbmMu" },
- { "Tired? Try a scroll of charging on yourself.",
+ { "Tired? Try a scroll of charging on yourself.",
"VGlyZWQ/IFRyeSBhIHNjcm9sbCBvZiBjaGFyZ2luZyBvbiB5b3Vyc2VsZi4=" },
- { "To achieve the next higher rating, you need 3 more points.",
+ { "To achieve the next higher rating, you need 3 more points.",
"VG8gYWNoaWV2ZSB0aGUgbmV4dCBoaWdoZXIgcmF0aW5nLCB5b3UgbmVlZCAzIG1vcmUgcG9pbnRzLg==" },
- { "To reach heaven, escape the dungeon while wearing a ring of levitation.",
+ { "To reach heaven, escape the dungeon while wearing a ring of levitation.",
"VG8gcmVhY2ggaGVhdmVuLCBlc2NhcGUgdGhlIGR1bmdlb24gd2hpbGUgd2VhcmluZyBhIHJpbmcgb2YgbGV2aXRhdGlvbi4=" },
- { "Tourists wear shirts loud enough to wake the dead.",
+ { "Tourists wear shirts loud enough to wake the dead.",
"VG91cmlzdHMgd2VhciBzaGlydHMgbG91ZCBlbm91Z2ggdG8gd2FrZSB0aGUgZGVhZC4=" },
- { "Try calling your katana Moulinette.",
+ { "Try calling your katana Moulinette.",
"VHJ5IGNhbGxpbmcgeW91ciBrYXRhbmEgTW91bGluZXR0ZS4=" },
- { "Ulch! That meat was painted!",
+ { "Ulch! That meat was painted!",
"VWxjaCEgVGhhdCBtZWF0IHdhcyBwYWludGVkIQ==" },
- { "Unfortunately, this message was left intentionally blank.",
+ { "Unfortunately, this message was left intentionally blank.",
"VW5mb3J0dW5hdGVseSwgdGhpcyBtZXNzYWdlIHdhcyBsZWZ0IGludGVudGlvbmFsbHkgYmxhbmsu" },
- { "Using a morning star in the evening has no effect.",
+ { "Using a morning star in the evening has no effect.",
"VXNpbmcgYSBtb3JuaW5nIHN0YXIgaW4gdGhlIGV2ZW5pbmcgaGFzIG5vIGVmZmVjdC4=" },
- { "Want a hint? Zap a wand of make invisible on your weapon!",
+ { "Want a hint? Zap a wand of make invisible on your weapon!",
"V2FudCBhIGhpbnQ/IFphcCBhIHdhbmQgb2YgbWFrZSBpbnZpc2libGUgb24geW91ciB3ZWFwb24h" },
- { "Want to ascend in a hurry? Apply at Gizmonic Institute.",
+ { "Want to ascend in a hurry? Apply at Gizmonic Institute.",
"V2FudCB0byBhc2NlbmQgaW4gYSBodXJyeT8gQXBwbHkgYXQgR2l6bW9uaWMgSW5zdGl0dXRlLg==" },
- { "Wanted: shopkeepers. Send a scroll of mail to Mage of Yendor/Level 35/Dungeon.",
+ { "Wanted: shopkeepers. Send a scroll of mail to Mage of Yendor/Level 35/Dungeon.",
"V2FudGVkOiBzaG9wa2VlcGVycy4gU2VuZCBhIHNjcm9sbCBvZiBtYWlsIHRvIE1hZ2Ugb2YgWWVuZG9yL0xldmVsIDM1L0R1bmdlb24u" },
- { "Warning: fortune reading can be hazardous to your health.",
+ { "Warning: fortune reading can be hazardous to your health.",
"V2FybmluZzogZm9ydHVuZSByZWFkaW5nIGNhbiBiZSBoYXphcmRvdXMgdG8geW91ciBoZWFsdGgu" },
- { "We have new ways of detecting treachery...",
+ { "We have new ways of detecting treachery...",
"V2UgaGF2ZSBuZXcgd2F5cyBvZiBkZXRlY3RpbmcgdHJlYWNoZXJ5Li4u" },
- { "Wet towels make great weapons!",
+ { "Wet towels make great weapons!",
"V2V0IHRvd2VscyBtYWtlIGdyZWF0IHdlYXBvbnMh" },
- { "What a pity, you cannot read it!",
+ { "What a pity, you cannot read it!",
"V2hhdCBhIHBpdHksIHlvdSBjYW5ub3QgcmVhZCBpdCE=" },
- { "When a piercer drops in on you, you will be tempted to hit the ceiling!",
+ { "When a piercer drops in on you, you will be tempted to hit the ceiling!",
"V2hlbiBhIHBpZXJjZXIgZHJvcHMgaW4gb24geW91LCB5b3Ugd2lsbCBiZSB0ZW1wdGVkIHRvIGhpdCB0aGUgY2VpbGluZyE=" },
- { "When in a maze follow the right wall and you will never get lost.",
+ { "When in a maze follow the right wall and you will never get lost.",
"V2hlbiBpbiBhIG1hemUgZm9sbG93IHRoZSByaWdodCB3YWxsIGFuZCB5b3Ugd2lsbCBuZXZlciBnZXQgbG9zdC4=" },
- { "When you have a key, you don't have to wait for the guard.",
+ { "When you have a key, you don't have to wait for the guard.",
"V2hlbiB5b3UgaGF2ZSBhIGtleSwgeW91IGRvbid0IGhhdmUgdG8gd2FpdCBmb3IgdGhlIGd1YXJkLg==" },
- { "Why are you wasting time reading fortunes?",
+ { "Why are you wasting time reading fortunes?",
"V2h5IGFyZSB5b3Ugd2FzdGluZyB0aW1lIHJlYWRpbmcgZm9ydHVuZXM/" },
- { "Wish for a master key and open the Magic Memory Vault!",
+ { "Wish for a master key and open the Magic Memory Vault!",
"V2lzaCBmb3IgYSBtYXN0ZXIga2V5IGFuZCBvcGVuIHRoZSBNYWdpYyBNZW1vcnkgVmF1bHQh" },
- { "Wizard expects every monster to do its duty.",
+ { "Wizard expects every monster to do its duty.",
"V2l6YXJkIGV4cGVjdHMgZXZlcnkgbW9uc3RlciB0byBkbyBpdHMgZHV0eS4=" },
- { "Wow! You could've had a potion of fruit juice!",
+ { "Wow! You could've had a potion of fruit juice!",
"V293ISBZb3UgY291bGQndmUgaGFkIGEgcG90aW9uIG9mIGZydWl0IGp1aWNlIQ==" },
- { "Yet Another Silly Message (YASM).",
+ { "Yet Another Silly Message (YASM).",
"WWV0IEFub3RoZXIgU2lsbHkgTWVzc2FnZSAoWUFTTSku" },
- { "You are destined to be misled by a fortune.",
+ { "You are destined to be misled by a fortune.",
"WW91IGFyZSBkZXN0aW5lZCB0byBiZSBtaXNsZWQgYnkgYSBmb3J0dW5lLg==" },
- { "You can get a genuine Amulet of Yendor by doing the following: --More--",
+ { "You can get a genuine Amulet of Yendor by doing the following: --More--",
"WW91IGNhbiBnZXQgYSBnZW51aW5lIEFtdWxldCBvZiBZZW5kb3IgYnkgZG9pbmcgdGhlIGZvbGxvd2luZzogLS1Nb3JlLS0=" },
- { "You can protect yourself from black dragons by doing the following: --More--",
+ { "You can protect yourself from black dragons by doing the following: --More--",
"WW91IGNhbiBwcm90ZWN0IHlvdXJzZWxmIGZyb20gYmxhY2sgZHJhZ29ucyBieSBkb2luZyB0aGUgZm9sbG93aW5nOiAtLU1vcmUtLQ==" },
- { "You can't get by the snake.",
+ { "You can't get by the snake.",
"WW91IGNhbid0IGdldCBieSB0aGUgc25ha2Uu" },
- { "You feel like someone is pulling your leg.",
+ { "You feel like someone is pulling your leg.",
"WW91IGZlZWwgbGlrZSBzb21lb25lIGlzIHB1bGxpbmcgeW91ciBsZWcu" },
- { "You have to outwit the Sphynx or pay her.",
+ { "You have to outwit the Sphynx or pay her.",
"WW91IGhhdmUgdG8gb3V0d2l0IHRoZSBTcGh5bnggb3IgcGF5IGhlci4=" },
- { "You hear the fortune cookie's hissing!",
+ { "You hear the fortune cookie's hissing!",
"WW91IGhlYXIgdGhlIGZvcnR1bmUgY29va2llJ3MgaGlzc2luZyE=" },
- { "You may get rich selling letters, but beware of being blackmailed!",
+ { "You may get rich selling letters, but beware of being blackmailed!",
"WW91IG1heSBnZXQgcmljaCBzZWxsaW5nIGxldHRlcnMsIGJ1dCBiZXdhcmUgb2YgYmVpbmcgYmxhY2ttYWlsZWQh" },
- { "You offend Shai-Hulud by sheathing your crysknife without having drawn blood.",
+ { "You offend Shai-Hulud by sheathing your crysknife without having drawn blood.",
"WW91IG9mZmVuZCBTaGFpLUh1bHVkIGJ5IHNoZWF0aGluZyB5b3VyIGNyeXNrbmlmZSB3aXRob3V0IGhhdmluZyBkcmF3biBibG9vZC4=" },
- { "You swallowed the fortune!",
+ { "You swallowed the fortune!",
"WW91IHN3YWxsb3dlZCB0aGUgZm9ydHVuZSE=" },
- { "You want to regain strength? Two levels ahead is a guesthouse!",
+ { "You want to regain strength? Two levels ahead is a guesthouse!",
"WW91IHdhbnQgdG8gcmVnYWluIHN0cmVuZ3RoPyBUd28gbGV2ZWxzIGFoZWFkIGlzIGEgZ3Vlc3Rob3VzZSE=" },
- { "You will encounter a tall, dark, and gruesome creature...",
+ { "You will encounter a tall, dark, and gruesome creature...",
"WW91IHdpbGwgZW5jb3VudGVyIGEgdGFsbCwgZGFyaywgYW5kIGdydWVzb21lIGNyZWF0dXJlLi4u" },
{ "The End", "VGhlIEVuZA==" }
@@ -1809,7 +1809,7 @@ PRBool test_004(void)
if( 0 != PL_strncmp(result, array[i].cyphertext, clen) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
i, array[i].plaintext, array[i].cyphertext, clen, result);
return PR_FALSE;
}
@@ -1999,7 +1999,7 @@ PRBool test_008(void)
if( 0 != PL_strcmp(rv, array[i].cyphertext) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
i, array[i].plaintext, array[i].cyphertext, rv);
return PR_FALSE;
}
@@ -2294,7 +2294,7 @@ PRBool test_014(void)
if( 0 != PL_strncmp(result, array[i].plaintext, plen) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
i, array[i].cyphertext, array[i].plaintext, plen, result);
return PR_FALSE;
}
@@ -2350,7 +2350,7 @@ PRBool test_015(void)
if( 0 != PL_strncmp(result, array[i].plaintext, plen) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
i, array[i].cyphertext, array[i].plaintext, plen, result);
return PR_FALSE;
}
@@ -2639,7 +2639,7 @@ PRBool test_021(void)
if( 0 != PL_strcmp(rv, array[i].plaintext) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
i, array[i].cyphertext, array[i].plaintext, rv);
PR_DELETE(rv);
return PR_FALSE;
@@ -2695,7 +2695,7 @@ PRBool test_022(void)
if( 0 != PL_strcmp(rv, array[i].plaintext) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
i, array[i].cyphertext, array[i].plaintext, rv);
return PR_FALSE;
}
@@ -2728,7 +2728,7 @@ PRBool test_023(void)
if( 0 != PL_strncmp(result, array[i].cyphertext, clen) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
i, array[i].plaintext, array[i].cyphertext, clen, result);
return PR_FALSE;
}
@@ -2760,7 +2760,7 @@ PRBool test_024(void)
if( 0 != PL_strcmp(rv, array[i].cyphertext) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
i, array[i].plaintext, array[i].cyphertext, rv);
return PR_FALSE;
}
@@ -2808,7 +2808,7 @@ PRBool test_025(void)
if( 0 != PL_strncmp(result, array[i].plaintext, plen) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
i, array[i].cyphertext, array[i].plaintext, plen, result);
return PR_FALSE;
}
@@ -2864,7 +2864,7 @@ PRBool test_026(void)
if( 0 != PL_strncmp(result, array[i].plaintext, plen) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n",
i, array[i].cyphertext, array[i].plaintext, plen, result);
return PR_FALSE;
}
@@ -2895,7 +2895,7 @@ PRBool test_027(void)
if( 0 != PL_strcmp(rv, array[i].plaintext) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
i, array[i].cyphertext, array[i].plaintext, rv);
PR_DELETE(rv);
return PR_FALSE;
@@ -2951,7 +2951,7 @@ PRBool test_028(void)
if( 0 != PL_strcmp(rv, array[i].plaintext) )
{
- printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
+ printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n",
i, array[i].cyphertext, array[i].plaintext, rv);
return PR_FALSE;
}
diff --git a/lib/tests/getopt.c b/lib/tests/getopt.c
index 8737d814..6c59ed4e 100644
--- a/lib/tests/getopt.c
+++ b/lib/tests/getopt.c
@@ -21,7 +21,7 @@ static const PLLongOpt optArray[] = {
};
int
-main(int argc, char **argv)
+main(int argc, char **argv)
{
PLOptState *opt;
PLOptStatus ostat;
@@ -29,7 +29,7 @@ main(int argc, char **argv)
opt = PL_CreateLongOptState(argc, argv, "a:b:c", optArray);
while (PL_OPT_OK == (ostat = PL_GetNextOpt(opt))) {
- if (opt->option == 0 && opt->longOptIndex < 0)
+ if (opt->option == 0 && opt->longOptIndex < 0)
printf("Positional parameter: \"%s\"\n", opt->value);
else
printf("%s option: %x (\'%c\', index %d), argument: \"%s\"\n",
diff --git a/lib/tests/string.c b/lib/tests/string.c
index 7e15d399..220cc437 100644
--- a/lib/tests/string.c
+++ b/lib/tests/string.c
@@ -32,7 +32,7 @@ PRBool test_001(void)
{
if( PL_strlen(array[i].str) != array[i].len )
{
- printf("FAIL (%d: %s->%d, %d)\n", i,
+ printf("FAIL (%d: %s->%d, %d)\n", i,
array[i].str ? array[i].str : "(null)",
PL_strlen(array[i].str), array[i].len);
return PR_FALSE;
@@ -138,8 +138,8 @@ PRBool test_003(void)
{
if( *a != *b )
{
- printf("FAIL %d: %s->%.32s\n", i,
- array[i].str ? array[i].str : "(null)",
+ printf("FAIL %d: %s->%.32s\n", i,
+ array[i].str ? array[i].str : "(null)",
array[i].dest ? array[i].dest : "(null)");
return PR_FALSE;
}
@@ -251,7 +251,7 @@ PRBool test_004(void)
{
if( *a != *b )
{
- printf("FAIL %d: %s != %.32s\n", i,
+ printf("FAIL %d: %s != %.32s\n", i,
array[i].result, array[i].dest);
return PR_FALSE;
}
@@ -278,7 +278,7 @@ PRBool test_004(void)
}
}
}
-
+
printf("PASS\n");
return PR_TRUE;
}
@@ -377,7 +377,7 @@ PRBool test_005(void)
{
if( *a != *b )
{
- printf("FAIL %d: %s != %.32s\n", i,
+ printf("FAIL %d: %s != %.32s\n", i,
array[i].result, array[i].dest);
return PR_FALSE;
}
@@ -389,7 +389,7 @@ PRBool test_005(void)
}
}
}
-
+
printf("PASS\n");
return PR_TRUE;
}
@@ -499,7 +499,7 @@ PRBool test_007(void)
if( (char *)0 == rv )
{
- printf("FAIL %d: %s,%lu -> 0\n", i,
+ printf("FAIL %d: %s,%lu -> 0\n", i,
array[i].str ? array[i].str : "(null)", array[i].len);
return PR_FALSE;
}
@@ -630,7 +630,7 @@ PRBool test_009(void)
PRUint32 length;
PRBool nulled;
const char *result;
- } array[] =
+ } array[] =
{
{ (const char *)0, (const char *)0, 0, PR_FALSE, (const char *)0 },
{ (const char *)0, (const char *)0, 1, PR_FALSE, (const char *)0 },
@@ -760,7 +760,7 @@ PRBool test_010(void)
const char *second;
PRUint32 length;
const char *result;
- } array[] =
+ } array[] =
{
{ (const char *)0, (const char *)0, 0, (const char *)0 },
{ (const char *)0, (const char *)0, 1, (const char *)0 },
@@ -1691,9 +1691,9 @@ PRBool test_019(void)
{
if( (char *)0 != rv )
{
- printf("FAIL %d: %s,%s -> %.32s, not null\n", i,
+ printf("FAIL %d: %s,%s -> %.32s, not null\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
rv);
return PR_FALSE;
}
@@ -1704,7 +1704,7 @@ PRBool test_019(void)
{
printf("FAIL %d: %s,%s -> null, not +%lu\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
array[i].off);
return PR_FALSE;
}
@@ -1713,7 +1713,7 @@ PRBool test_019(void)
{
printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
rv, array[i].str, array[i].off);
return PR_FALSE;
}
@@ -1782,9 +1782,9 @@ PRBool test_020(void)
{
if( (char *)0 != rv )
{
- printf("FAIL %d: %s,%s -> %.32s, not null\n", i,
+ printf("FAIL %d: %s,%s -> %.32s, not null\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
rv);
return PR_FALSE;
}
@@ -1795,7 +1795,7 @@ PRBool test_020(void)
{
printf("FAIL %d: %s,%s -> null, not +%lu\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
array[i].off);
return PR_FALSE;
}
@@ -1804,7 +1804,7 @@ PRBool test_020(void)
{
printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
rv, array[i].str, array[i].off);
return PR_FALSE;
}
@@ -1814,7 +1814,7 @@ PRBool test_020(void)
printf("PASS\n");
return PR_TRUE;
}
-
+
/* PL_strnpbrk */
PRBool test_021(void)
{
@@ -1879,9 +1879,9 @@ PRBool test_021(void)
{
if( (char *)0 != rv )
{
- printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
+ printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
array[i].max, rv);
return PR_FALSE;
}
@@ -1892,7 +1892,7 @@ PRBool test_021(void)
{
printf("FAIL %d: %s,%s/%lu -> null, not +%lu\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
array[i].max, array[i].off);
return PR_FALSE;
}
@@ -1901,7 +1901,7 @@ PRBool test_021(void)
{
printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
array[i].max, rv, array[i].str, array[i].off);
return PR_FALSE;
}
@@ -1985,9 +1985,9 @@ PRBool test_022(void)
{
if( (char *)0 != rv )
{
- printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
+ printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
array[i].max, rv);
return PR_FALSE;
}
@@ -1998,7 +1998,7 @@ PRBool test_022(void)
{
printf("FAIL %d: %s,%s/%lu -> null, not +%lu\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
array[i].max, array[i].off);
return PR_FALSE;
}
@@ -2007,7 +2007,7 @@ PRBool test_022(void)
{
printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
- array[i].chrs ? array[i].chrs : "(null)",
+ array[i].chrs ? array[i].chrs : "(null)",
array[i].max, rv, array[i].str, array[i].off);
return PR_FALSE;
}
@@ -2113,7 +2113,7 @@ PRBool test_023(void)
if( &array[i].str[ array[i].off ] != rv )
{
- printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
+ printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
array[i].sub ? array[i].sub : "(null)",
rv, array[i].str, array[i].off);
@@ -2221,7 +2221,7 @@ PRBool test_024(void)
if( &array[i].str[ array[i].off ] != rv )
{
- printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
+ printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
array[i].sub ? array[i].sub : "(null)",
rv, array[i].str, array[i].off);
@@ -2351,7 +2351,7 @@ PRBool test_025(void)
if( &array[i].str[ array[i].off ] != rv )
{
- printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
+ printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
array[i].sub ? array[i].sub : "(null)",
array[i].max, rv, array[i].str, array[i].off);
@@ -2483,7 +2483,7 @@ PRBool test_026(void)
if( &array[i].str[ array[i].off ] != rv )
{
- printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
+ printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
array[i].sub ? array[i].sub : "(null)",
array[i].max, rv, array[i].str, array[i].off);
@@ -2591,7 +2591,7 @@ PRBool test_027(void)
if( &array[i].str[ array[i].off ] != rv )
{
- printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
+ printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
array[i].sub ? array[i].sub : "(null)",
rv, array[i].str, array[i].off);
@@ -2699,7 +2699,7 @@ PRBool test_028(void)
if( &array[i].str[ array[i].off ] != rv )
{
- printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
+ printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
array[i].sub ? array[i].sub : "(null)",
rv, array[i].str, array[i].off);
@@ -2829,7 +2829,7 @@ PRBool test_029(void)
if( &array[i].str[ array[i].off ] != rv )
{
- printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
+ printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
array[i].sub ? array[i].sub : "(null)",
array[i].max, rv, array[i].str, array[i].off);
@@ -2961,7 +2961,7 @@ PRBool test_030(void)
if( &array[i].str[ array[i].off ] != rv )
{
- printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
+ printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
array[i].str ? array[i].str : "(null)",
array[i].sub ? array[i].sub : "(null)",
array[i].max, rv, array[i].str, array[i].off);
@@ -3003,7 +3003,7 @@ PRBool test_031(void)
PL_strcat(string, tokens[i]);
PL_strcat(string, seps[i]);
}
-
+
/* Scan the string for tokens. */
i = 0;
s1 = string;
diff --git a/pr/include/gencfg.c b/pr/include/gencfg.c
index d7308820..d4da2b7b 100644
--- a/pr/include/gencfg.c
+++ b/pr/include/gencfg.c
@@ -17,7 +17,7 @@
#endif
#endif
-#if defined(__alpha)
+#if defined(__alpha)
#if !(defined(_WIN32)) && !(defined(__linux)) && !(defined(__FreeBSD__))
error - None of _WIN32, __linux, or __FreeBSD__ is defined
#endif
@@ -222,20 +222,20 @@ int main(int argc, char **argv)
fprintf(stream, "#define PR_BITS_PER_INT64 %d\n", bpb * 8);
fprintf(stream, "#define PR_BITS_PER_LONG %d\n", bpb * sizeof(long));
fprintf(stream, "#define PR_BITS_PER_FLOAT %d\n", bpb * sizeof(float));
- fprintf(stream, "#define PR_BITS_PER_DOUBLE %d\n\n",
+ fprintf(stream, "#define PR_BITS_PER_DOUBLE %d\n\n",
bpb * sizeof(double));
fprintf(stream, "#define PR_BITS_PER_BYTE_LOG2 %d\n", Log2(bpb));
- fprintf(stream, "#define PR_BITS_PER_SHORT_LOG2 %d\n",
+ fprintf(stream, "#define PR_BITS_PER_SHORT_LOG2 %d\n",
Log2(bpb * sizeof(short)));
- fprintf(stream, "#define PR_BITS_PER_INT_LOG2 %d\n",
+ fprintf(stream, "#define PR_BITS_PER_INT_LOG2 %d\n",
Log2(bpb * sizeof(int)));
fprintf(stream, "#define PR_BITS_PER_INT64_LOG2 %d\n", 6);
- fprintf(stream, "#define PR_BITS_PER_LONG_LOG2 %d\n",
+ fprintf(stream, "#define PR_BITS_PER_LONG_LOG2 %d\n",
Log2(bpb * sizeof(long)));
- fprintf(stream, "#define PR_BITS_PER_FLOAT_LOG2 %d\n",
+ fprintf(stream, "#define PR_BITS_PER_FLOAT_LOG2 %d\n",
Log2(bpb * sizeof(float)));
- fprintf(stream, "#define PR_BITS_PER_DOUBLE_LOG2 %d\n\n",
+ fprintf(stream, "#define PR_BITS_PER_DOUBLE_LOG2 %d\n\n",
Log2(bpb * sizeof(double)));
fprintf(stream, "#define PR_ALIGN_OF_SHORT %d\n", ALIGN_OF(short));
@@ -243,7 +243,7 @@ int main(int argc, char **argv)
fprintf(stream, "#define PR_ALIGN_OF_LONG %d\n", ALIGN_OF(long));
if (sizeof(INT64) < 8) {
/* this machine doesn't actually support PRInt64's */
- fprintf(stream, "#define PR_ALIGN_OF_INT64 %d\n",
+ fprintf(stream, "#define PR_ALIGN_OF_INT64 %d\n",
ALIGN_OF(fakelonglong));
} else {
fprintf(stream, "#define PR_ALIGN_OF_INT64 %d\n", ALIGN_OF(PRInt64));
diff --git a/pr/include/md/_bsdi.h b/pr/include/md/_bsdi.h
index dbd0ec39..f5ab14a9 100644
--- a/pr/include/md/_bsdi.h
+++ b/pr/include/md/_bsdi.h
@@ -49,7 +49,7 @@
#include <setjmp.h>
#if defined(_PR_BSDI_JMPBUF_IS_ARRAY)
-#define _MD_GET_SP(_t) (_t)->md.context[2]
+#define _MD_GET_SP(_t) (_t)->md.context[2]
#elif defined(_PR_BSDI_JMPBUF_IS_STRUCT)
#define _MD_GET_SP(_t) (_t)->md.context[0].jb_esp
#else
diff --git a/pr/include/md/_darwin.h b/pr/include/md/_darwin.h
index d3210232..fcfc1bbc 100644
--- a/pr/include/md/_darwin.h
+++ b/pr/include/md/_darwin.h
@@ -45,7 +45,7 @@
#else
#define USE_MACH_DYLD
#endif
-#define _PR_HAVE_SOCKADDR_LEN
+#define _PR_HAVE_SOCKADDR_LEN
#define _PR_STAT_HAS_ST_ATIMESPEC
#define _PR_HAVE_LARGE_OFF_T
#define _PR_HAVE_SYSV_SEMAPHORES
diff --git a/pr/include/md/_hpux.h b/pr/include/md/_hpux.h
index ff5243d0..adb9264a 100644
--- a/pr/include/md/_hpux.h
+++ b/pr/include/md/_hpux.h
@@ -25,7 +25,7 @@
#define PR_DLL_SUFFIX ".sl"
#endif
-#define _PR_VMBASE 0x30000000
+#define _PR_VMBASE 0x30000000
#define _PR_STACK_VMBASE 0x50000000
/*
* _USE_BIG_FDS increases the size of fd_set from 256 bytes to
@@ -260,7 +260,7 @@ struct _MDCPU {
#if !defined(PTHREADS_USER)
#define _MD_EARLY_INIT _MD_EarlyInit
#define _MD_FINAL_INIT _PR_UnixInit
-#endif
+#endif
#if defined(HPUX_LW_TIMER)
extern void _PR_HPUX_LW_IntervalInit(void);
diff --git a/pr/include/md/_nspr_pthread.h b/pr/include/md/_nspr_pthread.h
index 7af442cc..8ca38362 100644
--- a/pr/include/md/_nspr_pthread.h
+++ b/pr/include/md/_nspr_pthread.h
@@ -11,7 +11,7 @@
#if defined(PTHREADS_USER)
/*
-** Thread Local Storage
+** Thread Local Storage
*/
extern pthread_key_t current_thread_key;
extern pthread_key_t current_cpu_key;
@@ -24,7 +24,7 @@ extern pthread_key_t intsoff_key;
((struct _PRCPU *) pthread_getspecific(current_cpu_key))
#define _MD_LAST_THREAD() \
((struct PRThread *) pthread_getspecific(last_thread_key))
-
+
#define _MD_SET_CURRENT_THREAD(newval) \
pthread_setspecific(current_thread_key, (void *)newval)
@@ -36,7 +36,7 @@ extern pthread_key_t intsoff_key;
#define _MD_SET_INTSOFF(_val)
#define _MD_GET_INTSOFF() 1
-
+
/*
** Initialize the thread context preparing it to execute _main.
*/
diff --git a/pr/include/md/_os2.h b/pr/include/md/_os2.h
index 330b2912..414663b0 100644
--- a/pr/include/md/_os2.h
+++ b/pr/include/md/_os2.h
@@ -65,7 +65,7 @@ struct _MDSemaphore {
struct _MDCPU {
int unused;
-};
+};
struct _MDThread {
HEV blocked_sema; /* Threads block on this when waiting
@@ -212,7 +212,7 @@ extern PRInt32 _MD_CloseFile(PRInt32 osfd);
#define _MD_GET_SOCKET_ERROR() sock_errno()
#ifndef INADDR_LOOPBACK /* For some reason this is not defined in OS2 tcpip */
/* #define INADDR_LOOPBACK INADDR_ANY */
-#endif
+#endif
#define _MD_INIT_FILEDESC(fd)
extern void _MD_MakeNonblock(PRFileDesc *f);
@@ -324,8 +324,8 @@ extern PRInt32 _MD_Accept(PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen,
/* XXXMB- the IOQ stuff is certainly not working correctly yet. */
/* extern struct _MDLock _pr_ioq_lock; */
-#define _MD_IOQ_LOCK()
-#define _MD_IOQ_UNLOCK()
+#define _MD_IOQ_LOCK()
+#define _MD_IOQ_UNLOCK()
/* --- Initialization stuff --- */
@@ -357,7 +357,7 @@ extern PRStatus _PR_DetachOS2Process(struct PRProcess *process);
/* --- Wait for a child process to terminate --- */
#define _MD_WAIT_PROCESS _PR_WaitOS2Process
-extern PRStatus _PR_WaitOS2Process(struct PRProcess *process,
+extern PRStatus _PR_WaitOS2Process(struct PRProcess *process,
PRInt32 *exitCode);
#define _MD_KILL_PROCESS _PR_KillOS2Process
@@ -498,7 +498,7 @@ extern APIRET (* APIENTRY QueryThreadContext)(TID, ULONG, PCONTEXTRECORD);
*/
#define FreeLibrary(x) DosFreeModule((HMODULE)x)
#define OutputDebugStringA(x)
-
+
extern int _MD_os2_get_nonblocking_connect_error(int osfd);
#endif /* nspr_os2_defs_h___ */
diff --git a/pr/include/md/_os2_errors.h b/pr/include/md/_os2_errors.h
index fa96554f..2ba9b7a1 100644
--- a/pr/include/md/_os2_errors.h
+++ b/pr/include/md/_os2_errors.h
@@ -9,7 +9,7 @@
#include "md/_os2.h"
#ifndef assert
#include <assert.h>
-#endif
+#endif
NSPR_API(void) _MD_os2_map_default_error(PRInt32 err);
#define _PR_MD_MAP_DEFAULT_ERROR _MD_os2_map_default_error
diff --git a/pr/include/md/_pth.h b/pr/include/md/_pth.h
index 7e08d148..9c9012a1 100644
--- a/pr/include/md/_pth.h
+++ b/pr/include/md/_pth.h
@@ -93,14 +93,14 @@
#define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t) (t) = 0
#define _PT_PTHREAD_THR_HANDLE_IS_INVALID(t) (t) == 0
#define _PT_PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st)
-#else
+#else
#error "pthreads is not supported for this architecture"
#endif
#if defined(_PR_PTHREADS)
#define _PT_PTHREAD_ATTR_INIT pthread_attr_init
#define _PT_PTHREAD_ATTR_DESTROY pthread_attr_destroy
-#define _PT_PTHREAD_CREATE(t, a, f, r) pthread_create(t, &a, f, r)
+#define _PT_PTHREAD_CREATE(t, a, f, r) pthread_create(t, &a, f, r)
#define _PT_PTHREAD_KEY_CREATE pthread_key_create
#define _PT_PTHREAD_ATTR_SETSCHEDPOLICY pthread_attr_setschedpolicy
#define _PT_PTHREAD_ATTR_GETSTACKSIZE(a, s) pthread_attr_getstacksize(a, s)
diff --git a/pr/include/md/_solaris.h b/pr/include/md/_solaris.h
index 495ce4cc..9da60ebb 100644
--- a/pr/include/md/_solaris.h
+++ b/pr/include/md/_solaris.h
@@ -82,7 +82,7 @@ struct addrinfo {
struct addrinfo *ai_next;
};
#define AI_CANONNAME 0x0010
-#define AI_V4MAPPED 0x0001
+#define AI_V4MAPPED 0x0001
#define AI_ALL 0x0002
#define AI_ADDRCONFIG 0x0004
#define _PR_HAVE_MD_SOCKADDR_IN6
@@ -203,7 +203,7 @@ NSPR_API(void) _MD_SolarisInit();
#endif /* ! USE_SETJMP */
#include <time.h>
-/*
+/*
* Because clock_gettime() on Solaris/x86 always generates a
* segmentation fault, we use an emulated version _pr_solx86_clock_gettime(),
* which is implemented using gettimeofday().
@@ -320,10 +320,10 @@ NSPR_API(void) _MD_SolarisInit();
#else /* USE_SETJMP */
#define WINDOWSIZE 0
-
+
int getedi(void);
void setedi(int);
-
+
#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
PR_BEGIN_MACRO \
ucontext_t *uc = CONTEXT(_thread); \
diff --git a/pr/include/md/_unixos.h b/pr/include/md/_unixos.h
index 4f9dea43..e0e5db11 100644
--- a/pr/include/md/_unixos.h
+++ b/pr/include/md/_unixos.h
@@ -146,7 +146,7 @@ extern void _MD_unix_init_running_cpu(struct _PRCPU *cpu);
#endif
#if defined(DEBUG) && !defined(DARWIN)
-#if !defined(SOLARIS)
+#if !defined(SOLARIS)
#include <string.h> /* for memset() */
#define _MD_INIT_STACK(ts,REDZONE) \
PR_BEGIN_MACRO \
@@ -191,7 +191,7 @@ extern void _MD_unix_init_running_cpu(struct _PRCPU *cpu);
#endif /* DEBUG */
-#if !defined(SOLARIS)
+#if !defined(SOLARIS)
#define PR_SET_INTSOFF(newval)
@@ -271,7 +271,7 @@ extern void _MD_Wakeup_CPUs(void);
#define _MD_INIT_FILEDESC(fd)
extern void _MD_MakeNonblock(PRFileDesc *fd);
-#define _MD_MAKE_NONBLOCK _MD_MakeNonblock
+#define _MD_MAKE_NONBLOCK _MD_MakeNonblock
/************************************************************************/
@@ -388,7 +388,7 @@ extern PRInt32 _MD_listen(PRFileDesc *fd, PRIntn backlog);
extern PRInt32 _MD_shutdown(PRFileDesc *fd, PRIntn how);
#define _MD_SHUTDOWN _MD_shutdown
-extern PRInt32 _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount,
+extern PRInt32 _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount,
PRIntn flags, PRIntervalTime timeout);
#define _MD_RECV _MD_recv
extern PRInt32 _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount,
diff --git a/pr/include/md/_unixware.h b/pr/include/md/_unixware.h
index ef76f5a1..bebcd811 100644
--- a/pr/include/md/_unixware.h
+++ b/pr/include/md/_unixware.h
@@ -75,7 +75,7 @@
}
/* Machine-dependent (MD) data structures.
- * Don't use SVR4 native threads (yet).
+ * Don't use SVR4 native threads (yet).
*/
struct _MDThread {
diff --git a/pr/include/md/_win95.h b/pr/include/md/_win95.h
index 24e537bb..a4cb03a2 100644
--- a/pr/include/md/_win95.h
+++ b/pr/include/md/_win95.h
@@ -237,12 +237,12 @@ extern PRInt32 _MD_CloseFile(PROsfd osfd);
#define _MD_GETOPENFILEINFO _PR_MD_GETOPENFILEINFO
#define _MD_GETOPENFILEINFO64 _PR_MD_GETOPENFILEINFO64
#define _MD_STAT _PR_MD_STAT
-#define _MD_RENAME _PR_MD_RENAME
-#define _MD_ACCESS _PR_MD_ACCESS
-#define _MD_DELETE _PR_MD_DELETE
-#define _MD_MKDIR _PR_MD_MKDIR
+#define _MD_RENAME _PR_MD_RENAME
+#define _MD_ACCESS _PR_MD_ACCESS
+#define _MD_DELETE _PR_MD_DELETE
+#define _MD_MKDIR _PR_MD_MKDIR
#define _MD_MAKE_DIR _PR_MD_MAKE_DIR
-#define _MD_RMDIR _PR_MD_RMDIR
+#define _MD_RMDIR _PR_MD_RMDIR
#define _MD_LOCKFILE _PR_MD_LOCKFILE
#define _MD_TLOCKFILE _PR_MD_TLOCKFILE
#define _MD_UNLOCKFILE _PR_MD_UNLOCKFILE
@@ -399,13 +399,13 @@ extern PROsfd _MD_Accept(PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen,
#define _MD_WAIT_CV _PR_MD_WAIT_CV
#define _MD_NEW_CV _PR_MD_NEW_CV
#define _MD_FREE_CV _PR_MD_FREE_CV
-#define _MD_NOTIFY_CV _PR_MD_NOTIFY_CV
+#define _MD_NOTIFY_CV _PR_MD_NOTIFY_CV
#define _MD_NOTIFYALL_CV _PR_MD_NOTIFYALL_CV
/* XXXMB- the IOQ stuff is certainly not working correctly yet. */
// extern struct _MDLock _pr_ioq_lock;
-#define _MD_IOQ_LOCK()
-#define _MD_IOQ_UNLOCK()
+#define _MD_IOQ_LOCK()
+#define _MD_IOQ_UNLOCK()
/* --- Initialization stuff --- */
@@ -437,7 +437,7 @@ extern PRStatus _PR_DetachWindowsProcess(struct PRProcess *process);
/* --- Wait for a child process to terminate --- */
#define _MD_WAIT_PROCESS _PR_WaitWindowsProcess
-extern PRStatus _PR_WaitWindowsProcess(struct PRProcess *process,
+extern PRStatus _PR_WaitWindowsProcess(struct PRProcess *process,
PRInt32 *exitCode);
#define _MD_KILL_PROCESS _PR_KillWindowsProcess
diff --git a/pr/include/md/_winnt.h b/pr/include/md/_winnt.h
index 7e5477fd..5946ef7f 100644
--- a/pr/include/md/_winnt.h
+++ b/pr/include/md/_winnt.h
@@ -8,7 +8,7 @@
/* Need to force service-pack 3 extensions to be defined by
** setting _WIN32_WINNT to NT 4.0 for winsock.h, winbase.h, winnt.h.
-*/
+*/
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#elif (_WIN32_WINNT < 0x0400)
@@ -277,12 +277,12 @@ extern PRInt32 _PR_MD_CLOSE(PROsfd osfd, PRBool socket);
#define _MD_GETOPENFILEINFO _PR_MD_GETOPENFILEINFO
#define _MD_GETOPENFILEINFO64 _PR_MD_GETOPENFILEINFO64
#define _MD_STAT _PR_MD_STAT
-#define _MD_RENAME _PR_MD_RENAME
-#define _MD_ACCESS _PR_MD_ACCESS
-#define _MD_DELETE _PR_MD_DELETE
-#define _MD_MKDIR _PR_MD_MKDIR
+#define _MD_RENAME _PR_MD_RENAME
+#define _MD_ACCESS _PR_MD_ACCESS
+#define _MD_DELETE _PR_MD_DELETE
+#define _MD_MKDIR _PR_MD_MKDIR
#define _MD_MAKE_DIR _PR_MD_MAKE_DIR
-#define _MD_RMDIR _PR_MD_RMDIR
+#define _MD_RMDIR _PR_MD_RMDIR
#define _MD_LOCKFILE _PR_MD_LOCKFILE
#define _MD_TLOCKFILE _PR_MD_TLOCKFILE
#define _MD_UNLOCKFILE _PR_MD_UNLOCKFILE
@@ -456,7 +456,7 @@ extern PRStatus _PR_DetachWindowsProcess(struct PRProcess *process);
/* --- Wait for a child process to terminate --- */
#define _MD_WAIT_PROCESS _PR_WaitWindowsProcess
-extern PRStatus _PR_WaitWindowsProcess(struct PRProcess *process,
+extern PRStatus _PR_WaitWindowsProcess(struct PRProcess *process,
PRInt32 *exitCode);
#define _MD_KILL_PROCESS _PR_KillWindowsProcess
diff --git a/pr/include/obsolete/pralarm.h b/pr/include/obsolete/pralarm.h
index 959e74be..f6b6035f 100644
--- a/pr/include/obsolete/pralarm.h
+++ b/pr/include/obsolete/pralarm.h
@@ -8,7 +8,7 @@
** Description: API to periodic alarms.
**
**
-** Alarms are defined to invoke some client specified function at
+** Alarms are defined to invoke some client specified function at
** a time in the future. The notification may be a one time event
** or repeated at a fixed interval. The interval at which the next
** notification takes place may be modified by the client code only
@@ -57,14 +57,14 @@ typedef PRBool (PR_CALLBACK *PRPeriodicAlarmFn)(
** INPUTS: void
** OUTPUTS: None
** RETURN: PRAlarm*
-**
+**
** SIDE EFFECTS:
** This creates an alarm context, which is an object used for subsequent
** notification creations. It also creates a thread that will be used to
** deliver the notifications that are expected to be defined. The client
** is resposible for destroying the context when appropriate.
** RESTRICTIONS:
-** None.
+** None.
** MEMORY: The object (PRAlarm) and a thread to support notifications.
** ALGORITHM: N/A
***********************************************************************/
@@ -77,14 +77,14 @@ NSPR_API(PRAlarm*) PR_CreateAlarm(void);
** INPUTS: PRAlarm*
** OUTPUTS: None
** RETURN: PRStatus
-**
+**
** SIDE EFFECTS:
** This destroys the context that was created by PR_CreateAlarm().
** If there are any active alarms (PRAlarmID), they will be cancelled.
** Once that is done, the thread that was used to deliver the alarms
-** will be joined.
+** will be joined.
** RESTRICTIONS:
-** None.
+** None.
** MEMORY: N/A
** ALGORITHM: N/A
***********************************************************************/
@@ -105,7 +105,7 @@ NSPR_API(PRStatus) PR_DestroyAlarm(PRAlarm *alarm);
** OUTPUTS: None
** RETURN: PRAlarmID* Handle to the notifier just created
** or NULL if the request failed.
-**
+**
** SIDE EFFECTS:
** A periodic notifier is created. The notifications will be delivered
** by the alarm's internal thread at a fixed interval whose rate is the
@@ -114,7 +114,7 @@ NSPR_API(PRStatus) PR_DestroyAlarm(PRAlarm *alarm);
** the notifier routine indicates that they should cease of the alarm
** context is destroyed (PR_DestroyAlarm).
** RESTRICTIONS:
-** None.
+** None.
** MEMORY: Memory for the notifier object.
** ALGORITHM: The rate at which notifications are delivered are stated
** to be "'rate' notifies per 'interval'". The exact time of
@@ -124,7 +124,7 @@ NSPR_API(PRStatus) PR_DestroyAlarm(PRAlarm *alarm);
** notification sequence number. Such notifications have the
** potential to be late by not more than 'interval'/'rate'.
** The amount of lateness of one notification is taken into
-** account on the next in an attempt to avoid long term slew.
+** account on the next in an attempt to avoid long term slew.
***********************************************************************/
NSPR_API(PRAlarmID*) PR_SetAlarm(
PRAlarm *alarm, PRIntervalTime period, PRUint32 rate,
@@ -141,7 +141,7 @@ NSPR_API(PRAlarmID*) PR_SetAlarm(
** the notifies will be delivered.
** OUTPUTS: None
** RETURN: PRStatus Indication of completion.
-**
+**
** SIDE EFFECTS:
** An existing alarm may have its period and rate redefined. The
** additional side effect is that the notifier's epoch is recomputed.
@@ -150,7 +150,7 @@ NSPR_API(PRAlarmID*) PR_SetAlarm(
** RESTRICTIONS:
** This function may only be called in the notifier for that alarm.
** MEMORY: N/A.
-** ALGORITHM: See PR_SetAlarm().
+** ALGORITHM: See PR_SetAlarm().
***********************************************************************/
NSPR_API(PRStatus) PR_ResetAlarm(
PRAlarmID *id, PRIntervalTime period, PRUint32 rate);
diff --git a/pr/include/obsolete/probslet.h b/pr/include/obsolete/probslet.h
index 2eff0ba4..db743c5e 100644
--- a/pr/include/obsolete/probslet.h
+++ b/pr/include/obsolete/probslet.h
@@ -48,51 +48,51 @@ typedef struct PR_fd_set {
** DESCRIPTION:
**
** The call returns as soon as I/O is ready on one or more of the underlying
-** file/socket descriptors or an exceptional condition is pending. A count of the
-** number of ready descriptors is returned unless a timeout occurs in which case
-** zero is returned. On return, PR_Select replaces the given descriptor sets with
+** file/socket descriptors or an exceptional condition is pending. A count of the
+** number of ready descriptors is returned unless a timeout occurs in which case
+** zero is returned. On return, PR_Select replaces the given descriptor sets with
** subsets consisting of those descriptors that are ready for the requested condition.
** The total number of ready descriptors in all the sets is the return value.
**
** INPUTS:
-** PRInt32 num
+** PRInt32 num
** This argument is unused but is provided for select(unix) interface
** compatability. All input PR_fd_set arguments are self-describing
** with its own maximum number of elements in the set.
-**
+**
** PR_fd_set *readfds
** A set describing the io descriptors for which ready for reading
-** condition is of interest.
-**
+** condition is of interest.
+**
** PR_fd_set *writefds
** A set describing the io descriptors for which ready for writing
-** condition is of interest.
-**
+** condition is of interest.
+**
** PR_fd_set *exceptfds
** A set describing the io descriptors for which exception pending
-** condition is of interest.
+** condition is of interest.
+**
+** Any of the above readfds, writefds or exceptfds may be given as NULL
+** pointers if no descriptors are of interest for that particular condition.
**
-** Any of the above readfds, writefds or exceptfds may be given as NULL
-** pointers if no descriptors are of interest for that particular condition.
-**
-** PRIntervalTime timeout
-** Amount of time the call will block waiting for I/O to become ready.
+** PRIntervalTime timeout
+** Amount of time the call will block waiting for I/O to become ready.
** If this time expires without any I/O becoming ready, the result will
** be zero.
**
-** OUTPUTS:
+** OUTPUTS:
** PR_fd_set *readfds
** A set describing the io descriptors which are ready for reading.
-**
+**
** PR_fd_set *writefds
** A set describing the io descriptors which are ready for writing.
-**
+**
** PR_fd_set *exceptfds
** A set describing the io descriptors which have pending exception.
**
** RETURN:PRInt32
** Number of io descriptors with asked for conditions or zero if the function
-** timed out or -1 on failure. The reason for the failure is obtained by
+** timed out or -1 on failure. The reason for the failure is obtained by
** calling PR_GetError().
** XXX can we implement this on windoze and mac?
**************************************************************************
@@ -101,21 +101,21 @@ NSPR_API(PRInt32) PR_Select(
PRInt32 num, PR_fd_set *readfds, PR_fd_set *writefds,
PR_fd_set *exceptfds, PRIntervalTime timeout);
-/*
+/*
** The following are not thread safe for two threads operating on them at the
** same time.
**
** The following routines are provided for manipulating io descriptor sets.
** PR_FD_ZERO(&fdset) initializes a descriptor set fdset to the null set.
** PR_FD_SET(fd, &fdset) includes a particular file descriptor fd in fdset.
-** PR_FD_CLR(fd, &fdset) removes a file descriptor fd from fdset.
-** PR_FD_ISSET(fd, &fdset) is nonzero if file descriptor fd is a member of
+** PR_FD_CLR(fd, &fdset) removes a file descriptor fd from fdset.
+** PR_FD_ISSET(fd, &fdset) is nonzero if file descriptor fd is a member of
** fdset, zero otherwise.
**
** PR_FD_NSET(osfd, &fdset) includes a particular native file descriptor osfd
** in fdset.
-** PR_FD_NCLR(osfd, &fdset) removes a native file descriptor osfd from fdset.
-** PR_FD_NISSET(osfd, &fdset) is nonzero if native file descriptor osfd is a member of
+** PR_FD_NCLR(osfd, &fdset) removes a native file descriptor osfd from fdset.
+** PR_FD_NISSET(osfd, &fdset) is nonzero if native file descriptor osfd is a member of
** fdset, zero otherwise.
*/
diff --git a/pr/include/obsolete/prsem.h b/pr/include/obsolete/prsem.h
index ee313cb2..d1981d2b 100644
--- a/pr/include/obsolete/prsem.h
+++ b/pr/include/obsolete/prsem.h
@@ -7,8 +7,8 @@
#define prsem_h___
/*
-** API for counting semaphores. Semaphores are counting synchronizing
-** variables based on a lock and a condition variable. They are lightweight
+** API for counting semaphores. Semaphores are counting synchronizing
+** variables based on a lock and a condition variable. They are lightweight
** contention control for a given count of resources.
*/
#include "prtypes.h"
@@ -30,23 +30,23 @@ NSPR_API(void) PR_DestroySem(PRSemaphore *sem);
/*
** Wait on a Semaphore.
-**
-** This routine allows a calling thread to wait or proceed depending upon the
-** state of the semahore sem. The thread can proceed only if the counter value
-** of the semaphore sem is currently greater than 0. If the value of semaphore
-** sem is positive, it is decremented by one and the routine returns immediately
-** allowing the calling thread to continue. If the value of semaphore sem is 0,
-** the calling thread blocks awaiting the semaphore to be released by another
+**
+** This routine allows a calling thread to wait or proceed depending upon the
+** state of the semahore sem. The thread can proceed only if the counter value
+** of the semaphore sem is currently greater than 0. If the value of semaphore
+** sem is positive, it is decremented by one and the routine returns immediately
+** allowing the calling thread to continue. If the value of semaphore sem is 0,
+** the calling thread blocks awaiting the semaphore to be released by another
** thread.
-**
-** This routine can return PR_PENDING_INTERRUPT if the waiting thread
+**
+** This routine can return PR_PENDING_INTERRUPT if the waiting thread
** has been interrupted.
*/
NSPR_API(PRStatus) PR_WaitSem(PRSemaphore *sem);
/*
-** This routine increments the counter value of the semaphore. If other threads
-** are blocked for the semaphore, then the scheduler will determine which ONE
+** This routine increments the counter value of the semaphore. If other threads
+** are blocked for the semaphore, then the scheduler will determine which ONE
** thread will be unblocked.
*/
NSPR_API(void) PR_PostSem(PRSemaphore *sem);
diff --git a/pr/include/prbit.h b/pr/include/prbit.h
index 2ace8997..8a9f53cf 100644
--- a/pr/include/prbit.h
+++ b/pr/include/prbit.h
@@ -19,7 +19,7 @@ PR_BEGIN_EXTERN_C
# include <intrin.h>
# pragma intrinsic(_BitScanForward,_BitScanReverse)
__forceinline static int __prBitScanForward32(unsigned int val)
- {
+ {
unsigned long idx;
_BitScanForward(&idx, (unsigned long)val);
return( (int)idx );
@@ -56,18 +56,18 @@ typedef unsigned long prbitmap_t;
/*
** Compute the log of the least power of 2 greater than or equal to n
*/
-NSPR_API(PRIntn) PR_CeilingLog2(PRUint32 i);
+NSPR_API(PRIntn) PR_CeilingLog2(PRUint32 i);
/*
** Compute the log of the greatest power of 2 less than or equal to n
*/
-NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i);
+NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i);
/*
** Macro version of PR_CeilingLog2: Compute the log of the least power of
** 2 greater than or equal to _n. The result is returned in _log2.
*/
-#ifdef PR_HAVE_BUILTIN_BITSCAN32
+#ifdef PR_HAVE_BUILTIN_BITSCAN32
#define PR_CEILING_LOG2(_log2,_n) \
PR_BEGIN_MACRO \
PRUint32 j_ = (PRUint32)(_n); \
diff --git a/pr/include/prcountr.h b/pr/include/prcountr.h
index 53b6176b..5a134903 100644
--- a/pr/include/prcountr.h
+++ b/pr/include/prcountr.h
@@ -13,43 +13,43 @@
** something." Counters can be dynamically defined, incremented,
** decremented, set, and deleted under application program
** control.
-**
-** The Counter Feature is intended to be used as instrumentation,
-** not as operational data. If you need a counter for operational
-** data, use native integral types.
-**
-** Counters are 32bit unsigned intergers. On overflow, a counter
-** will wrap. No exception is recognized or reported.
-**
+**
+** The Counter Feature is intended to be used as instrumentation,
+** not as operational data. If you need a counter for operational
+** data, use native integral types.
+**
+** Counters are 32bit unsigned intergers. On overflow, a counter
+** will wrap. No exception is recognized or reported.
+**
** A counter can be dynamically created using a two level naming
** convention. A "handle" is returned when the counter is
** created. The counter can subsequently be addressed by its
** handle. An API is provided to get an existing counter's handle
-** given the names with which it was originally created.
+** given the names with which it was originally created.
** Similarly, a counter's name can be retrieved given its handle.
-**
+**
** The counter naming convention is a two-level hierarchy. The
** QName is the higher level of the hierarchy; RName is the
** lower level. RNames can be thought of as existing within a
** QName. The same RName can exist within multiple QNames. QNames
** are unique. The NSPR Counter is not a near-zero overhead
-** feature. Application designers should be aware of
+** feature. Application designers should be aware of
** serialization issues when using the Counter API. Creating a
** counter locks a large asset, potentially causing a stall. This
** suggest that applications should create counters at component
** initialization, for example, and not create and destroy them
** willy-nilly. ... You have been warned.
-**
+**
** Incrementing and Adding to counters uses atomic operations.
** The performance of these operations will vary from platform
** to platform. On platforms where atomic operations are not
** supported the overhead may be substantial.
-**
+**
** When traversing the counter database with FindNext functions,
** the instantaneous values of any given counter is that at the
** moment of extraction. The state of the entire counter database
** may not be viewed as atomic.
-**
+**
** The counter interface may be disabled (No-Op'd) at compile
** time. When DEBUG is defined at compile time, the Counter
** Feature is compiled into NSPR and applications invoking it.
@@ -57,18 +57,18 @@
** nothing. To force the Counter Feature to be compiled into an
** optimized build, define FORCE_NSPR_COUNTERS at compile time
** for both NSPR and the application intending to use it.
-**
+**
** Application designers should use the macro form of the Counter
** Feature methods to minimize performance impact in optimized
** builds. The macros normally compile to nothing on optimized
** builds.
-**
+**
** Application designers should be aware of the effects of
** debug and optimized build differences when using result of the
** Counter Feature macros in expressions.
-**
+**
** The Counter Feature is thread-safe and SMP safe.
-**
+**
** /lth. 09-Jun-1998.
*/
@@ -90,20 +90,20 @@ typedef void * PRCounterHandle;
/* -----------------------------------------------------------------------
** FUNCTION: PR_DEFINE_COUNTER() -- Define a PRCounterHandle
-**
+**
** DESCRIPTION: PR_DEFINE_COUNTER() is used to define a counter
** handle.
-**
+**
*/
#define PR_DEFINE_COUNTER(name) PRCounterHandle name
/* -----------------------------------------------------------------------
** FUNCTION: PR_INIT_COUNTER_HANDLE() -- Set the value of a PRCounterHandle
-**
-** DESCRIPTION:
+**
+** DESCRIPTION:
** PR_INIT_COUNTER_HANDLE() sets the value of a PRCounterHandle
** to value.
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_INIT_COUNTER_HANDLE(handle,value)\
@@ -114,32 +114,32 @@ typedef void * PRCounterHandle;
/* -----------------------------------------------------------------------
** FUNCTION: PR_CreateCounter() -- Create a counter
-**
+**
** DESCRIPTION: PR_CreateCounter() creates a counter object and
** initializes it to zero.
-**
+**
** The macro form takes as its first argument the name of the
** PRCounterHandle to receive the handle returned from
** PR_CreateCounter().
-**
+**
** INPUTS:
** qName: The QName for the counter object. The maximum length
** of qName is defined by PRCOUNTER_NAME_MAX
-**
+**
** rName: The RName for the counter object. The maximum length
** of qName is defined by PRCOUNTER_NAME_MAX
-**
+**
** descrioption: The description of the counter object. The
** maximum length of description is defined by
** PRCOUNTER_DESC_MAX.
-**
+**
** OUTPUTS:
-**
+**
** RETURNS:
** PRCounterHandle.
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_CREATE_COUNTER(handle,qName,rName,description)\
@@ -148,29 +148,29 @@ typedef void * PRCounterHandle;
#define PR_CREATE_COUNTER(handle,qName,rName,description)
#endif
-NSPR_API(PRCounterHandle)
- PR_CreateCounter(
- const char *qName,
- const char *rName,
- const char *description
+NSPR_API(PRCounterHandle)
+ PR_CreateCounter(
+ const char *qName,
+ const char *rName,
+ const char *description
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_DestroyCounter() -- Destroy a counter object.
-**
+**
** DESCRIPTION: PR_DestroyCounter() removes a counter and
** unregisters its handle from the counter database.
-**
+**
** INPUTS:
** handle: the PRCounterHandle of the counter to be destroyed.
-**
-** OUTPUTS:
+**
+** OUTPUTS:
** The counter is destroyed.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_DESTROY_COUNTER(handle) PR_DestroyCounter((handle))
@@ -178,31 +178,31 @@ NSPR_API(PRCounterHandle)
#define PR_DESTROY_COUNTER(handle)
#endif
-NSPR_API(void)
- PR_DestroyCounter(
- PRCounterHandle handle
+NSPR_API(void)
+ PR_DestroyCounter(
+ PRCounterHandle handle
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_GetCounterHandleFromName() -- Retreive a
** counter's handle give its name.
-**
+**
** DESCRIPTION: PR_GetCounterHandleFromName() retreives a
** counter's handle from the counter database, given the name
** the counter was originally created with.
-**
+**
** INPUTS:
** qName: Counter's original QName.
** rName: Counter's original RName.
-**
+**
** OUTPUTS:
-**
-** RETURNS:
+**
+** RETURNS:
** PRCounterHandle or PRCounterError.
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_GET_COUNTER_HANDLE_FROM_NAME(handle,qName,rName)\
@@ -211,31 +211,31 @@ NSPR_API(void)
#define PR_GET_COUNTER_HANDLE_FROM_NAME(handle,qName,rName)
#endif
-NSPR_API(PRCounterHandle)
- PR_GetCounterHandleFromName(
- const char *qName,
- const char *rName
+NSPR_API(PRCounterHandle)
+ PR_GetCounterHandleFromName(
+ const char *qName,
+ const char *rName
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_GetCounterNameFromHandle() -- Retreive a
** counter's name, given its handle.
-**
+**
** DESCRIPTION: PR_GetCounterNameFromHandle() retreives a
** counter's name given its handle.
-**
+**
** INPUTS:
** qName: Where to store a pointer to qName.
** rName: Where to store a pointer to rName.
** description: Where to store a pointer to description.
-**
+**
** OUTPUTS: Pointers to the Counter Feature's copies of the names
** used when the counters were created.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_GET_COUNTER_NAME_FROM_HANDLE(handle,qName,rName,description)\
@@ -244,30 +244,30 @@ NSPR_API(PRCounterHandle)
#define PR_GET_COUNTER_NAME_FROM_HANDLE(handle,qName,rName,description )
#endif
-NSPR_API(void)
- PR_GetCounterNameFromHandle(
- PRCounterHandle handle,
- const char **qName,
- const char **rName,
- const char **description
+NSPR_API(void)
+ PR_GetCounterNameFromHandle(
+ PRCounterHandle handle,
+ const char **qName,
+ const char **rName,
+ const char **description
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_IncrementCounter() -- Add one to the referenced
** counter.
-**
+**
** DESCRIPTION: Add one to the referenced counter.
-**
+**
** INPUTS:
** handle: The PRCounterHandle of the counter to be incremented
-**
+**
** OUTPUTS: The counter is incrementd.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_INCREMENT_COUNTER(handle) PR_IncrementCounter(handle)
@@ -275,8 +275,8 @@ NSPR_API(void)
#define PR_INCREMENT_COUNTER(handle)
#endif
-NSPR_API(void)
- PR_IncrementCounter(
+NSPR_API(void)
+ PR_IncrementCounter(
PRCounterHandle handle
);
@@ -284,19 +284,19 @@ NSPR_API(void)
/* -----------------------------------------------------------------------
** FUNCTION: PR_DecrementCounter() -- Subtract one from the
** referenced counter
-**
+**
** DESCRIPTION: Subtract one from the referenced counter.
-**
-** INPUTS:
+**
+** INPUTS:
** handle: The PRCounterHandle of the coutner to be
** decremented.
-**
+**
** OUTPUTS: the counter is decremented.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_DECREMENT_COUNTER(handle) PR_DecrementCounter(handle)
@@ -304,27 +304,27 @@ NSPR_API(void)
#define PR_DECREMENT_COUNTER(handle)
#endif
-NSPR_API(void)
- PR_DecrementCounter(
+NSPR_API(void)
+ PR_DecrementCounter(
PRCounterHandle handle
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_AddToCounter() -- Add a value to a counter.
-**
+**
** DESCRIPTION: Add value to the counter referenced by handle.
-**
+**
** INPUTS:
** handle: the PRCounterHandle of the counter to be added to.
-**
+**
** value: the value to be added to the counter.
-**
+**
** OUTPUTS: new value for counter.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_ADD_TO_COUNTER(handle,value)\
@@ -333,32 +333,32 @@ NSPR_API(void)
#define PR_ADD_TO_COUNTER(handle,value)
#endif
-NSPR_API(void)
- PR_AddToCounter(
- PRCounterHandle handle,
- PRUint32 value
+NSPR_API(void)
+ PR_AddToCounter(
+ PRCounterHandle handle,
+ PRUint32 value
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_SubtractFromCounter() -- A value is subtracted
** from a counter.
-**
+**
** DESCRIPTION:
** Subtract a value from a counter.
-**
+**
** INPUTS:
** handle: the PRCounterHandle of the counter to be subtracted
** from.
-**
+**
** value: the value to be subtracted from the counter.
-**
+**
** OUTPUTS: new value for counter
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_SUBTRACT_FROM_COUNTER(handle,value)\
@@ -367,28 +367,28 @@ NSPR_API(void)
#define PR_SUBTRACT_FROM_COUNTER(handle,value)
#endif
-NSPR_API(void)
- PR_SubtractFromCounter(
- PRCounterHandle handle,
- PRUint32 value
+NSPR_API(void)
+ PR_SubtractFromCounter(
+ PRCounterHandle handle,
+ PRUint32 value
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_GetCounter() -- Retreive the value of a counter
-**
+**
** DESCRIPTION:
** Retreive the value of a counter.
-**
+**
** INPUTS:
** handle: the PR_CounterHandle of the counter to be retreived
-**
+**
** OUTPUTS:
-**
+**
** RETURNS: The value of the referenced counter
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_GET_COUNTER(counter,handle)\
@@ -397,30 +397,30 @@ NSPR_API(void)
#define PR_GET_COUNTER(counter,handle) 0
#endif
-NSPR_API(PRUint32)
- PR_GetCounter(
- PRCounterHandle handle
+NSPR_API(PRUint32)
+ PR_GetCounter(
+ PRCounterHandle handle
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_SetCounter() -- Replace the content of counter
** with value.
-**
+**
** DESCRIPTION: The contents of the referenced counter are
** replaced by value.
-**
+**
** INPUTS:
** handle: the PRCounterHandle of the counter whose contents
** are to be replaced.
-**
+**
** value: the new value of the counter.
-**
+**
** OUTPUTS:
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_SET_COUNTER(handle,value) PR_SetCounter((handle),(value))
@@ -428,17 +428,17 @@ NSPR_API(PRUint32)
#define PR_SET_COUNTER(handle,value)
#endif
-NSPR_API(void)
- PR_SetCounter(
- PRCounterHandle handle,
- PRUint32 value
+NSPR_API(void)
+ PR_SetCounter(
+ PRCounterHandle handle,
+ PRUint32 value
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_FindNextCounterQname() -- Retreive the next QName counter
** handle iterator
-**
+**
** DESCRIPTION:
** PR_FindNextCounterQname() retreives the first or next Qname
** the counter data base, depending on the value of handle. When
@@ -446,23 +446,23 @@ NSPR_API(void)
** QName handle in the database. When handle is a handle previosly
** retreived QName handle, then the function attempts to retreive
** the next QName handle.
-**
-** INPUTS:
+**
+** INPUTS:
** handle: PRCounterHandle or NULL.
-**
+**
** OUTPUTS: returned
-**
+**
** RETURNS: PRCounterHandle or NULL when no more QName counter
** handles are present.
-**
+**
** RESTRICTIONS:
** A concurrent PR_CreateCounter() or PR_DestroyCounter() may
** cause unpredictable results.
-**
+**
** A PRCounterHandle returned from this function may only be used
** in another PR_FindNextCounterQname() function call; other
** operations may cause unpredictable results.
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_FIND_NEXT_COUNTER_QNAME(next,handle)\
@@ -471,15 +471,15 @@ NSPR_API(void)
#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) NULL
#endif
-NSPR_API(PRCounterHandle)
- PR_FindNextCounterQname(
+NSPR_API(PRCounterHandle)
+ PR_FindNextCounterQname(
PRCounterHandle handle
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_FindNextCounterRname() -- Retreive the next RName counter
** handle iterator
-**
+**
** DESCRIPTION:
** PR_FindNextCounterRname() retreives the first or next RNname
** handle from the counter data base, depending on the
@@ -487,25 +487,25 @@ NSPR_API(PRCounterHandle)
** retreive the first RName handle in the database. When handle is
** a handle previosly retreived RName handle, then the function
** attempts to retreive the next RName handle.
-**
+**
** INPUTS:
** handle: PRCounterHandle or NULL.
** qhandle: PRCounterHandle of a previously aquired via
** PR_FIND_NEXT_QNAME_HANDLE()
-**
+**
** OUTPUTS: returned
-**
+**
** RETURNS: PRCounterHandle or NULL when no more RName counter
** handles are present.
-**
+**
** RESTRICTIONS:
** A concurrent PR_CreateCounter() or PR_DestroyCounter() may
** cause unpredictable results.
-**
+**
** A PRCounterHandle returned from this function may only be used
** in another PR_FindNextCounterRname() function call; other
** operations may cause unpredictable results.
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
#define PR_FIND_NEXT_COUNTER_RNAME(next,rhandle,qhandle)\
@@ -514,8 +514,8 @@ NSPR_API(PRCounterHandle)
#define PR_FIND_NEXT_COUNTER_RNAME(next,rhandle,qhandle)
#endif
-NSPR_API(PRCounterHandle)
- PR_FindNextCounterRname(
+NSPR_API(PRCounterHandle)
+ PR_FindNextCounterRname(
PRCounterHandle rhandle,
PRCounterHandle qhandle
);
diff --git a/pr/include/prcvar.h b/pr/include/prcvar.h
index 3e30ce1f..03ce2106 100644
--- a/pr/include/prcvar.h
+++ b/pr/include/prcvar.h
@@ -68,7 +68,7 @@ NSPR_API(PRStatus) PR_WaitCondVar(PRCondVar *cvar, PRIntervalTime timeout);
** Notify ONE thread that is currently waiting on 'cvar'. Which thread is
** dependent on the implementation of the runtime. Common sense would dictate
** that all threads waiting on a single condition have identical semantics,
-** therefore which one gets notified is not significant.
+** therefore which one gets notified is not significant.
**
** The calling thead must hold the lock that protects the condition, as
** well as the invariants that are tightly bound to the condition, when
diff --git a/pr/include/prenv.h b/pr/include/prenv.h
index 468c7d59..550f05c9 100644
--- a/pr/include/prenv.h
+++ b/pr/include/prenv.h
@@ -18,18 +18,18 @@ PR_BEGIN_EXTERN_C
/*
** PR_GetEnv() -- Retrieve value of environment variable
-**
+**
** Description:
** PR_GetEnv() is modeled on Unix getenv().
-**
-**
-** Inputs:
+**
+**
+** Inputs:
** var -- The name of the environment variable
-**
+**
** Returns:
** The value of the environment variable 'var' or NULL if
** the variable is undefined.
-**
+**
** Restrictions:
** You'd think that a POSIX getenv(), putenv() would be
** consistently implemented everywhere. Surprise! It is not. On
@@ -42,33 +42,33 @@ PR_BEGIN_EXTERN_C
** un-set; a subsequent call to getenv() returns NULL. On
** other platforms, a subsequent call to getenv() returns a
** pointer to a null-string (a byte of zero).
-**
-** PR_GetEnv(), PR_SetEnv() provide a consistent behavior
+**
+** PR_GetEnv(), PR_SetEnv() provide a consistent behavior
** across all supported platforms. There are, however, some
** restrictions and some practices you must use to achieve
** consistent results everywhere.
-**
+**
** When manipulating the environment there is no way to un-set
** an environment variable across all platforms. We suggest
** you interpret the return of a pointer to null-string to
** mean the same as a return of NULL from PR_GetEnv().
-**
+**
** A call to PR_SetEnv() where the parameter is of the form
** "name" will return PR_FAILURE; the environment remains
** unchanged. A call to PR_SetEnv() where the parameter is
** of the form "name=" may un-set the envrionment variable on
** some platforms; on others it may set the value of the
** environment variable to the null-string.
-**
+**
** For example, to test for NULL return or return of the
** null-string from PR_GetEnv(), use the following code
** fragment:
-**
+**
** char *val = PR_GetEnv("foo");
-** if ((NULL == val) || ('\0' == *val)) {
-** ... interpret this as un-set ...
+** if ((NULL == val) || ('\0' == *val)) {
+** ... interpret this as un-set ...
** }
-**
+**
** The caller must ensure that the string passed
** to PR_SetEnv() is persistent. That is: The string should
** not be on the stack, where it can be overwritten
@@ -77,16 +77,16 @@ PR_BEGIN_EXTERN_C
** overwritten by other actions of the process. ... Some
** platforms use the string by reference rather than copying
** it into the environment space. ... You have been warned!
-**
+**
** Use of platform-native functions that manipulate the
-** environment (getenv(), putenv(),
+** environment (getenv(), putenv(),
** SetEnvironmentVariable(), etc.) must not be used with
** NSPR's similar functions. The platform-native functions
** may not be thread safe and/or may operate on different
** conceptual environment space than that operated upon by
** NSPR's functions or other environment manipulating
** functions on the same platform. (!)
-**
+**
*/
NSPR_API(char*) PR_GetEnv(const char *var);
@@ -106,24 +106,24 @@ NSPR_API(char*) PR_GetEnvSecure(const char *var);
/*
** PR_SetEnv() -- set, unset or change an environment variable
-**
+**
** Description:
** PR_SetEnv() is modeled on the Unix putenv() function.
-**
-** Inputs:
+**
+** Inputs:
** string -- pointer to a caller supplied
** constant, persistent string of the form name=value. Where
** name is the name of the environment variable to be set or
** changed; value is the value assigned to the variable.
**
-** Returns:
+** Returns:
** PRStatus.
-**
-** Restrictions:
+**
+** Restrictions:
** See the Restrictions documented in the description of
** PR_GetEnv() in this header file.
-**
-**
+**
+**
*/
NSPR_API(PRStatus) PR_SetEnv(const char *string);
diff --git a/pr/include/prerror.h b/pr/include/prerror.h
index 3d6baf6e..bb3398d6 100644
--- a/pr/include/prerror.h
+++ b/pr/include/prerror.h
@@ -81,7 +81,7 @@ purpose. It is provided "as is" without express or implied warranty.
/*
* NOTE:
* The interfaces for error-code-translation described in the rest of
- * this file are preliminary in the 3.1 release of nspr and are subject
+ * this file are preliminary in the 3.1 release of nspr and are subject
* to change in future releases.
*/
@@ -171,7 +171,7 @@ struct PRErrorTable {
/*
* struct PRErrorCallbackPrivate --
*
- * A private structure for the localization plugin
+ * A private structure for the localization plugin
*/
struct PRErrorCallbackPrivate;
@@ -194,7 +194,7 @@ struct PRErrorCallbackTablePrivate;
* if no description can be found.
*/
typedef const char *
-PRErrorCallbackLookupFn(PRErrorCode code, PRLanguageCode language,
+PRErrorCallbackLookupFn(PRErrorCode code, PRLanguageCode language,
const struct PRErrorTable *table,
struct PRErrorCallbackPrivate *cb_private,
struct PRErrorCallbackTablePrivate *table_private);
@@ -266,7 +266,7 @@ NSPR_API(const char * const *) PR_ErrorLanguages(void);
** of the process.
**
** NOT THREAD SAFE!
-**
+**
***********************************************************************/
NSPR_API(PRErrorCode) PR_ErrorInstallTable(const struct PRErrorTable *table);
@@ -285,7 +285,7 @@ NSPR_API(PRErrorCode) PR_ErrorInstallTable(const struct PRErrorTable *table);
**
***********************************************************************/
NSPR_API(void) PR_ErrorInstallCallback(const char * const * languages,
- PRErrorCallbackLookupFn *lookup,
+ PRErrorCallbackLookupFn *lookup,
PRErrorCallbackNewTableFn *newtable,
struct PRErrorCallbackPrivate *cb_private);
diff --git a/pr/include/prinrval.h b/pr/include/prinrval.h
index 14cd39b6..be22b838 100644
--- a/pr/include/prinrval.h
+++ b/pr/include/prinrval.h
@@ -34,7 +34,7 @@ typedef PRUint32 PRIntervalTime;
** DESCRIPTION:
** These two constants define the range (in ticks / second) of the
** platform dependent type, PRIntervalTime. These constants bound both
-** the period and the resolution of a PRIntervalTime.
+** the period and the resolution of a PRIntervalTime.
***********************************************************************/
#define PR_INTERVAL_MIN 1000UL
#define PR_INTERVAL_MAX 100000UL
@@ -46,9 +46,9 @@ typedef PRUint32 PRIntervalTime;
** Two reserved constants are defined in the PRIntervalTime namespace.
** They are used to indicate that the process should wait no time (return
** immediately) or wait forever (never time out), respectively.
-** Note: PR_INTERVAL_NO_TIMEOUT passed as input to PR_Connect is
+** Note: PR_INTERVAL_NO_TIMEOUT passed as input to PR_Connect is
** interpreted as use the OS's connect timeout.
-**
+**
***********************************************************************/
#define PR_INTERVAL_NO_WAIT 0UL
#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL
@@ -66,13 +66,13 @@ typedef PRUint32 PRIntervalTime;
** INPUTS: void
** OUTPUTS: void
** RETURN: PRIntervalTime
-**
+**
** SIDE EFFECTS:
** None
** RESTRICTIONS:
** The units of PRIntervalTime are platform dependent. They are chosen
** such that they are appropriate for the host OS, yet provide sufficient
-** resolution and period to be useful to clients.
+** resolution and period to be useful to clients.
** MEMORY: N/A
** ALGORITHM: Platform dependent
***********************************************************************/
@@ -86,7 +86,7 @@ NSPR_API(PRIntervalTime) PR_IntervalNow(void);
** INPUTS: void
** OUTPUTS: void
** RETURN: PRUint32
-**
+**
** SIDE EFFECTS:
** None
** RESTRICTIONS:
@@ -105,7 +105,7 @@ NSPR_API(PRUint32) PR_TicksPerSecond(void);
** INPUTS: PRUint32
** OUTPUTS: void
** RETURN: PRIntervalTime
-**
+**
** SIDE EFFECTS:
** None
** RESTRICTIONS:
@@ -126,7 +126,7 @@ NSPR_API(PRIntervalTime) PR_MicrosecondsToInterval(PRUint32 micro);
** INPUTS: PRIntervalTime
** OUTPUTS: void
** RETURN: PRUint32
-**
+**
** SIDE EFFECTS:
** None
** RESTRICTIONS:
diff --git a/pr/include/prio.h b/pr/include/prio.h
index 7c201d9d..48694aad 100644
--- a/pr/include/prio.h
+++ b/pr/include/prio.h
@@ -490,7 +490,7 @@ NSPR_API(PRFileDesc*) PR_CreateIOLayerStub(
* A new stack may be created by calling PR_CreateIOLayer(). The
* file descriptor returned will point to the top of the stack, which has
* the layer 'fd' as the topmost layer.
- *
+ *
* NOTE: This function creates a new style stack, which has a fixed, dummy
* header. The old style stack, created by a call to PR_PushIOLayer,
* results in modifying contents of the top layer of the stack, when
@@ -554,7 +554,7 @@ NSPR_API(PRFileDesc*) PR_PopIOLayer(PRFileDesc *fd_stack, PRDescIdentity id);
* the file prior to each write.
* PR_TRUNCATE If the file exists, its length is truncated to 0.
* PR_EXCL With PR_CREATE_FILE, if the file does not exist,
- * the file is created. If the file already
+ * the file is created. If the file already
* exists, no action and NULL is returned
*
* PRIntn mode
@@ -1417,8 +1417,8 @@ NSPR_API(PRStatus) PR_Shutdown(PRFileDesc *fd, PRShutdownHow how);
* FUNCTION: PR_Recv
* DESCRIPTION:
* Receive a specified number of bytes from a connected socket.
- * The operation will block until some positive number of bytes are
- * transferred, a time out has occurred, or there is an error.
+ * The operation will block until some positive number of bytes are
+ * transferred, a time out has occurred, or there is an error.
* No more than 'amount' bytes will be transferred.
* INPUTS:
* PRFileDesc *fd
@@ -1451,8 +1451,8 @@ NSPR_API(PRInt32) PR_Recv(PRFileDesc *fd, void *buf, PRInt32 amount,
* FUNCTION: PR_Send
* DESCRIPTION:
* Send a specified number of bytes from a connected socket.
- * The operation will block until all bytes are
- * processed, a time out has occurred, or there is an error.
+ * The operation will block until all bytes are
+ * processed, a time out has occurred, or there is an error.
* INPUTS:
* PRFileDesc *fd
* points to a PRFileDesc object representing a socket.
@@ -1483,8 +1483,8 @@ NSPR_API(PRInt32) PR_Send(PRFileDesc *fd, const void *buf, PRInt32 amount,
* DESCRIPTION:
* Receive up to a specified number of bytes from socket which may
* or may not be connected.
- * The operation will block until one or more bytes are
- * transferred, a time out has occurred, or there is an error.
+ * The operation will block until one or more bytes are
+ * transferred, a time out has occurred, or there is an error.
* No more than 'amount' bytes will be transferred.
* INPUTS:
* PRFileDesc *fd
@@ -1518,8 +1518,8 @@ NSPR_API(PRInt32) PR_RecvFrom(
* FUNCTION: PR_SendTo
* DESCRIPTION:
* Send a specified number of bytes from an unconnected socket.
- * The operation will block until all bytes are
- * sent, a time out has occurred, or there is an error.
+ * The operation will block until all bytes are
+ * sent, a time out has occurred, or there is an error.
* INPUTS:
* PRFileDesc *fd
* points to a PRFileDesc object representing an unconnected socket.
@@ -1550,10 +1550,10 @@ NSPR_API(PRInt32) PR_SendTo(
*************************************************************************
** FUNCTION: PR_TransmitFile
** DESCRIPTION:
-** Transmitfile sends a complete file (sourceFile) across a socket
+** Transmitfile sends a complete file (sourceFile) across a socket
** (networkSocket). If headers is non-NULL, the headers will be sent across
** the socket prior to sending the file.
-**
+**
** Optionally, the PR_TRANSMITFILE_CLOSE_SOCKET flag may be passed to
** transmitfile. This flag specifies that transmitfile should close the
** socket after sending the data.
@@ -1570,7 +1570,7 @@ NSPR_API(PRInt32) PR_SendTo(
** PRTransmitFileFlags flags
** If the flags indicate that the connection should be closed,
** it will be done immediately after transferring the file, unless
-** the operation is unsuccessful.
+** the operation is unsuccessful.
.* PRIntervalTime timeout
* Time limit for completion of the transmit operation.
**
@@ -1591,12 +1591,12 @@ NSPR_API(PRInt32) PR_TransmitFile(
*************************************************************************
** FUNCTION: PR_SendFile
** DESCRIPTION:
-** PR_SendFile sends data from a file (sendData->fd) across a socket
+** PR_SendFile sends data from a file (sendData->fd) across a socket
** (networkSocket). If specified, a header and/or trailer buffer are sent
** before and after the file, respectively. The file offset, number of bytes
** of file data to send, the header and trailer buffers are specified in the
** sendData argument.
-**
+**
** Optionally, if the PR_TRANSMITFILE_CLOSE_SOCKET flag is passed, the
** socket is closed after successfully sending the data.
**
@@ -1609,7 +1609,7 @@ NSPR_API(PRInt32) PR_TransmitFile(
** PRTransmitFileFlags flags
** If the flags indicate that the connection should be closed,
** it will be done immediately after transferring the file, unless
-** the operation is unsuccessful.
+** the operation is unsuccessful.
.* PRIntervalTime timeout
* Time limit for completion of the send operation.
**
@@ -1644,15 +1644,15 @@ NSPR_API(PRInt32) PR_SendFile(
** DESCRIPTION:
** AcceptRead accepts a new connection, returns the newly created
** socket's descriptor and also returns the connecting peer's address.
-** AcceptRead, as its name suggests, also receives the first block of data
+** AcceptRead, as its name suggests, also receives the first block of data
** sent by the peer.
**
** INPUTS:
** PRFileDesc *listenSock
-** A socket descriptor that has been called with the PR_Listen()
+** A socket descriptor that has been called with the PR_Listen()
** function, also known as the rendezvous socket.
** void *buf
-** A pointer to a buffer to receive data sent by the client. This
+** A pointer to a buffer to receive data sent by the client. This
** buffer must be large enough to receive <amount> bytes of data
** and two PRNetAddr structures, plus an extra 32 bytes. See:
** PR_ACCEPT_READ_BUF_OVERHEAD.
@@ -1661,9 +1661,9 @@ NSPR_API(PRInt32) PR_SendFile(
** the size of the PRNetAddr structures. If 0, no data will be read
** from the client.
** PRIntervalTime timeout
-** The timeout interval only applies to the read portion of the
-** operation. PR_AcceptRead will block indefinitely until the
-** connection is accepted; the read will timeout after the timeout
+** The timeout interval only applies to the read portion of the
+** operation. PR_AcceptRead will block indefinitely until the
+** connection is accepted; the read will timeout after the timeout
** interval elapses.
** OUTPUTS:
** PRFileDesc **acceptedSock
@@ -1673,13 +1673,13 @@ NSPR_API(PRInt32) PR_SendFile(
** The address of the remote socket. This parameter will only be
** valid if the function return does not indicate failure. The
** returned address is not guaranteed to be properly aligned.
-**
+**
** RETURNS:
-** The number of bytes read from the client or -1 on failure. The reason
+** The number of bytes read from the client or -1 on failure. The reason
** for the failure is obtained by calling PR_GetError().
**************************************************************************
-**/
-/* define buffer overhead constant. Add this value to the user's
+**/
+/* define buffer overhead constant. Add this value to the user's
** data length when allocating a buffer to accept data.
** Example:
** #define USER_DATA_SIZE 10
@@ -1706,7 +1706,7 @@ NSPR_API(PRInt32) PR_AcceptRead(
** PRFileDesc *fds[2]
** The file descriptor pair for the newly created TCP sockets.
** RETURN: PRStatus
-** Upon successful completion of TCP socket pair, PR_NewTCPSocketPair
+** Upon successful completion of TCP socket pair, PR_NewTCPSocketPair
** returns PR_SUCCESS. Otherwise, it returns PR_FAILURE. Further
** failure information can be obtained by calling PR_GetError().
** XXX can we implement this on windoze and mac?
@@ -1727,8 +1727,8 @@ NSPR_API(PRStatus) PR_NewTCPSocketPair(PRFileDesc *fds[2]);
** PRNetAddr *addr
** Returns the address of the socket in its own communication space.
** RETURN: PRStatus
-** Upon successful completion, PR_GetSockName returns PR_SUCCESS.
-** Otherwise, it returns PR_FAILURE. Further failure information can
+** Upon successful completion, PR_GetSockName returns PR_SUCCESS.
+** Otherwise, it returns PR_FAILURE. Further failure information can
** be obtained by calling PR_GetError().
**************************************************************************
**/
@@ -1738,7 +1738,7 @@ NSPR_API(PRStatus) PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr);
*************************************************************************
** FUNCTION: PR_GetPeerName
** DESCRIPTION:
-** Get name of the connected peer. Return the network address for the
+** Get name of the connected peer. Return the network address for the
** connected peer socket.
**
** INPUTS:
@@ -1749,8 +1749,8 @@ NSPR_API(PRStatus) PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr);
** Returns the address of the connected peer in its own communication
** space.
** RETURN: PRStatus
-** Upon successful completion, PR_GetPeerName returns PR_SUCCESS.
-** Otherwise, it returns PR_FAILURE. Further failure information can
+** Upon successful completion, PR_GetPeerName returns PR_SUCCESS.
+** Otherwise, it returns PR_FAILURE. Further failure information can
** be obtained by calling PR_GetError().
**************************************************************************
**/
@@ -1784,8 +1784,8 @@ NSPR_API(PRStatus) PR_SetSocketOption(
* by a child process. If PR_FALSE, the file descriptor is set
* to be not inheritable by a child process.
* RETURN: PRStatus
- * Upon successful completion, PR_SetFDInheritable returns PR_SUCCESS.
- * Otherwise, it returns PR_FAILURE. Further failure information can
+ * Upon successful completion, PR_SetFDInheritable returns PR_SUCCESS.
+ * Otherwise, it returns PR_FAILURE. Further failure information can
* be obtained by calling PR_GetError().
*************************************************************************
*/
@@ -1804,7 +1804,7 @@ NSPR_API(PRStatus) PR_SetFDInheritable(
* The name of the inherited file descriptor.
* RETURN: PRFileDesc *
* Upon successful completion, PR_GetInheritedFD returns the
- * inherited file descriptor with the specified name. Otherwise,
+ * inherited file descriptor with the specified name. Otherwise,
* it returns NULL. Further failure information can be obtained
* by calling PR_GetError().
*************************************************************************
diff --git a/pr/include/private/pprio.h b/pr/include/private/pprio.h
index 26bcd0d0..d3e342cb 100644
--- a/pr/include/private/pprio.h
+++ b/pr/include/private/pprio.h
@@ -54,7 +54,7 @@ NSPR_API(PRFileDesc*) PR_AllocFileDesc(PROsfd osfd,
const PRIOMethods *methods);
NSPR_API(void) PR_FreeFileDesc(PRFileDesc *fd);
/*
-** Import an existing OS file to NSPR.
+** Import an existing OS file to NSPR.
*/
NSPR_API(PRFileDesc*) PR_ImportFile(PROsfd osfd);
NSPR_API(PRFileDesc*) PR_ImportPipe(PROsfd osfd);
@@ -187,22 +187,22 @@ typedef void (*_PR_AcceptTimeoutCallback)(void *);
** our daemon threads need to be able to wakeup and reliably flush their
** log buffers if the Accept times out. However, with the current blocking
** interface to AcceptRead, there is no way for us to timeout the Accept;
-** this is because when we timeout the Read, we can close the newly
+** this is because when we timeout the Read, we can close the newly
** socket and continue; but when we timeout the accept itself, there is no
** new socket to timeout. So instead, this version of the function is
** provided. After the initial timeout period elapses on the accept()
** portion of the function, it will call the callback routine and then
-** continue the accept. If the timeout occurs on the read, it will
+** continue the accept. If the timeout occurs on the read, it will
** close the connection and return error.
*/
NSPR_API(PRInt32) PR_NTFast_AcceptRead_WithTimeoutCallback(
- PRFileDesc *sd,
+ PRFileDesc *sd,
PRFileDesc **nd,
- PRNetAddr **raddr,
- void *buf,
- PRInt32 amount,
+ PRNetAddr **raddr,
+ void *buf,
+ PRInt32 amount,
PRIntervalTime t,
- _PR_AcceptTimeoutCallback callback,
+ _PR_AcceptTimeoutCallback callback,
void *callback_arg);
/* FUNCTION: PR_NTFast_Accept
@@ -224,7 +224,7 @@ NSPR_API(PRFileDesc*) PR_NTFast_Accept(PRFileDesc *fd, PRNetAddr *addr,
** Without calling this, the only operations supported on the socket
** Are PR_Read, PR_Write, PR_Transmitfile, and PR_Close.
*/
-NSPR_API(void) PR_NTFast_UpdateAcceptContext(PRFileDesc *acceptSock,
+NSPR_API(void) PR_NTFast_UpdateAcceptContext(PRFileDesc *acceptSock,
PRFileDesc *listenSock);
diff --git a/pr/include/private/pprthred.h b/pr/include/private/pprthred.h
index 3e034b87..4b74faaf 100644
--- a/pr/include/private/pprthred.h
+++ b/pr/include/private/pprthred.h
@@ -81,7 +81,7 @@ NSPR_API(void) PR_SetThreadDumpProc(
NSPR_API(PRInt32) PR_GetThreadAffinityMask(PRThread *thread, PRUint32 *mask);
/*
-** Set this thread's affinity mask.
+** Set this thread's affinity mask.
**
** Returns 0 on success, -1 on failure.
*/
@@ -105,11 +105,11 @@ NSPR_API(void) PR_SetThreadRecycleMode(PRUint32 flag);
/*---------------------------------------------------------------------------
-** THREAD PRIVATE FUNCTIONS FOR GARBAGE COLLECTIBLE THREADS
+** THREAD PRIVATE FUNCTIONS FOR GARBAGE COLLECTIBLE THREADS
---------------------------------------------------------------------------*/
-/*
-** Only Garbage collectible threads participate in resume all, suspend all and
+/*
+** Only Garbage collectible threads participate in resume all, suspend all and
** enumeration operations. They are also different during creation when
** platform specific action may be needed (For example, all Solaris GC able
** threads are bound threads).
@@ -128,7 +128,7 @@ NSPR_API(PRThread*) PR_CreateThreadGCAble(PRThreadType type,
PRUint32 stackSize);
/*
-** Same as PR_AttachThread except that the thread being attached is marked as
+** Same as PR_AttachThread except that the thread being attached is marked as
** garbage collectible.
*/
NSPR_API(PRThread*) PR_AttachThreadGCAble(PRThreadType type,
@@ -146,19 +146,19 @@ NSPR_API(void) PR_SetThreadGCAble(void);
NSPR_API(void) PR_ClearThreadGCAble(void);
/*
-** This routine prevents all other GC able threads from running. This call is needed by
+** This routine prevents all other GC able threads from running. This call is needed by
** the garbage collector.
*/
NSPR_API(void) PR_SuspendAll(void);
/*
-** This routine unblocks all other GC able threads that were suspended from running by
+** This routine unblocks all other GC able threads that were suspended from running by
** PR_SuspendAll(). This call is needed by the garbage collector.
*/
NSPR_API(void) PR_ResumeAll(void);
/*
-** Return the thread stack pointer of the given thread.
+** Return the thread stack pointer of the given thread.
** Needed by the garbage collector.
*/
NSPR_API(void *) PR_GetSP(PRThread *thread);
@@ -199,26 +199,26 @@ NSPR_API(void) SetExecutionEnvironment(PRThread* thread, void *environment);
typedef PRStatus (PR_CALLBACK *PREnumerator)(PRThread *t, int i, void *arg);
NSPR_API(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg);
-/*
+/*
** Signature of a thread stack scanning function. It is applied to every
** contiguous group of potential pointers within a thread. Count denotes the
-** number of pointers.
+** number of pointers.
*/
-typedef PRStatus
+typedef PRStatus
(PR_CALLBACK *PRScanStackFun)(PRThread* t,
void** baseAddr, PRUword count, void* closure);
/*
-** Applies scanFun to all contiguous groups of potential pointers
+** Applies scanFun to all contiguous groups of potential pointers
** within a thread. This includes the stack, registers, and thread-local
** data. If scanFun returns a status value other than PR_SUCCESS the scan
-** is aborted, and the status value is returned.
+** is aborted, and the status value is returned.
*/
NSPR_API(PRStatus)
PR_ThreadScanStackPointers(PRThread* t,
PRScanStackFun scanFun, void* scanClosure);
-/*
+/*
** Calls PR_ThreadScanStackPointers for every thread.
*/
NSPR_API(PRStatus)
@@ -226,14 +226,14 @@ PR_ScanStackPointers(PRScanStackFun scanFun, void* scanClosure);
/*
** Returns a conservative estimate on the amount of stack space left
-** on a thread in bytes, sufficient for making decisions about whether
+** on a thread in bytes, sufficient for making decisions about whether
** to continue recursing or not.
*/
NSPR_API(PRUword)
PR_GetStackSpaceLeft(PRThread* t);
/*---------------------------------------------------------------------------
-** THREAD CPU PRIVATE FUNCTIONS
+** THREAD CPU PRIVATE FUNCTIONS
---------------------------------------------------------------------------*/
/*
diff --git a/pr/include/private/primpl.h b/pr/include/private/primpl.h
index dc74a016..3edd00e7 100644
--- a/pr/include/private/primpl.h
+++ b/pr/include/private/primpl.h
@@ -47,19 +47,19 @@ typedef struct PRSegment PRSegment;
*************************************************************************/
/*
-NSPR 2.0 must implement its function across a range of platforms
+NSPR 2.0 must implement its function across a range of platforms
including: MAC, Windows/16, Windows/95, Windows/NT, and several
-variants of Unix. Each implementation shares common code as well
+variants of Unix. Each implementation shares common code as well
as having platform dependent portions. This standard describes how
the model dependent portions are to be implemented.
-In header file pr/include/primpl.h, each publicly declared
+In header file pr/include/primpl.h, each publicly declared
platform dependent function is declared as:
NSPR_API void _PR_MD_FUNCTION( long arg1, long arg2 );
#define _PR_MD_FUNCTION _MD_FUNCTION
-In header file pr/include/md/<platform>/_<platform>.h,
+In header file pr/include/md/<platform>/_<platform>.h,
each #define'd macro is redefined as one of:
#define _MD_FUNCTION <blanks>
@@ -69,26 +69,26 @@ each #define'd macro is redefined as one of:
Where:
-<blanks> is no definition at all. In this case, the function is not implemented
-and is never called for this platform.
-For example:
+<blanks> is no definition at all. In this case, the function is not implemented
+and is never called for this platform.
+For example:
#define _MD_INIT_CPUS()
-<expanded macro> is a C language macro expansion.
-For example:
+<expanded macro> is a C language macro expansion.
+For example:
#define _MD_CLEAN_THREAD(_thread) \
PR_BEGIN_MACRO \
PR_DestroyCondVar(_thread->md.asyncIOCVar); \
PR_DestroyLock(_thread->md.asyncIOLock); \
PR_END_MACRO
-<osFunction> is some function implemented by the host operating system.
-For example:
+<osFunction> is some function implemented by the host operating system.
+For example:
#define _MD_EXIT exit
-<_MD_function> is the name of a function implemented for this platform in
-pr/src/md/<platform>/<soruce>.c file.
-For example:
+<_MD_function> is the name of a function implemented for this platform in
+pr/src/md/<platform>/<soruce>.c file.
+For example:
#define _MD_GETFILEINFO _MD_GetFileInfo
In <source>.c, the implementation is:
@@ -133,7 +133,7 @@ struct _PT_Notified
};
/*
- * bits defined for pthreads 'state' field
+ * bits defined for pthreads 'state' field
*/
#define PT_THREAD_DETACHED 0x01 /* thread can't be joined */
#define PT_THREAD_GLOBAL 0x02 /* a global thread (unlikely) */
@@ -154,7 +154,7 @@ struct _PT_Notified
#define _PT_IS_GCABLE_THREAD(thr) ((thr)->state & PT_THREAD_GCABLE)
-/*
+/*
** Possible values for thread's suspend field
** Note that the first two can be the same as they are really mutually exclusive,
** i.e. both cannot be happening at the same time. We have two symbolic names
@@ -205,13 +205,13 @@ NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg);
*/
#ifdef _PR_LOCAL_THREADS_ONLY
-#define _PR_MD_SUSPEND_THREAD(thread)
-#define _PR_MD_RESUME_THREAD(thread)
-#define _PR_MD_SUSPEND_CPU(cpu)
-#define _PR_MD_RESUME_CPU(cpu)
-#define _PR_MD_BEGIN_SUSPEND_ALL()
-#define _PR_MD_END_SUSPEND_ALL()
-#define _PR_MD_BEGIN_RESUME_ALL()
+#define _PR_MD_SUSPEND_THREAD(thread)
+#define _PR_MD_RESUME_THREAD(thread)
+#define _PR_MD_SUSPEND_CPU(cpu)
+#define _PR_MD_RESUME_CPU(cpu)
+#define _PR_MD_BEGIN_SUSPEND_ALL()
+#define _PR_MD_END_SUSPEND_ALL()
+#define _PR_MD_BEGIN_RESUME_ALL()
#define _PR_MD_END_RESUME_ALL()
#define _PR_MD_INIT_ATTACHED_THREAD(thread) PR_FAILURE
@@ -252,7 +252,7 @@ struct _PRCPU {
PRThread *thread; /* native thread for this CPUThread */
PRThread *idle_thread; /* user-level idle thread for this CPUThread */
- PRIntervalTime last_clock; /* the last time we went into
+ PRIntervalTime last_clock; /* the last time we went into
* _PR_ClockInterrupt() on this CPU
*/
@@ -275,7 +275,7 @@ typedef struct _PRInterruptTable {
#define _MD_GET_ATTACHED_THREAD() (_PR_MD_CURRENT_THREAD())
#endif
-#ifdef _PR_LOCAL_THREADS_ONLY
+#ifdef _PR_LOCAL_THREADS_ONLY
NSPR_API(struct _PRCPU *) _pr_currentCPU;
NSPR_API(PRThread *) _pr_currentThread;
@@ -353,7 +353,7 @@ extern PRInt32 _native_threads_only;
_PR_MD_SET_INTSOFF(_is); \
PR_END_MACRO
-#ifdef _PR_LOCAL_THREADS_ONLY
+#ifdef _PR_LOCAL_THREADS_ONLY
#define _PR_IS_NATIVE_THREAD(thread) 0
#define _PR_THREAD_LOCK(_thread)
@@ -383,10 +383,10 @@ extern PRInt32 _native_threads_only;
PR_END_MACRO
#define _PR_ADD_SLEEPQ(_thread, _timeout) \
- _PR_AddSleepQ(_thread, _timeout);
+ _PR_AddSleepQ(_thread, _timeout);
#define _PR_DEL_SLEEPQ(_thread, _propogate) \
- _PR_DelSleepQ(_thread, _propogate);
+ _PR_DelSleepQ(_thread, _propogate);
#define _PR_ADD_JOINQ(_thread, _cpu) \
PR_APPEND_LINK(&(_thread)->links, &_PR_WAITINGTOJOINQ(_cpu));
@@ -418,7 +418,7 @@ extern PRInt32 _native_threads_only;
PR_BEGIN_MACRO \
_PR_MD_LOCK(&(_cpu)->queue->runQLock );\
PR_END_MACRO
-
+
#define _PR_RUNQ_UNLOCK(_cpu) \
PR_BEGIN_MACRO \
_PR_MD_UNLOCK(&(_cpu)->queue->runQLock );\
@@ -467,12 +467,12 @@ extern PRInt32 _native_threads_only;
#define _PR_ADD_SLEEPQ(_thread, _timeout) \
PR_ASSERT((_thread)->queueCount == 0); \
(_thread)->queueCount = QUEUE_SLEEP; \
- _PR_AddSleepQ(_thread, _timeout);
+ _PR_AddSleepQ(_thread, _timeout);
#define _PR_DEL_SLEEPQ(_thread, _propogate) \
PR_ASSERT((_thread)->queueCount == QUEUE_SLEEP);\
(_thread)->queueCount = 0; \
- _PR_DelSleepQ(_thread, _propogate);
+ _PR_DelSleepQ(_thread, _propogate);
#define _PR_ADD_JOINQ(_thread, _cpu) \
PR_ASSERT((_thread)->queueCount == 0); \
@@ -525,7 +525,7 @@ NSPR_API(void) _PR_PauseCPU(void);
_PR_MD_LOCK(&(_lock)->ilock);
#define _PR_LOCK_UNLOCK(_lock) \
_PR_MD_UNLOCK(&(_lock)->ilock);
-
+
extern void _PR_UnblockLockWaiter(PRLock *lock);
extern PRStatus _PR_InitLock(PRLock *lock);
extern void _PR_FreeLock(PRLock *lock);
@@ -536,7 +536,7 @@ extern void _PR_FreeLock(PRLock *lock);
/************************************************************************/
#define _PR_CVAR_LOCK(_cvar) \
- _PR_MD_LOCK(&(_cvar)->ilock);
+ _PR_MD_LOCK(&(_cvar)->ilock);
#define _PR_CVAR_UNLOCK(_cvar) \
_PR_MD_UNLOCK(&(_cvar)->ilock);
@@ -579,7 +579,7 @@ NSPR_API(void) _PR_Notify(PRMonitor *mon, PRBool all, PRBool sticky);
#define _PR_STACK_MAPPED 0x2 /* vm is mapped */
#define _PR_STACK_PRIMORDIAL 0x4 /* stack for primordial thread */
-/*
+/*
** If the default stcksize from the client is zero, we need to pick a machine
** dependent value. This is only for standard user threads. For custom threads,
** 0 has a special meaning.
@@ -961,9 +961,9 @@ extern PRThread* _PR_MD_CREATE_USER_THREAD(
#endif
extern PRStatus _PR_MD_CREATE_THREAD(
- PRThread *thread,
- void (*start) (void *),
- PRThreadPriority priority,
+ PRThread *thread,
+ void (*start) (void *),
+ PRThreadPriority priority,
PRThreadScope scope,
PRThreadState state,
PRUint32 stackSize);
@@ -1133,28 +1133,28 @@ extern PRInt32 _PR_MD_LISTEN(PRFileDesc *fd, PRIntn backlog);
extern PRInt32 _PR_MD_SHUTDOWN(PRFileDesc *fd, PRIntn how);
#define _PR_MD_SHUTDOWN _MD_SHUTDOWN
-extern PRInt32 _PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount,
+extern PRInt32 _PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount,
PRIntn flags, PRIntervalTime timeout);
#define _PR_MD_RECV _MD_RECV
extern PRInt32 _PR_MD_SEND(
- PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
+ PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
PRIntervalTime timeout);
#define _PR_MD_SEND _MD_SEND
-extern PRInt32 _PR_MD_ACCEPT_READ(PRFileDesc *sd, PROsfd *newSock,
+extern PRInt32 _PR_MD_ACCEPT_READ(PRFileDesc *sd, PROsfd *newSock,
PRNetAddr **raddr, void *buf, PRInt32 amount,
PRIntervalTime timeout);
#define _PR_MD_ACCEPT_READ _MD_ACCEPT_READ
#ifdef WIN32
-extern PROsfd _PR_MD_FAST_ACCEPT(PRFileDesc *fd, PRNetAddr *addr,
+extern PROsfd _PR_MD_FAST_ACCEPT(PRFileDesc *fd, PRNetAddr *addr,
PRUint32 *addrlen, PRIntervalTime timeout,
PRBool fast,
_PR_AcceptTimeoutCallback callback,
void *callbackArg);
-extern PRInt32 _PR_MD_FAST_ACCEPT_READ(PRFileDesc *sd, PROsfd *newSock,
+extern PRInt32 _PR_MD_FAST_ACCEPT_READ(PRFileDesc *sd, PROsfd *newSock,
PRNetAddr **raddr, void *buf, PRInt32 amount,
PRIntervalTime timeout, PRBool fast,
_PR_AcceptTimeoutCallback callback,
@@ -1172,7 +1172,7 @@ extern const PRTime _pr_filetime_offset;
#endif /* WIN32 */
extern PRInt32 _PR_MD_SENDFILE(
- PRFileDesc *sock, PRSendFileData *sfd,
+ PRFileDesc *sock, PRSendFileData *sfd,
PRInt32 flags, PRIntervalTime timeout);
#define _PR_MD_SENDFILE _MD_SENDFILE
@@ -1257,8 +1257,8 @@ extern PRStatus _PR_MD_SET_FD_INHERITABLE(PRFileDesc *fd, PRBool inheritable);
PR_SetError( PR_PENDING_INTERRUPT_ERROR, 0); \
} else { \
PR_SetError(PR_IO_TIMEOUT_ERROR, 0); \
- }
-
+ }
+
extern void *_PR_MD_GET_SP(PRThread *thread);
#define _PR_MD_GET_SP _MD_GET_SP
@@ -1410,7 +1410,7 @@ struct PRLock {
PRCList links; /* linkage for PRThread.lockList */
struct PRThread *owner; /* current lock owner */
PRCList waitQ; /* list of threads waiting for lock */
- PRThreadPriority priority; /* priority of lock */
+ PRThreadPriority priority; /* priority of lock */
PRThreadPriority boostPriority; /* boosted priority of lock owner */
_MDLock ilock; /* Internal Lock to protect user-level fields */
#endif
@@ -1645,19 +1645,19 @@ struct PRThread {
_PRCPU *cpu; /* cpu to which this thread is bound */
PRUint32 threadAllocatedOnStack;/* boolean */
- /* When an async IO is in progress and a second async IO cannot be
+ /* When an async IO is in progress and a second async IO cannot be
* initiated, the io_pending flag is set to true. Some platforms will
* not use the io_pending flag. If the io_pending flag is true, then
* io_fd is the OS-file descriptor on which IO is pending.
*/
PRBool io_pending;
PRInt32 io_fd;
-
+
/* If a timeout occurs or if an outstanding IO is interrupted and the
- * OS doesn't support a real cancellation (NT or MAC), then the
+ * OS doesn't support a real cancellation (NT or MAC), then the
* io_suspended flag will be set to true. The thread will be resumed
* but may run into trouble issuing additional IOs until the io_pending
- * flag can be cleared
+ * flag can be cleared
*/
PRBool io_suspended;
@@ -1735,7 +1735,7 @@ struct PRFilePrivate {
_MDFileDesc md;
#ifdef _PR_NEED_SECRET_AF
PRUint16 af; /* If the platform's implementation of accept()
- * requires knowing the address family of the
+ * requires knowing the address family of the
* socket, we save the address family here. */
#endif
@@ -1770,10 +1770,10 @@ struct PRDir {
};
#ifdef MOZ_UNICODE
-struct PRDirUTF16 {
- PRDirEntry d;
- _MDDirUTF16 md;
-};
+struct PRDirUTF16 {
+ PRDirEntry d;
+ _MDDirUTF16 md;
+};
#endif /* MOZ_UNICODE */
extern void _PR_InitLocks(void);
@@ -1913,7 +1913,7 @@ extern PRStatus _PR_MD_WAIT_PROCESS(PRProcess *process, PRInt32 *exitCode);
#define _PR_MD_WAIT_PROCESS _MD_WAIT_PROCESS
extern PRStatus _PR_MD_KILL_PROCESS(PRProcess *process);
-#define _PR_MD_KILL_PROCESS _MD_KILL_PROCESS
+#define _PR_MD_KILL_PROCESS _MD_KILL_PROCESS
/* Current Time */
NSPR_API(PRTime) _PR_MD_NOW(void);
@@ -2016,7 +2016,7 @@ extern PRStatus _PR_MD_SYNC_MEM_MAP(
/*
** Declare PRSharedMemory.
*/
-struct PRSharedMemory
+struct PRSharedMemory
{
char *ipcname; /* after conversion to native */
PRSize size; /* from open */
@@ -2034,8 +2034,8 @@ struct PRSharedMemory
PRUint32 ident; /* guard word at end of struct */
#define _PR_SHM_IDENT 0xdeadbad
};
-
-extern PRSharedMemory * _MD_OpenSharedMemory(
+
+extern PRSharedMemory * _MD_OpenSharedMemory(
const char *name,
PRSize size,
PRIntn flags,
@@ -2055,7 +2055,7 @@ extern PRStatus _MD_CloseSharedMemory( PRSharedMemory *shm );
extern PRStatus _MD_DeleteSharedMemory( const char *name );
#define _PR_MD_DELETE_SHARED_MEMORY _MD_DeleteSharedMemory
-extern PRFileMap* _md_OpenAnonFileMap(
+extern PRFileMap* _md_OpenAnonFileMap(
const char *dirName,
PRSize size,
PRFileMapProtect prot
diff --git a/pr/include/prlink.h b/pr/include/prlink.h
index ea45ef8e..e9134d13 100644
--- a/pr/include/prlink.h
+++ b/pr/include/prlink.h
@@ -95,7 +95,7 @@ typedef enum PRLibSpecType {
PR_LibSpec_Pathname,
PR_LibSpec_MacNamedFragment, /* obsolete (for Mac OS Classic) */
PR_LibSpec_MacIndexedFragment, /* obsolete (for Mac OS Classic) */
- PR_LibSpec_PathnameU /* supported only on Win32 */
+ PR_LibSpec_PathnameU /* supported only on Win32 */
} PRLibSpecType;
struct FSSpec; /* Mac OS Classic FSSpec */
@@ -134,7 +134,7 @@ typedef struct PRLibSpec {
#define PR_LD_GLOBAL 0x4 /* equivalent to RTLD_GLOBAL on Unix */
#define PR_LD_LOCAL 0x8 /* equivalent to RTLD_LOCAL on Unix */
/* The following is equivalent to LOAD_WITH_ALTERED_SEARCH_PATH on Windows */
-#define PR_LD_ALT_SEARCH_PATH 0x10
+#define PR_LD_ALT_SEARCH_PATH 0x10
/* 0x8000 reserved for NSPR internal use */
/*
@@ -185,7 +185,7 @@ NSPR_API(PRFuncPtr) PR_FindFunctionSymbol(PRLibrary *lib, const char *name);
** implements the procedure, and return the library that contains that
** symbol, or NULL if no such function can be found. This does not find
** symbols in the main program (the ".exe"); use PR_AddStaticLibrary to
-** register symbols in the main program.
+** register symbols in the main program.
**
** This increments the reference count of the library.
*/
diff --git a/pr/include/prlock.h b/pr/include/prlock.h
index bc76a0e1..64f0125b 100644
--- a/pr/include/prlock.h
+++ b/pr/include/prlock.h
@@ -8,8 +8,8 @@
** Description: API to basic locking functions of NSPR.
**
**
-** NSPR provides basic locking mechanisms for thread synchronization. Locks
-** are lightweight resource contention controls that prevent multiple threads
+** NSPR provides basic locking mechanisms for thread synchronization. Locks
+** are lightweight resource contention controls that prevent multiple threads
** from accessing something (code/data) simultaneously.
**/
@@ -46,7 +46,7 @@ typedef struct PRLock PRLock;
** RETURN: PRLock*
** If the lock can not be created because of resource constraints, NULL
** is returned.
-**
+**
***********************************************************************/
NSPR_API(PRLock*) PR_NewLock(void);
diff --git a/pr/include/prlog.h b/pr/include/prlog.h
index 4a291dc1..abfea214 100644
--- a/pr/include/prlog.h
+++ b/pr/include/prlog.h
@@ -36,27 +36,27 @@ PR_BEGIN_EXTERN_C
** <value> is a numeric constant, e.g. 5. This value is the maximum
** value of a log event, enumerated by PRLogModuleLevel, that you want
** written to the log.
-**
+**
** For example: to record all events of greater value than or equal to
** PR_LOG_ERROR for a LogModule names "gizmo", say:
-**
+**
** set NSPR_LOG_MODULES=gizmo:2
-**
+**
** Note that you must specify the numeric value of PR_LOG_ERROR.
-**
+**
** Special LogModule names are provided for controlling NSPR's log
** service at execution time. These controls should be set in the
** NSPR_LOG_MODULES environment variable at execution time to affect
** NSPR's log service for your application.
-**
+**
** The special LogModule "all" enables all LogModules. To enable all
** LogModule calls to PR_LOG(), say:
-**
+**
** set NSPR_LOG_MODULES=all:5
-**
+**
** The special LogModule name "sync" tells the NSPR log service to do
** unbuffered logging.
-**
+**
** The special LogModule name "bufsize:<size>" tells NSPR to set the
** log buffer to <size>.
**
@@ -66,7 +66,7 @@ PR_BEGIN_EXTERN_C
** (case sensitive). This value causes PR_LOG() output to be written
** using the Windows API OutputDebugString(). OutputDebugString()
** writes to the debugger window; some people find this helpful.
-**
+**
**
** To put log messages in your programs, use the PR_LOG macro:
**
@@ -78,29 +78,29 @@ PR_BEGIN_EXTERN_C
** is: (fmtstring, ...).
**
** Example:
-**
+**
** main() {
** PRIntn one = 1;
** PRLogModuleInfo * myLm = PR_NewLogModule("gizmo");
-** PR_LOG( myLm, PR_LOG_ALWAYS, ("Log this! %d\n", one));
-** return;
+** PR_LOG( myLm, PR_LOG_ALWAYS, ("Log this! %d\n", one));
+** return;
** }
-**
+**
** Note the use of printf() style arguments as the third agrument(s) to
** PR_LOG().
-**
+**
** After compiling and linking you application, set the environment:
-**
+**
** set NSPR_LOG_MODULES=gizmo:5
** set NSPR_LOG_FILE=logfile.txt
-**
+**
** When you execute your application, the string "Log this! 1" will be
** written to the file "logfile.txt".
-**
+**
** Note to NSPR engineers: a number of PRLogModuleInfo structures are
** defined and initialized in prinit.c. See this module for ideas on
** what to log where.
-**
+**
*/
typedef enum PRLogModuleLevel {
diff --git a/pr/include/prlong.h b/pr/include/prlong.h
index df1f30b0..7cc1d567 100644
--- a/pr/include/prlong.h
+++ b/pr/include/prlong.h
@@ -154,7 +154,7 @@ NSPR_API(PRUint64) LL_MaxUint(void);
/***********************************************************************
** MACROS: LL_UDIVMOD
** DESCRIPTION:
-** Produce both a quotient and a remainder given an unsigned
+** Produce both a quotient and a remainder given an unsigned
** INPUTS: PRUint64 a: The dividend of the operation
** PRUint64 b: The quotient of the operation
** OUTPUTS: PRUint64 *qp: pointer to quotient
diff --git a/pr/include/prmwait.h b/pr/include/prmwait.h
index a902d90e..16c07621 100644
--- a/pr/include/prmwait.h
+++ b/pr/include/prmwait.h
@@ -105,7 +105,7 @@ typedef struct PRMWaitClientData PRMWaitClientData;
** in the caller's address space where data from an initial read
** can be placed. The description may indicate a null interval.
*/
-typedef struct PRRecvWait
+typedef struct PRRecvWait
{
PRCList internal; /* internal runtime linkages */
@@ -372,7 +372,7 @@ NSPR_API(PRStatus) PR_DestroyMWaitEnumerator(PRMWaitEnumerator* enumerator);
*/
NSPR_API(PRRecvWait*) PR_EnumerateWaitGroup(
PRMWaitEnumerator *enumerator, const PRRecvWait *previous);
-
+
PR_END_EXTERN_C
#endif /* defined(_PRMWAIT_H) */
diff --git a/pr/include/prnetdb.h b/pr/include/prnetdb.h
index 99fd62f7..c7a476aa 100644
--- a/pr/include/prnetdb.h
+++ b/pr/include/prnetdb.h
@@ -54,7 +54,7 @@ typedef struct PRHostEnt {
#endif
/***********************************************************************
-** FUNCTION:
+** FUNCTION:
** DESCRIPTION: PR_GetHostByName()
** Lookup a host by name.
**
@@ -78,7 +78,7 @@ NSPR_API(PRStatus) PR_GetHostByName(
const char *hostname, char *buf, PRIntn bufsize, PRHostEnt *hostentry);
/***********************************************************************
-** FUNCTION:
+** FUNCTION:
** DESCRIPTION: PR_GetIPNodeByName()
** Lookup a host by name. Equivalent to getipnodebyname(AI_DEFAULT)
** of RFC 2553.
@@ -120,7 +120,7 @@ NSPR_API(PRStatus) PR_GetIPNodeByName(
PRHostEnt *hostentry);
/***********************************************************************
-** FUNCTION:
+** FUNCTION:
** DESCRIPTION: PR_GetHostByAddr()
** Lookup a host entry by its network address.
**
@@ -144,7 +144,7 @@ NSPR_API(PRStatus) PR_GetHostByAddr(
const PRNetAddr *hostaddr, char *buf, PRIntn bufsize, PRHostEnt *hostentry);
/***********************************************************************
-** FUNCTION: PR_EnumerateHostEnt()
+** FUNCTION: PR_EnumerateHostEnt()
** DESCRIPTION:
** A stateless enumerator over a PRHostEnt structure acquired from
** PR_GetHostByName() PR_GetHostByAddr() to evaluate the possible
@@ -178,7 +178,7 @@ NSPR_API(PRIntn) PR_EnumerateHostEnt(
PRIntn enumIndex, const PRHostEnt *hostEnt, PRUint16 port, PRNetAddr *address);
/***********************************************************************
-** FUNCTION: PR_InitializeNetAddr(),
+** FUNCTION: PR_InitializeNetAddr(),
** DESCRIPTION:
** Initialize the fields of a PRNetAddr, assigning well known values as
** appropriate.
@@ -211,7 +211,7 @@ NSPR_API(PRStatus) PR_InitializeNetAddr(
PRNetAddrValue val, PRUint16 port, PRNetAddr *addr);
/***********************************************************************
-** FUNCTION: PR_SetNetAddr(),
+** FUNCTION: PR_SetNetAddr(),
** DESCRIPTION:
** Set the fields of a PRNetAddr, assigning well known values as
** appropriate. This function is similar to PR_InitializeNetAddr
@@ -239,13 +239,13 @@ NSPR_API(PRStatus) PR_SetNetAddr(
PRNetAddrValue val, PRUint16 af, PRUint16 port, PRNetAddr *addr);
/***********************************************************************
-** FUNCTION:
+** FUNCTION:
** DESCRIPTION: PR_IsNetAddrType()
** Determine if the network address is of the specified type.
**
** INPUTS:
** const PRNetAddr *addr A network address.
-** PRNetAddrValue The type of network address
+** PRNetAddrValue The type of network address
**
** RETURN:
** PRBool PR_TRUE if the network address is of the
@@ -254,7 +254,7 @@ NSPR_API(PRStatus) PR_SetNetAddr(
NSPR_API(PRBool) PR_IsNetAddrType(const PRNetAddr *addr, PRNetAddrValue val);
/***********************************************************************
-** FUNCTION:
+** FUNCTION:
** DESCRIPTION: PR_ConvertIPv4AddrToIPv6()
** Convert an IPv4 addr to an (IPv4-mapped) IPv6 addr
**
@@ -266,12 +266,12 @@ NSPR_API(PRBool) PR_IsNetAddrType(const PRNetAddr *addr, PRNetAddrValue val);
**
** RETURN:
** void
-**
+**
***********************************************************************/
NSPR_API(void) PR_ConvertIPv4AddrToIPv6(PRUint32 v4addr, PRIPv6Addr *v6addr);
/***********************************************************************
-** MACRO:
+** MACRO:
** DESCRIPTION: PR_NetAddrFamily()
** Get the 'family' field of a PRNetAddr union.
**
@@ -284,7 +284,7 @@ NSPR_API(void) PR_ConvertIPv4AddrToIPv6(PRUint32 v4addr, PRIPv6Addr *v6addr);
#define PR_NetAddrFamily(addr) ((addr)->raw.family)
/***********************************************************************
-** MACRO:
+** MACRO:
** DESCRIPTION: PR_NetAddrInetPort()
** Get the 'port' field of a PRNetAddr union.
**
@@ -298,7 +298,7 @@ NSPR_API(void) PR_ConvertIPv4AddrToIPv6(PRUint32 v4addr, PRIPv6Addr *v6addr);
((addr)->raw.family == PR_AF_INET6 ? (addr)->ipv6.port : (addr)->inet.port)
/***********************************************************************
-** FUNCTION:
+** FUNCTION:
** DESCRIPTION: PR_GetProtoByName()
** Lookup a protocol entry based on protocol's name
**
@@ -333,7 +333,7 @@ NSPR_API(PRStatus) PR_GetProtoByName(
const char* protocolname, char* buffer, PRInt32 bufsize, PRProtoEnt* result);
/***********************************************************************
-** FUNCTION:
+** FUNCTION:
** DESCRIPTION: PR_GetProtoByNumber()
** Lookup a protocol entry based on protocol's number
**
@@ -430,7 +430,7 @@ NSPR_API(void *) PR_EnumerateAddrInfo(
** PR_GetAddrInfoByName().
**
** INPUTS:
-** const PRAddrInfo *addrInfo
+** const PRAddrInfo *addrInfo
** The PRAddrInfo handle returned by a successful
** call to PR_GetAddrInfoByName().
** RETURN:
diff --git a/pr/include/prolock.h b/pr/include/prolock.h
index 5e5a4093..089b3e37 100644
--- a/pr/include/prolock.h
+++ b/pr/include/prolock.h
@@ -16,24 +16,24 @@ PR_BEGIN_EXTERN_C
** Hierarchy (or Lock Ordering) schema. An application designed
** using the Ordered Lock functions will terminate with a
** diagnostic message when a lock inversion condition is
-** detected.
-**
+** detected.
+**
** The lock ordering detection is compile-time enabled only. In
** optimized builds of NSPR, the Ordered Lock functions map
** directly to PRLock functions, providing no lock order
** detection.
-**
+**
** The Ordered Lock Facility is compiled in when DEBUG is defined at
** compile-time. Ordered Lock can be forced on in optimized builds by
** defining FORCE_NSPR_ORDERED_LOCK at compile-time. Both the
** application using Ordered Lock and NSPR must be compiled with the
** facility enabled to achieve the desired results.
-**
+**
** Application designers should use the macro interfaces to the Ordered
** Lock facility to ensure that it is compiled out in optimized builds.
**
** Application designers are responsible for defining their own
-** lock hierarchy.
+** lock hierarchy.
**
** Ordered Lock is thread-safe and SMP safe.
**
@@ -55,7 +55,7 @@ typedef void * PROrderedLock;
/*
** Map PROrderedLock and methods onto PRLock when ordered locking
** is not compiled in.
-**
+**
*/
#include "prlock.h"
@@ -64,19 +64,19 @@ typedef PRLock PROrderedLock;
/* -----------------------------------------------------------------------
** FUNCTION: PR_CreateOrderedLock() -- Create an Ordered Lock
-**
+**
** DESCRIPTION: PR_CreateOrderedLock() creates an ordered lock.
-**
+**
** INPUTS:
** order: user defined order of this lock.
** name: name of the lock. For debugging purposes.
-**
+**
** OUTPUTS: returned
-**
+**
** RETURNS: PR_OrderedLock pointer
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_ORDERED_LOCKS)
#define PR_CREATE_ORDERED_LOCK(order,name)\
@@ -85,26 +85,26 @@ typedef PRLock PROrderedLock;
#define PR_CREATE_ORDERED_LOCK(order) PR_NewLock()
#endif
-NSPR_API(PROrderedLock *)
- PR_CreateOrderedLock(
+NSPR_API(PROrderedLock *)
+ PR_CreateOrderedLock(
PRInt32 order,
const char *name
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_DestroyOrderedLock() -- Destroy an Ordered Lock
-**
+**
** DESCRIPTION: PR_DestroyOrderedLock() destroys the ordered lock
** referenced by lock.
-**
+**
** INPUTS: lock: pointer to a PROrderedLock
-**
+**
** OUTPUTS: the lock is destroyed
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_ORDERED_LOCKS)
#define PR_DESTROY_ORDERED_LOCK(lock) PR_DestroyOrderedLock((lock))
@@ -112,27 +112,27 @@ NSPR_API(PROrderedLock *)
#define PR_DESTROY_ORDERED_LOCK(lock) PR_DestroyLock((lock))
#endif
-NSPR_API(void)
- PR_DestroyOrderedLock(
- PROrderedLock *lock
+NSPR_API(void)
+ PR_DestroyOrderedLock(
+ PROrderedLock *lock
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_LockOrderedLock() -- Lock an ordered lock
-**
+**
** DESCRIPTION: PR_LockOrderedLock() locks the ordered lock
** referenced by lock. If the order of lock is less than or equal
** to the order of the highest lock held by the locking thread,
** the function asserts.
-**
+**
** INPUTS: lock: a pointer to a PROrderedLock
-**
+**
** OUTPUTS: The lock is held or the function asserts.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_ORDERED_LOCKS)
#define PR_LOCK_ORDERED_LOCK(lock) PR_LockOrderedLock((lock))
@@ -140,27 +140,27 @@ NSPR_API(void)
#define PR_LOCK_ORDERED_LOCK(lock) PR_Lock((lock))
#endif
-NSPR_API(void)
- PR_LockOrderedLock(
- PROrderedLock *lock
+NSPR_API(void)
+ PR_LockOrderedLock(
+ PROrderedLock *lock
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_UnlockOrderedLock() -- unlock and Ordered Lock
-**
+**
** DESCRIPTION: PR_UnlockOrderedLock() unlocks the lock referenced
** by lock.
-**
+**
** INPUTS: lock: a pointer to a PROrderedLock
-**
+**
** OUTPUTS: the lock is unlocked
-**
+**
** RETURNS:
** PR_SUCCESS
** PR_FAILURE
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined(DEBUG) || defined(FORCE_NSPR_ORDERED_LOCKS)
#define PR_UNLOCK_ORDERED_LOCK(lock) PR_UnlockOrderedLock((lock))
@@ -168,9 +168,9 @@ NSPR_API(void)
#define PR_UNLOCK_ORDERED_LOCK(lock) PR_Unlock((lock))
#endif
-NSPR_API(PRStatus)
- PR_UnlockOrderedLock(
- PROrderedLock *lock
+NSPR_API(PRStatus)
+ PR_UnlockOrderedLock(
+ PROrderedLock *lock
);
PR_END_EXTERN_C
diff --git a/pr/include/prproces.h b/pr/include/prproces.h
index 97825422..e23504ac 100644
--- a/pr/include/prproces.h
+++ b/pr/include/prproces.h
@@ -60,7 +60,7 @@ NSPR_API(PRStatus) PR_ProcessAttrSetInheritableFD(
** invalid arguments or insufficient resources.
**
** A process may be created such that the creator can later synchronize its
-** termination using PR_WaitProcess().
+** termination using PR_WaitProcess().
*/
NSPR_API(PRProcess*) PR_CreateProcess(
diff --git a/pr/include/prrng.h b/pr/include/prrng.h
index 3b5a4433..db7dc68c 100644
--- a/pr/include/prrng.h
+++ b/pr/include/prrng.h
@@ -6,12 +6,12 @@
/*
** prrng.h -- NSPR Random Number Generator
-**
+**
**
** lth. 29-Oct-1999.
*/
-#ifndef prrng_h___
+#ifndef prrng_h___
#define prrng_h___
#include "prtypes.h"
@@ -64,7 +64,7 @@ PR_BEGIN_EXTERN_C
** component.
**
*/
-NSPR_API(PRSize) PR_GetRandomNoise(
+NSPR_API(PRSize) PR_GetRandomNoise(
void *buf,
PRSize size
);
diff --git a/pr/include/prrwlock.h b/pr/include/prrwlock.h
index 65d052dd..cbaecdda 100644
--- a/pr/include/prrwlock.h
+++ b/pr/include/prrwlock.h
@@ -39,7 +39,7 @@ typedef struct PRRWLock PRRWLock;
** RETURN: PRRWLock*
** If the lock cannot be created because of resource constraints, NULL
** is returned.
-**
+**
***********************************************************************/
NSPR_API(PRRWLock*) PR_NewRWLock(PRUint32 lock_rank, const char *lock_name);
diff --git a/pr/include/prshm.h b/pr/include/prshm.h
index f821a58e..916a56c9 100644
--- a/pr/include/prshm.h
+++ b/pr/include/prshm.h
@@ -26,51 +26,51 @@
** given in the PR_OpenSharedMemory() call, a protocol for using the
** shared memory API is required to ensure desired behavior. Failing
** to follow the protocol may yield unpredictable results.
-**
+**
** PR_OpenSharedMemory() will create the shared memory segment, if it
** does not already exist, or open a connection that the existing
** shared memory segment if it already exists.
-**
+**
** PR_AttachSharedMemory() should be called following
** PR_OpenSharedMemory() to map the memory segment to an address in
** the application's address space.
-**
+**
** PR_AttachSharedMemory() may be called to re-map a shared memory
** segment after detaching the same PRSharedMemory object. Be
** sure to detach it when done.
-**
+**
** PR_DetachSharedMemory() should be called to un-map the shared
** memory segment from the application's address space.
-**
+**
** PR_CloseSharedMemory() should be called when no further use of the
** PRSharedMemory object is required within a process. Following a
** call to PR_CloseSharedMemory() the PRSharedMemory object is
** invalid and cannot be reused.
-**
+**
** PR_DeleteSharedMemory() should be called before process
** termination. After calling PR_DeleteSharedMemory() any further use
** of the shared memory associated with the name may cause
** unpredictable results.
-**
+**
** Files:
** The name passed to PR_OpenSharedMemory() should be a valid filename
** for a unix platform. PR_OpenSharedMemory() creates file using the
** name passed in. Some platforms may mangle the name before creating
** the file and the shared memory.
-**
+**
** The unix implementation may use SysV IPC shared memory, Posix
** shared memory, or memory mapped files; the filename may used to
** define the namespace. On Windows, the name is significant, but
** there is no file associated with name.
-**
+**
** No assumptions about the persistence of data in the named file
** should be made. Depending on platform, the shared memory may be
** mapped onto system paging space and be discarded at process
** termination.
-**
+**
** All names provided to PR_OpenSharedMemory() should be valid
** filename syntax or name syntax for shared memory for the target
-** platform. Referenced directories should have permissions
+** platform. Referenced directories should have permissions
** appropriate for writing.
**
** Limits:
@@ -132,11 +132,11 @@ typedef struct PRSharedMemory PRSharedMemory;
**
** INPUTS:
** name -- the name the shared-memory segment is known as.
-** size -- the size of the shared memory segment.
+** size -- the size of the shared memory segment.
** flags -- Options for creating the shared memory
** mode -- Same as is passed to PR_Open()
**
-** OUTPUTS:
+** OUTPUTS:
** The shared memory is allocated.
**
** RETURNS: Pointer to opaque structure PRSharedMemory or NULL.
@@ -160,12 +160,12 @@ NSPR_API( PRSharedMemory * )
**
** DESCRIPTION:
** PR_AttachSharedMemory() maps the shared-memory described by
-** shm to the current process.
+** shm to the current process.
**
-** INPUTS:
+** INPUTS:
** shm -- The handle returned from PR_OpenSharedMemory().
** flags -- options for mapping the shared memory.
-** PR_SHM_READONLY causes the memory to be attached
+** PR_SHM_READONLY causes the memory to be attached
** read-only.
**
** OUTPUTS:
@@ -183,7 +183,7 @@ NSPR_API( void * )
PRSharedMemory *shm,
PRIntn flags
);
-/* Define values for PR_AttachSharedMemory(...,flags) */
+/* Define values for PR_AttachSharedMemory(...,flags) */
#define PR_SHM_READONLY 0x01
/*
@@ -191,9 +191,9 @@ NSPR_API( void * )
**
** DESCRIPTION:
** PR_DetachSharedMemory() detaches the shared-memory described
-** by shm.
+** by shm.
**
-** INPUTS:
+** INPUTS:
** shm -- The handle returned from PR_OpenSharedMemory().
** addr -- The address at which the memory was attached.
**
@@ -216,7 +216,7 @@ NSPR_API( PRStatus )
** DESCRIPTION:
** PR_CloseSharedMemory() closes the shared-memory described by
** shm.
-**
+**
** INPUTS:
** shm -- The handle returned from PR_OpenSharedMemory().
**
@@ -248,7 +248,7 @@ NSPR_API( PRStatus )
**
*/
NSPR_API( PRStatus )
- PR_DeleteSharedMemory(
+ PR_DeleteSharedMemory(
const char *name
);
diff --git a/pr/include/prshma.h b/pr/include/prshma.h
index 2abc4aeb..2a1990ad 100644
--- a/pr/include/prshma.h
+++ b/pr/include/prshma.h
@@ -13,7 +13,7 @@
** memory described in prshm.h. The intent is to provide a shared
** memory that is accessable only by parent and child processes. ...
** It's a security thing.
-**
+**
** Depending on the underlying platform, the file-mapped shared memory
** may be backed by a file. ... surprise! ... On some platforms, no
** real file backs the shared memory. On platforms where the shared
@@ -24,11 +24,11 @@
** reading or writing its contents. Further, when all processes
** using an anonymous shared memory terminate, the backing file is
** deleted. ... If you are not paranoid, you're not paying attention.
-**
+**
** The file-mapped shared memory requires a protocol for the parent
** process and child process to share the memory. NSPR provides two
** protocols. Use one or the other; don't mix and match.
-**
+**
** In the first protocol, the job of passing the inheritable shared
** memory is done via helper-functions with PR_CreateProcess(). In the
** second protocol, the parent process is responsible for creating the
@@ -36,7 +36,7 @@
** passing a FileMap string. NSPR provides helper functions for
** extracting data from the PRFileMap object. ... See the examples
** below.
-**
+**
** Both sides should adhere strictly to the protocol for proper
** operation. The pseudo-code below shows the use of a file-mapped
** shared memory by a parent and child processes. In the examples, the
@@ -46,18 +46,18 @@
** First protocol.
** Server:
**
-** fm = PR_OpenAnonFileMap(dirName, size, FilemapProt);
-** addr = PR_MemMap(fm);
+** fm = PR_OpenAnonFileMap(dirName, size, FilemapProt);
+** addr = PR_MemMap(fm);
** attr = PR_NewProcessAttr();
** PR_ProcessAttrSetInheritableFileMap( attr, fm, shmname );
-** PR_CreateProcess(Client);
+** PR_CreateProcess(Client);
** PR_DestroyProcessAttr(attr);
** ... yadda ...
** PR_MemUnmap( addr );
** PR_CloseFileMap(fm);
**
**
-** Client:
+** Client:
** ... started by server via PR_CreateProcess()
** fm = PR_GetInheritedFileMap( shmname );
** addr = PR_MemMap(fm);
@@ -69,16 +69,16 @@
** Second Protocol:
** Server:
**
-** fm = PR_OpenAnonFileMap(dirName, size, FilemapProt);
+** fm = PR_OpenAnonFileMap(dirName, size, FilemapProt);
** fmstring = PR_ExportFileMapAsString( fm );
-** addr = PR_MemMap(fm);
+** addr = PR_MemMap(fm);
** ... application specific technique to pass fmstring to child
** ... yadda ... Server uses his own magic to create child
** PR_MemUnmap( addr );
** PR_CloseFileMap(fm);
**
**
-** Client:
+** Client:
** ... started by server via his own magic
** ... application specific technique to find fmstring from parent
** fm = PR_ImportFileMapFromString( fmstring )
@@ -93,7 +93,7 @@
** Note: The second protocol was requested by NelsonB (7/1999); this is
** to accomodate servers which already create their own child processes
** using platform native methods.
-**
+**
*/
#ifndef prshma_h___
@@ -123,7 +123,7 @@ PR_BEGIN_EXTERN_C
** dirName -- A directory name to contain the anonymous file.
** size -- The size of the shared memory
** prot -- How the shared memory is mapped. See prio.h
-**
+**
** Outputs:
** PRFileMap *
**
@@ -134,12 +134,12 @@ PR_BEGIN_EXTERN_C
NSPR_API( PRFileMap *)
PR_OpenAnonFileMap(
const char *dirName,
- PRSize size,
+ PRSize size,
PRFileMapProtect prot
-);
+);
/*
-** PR_ProcessAttrSetInheritableFileMap() -- Prepare FileMap for export
+** PR_ProcessAttrSetInheritableFileMap() -- Prepare FileMap for export
** to my children processes via PR_CreateProcess()
**
** Description:
@@ -159,10 +159,10 @@ PR_OpenAnonFileMap(
** PRStatus
**
*/
-NSPR_API(PRStatus)
-PR_ProcessAttrSetInheritableFileMap(
+NSPR_API(PRStatus)
+PR_ProcessAttrSetInheritableFileMap(
PRProcessAttr *attr,
- PRFileMap *fm,
+ PRFileMap *fm,
const char *shmname
);
@@ -176,7 +176,7 @@ PR_ProcessAttrSetInheritableFileMap(
**
** Inputs:
** shmname -- The name provided to PR_ProcessAttrSetInheritableFileMap()
-**
+**
** Outputs:
** PRFileMap *
**
@@ -185,8 +185,8 @@ PR_ProcessAttrSetInheritableFileMap(
**
*/
NSPR_API( PRFileMap *)
-PR_GetInheritedFileMap(
- const char *shmname
+PR_GetInheritedFileMap(
+ const char *shmname
);
/*
@@ -209,7 +209,7 @@ PR_GetInheritedFileMap(
**
*/
NSPR_API( PRStatus )
-PR_ExportFileMapAsString(
+PR_ExportFileMapAsString(
PRFileMap *fm,
PRSize bufsize,
char *buf
@@ -231,7 +231,7 @@ PR_ExportFileMapAsString(
**
*/
NSPR_API( PRFileMap * )
-PR_ImportFileMapFromString(
+PR_ImportFileMapFromString(
const char *fmstring
);
diff --git a/pr/include/prsystem.h b/pr/include/prsystem.h
index b3e14e7f..1b9c7ed8 100644
--- a/pr/include/prsystem.h
+++ b/pr/include/prsystem.h
@@ -77,13 +77,13 @@ NSPR_API(PRInt32) PR_GetPageShift(void);
** Description:
** PR_GetNumberOfProcessors() extracts the number of processors
** (CPUs available in an SMP system) and returns the number.
-**
+**
** Parameters:
** none
**
** Returns:
** The number of available processors or -1 on error
-**
+**
*/
NSPR_API(PRInt32) PR_GetNumberOfProcessors( void );
diff --git a/pr/include/prthread.h b/pr/include/prthread.h
index f8b28a62..98f8a6df 100644
--- a/pr/include/prthread.h
+++ b/pr/include/prthread.h
@@ -32,8 +32,8 @@
** process exits when the last user thread exits).
**
** Threads also have a "scope flag" which controls whether the threads
-** are scheduled in the local scope or scheduled by the OS globally. This
-** indicates whether a thread is permanently bound to a native OS thread.
+** are scheduled in the local scope or scheduled by the OS globally. This
+** indicates whether a thread is permanently bound to a native OS thread.
** An unbound thread competes for scheduling resources in the same process.
**
** Another flag is "state flag" which control whether the thread is joinable.
@@ -112,9 +112,9 @@ NSPR_API(PRThread*) PR_CreateThread(PRThreadType type,
/*
** Wait for thread termination:
-** "thread" is the target thread
+** "thread" is the target thread
**
-** This can return PR_FAILURE if no joinable thread could be found
+** This can return PR_FAILURE if no joinable thread could be found
** corresponding to the specified target thread.
**
** The calling thread is blocked until the target thread completes.
@@ -163,9 +163,9 @@ NSPR_API(PRStatus) PR_SetCurrentThreadName(const char *name);
NSPR_API(const char *) PR_GetThreadName(const PRThread *thread);
/*
-** This routine returns a new index for per-thread-private data table.
-** The index is visible to all threads within a process. This index can
-** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines
+** This routine returns a new index for per-thread-private data table.
+** The index is visible to all threads within a process. This index can
+** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines
** to save and retrieve data associated with the index for a thread.
**
** Each index is associationed with a destructor function ('dtor'). The function
@@ -176,14 +176,14 @@ NSPR_API(const char *) PR_GetThreadName(const PRThread *thread);
** - new thread private data is set and the current private data is
** not NULL.
**
-** The index independently maintains specific values for each binding thread.
+** The index independently maintains specific values for each binding thread.
** A thread can only get access to its own thread-specific-data.
**
** Upon a new index return the value associated with the index for all threads
-** is NULL, and upon thread creation the value associated with all indices for
-** that thread is NULL.
+** is NULL, and upon thread creation the value associated with all indices for
+** that thread is NULL.
**
-** Returns PR_FAILURE if the total number of indices will exceed the maximun
+** Returns PR_FAILURE if the total number of indices will exceed the maximun
** allowed.
*/
typedef void (PR_CALLBACK *PRThreadPrivateDTOR)(void *priv);
@@ -194,7 +194,7 @@ NSPR_API(PRStatus) PR_NewThreadPrivateIndex(
/*
** Define some per-thread-private data.
** "tpdIndex" is an index into the per-thread private data table
-** "priv" is the per-thread-private data
+** "priv" is the per-thread-private data
**
** If the per-thread private data table has a previously registered
** destructor function and a non-NULL per-thread-private data value,
@@ -206,9 +206,9 @@ NSPR_API(PRStatus) PR_SetThreadPrivate(PRUintn tpdIndex, void *priv);
/*
** Recover the per-thread-private data for the current thread. "tpdIndex" is
-** the index into the per-thread private data table.
+** the index into the per-thread private data table.
**
-** The returned value may be NULL which is indistinguishable from an error
+** The returned value may be NULL which is indistinguishable from an error
** condition.
**
** A thread can only get access to its own thread-specific-data.
diff --git a/pr/include/prtrace.h b/pr/include/prtrace.h
index 12a5fbfb..aa16a830 100644
--- a/pr/include/prtrace.h
+++ b/pr/include/prtrace.h
@@ -6,59 +6,59 @@
#ifndef prtrace_h___
#define prtrace_h___
/*
-** prtrace.h -- NSPR's Trace Facility.
-**
-** The Trace Facility provides a means to trace application
-** program events within a process. When implementing an
-** application program an engineer may insert a "Trace" function
-** call, passing arguments to be traced. The "Trace" function
-** combines the user trace data with identifying data and
-** writes this data in time ordered sequence into a circular
+** prtrace.h -- NSPR's Trace Facility.
+**
+** The Trace Facility provides a means to trace application
+** program events within a process. When implementing an
+** application program an engineer may insert a "Trace" function
+** call, passing arguments to be traced. The "Trace" function
+** combines the user trace data with identifying data and
+** writes this data in time ordered sequence into a circular
** in-memory buffer; when the buffer fills, it wraps.
-**
-** Functions are provided to set and/or re-configure the size of
-** the trace buffer, control what events are recorded in the
-** buffer, enable and disable tracing based on specific user
-** supplied data and other control functions. Methods are provided
+**
+** Functions are provided to set and/or re-configure the size of
+** the trace buffer, control what events are recorded in the
+** buffer, enable and disable tracing based on specific user
+** supplied data and other control functions. Methods are provided
** to record the trace entries in the in-memory trace buffer to
** a file.
-**
-** Tracing may cause a performance degredation to the application
-** depending on the number and placement of calls to the tracing
-** facility. When tracing is compiled in and all tracing is
-** disabled via the runtime controls, the overhead should be
-** minimal. ... Famous last words, eh?
-**
-** When DEBUG is defined at compile time, the Trace Facility is
-** compiled as part of NSPR and any application using NSPR's
-** header files will have tracing compiled in. When DEBUG is not
-** defined, the Trace Facility is not compiled into NSPR nor
-** exported in its header files. If the Trace Facility is
-** desired in a non-debug build, then FORCE_NSPR_TRACE may be
-** defined at compile time for both the optimized build of NSPR
-** and the application. NSPR and any application using NSPR's
-** Trace Facility must be compiled with the same level of trace
-** conditioning or unresolved references may be realized at link
-** time.
-**
-** For any of the Trace Facility methods that requires a trace
-** handle as an input argument, the caller must ensure that the
-** trace handle argument is valid. An invalid trace handle
-** argument may cause unpredictable results.
-**
-** Trace Facility methods are thread-safe and SMP safe.
-**
-** Users of the Trace Facility should use the defined macros to
-** invoke trace methods, not the function calls directly. e.g.
+**
+** Tracing may cause a performance degredation to the application
+** depending on the number and placement of calls to the tracing
+** facility. When tracing is compiled in and all tracing is
+** disabled via the runtime controls, the overhead should be
+** minimal. ... Famous last words, eh?
+**
+** When DEBUG is defined at compile time, the Trace Facility is
+** compiled as part of NSPR and any application using NSPR's
+** header files will have tracing compiled in. When DEBUG is not
+** defined, the Trace Facility is not compiled into NSPR nor
+** exported in its header files. If the Trace Facility is
+** desired in a non-debug build, then FORCE_NSPR_TRACE may be
+** defined at compile time for both the optimized build of NSPR
+** and the application. NSPR and any application using NSPR's
+** Trace Facility must be compiled with the same level of trace
+** conditioning or unresolved references may be realized at link
+** time.
+**
+** For any of the Trace Facility methods that requires a trace
+** handle as an input argument, the caller must ensure that the
+** trace handle argument is valid. An invalid trace handle
+** argument may cause unpredictable results.
+**
+** Trace Facility methods are thread-safe and SMP safe.
+**
+** Users of the Trace Facility should use the defined macros to
+** invoke trace methods, not the function calls directly. e.g.
** PR_TRACE( h1,0,1,2, ...); not PR_Trace(h1,0,1,2, ...);
-**
+**
** Application designers should be aware of the effects of
** debug and optimized build differences when using result of the
** Trace Facility macros in expressions.
-**
-** See Also: prcountr.h
-**
-** /lth. 08-Jun-1998.
+**
+** See Also: prcountr.h
+**
+** /lth. 08-Jun-1998.
*/
#include "prtypes.h"
@@ -68,7 +68,7 @@
PR_BEGIN_EXTERN_C
/*
-** Opaque type for the trace handle
+** Opaque type for the trace handle
** ... Don't even think about looking in here.
**
*/
@@ -95,7 +95,7 @@ typedef struct PRTraceEntry
typedef enum PRTraceOption
{
PRTraceBufSize,
- PRTraceEnable,
+ PRTraceEnable,
PRTraceDisable,
PRTraceSuspend,
PRTraceResume,
@@ -108,20 +108,20 @@ typedef enum PRTraceOption
/* -----------------------------------------------------------------------
** FUNCTION: PR_DEFINE_TRACE() -- Define a PRTraceHandle
-**
+**
** DESCRIPTION: PR_DEFINE_TRACE() is used to define a trace
** handle.
-**
+**
*/
#define PR_DEFINE_TRACE(name) PRTraceHandle name
/* -----------------------------------------------------------------------
** FUNCTION: PR_INIT_TRACE_HANDLE() -- Set the value of a PRTraceHandle
-**
-** DESCRIPTION:
+**
+** DESCRIPTION:
** PR_INIT_TRACE_HANDLE() sets the value of a PRTraceHandle
** to value. e.g. PR_INIT_TRACE_HANDLE( myHandle, NULL );
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_INIT_TRACE_HANDLE(handle,value)\
@@ -133,35 +133,35 @@ typedef enum PRTraceOption
/* -----------------------------------------------------------------------
** FUNCTION: PR_CreateTrace() -- Create a trace handle
-**
+**
** DESCRIPTION:
** PR_CreateTrace() creates a new trace handle. Tracing is
** enabled for this handle when it is created. The trace handle
** is intended for use in other Trace Facility calls.
-**
+**
** PR_CreateTrace() registers the QName, RName and description
** data so that this data can be retrieved later.
-**
-** INPUTS:
-** qName: pointer to string. QName for this trace handle.
-**
-** rName: pointer to string. RName for this trace handle.
-**
+**
+** INPUTS:
+** qName: pointer to string. QName for this trace handle.
+**
+** rName: pointer to string. RName for this trace handle.
+**
** description: pointer to string. Descriptive data about this
** trace handle.
**
** OUTPUTS:
-** Creates the trace handle.
+** Creates the trace handle.
** Registers the QName and RName with the trace facility.
-**
-** RETURNS:
+**
+** RETURNS:
** PRTraceHandle
-**
+**
** RESTRICTIONS:
** qName is limited to 31 characters.
** rName is limited to 31 characters.
** description is limited to 255 characters.
-**
+**
*/
#define PRTRACE_NAME_MAX 31
#define PRTRACE_DESC_MAX 255
@@ -174,7 +174,7 @@ typedef enum PRTraceOption
#endif
NSPR_API(PRTraceHandle)
- PR_CreateTrace(
+ PR_CreateTrace(
const char *qName, /* QName for this trace handle */
const char *rName, /* RName for this trace handle */
const char *description /* description for this trace handle */
@@ -183,22 +183,22 @@ NSPR_API(PRTraceHandle)
/* -----------------------------------------------------------------------
** FUNCTION: PR_DestroyTrace() -- Destroy a trace handle
-**
-** DESCRIPTION:
+**
+** DESCRIPTION:
** PR_DestroyTrace() removes the referenced trace handle and
** associated QName, RName and description data from the Trace
** Facility.
-**
+**
** INPUTS: handle. A PRTraceHandle
-**
-** OUTPUTS:
+**
+** OUTPUTS:
** The trace handle is unregistered.
** The QName, RName and description are removed.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_DESTROY_TRACE(handle)\
@@ -207,15 +207,15 @@ NSPR_API(PRTraceHandle)
#define PR_DESTROY_TRACE(handle)
#endif
-NSPR_API(void)
- PR_DestroyTrace(
+NSPR_API(void)
+ PR_DestroyTrace(
PRTraceHandle handle /* Handle to be destroyed */
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_Trace() -- Make a trace entry in the in-memory trace
-**
+**
** DESCRIPTION:
** PR_Trace() makes an entry in the in-memory trace buffer for
** the referenced trace handle. The next logically available
@@ -225,21 +225,21 @@ NSPR_API(void)
** PR_Trace() for a specific trace handle may be disabled by
** calling PR_SetTraceOption() specifying PRTraceDisable for the
** trace handle to be disabled.
-**
+**
** INPUTS:
** handle: PRTraceHandle. The trace handle for this trace.
-**
+**
** userData[0..7]: unsigned 32bit integers. user supplied data
** that is copied into the PRTraceEntry
-**
+**
** OUTPUTS:
** A PRTraceEntry is (conditionally) formatted in the in-memory
** trace buffer.
-**
+**
** RETURNS: void.
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_TRACE(handle,ud0,ud1,ud2,ud3,ud4,ud5,ud6,ud7)\
@@ -248,8 +248,8 @@ NSPR_API(void)
#define PR_TRACE(handle,ud0,ud1,ud2,ud3,ud4,ud5,ud6,ud7)
#endif
-NSPR_API(void)
- PR_Trace(
+NSPR_API(void)
+ PR_Trace(
PRTraceHandle handle, /* use this trace handle */
PRUint32 userData0, /* User supplied data word 0 */
PRUint32 userData1, /* User supplied data word 1 */
@@ -263,12 +263,12 @@ NSPR_API(void)
/* -----------------------------------------------------------------------
** FUNCTION: PR_SetTraceOption() -- Control the Trace Facility
-**
+**
** DESCRIPTION:
** PR_SetTraceOption() controls the Trace Facility. Depending on
** command and value, attributes of the Trace Facility may be
** changed.
-**
+**
** INPUTS:
** command: An enumerated value in the set of PRTraceOption.
** value: pointer to the data to be set. Type of the data is
@@ -277,25 +277,25 @@ NSPR_API(void)
**
** PRTraceBufSize: unsigned long: the size of the trace buffer,
** in bytes.
-**
+**
** PRTraceEnable: PRTraceHandle. The trace handle to be
** enabled.
-**
+**
** PRTraceDisable: PRTraceHandle. The trace handle to be
** disabled.
-**
+**
** PRTraceSuspend: void. value must be NULL. All tracing is
** suspended.
-**
+**
** PRTraceResume: void. value must be NULL. Tracing for all
** previously enabled, prior to a PRTraceSuspend, is resumed.
-**
+**
** PRTraceStopRecording: void. value must be NULL. If recording
-** (see: ** PR_RecordTraceEntries()) is being done,
+** (see: ** PR_RecordTraceEntries()) is being done,
** PRTraceStopRecording causes PR_RecordTraceEntries() to return
** to its caller. If recording is not being done, this function
** has no effect.
-**
+**
** PRTraceSuspendRecording: void. Must be NULL. If recording is
** being done, PRTraceSuspendRecording causes further writes to
** the trace file to be suspended. Data in the in-memory
@@ -304,29 +304,29 @@ NSPR_API(void)
** to be entered in the in-memory buffer. If the Trace Facility
** recording is already in a suspended state, the call has no
** effect.
-**
+**
** PRTraceResumeRecording: void. value must be NULL. If
** recording for the Trace Facility has been previously been
** suspended, this causes recording to resume. Recording resumes
** with the next in-memory buffer segment that would be written
** if trace recording had not been suspended. If recording is
** not currently suspended, the call has no effect.
-**
+**
** PRTraceLockHandles: void. value must be NULL. Locks the
** trace handle lock. While the trace handle lock is held,
** calls to PR_CreateTrace() will block until the lock is
** released.
-**
+**
** PRTraceUnlockHandles: void. value must be NULL. Unlocks the
** trace handle lock.
-**
+**
** OUTPUTS:
** The operation of the Trace Facility may be changed.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_SET_TRACE_OPTION(command,value)\
@@ -335,8 +335,8 @@ NSPR_API(void)
#define PR_SET_TRACE_OPTION(command,value)
#endif
-NSPR_API(void)
- PR_SetTraceOption(
+NSPR_API(void)
+ PR_SetTraceOption(
PRTraceOption command, /* One of the enumerated values */
void *value /* command value or NULL */
);
@@ -344,27 +344,27 @@ NSPR_API(void)
/* -----------------------------------------------------------------------
** FUNCTION: PR_GetTraceOption() -- Retrieve settings from the Trace Facility
-**
+**
** DESCRIPTION:
** PR_GetTraceOption() retrieves the current setting of the
** Trace Facility control depending on command.
-**
-**
+**
+**
** PRTraceBufSize: unsigned long: the size of the trace buffer,
** in bytes.
-**
-**
+**
+**
** INPUTS:
** command: one of the enumerated values in PRTraceOptions
** valid for PR_GetTraceOption().
-**
+**
** OUTPUTS:
** dependent on command.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_GET_TRACE_OPTION(command,value)\
@@ -373,8 +373,8 @@ NSPR_API(void)
#define PR_GET_TRACE_OPTION(command,value)
#endif
-NSPR_API(void)
- PR_GetTraceOption(
+NSPR_API(void)
+ PR_GetTraceOption(
PRTraceOption command, /* One of the enumerated values */
void *value /* command value or NULL */
);
@@ -382,25 +382,25 @@ NSPR_API(void)
/* -----------------------------------------------------------------------
** FUNCTION: PR_GetTraceHandleFromName() -- Retrieve an existing
** handle by name.
-**
+**
** DESCRIPTION:
** PR_GetTraceHandleFromName() retreives an existing tracehandle
** using the name specified by qName and rName.
-**
+**
** INPUTS:
-** qName: pointer to string. QName for this trace handle.
-**
-** rName: pointer to string. RName for this trace handle.
-**
-**
+** qName: pointer to string. QName for this trace handle.
+**
+** rName: pointer to string. RName for this trace handle.
+**
+**
** OUTPUTS: returned.
-**
-** RETURNS:
+**
+** RETURNS:
** PRTraceHandle associated with qName and rName or NULL when
** there is no match.
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_GET_TRACE_HANDLE_FROM_NAME(handle,qName,rName)\
@@ -409,8 +409,8 @@ NSPR_API(void)
#define PR_GET_TRACE_HANDLE_FROM_NAME(handle,qName,rName)
#endif
-NSPR_API(PRTraceHandle)
- PR_GetTraceHandleFromName(
+NSPR_API(PRTraceHandle)
+ PR_GetTraceHandleFromName(
const char *qName, /* QName search argument */
const char *rName /* RName search argument */
);
@@ -418,21 +418,21 @@ NSPR_API(PRTraceHandle)
/* -----------------------------------------------------------------------
** FUNCTION: PR_GetTraceNameFromHandle() -- Retreive trace name
** by bandle.
-**
+**
** DESCRIPTION:
** PR_GetTraceNameFromHandle() retreives the existing qName,
** rName, and description for the referenced trace handle.
-**
+**
** INPUTS: handle: PRTraceHandle.
-**
+**
** OUTPUTS: pointers to the Trace Facility's copy of qName,
** rName and description. ... Don't mess with these values.
** They're mine.
-**
+**
** RETURNS: void
-**
+**
** RESTRICTIONS:
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_GET_TRACE_NAME_FROM_HANDLE(handle,qName,rName,description)\
@@ -441,8 +441,8 @@ NSPR_API(PRTraceHandle)
#define PR_GET_TRACE_NAME_FROM_HANDLE(handle,qName,rName,description)
#endif
-NSPR_API(void)
- PR_GetTraceNameFromHandle(
+NSPR_API(void)
+ PR_GetTraceNameFromHandle(
PRTraceHandle handle, /* handle as search argument */
const char **qName, /* pointer to associated QName */
const char **rName, /* pointer to associated RName */
@@ -452,29 +452,29 @@ NSPR_API(void)
/* -----------------------------------------------------------------------
** FUNCTION: PR_FindNextTraceQname() -- Retrieive a QName handle
** iterator.
-**
+**
** DESCRIPTION:
** PR_FindNextTraceQname() retreives the first or next trace
** QName handle, depending on the value of handle, from the trace
** database. The PRTraceHandle returned can be used as an
** iterator to traverse the QName handles in the Trace database.
-**
+**
** INPUTS:
** handle: When NULL, PR_FindNextQname() returns the first QName
** handle. When a handle is a valid PRTraceHandle previously
** retreived using PR_FindNextQname() the next QName handle is
** retreived.
-**
+**
** OUTPUTS: returned.
-**
-** RETURNS:
+**
+** RETURNS:
** PRTraceHandle or NULL when there are no trace handles.
-**
+**
** RESTRICTIONS:
** Iterating thru the trace handles via FindFirst/FindNext
** should be done under protection of the trace handle lock.
** See: PR_SetTraceOption( PRLockTraceHandles ).
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_FIND_NEXT_TRACE_QNAME(next,handle)\
@@ -483,8 +483,8 @@ NSPR_API(void)
#define PR_FIND_NEXT_TRACE_QNAME(next,handle)
#endif
-NSPR_API(PRTraceHandle)
- PR_FindNextTraceQname(
+NSPR_API(PRTraceHandle)
+ PR_FindNextTraceQname(
PRTraceHandle handle
);
@@ -492,13 +492,13 @@ NSPR_API(PRTraceHandle)
/* -----------------------------------------------------------------------
** FUNCTION: PR_FindNextTraceRname() -- Retrieive an RName handle
** iterator.
-**
+**
** DESCRIPTION:
** PR_FindNextTraceRname() retreives the first or next trace
** RName handle, depending on the value of handle, from the trace
** database. The PRTraceHandle returned can be used as an
** iterator to traverse the RName handles in the Trace database.
-**
+**
** INPUTS:
** rhandle: When NULL, PR_FindNextRname() returns the first
** RName handle. When a handle is a valid PRTraceHandle
@@ -506,17 +506,17 @@ NSPR_API(PRTraceHandle)
** handle is retreived.
** qhandle: A valid PRTraceHandle retruned from a previous call
** to PR_FIND_NEXT_TRACE_QNAME().
-**
+**
** OUTPUTS: returned.
-**
-** RETURNS:
+**
+** RETURNS:
** PRTraceHandle or NULL when there are no trace handles.
-**
+**
** RESTRICTIONS:
** Iterating thru the trace handles via FindNext should be done
** under protection of the trace handle lock. See: (
** PR_SetTraceOption( PRLockTraceHandles ).
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_FIND_NEXT_TRACE_RNAME(next,rhandle,qhandle)\
@@ -525,15 +525,15 @@ NSPR_API(PRTraceHandle)
#define PR_FIND_NEXT_TRACE_RNAME(next,rhandle,qhandle)
#endif
-NSPR_API(PRTraceHandle)
- PR_FindNextTraceRname(
+NSPR_API(PRTraceHandle)
+ PR_FindNextTraceRname(
PRTraceHandle rhandle,
PRTraceHandle qhandle
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_RecordTraceEntries() -- Write trace entries to external media
-**
+**
** DESCRIPTION:
** PR_RecordTraceEntries() causes entries in the in-memory trace
** buffer to be written to external media.
@@ -543,8 +543,8 @@ NSPR_API(PRTraceHandle)
** calls PR_SetTraceOption() with the PRTraceStopRecording
** option. This suggests that PR_RecordTraceEntries() should be
** called from a user supplied thread whose only job is to
-** record trace entries.
-**
+** record trace entries.
+**
** The environment variable NSPR_TRACE_LOG controls the operation
** of this function. When NSPR_TRACE_LOG is not defined in the
** environment, no recording of trace entries occurs. When
@@ -558,21 +558,21 @@ NSPR_API(PRTraceHandle)
** active trace records being written over time, and other
** variables that some trace records can be lost. ... In other
** words: don't bet the farm on getting everything.
-**
+**
** INPUTS: none
-**
+**
** OUTPUTS: none
-**
+**
** RETURNS: PR_STATUS
** PR_SUCCESS no errors were found.
** PR_FAILURE errors were found.
-**
+**
** RESTRICTIONS:
** Only one thread can call PR_RecordTraceEntries() within a
** process.
-**
+**
** On error, PR_RecordTraceEntries() may return prematurely.
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_RECORD_TRACE_ENTRIES()\
@@ -580,16 +580,16 @@ NSPR_API(PRTraceHandle)
#else
#define PR_RECORD_TRACE_ENTRIES()
#endif
-
+
NSPR_API(void)
PR_RecordTraceEntries(
- void
+ void
);
/* -----------------------------------------------------------------------
** FUNCTION: PR_GetTraceEntries() -- Retreive trace entries from
** the Trace Facility
-**
+**
** DESCRIPTION:
** PR_GetTraceEntries() retreives trace entries from the Trace
** Facility. Up to count trace entries are copied from the Trace
@@ -599,32 +599,32 @@ NSPR_API(void)
** variable pointed to by found.
**
** If more than count trace entries have entered the Trace
-** Facility since the last call to PR_GetTraceEntries()
+** Facility since the last call to PR_GetTraceEntries()
** a lost data condition is returned. In this case, the most
** recent count trace entries are copied into buffer and found is
** set to count.
-**
+**
** INPUTS:
** count. The number of trace entries to be copied into buffer.
-**
-**
+**
+**
** OUTPUTS:
** buffer. An array of PRTraceEntries. The buffer is supplied
** by the caller.
-**
+**
** found: 32bit signed integer. The number of PRTraceEntries
** actually copied. found is always less than or equal to count.
-**
-** RETURNS:
+**
+** RETURNS:
** zero when there is no lost data.
** non-zero when some PRTraceEntries have been lost.
-**
+**
** RESTRICTIONS:
** This is a real performance pig. The copy out operation is bad
** enough, but depending on then frequency of calls to the
** function, serious performance impact to the operating
** application may be realized. ... YMMV.
-**
+**
*/
#if defined (DEBUG) || defined (FORCE_NSPR_TRACE)
#define PR_GET_TRACE_ENTRIES(buffer,count,found)\
diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h
index 5ed4409b..74419ea2 100644
--- a/pr/include/prtypes.h
+++ b/pr/include/prtypes.h
@@ -219,7 +219,7 @@ typedef unsigned char PRUint8;
** Mozilla C++ code expects the PRInt{N} and int{N}_t types to match (see bug
** 634793). If a platform defines int8_t as 'char', but NSPR defines it as
** 'signed char', it results in a type mismatch.
-** On such platforms we define PRInt8 as 'char' to avoid the mismatch.
+** On such platforms we define PRInt8 as 'char' to avoid the mismatch.
*/
#if (defined(HPUX) && defined(__cplusplus) /* reason 1*/ \
&& !defined(__GNUC__) && __cplusplus < 199707L) \
diff --git a/pr/include/prvrsion.h b/pr/include/prvrsion.h
index a8415b2a..99ed1db6 100755
--- a/pr/include/prvrsion.h
+++ b/pr/include/prvrsion.h
@@ -28,23 +28,23 @@ PR_BEGIN_EXTERN_C
typedef struct {
/*
* The first field defines which version of this structure is in use.
- * At this time, only version 2 is specified. If this value is not
+ * At this time, only version 2 is specified. If this value is not
* 2, you must read no further into the structure.
*/
- PRInt32 version;
-
+ PRInt32 version;
+
/* for Version 2, this is the body format. */
PRInt64 buildTime; /* 64 bits - usecs since midnight, 1/1/1970 */
char * buildTimeString;/* a human readable version of the time */
-
+
PRUint8 vMajor; /* Major version of this component */
PRUint8 vMinor; /* Minor version of this component */
PRUint8 vPatch; /* Patch level of this component */
-
+
PRBool beta; /* true if this is a beta component */
PRBool debug; /* true if this is a debug component */
PRBool special; /* true if this component is a special build */
-
+
char * filename; /* The original filename */
char * description; /* description of this component */
char * security; /* level of security in this component */
@@ -76,8 +76,8 @@ typedef struct {
*/
typedef const PRVersionDescription *(*versionEntryPointType)(void);
-/*
- * Where you declare your libVersionPoint, do it like this:
+/*
+ * Where you declare your libVersionPoint, do it like this:
* PR_IMPLEMENT(const PRVersionDescription *) libVersionPoint(void) {
* fill it in...
* }
diff --git a/pr/include/prwin16.h b/pr/include/prwin16.h
index 9f8d7a99..636a89b8 100644
--- a/pr/include/prwin16.h
+++ b/pr/include/prwin16.h
@@ -13,7 +13,7 @@
#include <stdio.h>
PR_BEGIN_EXTERN_C
-/*
+/*
** Win16 stdio special case.
** To get stdio to work for Win16, all calls to printf() and related
** things must be called from the environment of the .EXE; calls to
@@ -29,7 +29,7 @@ PR_BEGIN_EXTERN_C
** any application needing stdio for Win16.
**
** The address of these functions must be made available to the .DLL
-** so he can call back to the .EXE. To do this, function
+** so he can call back to the .EXE. To do this, function
** PR_MD_RegisterW16StdioCallbacks() is called from the .EXE.
** The arguments are the functions defined in w16stdio.c
** At runtime, MD_Write() calls the registered functions, if any
@@ -50,7 +50,7 @@ typedef PRInt32 (PR_CALLBACK *PRStdoutWrite)( void *buf, PRInt32 amount);
typedef PRInt32 (PR_CALLBACK *PRStderrWrite)( void *buf, PRInt32 amount);
NSPR_API(PRStatus)
-PR_MD_RegisterW16StdioCallbacks(
+PR_MD_RegisterW16StdioCallbacks(
PRStdinRead inReadf, /* i: function pointer for stdin read */
PRStdoutWrite outWritef, /* i: function pointer for stdout write */
PRStderrWrite errWritef /* i: function pointer for stderr write */
@@ -85,31 +85,31 @@ struct PRMethodCallbackStr {
NSPR_API(void) PR_MDRegisterCallbacks(struct PRMethodCallbackStr *);
int PR_CALLBACK _PL_W16CallBackPuts( const char *outputString );
-size_t PR_CALLBACK _PL_W16CallBackStrftime(
- char *s,
- size_t len,
+size_t PR_CALLBACK _PL_W16CallBackStrftime(
+ char *s,
+ size_t len,
const char *fmt,
const struct tm *p );
void * PR_CALLBACK _PL_W16CallBackMalloc( size_t size );
void * PR_CALLBACK _PL_W16CallBackCalloc( size_t n, size_t size );
-void * PR_CALLBACK _PL_W16CallBackRealloc(
- void *old_blk,
+void * PR_CALLBACK _PL_W16CallBackRealloc(
+ void *old_blk,
size_t size );
void PR_CALLBACK _PL_W16CallBackFree( void *ptr );
void * PR_CALLBACK _PL_W16CallBackGetenv( const char *name );
int PR_CALLBACK _PL_W16CallBackPutenv( const char *assoc );
/*
-** Hackery!
+** Hackery!
**
** These functions are provided as static link points.
** This is to satisfy the quick port of Gromit to NSPR 2.0
** ... Don't do this! ... alas, It may never go away.
-**
+**
*/
NSPR_API(int) PR_MD_printf(const char *, ...);
NSPR_API(void) PR_MD_exit(int);
-NSPR_API(size_t) PR_MD_strftime(char *, size_t, const char *, const struct tm *);
+NSPR_API(size_t) PR_MD_strftime(char *, size_t, const char *, const struct tm *);
NSPR_API(int) PR_MD_sscanf(const char *, const char *, ...);
NSPR_API(void*) PR_MD_malloc( size_t size );
NSPR_API(void*) PR_MD_calloc( size_t n, size_t size );
diff --git a/pr/src/cplus/rcascii.h b/pr/src/cplus/rcascii.h
index 7383d8d6..f8b59ce0 100644
--- a/pr/src/cplus/rcascii.h
+++ b/pr/src/cplus/rcascii.h
@@ -81,7 +81,7 @@ private:
** for this class.
*/
PRSize StuffFunction(void*, const char*, PRSize);
-
+
}; /* RCFormatBuffer */
/*
diff --git a/pr/src/cplus/rcinrval.h b/pr/src/cplus/rcinrval.h
index bcf755fa..4ff26dc5 100644
--- a/pr/src/cplus/rcinrval.h
+++ b/pr/src/cplus/rcinrval.h
@@ -66,7 +66,7 @@ public:
private:
PRIntervalTime interval;
-
+
}; /* RCInterval */
diff --git a/pr/src/cplus/rcnetio.cpp b/pr/src/cplus/rcnetio.cpp
index f511d81d..cbbadcfe 100644
--- a/pr/src/cplus/rcnetio.cpp
+++ b/pr/src/cplus/rcnetio.cpp
@@ -42,7 +42,7 @@ RCIO* RCNetStreamIO::Accept(RCNetAddr* addr, const RCInterval& timeout)
PRInt32 RCNetStreamIO::AcceptRead(
RCIO **nd, RCNetAddr **raddr, void *buf,
PRSize amount, const RCInterval& timeout)
-{
+{
PRNetAddr *from;
PRFileDesc *accepted;
PRInt32 rv = (fd->methods->acceptread)(
@@ -138,7 +138,7 @@ PRInt32 RCNetStreamIO::Write(const void *buf, PRSize amount)
PRInt32 RCNetStreamIO::Writev(
const PRIOVec *iov, PRSize size, const RCInterval& timeout)
{ return (fd->methods->writev)(fd, iov, size, timeout); }
-
+
/*
** Invalid functions
*/
diff --git a/pr/src/cplus/rcthread.cpp b/pr/src/cplus/rcthread.cpp
index 3db00d36..d2f84cf3 100755
--- a/pr/src/cplus/rcthread.cpp
+++ b/pr/src/cplus/rcthread.cpp
@@ -110,7 +110,7 @@ RCThread::State RCThread::GetState() const
RCThread::Priority RCThread::GetPriority() const
{ return (RCThread::Priority)PR_GetThreadPriority(identity); }
-
+
static void _rc_PDDestructor(RCThreadPrivateData* privateData)
{
PR_ASSERT(NULL != privateData);
@@ -166,9 +166,9 @@ RCPrimordialThread::~RCPrimordialThread() { }
void RCPrimordialThread::RootFunction()
{
- PR_NOT_REACHED("Primordial thread calling root function");
+ PR_NOT_REACHED("Primordial thread calling root function");
} /* RCPrimordialThread::RootFunction */
-
+
PRStatus RCPrimordialThread::Cleanup() { return PR_Cleanup(); }
PRStatus RCPrimordialThread::SetVirtualProcessors(PRIntn count)
diff --git a/pr/src/cplus/rcthread.h b/pr/src/cplus/rcthread.h
index 8683c0a5..c8b303ff 100644
--- a/pr/src/cplus/rcthread.h
+++ b/pr/src/cplus/rcthread.h
@@ -31,7 +31,7 @@ class PR_IMPLEMENT(RCThread): public RCBase
{
public:
- typedef enum
+ typedef enum
{
local = PR_LOCAL_THREAD, global = PR_GLOBAL_THREAD
} Scope;
@@ -68,12 +68,12 @@ public:
* the target thread returns from it's root function.
*/
virtual PRStatus Join();
-
+
/*
* The priority of a newly created thread is the same as the creator.
* The priority may be changed either by the new thread itself, by
* the creator or any other arbitrary thread.
- */
+ */
virtual void SetPriority(Priority newPriority);
@@ -82,14 +82,14 @@ public:
* is doing and return with a well known error code.
*/
virtual PRStatus Interrupt();
-
+
/*
* And in case a thread was interrupted and didn't get a chance
* to have the notification delivered, a way to cancel the pending
* status.
*/
static void ClearInterrupt();
-
+
/*
* Methods to discover the attributes of an existing thread.
*/
@@ -150,15 +150,15 @@ private:
/* There is no public default constructor or copy constructor */
RCThread();
RCThread(const RCThread&);
-
+
/* And there is no assignment operator */
void operator=(const RCThread&);
public:
- static RCPrimordialThread *WrapPrimordialThread();
+ static RCPrimordialThread *WrapPrimordialThread();
};
-
+
/*
** class RCPrimordialThread
*/
diff --git a/pr/src/cplus/rctime.h b/pr/src/cplus/rctime.h
index 4cf7b904..17af3c2d 100644
--- a/pr/src/cplus/rctime.h
+++ b/pr/src/cplus/rctime.h
@@ -39,7 +39,7 @@ public:
virtual ~RCTime();
/* assignment operators */
- void operator=(const RCTime&);
+ void operator=(const RCTime&);
void operator=(const PRExplodedTime&);
/* comparitive operators */
diff --git a/pr/src/cplus/tests/ranfile.cpp b/pr/src/cplus/tests/ranfile.cpp
index c3ac0d3a..7cedc341 100644
--- a/pr/src/cplus/tests/ranfile.cpp
+++ b/pr/src/cplus/tests/ranfile.cpp
@@ -320,9 +320,9 @@ PRIntn main (PRIntn argc, char *argv[])
output = PR_GetSpecialFD(PR_StandardOutput);
/* main test */
-
+
cv.SetTimeout(interleave);
-
+
if (max_virtual_procs == 0) max_virtual_procs = 2;
if (limit == 0) limit = 57;
if (threads == 0) threads = 10;
diff --git a/pr/src/cplus/tests/switch.cpp b/pr/src/cplus/tests/switch.cpp
index 4cb14c48..d8b4e936 100644
--- a/pr/src/cplus/tests/switch.cpp
+++ b/pr/src/cplus/tests/switch.cpp
@@ -207,7 +207,7 @@ PRIntn main(PRIntn argc, char **argv)
if (debug_mode)
PL_FPrintError(debug_out, "Failed to interrupt");
}
- link = link->next;
+ link = link->next;
}
for (thread_count = 1; thread_count <= thread_limit; ++thread_count)
diff --git a/pr/src/cplus/tests/thread.cpp b/pr/src/cplus/tests/thread.cpp
index 442c534d..e2c318d4 100644
--- a/pr/src/cplus/tests/thread.cpp
+++ b/pr/src/cplus/tests/thread.cpp
@@ -46,7 +46,7 @@ public:
PRIntn data;
};
-Foo1::Foo1()
+Foo1::Foo1()
{
data = 0xafaf;
thread = new TestThread(RCThread::joinable, 0xafaf);
diff --git a/pr/src/cplus/tests/tpd.cpp b/pr/src/cplus/tests/tpd.cpp
index 42290ab1..56ac9677 100644
--- a/pr/src/cplus/tests/tpd.cpp
+++ b/pr/src/cplus/tests/tpd.cpp
@@ -104,7 +104,7 @@ int main(PRIntn argc, char *argv[])
MyPrivateData key_string[] = {
"Key #0", "Key #1", "Key #2", "Key #3",
"Bogus #5", "Bogus #6", "Bogus #7", "Bogus #8"};
-
+
did = should = PR_FALSE;
for (keys = 0; keys < 4; ++keys)
@@ -133,7 +133,7 @@ int main(PRIntn argc, char *argv[])
}
PrintProgress(__LINE__);
- /* re-assign the private data, albeit the same content */
+ /* re-assign the private data, albeit the same content */
did = PR_FALSE; should = PR_TRUE;
for (keys = 0; keys < 4; ++keys)
{
@@ -253,12 +253,12 @@ void MyThread::RootFunction()
PRStatus rv;
PRUintn keys;
const RCThreadPrivateData *pd;
-
+
MyPrivateData extension = MyPrivateData("EXTENSION");
MyPrivateData key_string[] = {
"Key #0", "Key #1", "Key #2", "Key #3",
"Bogus #5", "Bogus #6", "Bogus #7", "Bogus #8"};
-
+
did = should = PR_FALSE;
for (keys = 0; keys < 8; ++keys)
{
@@ -284,7 +284,7 @@ void MyThread::RootFunction()
}
PrintProgress(__LINE__);
#endif
-
+
did = PR_FALSE; should = PR_TRUE;
for (keys = 0; keys < 4; ++keys)
{
diff --git a/pr/src/io/prdir.c b/pr/src/io/prdir.c
index 3701a6a4..e1e19625 100644
--- a/pr/src/io/prdir.c
+++ b/pr/src/io/prdir.c
@@ -85,7 +85,7 @@ PRInt32 rv;
* UTF16 Interface
*/
PR_IMPLEMENT(PRDirUTF16*) PR_OpenDirUTF16(const PRUnichar *name)
-{
+{
PRDirUTF16 *dir;
PRStatus sts;
@@ -100,10 +100,10 @@ PR_IMPLEMENT(PRDirUTF16*) PR_OpenDirUTF16(const PRUnichar *name)
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
}
return dir;
-}
-
+}
+
PR_IMPLEMENT(PRDirEntryUTF16*) PR_ReadDirUTF16(PRDirUTF16 *dir, PRDirFlags flags)
-{
+{
/*
* _MD_READ_DIR_UTF16 return a PRUnichar* to the name; allocation in
* machine-dependent code
@@ -111,11 +111,11 @@ PR_IMPLEMENT(PRDirEntryUTF16*) PR_ReadDirUTF16(PRDirUTF16 *dir, PRDirFlags flags
PRUnichar* name = _PR_MD_READ_DIR_UTF16(&dir->md, flags);
dir->d.name = name;
return name ? &dir->d : NULL;
-}
-
+}
+
PR_IMPLEMENT(PRStatus) PR_CloseDirUTF16(PRDirUTF16 *dir)
-{
- PRInt32 rv;
+{
+ PRInt32 rv;
if (dir) {
rv = _PR_MD_CLOSE_DIR_UTF16(&dir->md);
@@ -124,7 +124,7 @@ PR_IMPLEMENT(PRStatus) PR_CloseDirUTF16(PRDirUTF16 *dir)
return PR_FAILURE;
else
return PR_SUCCESS;
- }
+ }
return PR_SUCCESS;
}
diff --git a/pr/src/io/prfdcach.c b/pr/src/io/prfdcach.c
index 17b71fe6..255f4632 100644
--- a/pr/src/io/prfdcach.c
+++ b/pr/src/io/prfdcach.c
@@ -160,7 +160,7 @@ PR_IMPLEMENT(PRStatus) PR_SetFDCacheSize(PRIntn low, PRIntn high)
if (!_pr_initialized) _PR_ImplicitInitialization();
if (low > high) low = high; /* sanity check the params */
-
+
PR_Lock(_pr_fd_cache.ml);
_pr_fd_cache.limit_high = high;
_pr_fd_cache.limit_low = low;
@@ -179,7 +179,7 @@ void _PR_InitFdCache(void)
const char *low = PR_GetEnv("NSPR_FD_CACHE_SIZE_LOW");
const char *high = PR_GetEnv("NSPR_FD_CACHE_SIZE_HIGH");
- /*
+ /*
** _low is allowed to be zero, _high is not.
** If _high is zero, we're not doing the caching.
*/
diff --git a/pr/src/io/prfile.c b/pr/src/io/prfile.c
index 7189fd68..d31e446b 100644
--- a/pr/src/io/prfile.c
+++ b/pr/src/io/prfile.c
@@ -148,14 +148,14 @@ static PRInt32 PR_CALLBACK PipeAvailable(PRFileDesc *fd)
{
PRInt32 rv;
rv = _PR_MD_PIPEAVAILABLE(fd);
- return rv;
+ return rv;
}
static PRInt64 PR_CALLBACK PipeAvailable64(PRFileDesc *fd)
{
PRInt64 rv;
LL_I2L(rv, _PR_MD_PIPEAVAILABLE(fd));
- return rv;
+ return rv;
}
static PRStatus PR_CALLBACK PipeSync(PRFileDesc *fd)
@@ -232,30 +232,30 @@ static PRIOMethods _pr_fileMethods = {
FileSeek64,
FileGetInfo,
FileGetInfo64,
- (PRWritevFN)_PR_InvalidInt,
- (PRConnectFN)_PR_InvalidStatus,
- (PRAcceptFN)_PR_InvalidDesc,
- (PRBindFN)_PR_InvalidStatus,
- (PRListenFN)_PR_InvalidStatus,
- (PRShutdownFN)_PR_InvalidStatus,
- (PRRecvFN)_PR_InvalidInt,
- (PRSendFN)_PR_InvalidInt,
- (PRRecvfromFN)_PR_InvalidInt,
- (PRSendtoFN)_PR_InvalidInt,
- FilePoll,
- (PRAcceptreadFN)_PR_InvalidInt,
- (PRTransmitfileFN)_PR_InvalidInt,
- (PRGetsocknameFN)_PR_InvalidStatus,
- (PRGetpeernameFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRGetsocketoptionFN)_PR_InvalidStatus,
+ (PRWritevFN)_PR_InvalidInt,
+ (PRConnectFN)_PR_InvalidStatus,
+ (PRAcceptFN)_PR_InvalidDesc,
+ (PRBindFN)_PR_InvalidStatus,
+ (PRListenFN)_PR_InvalidStatus,
+ (PRShutdownFN)_PR_InvalidStatus,
+ (PRRecvFN)_PR_InvalidInt,
+ (PRSendFN)_PR_InvalidInt,
+ (PRRecvfromFN)_PR_InvalidInt,
+ (PRSendtoFN)_PR_InvalidInt,
+ FilePoll,
+ (PRAcceptreadFN)_PR_InvalidInt,
+ (PRTransmitfileFN)_PR_InvalidInt,
+ (PRGetsocknameFN)_PR_InvalidStatus,
+ (PRGetpeernameFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRGetsocketoptionFN)_PR_InvalidStatus,
(PRSetsocketoptionFN)_PR_InvalidStatus,
- (PRSendfileFN)_PR_InvalidInt,
- (PRConnectcontinueFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
+ (PRConnectcontinueFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -276,30 +276,30 @@ static PRIOMethods _pr_pipeMethods = {
(PRSeek64FN)_PR_InvalidInt64,
(PRFileInfoFN)_PR_InvalidStatus,
(PRFileInfo64FN)_PR_InvalidStatus,
- (PRWritevFN)_PR_InvalidInt,
- (PRConnectFN)_PR_InvalidStatus,
- (PRAcceptFN)_PR_InvalidDesc,
- (PRBindFN)_PR_InvalidStatus,
- (PRListenFN)_PR_InvalidStatus,
- (PRShutdownFN)_PR_InvalidStatus,
- (PRRecvFN)_PR_InvalidInt,
- (PRSendFN)_PR_InvalidInt,
- (PRRecvfromFN)_PR_InvalidInt,
- (PRSendtoFN)_PR_InvalidInt,
- FilePoll,
- (PRAcceptreadFN)_PR_InvalidInt,
- (PRTransmitfileFN)_PR_InvalidInt,
- (PRGetsocknameFN)_PR_InvalidStatus,
- (PRGetpeernameFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRGetsocketoptionFN)_PR_InvalidStatus,
+ (PRWritevFN)_PR_InvalidInt,
+ (PRConnectFN)_PR_InvalidStatus,
+ (PRAcceptFN)_PR_InvalidDesc,
+ (PRBindFN)_PR_InvalidStatus,
+ (PRListenFN)_PR_InvalidStatus,
+ (PRShutdownFN)_PR_InvalidStatus,
+ (PRRecvFN)_PR_InvalidInt,
+ (PRSendFN)_PR_InvalidInt,
+ (PRRecvfromFN)_PR_InvalidInt,
+ (PRSendtoFN)_PR_InvalidInt,
+ FilePoll,
+ (PRAcceptreadFN)_PR_InvalidInt,
+ (PRTransmitfileFN)_PR_InvalidInt,
+ (PRGetsocknameFN)_PR_InvalidStatus,
+ (PRGetpeernameFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRGetsocketoptionFN)_PR_InvalidStatus,
(PRSetsocketoptionFN)_PR_InvalidStatus,
- (PRSendfileFN)_PR_InvalidInt,
- (PRConnectcontinueFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
+ (PRConnectcontinueFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -399,7 +399,7 @@ PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(int table_size)
struct rlimit rlim;
PRInt32 tableMax = PR_GetSysfdTableMax();
- if (tableMax < 0)
+ if (tableMax < 0)
return -1;
if (tableMax > FD_SETSIZE)
@@ -428,7 +428,7 @@ PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(int table_size)
return table_size;
else
return -1;
- }
+ }
return tableMax;
#elif defined(AIX) || defined(QNX) \
|| defined(WIN32) || defined(WIN16)
@@ -497,7 +497,7 @@ PRInt32 rv;
}
/*
-** Import an existing OS file to NSPR
+** Import an existing OS file to NSPR
*/
PR_IMPLEMENT(PRFileDesc*) PR_ImportFile(PROsfd osfd)
{
@@ -516,7 +516,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_ImportFile(PROsfd osfd)
}
/*
-** Import an existing OS pipe to NSPR
+** Import an existing OS pipe to NSPR
*/
PR_IMPLEMENT(PRFileDesc*) PR_ImportPipe(PROsfd osfd)
{
@@ -549,7 +549,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_ImportPipe(PROsfd osfd)
* nspr 1.0. Therefore, it still uses the nspr 1.0 error-reporting
* mechanism -- returns a PRInt32, which is the error code when the call
* fails.
- *
+ *
* If we need this function in nspr 2.0, it should be changed to
* return PRStatus, as follows:
*
@@ -604,7 +604,7 @@ PR_IMPLEMENT(PRStatus) PR_LockFile(PRFileDesc *fd)
fd->secret->lockCount++;
}
PR_Unlock(_pr_flock_lock);
-
+
return status;
}
@@ -642,7 +642,7 @@ PR_IMPLEMENT(PRStatus) PR_UnlockFile(PRFileDesc *fd)
PR_Lock(_pr_flock_lock);
if (fd->secret->lockCount == 1) {
rv = _PR_MD_UNLOCKFILE(fd->secret->md.osfd);
- if (rv == PR_SUCCESS)
+ if (rv == PR_SUCCESS)
fd->secret->lockCount = 0;
} else {
fd->secret->lockCount--;
@@ -734,15 +734,15 @@ PR_IMPLEMENT(PRStatus) PR_CreatePipe(
/* ================ UTF16 Interfaces ================================ */
PR_IMPLEMENT(PRFileDesc*) PR_OpenFileUTF16(
const PRUnichar *name, PRIntn flags, PRIntn mode)
-{
+{
PROsfd osfd;
PRFileDesc *fd = 0;
#if !defined(_PR_HAVE_O_APPEND)
PRBool appendMode = ( PR_APPEND & flags )? PR_TRUE : PR_FALSE;
#endif
-
+
if (!_pr_initialized) _PR_ImplicitInitialization();
-
+
/* Map pr open flags and mode to os specific flags */
osfd = _PR_MD_OPEN_FILE_UTF16(name, flags, mode);
if (osfd != -1) {
@@ -758,7 +758,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_OpenFileUTF16(
}
return fd;
}
-
+
PR_IMPLEMENT(PRStatus) PR_GetFileInfo64UTF16(const PRUnichar *fn, PRFileInfo64 *info)
{
PRInt32 rv;
diff --git a/pr/src/io/prio.c b/pr/src/io/prio.c
index b480f7f1..ffc66f1a 100644
--- a/pr/src/io/prio.c
+++ b/pr/src/io/prio.c
@@ -89,7 +89,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD osfd)
PR_ASSERT((int) osfd >= PR_StandardInput && osfd <= PR_StandardError);
if (!_pr_initialized) _PR_ImplicitInitialization();
-
+
switch (osfd)
{
case PR_StandardInput: result = _pr_stdin; break;
diff --git a/pr/src/io/priometh.c b/pr/src/io/priometh.c
index 4208767d..6ec5045f 100644
--- a/pr/src/io/priometh.c
+++ b/pr/src/io/priometh.c
@@ -22,26 +22,26 @@ PRIOMethods _pr_faulty_methods = {
(PRSeek64FN)_PR_InvalidInt64,
(PRFileInfoFN)_PR_InvalidStatus,
(PRFileInfo64FN)_PR_InvalidStatus,
- (PRWritevFN)_PR_InvalidInt,
- (PRConnectFN)_PR_InvalidStatus,
- (PRAcceptFN)_PR_InvalidDesc,
- (PRBindFN)_PR_InvalidStatus,
- (PRListenFN)_PR_InvalidStatus,
- (PRShutdownFN)_PR_InvalidStatus,
- (PRRecvFN)_PR_InvalidInt,
- (PRSendFN)_PR_InvalidInt,
- (PRRecvfromFN)_PR_InvalidInt,
- (PRSendtoFN)_PR_InvalidInt,
+ (PRWritevFN)_PR_InvalidInt,
+ (PRConnectFN)_PR_InvalidStatus,
+ (PRAcceptFN)_PR_InvalidDesc,
+ (PRBindFN)_PR_InvalidStatus,
+ (PRListenFN)_PR_InvalidStatus,
+ (PRShutdownFN)_PR_InvalidStatus,
+ (PRRecvFN)_PR_InvalidInt,
+ (PRSendFN)_PR_InvalidInt,
+ (PRRecvfromFN)_PR_InvalidInt,
+ (PRSendtoFN)_PR_InvalidInt,
(PRPollFN)_PR_InvalidInt16,
- (PRAcceptreadFN)_PR_InvalidInt,
- (PRTransmitfileFN)_PR_InvalidInt,
- (PRGetsocknameFN)_PR_InvalidStatus,
- (PRGetpeernameFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRAcceptreadFN)_PR_InvalidInt,
+ (PRTransmitfileFN)_PR_InvalidInt,
+ (PRGetsocknameFN)_PR_InvalidStatus,
+ (PRGetpeernameFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRGetsocketoptionFN)_PR_InvalidStatus,
(PRSetsocketoptionFN)_PR_InvalidStatus,
- (PRSendfileFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
(PRConnectcontinueFN)_PR_InvalidStatus,
(PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt,
@@ -299,7 +299,7 @@ PR_IMPLEMENT(PRInt32) PR_EmulateAcceptRead(
* they are sent before and after the file, respectively.
*
* PR_TRANSMITFILE_CLOSE_SOCKET flag - close socket after sending file
- *
+ *
* return number of bytes sent or -1 on error
*
*/
diff --git a/pr/src/io/pripv6.c b/pr/src/io/pripv6.c
index a164ae7c..9f94ff4e 100644
--- a/pr/src/io/pripv6.c
+++ b/pr/src/io/pripv6.c
@@ -335,7 +335,7 @@ PR_IMPLEMENT(PRStatus) _pr_push_ipv6toipv4_layer(PRFileDesc *fd)
return PR_FAILURE;
/*
- * For platforms with no support for IPv6
+ * For platforms with no support for IPv6
* create layered socket for IPv4-mapped IPv6 addresses
*/
if (fd->methods->file_type == PR_DESC_SOCKET_TCP)
@@ -346,7 +346,7 @@ PR_IMPLEMENT(PRStatus) _pr_push_ipv6toipv4_layer(PRFileDesc *fd)
&ipv6_to_v4_udpMethods);
if (NULL == ipv6_fd) {
goto errorExit;
- }
+ }
ipv6_fd->secret = NULL;
if (PR_PushIOLayer(fd, PR_TOP_IO_LAYER, ipv6_fd) == PR_FAILURE) {
diff --git a/pr/src/io/prlayer.c b/pr/src/io/prlayer.c
index 00da0287..26fc82ff 100644
--- a/pr/src/io/prlayer.c
+++ b/pr/src/io/prlayer.c
@@ -517,7 +517,7 @@ PR_IMPLEMENT(PRStatus) PR_PushIOLayer(
if (stack == insert)
{
/* going on top of the stack */
- /* old-style stack */
+ /* old-style stack */
PRFileDesc copy = *stack;
*stack = *fd;
*fd = copy;
diff --git a/pr/src/io/prlog.c b/pr/src/io/prlog.c
index 6098460e..b4fe8f11 100644
--- a/pr/src/io/prlog.c
+++ b/pr/src/io/prlog.c
@@ -166,7 +166,7 @@ PRIntn strcasecmp(const char *a, const char *b)
const unsigned char *ua = (const unsigned char *)a;
const unsigned char *ub = (const unsigned char *)b;
- if( ((const char *)0 == a) || (const char *)0 == b )
+ if( ((const char *)0 == a) || (const char *)0 == b )
return (PRIntn)(a-b);
while( (uc[*ua] == uc[*ub]) && ('\0' != *a) )
diff --git a/pr/src/io/prmapopt.c b/pr/src/io/prmapopt.c
index 556001ea..262b00bb 100644
--- a/pr/src/io/prmapopt.c
+++ b/pr/src/io/prmapopt.c
@@ -173,7 +173,7 @@ PRStatus PR_CALLBACK _PR_SocketGetSocketOption(PRFileDesc *fd, PRSocketOptionDat
default:
PR_NOT_REACHED("Unknown socket option");
break;
- }
+ }
}
return rv;
} /* _PR_SocketGetSocketOption */
@@ -305,7 +305,7 @@ PRStatus PR_CALLBACK _PR_SocketSetSocketOption(PRFileDesc *fd, const PRSocketOpt
default:
PR_NOT_REACHED("Unknown socket option");
break;
- }
+ }
}
return rv;
} /* _PR_SocketSetSocketOption */
diff --git a/pr/src/io/prmwait.c b/pr/src/io/prmwait.c
index ab32fb5d..22ded763 100644
--- a/pr/src/io/prmwait.c
+++ b/pr/src/io/prmwait.c
@@ -81,7 +81,7 @@ static void TimerManager(void *arg)
{
timeout = (PRIntervalTime)(timer->absolute - now);
PR_WaitCondVar(tm_vars.new_timer, timeout);
- }
+ }
}
}
PR_Unlock(tm_vars.ml);
@@ -143,7 +143,7 @@ static PRBool CancelTimer(TimerEvent *timer)
}
PR_Unlock(tm_vars.ml);
PR_DELETE(timer);
- return canceled;
+ return canceled;
}
static PRStatus TimerInit(void)
@@ -301,7 +301,7 @@ static _PR_HashStory MW_AddHashInternal(PRRecvWait *desc, _PRWaiterHash *hash)
}
hidx = (hidx + hoffset) % (hash->length);
}
- return _prmw_rehash;
+ return _prmw_rehash;
} /* MW_AddHashInternal */
static _PR_HashStory MW_ExpandHashInternal(PRWaitGroup *group)
@@ -408,7 +408,7 @@ static PRRecvWait **_MW_LookupInternal(PRWaitGroup *group, PRFileDesc *fd)
_PRWaiterHash *hash = group->waiter;
PRUintn hidx = _MW_HASH(fd, hash->length);
PRUintn hoffset = 0;
-
+
while (rehash-- > 0)
{
desc = (&hash->recv_wait) + hidx;
@@ -520,7 +520,7 @@ static PRStatus _MW_PollInternal(PRWaitGroup *group)
count += 1;
}
}
- }
+ }
PR_ASSERT(count == group->waiter->count);
@@ -636,7 +636,7 @@ static void NT_TimeProc(void *arg)
_MDOverlapped *overlapped = (_MDOverlapped *)arg;
PRRecvWait *desc = overlapped->data.mw.desc;
PRFileDesc *bottom;
-
+
if (InterlockedCompareExchange((LONG *)&desc->outcome,
(LONG)PR_MW_TIMEOUT, (LONG)PR_MW_PENDING) != (LONG)PR_MW_PENDING)
{
@@ -801,7 +801,7 @@ PR_IMPLEMENT(PRStatus) PR_AddWaitFileDesc(
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
return PR_FAILURE;
}
- hFile = (HANDLE)bottom->secret->md.osfd;
+ hFile = (HANDLE)bottom->secret->md.osfd;
if (!bottom->secret->md.io_model_committed)
{
PRInt32 st;
@@ -840,7 +840,7 @@ PR_IMPLEMENT(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group)
PRCList *io_ready = NULL;
#ifdef WINNT
PRThread *me = _PR_MD_CURRENT_THREAD();
- _MDOverlapped *overlapped;
+ _MDOverlapped *overlapped;
#endif
if (!_pr_initialized) _PR_ImplicitInitialization();
@@ -934,7 +934,7 @@ PR_IMPLEMENT(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group)
** it is still full of if's with continue and goto.
*/
PRStatus st;
- do
+ do
{
st = PR_WaitCondVar(group->io_complete, PR_INTERVAL_NO_TIMEOUT);
if (_prmw_running != group->state)
@@ -966,7 +966,7 @@ PR_IMPLEMENT(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group)
** i/o ready, it has a higher priority. I want to
** process the ready i/o first and wake up another
** thread to be the new poller.
- */
+ */
if (NULL == group->poller)
{
if (PR_CLIST_IS_EMPTY(&group->io_ready))
@@ -1395,7 +1395,7 @@ PR_IMPLEMENT(PRRecvWait*) PR_EnumerateWaitGroup(
PRMWaitEnumerator *enumerator, const PRRecvWait *previous)
{
PRRecvWait *result = NULL;
-
+
/* entry point sanity checking */
PR_ASSERT(NULL != enumerator);
PR_ASSERT(_PR_ENUM_SEALED == enumerator->seal);
diff --git a/pr/src/io/prpolevt.c b/pr/src/io/prpolevt.c
index ac3eb101..352ca153 100644
--- a/pr/src/io/prpolevt.c
+++ b/pr/src/io/prpolevt.c
@@ -62,30 +62,30 @@ static PRIOMethods _pr_polevt_methods = {
(PRSeek64FN)_PR_InvalidInt64,
(PRFileInfoFN)_PR_InvalidStatus,
(PRFileInfo64FN)_PR_InvalidStatus,
- (PRWritevFN)_PR_InvalidInt,
- (PRConnectFN)_PR_InvalidStatus,
- (PRAcceptFN)_PR_InvalidDesc,
- (PRBindFN)_PR_InvalidStatus,
- (PRListenFN)_PR_InvalidStatus,
- (PRShutdownFN)_PR_InvalidStatus,
- (PRRecvFN)_PR_InvalidInt,
- (PRSendFN)_PR_InvalidInt,
- (PRRecvfromFN)_PR_InvalidInt,
- (PRSendtoFN)_PR_InvalidInt,
+ (PRWritevFN)_PR_InvalidInt,
+ (PRConnectFN)_PR_InvalidStatus,
+ (PRAcceptFN)_PR_InvalidDesc,
+ (PRBindFN)_PR_InvalidStatus,
+ (PRListenFN)_PR_InvalidStatus,
+ (PRShutdownFN)_PR_InvalidStatus,
+ (PRRecvFN)_PR_InvalidInt,
+ (PRSendFN)_PR_InvalidInt,
+ (PRRecvfromFN)_PR_InvalidInt,
+ (PRSendtoFN)_PR_InvalidInt,
_pr_PolEvtPoll,
- (PRAcceptreadFN)_PR_InvalidInt,
- (PRTransmitfileFN)_PR_InvalidInt,
- (PRGetsocknameFN)_PR_InvalidStatus,
- (PRGetpeernameFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRAcceptreadFN)_PR_InvalidInt,
+ (PRTransmitfileFN)_PR_InvalidInt,
+ (PRGetsocknameFN)_PR_InvalidStatus,
+ (PRGetpeernameFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRGetsocketoptionFN)_PR_InvalidStatus,
(PRSetsocketoptionFN)_PR_InvalidStatus,
- (PRSendfileFN)_PR_InvalidInt,
- (PRConnectcontinueFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
+ (PRConnectcontinueFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -130,7 +130,7 @@ PR_IMPLEMENT(PRFileDesc *) PR_NewPollableEvent(void)
event = PR_CreateIOLayerStub(_pr_polevt_id, &_pr_polevt_methods);
if (NULL == event) {
goto errorExit;
- }
+ }
event->secret = PR_NEW(PRFilePrivate);
if (event->secret == NULL) {
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
diff --git a/pr/src/io/prprf.c b/pr/src/io/prprf.c
index 8475c771..82639d87 100644
--- a/pr/src/io/prprf.c
+++ b/pr/src/io/prprf.c
@@ -362,7 +362,7 @@ static int cvt_s(SprintfState *ss, const char *str, int width, int prec,
/* Limit string length by precision value */
if (!str) {
str = "(null)";
- }
+ }
if (prec > 0) {
/* this is: slen = strnlen(str, prec); */
register const char *s;
@@ -391,7 +391,7 @@ static struct NumArg* BuildArgArray( const char *fmt, va_list ap, int* rv, struc
const char* p;
char c;
struct NumArg* nas;
-
+
/*
** first pass:
@@ -433,7 +433,7 @@ static struct NumArg* BuildArgArray( const char *fmt, va_list ap, int* rv, struc
return NULL;
}
-
+
if( number > NAS_DEFAULT_NUM ){
nas = (struct NumArg*)PR_MALLOC( number * sizeof( struct NumArg ) );
if( !nas ){
@@ -1075,7 +1075,7 @@ static int FuncStuff(SprintfState *ss, const char *sp, PRUint32 len)
return 0;
}
-PR_IMPLEMENT(PRUint32) PR_sxprintf(PRStuffFunc func, void *arg,
+PR_IMPLEMENT(PRUint32) PR_sxprintf(PRStuffFunc func, void *arg,
const char *fmt, ...)
{
va_list ap;
@@ -1087,7 +1087,7 @@ PR_IMPLEMENT(PRUint32) PR_sxprintf(PRStuffFunc func, void *arg,
return rv;
}
-PR_IMPLEMENT(PRUint32) PR_vsxprintf(PRStuffFunc func, void *arg,
+PR_IMPLEMENT(PRUint32) PR_vsxprintf(PRStuffFunc func, void *arg,
const char *fmt, va_list ap)
{
SprintfState ss;
diff --git a/pr/src/io/prscanf.c b/pr/src/io/prscanf.c
index 4a200698..ebb33242 100644
--- a/pr/src/io/prscanf.c
+++ b/pr/src/io/prscanf.c
@@ -30,7 +30,7 @@ typedef int (*_PRGetCharFN)(void *stream);
/*
* A function that pushes the character 'ch' back to 'stream'.
*/
-typedef void (*_PRUngetCharFN)(void *stream, int ch);
+typedef void (*_PRUngetCharFN)(void *stream, int ch);
/*
* The size specifier for the integer and floating point number
@@ -89,7 +89,7 @@ typedef struct {
* 'str' is assumed to be a representation of the integer in
* base 'base'.
*
- * Warning:
+ * Warning:
* - Only handle base 8, 10, and 16.
* - No overflow checking.
*/
@@ -139,7 +139,7 @@ _pr_strtoull(const char *str, char **endptr, int base)
cPtr += 2;
} else {
base = 8;
- }
+ }
}
PR_ASSERT(base != 0);
LL_I2L(base64, base);
@@ -500,7 +500,7 @@ Convert(ScanfState *state, const char *fmt)
}
for (; state->width > 0; state->width--) {
ch = GET(state);
- if ((ch == EOF)
+ if ((ch == EOF)
|| (!complement && !memchr(cPtr, ch, n))
|| (complement && memchr(cPtr, ch, n))) {
UNGET(state, ch);
diff --git a/pr/src/io/prsocket.c b/pr/src/io/prsocket.c
index 8e7ce1f9..e2ffb1d6 100644
--- a/pr/src/io/prsocket.c
+++ b/pr/src/io/prsocket.c
@@ -796,7 +796,7 @@ static PRInt32 PR_CALLBACK SocketAvailable(PRFileDesc *fd)
}
#endif
rv = _PR_MD_SOCKETAVAILABLE(fd);
- return rv;
+ return rv;
}
static PRInt64 PR_CALLBACK SocketAvailable64(PRFileDesc *fd)
@@ -809,7 +809,7 @@ static PRInt64 PR_CALLBACK SocketAvailable64(PRFileDesc *fd)
}
#endif
LL_I2L(rv, _PR_MD_SOCKETAVAILABLE(fd));
- return rv;
+ return rv;
}
static PRStatus PR_CALLBACK SocketSync(PRFileDesc *fd)
@@ -941,7 +941,7 @@ PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout)
return rv;
}
-static PRInt32 PR_CALLBACK SocketAcceptRead(PRFileDesc *sd, PRFileDesc **nd,
+static PRInt32 PR_CALLBACK SocketAcceptRead(PRFileDesc *sd, PRFileDesc **nd,
PRNetAddr **raddr, void *buf, PRInt32 amount,
PRIntervalTime timeout)
{
@@ -1001,7 +1001,7 @@ PRIntervalTime timeout)
}
#ifdef WINNT
-PR_IMPLEMENT(PRInt32) PR_NTFast_AcceptRead(PRFileDesc *sd, PRFileDesc **nd,
+PR_IMPLEMENT(PRInt32) PR_NTFast_AcceptRead(PRFileDesc *sd, PRFileDesc **nd,
PRNetAddr **raddr, void *buf, PRInt32 amount,
PRIntervalTime timeout)
{
@@ -1024,7 +1024,7 @@ PRIntervalTime timeout)
if (raddr == NULL) {
raddr = &raddrCopy;
}
- rv = _PR_MD_FAST_ACCEPT_READ(sd, &newSock, raddr, buf, amount,
+ rv = _PR_MD_FAST_ACCEPT_READ(sd, &newSock, raddr, buf, amount,
timeout, PR_TRUE, NULL, NULL);
if (rv < 0) {
rv = -1;
@@ -1053,7 +1053,7 @@ PRIntervalTime timeout)
}
PR_IMPLEMENT(PRInt32) PR_NTFast_AcceptRead_WithTimeoutCallback(
-PRFileDesc *sd, PRFileDesc **nd,
+PRFileDesc *sd, PRFileDesc **nd,
PRNetAddr **raddr, void *buf, PRInt32 amount,
PRIntervalTime timeout,
_PR_AcceptTimeoutCallback callback,
@@ -1154,7 +1154,7 @@ static PRInt32 PR_CALLBACK SocketSendFile(
return rv;
}
-static PRInt32 PR_CALLBACK SocketTransmitFile(PRFileDesc *sd, PRFileDesc *fd,
+static PRInt32 PR_CALLBACK SocketTransmitFile(PRFileDesc *sd, PRFileDesc *fd,
const void *headers, PRInt32 hlen, PRTransmitFileFlags flags,
PRIntervalTime timeout)
{
@@ -1260,11 +1260,11 @@ static PRIOMethods tcpMethods = {
(PRReservedFN)_PR_InvalidInt,
_PR_SocketGetSocketOption,
_PR_SocketSetSocketOption,
- SocketSendFile,
+ SocketSendFile,
SocketConnectContinue,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -1299,11 +1299,11 @@ static PRIOMethods udpMethods = {
(PRReservedFN)_PR_InvalidInt,
_PR_SocketGetSocketOption,
_PR_SocketSetSocketOption,
- (PRSendfileFN)_PR_InvalidInt,
- (PRConnectcontinueFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
+ (PRConnectcontinueFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -1320,30 +1320,30 @@ static PRIOMethods socketpollfdMethods = {
(PRSeek64FN)_PR_InvalidInt64,
(PRFileInfoFN)_PR_InvalidStatus,
(PRFileInfo64FN)_PR_InvalidStatus,
- (PRWritevFN)_PR_InvalidInt,
- (PRConnectFN)_PR_InvalidStatus,
- (PRAcceptFN)_PR_InvalidDesc,
- (PRBindFN)_PR_InvalidStatus,
- (PRListenFN)_PR_InvalidStatus,
- (PRShutdownFN)_PR_InvalidStatus,
- (PRRecvFN)_PR_InvalidInt,
- (PRSendFN)_PR_InvalidInt,
- (PRRecvfromFN)_PR_InvalidInt,
- (PRSendtoFN)_PR_InvalidInt,
+ (PRWritevFN)_PR_InvalidInt,
+ (PRConnectFN)_PR_InvalidStatus,
+ (PRAcceptFN)_PR_InvalidDesc,
+ (PRBindFN)_PR_InvalidStatus,
+ (PRListenFN)_PR_InvalidStatus,
+ (PRShutdownFN)_PR_InvalidStatus,
+ (PRRecvFN)_PR_InvalidInt,
+ (PRSendFN)_PR_InvalidInt,
+ (PRRecvfromFN)_PR_InvalidInt,
+ (PRSendtoFN)_PR_InvalidInt,
SocketPoll,
- (PRAcceptreadFN)_PR_InvalidInt,
- (PRTransmitfileFN)_PR_InvalidInt,
- (PRGetsocknameFN)_PR_InvalidStatus,
- (PRGetpeernameFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRAcceptreadFN)_PR_InvalidInt,
+ (PRTransmitfileFN)_PR_InvalidInt,
+ (PRGetsocknameFN)_PR_InvalidStatus,
+ (PRGetpeernameFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRGetsocketoptionFN)_PR_InvalidStatus,
(PRSetsocketoptionFN)_PR_InvalidStatus,
- (PRSendfileFN)_PR_InvalidInt,
- (PRConnectcontinueFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
+ (PRConnectcontinueFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -1430,7 +1430,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto)
#endif
#if defined(_PR_INET6_PROBE) || !defined(_PR_INET6)
/*
- * For platforms with no support for IPv6
+ * For platforms with no support for IPv6
* create layered socket for IPv4-mapped IPv6 addresses
*/
if (PR_AF_INET6 == tmp_domain && PR_AF_INET == domain) {
@@ -1869,12 +1869,12 @@ out_of_memory:
#endif /* !defined(NEED_SELECT) */
PR_IMPLEMENT(PRInt32) PR_Select(
- PRInt32 unused, PR_fd_set *pr_rd, PR_fd_set *pr_wr,
+ PRInt32 unused, PR_fd_set *pr_rd, PR_fd_set *pr_wr,
PR_fd_set *pr_ex, PRIntervalTime timeout)
{
#if !defined(NEED_SELECT)
- PRInt32 npds = 0;
+ PRInt32 npds = 0;
/*
** Find out how many fds are represented in the three lists.
** Then allocate a polling descriptor for the logical union
@@ -1947,8 +1947,8 @@ PR_IMPLEMENT(PRInt32) PR_Select(
return npds;
out_of_memory:
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
- return -1;
+ return -1;
#endif /* !defined(NEED_SELECT) */
-
+
}
diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c
index 31f30b6a..56eddf41 100644
--- a/pr/src/linking/prlink.c
+++ b/pr/src/linking/prlink.c
@@ -85,8 +85,8 @@ struct PRLibrary {
NSModule dlh;
#else
void* dlh;
-#endif
-#endif
+#endif
+#endif
};
@@ -157,7 +157,7 @@ void _PR_InitLinker(void)
h = dlopen(0, RTLD_LAZY);
if (!h) {
char *error;
-
+
DLLErrorInternal(_MD_ERRNO());
error = (char*)PR_MALLOC(PR_GetErrorTextLength());
(void) PR_GetErrorText(error);
@@ -205,7 +205,7 @@ void _PR_InitLinker(void)
void _PR_ShutdownLinker(void)
{
/* FIXME: pr_exe_loadmap should be destroyed. */
-
+
PR_DestroyMonitor(pr_linker_lock);
pr_linker_lock = NULL;
@@ -242,7 +242,7 @@ PR_IMPLEMENT(PRStatus) PR_SetLibraryPath(const char *path)
/*
** Return the library path for finding shared libraries.
*/
-PR_IMPLEMENT(char *)
+PR_IMPLEMENT(char *)
PR_GetLibraryPath(void)
{
char *ev;
@@ -309,7 +309,7 @@ PR_GetLibraryPath(void)
/*
** Build library name from path, lib and extensions
*/
-PR_IMPLEMENT(char*)
+PR_IMPLEMENT(char*)
PR_GetLibraryName(const char *path, const char *lib)
{
char *fullname;
@@ -352,13 +352,13 @@ PR_GetLibraryName(const char *path, const char *lib)
/*
** Free the memory allocated, for the caller, by PR_GetLibraryName
*/
-PR_IMPLEMENT(void)
+PR_IMPLEMENT(void)
PR_FreeLibraryName(char *mem)
{
PR_smprintf_free(mem);
}
-static PRLibrary*
+static PRLibrary*
pr_UnlockedFindLibrary(const char *name)
{
PRLibrary* lm = pr_loadmap;
@@ -369,11 +369,11 @@ pr_UnlockedFindLibrary(const char *name)
cp = cp ? cp + 1 : lm->name;
#ifdef WIN32
/* Windows DLL names are case insensitive... */
- if (strcmpi(np, cp) == 0)
+ if (strcmpi(np, cp) == 0)
#elif defined(XP_OS2)
if (stricmp(np, cp) == 0)
#else
- if (strcmp(np, cp) == 0)
+ if (strcmp(np, cp) == 0)
#endif
{
/* found */
@@ -403,8 +403,8 @@ PR_LoadLibraryWithFlags(PRLibSpec libSpec, PRIntn flags)
* cast to |char *| and set PR_LD_PATHW flag so that
* it can be cast back to PRUnichar* in the callee.
*/
- return pr_LoadLibraryByPathname((const char*)
- libSpec.value.pathname_u,
+ return pr_LoadLibraryByPathname((const char*)
+ libSpec.value.pathname_u,
flags | PR_LD_PATHW);
#endif
default:
@@ -412,8 +412,8 @@ PR_LoadLibraryWithFlags(PRLibSpec libSpec, PRIntn flags)
return NULL;
}
}
-
-PR_IMPLEMENT(PRLibrary*)
+
+PR_IMPLEMENT(PRLibrary*)
PR_LoadLibrary(const char *name)
{
PRLibSpec libSpec;
@@ -439,7 +439,7 @@ pr_LoadMachDyldModule(const char *name)
const char *fileName;
const char *errorString;
NSLinkEditError(&linkEditError, &errorNum, &fileName, &errorString);
- PR_LOG(_pr_linker_lm, PR_LOG_MIN,
+ PR_LOG(_pr_linker_lm, PR_LOG_MIN,
("LoadMachDyldModule error %d:%d for file %s:\n%s",
linkEditError, errorNum, fileName, errorString));
}
@@ -503,7 +503,7 @@ static void* TV2FP(CFMutableDictionaryRef dict, const char* name, void *tvp)
CFRelease(nameRef);
}
}
-
+
return newGlue;
}
@@ -576,7 +576,7 @@ pr_LoadCFBundle(const char *name, PRLibrary *lm)
resolvedPath = realpath(name, pathBuf);
if (!resolvedPath)
return PR_FAILURE;
-
+
pathRef = CFStringCreateWithCString(NULL, pathBuf, kCFStringEncodingUTF8);
if (pathRef) {
bundleURL = CFURLCreateWithFileSystemPath(NULL, pathRef,
@@ -605,7 +605,7 @@ pr_LoadViaDyld(const char *name, PRLibrary *lm)
const char *fileName;
const char *errorString;
NSLinkEditError(&linkEditError, &errorNum, &fileName, &errorString);
- PR_LOG(_pr_linker_lm, PR_LOG_MIN,
+ PR_LOG(_pr_linker_lm, PR_LOG_MIN,
("LoadMachDyldModule error %d:%d for file %s:\n%s",
linkEditError, errorNum, fileName, errorString));
}
@@ -663,7 +663,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
oserr = _MD_ERRNO();
goto unlock;
}
- /* the list of loaded library names are always kept in UTF-8
+ /* the list of loaded library names are always kept in UTF-8
* on Win32 platforms */
result = pr_UnlockedFindLibrary(utf8name);
#else
@@ -737,7 +737,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
if (status != PR_SUCCESS) {
oserr = cfragNoLibraryErr;
PR_DELETE(lm);
- goto unlock;
+ goto unlock;
}
lm->name = strdup(name);
lm->next = pr_loadmap;
@@ -832,7 +832,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
DLLErrorInternal(oserr); /* sets error text */
}
#ifdef WIN32
- if (utf8name_malloc)
+ if (utf8name_malloc)
PR_Free(utf8name_malloc);
if (wname_malloc)
PR_Free(wname_malloc);
@@ -844,7 +844,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
/*
** Unload a shared library which was loaded via PR_LoadLibrary
*/
-PR_IMPLEMENT(PRStatus)
+PR_IMPLEMENT(PRStatus)
PR_UnloadLibrary(PRLibrary *lib)
{
int result = 0;
@@ -947,7 +947,7 @@ done:
return status;
}
-static void*
+static void*
pr_FindSymbolInLib(PRLibrary *lm, const char *name)
{
void *f = NULL;
@@ -962,7 +962,7 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
return (void*) tp->fp;
}
}
- /*
+ /*
** If the symbol was not found in the static table then check if
** the symbol was exported in the DLL... Win16 only!!
*/
@@ -971,7 +971,7 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
return (void*)NULL;
#endif
}
-
+
#ifdef XP_OS2
rc = DosQueryProcAddr(lm->dlh, 0, (PSZ) name, (PFN *) &f);
#if defined(NEED_LEADING_UNDERSCORE)
@@ -1004,20 +1004,20 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
Ptr symAddr;
CFragSymbolClass symClass;
Str255 pName;
-
+
PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Looking up symbol: %s", name + SYM_OFFSET));
-
+
c2pstrcpy(pName, name + SYM_OFFSET);
-
+
f = (FindSymbol(lm->connection, pName, &symAddr, &symClass) == noErr) ? symAddr : NULL;
-
+
#ifdef __ppc__
/* callers expect mach-o function pointers, so must wrap tvectors with glue. */
if (f && symClass == kTVectorCFragSymbol) {
f = TV2FP(lm->wrappers, name + SYM_OFFSET, f);
}
#endif /* __ppc__ */
-
+
if (f == NULL && strcmp(name + SYM_OFFSET, "main") == 0) f = lm->main;
}
if (lm->image) {
@@ -1063,7 +1063,7 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
/*
** Called by class loader to resolve missing native's
*/
-PR_IMPLEMENT(void*)
+PR_IMPLEMENT(void*)
PR_FindSymbol(PRLibrary *lib, const char *raw_name)
{
void *f = NULL;
@@ -1104,13 +1104,13 @@ PR_FindSymbol(PRLibrary *lib, const char *raw_name)
/*
** Return the address of the function 'raw_name' in the library 'lib'
*/
-PR_IMPLEMENT(PRFuncPtr)
+PR_IMPLEMENT(PRFuncPtr)
PR_FindFunctionSymbol(PRLibrary *lib, const char *raw_name)
{
return ((PRFuncPtr) PR_FindSymbol(lib, raw_name));
}
-PR_IMPLEMENT(void*)
+PR_IMPLEMENT(void*)
PR_FindSymbolAndLibrary(const char *raw_name, PRLibrary* *lib)
{
void *f = NULL;
@@ -1161,7 +1161,7 @@ PR_FindSymbolAndLibrary(const char *raw_name, PRLibrary* *lib)
return f;
}
-PR_IMPLEMENT(PRFuncPtr)
+PR_IMPLEMENT(PRFuncPtr)
PR_FindFunctionSymbolAndLibrary(const char *raw_name, PRLibrary* *lib)
{
return ((PRFuncPtr) PR_FindSymbolAndLibrary(raw_name, lib));
@@ -1171,7 +1171,7 @@ PR_FindFunctionSymbolAndLibrary(const char *raw_name, PRLibrary* *lib)
** Add a static library to the list of loaded libraries. If LoadLibrary
** is called with the name then we will pretend it was already loaded
*/
-PR_IMPLEMENT(PRLibrary*)
+PR_IMPLEMENT(PRLibrary*)
PR_LoadStaticLibrary(const char *name, const PRStaticLinkTable *slt)
{
PRLibrary *lm=NULL;
diff --git a/pr/src/malloc/prmalloc.c b/pr/src/malloc/prmalloc.c
index 174d0daf..c55a4fab 100644
--- a/pr/src/malloc/prmalloc.c
+++ b/pr/src/malloc/prmalloc.c
@@ -60,7 +60,7 @@ void *_PR_UnlockedCalloc(size_t n, size_t elsize);
# define TRACE(foo) printf foo
static int malloc_event;
#else
-# define TRACE(foo)
+# define TRACE(foo)
#endif
/* XXX Pick a number, any number */
@@ -182,7 +182,7 @@ static struct pginfo **page_dir;
static unsigned malloc_ninfo;
/*
- * Free pages line up here
+ * Free pages line up here
*/
static struct pgfree free_list;
@@ -253,7 +253,7 @@ malloc_dump(FILE *fd)
fprintf(fd,"(%p)\n", pd[j]);
} else {
fprintf(fd,"%p %d (of %d) x %d @ %p --> %p\n",
- pd[j],pd[j]->free, pd[j]->total,
+ pd[j],pd[j]->free, pd[j]->total,
pd[j]->size, pd[j]->page, pd[j]->next);
}
}
@@ -356,7 +356,7 @@ extend_page_directory(u_long index)
int i;
TRACE(("%6d E %lu\n",malloc_event++,index));
-
+
/* Make it this many pages */
i = index * sizeof *page_dir;
i /= malloc_pagesize;
@@ -444,7 +444,7 @@ malloc_init (void)
#endif /* malloc_pageshift */
#ifndef malloc_cache
- malloc_cache = 50 << malloc_pageshift;
+ malloc_cache = 50 << malloc_pageshift;
#endif /* malloc_cache */
#ifndef malloc_minsize
@@ -528,17 +528,17 @@ static void *malloc_pages(size_t size)
}
if ((void*)pf->page >= (void*)sbrk(0))
wrterror("entry on free_list past brk\n");
- if (page_dir[((u_long)pf->page >> malloc_pageshift) - malloc_origo]
+ if (page_dir[((u_long)pf->page >> malloc_pageshift) - malloc_origo]
!= MALLOC_FREE) {
TRACE(("%6d !f %p %p %p <%d>\n",malloc_event++,
pf,pf->page,pf->end,__LINE__));
wrterror("non-free first page on free-list\n");
}
- if (page_dir[((u_long)pf->end >> malloc_pageshift) - 1 - malloc_origo]
+ if (page_dir[((u_long)pf->end >> malloc_pageshift) - 1 - malloc_origo]
!= MALLOC_FREE)
wrterror("non-free last page on free-list\n");
#endif /* EXTRA_SANITY */
- if (pf->size < size)
+ if (pf->size < size)
continue;
else if (pf->size == size) {
p = pf->page;
@@ -555,7 +555,7 @@ static void *malloc_pages(size_t size)
}
}
#ifdef EXTRA_SANITY
- if (p && page_dir[((u_long)p >> malloc_pageshift) - malloc_origo]
+ if (p && page_dir[((u_long)p >> malloc_pageshift) - malloc_origo]
!= MALLOC_FREE) {
wrterror("allocated non-free page on free-list\n");
}
@@ -575,7 +575,7 @@ static void *malloc_pages(size_t size)
page_dir[index+i] = MALLOC_FOLLOW;
}
if (delay_free) {
- if (!px)
+ if (!px)
px = (struct pgfree*)delay_free;
else
_PR_UnlockedFree(delay_free);
@@ -732,9 +732,9 @@ void *_PR_UnlockedMemalign(size_t alignment, size_t size)
*/
if ((size <= alignment) && (alignment <= malloc_maxsize))
- size = alignment;
+ size = alignment;
else
- size += alignment - 1;
+ size += alignment - 1;
/* Round up to a multiple of 8 bytes */
if (size & 7) {
@@ -829,7 +829,7 @@ void *_PR_UnlockedRealloc(void *ptr, size_t size)
* memalign-allocated memory
*/
index = tmp_index;
- page = index + malloc_origo;
+ page = index + malloc_origo;
ptr = (void *) (page << malloc_pageshift);
}
TRACE(("%6d R2 %p %d\n",malloc_event++, ptr, size));
@@ -850,8 +850,8 @@ void *_PR_UnlockedRealloc(void *ptr, size_t size)
osize += malloc_pagesize;
mp++;
}
- if (!malloc_realloc &&
- size < osize &&
+ if (!malloc_realloc &&
+ size < osize &&
size > malloc_maxsize &&
size > (osize - malloc_pagesize)) {
return ptr;
@@ -859,7 +859,7 @@ void *_PR_UnlockedRealloc(void *ptr, size_t size)
} else if (*mp >= MALLOC_MAGIC) {
osize = (*mp)->size;
if (!malloc_realloc &&
- size < osize &&
+ size < osize &&
(size > (*mp)->size/2 || (*mp)->size == malloc_minsize)) {
return ptr;
}
@@ -1114,7 +1114,7 @@ void _PR_UnlockedFree(void *ptr)
* memalign-allocated memory
*/
index = tmp_index;
- page = index + malloc_origo;
+ page = index + malloc_origo;
ptr = (void *) (page << malloc_pageshift);
}
/* make sure it makes sense in some fashion */
@@ -1135,7 +1135,7 @@ void _PR_UnlockedFree(void *ptr)
info = page_dir[index];
if (info < MALLOC_MAGIC)
free_pages((char*)ptr, page, index, info);
- else
+ else
free_bytes(ptr,page,index,info);
return;
}
diff --git a/pr/src/malloc/prmem.c b/pr/src/malloc/prmem.c
index 735bb395..c8ea939e 100644
--- a/pr/src/malloc/prmem.c
+++ b/pr/src/malloc/prmem.c
@@ -17,7 +17,7 @@
** in cyclic dependency of initialization.
*/
-#include <string.h>
+#include <string.h>
union memBlkHdrUn;
@@ -55,12 +55,12 @@ static void pr_ZoneFree(void *ptr);
void
_PR_DestroyZones(void)
-{
+{
int i, j;
if (!use_zone_allocator)
return;
-
+
for (j = 0; j < THREAD_POOLS; j++) {
for (i = 0; i < MEM_ZONES; i++) {
MemoryZone *mz = &zones[i][j];
@@ -72,9 +72,9 @@ _PR_DestroyZones(void)
mz->elements--;
}
}
- }
+ }
use_zone_allocator = PR_FALSE;
-}
+}
/*
** pr_FindSymbolInProg
@@ -160,14 +160,14 @@ _PR_InitZones(void)
if (!use_zone_allocator)
return;
- for (j = 0; j < THREAD_POOLS; j++) {
+ for (j = 0; j < THREAD_POOLS; j++) {
for (i = 0; i < MEM_ZONES; i++) {
MemoryZone *mz = &zones[i][j];
int rv = pthread_mutex_init(&mz->lock, NULL);
PR_ASSERT(0 == rv);
if (rv != 0) {
goto loser;
- }
+ }
mz->blockSize = 16 << ( 2 * i);
}
}
@@ -358,7 +358,7 @@ pr_ZoneRealloc(void *oldptr, PRUint32 bytes)
PR_ASSERT(mt->s.magic == ZONE_MAGIC);
PR_ASSERT(mt->s.zone == mb->s.zone);
PR_ASSERT(mt->s.blockSize == blockSize);
-
+
if (bytes <= blockSize) {
/* The block is already big enough. */
mt->s.requestedSize = mb->s.requestedSize = bytes;
@@ -370,7 +370,7 @@ pr_ZoneRealloc(void *oldptr, PRUint32 bytes)
return rv;
}
}
-
+
if (oldptr && mb->s.requestedSize)
memcpy(rv, oldptr, mb->s.requestedSize);
if (ours)
@@ -481,7 +481,7 @@ PR_IMPLEMENT(void *) PR_Calloc(PRUint32 nelem, PRUint32 elsize)
{
#if defined (WIN16)
return PR_MD_calloc( (size_t)nelem, (size_t)elsize );
-
+
#else
return calloc(nelem, elsize);
#endif
diff --git a/pr/src/md/os2/os2_errors.c b/pr/src/md/os2/os2_errors.c
index 98f5cde5..169253f7 100644
--- a/pr/src/md/os2/os2_errors.c
+++ b/pr/src/md/os2/os2_errors.c
@@ -383,7 +383,7 @@ void _MD_os2_map_read_error(PRInt32 err)
break;
case EBADF:
PR_SetError(PR_BAD_DESCRIPTOR_ERROR, err);
- break;
+ break;
case ENOTSOCK:
PR_SetError(PR_NOT_SOCKET_ERROR, err);
break;
diff --git a/pr/src/md/os2/os2cv.c b/pr/src/md/os2/os2cv.c
index 2c424c50..089e7396 100644
--- a/pr/src/md/os2/os2cv.c
+++ b/pr/src/md/os2/os2cv.c
@@ -16,7 +16,7 @@
* until right after we unlock the lock. This way the awakened threads
* have a better chance to reaquire the lock.
*/
-
+
#include "primpl.h"
/*
@@ -78,7 +78,7 @@ md_UnlockAndPostNotifies(
lock->notified.link = NULL;
#endif
- /*
+ /*
* Figure out how many threads we need to wake up.
*/
notified = &post; /* this is where we start */
@@ -87,7 +87,7 @@ md_UnlockAndPostNotifies(
_MDCVar *cv = notified->cv[index].cv;
PRThread *thred;
int i;
-
+
/* Fast special case: no waiting threads */
if (cv->waitHead == NULL) {
notified->cv[index].notifyHead = NULL;
@@ -215,7 +215,7 @@ _PR_MD_NEW_CV(_MDCVar *cv)
* when the PRCondVar structure is created.
*/
return 0;
-}
+}
void _PR_MD_FREE_CV(_MDCVar *cv)
{
@@ -241,7 +241,7 @@ _PR_MD_WAIT_CV(_MDCVar *cv, _MDLock *lock, PRIntervalTime timeout )
md_UnlockAndPostNotifies(lock, thred, cv);
} else {
AddThreadToCVWaitQueueInternal(thred, cv);
- DosReleaseMutexSem(lock->mutex);
+ DosReleaseMutexSem(lock->mutex);
}
/* Wait for notification or timeout; don't really care which */
diff --git a/pr/src/md/os2/os2gc.c b/pr/src/md/os2/os2gc.c
index 2bcbf785..79b6de57 100644
--- a/pr/src/md/os2/os2gc.c
+++ b/pr/src/md/os2/os2gc.c
@@ -9,7 +9,7 @@
*/
#include "primpl.h"
-PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
+PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
{
CONTEXTRECORD context;
context.ContextFlags = CONTEXT_INTEGER;
@@ -34,7 +34,7 @@ PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
}
/* This function is not used right now, but is left as a reference.
- * If you ever need to get the fiberID from the currently running fiber,
+ * If you ever need to get the fiberID from the currently running fiber,
* this is it.
*/
void *
@@ -43,8 +43,8 @@ GetMyFiberID()
void *fiberData = 0;
/* A pointer to our tib entry is found at FS:[18]
- * At offset 10h is the fiberData pointer. The context of the
- * fiber is stored in there.
+ * At offset 10h is the fiberData pointer. The context of the
+ * fiber is stored in there.
*/
#ifdef HAVE_ASM
__asm {
@@ -53,6 +53,6 @@ GetMyFiberID()
mov [fiberData], EAX
}
#endif
-
+
return fiberData;
}
diff --git a/pr/src/md/os2/os2inrval.c b/pr/src/md/os2/os2inrval.c
index aff99e2e..4164cdf2 100644
--- a/pr/src/md/os2/os2inrval.c
+++ b/pr/src/md/os2/os2inrval.c
@@ -14,7 +14,7 @@ static PRBool useHighResTimer = PR_FALSE;
PRIntervalTime _os2_ticksPerSec = -1;
PRIntn _os2_bitShift = 0;
PRInt32 _os2_highMask = 0;
-
+
void
_PR_MD_INTERVAL_INIT()
{
@@ -59,8 +59,8 @@ _PR_MD_GET_INTERVAL()
*/
top = timestamp.ulHi & _os2_highMask;
top = top << (32 - _os2_bitShift);
- timestamp.ulLo = timestamp.ulLo >> _os2_bitShift;
- timestamp.ulLo = timestamp.ulLo + top;
+ timestamp.ulLo = timestamp.ulLo >> _os2_bitShift;
+ timestamp.ulLo = timestamp.ulLo + top;
return (PRUint32)timestamp.ulLo;
} else {
ULONG msCount = -1;
diff --git a/pr/src/md/os2/os2io.c b/pr/src/md/os2/os2io.c
index 3c81ae34..ad7d921f 100644
--- a/pr/src/md/os2/os2io.c
+++ b/pr/src/md/os2/os2io.c
@@ -45,7 +45,7 @@ _PR_MD_INIT_IO()
HMODULE module;
sock_init();
-
+
rc = DosLoadModule(NULL, 0, "DOSCALL1", &module);
if (rc != NO_ERROR)
{
@@ -78,8 +78,8 @@ _PR_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
PRUint32 msecs = (ticks == PR_INTERVAL_NO_TIMEOUT) ?
SEM_INDEFINITE_WAIT : PR_IntervalToMilliseconds(ticks);
rv = DosWaitEventSem(thread->md.blocked_sema, msecs);
- DosResetEventSem(thread->md.blocked_sema, &count);
- switch(rv)
+ DosResetEventSem(thread->md.blocked_sema, &count);
+ switch(rv)
{
case NO_ERROR:
return PR_SUCCESS;
@@ -99,7 +99,7 @@ _PR_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
*/
_PR_THREAD_UNLOCK(thread);
rv = DosWaitEventSem(thread->md.blocked_sema, 0);
- DosResetEventSem(thread->md.blocked_sema, &count);
+ DosResetEventSem(thread->md.blocked_sema, &count);
PR_ASSERT(rv == NO_ERROR);
}
}
@@ -113,7 +113,7 @@ _PR_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
PRStatus
_PR_MD_WAKEUP_WAITER(PRThread *thread)
{
- if ( _PR_IS_NATIVE_THREAD(thread) )
+ if ( _PR_IS_NATIVE_THREAD(thread) )
{
if (DosPostEventSem(thread->md.blocked_sema) != NO_ERROR)
return PR_FAILURE;
@@ -132,7 +132,7 @@ _PR_MD_WAKEUP_WAITER(PRThread *thread)
* The NSPR open flags (osflags) are translated into flags for OS/2
*
* Mode seems to be passed in as a unix style file permissions argument
- * as in 0666, in the case of opening the logFile.
+ * as in 0666, in the case of opening the logFile.
*
*/
PRInt32
@@ -149,7 +149,7 @@ _PR_MD_OPEN(const char *name, PRIntn osflags, int mode)
* All the pointer arguments (&file, &actionTaken and name) have to be in
* low memory for DosOpen to use them.
* The following moves name to low memory.
- */
+ */
if ((ULONG)name >= 0x20000000)
{
size_t len = strlen(name) + 1;
@@ -178,7 +178,7 @@ _PR_MD_OPEN(const char *name, PRIntn osflags, int mode)
flags = OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_REPLACE_IF_EXISTS;
else
flags = OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS;
- }
+ }
else
{
if (osflags & PR_TRUNCATE)
@@ -223,7 +223,7 @@ _PR_MD_OPEN(const char *name, PRIntn osflags, int mode)
if (rc != NO_ERROR) {
_PR_MD_MAP_OPEN_ERROR(rc);
- return -1;
+ return -1;
}
return (PRInt32)file;
@@ -239,8 +239,8 @@ _PR_MD_READ(PRFileDesc *fd, void *buf, PRInt32 len)
(PVOID)buf,
len,
&bytes);
-
- if (rv != NO_ERROR)
+
+ if (rv != NO_ERROR)
{
/* ERROR_HANDLE_EOF can only be returned by async io */
PR_ASSERT(rv != ERROR_HANDLE_EOF);
@@ -258,14 +258,14 @@ PRInt32
_PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 len)
{
PRInt32 bytes;
- int rv;
+ int rv;
rv = DosWrite((HFILE)fd->secret->md.osfd,
(PVOID)buf,
len,
(PULONG)&bytes);
- if (rv != NO_ERROR)
+ if (rv != NO_ERROR)
{
_PR_MD_MAP_WRITE_ERROR(rv);
return -1;
@@ -344,12 +344,12 @@ _PR_MD_LSEEK64(PRFileDesc *fd, PRInt64 offset, PRSeekWhence whence)
{
rc = DosSetFilePtr((HFILE)fd->secret->md.osfd, lo, where, (PULONG)&newLocation);
}
-
+
if (rc != NO_ERROR) {
_PR_MD_MAP_LSEEK_ERROR(rc);
return -1;
}
-
+
if (isWSEB)
{
return newLocationL;
@@ -373,7 +373,7 @@ _PR_MD_FSYNC(PRFileDesc *fd)
PRInt32 rc = DosResetBuffer((HFILE)fd->secret->md.osfd);
if (rc != NO_ERROR) {
- if (rc != ERROR_ACCESS_DENIED) {
+ if (rc != ERROR_ACCESS_DENIED) {
_PR_MD_MAP_FSYNC_ERROR(rc);
return -1;
}
@@ -385,7 +385,7 @@ PRInt32
_MD_CloseFile(PRInt32 osfd)
{
PRInt32 rv;
-
+
rv = DosClose((HFILE)osfd);
if (rv != NO_ERROR)
_PR_MD_MAP_CLOSE_ERROR(rv);
@@ -558,7 +558,7 @@ _PR_MD_STAT(const char *fn, struct stat *info)
* can be handled by _stat() on NT but not on Win95.
*
* We remove the backslash or slash at the end and
- * try again.
+ * try again.
*
* Not sure if this happens on OS/2 or not,
* but it doesn't hurt to be careful.
@@ -587,7 +587,7 @@ _PR_MD_GETFILEINFO(const char *fn, PRFileInfo *info)
struct stat sb;
PRInt32 rv;
PRInt64 s, s2us;
-
+
if ( (rv = _PR_MD_STAT(fn, &sb)) == 0 ) {
if (info) {
if (S_IFREG & sb.st_mode)
@@ -622,7 +622,7 @@ _PR_MD_GETFILEINFO64(const char *fn, PRFileInfo64 *info)
LL_UI2L(info->size,info32.size);
info->modifyTime = info32.modifyTime;
info->creationTime = info32.creationTime;
-
+
if (isWSEB)
{
APIRET rc ;
@@ -697,11 +697,11 @@ _PR_MD_GETOPENFILEINFO64(const PRFileDesc *fd, PRFileInfo64 *info)
{
info->type = info32.type;
LL_UI2L(info->size,info32.size);
-
+
info->modifyTime = info32.modifyTime;
info->creationTime = info32.creationTime;
}
-
+
if (isWSEB)
{
APIRET rc ;
@@ -792,7 +792,7 @@ _PR_MD_LOCKFILE(PRInt32 f)
PRInt32 rv;
FILELOCK lock, unlock;
FILELOCKL lockL, unlockL;
-
+
lock.lOffset = 0;
lockL.lOffset = 0;
lock.lRange = 0xffffffff;
@@ -824,7 +824,7 @@ _PR_MD_LOCKFILE(PRInt32 f)
if ( rv != NO_ERROR )
{
DosSleep( 50 ); /* Sleep() a few milisecs and try again. */
- }
+ }
} /* end for() */
return PR_SUCCESS;
} /* end _PR_MD_LOCKFILE() */
@@ -842,7 +842,7 @@ _PR_MD_UNLOCKFILE(PRInt32 f)
PRInt32 rv;
FILELOCK lock, unlock;
FILELOCKL lockL, unlockL;
-
+
lock.lOffset = 0;
lockL.lOffset = 0;
lock.lRange = 0;
@@ -851,7 +851,7 @@ _PR_MD_UNLOCKFILE(PRInt32 f)
unlockL.lOffset = 0;
unlock.lRange = 0xffffffff;
unlockL.lRange = 0xffffffffffffffff;
-
+
if (isWSEB)
{
rv = myDosSetFileLocksL( (HFILE) f,
@@ -864,7 +864,7 @@ _PR_MD_UNLOCKFILE(PRInt32 f)
&unlock, &lock,
0, 0);
}
-
+
if ( rv != NO_ERROR )
{
return PR_SUCCESS;
diff --git a/pr/src/md/os2/os2misc.c b/pr/src/md/os2/os2misc.c
index f0e3ceea..8e44ca01 100644
--- a/pr/src/md/os2/os2misc.c
+++ b/pr/src/md/os2/os2misc.c
@@ -73,7 +73,7 @@ PR_Now(void)
LL_MUL(ms, ms, ms2us);
LL_MUL(s, s, s2us);
LL_ADD(s, s, ms);
- return s;
+ return s;
}
@@ -120,7 +120,7 @@ static int assembleCmdLine(char *const *argv, char **cmdLine)
strcat(*cmdLine, " ");
}
strcat(*cmdLine, *arg);
- }
+ }
return 0;
}
@@ -221,7 +221,7 @@ PRProcess * _PR_CreateOS2Process(
char *cmdLine = NULL;
char **newEnvp = NULL;
char *envBlock = NULL;
-
+
STARTDATA startData = {0};
APIRET rc;
ULONG ulAppType = 0;
@@ -250,7 +250,7 @@ PRProcess * _PR_CreateOS2Process(
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
goto errorExit;
}
-
+
if (assembleCmdLine(argv, &cmdLine) == -1) {
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
goto errorExit;
@@ -260,7 +260,7 @@ PRProcess * _PR_CreateOS2Process(
/*
* DosQueryAppType() fails if path (the char* in the first argument) is in
* high memory. If that is the case, the following moves it to low memory.
- */
+ */
if ((ULONG)path >= 0x20000000) {
size_t len = strlen(path) + 1;
char *copy = (char *)alloca(len);
@@ -268,7 +268,7 @@ PRProcess * _PR_CreateOS2Process(
path = copy;
}
#endif
-
+
if (envp == NULL) {
newEnvp = NULL;
} else {
@@ -287,7 +287,7 @@ PRProcess * _PR_CreateOS2Process(
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
goto errorExit;
}
-
+
rc = DosQueryAppType(path, &ulAppType);
if (rc != NO_ERROR) {
char *pszDot = strrchr(path, '.');
@@ -307,7 +307,7 @@ PRProcess * _PR_CreateOS2Process(
PR_SetError(PR_UNKNOWN_ERROR, 0);
goto errorExit;
}
-
+
if ((ulAppType & FAPPTYP_WINDOWAPI) == FAPPTYP_WINDOWAPI) {
startData.SessionType = SSF_TYPE_PM;
}
@@ -317,16 +317,16 @@ PRProcess * _PR_CreateOS2Process(
else {
startData.SessionType = SSF_TYPE_DEFAULT;
}
-
+
if (ulAppType & (FAPPTYP_WINDOWSPROT31 | FAPPTYP_WINDOWSPROT | FAPPTYP_WINDOWSREAL))
{
strcpy(pszEXEName, "WINOS2.COM");
startData.SessionType = PROG_31_STDSEAMLESSVDM;
strcpy(pszFormatString, "/3 %s %s");
}
-
+
startData.InheritOpt = SSF_INHERTOPT_SHELL;
-
+
if (pszEXEName[0]) {
pszFormatResult = PR_MALLOC(strlen(pszFormatString)+strlen(path)+strlen(cmdLine));
sprintf(pszFormatResult, pszFormatString, path, cmdLine);
@@ -336,13 +336,13 @@ PRProcess * _PR_CreateOS2Process(
startData.PgmInputs = cmdLine;
}
startData.PgmName = pszEXEName;
-
+
startData.Length = sizeof(startData);
startData.Related = SSF_RELATED_INDEPENDENT;
startData.ObjectBuffer = pszObjectBuffer;
startData.ObjectBuffLen = CCHMAXPATH;
startData.Environment = envBlock;
-
+
if (attr) {
/* On OS/2, there is really no way to pass file handles for stdin,
* stdout, and stderr to a new process. Instead, we can make it
@@ -407,7 +407,7 @@ PRProcess * _PR_CreateOS2Process(
}
proc->md.pid = procInfo.codeTerminate;
- } else {
+ } else {
/*
* If no STDIN/STDOUT redirection is not needed, use DosStartSession
* to create a new, independent session
@@ -418,7 +418,7 @@ PRProcess * _PR_CreateOS2Process(
PR_SetError(PR_UNKNOWN_ERROR, rc);
goto errorExit;
}
-
+
proc->md.pid = pid;
}
@@ -453,7 +453,7 @@ errorExit:
PRStatus _PR_DetachOS2Process(PRProcess *process)
{
- /* On OS/2, a process is either created as a child or not.
+ /* On OS/2, a process is either created as a child or not.
* You can't 'detach' it later on.
*/
PR_DELETE(process);
@@ -470,7 +470,7 @@ PRStatus _PR_WaitOS2Process(PRProcess *process,
RESULTCODES results;
PID pidEnded = 0;
- ulRetVal = DosWaitChild(DCWA_PROCESS, DCWW_WAIT,
+ ulRetVal = DosWaitChild(DCWA_PROCESS, DCWW_WAIT,
&results,
&pidEnded, process->md.pid);
@@ -509,7 +509,7 @@ void
_PR_MD_WAKEUP_CPUS( void )
{
return;
-}
+}
/*
**********************************************************************
diff --git a/pr/src/md/os2/os2poll.c b/pr/src/md/os2/os2poll.c
index 9a0a0095..91101d43 100644
--- a/pr/src/md/os2/os2poll.c
+++ b/pr/src/md/os2/os2poll.c
@@ -24,8 +24,8 @@ PRBool IsSocketSet( PRInt32 osfd, int* socks, int start, int count )
if( socks[i] == osfd )
isSet = PR_TRUE;
}
-
- return isSet;
+
+ return isSet;
}
#endif
@@ -55,7 +55,7 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
wt = 0;
ex = 0;
socks = (int) PR_MALLOC( npds * 3 * sizeof(int) );
-
+
if (!socks)
{
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
@@ -115,7 +115,7 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
if (0 == ready)
{
PRInt32 osfd = bottom->secret->md.osfd;
- if (osfd > maxfd)
+ if (osfd > maxfd)
maxfd = osfd;
if (in_flags_read & PR_POLL_READ)
{
@@ -124,7 +124,7 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
FD_SET(osfd, &rd);
#else
socks[rd] = osfd;
- rd++;
+ rd++;
#endif
}
if (in_flags_read & PR_POLL_WRITE)
@@ -134,7 +134,7 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
FD_SET(osfd, &wt);
#else
socks[npds+wt] = osfd;
- wt++;
+ wt++;
#endif
}
if (in_flags_write & PR_POLL_READ)
@@ -144,7 +144,7 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
FD_SET(osfd, &rd);
#else
socks[rd] = osfd;
- rd++;
+ rd++;
#endif
}
if (in_flags_write & PR_POLL_WRITE)
@@ -154,7 +154,7 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
FD_SET(osfd, &wt);
#else
socks[npds+wt] = osfd;
- wt++;
+ wt++;
#endif
}
if (pd->in_flags & PR_POLL_EXCEPT)
@@ -229,7 +229,7 @@ retry:
socks[i] = socks[j];
for( i = rd+wt, j = npds*2; j < npds*2+ex; i++,j++ )
socks[i] = socks[j];
-
+
ready = os2_select(socks, rd, wt, ex, msecs);
#endif
@@ -272,31 +272,31 @@ retry:
#ifdef BSD_SELECT
if (FD_ISSET(osfd, &rd))
#else
- if( IsSocketSet(osfd, socks, 0, rd) )
+ if( IsSocketSet(osfd, socks, 0, rd) )
#endif
{
if (pd->out_flags & _PR_POLL_READ_SYS_READ)
out_flags |= PR_POLL_READ;
if (pd->out_flags & _PR_POLL_WRITE_SYS_READ)
out_flags |= PR_POLL_WRITE;
- }
+ }
#ifdef BSD_SELECT
if (FD_ISSET(osfd, &wt))
#else
- if( IsSocketSet(osfd, socks, rd, wt) )
+ if( IsSocketSet(osfd, socks, rd, wt) )
#endif
{
if (pd->out_flags & _PR_POLL_READ_SYS_WRITE)
out_flags |= PR_POLL_READ;
if (pd->out_flags & _PR_POLL_WRITE_SYS_WRITE)
out_flags |= PR_POLL_WRITE;
- }
+ }
#ifdef BSD_SELECT
if (FD_ISSET(osfd, &ex))
#else
- if( IsSocketSet(osfd, socks, rd+wt, ex) )
+ if( IsSocketSet(osfd, socks, rd+wt, ex) )
#endif
{
out_flags |= PR_POLL_EXCEPT;
diff --git a/pr/src/md/os2/os2sem.c b/pr/src/md/os2/os2sem.c
index b60f35a7..9c7d05cf 100644
--- a/pr/src/md/os2/os2sem.c
+++ b/pr/src/md/os2/os2sem.c
@@ -55,7 +55,7 @@ _PR_MD_POST_SEM(_MDSemaphore *md)
{
int rv;
rv = DosPostEventSem(md->sem);
- PR_ASSERT(rv == NO_ERROR);
+ PR_ASSERT(rv == NO_ERROR);
}
diff --git a/pr/src/md/os2/os2sock.c b/pr/src/md/os2/os2sock.c
index b32794f3..490c4af6 100644
--- a/pr/src/md/os2/os2sock.c
+++ b/pr/src/md/os2/os2sock.c
@@ -12,7 +12,7 @@
/*There is standard BSD (which is kind of slow) and a new flavor of select() that takes */
/*an integer list of sockets, the number of read sockets, write sockets, except sockets, and */
/*a millisecond count for timeout. In the interest of performance I have choosen the OS/2 */
-/*specific version of select(). See OS/2 TCP/IP Programmer's Toolkit for more info. */
+/*specific version of select(). See OS/2 TCP/IP Programmer's Toolkit for more info. */
#include "primpl.h"
@@ -32,7 +32,7 @@ _PR_MD_SOCKET(int domain, int type, int flags)
osfd = socket(domain, type, flags);
- if (osfd == -1)
+ if (osfd == -1)
{
err = sock_errno();
_PR_MD_MAP_SOCKET_ERROR(err);
@@ -106,14 +106,14 @@ socket_io_wait( PRInt32 osfd, PRInt32 fd_type, PRIntervalTime timeout )
else
rv = bsdselect(osfd + 1, NULL, &rd_wr, NULL, &tv);
#else
- lTimeout = _PR_INTERRUPT_CHECK_INTERVAL_SECS * 1000;
+ lTimeout = _PR_INTERRUPT_CHECK_INTERVAL_SECS * 1000;
do {
socks[0] = osfd;
if (fd_type == READ_FD)
rv = os2_select(socks, 1, 0, 0, lTimeout);
else
rv = os2_select(socks, 0, 1, 0, lTimeout);
-#endif
+#endif
if (rv == -1 && (syserror = sock_errno()) != EINTR) {
_PR_MD_MAP_SELECT_ERROR(syserror);
break;
@@ -253,7 +253,7 @@ done:
}
PRInt32
-_PR_MD_CONNECT(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen,
+_PR_MD_CONNECT(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen,
PRIntervalTime timeout)
{
PRInt32 rv, err;
@@ -313,7 +313,7 @@ retry:
}
return 0;
}
-
+
_PR_MD_MAP_CONNECT_ERROR(err);
}
@@ -347,7 +347,7 @@ _PR_MD_LISTEN(PRFileDesc *fd, PRIntn backlog)
PRInt32
-_PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
+_PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
PRIntervalTime timeout)
{
PRInt32 osfd = fd->secret->md.osfd;
@@ -639,7 +639,7 @@ _MD_MakeNonblock(PRFileDesc *fd)
PRInt32 osfd = fd->secret->md.osfd;
PRInt32 err;
PRUint32 one = 1;
-
+
if (osfd <= 2) {
/* Don't mess around with stdin, stdout or stderr */
return;
diff --git a/pr/src/md/os2/os2thred.c b/pr/src/md/os2/os2thred.c
index edb9f5f0..ab26f181 100644
--- a/pr/src/md/os2/os2thred.c
+++ b/pr/src/md/os2/os2thred.c
@@ -19,7 +19,7 @@ _PR_MD_ENSURE_TLS(void)
if(!pThreadLocalStorage)
{
/* Allocate thread local storage (TLS). Note, that only 32 bytes can
- * be allocated at a time.
+ * be allocated at a time.
*/
int rc = DosAllocThreadLocalMemory(sizeof(_NSPR_TLS) / 4, (PULONG*)&pThreadLocalStorage);
PR_ASSERT(rc == NO_ERROR);
@@ -169,18 +169,18 @@ ExcpStartFunc(void* arg)
}
PRStatus
-_PR_MD_CREATE_THREAD(PRThread *thread,
- void (*start)(void *),
- PRThreadPriority priority,
- PRThreadScope scope,
- PRThreadState state,
+_PR_MD_CREATE_THREAD(PRThread *thread,
+ void (*start)(void *),
+ PRThreadPriority priority,
+ PRThreadScope scope,
+ PRThreadState state,
PRUint32 stackSize)
{
PARAMSTORE* params = PR_Malloc(sizeof(PARAMSTORE));
params->start = start;
params->thread = thread;
thread->md.handle = thread->id = (TID) _beginthread(ExcpStartFunc,
- NULL,
+ NULL,
thread->stack->stackSize,
params);
if(thread->md.handle == -1) {
@@ -268,7 +268,7 @@ _PR_MD_EXIT(PRIntn status)
}
#ifdef HAVE_THREAD_AFFINITY
-PR_EXTERN(PRInt32)
+PR_EXTERN(PRInt32)
_PR_MD_SETTHREADAFFINITYMASK(PRThread *thread, PRUint32 mask )
{
/* Can we do this on OS/2? Only on SMP versions? */
@@ -295,14 +295,14 @@ _PR_MD_GETTHREADAFFINITYMASK(PRThread *thread, PRUint32 *mask)
PRInt32 rv, system_mask;
rv = GetProcessAffinityMask(GetCurrentProcess(), mask, &system_mask);
-
+
return rv?0:-1;
*/
}
#endif /* HAVE_THREAD_AFFINITY */
void
-_PR_MD_SUSPEND_CPU(_PRCPU *cpu)
+_PR_MD_SUSPEND_CPU(_PRCPU *cpu)
{
_PR_MD_SUSPEND_THREAD(cpu->thread);
}
diff --git a/pr/src/md/prosdep.c b/pr/src/md/prosdep.c
index 20b0a46e..17441718 100644
--- a/pr/src/md/prosdep.c
+++ b/pr/src/md/prosdep.c
@@ -11,7 +11,7 @@
#endif
#ifdef _WIN32
#include <windows.h>
-#endif
+#endif
PRInt32 _pr_pageShift;
PRInt32 _pr_pageSize;
diff --git a/pr/src/md/unix/hpux.c b/pr/src/md/unix/hpux.c
index 56fddba2..4f5435b9 100644
--- a/pr/src/md/unix/hpux.c
+++ b/pr/src/md/unix/hpux.c
@@ -208,7 +208,7 @@ strchr(const char *s, int c)
* A.09.07, and B.10.10) dumps core if called with:
* 1. First operand with address = 1(mod 4).
* 2. Size = 1(mod 4)
- * 3. Last byte of the second operand is the last byte of the page and
+ * 3. Last byte of the second operand is the last byte of the page and
* next page is not accessible(not mapped or protected)
* Thus, using the following naive version (tons of optimizations are
* possible;^)
@@ -220,10 +220,10 @@ int memcmp(const void *s1, const void *s2, size_t n)
*p2 = (unsigned char *) s2;
while (n-- > 0) {
- register int r = ((int) ((unsigned int) *p1))
+ register int r = ((int) ((unsigned int) *p1))
- ((int) ((unsigned int) *p2));
if (r) return r;
p1++; p2++;
}
- return 0;
+ return 0;
}
diff --git a/pr/src/md/unix/pthreads_user.c b/pr/src/md/unix/pthreads_user.c
index bb64b9f4..69061205 100644
--- a/pr/src/md/unix/pthreads_user.c
+++ b/pr/src/md/unix/pthreads_user.c
@@ -68,7 +68,7 @@ PR_IMPLEMENT(void) _MD_FREE_LOCK(struct _MDLock *lockp)
PRThread *me = _PR_MD_CURRENT_THREAD();
if (me && !_PR_IS_NATIVE_THREAD(me))
- _PR_INTSOFF(_is);
+ _PR_INTSOFF(_is);
pthread_mutex_destroy(&lockp->mutex);
if (me && !_PR_IS_NATIVE_THREAD(me))
_PR_FAST_INTSON(_is);
@@ -80,7 +80,7 @@ PR_IMPLEMENT(PRStatus) _MD_NEW_LOCK(struct _MDLock *lockp)
{
PRStatus rv;
PRIntn is;
- PRThread *me = _PR_MD_CURRENT_THREAD();
+ PRThread *me = _PR_MD_CURRENT_THREAD();
if (me && !_PR_IS_NATIVE_THREAD(me))
_PR_INTSOFF(is);
@@ -317,7 +317,7 @@ _MD_WakeupWaiter(PRThread *thread)
if (!_PR_IS_NATIVE_THREAD(me))
_PR_FAST_INTSON(is);
- }
+ }
return PR_SUCCESS;
}
@@ -339,7 +339,7 @@ _MD_CreateThread(
{
PRIntn is;
int rv;
- PRThread *me = _PR_MD_CURRENT_THREAD();
+ PRThread *me = _PR_MD_CURRENT_THREAD();
pthread_attr_t attr;
if (!_PR_IS_NATIVE_THREAD(me))
@@ -437,7 +437,7 @@ _MD_CleanupBeforeExit(void)
thread = _PR_THREAD_PTR(ptr);
_MD_CVAR_POST_SEM(thread);
ptr = ptr->next;
- }
+ }
}
_PR_DEADQ_UNLOCK;
while(_PR_NUM_DEADNATIVE > 1) {
diff --git a/pr/src/md/unix/solaris.c b/pr/src/md/unix/solaris.c
index 4fe2043b..3b7d1280 100644
--- a/pr/src/md/unix/solaris.c
+++ b/pr/src/md/unix/solaris.c
@@ -136,7 +136,7 @@ PRWord *_MD_HomeGCRegisters(PRThread *t, PRIntn isCurrent, PRIntn *np)
#ifndef _PR_PTHREADS
#if defined(i386) && defined(SOLARIS2_4)
-/*
+/*
* Because clock_gettime() on Solaris/x86 2.4 always generates a
* segmentation fault, we use an emulated version _pr_solx86_clock_gettime(),
* which is implemented using gettimeofday().
diff --git a/pr/src/md/unix/unix.c b/pr/src/md/unix/unix.c
index 0ae866a2..61be5229 100644
--- a/pr/src/md/unix/unix.c
+++ b/pr/src/md/unix/unix.c
@@ -97,9 +97,9 @@ static PRInt32 local_io_wait(PRInt32 osfd, PRInt32 wait_flag,
PRIntervalTime timeout);
_PRInterruptTable _pr_interruptTable[] = {
- {
+ {
"clock", _PR_MISSED_CLOCK, _PR_ClockInterrupt, },
- {
+ {
0 }
};
@@ -153,7 +153,7 @@ int err;
err = _MD_ERRNO();
_PR_MD_MAP_READDIR_ERROR(err);
return 0;
- }
+ }
if ((flags & PR_SKIP_DOT) &&
(de->d_name[0] == '.') && (de->d_name[1] == 0))
continue;
@@ -307,7 +307,7 @@ PRInt32 osfd = fd->secret->md.osfd;
if (!_PR_IS_NATIVE_THREAD(me)) {
if ((rv = local_io_wait(osfd, _PR_UNIX_POLL_READ,
PR_INTERVAL_NO_TIMEOUT)) < 0)
- goto done;
+ goto done;
} else {
#ifndef _PR_USE_POLL
while ((rv = _MD_SELECT(osfd + 1, &rd, NULL, NULL, NULL))
@@ -1267,7 +1267,7 @@ PRStatus _MD_getsockopt(PRFileDesc *fd, PRInt32 level,
return rv==0?PR_SUCCESS:PR_FAILURE;
}
-PRStatus _MD_setsockopt(PRFileDesc *fd, PRInt32 level,
+PRStatus _MD_setsockopt(PRFileDesc *fd, PRInt32 level,
PRInt32 optname, const char* optval, PRInt32 optlen)
{
PRInt32 rv, err;
@@ -2993,7 +2993,7 @@ PRInt32 _PR_WaitForMultipleFDs(
}
_PR_IOQ_OSFD_CNT(me->cpu) += pdcnt;
-
+
_PR_SLEEPQ_LOCK(me->cpu);
_PR_ADD_SLEEPQ(me, timeout);
me->state = _PR_IO_WAIT;
@@ -3009,7 +3009,7 @@ PRInt32 _PR_WaitForMultipleFDs(
me->io_suspended = PR_FALSE;
/*
- * This thread should run on the same cpu on which it was blocked; when
+ * This thread should run on the same cpu on which it was blocked; when
* the IO request times out the fd sets and fd counts for the
* cpu are updated below.
*/
@@ -3090,12 +3090,12 @@ void _PR_Unblock_IO_Wait(PRThread *thr)
{
int pri = thr->priority;
_PRCPU *cpu = thr->cpu;
-
+
/*
* GLOBAL threads wakeup periodically to check for interrupt
*/
if (_PR_IS_NATIVE_THREAD(thr)) {
- _PR_THREAD_UNLOCK(thr);
+ _PR_THREAD_UNLOCK(thr);
return;
}
diff --git a/pr/src/md/unix/unix_errors.c b/pr/src/md/unix/unix_errors.c
index bcea0993..fcc8320f 100644
--- a/pr/src/md/unix/unix_errors.c
+++ b/pr/src/md/unix/unix_errors.c
@@ -144,7 +144,7 @@ void _MD_unix_map_default_error(int err)
case ENOLCK:
prError = PR_FILE_IS_LOCKED_ERROR;
break;
-#ifdef ENOLINK
+#ifdef ENOLINK
case ENOLINK:
prError = PR_REMOTE_FILE_ERROR;
break;
@@ -530,8 +530,8 @@ void _MD_unix_map_connect_error(int err)
switch (err) {
#if defined(UNIXWARE)
/*
- * On some platforms, if we connect to a port on the local host
- * (the loopback address) that no process is listening on, we get
+ * On some platforms, if we connect to a port on the local host
+ * (the loopback address) that no process is listening on, we get
* EIO instead of ECONNREFUSED.
*/
case EIO:
diff --git a/pr/src/md/unix/unixware.c b/pr/src/md/unix/unixware.c
index 638af5f2..4ddb23d6 100644
--- a/pr/src/md/unix/unixware.c
+++ b/pr/src/md/unix/unixware.c
@@ -230,29 +230,29 @@ void _MD_EarlyInit(void)
sigaddset(&set, SIGALRM);
}
-PRStatus _MD_CREATE_THREAD(PRThread *thread,
- void (*start)(void *),
+PRStatus _MD_CREATE_THREAD(PRThread *thread,
+ void (*start)(void *),
PRThreadPriority priority,
- PRThreadScope scope,
- PRThreadState state,
- PRUint32 stackSize)
+ PRThreadScope scope,
+ PRThreadState state,
+ PRUint32 stackSize)
{
long flags;
-
+
/* mask out SIGALRM for native thread creation */
- thr_sigsetmask(SIG_BLOCK, &set, &oldset);
+ thr_sigsetmask(SIG_BLOCK, &set, &oldset);
- flags = (state == PR_JOINABLE_THREAD ? THR_SUSPENDED/*|THR_NEW_LWP*/
+ flags = (state == PR_JOINABLE_THREAD ? THR_SUSPENDED/*|THR_NEW_LWP*/
: THR_SUSPENDED|THR_DETACHED/*|THR_NEW_LWP*/);
if (_PR_IS_GCABLE_THREAD(thread) ||
(scope == PR_GLOBAL_BOUND_THREAD))
flags |= THR_BOUND;
if (thr_create(NULL, thread->stack->stackSize,
- (void *(*)(void *)) start, (void *) thread,
+ (void *(*)(void *)) start, (void *) thread,
flags,
&thread->md.handle)) {
- thr_sigsetmask(SIG_SETMASK, &oldset, NULL);
+ thr_sigsetmask(SIG_SETMASK, &oldset, NULL);
return PR_FAILURE;
}
@@ -262,15 +262,15 @@ PRStatus _MD_CREATE_THREAD(PRThread *thread,
* its register state is initialized properly for GC */
thread->md.lwpid = -1;
- thr_sigsetmask(SIG_SETMASK, &oldset, NULL);
+ thr_sigsetmask(SIG_SETMASK, &oldset, NULL);
_MD_NEW_SEM(&thread->md.waiter_sem, 0);
if ((scope == PR_GLOBAL_THREAD) || (scope == PR_GLOBAL_BOUND_THREAD)) {
thread->flags |= _PR_GLOBAL_SCOPE;
}
- /*
- ** Set the thread priority. This will also place the thread on
+ /*
+ ** Set the thread priority. This will also place the thread on
** the runQ.
**
** Force PR_SetThreadPriority to set the priority by
@@ -282,7 +282,7 @@ PRStatus _MD_CREATE_THREAD(PRThread *thread,
thread->priority = 100;
PR_SetThreadPriority( thread, pri );
- PR_LOG(_pr_thread_lm, PR_LOG_MIN,
+ PR_LOG(_pr_thread_lm, PR_LOG_MIN,
("(0X%x)[Start]: on to runq at priority %d",
thread, thread->priority));
}
@@ -301,7 +301,7 @@ void _MD_cleanup_thread(PRThread *thread)
hdl = thread->md.handle;
- /*
+ /*
** First, suspend the thread (unless it's the active one)
** Because we suspend it first, we don't have to use LOCK_SCHEDULER to
** prevent both of us modifying the thread structure at the same time.
@@ -456,7 +456,7 @@ void unixware_preempt_off()
void unixware_preempt_on()
{
- sigprocmask (SIG_SETMASK, &old_mask, NULL);
+ sigprocmask (SIG_SETMASK, &old_mask, NULL);
}
void _MD_Begin_SuspendAll()
@@ -466,7 +466,7 @@ void _MD_Begin_SuspendAll()
PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin_SuspendAll\n"));
/* run at highest prio so I cannot be preempted */
thr_getprio(thr_self(), &gcprio);
- thr_setprio(thr_self(), 0x7fffffff);
+ thr_setprio(thr_self(), 0x7fffffff);
suspendAllOn = 1;
}
@@ -493,7 +493,7 @@ void _MD_Suspend(PRThread *thr)
/* XXX Primordial thread can't be bound to an lwp, hence there is no
* way we can assume that we can get the lwp status for primordial
* thread reliably. Hence we skip this for primordial thread, hoping
- * that the SP is saved during lock and cond. wait.
+ * that the SP is saved during lock and cond. wait.
* XXX - Again this is concern only for java interpreter, not for the
* server, 'cause primordial thread in the server does not do java work
*/
@@ -518,7 +518,7 @@ void _MD_Resume(PRThread *thr)
}
if (thr->md.lwpid == -1)
return;
-
+
if ( _lwp_continue(thr->md.lwpid) < 0) {
PR_ASSERT(0); /* ARGH, we are hosed! */
}
@@ -540,7 +540,7 @@ int
_pr_unixware_clock_gettime (struct timespec *tp)
{
struct timeval tv;
-
+
gettimeofday(&tv, NULL);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = tv.tv_usec * 1000;
diff --git a/pr/src/md/unix/uxpoll.c b/pr/src/md/unix/uxpoll.c
index 8a618ed8..101ff3f8 100644
--- a/pr/src/md/unix/uxpoll.c
+++ b/pr/src/md/unix/uxpoll.c
@@ -419,14 +419,14 @@ retry:
out_flags |= PR_POLL_READ;
if (pd->out_flags & _PR_POLL_WRITE_SYS_READ)
out_flags |= PR_POLL_WRITE;
- }
+ }
if (FD_ISSET(osfd, &wt))
{
if (pd->out_flags & _PR_POLL_READ_SYS_WRITE)
out_flags |= PR_POLL_READ;
if (pd->out_flags & _PR_POLL_WRITE_SYS_WRITE)
out_flags |= PR_POLL_WRITE;
- }
+ }
if (FD_ISSET(osfd, &ex)) out_flags |= PR_POLL_EXCEPT;
}
pd->out_flags = out_flags;
@@ -670,7 +670,7 @@ PRInt32 _MD_pr_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
return rv;
} /* _MD_pr_poll */
-#endif /* defined(_PR_PTHREADS) */
+#endif /* defined(_PR_PTHREADS) */
/* uxpoll.c */
diff --git a/pr/src/md/unix/uxproces.c b/pr/src/md/unix/uxproces.c
index c4c5b8da..8665992f 100644
--- a/pr/src/md/unix/uxproces.c
+++ b/pr/src/md/unix/uxproces.c
@@ -555,7 +555,7 @@ static void WaitPidDaemonThread(void *unused)
/*
* waitpid() cannot return 0 because we did not invoke it
* with the WNOHANG option.
- */
+ */
PR_ASSERT(0 != pid);
/*
@@ -612,7 +612,7 @@ static void WaitPidDaemonThread(void *unused)
}
PR_Lock(pr_wp.ml);
#endif
-
+
do {
rv = read(pr_wp.pipefd[0], buf, sizeof(buf));
} while (sizeof(buf) == rv || (-1 == rv && EINTR == errno));
diff --git a/pr/src/md/unix/uxrng.c b/pr/src/md/unix/uxrng.c
index 4eeb9bdc..36638f8e 100644
--- a/pr/src/md/unix/uxrng.c
+++ b/pr/src/md/unix/uxrng.c
@@ -100,7 +100,7 @@ static size_t GetDevURandom( void *buf, size_t size )
static size_t
GetHighResClock(void *buf, size_t maxbytes)
-{
+{
return(GetDevURandom( buf, maxbytes ));
}
diff --git a/pr/src/md/unix/uxshm.c b/pr/src/md/unix/uxshm.c
index 2a605b1f..92bd5b9f 100644
--- a/pr/src/md/unix/uxshm.c
+++ b/pr/src/md/unix/uxshm.c
@@ -14,7 +14,7 @@
#include <prshm.h>
#include <prerr.h>
#include <prmem.h>
-#include "primpl.h"
+#include "primpl.h"
#include <fcntl.h>
extern PRLogModuleInfo *_pr_shm_lm;
@@ -36,7 +36,7 @@ extern PRLogModuleInfo *_pr_shm_lm;
#define _MD_CLOSE_SHARED_MEMORY _MD_CloseSharedMemory
#define _MD_DELETE_SHARED_MEMORY _MD_DeleteSharedMemory
-extern PRSharedMemory * _MD_OpenSharedMemory(
+extern PRSharedMemory * _MD_OpenSharedMemory(
const char *name,
PRSize size,
PRIntn flags,
@@ -52,16 +52,16 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
if ( PR_FAILURE == rc )
{
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_OpenSharedMemory(): _PR_MakeNativeIPCName() failed: %s", name ));
return( NULL );
}
shm = PR_NEWZAP( PRSharedMemory );
- if ( NULL == shm )
+ if ( NULL == shm )
{
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0 );
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New PRSharedMemory out of memory"));
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New PRSharedMemory out of memory"));
return( NULL );
}
@@ -69,7 +69,7 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
if ( NULL == shm->ipcname )
{
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0 );
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New shm->ipcname out of memory"));
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New shm->ipcname out of memory"));
PR_DELETE( shm );
return( NULL );
}
@@ -89,7 +89,7 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
PR_FREEIF( shm->ipcname );
PR_DELETE( shm );
return( NULL );
- }
+ }
if ( close(osfd) == -1 ) {
_PR_MD_MAP_CLOSE_ERROR( errno );
PR_FREEIF( shm->ipcname );
@@ -104,7 +104,7 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
{
rc = PR_FAILURE;
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_OpenSharedMemory(): ftok() failed on name: %s", shm->ipcname));
PR_FREEIF( shm->ipcname );
PR_DELETE( shm );
@@ -119,18 +119,18 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
}
if ((errno == EEXIST) && (flags & PR_SHM_EXCL)) {
PR_SetError( PR_FILE_EXISTS_ERROR, errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_OpenSharedMemory(): shmget() exclusive failed, errno: %d", errno));
PR_FREEIF(shm->ipcname);
PR_DELETE(shm);
return(NULL);
}
- }
+ }
shm->id = shmget( key, shm->size, shm->mode );
if ( -1 == shm->id ) {
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_OpenSharedMemory(): shmget() failed, errno: %d", errno));
PR_FREEIF(shm->ipcname);
PR_DELETE(shm);
@@ -153,14 +153,14 @@ extern void * _MD_AttachSharedMemory( PRSharedMemory *shm, PRIntn flags )
if ( (void*)-1 == addr )
{
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
- ("_MD_AttachSharedMemory(): shmat() failed on name: %s, OsError: %d",
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ ("_MD_AttachSharedMemory(): shmat() failed on name: %s, OsError: %d",
shm->ipcname, PR_GetOSError() ));
addr = NULL;
}
return addr;
-}
+}
extern PRStatus _MD_DetachSharedMemory( PRSharedMemory *shm, void *addr )
{
@@ -174,12 +174,12 @@ extern PRStatus _MD_DetachSharedMemory( PRSharedMemory *shm, void *addr )
{
rc = PR_FAILURE;
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_DetachSharedMemory(): shmdt() failed on name: %s", shm->ipcname ));
}
return rc;
-}
+}
extern PRStatus _MD_CloseSharedMemory( PRSharedMemory *shm )
{
@@ -189,7 +189,7 @@ extern PRStatus _MD_CloseSharedMemory( PRSharedMemory *shm )
PR_DELETE(shm);
return PR_SUCCESS;
-}
+}
extern PRStatus _MD_DeleteSharedMemory( const char *name )
{
@@ -203,18 +203,18 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name )
if ( PR_FAILURE == rc )
{
PR_SetError( PR_UNKNOWN_ERROR , errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_DeleteSharedMemory(): _PR_MakeNativeIPCName() failed: %s", name ));
return(PR_FAILURE);
}
- /* create the file first */
+ /* create the file first */
{
int osfd = open( ipcname, (O_RDWR | O_CREAT), 0666 );
if ( -1 == osfd ) {
_PR_MD_MAP_OPEN_ERROR( errno );
return( PR_FAILURE );
- }
+ }
if ( close(osfd) == -1 ) {
_PR_MD_MAP_CLOSE_ERROR( errno );
return( PR_FAILURE );
@@ -227,14 +227,14 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name )
{
rc = PR_FAILURE;
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_DeleteSharedMemory(): ftok() failed on name: %s", ipcname));
}
id = shmget( key, 0, 0 );
if ( -1 == id ) {
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_DeleteSharedMemory(): shmget() failed, errno: %d", errno));
return(PR_FAILURE);
}
@@ -243,7 +243,7 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name )
if ( -1 == urc )
{
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_DeleteSharedMemory(): shmctl() failed on name: %s", ipcname ));
return(PR_FAILURE);
}
@@ -251,7 +251,7 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name )
urc = unlink( ipcname );
if ( -1 == urc ) {
_PR_MD_MAP_UNLINK_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_DeleteSharedMemory(): unlink() failed: %s", ipcname ));
return(PR_FAILURE);
}
@@ -275,7 +275,7 @@ struct _MDSharedMemory {
int handle;
};
-extern PRSharedMemory * _MD_OpenSharedMemory(
+extern PRSharedMemory * _MD_OpenSharedMemory(
const char *name,
PRSize size,
PRIntn flags,
@@ -291,16 +291,16 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
if ( PR_FAILURE == rc )
{
PR_SetError( PR_UNKNOWN_ERROR , errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_OpenSharedMemory(): _PR_MakeNativeIPCName() failed: %s", name ));
return( NULL );
}
shm = PR_NEWZAP( PRSharedMemory );
- if ( NULL == shm )
+ if ( NULL == shm )
{
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0 );
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New PRSharedMemory out of memory"));
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New PRSharedMemory out of memory"));
return( NULL );
}
@@ -308,13 +308,13 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
if ( NULL == shm->ipcname )
{
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0 );
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New shm->ipcname out of memory"));
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New shm->ipcname out of memory"));
return( NULL );
}
/* copy args to struct */
strcpy( shm->ipcname, ipcname );
- shm->size = size;
+ shm->size = size;
shm->mode = mode;
shm->flags = flags;
shm->ident = _PR_SHM_IDENT;
@@ -324,7 +324,7 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
*/
if ( flags & PR_SHM_CREATE ) {
int oflag = (O_CREAT | O_RDWR);
-
+
if ( flags & PR_SHM_EXCL )
oflag |= O_EXCL;
shm->id = shm_open( shm->ipcname, oflag, shm->mode );
@@ -334,9 +334,9 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
if ( -1 == shm->id ) {
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
("_MD_OpenSharedMemory(): shm_open failed: %s, OSError: %d",
- shm->ipcname, PR_GetOSError()));
+ shm->ipcname, PR_GetOSError()));
PR_DELETE( shm->ipcname );
PR_DELETE( shm );
return(NULL);
@@ -345,7 +345,7 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
end = ftruncate( shm->id, shm->size );
if ( -1 == end ) {
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
("_MD_OpenSharedMemory(): ftruncate failed, OSError: %d",
PR_GetOSError()));
PR_DELETE( shm->ipcname );
@@ -370,17 +370,17 @@ extern void * _MD_AttachSharedMemory( PRSharedMemory *shm, PRIntn flags )
if ((void*)-1 == addr )
{
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_AttachSharedMemory(): mmap failed: %s, errno: %d",
shm->ipcname, PR_GetOSError()));
addr = NULL;
} else {
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_AttachSharedMemory(): name: %s, attached at: %p", shm->ipcname, addr));
}
-
+
return addr;
-}
+}
extern PRStatus _MD_DetachSharedMemory( PRSharedMemory *shm, void *addr )
{
@@ -394,30 +394,30 @@ extern PRStatus _MD_DetachSharedMemory( PRSharedMemory *shm, void *addr )
{
rc = PR_FAILURE;
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
- ("_MD_DetachSharedMemory(): munmap failed: %s, errno: %d",
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ ("_MD_DetachSharedMemory(): munmap failed: %s, errno: %d",
shm->ipcname, PR_GetOSError()));
}
return rc;
-}
+}
extern PRStatus _MD_CloseSharedMemory( PRSharedMemory *shm )
{
int urc;
-
+
PR_ASSERT( shm->ident == _PR_SHM_IDENT );
urc = close( shm->id );
if ( -1 == urc ) {
_PR_MD_MAP_CLOSE_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_CloseSharedMemory(): close() failed, error: %d", PR_GetOSError()));
return(PR_FAILURE);
}
PR_DELETE( shm->ipcname );
PR_DELETE( shm );
return PR_SUCCESS;
-}
+}
extern PRStatus _MD_DeleteSharedMemory( const char *name )
{
@@ -429,7 +429,7 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name )
if ( PR_FAILURE == rc )
{
PR_SetError( PR_UNKNOWN_ERROR , errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_OpenSharedMemory(): _PR_MakeNativeIPCName() failed: %s", name ));
return rc;
}
@@ -438,11 +438,11 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name )
if ( -1 == urc ) {
rc = PR_FAILURE;
_PR_MD_MAP_DEFAULT_ERROR( errno );
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
- ("_MD_DeleteSharedMemory(): shm_unlink failed: %s, errno: %d",
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ ("_MD_DeleteSharedMemory(): shm_unlink failed: %s, errno: %d",
ipcname, PR_GetOSError()));
} else {
- PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG( _pr_shm_lm, PR_LOG_DEBUG,
("_MD_DeleteSharedMemory(): %s, success", ipcname));
}
@@ -459,7 +459,7 @@ extern PRLogModuleInfo *_pr_shma_lm;
#include <unistd.h>
-extern PRFileMap* _md_OpenAnonFileMap(
+extern PRFileMap* _md_OpenAnonFileMap(
const char *dirName,
PRSize size,
PRFileMapProtect prot
@@ -526,7 +526,7 @@ extern PRFileMap* _md_OpenAnonFileMap(
("_md_OpenAnonFileMap(): failed on unlink(), errno: %d", errno));
PR_smprintf_free( genName );
close( osfd );
- goto Finished;
+ goto Finished;
}
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
("_md_OpenAnonFileMap(): unlink(): %s", genName ));
@@ -537,7 +537,7 @@ extern PRFileMap* _md_OpenAnonFileMap(
if ( NULL == fd ) {
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
("_md_OpenAnonFileMap(): PR_ImportFile(): failed"));
- goto Finished;
+ goto Finished;
}
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
("_md_OpenAnonFileMap(): fd: %p", fd ));
@@ -548,7 +548,7 @@ extern PRFileMap* _md_OpenAnonFileMap(
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
("_md_OpenAnonFileMap(): failed on ftruncate(), errno: %d", errno));
PR_Close( fd );
- goto Finished;
+ goto Finished;
}
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
("_md_OpenAnonFileMap(): ftruncate(): size: %d", size ));
@@ -559,14 +559,14 @@ extern PRFileMap* _md_OpenAnonFileMap(
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
("PR_OpenAnonFileMap(): failed"));
PR_Close( fd );
- goto Finished;
+ goto Finished;
}
fm->md.isAnonFM = PR_TRUE; /* set fd close */
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
("_md_OpenAnonFileMap(): PR_CreateFileMap(): fm: %p", fm ));
-Finished:
+Finished:
return(fm);
} /* end md_OpenAnonFileMap() */
@@ -583,10 +583,10 @@ extern PRStatus _md_ExportFileMapAsString(
{
PRIntn written;
PRIntn prot = (PRIntn)fm->prot;
-
+
written = PR_snprintf( buf, bufSize, "%ld:%d",
fm->fd->secret->md.osfd, prot );
-
+
return((written == -1)? PR_FAILURE : PR_SUCCESS);
} /* end _md_ExportFileMapAsString() */
@@ -615,14 +615,14 @@ extern PRFileMap * _md_ImportFileMapFromString(
rc = PR_GetOpenFileInfo64( fd, &info );
if ( PR_FAILURE == rc ) {
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
- ("_md_ImportFileMapFromString(): PR_GetOpenFileInfo64() failed"));
+ ("_md_ImportFileMapFromString(): PR_GetOpenFileInfo64() failed"));
goto Finished;
}
fm = PR_CreateFileMap( fd, info.size, (PRFileMapProtect)prot );
if ( NULL == fm ) {
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
- ("_md_ImportFileMapFromString(): PR_CreateFileMap() failed"));
+ ("_md_ImportFileMapFromString(): PR_CreateFileMap() failed"));
}
Finished:
diff --git a/pr/src/md/unix/uxwrap.c b/pr/src/md/unix/uxwrap.c
index e03b030a..70569229 100644
--- a/pr/src/md/unix/uxwrap.c
+++ b/pr/src/md/unix/uxwrap.c
@@ -32,11 +32,11 @@
/* see comments in ns/cmd/xfe/mozilla.c (look for "PR_XGetXtHackFD") */
static int _pr_xt_hack_fd = -1;
-
+
int PR_XGetXtHackFD(void)
{
int fds[2];
-
+
if (_pr_xt_hack_fd == -1) {
if (!pipe(fds)) {
_pr_xt_hack_fd = fds[0];
@@ -49,7 +49,7 @@ static int (*_pr_xt_hack_okayToReleaseXLock)(void) = 0;
void PR_SetXtHackOkayToReleaseXLockFn(int (*fn)(void))
{
- _pr_xt_hack_okayToReleaseXLock = fn;
+ _pr_xt_hack_okayToReleaseXLock = fn;
}
@@ -103,10 +103,10 @@ int select(int width, fd_set *rd, fd_set *wr, fd_set *ex, struct timeval *tv)
if (!_pr_initialized) {
_PR_ImplicitInitialization();
}
-
+
#ifndef _PR_LOCAL_THREADS_ONLY
if (_PR_IS_NATIVE_THREAD(_PR_MD_CURRENT_THREAD())) {
- return _MD_SELECT(width, rd, wr, ex, tv);
+ return _MD_SELECT(width, rd, wr, ex, tv);
}
#endif
@@ -184,7 +184,7 @@ int select(int width, fd_set *rd, fd_set *wr, fd_set *ex, struct timeval *tv)
*/
{
int needToLockXAgain;
-
+
needToLockXAgain = 0;
if (rd && (_pr_xt_hack_fd != -1)
&& FD_ISSET(_pr_xt_hack_fd, rd) && PR_XIsLocked()
@@ -281,7 +281,7 @@ int select(int width, fd_set *rd, fd_set *wr, fd_set *ex, struct timeval *tv)
*-----------------------------------------------------------------------
* poll() --
*
- * RETURN VALUES:
+ * RETURN VALUES:
* -1: fails, errno indicates the error.
* 0: timed out, the revents bitmasks are not set.
* positive value: the number of file descriptors for which poll()
diff --git a/pr/src/md/windows/ntgc.c b/pr/src/md/windows/ntgc.c
index 55ac92fb..20ad8a81 100644
--- a/pr/src/md/windows/ntgc.c
+++ b/pr/src/md/windows/ntgc.c
@@ -10,7 +10,7 @@
#include <windows.h>
#include "primpl.h"
-PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
+PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
{
#if defined(_X86_)
CONTEXT context;
@@ -34,8 +34,8 @@ PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
} else {
/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*
- * This code is extremely machine dependant and completely
- * undocumented by MS. Its only known to work experimentally.
+ * This code is extremely machine dependant and completely
+ * undocumented by MS. Its only known to work experimentally.
* Ready for a walk on the wild * side?
*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING */
@@ -47,7 +47,7 @@ PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
* Are your palms sweating yet?
*/
- /*
+ /*
** EAX is on the stack (ESP+0)
** EDX is on the stack (ESP+4)
** ECX is on the stack (ESP+8)
@@ -71,7 +71,7 @@ PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
}
/* This function is not used right now, but is left as a reference.
- * If you ever need to get the fiberID from the currently running fiber,
+ * If you ever need to get the fiberID from the currently running fiber,
* this is it.
*/
void *
@@ -81,15 +81,15 @@ GetMyFiberID()
void *fiberData;
/* A pointer to our tib entry is found at FS:[18]
- * At offset 10h is the fiberData pointer. The context of the
- * fiber is stored in there.
+ * At offset 10h is the fiberData pointer. The context of the
+ * fiber is stored in there.
*/
__asm {
mov EDX, FS:[18h]
mov EAX, DWORD PTR [EDX+10h]
mov [fiberData], EAX
}
-
+
return fiberData;
#else
PR_NOT_REACHED("not implemented");
diff --git a/pr/src/md/windows/ntinrval.c b/pr/src/md/windows/ntinrval.c
index 10aca11b..1e99c4c8 100644
--- a/pr/src/md/windows/ntinrval.c
+++ b/pr/src/md/windows/ntinrval.c
@@ -33,7 +33,7 @@ _PR_MD_INTERVAL_INIT()
#endif
}
-PRIntervalTime
+PRIntervalTime
_PR_MD_GET_INTERVAL()
{
/* milliseconds since system start */
@@ -44,7 +44,7 @@ _PR_MD_GET_INTERVAL()
#endif
}
-PRIntervalTime
+PRIntervalTime
_PR_MD_INTERVAL_PER_SEC()
{
return 1000;
diff --git a/pr/src/md/windows/ntio.c b/pr/src/md/windows/ntio.c
index aba53dc8..105fdecb 100644
--- a/pr/src/md/windows/ntio.c
+++ b/pr/src/md/windows/ntio.c
@@ -9,7 +9,7 @@
* For LOCAL_SCOPE threads, we're using NT fibers. For GLOBAL_SCOPE threads
* we're using NT-native threads.
*
- * When doing IO, we want to use completion ports for optimal performance
+ * When doing IO, we want to use completion ports for optimal performance
* with fibers. But if we use completion ports for all IO, it is difficult
* to project a blocking model with GLOBAL_SCOPE threads. To handle this
* we create an extra thread for completing IO for GLOBAL_SCOPE threads.
@@ -32,9 +32,9 @@ static PRThread *_pr_io_completion_thread;
#define RECYCLE_SIZE 512
static struct _MDLock _pr_recycle_lock;
static PRInt32 _pr_recycle_INET_array[RECYCLE_SIZE];
-static PRInt32 _pr_recycle_INET_tail = 0;
+static PRInt32 _pr_recycle_INET_tail = 0;
static PRInt32 _pr_recycle_INET6_array[RECYCLE_SIZE];
-static PRInt32 _pr_recycle_INET6_tail = 0;
+static PRInt32 _pr_recycle_INET6_tail = 0;
__declspec(thread) PRThread *_pr_io_restarted_io = NULL;
DWORD _pr_io_restartedIOIndex; /* The thread local storage slot for each
@@ -97,14 +97,14 @@ static PRInt32 _nt_nonblock_recvfrom(PRFileDesc *, char *, int, struct sockaddr
* An inheritable fd cannot be associated with an I/O completion port
* because the completion notification of async I/O initiated by the
* child process is still posted to the I/O completion port in the
- * parent process.
+ * parent process.
*/
#define _NT_USE_NB_IO(fd) \
((fd)->secret->nonblocking || (fd)->secret->inheritable == _PR_TRI_TRUE)
/*
* UDP support
- *
+ *
* UDP is supported on NT by the continuation thread mechanism.
* The code is borrowed from ptio.c in pthreads nspr, hence the
* PT and pt prefixes. This mechanism is in fact general and
@@ -139,7 +139,7 @@ struct pt_Continuation
union { PRIntn amount; } arg3; /* #3 - size of 'buffer' */
union { PRIntn flags; } arg4; /* #4 - read/write flags */
union { PRNetAddr *addr; } arg5; /* #5 - send/recv address */
-
+
PRIntervalTime timeout; /* representation of the timeout */
PRIntn event; /* flags for select()'s events */
@@ -218,7 +218,7 @@ _PR_MD_PAUSE_CPU(PRIntervalTime ticks)
if ( !_PR_IS_NATIVE_THREAD(deadThread) ){
/* Spinlock while user thread is still running.
* There is no way to use a condition variable here. The thread
- * is dead, and we have to wait until we switch off the dead
+ * is dead, and we have to wait until we switch off the dead
* thread before we can kill the fiber completely.
*/
while ( deadThread->no_sched)
@@ -248,7 +248,7 @@ _PR_MD_PAUSE_CPU(PRIntervalTime ticks)
*/
timeout = 5000;
#endif
- else
+ else
timeout = PR_IntervalToMilliseconds(ticks);
/*
@@ -261,7 +261,7 @@ _PR_MD_PAUSE_CPU(PRIntervalTime ticks)
&bytes,
&key,
&olp,
- timeout);
+ timeout);
if (rv == 0 && olp == NULL) {
/* Error in GetQueuedCompetionStatus */
if (GetLastError() != WAIT_TIMEOUT) {
@@ -273,7 +273,7 @@ _PR_MD_PAUSE_CPU(PRIntervalTime ticks)
}
}
- if (olp == NULL)
+ if (olp == NULL)
return 0;
mdOlp = (_MDOverlapped *)olp;
@@ -354,7 +354,7 @@ _PR_MD_PAUSE_CPU(PRIntervalTime ticks)
/* The KEY_CVAR notification only occurs when a native thread
* is notifying a user thread. For user-user notifications
- * the wakeup occurs by having the notifier place the thread
+ * the wakeup occurs by having the notifier place the thread
* on the runq directly; for native-native notifications the
* wakeup occurs by calling ReleaseSemaphore.
*/
@@ -648,7 +648,7 @@ _native_thread_io_wait(PRThread *thread, PRIntervalTime ticks)
break;
case WAIT_OBJECT_0 + _NATIVE_WAKEUP_EVENT_INDEX:
/*
- * I/O interrupted;
+ * I/O interrupted;
*/
#ifdef DEBUG
_PR_THREAD_LOCK(thread);
@@ -696,7 +696,7 @@ _NT_IO_WAIT(PRThread *thread, PRIntervalTime timeout)
_PR_THREAD_LOCK(thread);
- /* The IO may have already completed; if so, don't add to sleepQ,
+ /* The IO may have already completed; if so, don't add to sleepQ,
* since we are already on the runQ!
*/
if (thread->io_pending == PR_TRUE) {
@@ -724,7 +724,7 @@ void _PR_Unblock_IO_Wait(PRThread *thr)
{
PRStatus rv;
_PRCPU *cpu = thr->cpu;
-
+
PR_ASSERT(thr->state == _PR_IO_WAIT);
/*
* A thread for which an I/O timed out or was interrupted cannot be
@@ -776,10 +776,10 @@ _NT_ResumeIO(PRThread *thread, PRIntervalTime ticks)
if (!thread->io_pending)
fWait = PR_FALSE;
thread->io_suspended = PR_FALSE;
-
+
_PR_THREAD_UNLOCK(thread);
}
- /* We don't put ourselves back on the sleepQ yet; until we
+ /* We don't put ourselves back on the sleepQ yet; until we
* set the suspended bit to false, we can't do that. Just save
* the sleep time here, and then continue. The restarted_io handler
* will add us to the sleepQ if needed.
@@ -800,10 +800,10 @@ _PR_MD_WAKEUP_WAITER(PRThread *thread)
{
if (thread == NULL) {
/* If thread is NULL, we aren't waking a thread, we're just poking
- * idle thread
+ * idle thread
*/
- if ( PostQueuedCompletionStatus(_pr_completion_port, 0,
- KEY_CVAR, NULL) == FALSE)
+ if ( PostQueuedCompletionStatus(_pr_completion_port, 0,
+ KEY_CVAR, NULL) == FALSE)
return PR_FAILURE;
return PR_SUCCESS;
}
@@ -818,17 +818,17 @@ _PR_MD_WAKEUP_WAITER(PRThread *thread)
/* When a Native thread has to awaken a user thread, it has to poke
* the completion port because all user threads might be idle, and
- * thus the CPUs are just waiting for a completion.
+ * thus the CPUs are just waiting for a completion.
*
- * XXXMB - can we know when we are truely idle (and not checking
+ * XXXMB - can we know when we are truely idle (and not checking
* the runq)?
*/
if ((_PR_IS_NATIVE_THREAD(me) || (thread->cpu != me->cpu)) &&
(!thread->md.thr_bound_cpu)) {
/* The thread should not be in any queue */
PR_ASSERT(thread->queueCount == 0);
- if ( PostQueuedCompletionStatus(_pr_completion_port, 0,
- KEY_CVAR, &(thread->md.overlapped.overlapped)) == FALSE)
+ if ( PostQueuedCompletionStatus(_pr_completion_port, 0,
+ KEY_CVAR, &(thread->md.overlapped.overlapped)) == FALSE)
return PR_FAILURE;
}
return PR_SUCCESS;
@@ -845,12 +845,12 @@ _PR_MD_INIT_IO()
err = WSAStartup( WSAVersion, &WSAData );
PR_ASSERT(0 == err);
-
- _pr_completion_port = CreateIoCompletionPort(INVALID_HANDLE_VALUE,
- NULL,
- 0,
+
+ _pr_completion_port = CreateIoCompletionPort(INVALID_HANDLE_VALUE,
+ NULL,
+ 0,
0);
-
+
_MD_NEW_LOCK(&_pr_recycle_lock);
_MD_NEW_LOCK(&_pr_ioq_lock);
@@ -860,7 +860,7 @@ _PR_MD_INIT_IO()
if (OSversion.dwMajorVersion >= 4) {
_nt_version_gets_lockfile_completion = PR_TRUE;
}
- } else
+ } else
PR_ASSERT(0);
#ifdef _NEED_351_FILE_LOCKING_HACK
@@ -972,7 +972,7 @@ _md_put_recycled_socket(SOCKET newsock, int af)
_MD_UNLOCK(&_pr_recycle_lock);
closesocket(newsock);
}
-
+
return;
}
@@ -986,8 +986,8 @@ _md_Associate(HANDLE file)
HANDLE port;
if (!_native_threads_only) {
- port = CreateIoCompletionPort((HANDLE)file,
- _pr_completion_port,
+ port = CreateIoCompletionPort((HANDLE)file,
+ _pr_completion_port,
KEY_IO,
0);
@@ -1026,7 +1026,7 @@ _NT_IO_ABORT(PROsfd sock)
int loop_count;
/* This is a clumsy way to abort the IO, but it is all we can do.
- * It looks a bit racy, but we handle all the cases.
+ * It looks a bit racy, but we handle all the cases.
* case 1: IO completes before calling closesocket
* case 1a: fWait is set to PR_FALSE
* This should e the most likely case. We'll properly
@@ -1147,7 +1147,7 @@ _PR_MD_connect_thread(void *cdata)
PRInt32
-_PR_MD_CONNECT(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen,
+_PR_MD_CONNECT(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen,
PRIntervalTime timeout)
{
PROsfd osfd = fd->secret->md.osfd;
@@ -1207,7 +1207,7 @@ _PR_MD_BIND(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen)
#if 0
/* Disable nagle- so far unknown if this is good or not...
*/
- rv = setsockopt(fd->secret->md.osfd,
+ rv = setsockopt(fd->secret->md.osfd,
SOL_SOCKET,
TCP_NODELAY,
(const char *)&one,
@@ -1221,19 +1221,19 @@ _PR_MD_BIND(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen)
void _PR_MD_UPDATE_ACCEPT_CONTEXT(PROsfd accept_sock, PROsfd listen_sock)
{
/* Sockets accept()'d with AcceptEx need to call this setsockopt before
- * calling anything other than ReadFile(), WriteFile(), send(), recv(),
- * Transmitfile(), and closesocket(). In order to call any other
+ * calling anything other than ReadFile(), WriteFile(), send(), recv(),
+ * Transmitfile(), and closesocket(). In order to call any other
* winsock functions, we have to make this setsockopt call.
*
* XXXMB - For the server, we *NEVER* need this in
* the "normal" code path. But now we have to call it. This is a waste
- * of a system call. We'd like to only call it before calling the
+ * of a system call. We'd like to only call it before calling the
* obscure socket calls, but since we don't know at that point what the
* original socket was (or even if it is still alive) we can't do it
- * at that point...
+ * at that point...
*/
- setsockopt((SOCKET)accept_sock,
- SOL_SOCKET,
+ setsockopt((SOCKET)accept_sock,
+ SOL_SOCKET,
SO_UPDATE_ACCEPT_CONTEXT,
(char *)&listen_sock,
sizeof(listen_sock));
@@ -1243,7 +1243,7 @@ void _PR_MD_UPDATE_ACCEPT_CONTEXT(PROsfd accept_sock, PROsfd listen_sock)
#define INET_ADDR_PADDED (sizeof(PRNetAddr) + 16)
PROsfd
_PR_MD_FAST_ACCEPT(PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen,
- PRIntervalTime timeout, PRBool fast,
+ PRIntervalTime timeout, PRBool fast,
_PR_AcceptTimeoutCallback callback, void *callbackArg)
{
PROsfd osfd = fd->secret->md.osfd;
@@ -1393,9 +1393,9 @@ _PR_MD_FAST_ACCEPT(PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen,
}
PRInt32
-_PR_MD_FAST_ACCEPT_READ(PRFileDesc *sd, PROsfd *newSock, PRNetAddr **raddr,
- void *buf, PRInt32 amount, PRIntervalTime timeout,
- PRBool fast, _PR_AcceptTimeoutCallback callback,
+_PR_MD_FAST_ACCEPT_READ(PRFileDesc *sd, PROsfd *newSock, PRNetAddr **raddr,
+ void *buf, PRInt32 amount, PRIntervalTime timeout,
+ PRBool fast, _PR_AcceptTimeoutCallback callback,
void *callbackArg)
{
PROsfd sock = sd->secret->md.osfd;
@@ -1481,7 +1481,7 @@ retry:
PR_ASSERT(timeout != PR_INTERVAL_NO_TIMEOUT);
- err = getsockopt(*newSock,
+ err = getsockopt(*newSock,
SOL_SOCKET,
SO_CONNECT_TIME,
(char *)&seconds,
@@ -1489,9 +1489,9 @@ retry:
if ( err == NO_ERROR ) {
PRIntervalTime elapsed = PR_SecondsToInterval(seconds);
- if (seconds == 0xffffffff)
+ if (seconds == 0xffffffff)
isConnected = PR_FALSE;
- else
+ else
isConnected = PR_TRUE;
if (!isConnected) {
@@ -1527,9 +1527,9 @@ retry:
PR_ASSERT(me->io_pending == PR_FALSE);
PR_ASSERT(me->io_suspended == PR_FALSE);
PR_ASSERT(me->md.thr_bound_cpu == NULL);
- /* If the IO is still suspended, it means we didn't get any
+ /* If the IO is still suspended, it means we didn't get any
* completion from NT_IO_WAIT. This is not disasterous, I hope,
- * but it may mean we still have an IO outstanding... Try to
+ * but it may mean we still have an IO outstanding... Try to
* recover by just allowing ourselves to continue.
*/
me->io_suspended = PR_FALSE;
@@ -1554,7 +1554,7 @@ retry:
return -1;
}
- if (!fast)
+ if (!fast)
_PR_MD_UPDATE_ACCEPT_CONTEXT((SOCKET)*newSock, (SOCKET)sock);
/* IO is done */
@@ -1677,7 +1677,7 @@ _PR_MD_SENDFILE(PRFileDesc *sock, PRSendFileData *sfd,
}
PRInt32
-_PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
+_PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
PRIntervalTime timeout)
{
PROsfd osfd = fd->secret->md.osfd;
@@ -1722,7 +1722,7 @@ _PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
me->io_fd = osfd;
rv = ReadFile((HANDLE)osfd,
- buf,
+ buf,
amount,
&bytes,
&(me->md.overlapped.overlapped));
@@ -1821,7 +1821,7 @@ _PR_MD_SEND(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
me->io_fd = osfd;
rv = WriteFile((HANDLE)osfd,
- buf,
+ buf,
amount,
&bytes,
&(me->md.overlapped.overlapped));
@@ -1927,7 +1927,7 @@ _PR_MD_WRITEV(PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size, PRIntervalTi
for (index=0; index<iov_size; index++) {
rv = _PR_MD_SEND(fd, iov[index].iov_base, iov[index].iov_len, 0,
timeout);
- if (rv > 0)
+ if (rv > 0)
sent += rv;
if ( rv != iov[index].iov_len ) {
if (sent <= 0)
@@ -1996,7 +1996,7 @@ _PR_MD_GETPEERNAME(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *len)
* Determine if the socket is connected.
*/
- rv = getsockopt(fd->secret->md.osfd,
+ rv = getsockopt(fd->secret->md.osfd,
SOL_SOCKET,
SO_CONNECT_TIME,
(char *) &seconds,
@@ -2013,7 +2013,7 @@ _PR_MD_GETPEERNAME(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *len)
_PR_MD_MAP_GETSOCKOPT_ERROR(WSAGetLastError());
return PR_FAILURE;
}
- } else {
+ } else {
rv = getpeername((SOCKET)fd->secret->md.osfd,
(struct sockaddr *) addr, len);
if (rv == 0) {
@@ -2062,9 +2062,9 @@ _PR_MD_OPEN(const char *name, PRIntn osflags, PRIntn mode)
PRInt32 access = 0;
PRInt32 flags = 0;
PRInt32 flag6 = 0;
-
+
if (osflags & PR_SYNC) flag6 = FILE_FLAG_WRITE_THROUGH;
-
+
if (osflags & PR_RDONLY || osflags & PR_RDWR) access |= GENERIC_READ;
if (osflags & PR_WRONLY || osflags & PR_RDWR) access |= GENERIC_WRITE;
@@ -2078,11 +2078,11 @@ _PR_MD_OPEN(const char *name, PRIntn osflags, PRIntn mode)
flag6 |= FILE_FLAG_OVERLAPPED;
- file = CreateFile(name,
- access,
+ file = CreateFile(name,
+ access,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL,
- flags,
+ flags,
flag6,
NULL);
if (file == INVALID_HANDLE_VALUE) {
@@ -2114,7 +2114,7 @@ _PR_MD_OPEN_FILE(const char *name, PRIntn osflags, PRIntn mode)
PACL pACL = NULL;
if (osflags & PR_SYNC) flag6 = FILE_FLAG_WRITE_THROUGH;
-
+
if (osflags & PR_RDONLY || osflags & PR_RDWR) access |= GENERIC_READ;
if (osflags & PR_WRONLY || osflags & PR_RDWR) access |= GENERIC_WRITE;
@@ -2137,11 +2137,11 @@ _PR_MD_OPEN_FILE(const char *name, PRIntn osflags, PRIntn mode)
lpSA = &sa;
}
}
- file = CreateFile(name,
- access,
+ file = CreateFile(name,
+ access,
FILE_SHARE_READ|FILE_SHARE_WRITE,
lpSA,
- flags,
+ flags,
flag6,
NULL);
if (lpSA != NULL) {
@@ -2163,7 +2163,7 @@ _PR_MD_OPEN_FILE(const char *name, PRIntn osflags, PRIntn mode)
return (PROsfd)file;
}
-PRInt32
+PRInt32
_PR_MD_READ(PRFileDesc *fd, void *buf, PRInt32 len)
{
PROsfd f = fd->secret->md.osfd;
@@ -2186,10 +2186,10 @@ _PR_MD_READ(PRFileDesc *fd, void *buf, PRInt32 len)
PR_ASSERT((me->md.overlapped.overlapped.Offset != 0xffffffff) || (GetLastError() == NO_ERROR));
if (fd->secret->inheritable == _PR_TRI_TRUE) {
- rv = ReadFile((HANDLE)f,
- (LPVOID)buf,
- len,
- &bytes,
+ rv = ReadFile((HANDLE)f,
+ (LPVOID)buf,
+ len,
+ &bytes,
&me->md.overlapped.overlapped);
if (rv != 0) {
loOffset = SetFilePointer((HANDLE)f, bytes, &hiOffset, FILE_CURRENT);
@@ -2235,10 +2235,10 @@ _PR_MD_READ(PRFileDesc *fd, void *buf, PRInt32 len)
_PR_THREAD_UNLOCK(me);
me->io_fd = f;
- rv = ReadFile((HANDLE)f,
- (LPVOID)buf,
- len,
- &bytes,
+ rv = ReadFile((HANDLE)f,
+ (LPVOID)buf,
+ len,
+ &bytes,
&me->md.overlapped.overlapped);
if ( (rv == 0) && ((err = GetLastError()) != ERROR_IO_PENDING) ) {
_PR_THREAD_LOCK(me);
@@ -2287,7 +2287,7 @@ _PR_MD_READ(PRFileDesc *fd, void *buf, PRInt32 len)
}
SetFilePointer((HANDLE)f, me->md.blocked_io_bytes, 0, FILE_CURRENT);
-
+
PR_ASSERT(me->io_pending == PR_FALSE);
return me->md.blocked_io_bytes;
@@ -2304,7 +2304,7 @@ _PR_MD_READ(PRFileDesc *fd, void *buf, PRInt32 len)
/* ERROR_HANDLE_EOF can only be returned by async io */
PR_ASSERT(err != ERROR_HANDLE_EOF);
if (err == ERROR_BROKEN_PIPE) {
- /* The write end of the pipe has been closed. */
+ /* The write end of the pipe has been closed. */
return 0;
}
_PR_MD_MAP_READ_ERROR(err);
@@ -2338,10 +2338,10 @@ _PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 len)
PR_ASSERT((me->md.overlapped.overlapped.Offset != 0xffffffff) || (GetLastError() == NO_ERROR));
if (fd->secret->inheritable == _PR_TRI_TRUE) {
- rv = WriteFile((HANDLE)f,
- (LPVOID)buf,
- len,
- &bytes,
+ rv = WriteFile((HANDLE)f,
+ (LPVOID)buf,
+ len,
+ &bytes,
&me->md.overlapped.overlapped);
if (rv != 0) {
loOffset = SetFilePointer((HANDLE)f, bytes, &hiOffset, FILE_CURRENT);
@@ -2382,10 +2382,10 @@ _PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 len)
_PR_THREAD_UNLOCK(me);
me->io_fd = f;
- rv = WriteFile((HANDLE)f,
- buf,
- len,
- &bytes,
+ rv = WriteFile((HANDLE)f,
+ buf,
+ len,
+ &bytes,
&(me->md.overlapped.overlapped));
if ( (rv == 0) && ((err = GetLastError()) != ERROR_IO_PENDING) ) {
_PR_THREAD_LOCK(me);
@@ -2439,7 +2439,7 @@ _PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 len)
offset.QuadPart += me->md.blocked_io_bytes;
SetFilePointer((HANDLE)f, offset.LowPart, &offset.HighPart, FILE_BEGIN);
-
+
PR_ASSERT(me->io_pending == PR_FALSE);
return me->md.blocked_io_bytes;
@@ -2608,7 +2608,7 @@ _PR_MD_CLOSE(PROsfd osfd, PRBool socket)
_PR_THREAD_LOCK(me);
me->state = _PR_IO_WAIT;
/* The IO could have completed on another thread just after
- * calling closesocket while the io_suspended flag was true.
+ * calling closesocket while the io_suspended flag was true.
* So we now grab the lock to do a safe check on io_pending to
* see if we need to wait or not.
*/
@@ -2655,7 +2655,7 @@ _PR_MD_SET_FD_INHERITABLE(PRFileDesc *fd, PRBool inheritable)
return PR_FAILURE;
}
return PR_SUCCESS;
-}
+}
void
_PR_MD_INIT_FD_INHERITABLE(PRFileDesc *fd, PRBool imported)
@@ -3000,7 +3000,7 @@ PRInt32
_PR_MD_GETFILEINFO64(const char *fn, PRFileInfo64 *info)
{
WIN32_FILE_ATTRIBUTE_DATA findFileData;
-
+
if (NULL == fn || '\0' == *fn) {
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
return -1;
@@ -3213,7 +3213,7 @@ _PR_MD_LOCKFILE(PROsfd f)
me->state = _PR_IO_WAIT;
_PR_THREAD_UNLOCK(me);
- rv = LockFileEx((HANDLE)f,
+ rv = LockFileEx((HANDLE)f,
LOCKFILE_EXCLUSIVE_LOCK,
0,
0x7fffffff,
@@ -3249,7 +3249,7 @@ _PR_MD_LOCKFILE(PROsfd f)
*
* If we pretend we won't get a completion, NSPR gets confused later
* when the unexpected completion arrives. If we assume we do get
- * a completion, we hang on 3.51. Worse, Microsoft informs me that the
+ * a completion, we hang on 3.51. Worse, Microsoft informs me that the
* behavior varies on 3.51 depending on if you are using a network
* file system or a local disk!
*
@@ -3257,7 +3257,7 @@ _PR_MD_LOCKFILE(PROsfd f)
* depending on whether or not this system is EITHER
* - running NT 4.0
* - running NT 3.51 with a service pack greater than 5.
- *
+ *
* In the meantime, this code may not work on network file systems.
*
*/
@@ -3279,14 +3279,14 @@ _PR_MD_LOCKFILE(PROsfd f)
}
#ifdef _NEED_351_FILE_LOCKING_HACK
else if (rv) {
- /* If this is NT 3.51 and the file is local, then we won't get a
+ /* If this is NT 3.51 and the file is local, then we won't get a
* completion back from LockFile when it succeeded.
*/
if (_nt_version_gets_lockfile_completion == PR_FALSE) {
if ( IsFileLocal((HANDLE)f) == _PR_LOCAL_FILE) {
me->io_pending = PR_FALSE;
me->state = _PR_RUNNING;
- return PR_SUCCESS;
+ return PR_SUCCESS;
}
}
}
@@ -3332,7 +3332,7 @@ _PR_MD_TLOCKFILE(PROsfd f)
me->state = _PR_IO_WAIT;
_PR_THREAD_UNLOCK(me);
- rv = LockFileEx((HANDLE)f,
+ rv = LockFileEx((HANDLE)f,
LOCKFILE_FAIL_IMMEDIATELY|LOCKFILE_EXCLUSIVE_LOCK,
0,
0x7fffffff,
@@ -3375,7 +3375,7 @@ _PR_MD_TLOCKFILE(PROsfd f)
}
#ifdef _NEED_351_FILE_LOCKING_HACK
else if (rv) {
- /* If this is NT 3.51 and the file is local, then we won't get a
+ /* If this is NT 3.51 and the file is local, then we won't get a
* completion back from LockFile when it succeeded.
*/
if (_nt_version_gets_lockfile_completion == PR_FALSE) {
@@ -3391,7 +3391,7 @@ _PR_MD_TLOCKFILE(PROsfd f)
}
_PR_THREAD_UNLOCK(me);
- return PR_SUCCESS;
+ return PR_SUCCESS;
}
}
}
@@ -3465,17 +3465,17 @@ _PR_MD_MAKE_NONBLOCK(PRFileDesc *f)
#ifdef _NEED_351_FILE_LOCKING_HACK
/***************
-**
+**
** Lockfile hacks
**
** The following code is a hack to work around a microsoft bug with lockfile.
** The problem is that on NT 3.51, if LockFileEx() succeeds, you never
** get a completion back for files that are on local disks. So, we need to
-** know if a file is local or remote so we can tell if we should expect
+** know if a file is local or remote so we can tell if we should expect
** a completion.
**
** The only way to check if a file is local or remote based on the handle is
-** to get the serial number for the volume it is mounted on and then to
+** to get the serial number for the volume it is mounted on and then to
** compare that with mounted drives. This code caches the volume numbers of
** fixed disks and does a relatively quick check.
**
@@ -3550,12 +3550,12 @@ PRBool IsFileLocalInit()
case DRIVE_REMOVABLE:
// CDROM is a removable media
- case DRIVE_CDROM:
+ case DRIVE_CDROM:
// no idea if ramdisks can change serial numbers or not
// but it doesn't hurt to treat them as removable.
-
- case DRIVE_RAMDISK:
+
+ case DRIVE_RAMDISK:
// Here is where we keep track of removable drives.
@@ -3565,7 +3565,7 @@ PRBool IsFileLocalInit()
case DRIVE_FIXED:
- // cache volume serial numbers.
+ // cache volume serial numbers.
if (GetVolumeInformation(
&lpBuffer[dwIndex],
NULL, 0,
@@ -3577,7 +3577,7 @@ PRBool IsFileLocalInit()
dwLastCachedDrive = dwDriveIndex;
dwCachedVolumeSerialNumbers[dwDriveIndex] = dwVolumeSerialNumber;
}
-
+
break;
}
}
@@ -3616,7 +3616,7 @@ PRInt32 IsFileLocal(HANDLE hFile)
_MD_UNLOCK(&cachedVolumeLock);
// volume serial number not found in the cache. Check removable files.
- // removable drives are noted as a bitmask. If the bit associated with
+ // removable drives are noted as a bitmask. If the bit associated with
// a specific drive is set, then we should query its volume serial number
// as its possible it has changed.
dwMask = dwRemoveableDrivesToCheck;
@@ -3819,7 +3819,7 @@ static PRInt32 _nt_nonblock_connect(PRFileDesc *fd, struct sockaddr *addr, int a
}
_PR_MD_MAP_CONNECT_ERROR(err);
return -1;
- }
+ }
PR_ASSERT(FD_ISSET((SOCKET)osfd, &wr));
rv = 0;
} else {
@@ -3946,7 +3946,7 @@ static PRInt32 _nt_nonblock_writev(PRFileDesc *fd, const PRIOVec *iov, int size,
for (index=0; index<size; index++) {
rv = _nt_nonblock_send(fd, iov[index].iov_base, iov[index].iov_len, timeout);
- if (rv > 0)
+ if (rv > 0)
sent += rv;
if ( rv != iov[index].iov_len ) {
if (rv < 0) {
@@ -4110,7 +4110,7 @@ static void pt_InsertTimedInternal(pt_Continuation *op)
* Subsequently earlier timeouts are computed based on the latter
* knowledge by subracting the timeout deltas that are stored in
* the operation list. There are operation[n]->timeout ticks
- * between the expiration of operation[n-1] and operation[n].e e
+ * between the expiration of operation[n-1] and operation[n].e e
*
* Therefore, the operation[n-1] will expire operation[n]->timeout
* ticks prior to operation[n].
@@ -4375,7 +4375,7 @@ static void ContinuationThread(void *arg)
{
if (0 == pt_tq.head->timeout)
{
- /*
+ /*
* The leading element of the timed queue has timed
* out. Get rid of it. In any case go around the
* loop again, computing the polling list, checking
diff --git a/pr/src/md/windows/ntmisc.c b/pr/src/md/windows/ntmisc.c
index 12f8c1df..2413e27b 100644
--- a/pr/src/md/windows/ntmisc.c
+++ b/pr/src/md/windows/ntmisc.c
@@ -99,7 +99,7 @@ NowCalibrate(void)
PRInt64 calibrationDelta = 0;
/*
* By wrapping a timeBegin/EndPeriod pair of calls around this loop,
- * the loop seems to take much less time (1 ms vs 15ms) on Vista.
+ * the loop seems to take much less time (1 ms vs 15ms) on Vista.
*/
timeBeginPeriod(1);
LowResTime(&ftStart);
@@ -108,7 +108,7 @@ NowCalibrate(void)
} while (memcmp(&ftStart,&ft, sizeof(ft)) == 0);
timeEndPeriod(1);
- calibration.granularity =
+ calibration.granularity =
(FILETIME_TO_INT64(ft) - FILETIME_TO_INT64(ftStart))/10;
QueryPerformanceCounter(&now);
@@ -116,9 +116,9 @@ NowCalibrate(void)
calibration.offset = (long double) FILETIME_TO_INT64(ft);
calibration.timer_offset = (long double) now.QuadPart;
/*
- * The windows epoch is around 1600. The unix epoch is around 1970.
+ * The windows epoch is around 1600. The unix epoch is around 1970.
* _pr_filetime_offset is the difference (in windows time units which
- * are 10 times more highres than the JS time unit)
+ * are 10 times more highres than the JS time unit)
*/
calibration.offset -= _pr_filetime_offset;
calibration.offset *= 0.1;
@@ -211,7 +211,7 @@ PR_Now(void)
if (calibration.offset == cachedOffset) {
/*
* Since calibration can take a while, make any other
- * threads immediately wait
+ * threads immediately wait
*/
MUTEX_SETSPINCOUNT(&calibration.data_lock, 0);
@@ -248,8 +248,8 @@ PR_Now(void)
(highresTimerValue-calibration.timer_offset)/calibration.freq;
cachedOffset = calibration.offset;
- /*
- * On some dual processor/core systems, we might get an earlier
+ /*
+ * On some dual processor/core systems, we might get an earlier
* time so we cache the last time that we returned.
*/
calibration.last = PR_MAX(calibration.last,(PRInt64)highresTime);
@@ -261,12 +261,12 @@ PR_Now(void)
/* Check for clock skew */
diff = lowresTime - highresTime;
- /*
+ /*
* For some reason that I have not determined, the skew can be
* up to twice a kernel tick. This does not seem to happen by
* itself, but I have only seen it triggered by another program
* doing some kind of file I/O. The symptoms are a negative diff
- * followed by an equally large positive diff.
+ * followed by an equally large positive diff.
*/
if (fabs(diff) > 2*skewThreshold) {
if (calibrated) {
@@ -279,13 +279,13 @@ PR_Now(void)
* resolution results for anything, so let's resort to old
* behavior for this call. It's possible that in the
* future, the user will want the high resolution timer, so
- * we don't disable it entirely.
+ * we don't disable it entirely.
*/
returnedTime = (PRInt64)lowresTime;
needsCalibration = PR_FALSE;
} else {
/*
- * It is possible that when we recalibrate, we will return
+ * It is possible that when we recalibrate, we will return
* a value less than what we have returned before; this is
* unavoidable. We cannot tell the different between a
* faulty QueryPerformanceCounter implementation and user
@@ -293,7 +293,7 @@ PR_Now(void)
* respect user changes to the operating system time, we
* cannot maintain the invariant that Date.now() never
* decreases; the old implementation has this behavior as
- * well.
+ * well.
*/
needsCalibration = PR_TRUE;
}
@@ -323,7 +323,7 @@ PR_Now(void)
GetSystemTime(&st);
SystemTimeToFileTime(&st, &ft);
_PR_FileTimeToPRTime(&ft, &prt);
- return prt;
+ return prt;
}
#endif
@@ -376,7 +376,7 @@ static int assembleCmdLine(char *const *argv, char **cmdLine)
for (arg = argv; *arg; arg++) {
/* Add a space to separates the arguments */
if (arg != argv) {
- *p++ = ' ';
+ *p++ = ' ';
}
q = *arg;
numBackslashes = 0;
@@ -442,7 +442,7 @@ static int assembleCmdLine(char *const *argv, char **cmdLine)
if (argNeedQuotes) {
*p++ = '"';
}
- }
+ }
*p = '\0';
return 0;
@@ -827,18 +827,18 @@ PRStatus _MD_WindowsGetSysInfo(PRSysInfo cmd, char *name, PRUint32 namelen)
if (PR_SI_SYSNAME == cmd)
(void)PR_snprintf(name, namelen, "Windows_NT");
else if (PR_SI_RELEASE == cmd)
- (void)PR_snprintf(name, namelen, "%d.%d",osvi.dwMajorVersion,
+ (void)PR_snprintf(name, namelen, "%d.%d",osvi.dwMajorVersion,
osvi.dwMinorVersion);
break;
case VER_PLATFORM_WIN32_WINDOWS:
if (PR_SI_SYSNAME == cmd) {
- if ((osvi.dwMajorVersion > 4) ||
+ if ((osvi.dwMajorVersion > 4) ||
((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion > 0)))
(void)PR_snprintf(name, namelen, "Windows_98");
else
(void)PR_snprintf(name, namelen, "Windows_95");
} else if (PR_SI_RELEASE == cmd) {
- (void)PR_snprintf(name, namelen, "%d.%d",osvi.dwMajorVersion,
+ (void)PR_snprintf(name, namelen, "%d.%d",osvi.dwMajorVersion,
osvi.dwMinorVersion);
}
break;
@@ -847,7 +847,7 @@ PRStatus _MD_WindowsGetSysInfo(PRSysInfo cmd, char *name, PRUint32 namelen)
if (PR_SI_SYSNAME == cmd)
(void)PR_snprintf(name, namelen, "Windows_CE");
else if (PR_SI_RELEASE == cmd)
- (void)PR_snprintf(name, namelen, "%d.%d",osvi.dwMajorVersion,
+ (void)PR_snprintf(name, namelen, "%d.%d",osvi.dwMajorVersion,
osvi.dwMinorVersion);
break;
#endif
@@ -876,7 +876,7 @@ PRStatus _MD_WindowsGetReleaseName(char *name, PRUint32 namelen)
switch (osvi.dwPlatformId) {
case VER_PLATFORM_WIN32_NT:
case VER_PLATFORM_WIN32_WINDOWS:
- (void)PR_snprintf(name, namelen, "%d.%d",osvi.dwMajorVersion,
+ (void)PR_snprintf(name, namelen, "%d.%d",osvi.dwMajorVersion,
osvi.dwMinorVersion);
break;
default:
@@ -960,16 +960,16 @@ void * _MD_MemMap(
if ((addr = MapViewOfFile(fmap->md.hFileMap, fmap->md.dwAccess,
dwHi, dwLo, len)) == NULL) {
{
- LPVOID lpMsgBuf;
-
- FormatMessage(
+ LPVOID lpMsgBuf;
+
+ FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
- NULL
+ NULL
);
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG, ("md_memmap(): %s", lpMsgBuf ));
}
@@ -1035,10 +1035,10 @@ PRStatus _MD_SyncMemMap(
#pragma warning(disable: 4035)
PRInt32 _PR_MD_ATOMIC_INCREMENT(PRInt32 *val)
-{
+{
#if defined(__GNUC__)
PRInt32 result;
- asm volatile ("lock ; xadd %0, %1"
+ asm volatile ("lock ; xadd %0, %1"
: "=r"(result), "=m"(*val)
: "0"(1), "m"(*val));
return result + 1;
@@ -1059,7 +1059,7 @@ PRInt32 _PR_MD_ATOMIC_DECREMENT(PRInt32 *val)
{
#if defined(__GNUC__)
PRInt32 result;
- asm volatile ("lock ; xadd %0, %1"
+ asm volatile ("lock ; xadd %0, %1"
: "=r"(result), "=m"(*val)
: "0"(-1), "m"(*val));
//asm volatile("lock ; xadd %0, %1" : "=m" (val), "=a" (result) : "-1" (1));
@@ -1082,7 +1082,7 @@ PRInt32 _PR_MD_ATOMIC_ADD(PRInt32 *intp, PRInt32 val)
#if defined(__GNUC__)
PRInt32 result;
//asm volatile("lock ; xadd %1, %0" : "=m" (intp), "=a" (result) : "1" (val));
- asm volatile ("lock ; xadd %0, %1"
+ asm volatile ("lock ; xadd %0, %1"
: "=r"(result), "=m"(*intp)
: "0"(val), "m"(*intp));
return result + val;
@@ -1102,24 +1102,24 @@ PRInt32 _PR_MD_ATOMIC_ADD(PRInt32 *intp, PRInt32 val)
#ifdef _PR_HAVE_ATOMIC_CAS
#pragma warning(disable: 4035)
-void
+void
PR_StackPush(PRStack *stack, PRStackElem *stack_elem)
{
#if defined(__GNUC__)
void **tos = (void **) stack;
void *tmp;
-
+
retry:
if (*tos == (void *) -1)
goto retry;
-
+
__asm__("xchg %0,%1"
: "=r" (tmp), "=m"(*tos)
: "0" (-1), "m"(*tos));
-
+
if (tmp == (void *) -1)
goto retry;
-
+
*(void **)stack_elem = tmp;
__asm__("" : : : "memory");
*tos = stack_elem;
@@ -1143,24 +1143,24 @@ retry: mov eax,[ebx]
#pragma warning(default: 4035)
#pragma warning(disable: 4035)
-PRStackElem *
+PRStackElem *
PR_StackPop(PRStack *stack)
{
#if defined(__GNUC__)
void **tos = (void **) stack;
void *tmp;
-
+
retry:
if (*tos == (void *) -1)
goto retry;
-
+
__asm__("xchg %0,%1"
: "=r" (tmp), "=m"(*tos)
: "0" (-1), "m"(*tos));
if (tmp == (void *) -1)
goto retry;
-
+
if (tmp != (void *) 0)
{
void *next = *(void **)tmp;
@@ -1169,7 +1169,7 @@ PR_StackPop(PRStack *stack)
}
else
*tos = tmp;
-
+
return tmp;
#else
__asm
@@ -1190,7 +1190,7 @@ retry: mov eax,[ebx]
jmp done
empty:
mov [ebx],eax
-done:
+done:
}
#endif /* __GNUC__ */
}
diff --git a/pr/src/md/windows/ntsem.c b/pr/src/md/windows/ntsem.c
index f36a145a..716e6ef3 100644
--- a/pr/src/md/windows/ntsem.c
+++ b/pr/src/md/windows/ntsem.c
@@ -12,19 +12,19 @@
#include "primpl.h"
-void
+void
_PR_MD_NEW_SEM(_MDSemaphore *md, PRUintn value)
{
md->sem = CreateSemaphore(NULL, value, 0x7fffffff, NULL);
}
-void
+void
_PR_MD_DESTROY_SEM(_MDSemaphore *md)
{
CloseHandle(md->sem);
}
-PRStatus
+PRStatus
_PR_MD_TIMED_WAIT_SEM(_MDSemaphore *md, PRIntervalTime ticks)
{
int rv;
@@ -37,13 +37,13 @@ _PR_MD_TIMED_WAIT_SEM(_MDSemaphore *md, PRIntervalTime ticks)
return PR_FAILURE;
}
-PRStatus
+PRStatus
_PR_MD_WAIT_SEM(_MDSemaphore *md)
{
return _PR_MD_TIMED_WAIT_SEM(md, PR_INTERVAL_NO_TIMEOUT);
}
-void
+void
_PR_MD_POST_SEM(_MDSemaphore *md)
{
ReleaseSemaphore(md->sem, 1, NULL);
diff --git a/pr/src/md/windows/ntthread.c b/pr/src/md/windows/ntthread.c
index 1fdf0e93..6dd01fb9 100644
--- a/pr/src/md/windows/ntthread.c
+++ b/pr/src/md/windows/ntthread.c
@@ -181,12 +181,12 @@ pr_root(void *arg)
return 0;
}
-PRStatus
-_PR_MD_CREATE_THREAD(PRThread *thread,
- void (*start)(void *),
- PRThreadPriority priority,
- PRThreadScope scope,
- PRThreadState state,
+PRStatus
+_PR_MD_CREATE_THREAD(PRThread *thread,
+ void (*start)(void *),
+ PRThreadPriority priority,
+ PRThreadScope scope,
+ PRThreadState state,
PRUint32 stackSize)
{
@@ -250,14 +250,14 @@ _PR_MD_END_THREAD(void)
_endthreadex(0);
}
-void
+void
_PR_MD_YIELD(void)
{
/* Can NT really yield at all? */
Sleep(0);
}
-void
+void
_PR_MD_SET_PRIORITY(_MDThread *thread, PRThreadPriority newPri)
{
int nativePri;
@@ -428,7 +428,7 @@ _PR_MD_EXIT(PRIntn status)
#ifdef HAVE_FIBERS
void
-_pr_fiber_mainline(void *unused)
+_pr_fiber_mainline(void *unused)
{
PRThread *fiber = _PR_MD_CURRENT_THREAD();
@@ -445,7 +445,7 @@ PRThread *_PR_MD_CREATE_USER_THREAD(
if ( (thread = PR_NEW(PRThread)) == NULL ) {
return NULL;
}
-
+
memset(thread, 0, sizeof(PRThread));
thread->md.fiber_fn = start;
thread->md.fiber_arg = arg;
@@ -468,7 +468,7 @@ void
_PR_MD_INIT_CONTEXT(PRThread *thread, char *top, void (*start) (void), PRBool *status)
{
thread->md.fiber_fn = (void (*)(void *))start;
- thread->md.fiber_id = CreateFiber(thread->md.fiber_stacksize,
+ thread->md.fiber_id = CreateFiber(thread->md.fiber_stacksize,
(LPFIBER_START_ROUTINE)_pr_fiber_mainline, NULL);
if (thread->md.fiber_id != 0)
*status = PR_TRUE;
@@ -502,7 +502,7 @@ _PR_MD_RESTORE_CONTEXT(PRThread *thread)
PR_ASSERT( !_PR_IS_NATIVE_THREAD(thread) );
/* The user-level code for yielding will happily add ourselves to the runq
- * and then switch to ourselves; the NT fibers can't handle switching to
+ * and then switch to ourselves; the NT fibers can't handle switching to
* ourselves.
*/
if (thread != me) {
@@ -532,12 +532,12 @@ PRInt32 _PR_MD_GETTHREADAFFINITYMASK(PRThread *thread, PRUint32 *mask)
PRInt32 rv, system_mask;
rv = GetProcessAffinityMask(GetCurrentProcess(), mask, &system_mask);
-
+
return rv?0:-1;
}
-void
-_PR_MD_SUSPEND_CPU(_PRCPU *cpu)
+void
+_PR_MD_SUSPEND_CPU(_PRCPU *cpu)
{
_PR_MD_SUSPEND_THREAD(cpu->thread);
}
diff --git a/pr/src/md/windows/w32ipcsem.c b/pr/src/md/windows/w32ipcsem.c
index 95459100..5719ce3f 100644
--- a/pr/src/md/windows/w32ipcsem.c
+++ b/pr/src/md/windows/w32ipcsem.c
@@ -18,13 +18,13 @@ static HANDLE OpenSemaphore(DWORD inDesiredAccess,
HANDLE retval = NULL;
HANDLE semaphore = NULL;
PRUnichar wideName[MAX_PATH]; /* name size is limited to MAX_PATH */
-
+
MultiByteToWideChar(CP_ACP, 0, inName, -1, wideName, MAX_PATH);
/* 0x7fffffff is the max count for our semaphore */
semaphore = CreateSemaphoreW(NULL, 0, 0x7fffffff, wideName);
if (NULL != semaphore) {
DWORD lastErr = GetLastError();
-
+
if (ERROR_ALREADY_EXISTS != lastErr)
CloseHandle(semaphore);
else
@@ -142,7 +142,7 @@ PRSem *_PR_MD_OPEN_SEMAPHORE(
#ifdef WINCE
{
/* The size of a sem's name is limited to MAX_PATH. */
- PRUnichar wosname[MAX_PATH];
+ PRUnichar wosname[MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, osname, -1, wosname, MAX_PATH);
sem->sem = CreateSemaphoreW(lpSA, value, 0x7fffffff, wosname);
}
diff --git a/pr/src/md/windows/w32poll.c b/pr/src/md/windows/w32poll.c
index daf14dfe..8a4b5157 100644
--- a/pr/src/md/windows/w32poll.c
+++ b/pr/src/md/windows/w32poll.c
@@ -275,14 +275,14 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
out_flags |= PR_POLL_READ;
if (pd->out_flags & _PR_POLL_WRITE_SYS_READ)
out_flags |= PR_POLL_WRITE;
- }
+ }
if (FD_ISSET(osfd, &wt))
{
if (pd->out_flags & _PR_POLL_READ_SYS_WRITE)
out_flags |= PR_POLL_READ;
if (pd->out_flags & _PR_POLL_WRITE_SYS_WRITE)
out_flags |= PR_POLL_WRITE;
- }
+ }
if (FD_ISSET(osfd, &ex)) out_flags |= PR_POLL_EXCEPT;
}
pd->out_flags = out_flags;
diff --git a/pr/src/md/windows/w32shm.c b/pr/src/md/windows/w32shm.c
index 8e8b1d68..748a9860 100644
--- a/pr/src/md/windows/w32shm.c
+++ b/pr/src/md/windows/w32shm.c
@@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#include <private/primpl.h>
+#include <private/primpl.h>
#include <string.h>
#include <prshm.h>
#include <prerr.h>
@@ -23,11 +23,11 @@ extern PRLogModuleInfo *_pr_shm_lm;
*/
static DWORD filemapAccessTable[] = {
FILE_MAP_ALL_ACCESS & ~FILE_MAP_WRITE, /* read */
- FILE_MAP_ALL_ACCESS & ~FILE_MAP_READ, /* write */
+ FILE_MAP_ALL_ACCESS & ~FILE_MAP_READ, /* write */
0 /* execute */
};
-extern PRSharedMemory * _MD_OpenSharedMemory(
+extern PRSharedMemory * _MD_OpenSharedMemory(
const char *name,
PRSize size,
PRIntn flags,
@@ -48,15 +48,15 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
if ( PR_FAILURE == rc )
{
PR_SetError(PR_UNKNOWN_ERROR, 0 );
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: name is invalid"));
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: name is invalid"));
return(NULL);
}
shm = PR_NEWZAP( PRSharedMemory );
- if ( NULL == shm )
+ if ( NULL == shm )
{
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0 );
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New PRSharedMemory out of memory"));
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New PRSharedMemory out of memory"));
return(NULL);
}
@@ -64,14 +64,14 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
if ( NULL == shm->ipcname )
{
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0 );
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New shm->ipcname out of memory"));
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG, ( "PR_OpenSharedMemory: New shm->ipcname out of memory"));
PR_DELETE(shm);
return(NULL);
}
/* copy args to struct */
strcpy( shm->ipcname, ipcname );
- shm->size = size;
+ shm->size = size;
shm->mode = mode;
shm->flags = flags;
shm->ident = _PR_SHM_IDENT;
@@ -118,25 +118,25 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
}
if ( NULL == shm->handle ) {
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
( "PR_OpenSharedMemory: CreateFileMapping() failed: %s",
- shm->ipcname ));
+ shm->ipcname ));
_PR_MD_MAP_DEFAULT_ERROR( GetLastError());
PR_FREEIF( shm->ipcname )
PR_DELETE( shm );
return(NULL);
} else {
if (( flags & PR_SHM_EXCL) && ( GetLastError() == ERROR_ALREADY_EXISTS )) {
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
( "PR_OpenSharedMemory: Request exclusive & already exists",
- shm->ipcname ));
+ shm->ipcname ));
PR_SetError( PR_FILE_EXISTS_ERROR, ERROR_ALREADY_EXISTS );
CloseHandle( shm->handle );
PR_FREEIF( shm->ipcname )
PR_DELETE( shm );
return(NULL);
} else {
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
( "PR_OpenSharedMemory: CreateFileMapping() success: %s, handle: %d",
shm->ipcname, shm->handle ));
return(shm);
@@ -151,16 +151,16 @@ extern PRSharedMemory * _MD_OpenSharedMemory(
#endif
if ( NULL == shm->handle ) {
_PR_MD_MAP_DEFAULT_ERROR( GetLastError());
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
( "PR_OpenSharedMemory: OpenFileMapping() failed: %s, error: %d",
- shm->ipcname, PR_GetOSError()));
+ shm->ipcname, PR_GetOSError()));
PR_FREEIF( shm->ipcname );
PR_DELETE( shm );
return(NULL);
} else {
- PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
+ PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,
( "PR_OpenSharedMemory: OpenFileMapping() success: %s, handle: %d",
- shm->ipcname, shm->handle ));
+ shm->ipcname, shm->handle ));
return(shm);
}
}
@@ -184,7 +184,7 @@ extern void * _MD_AttachSharedMemory( PRSharedMemory *shm, PRIntn flags )
if ( NULL == addr ) {
_PR_MD_MAP_DEFAULT_ERROR( GetLastError());
- PR_LOG( _pr_shm_lm, PR_LOG_ERROR,
+ PR_LOG( _pr_shm_lm, PR_LOG_ERROR,
("_MD_AttachSharedMemory: MapViewOfFile() failed. OSerror: %d", PR_GetOSError()));
}
@@ -200,10 +200,10 @@ extern PRStatus _MD_DetachSharedMemory( PRSharedMemory *shm, void *addr )
PR_ASSERT( shm->ident == _PR_SHM_IDENT );
wrc = UnmapViewOfFile( addr );
- if ( FALSE == wrc )
+ if ( FALSE == wrc )
{
_PR_MD_MAP_DEFAULT_ERROR( GetLastError());
- PR_LOG( _pr_shm_lm, PR_LOG_ERROR,
+ PR_LOG( _pr_shm_lm, PR_LOG_ERROR,
("_MD_DetachSharedMemory: UnmapViewOfFile() failed. OSerror: %d", PR_GetOSError()));
rc = PR_FAILURE;
}
@@ -223,7 +223,7 @@ extern PRStatus _MD_CloseSharedMemory( PRSharedMemory *shm )
if ( FALSE == wrc )
{
_PR_MD_MAP_DEFAULT_ERROR( GetLastError());
- PR_LOG( _pr_shm_lm, PR_LOG_ERROR,
+ PR_LOG( _pr_shm_lm, PR_LOG_ERROR,
("_MD_CloseSharedMemory: CloseHandle() failed. OSerror: %d", PR_GetOSError()));
rc = PR_FAILURE;
}
@@ -236,7 +236,7 @@ extern PRStatus _MD_CloseSharedMemory( PRSharedMemory *shm )
extern PRStatus _MD_DeleteSharedMemory( const char *name )
{
return( PR_SUCCESS );
-}
+}
/*
@@ -244,7 +244,7 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name )
*/
extern PRLogModuleInfo *_pr_shma_lm;
-extern PRFileMap* _md_OpenAnonFileMap(
+extern PRFileMap* _md_OpenAnonFileMap(
const char *dirName,
PRSize size,
PRFileMapProtect prot
@@ -280,7 +280,7 @@ extern PRFileMap* _md_OpenAnonFileMap(
CloseHandle(fm->md.hFileMap);
fm->md.hFileMap = hFileMap;
-Finished:
+Finished:
return(fm);
} /* end md_OpenAnonFileMap() */
@@ -302,7 +302,7 @@ extern PRStatus _md_ExportFileMapAsString(
PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
("_md_ExportFileMapAsString(): prot: %x, hFileMap: %x, dwAccess: %x",
fm->prot, fm->md.hFileMap, fm->md.dwAccess ));
-
+
return((written == -1)? PR_FAILURE : PR_SUCCESS);
} /* end _md_ExportFileMapAsString() */
@@ -342,6 +342,6 @@ extern PRFileMap * _md_ImportFileMapFromString(
} /* end _md_ImportFileMapFromString() */
#else
-Error! Why is PR_HAVE_WIN32_NAMED_SHARED_MEMORY not defined?
+Error! Why is PR_HAVE_WIN32_NAMED_SHARED_MEMORY not defined?
#endif /* PR_HAVE_WIN32_NAMED_SHARED_MEMORY */
/* --- end w32shm.c --- */
diff --git a/pr/src/md/windows/w95cv.c b/pr/src/md/windows/w95cv.c
index 27b34e69..42a43ae5 100644
--- a/pr/src/md/windows/w95cv.c
+++ b/pr/src/md/windows/w95cv.c
@@ -16,7 +16,7 @@
* until right after we unlock the lock. This way the awakened threads
* have a better chance to reaquire the lock.
*/
-
+
#include "primpl.h"
/*
@@ -78,7 +78,7 @@ md_UnlockAndPostNotifies(
lock->notified.link = NULL;
#endif
- /*
+ /*
* Figure out how many threads we need to wake up.
*/
notified = &post; /* this is where we start */
@@ -87,7 +87,7 @@ md_UnlockAndPostNotifies(
_MDCVar *cv = notified->cv[index].cv;
PRThread *thred;
int i;
-
+
/* Fast special case: no waiting threads */
if (cv->waitHead == NULL) {
notified->cv[index].notifyHead = NULL;
@@ -207,7 +207,7 @@ static void md_PostNotifyToCvar(_MDCVar *cvar, _MDLock *lock,
* 0 when it succeeds.
*
*/
-PRInt32
+PRInt32
_PR_MD_NEW_CV(_MDCVar *cv)
{
cv->magic = _MD_MAGIC_CV;
@@ -216,7 +216,7 @@ _PR_MD_NEW_CV(_MDCVar *cv)
* when the PRCondVar structure is created.
*/
return 0;
-}
+}
void _PR_MD_FREE_CV(_MDCVar *cv)
{
diff --git a/pr/src/md/windows/w95io.c b/pr/src/md/windows/w95io.c
index 9bae6f8d..07a19458 100644
--- a/pr/src/md/windows/w95io.c
+++ b/pr/src/md/windows/w95io.c
@@ -86,7 +86,7 @@ _PR_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
PRUint32 msecs = (ticks == PR_INTERVAL_NO_TIMEOUT) ?
INFINITE : PR_IntervalToMilliseconds(ticks);
rv = WaitForSingleObject(thread->md.blocked_sema, msecs);
- switch(rv)
+ switch(rv)
{
case WAIT_OBJECT_0:
return PR_SUCCESS;
@@ -116,7 +116,7 @@ _PR_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
PRStatus
_PR_MD_WAKEUP_WAITER(PRThread *thread)
{
- if ( _PR_IS_NATIVE_THREAD(thread) )
+ if ( _PR_IS_NATIVE_THREAD(thread) )
{
if (ReleaseSemaphore(thread->md.blocked_sema, 1, NULL) == FALSE)
return PR_FAILURE;
@@ -135,7 +135,7 @@ _PR_MD_WAKEUP_WAITER(PRThread *thread)
* The NSPR open flags (osflags) are translated into flags for Win95
*
* Mode seems to be passed in as a unix style file permissions argument
- * as in 0666, in the case of opening the logFile.
+ * as in 0666, in the case of opening the logFile.
*
*/
PROsfd
@@ -145,9 +145,9 @@ _PR_MD_OPEN(const char *name, PRIntn osflags, int mode)
PRInt32 access = 0;
PRInt32 flags = 0;
PRInt32 flag6 = 0;
-
+
if (osflags & PR_SYNC) flag6 = FILE_FLAG_WRITE_THROUGH;
-
+
if (osflags & PR_RDONLY || osflags & PR_RDWR)
access |= GENERIC_READ;
if (osflags & PR_WRONLY || osflags & PR_RDWR)
@@ -176,7 +176,7 @@ _PR_MD_OPEN(const char *name, PRIntn osflags, int mode)
NULL);
if (file == INVALID_HANDLE_VALUE) {
_PR_MD_MAP_OPEN_ERROR(GetLastError());
- return -1;
+ return -1;
}
return (PROsfd)file;
@@ -203,9 +203,9 @@ _PR_MD_OPEN_FILE(const char *name, PRIntn osflags, int mode)
lpSA = &sa;
}
}
-
+
if (osflags & PR_SYNC) flag6 = FILE_FLAG_WRITE_THROUGH;
-
+
if (osflags & PR_RDONLY || osflags & PR_RDWR)
access |= GENERIC_READ;
if (osflags & PR_WRONLY || osflags & PR_RDWR)
@@ -237,7 +237,7 @@ _PR_MD_OPEN_FILE(const char *name, PRIntn osflags, int mode)
}
if (file == INVALID_HANDLE_VALUE) {
_PR_MD_MAP_OPEN_ERROR(GetLastError());
- return -1;
+ return -1;
}
return (PROsfd)file;
@@ -254,8 +254,8 @@ _PR_MD_READ(PRFileDesc *fd, void *buf, PRInt32 len)
len,
&bytes,
NULL);
-
- if (rv == 0)
+
+ if (rv == 0)
{
err = GetLastError();
/* ERROR_HANDLE_EOF can only be returned by async io */
@@ -276,14 +276,14 @@ _PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 len)
PROsfd f = fd->secret->md.osfd;
PRInt32 bytes;
int rv;
-
+
rv = WriteFile((HANDLE)f,
buf,
len,
&bytes,
NULL );
-
- if (rv == 0)
+
+ if (rv == 0)
{
_PR_MD_MAP_WRITE_ERROR(GetLastError());
return -1;
@@ -399,7 +399,7 @@ PRInt32
_MD_CloseFile(PROsfd osfd)
{
PRInt32 rv;
-
+
rv = (CloseHandle((HANDLE)osfd))?0:-1;
if (rv == -1)
_PR_MD_MAP_CLOSE_ERROR(GetLastError());
@@ -723,7 +723,7 @@ _PR_MD_GETFILEINFO64(const char *fn, PRFileInfo64 *info)
{
WIN32_FILE_ATTRIBUTE_DATA findFileData;
BOOL rv;
-
+
if (NULL == fn || '\0' == *fn) {
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
return -1;
@@ -832,7 +832,7 @@ _PR_MD_SET_FD_INHERITABLE(PRFileDesc *fd, PRBool inheritable)
return PR_FAILURE;
}
return PR_SUCCESS;
-}
+}
void
_PR_MD_INIT_FD_INHERITABLE(PRFileDesc *fd, PRBool imported)
@@ -953,7 +953,7 @@ _PR_MD_LOCKFILE(PROsfd f)
rv = LockFile( (HANDLE)f,
0l, 0l,
- 0x0l, 0xffffffffl );
+ 0x0l, 0xffffffffl );
if ( rv == 0 ) {
DWORD err = GetLastError();
_PR_MD_MAP_DEFAULT_ERROR(err);
@@ -977,11 +977,11 @@ PRStatus
_PR_MD_UNLOCKFILE(PROsfd f)
{
PRInt32 rv;
-
+
rv = UnlockFile( (HANDLE) f,
0l, 0l,
- 0x0l, 0xffffffffl );
-
+ 0x0l, 0xffffffffl );
+
if ( rv )
{
return PR_SUCCESS;
@@ -1059,7 +1059,7 @@ _PR_MD_OPEN_FILE_UTF16(const PRUnichar *name, PRIntn osflags, int mode)
access |= GENERIC_READ;
if (osflags & PR_WRONLY || osflags & PR_RDWR)
access |= GENERIC_WRITE;
-
+
if ( osflags & PR_CREATE_FILE && osflags & PR_EXCL )
flags = CREATE_NEW;
else if (osflags & PR_CREATE_FILE) {
@@ -1088,10 +1088,10 @@ _PR_MD_OPEN_FILE_UTF16(const PRUnichar *name, PRIntn osflags, int mode)
_PR_MD_MAP_OPEN_ERROR(GetLastError());
return -1;
}
-
+
return (PROsfd)file;
}
-
+
PRStatus
_PR_MD_OPEN_DIR_UTF16(_MDDirUTF16 *d, const PRUnichar *name)
{
@@ -1164,7 +1164,7 @@ _PR_MD_READ_DIR_UTF16(_MDDirUTF16 *d, PRIntn flags)
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
return NULL;
}
-
+
PRInt32
_PR_MD_CLOSE_DIR_UTF16(_MDDirUTF16 *d)
{
@@ -1312,7 +1312,7 @@ _PR_MD_GETFILEINFO64_UTF16(const PRUnichar *fn, PRFileInfo64 *info)
if (NULL == wcspbrk(fn, L".\\/")) {
_PR_MD_MAP_OPENDIR_ERROR(GetLastError());
return -1;
- }
+ }
len = getFullPathNameW(fn, sizeof(pathbuf)/sizeof(pathbuf[0]), pathbuf,
&filePart);
if (0 == len) {
diff --git a/pr/src/md/windows/w95sock.c b/pr/src/md/windows/w95sock.c
index c6a3ec11..10423e98 100644
--- a/pr/src/md/windows/w95sock.c
+++ b/pr/src/md/windows/w95sock.c
@@ -14,7 +14,7 @@
#define CONNECT_FD 3
static PRInt32 socket_io_wait(
- PROsfd osfd,
+ PROsfd osfd,
PRInt32 fd_type,
PRIntervalTime timeout);
@@ -51,7 +51,7 @@ _PR_MD_SOCKET(int af, int type, int flags)
sock = socket(af, type, flags);
- if (sock == INVALID_SOCKET )
+ if (sock == INVALID_SOCKET )
{
_PR_MD_MAP_SOCKET_ERROR(WSAGetLastError());
return (PROsfd)sock;
@@ -120,8 +120,8 @@ _MD_SocketAvailable(PRFileDesc *fd)
}
PROsfd _MD_Accept(
- PRFileDesc *fd,
- PRNetAddr *raddr,
+ PRFileDesc *fd,
+ PRNetAddr *raddr,
PRUint32 *rlen,
PRIntervalTime timeout )
{
@@ -129,7 +129,7 @@ PROsfd _MD_Accept(
SOCKET sock;
PRInt32 rv, err;
- while ((sock = accept(osfd, (struct sockaddr *) raddr, rlen)) == -1)
+ while ((sock = accept(osfd, (struct sockaddr *) raddr, rlen)) == -1)
{
err = WSAGetLastError();
if ((err == WSAEWOULDBLOCK) && (!fd->secret->nonblocking))
@@ -149,14 +149,14 @@ PROsfd _MD_Accept(
} /* end _MD_accept() */
PRInt32
-_PR_MD_CONNECT(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen,
+_PR_MD_CONNECT(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen,
PRIntervalTime timeout)
{
PROsfd osfd = fd->secret->md.osfd;
PRInt32 rv;
int err;
- if ((rv = connect(osfd, (struct sockaddr *) addr, addrlen)) == -1)
+ if ((rv = connect(osfd, (struct sockaddr *) addr, addrlen)) == -1)
{
err = WSAGetLastError();
if ((!fd->secret->nonblocking) && (err == WSAEWOULDBLOCK))
@@ -171,7 +171,7 @@ _PR_MD_CONNECT(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen,
PR_ASSERT(rv > 0);
/* it's connected */
return(0);
- }
+ }
}
_PR_MD_MAP_CONNECT_ERROR(err);
}
@@ -209,7 +209,7 @@ _PR_MD_LISTEN(PRFileDesc *fd, PRIntn backlog)
}
PRInt32
-_PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
+_PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
PRIntervalTime timeout)
{
PROsfd osfd = fd->secret->md.osfd;
@@ -222,18 +222,18 @@ _PR_MD_RECV(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
PR_ASSERT(PR_MSG_PEEK == flags);
osflags = MSG_PEEK;
}
- while ((rv = recv( osfd, buf, amount, osflags)) == -1)
+ while ((rv = recv( osfd, buf, amount, osflags)) == -1)
{
- if (((err = WSAGetLastError()) == WSAEWOULDBLOCK)
+ if (((err = WSAGetLastError()) == WSAEWOULDBLOCK)
&& (!fd->secret->nonblocking))
{
rv = socket_io_wait(osfd, READ_FD, timeout);
if ( rv < 0 )
{
return -1;
- }
- }
- else
+ }
+ }
+ else
{
_PR_MD_MAP_RECV_ERROR(err);
break;
@@ -250,11 +250,11 @@ _PR_MD_SEND(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
PRInt32 rv, err;
PRInt32 bytesSent = 0;
- while(bytesSent < amount )
+ while(bytesSent < amount )
{
- while ((rv = send( osfd, buf, amount, 0 )) == -1)
+ while ((rv = send( osfd, buf, amount, 0 )) == -1)
{
- if (((err = WSAGetLastError()) == WSAEWOULDBLOCK)
+ if (((err = WSAGetLastError()) == WSAEWOULDBLOCK)
&& (!fd->secret->nonblocking))
{
rv = socket_io_wait(osfd, WRITE_FD, timeout);
@@ -262,8 +262,8 @@ _PR_MD_SEND(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
{
return -1;
}
- }
- else
+ }
+ else
{
_PR_MD_MAP_SEND_ERROR(err);
return -1;
@@ -274,7 +274,7 @@ _PR_MD_SEND(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
{
break;
}
- if (bytesSent < amount)
+ if (bytesSent < amount)
{
rv = socket_io_wait(osfd, WRITE_FD, timeout);
if ( rv < 0 )
@@ -296,9 +296,9 @@ _PR_MD_SENDTO(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
do {
while ((rv = sendto( osfd, buf, amount, 0, (struct sockaddr *) addr,
- addrlen)) == -1)
+ addrlen)) == -1)
{
- if (((err = WSAGetLastError()) == WSAEWOULDBLOCK)
+ if (((err = WSAGetLastError()) == WSAEWOULDBLOCK)
&& (!fd->secret->nonblocking))
{
rv = socket_io_wait(osfd, WRITE_FD, timeout);
@@ -306,8 +306,8 @@ _PR_MD_SENDTO(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
{
return -1;
}
- }
- else
+ }
+ else
{
_PR_MD_MAP_SENDTO_ERROR(err);
return -1;
@@ -318,10 +318,10 @@ _PR_MD_SENDTO(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
{
break;
}
- if (bytesSent < amount)
+ if (bytesSent < amount)
{
rv = socket_io_wait(osfd, WRITE_FD, timeout);
- if (rv < 0)
+ if (rv < 0)
{
return -1;
}
@@ -510,18 +510,18 @@ _PR_MD_RECVFROM(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
PRInt32 rv, err;
while ((rv = recvfrom( osfd, buf, amount, 0, (struct sockaddr *) addr,
- addrlen)) == -1)
+ addrlen)) == -1)
{
- if (((err = WSAGetLastError()) == WSAEWOULDBLOCK)
+ if (((err = WSAGetLastError()) == WSAEWOULDBLOCK)
&& (!fd->secret->nonblocking))
{
rv = socket_io_wait(osfd, READ_FD, timeout);
if ( rv < 0)
{
return -1;
- }
- }
- else
+ }
+ }
+ else
{
_PR_MD_MAP_RECVFROM_ERROR(err);
break;
@@ -537,12 +537,12 @@ _PR_MD_WRITEV(PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size, PRIntervalTi
int sent = 0;
int rv;
- for (index=0; index < iov_size; index++)
+ for (index=0; index < iov_size; index++)
{
rv = _PR_MD_SEND(fd, iov[index].iov_base, iov[index].iov_len, 0, timeout);
- if (rv > 0)
+ if (rv > 0)
sent += rv;
- if ( rv != iov[index].iov_len )
+ if ( rv != iov[index].iov_len )
{
if (rv < 0)
{
@@ -651,7 +651,7 @@ _MD_MakeNonblock(PRFileDesc *f)
#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5
static PRInt32 socket_io_wait(
- PROsfd osfd,
+ PROsfd osfd,
PRInt32 fd_type,
PRIntervalTime timeout)
{
@@ -710,7 +710,7 @@ static PRInt32 socket_io_wait(
len = sizeof(err);
if (getsockopt(osfd, SOL_SOCKET, SO_ERROR,
(char *) &err, &len) == SOCKET_ERROR)
- {
+ {
_PR_MD_MAP_GETSOCKOPT_ERROR(WSAGetLastError());
return -1;
}
@@ -790,7 +790,7 @@ static PRInt32 socket_io_wait(
len = sizeof(err);
if (getsockopt(osfd, SOL_SOCKET, SO_ERROR,
(char *) &err, &len) == SOCKET_ERROR)
- {
+ {
_PR_MD_MAP_GETSOCKOPT_ERROR(WSAGetLastError());
return -1;
}
@@ -822,7 +822,7 @@ static PRInt32 socket_io_wait(
if (wait_for_remaining) {
elapsed = remaining;
} else {
- elapsed = PR_SecondsToInterval(tv.tv_sec)
+ elapsed = PR_SecondsToInterval(tv.tv_sec)
+ PR_MicrosecondsToInterval(tv.tv_usec);
}
if (elapsed >= remaining) {
diff --git a/pr/src/md/windows/w95thred.c b/pr/src/md/windows/w95thred.c
index a365411f..5b5a5a89 100644
--- a/pr/src/md/windows/w95thred.c
+++ b/pr/src/md/windows/w95thred.c
@@ -25,7 +25,7 @@ DWORD _pr_currentThreadIndex;
DWORD _pr_lastThreadIndex;
DWORD _pr_currentCPUIndex;
#endif
-int _pr_intsOff = 0;
+int _pr_intsOff = 0;
_PRInterruptTable _pr_interruptTable[] = { { 0 } };
typedef HRESULT (WINAPI *SETTHREADDESCRIPTION)(HANDLE, PCWSTR);
@@ -138,12 +138,12 @@ pr_root(void *arg)
return 0;
}
-PRStatus
-_PR_MD_CREATE_THREAD(PRThread *thread,
- void (*start)(void *),
- PRThreadPriority priority,
- PRThreadScope scope,
- PRThreadState state,
+PRStatus
+_PR_MD_CREATE_THREAD(PRThread *thread,
+ void (*start)(void *),
+ PRThreadPriority priority,
+ PRThreadScope scope,
+ PRThreadState state,
PRUint32 stackSize)
{
@@ -175,14 +175,14 @@ _PR_MD_CREATE_THREAD(PRThread *thread,
return PR_FAILURE;
}
-void
+void
_PR_MD_YIELD(void)
{
/* Can NT really yield at all? */
Sleep(0);
}
-void
+void
_PR_MD_SET_PRIORITY(_MDThread *thread, PRThreadPriority newPri)
{
int nativePri;
@@ -325,8 +325,8 @@ PRInt32 _PR_MD_GETTHREADAFFINITYMASK(PRThread *thread, PRUint32 *mask)
#endif
}
-void
-_PR_MD_SUSPEND_CPU(_PRCPU *cpu)
+void
+_PR_MD_SUSPEND_CPU(_PRCPU *cpu)
{
_PR_MD_SUSPEND_THREAD(cpu->thread);
}
diff --git a/pr/src/md/windows/win32_errors.c b/pr/src/md/windows/win32_errors.c
index 27579218..b0118146 100644
--- a/pr/src/md/windows/win32_errors.c
+++ b/pr/src/md/windows/win32_errors.c
@@ -13,7 +13,7 @@
* - GetLastError(): for Win32 functions
* - WSAGetLastError(): for Winsock functions
* - errno: for standard C library functions
- *
+ *
* GetLastError() and WSAGetLastError() return error codes in
* non-overlapping ranges, so their error codes (ERROR_* and
* WSAE*) can be mapped by the same function. On the other hand,
@@ -61,7 +61,7 @@ void _MD_win32_map_default_error(PRInt32 err)
prError = PR_NOT_IMPLEMENTED_ERROR;
break;
case ERROR_DISK_CORRUPT:
- prError = PR_IO_ERROR;
+ prError = PR_IO_ERROR;
break;
case ERROR_DISK_FULL:
prError = PR_NO_DEVICE_SPACE_ERROR;
@@ -518,7 +518,7 @@ void _MD_win32_map_gethostname_error(PRInt32 err)
}
/* Win32 select() only works on sockets. So in this
-** context, WSAENOTSOCK is equivalent to EBADF on Unix.
+** context, WSAENOTSOCK is equivalent to EBADF on Unix.
*/
void _MD_win32_map_select_error(PRInt32 err)
{
diff --git a/pr/src/memory/prshm.c b/pr/src/memory/prshm.c
index 59237e6e..cce64d2a 100644
--- a/pr/src/memory/prshm.c
+++ b/pr/src/memory/prshm.c
@@ -20,39 +20,39 @@ extern PRLogModuleInfo *_pr_shm_lm;
/* Posix implementation is in pr/src/md/unix/uxshm.c */
#elif defined PR_HAVE_WIN32_NAMED_SHARED_MEMORY
/* Win32 implementation is in pr/src/md/windows/w32shm.c */
-#else
-/*
-** there is no named_shared_memory
+#else
+/*
+** there is no named_shared_memory
*/
extern PRSharedMemory* _MD_OpenSharedMemory( const char *name, PRSize size, PRIntn flags, PRIntn mode )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return NULL;
-}
+}
extern void * _MD_AttachSharedMemory( PRSharedMemory *shm, PRIntn flags )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return NULL;
-}
+}
extern PRStatus _MD_DetachSharedMemory( PRSharedMemory *shm, void *addr )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return PR_FAILURE;
-}
+}
extern PRStatus _MD_CloseSharedMemory( PRSharedMemory *shm )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return PR_FAILURE;
-}
+}
extern PRStatus _MD_DeleteSharedMemory( const char *name )
{
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return PR_FAILURE;
-}
+}
#endif /* HAVE_SYSV_NAMED_SHARED_MEMORY */
/*
diff --git a/pr/src/memory/prshma.c b/pr/src/memory/prshma.c
index c73d7ec1..830b6df5 100644
--- a/pr/src/memory/prshma.c
+++ b/pr/src/memory/prshma.c
@@ -6,7 +6,7 @@
/*
** prshma.h -- NSPR Anonymous Shared Memory
**
-**
+**
*/
#include "primpl.h"
@@ -42,7 +42,7 @@ extern PRFileMap * _PR_MD_IMPORT_FILE_MAP_FROM_STRING(const char *fmstring)
PR_IMPLEMENT(PRFileMap*)
PR_OpenAnonFileMap(
const char *dirName,
- PRSize size,
+ PRSize size,
PRFileMapProtect prot
)
{
@@ -50,21 +50,21 @@ PR_OpenAnonFileMap(
} /* end PR_OpenAnonFileMap() */
/*
-** PR_ProcessAttrSetInheritableFileMap() -- Prepare FileMap for export
+** PR_ProcessAttrSetInheritableFileMap() -- Prepare FileMap for export
** to my children processes via PR_CreateProcess()
**
**
*/
-PR_IMPLEMENT( PRStatus)
-PR_ProcessAttrSetInheritableFileMap(
+PR_IMPLEMENT( PRStatus)
+PR_ProcessAttrSetInheritableFileMap(
PRProcessAttr *attr,
- PRFileMap *fm,
+ PRFileMap *fm,
const char *shmname
)
{
PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 );
return( PR_FAILURE);
-} /* end PR_ProcessAttrSetInheritableFileMap() */
+} /* end PR_ProcessAttrSetInheritableFileMap() */
/*
** PR_GetInheritedFileMap() -- Import a PRFileMap previously exported
@@ -72,8 +72,8 @@ PR_ProcessAttrSetInheritableFileMap(
**
*/
PR_IMPLEMENT( PRFileMap *)
-PR_GetInheritedFileMap(
- const char *shmname
+PR_GetInheritedFileMap(
+ const char *shmname
)
{
PRFileMap *fm = NULL;
@@ -86,7 +86,7 @@ PR_GetInheritedFileMap(
**
*/
PR_IMPLEMENT( PRStatus )
-PR_ExportFileMapAsString(
+PR_ExportFileMapAsString(
PRFileMap *fm,
PRSize bufSize,
char *buf
@@ -101,7 +101,7 @@ PR_ExportFileMapAsString(
**
*/
PR_IMPLEMENT( PRFileMap * )
-PR_ImportFileMapFromString(
+PR_ImportFileMapFromString(
const char *fmstring
)
{
diff --git a/pr/src/misc/pralarm.c b/pr/src/misc/pralarm.c
index 8f642bb1..907277ef 100644
--- a/pr/src/misc/pralarm.c
+++ b/pr/src/misc/pralarm.c
@@ -50,9 +50,9 @@ static PRAlarmID *pr_getNextAlarm(PRAlarm *alarm, PRAlarmID *id)
PRIntervalTime now = PR_IntervalNow();
if (!PR_CLIST_IS_EMPTY(&alarm->timers))
- {
+ {
if (id != NULL) /* have to put this id back in */
- {
+ {
PRIntervalTime idDelta = now - id->nextNotify;
timer = alarm->timers.next;
do
diff --git a/pr/src/misc/pratom.c b/pr/src/misc/pratom.c
index 65e6f3cd..7662ef36 100644
--- a/pr/src/misc/pratom.c
+++ b/pr/src/misc/pratom.c
@@ -88,7 +88,7 @@ int index;
if (num_atomic_locks > MAX_ATOMIC_LOCKS)
num_atomic_locks = MAX_ATOMIC_LOCKS;
- else if (num_atomic_locks < 1)
+ else if (num_atomic_locks < 1)
num_atomic_locks = 1;
else {
num_atomic_locks = PR_FloorLog2(num_atomic_locks);
@@ -101,7 +101,7 @@ int index;
if (pthread_mutex_init(&atomic_locks[index], NULL)) {
PR_DELETE(atomic_locks);
atomic_locks = NULL;
- break;
+ break;
}
}
}
@@ -328,7 +328,7 @@ PRStack *stack;
#endif /* !_PR_HAVE_ATOMIC_CAS */
stack->prstk_head.prstk_elem_next = NULL;
-
+
return stack;
}
diff --git a/pr/src/misc/praton.c b/pr/src/misc/praton.c
index 80c0628c..c9668700 100644
--- a/pr/src/misc/praton.c
+++ b/pr/src/misc/praton.c
@@ -10,7 +10,7 @@
/*
* Copyright (c) 1983, 1990, 1993
* The Regents of the University of California. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -22,7 +22,7 @@
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -38,14 +38,14 @@
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
diff --git a/pr/src/misc/prcountr.c b/pr/src/misc/prcountr.c
index 0f126ad0..edd57122 100644
--- a/pr/src/misc/prcountr.c
+++ b/pr/src/misc/prcountr.c
@@ -10,16 +10,16 @@
**
** Design Notes:
**
-** The Counter Facility (CF) has a single anchor: qNameList.
+** The Counter Facility (CF) has a single anchor: qNameList.
** The anchor is a PRCList. qNameList is a list of links in QName
** structures. From qNameList any QName structure and its
-** associated RName structure can be located.
-**
+** associated RName structure can be located.
+**
** For each QName, a list of RName structures is anchored at
** rnLink in the QName structure.
-**
+**
** The counter itself is embedded in the RName structure.
-**
+**
** For manipulating the counter database, single lock is used to
** protect the entire list: counterLock.
**
@@ -29,7 +29,7 @@
** "overloaded" for traversing the QName structures; only the
** function PR_FindNextQnameHandle() uses this overloading.
**
-**
+**
** ToDo (lth): decide on how to lock or atomically update
** individual counters. Candidates are: the global lock; a lock
** per RName structure; Atomic operations (Note that there are
@@ -64,9 +64,9 @@ typedef struct RName
PRCList link;
QName *qName;
PRLock *lock;
- volatile PRUint32 counter;
- char name[PRCOUNTER_NAME_MAX+1];
- char desc[PRCOUNTER_DESC_MAX+1];
+ volatile PRUint32 counter;
+ char name[PRCOUNTER_NAME_MAX+1];
+ char desc[PRCOUNTER_DESC_MAX+1];
} RName;
@@ -87,7 +87,7 @@ static void _PR_CounterInitialize( void )
** This function should be called only once
*/
PR_ASSERT( counterLock == NULL );
-
+
counterLock = PR_NewLock();
PR_INIT_CLIST( &qNameList );
lm = PR_NewLogModule("counters");
@@ -111,12 +111,12 @@ static void _PR_CounterInitialize( void )
** Unlock
**
*/
-PR_IMPLEMENT(PRCounterHandle)
- PR_CreateCounter(
- const char *qName,
- const char *rName,
- const char *description
-)
+PR_IMPLEMENT(PRCounterHandle)
+ PR_CreateCounter(
+ const char *qName,
+ const char *rName,
+ const char *description
+)
{
QName *qnp;
RName *rnp;
@@ -157,10 +157,10 @@ PR_IMPLEMENT(PRCounterHandle)
{
qnp = PR_NEWZAP( QName );
PR_ASSERT( qnp != NULL );
- PR_INIT_CLIST( &qnp->link );
- PR_INIT_CLIST( &qnp->rNameList );
+ PR_INIT_CLIST( &qnp->link );
+ PR_INIT_CLIST( &qnp->rNameList );
strcpy( qnp->name, qName );
- PR_APPEND_LINK( &qnp->link, &qNameList );
+ PR_APPEND_LINK( &qnp->link, &qNameList );
}
/* Do we already have a matching RName? */
@@ -189,7 +189,7 @@ PR_IMPLEMENT(PRCounterHandle)
PR_ASSERT(0);
}
- PR_APPEND_LINK( &rnp->link, &qnp->rNameList ); /* add RName to QName's rnList */
+ PR_APPEND_LINK( &rnp->link, &qnp->rNameList ); /* add RName to QName's rnList */
rnp->qName = qnp; /* point the RName to the QName */
/* Unlock the Facility */
@@ -199,20 +199,20 @@ PR_IMPLEMENT(PRCounterHandle)
return((PRCounterHandle)rnp);
} /* end PR_CreateCounter() */
-
+
/*
**
*/
-PR_IMPLEMENT(void)
- PR_DestroyCounter(
- PRCounterHandle handle
+PR_IMPLEMENT(void)
+ PR_DestroyCounter(
+ PRCounterHandle handle
)
{
RName *rnp = (RName *)handle;
QName *qnp = rnp->qName;
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Deleting: QName: %s, RName: %s",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Deleting: QName: %s, RName: %s",
qnp->name, rnp->name));
/* Lock the Facility */
@@ -222,7 +222,7 @@ PR_IMPLEMENT(void)
** Remove RName from the list of RNames in QName
** and free RName
*/
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Deleting RName: %s, %p",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Deleting RName: %s, %p",
rnp->name, rnp));
PR_REMOVE_LINK( &rnp->link );
PR_Free( rnp->lock );
@@ -234,11 +234,11 @@ PR_IMPLEMENT(void)
*/
if ( PR_CLIST_IS_EMPTY( &qnp->rNameList ) )
{
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Deleting unused QName: %s, %p",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Deleting unused QName: %s, %p",
qnp->name, qnp));
PR_REMOVE_LINK( &qnp->link );
PR_DELETE( qnp );
- }
+ }
/* Unlock the Facility */
PR_Unlock( counterLock );
@@ -248,10 +248,10 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(PRCounterHandle)
- PR_GetCounterHandleFromName(
- const char *qName,
- const char *rName
+PR_IMPLEMENT(PRCounterHandle)
+ PR_GetCounterHandleFromName(
+ const char *qName,
+ const char *rName
)
{
const char *qn, *rn, *desc;
@@ -287,12 +287,12 @@ foundIt:
/*
**
*/
-PR_IMPLEMENT(void)
- PR_GetCounterNameFromHandle(
- PRCounterHandle handle,
- const char **qName,
- const char **rName,
- const char **description
+PR_IMPLEMENT(void)
+ PR_GetCounterNameFromHandle(
+ PRCounterHandle handle,
+ const char **qName,
+ const char **rName,
+ const char **description
)
{
RName *rnp = (RName *)handle;
@@ -303,7 +303,7 @@ PR_IMPLEMENT(void)
*description = rnp->desc;
PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: GetConterNameFromHandle: "
- "QNp: %p, RNp: %p,\n\tQName: %s, RName: %s, Desc: %s",
+ "QNp: %p, RNp: %p,\n\tQName: %s, RName: %s, Desc: %s",
qnp, rnp, qnp->name, rnp->name, rnp->desc ));
return;
@@ -313,8 +313,8 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(void)
- PR_IncrementCounter(
+PR_IMPLEMENT(void)
+ PR_IncrementCounter(
PRCounterHandle handle
)
{
@@ -322,7 +322,7 @@ PR_IMPLEMENT(void)
((RName *)handle)->counter++;
PR_Unlock(((RName *)handle)->lock);
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Increment: %p, %ld",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Increment: %p, %ld",
handle, ((RName *)handle)->counter ));
return;
@@ -333,8 +333,8 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(void)
- PR_DecrementCounter(
+PR_IMPLEMENT(void)
+ PR_DecrementCounter(
PRCounterHandle handle
)
{
@@ -342,7 +342,7 @@ PR_IMPLEMENT(void)
((RName *)handle)->counter--;
PR_Unlock(((RName *)handle)->lock);
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Decrement: %p, %ld",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: Decrement: %p, %ld",
handle, ((RName *)handle)->counter ));
return;
@@ -352,17 +352,17 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(void)
- PR_AddToCounter(
- PRCounterHandle handle,
- PRUint32 value
+PR_IMPLEMENT(void)
+ PR_AddToCounter(
+ PRCounterHandle handle,
+ PRUint32 value
)
{
PR_Lock(((RName *)handle)->lock);
((RName *)handle)->counter += value;
PR_Unlock(((RName *)handle)->lock);
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: AddToCounter: %p, %ld",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: AddToCounter: %p, %ld",
handle, ((RName *)handle)->counter ));
return;
@@ -372,17 +372,17 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(void)
- PR_SubtractFromCounter(
- PRCounterHandle handle,
- PRUint32 value
+PR_IMPLEMENT(void)
+ PR_SubtractFromCounter(
+ PRCounterHandle handle,
+ PRUint32 value
)
{
PR_Lock(((RName *)handle)->lock);
((RName *)handle)->counter -= value;
PR_Unlock(((RName *)handle)->lock);
-
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: SubtractFromCounter: %p, %ld",
+
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: SubtractFromCounter: %p, %ld",
handle, ((RName *)handle)->counter ));
return;
@@ -391,12 +391,12 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(PRUint32)
- PR_GetCounter(
- PRCounterHandle handle
+PR_IMPLEMENT(PRUint32)
+ PR_GetCounter(
+ PRCounterHandle handle
)
{
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: GetCounter: %p, %ld",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: GetCounter: %p, %ld",
handle, ((RName *)handle)->counter ));
return(((RName *)handle)->counter);
@@ -405,15 +405,15 @@ PR_IMPLEMENT(PRUint32)
/*
**
*/
-PR_IMPLEMENT(void)
- PR_SetCounter(
- PRCounterHandle handle,
- PRUint32 value
+PR_IMPLEMENT(void)
+ PR_SetCounter(
+ PRCounterHandle handle,
+ PRUint32 value
)
{
((RName *)handle)->counter = value;
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: SetCounter: %p, %ld",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: SetCounter: %p, %ld",
handle, ((RName *)handle)->counter ));
return;
@@ -422,8 +422,8 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(PRCounterHandle)
- PR_FindNextCounterQname(
+PR_IMPLEMENT(PRCounterHandle)
+ PR_FindNextCounterQname(
PRCounterHandle handle
)
{
@@ -435,10 +435,10 @@ PR_IMPLEMENT(PRCounterHandle)
qnp = (QName *)PR_LIST_HEAD( &qNameList );
else if ( PR_NEXT_LINK( &qnp->link ) == &qNameList )
qnp = NULL;
- else
+ else
qnp = (QName *)PR_NEXT_LINK( &qnp->link );
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: FindNextQname: Handle: %p, Returns: %p",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: FindNextQname: Handle: %p, Returns: %p",
handle, qnp ));
return((PRCounterHandle)qnp);
@@ -448,10 +448,10 @@ PR_IMPLEMENT(PRCounterHandle)
/*
**
*/
-PR_IMPLEMENT(PRCounterHandle)
- PR_FindNextCounterRname(
- PRCounterHandle rhandle,
- PRCounterHandle qhandle
+PR_IMPLEMENT(PRCounterHandle)
+ PR_FindNextCounterRname(
+ PRCounterHandle rhandle,
+ PRCounterHandle qhandle
)
{
RName *rnp = (RName *)rhandle;
@@ -467,7 +467,7 @@ PR_IMPLEMENT(PRCounterHandle)
else
rnp = (RName *)PR_NEXT_LINK( &rnp->link );
- PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: FindNextRname: Rhandle: %p, QHandle: %p, Returns: %p",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PR_Counter: FindNextRname: Rhandle: %p, QHandle: %p, Returns: %p",
rhandle, qhandle, rnp ));
return((PRCounterHandle)rnp);
diff --git a/pr/src/misc/prdtoa.c b/pr/src/misc/prdtoa.c
index 22769261..c3423286 100644
--- a/pr/src/misc/prdtoa.c
+++ b/pr/src/misc/prdtoa.c
@@ -3424,7 +3424,7 @@ PR_dtoa(PRFloat64 d, PRIntn mode, PRIntn ndigits,
rv = PR_SUCCESS;
}
freedtoa(result);
- return rv;
+ return rv;
}
/*
@@ -3432,7 +3432,7 @@ PR_dtoa(PRFloat64 d, PRIntn mode, PRIntn ndigits,
** prcsn - number of digits of precision to generate floating
** point value.
** This should be reparameterized so that you can send in a
-** prcn for the positive and negative ranges. For now,
+** prcn for the positive and negative ranges. For now,
** conform to the ECMA JavaScript spec which says numbers
** less than 1e-6 are in scientific notation.
** Also, the ECMA spec says that there should always be a
diff --git a/pr/src/misc/prerrortable.c b/pr/src/misc/prerrortable.c
index 285fde97..7ce11d81 100644
--- a/pr/src/misc/prerrortable.c
+++ b/pr/src/misc/prerrortable.c
@@ -107,7 +107,7 @@ PR_ErrorToString(PRErrorCode code, PRLanguageCode language)
callback_private, et->table_private);
if (msg) return msg;
}
-
+
return(et->table->msgs[code - et->table->base].en_text);
}
}
@@ -183,7 +183,7 @@ PR_ErrorInstallTable(const struct PRErrorTable *table)
PR_IMPLEMENT(void)
PR_ErrorInstallCallback(const char * const * languages,
- PRErrorCallbackLookupFn *lookup,
+ PRErrorCallbackLookupFn *lookup,
PRErrorCallbackNewTableFn *newtable,
struct PRErrorCallbackPrivate *cb_private)
{
@@ -191,7 +191,7 @@ PR_ErrorInstallCallback(const char * const * languages,
assert(strcmp(languages[0], "i-default") == 0);
assert(strcmp(languages[1], "en") == 0);
-
+
callback_languages = languages;
callback_lookup = lookup;
callback_newtable = newtable;
diff --git a/pr/src/misc/prinit.c b/pr/src/misc/prinit.c
index 89cf3277..61cb63bd 100644
--- a/pr/src/misc/prinit.c
+++ b/pr/src/misc/prinit.c
@@ -161,8 +161,8 @@ static void _PR_InitStuff(void)
_pr_gc_lm = PR_NewLogModule("gc");
_pr_shm_lm = PR_NewLogModule("shm");
_pr_shma_lm = PR_NewLogModule("shma");
-
- /* NOTE: These init's cannot depend on _PR_MD_CURRENT_THREAD() */
+
+ /* NOTE: These init's cannot depend on _PR_MD_CURRENT_THREAD() */
_PR_MD_EARLY_INIT();
_PR_InitLocks();
@@ -178,13 +178,13 @@ static void _PR_InitStuff(void)
PR_ASSERT(NULL != _pr_sleeplock);
_PR_InitThreads(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
-
+
#ifdef WIN16
{
PRInt32 top; /* artificial top of stack, win16 */
_pr_top_of_task_stack = (char *) &top;
}
-#endif
+#endif
#ifndef _PR_GLOBAL_THREADS_ONLY
_PR_InitCPUs();
@@ -281,7 +281,7 @@ PR_IMPLEMENT(PRIntn) PR_Initialize(
*
* _PR_CleanupBeforeExit --
*
- * Perform the cleanup work before exiting the process.
+ * Perform the cleanup work before exiting the process.
* We first do the cleanup generic to all platforms. Then
* we call _PR_MD_CLEANUP_BEFORE_EXIT(), where platform-dependent
* cleanup is done. This function is used by PR_Cleanup().
@@ -296,7 +296,7 @@ PR_IMPLEMENT(PRIntn) PR_Initialize(
static void
_PR_CleanupBeforeExit(void)
{
-/*
+/*
Do not make any calls here other than to destroy resources. For example,
do not make any calls that eventually may end up in PR_Lock. Because the
thread is destroyed, can not access current thread any more.
@@ -329,7 +329,7 @@ thread is destroyed, can not access current thread any more.
* Then it performs cleanup in preparation for exiting the process.
* PR_Cleanup() does not exit the primordial thread (which would
* in turn exit the process).
- *
+ *
* PR_Cleanup() only responds when it is called by the primordial
* thread. Calls by any other thread are silently ignored.
*
@@ -428,11 +428,11 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
/*
*------------------------------------------------------------------------
* PR_ProcessExit --
- *
+ *
* Cause an immediate, nongraceful, forced termination of the process.
* It takes a PRIntn argument, which is the exit status code of the
* process.
- *
+ *
* See also: PR_Cleanup()
*
*------------------------------------------------------------------------
@@ -609,7 +609,7 @@ PR_ProcessAttrSetInheritableFD(
nwritten = PR_snprintf(cur, freeSize, ":%s:%d:0x%" PR_PRIxOSFD,
name, (PRIntn)fd->methods->file_type, fd->secret->md.osfd);
}
- attr->fdInheritBufferUsed += nwritten;
+ attr->fdInheritBufferUsed += nwritten;
return PR_SUCCESS;
}
diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c
index 76a1f1e3..923e75f9 100644
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -97,7 +97,7 @@ extern PRBool _pr_ipv6_is_present(void);
((a)->pr_s6_addr32[1] == 0) && \
((a)->pr_s6_addr32[2] == 0) && \
((a)->pr_s6_addr32[3] == 0))
-
+
#define _PR_IN6_IS_ADDR_LOOPBACK(a) \
(((a)->pr_s6_addr32[0] == 0) && \
((a)->pr_s6_addr32[1] == 0) && \
@@ -106,7 +106,7 @@ extern PRBool _pr_ipv6_is_present(void);
((a)->pr_s6_addr[13] == 0) && \
((a)->pr_s6_addr[14] == 0) && \
((a)->pr_s6_addr[15] == 0x1U))
-
+
const PRIPv6Addr _pr_in6addr_any = {{{ 0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -263,13 +263,13 @@ _pr_QueryNetIfs(void)
struct sockaddr_in *sin = (struct sockaddr_in *) sa;
if (sin->sin_addr.s_addr != htonl(INADDR_LOOPBACK)) {
_pr_have_inet_if = PR_TRUE;
- }
+ }
} else if (sa->sa_family == AF_INET6) {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
if (!IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)
&& !IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
_pr_have_inet6_if = PR_TRUE;
- }
+ }
}
#ifdef _PR_HAVE_SOCKADDR_LEN
@@ -352,15 +352,15 @@ _pr_QueryNetIfs(void)
struct sockaddr_in *sin = (struct sockaddr_in *) sa;
if (sin->sin_addr.s_addr != htonl(INADDR_LOOPBACK)) {
_pr_have_inet_if = 1;
- }
+ }
} else if (sa->sa_family == AF_INET6) {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
if (!IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)
&& !IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
_pr_have_inet6_if = 1;
- }
+ }
}
- }
+ }
freeifaddrs(ifp);
}
@@ -604,7 +604,7 @@ static PRStatus CopyProtoent(
* #################################################################
* NOTE: tmphe, tmpbuf, bufsize, h, and h_err are local variables
* or arguments of PR_GetHostByName, PR_GetIPNodeByName, and
- * PR_GetHostByAddr. DO NOT CHANGE THE NAMES OF THESE LOCAL
+ * PR_GetHostByAddr. DO NOT CHANGE THE NAMES OF THESE LOCAL
* VARIABLES OR ARGUMENTS.
* #################################################################
*/
@@ -665,7 +665,7 @@ PR_IMPLEMENT(PRStatus) PR_GetHostByName(
LOCK_DNS();
h = GETHOSTBYNAME(name);
-
+
if (NULL == h)
{
PR_SetError(PR_DIRECTORY_LOOKUP_ERROR, _MD_GETHOST_ERRNO());
@@ -703,7 +703,7 @@ static void * _pr_freehostent_fp;
PRStatus
_pr_find_getipnodebyname(void)
{
- PRLibrary *lib;
+ PRLibrary *lib;
PRStatus rv;
#define GETIPNODEBYNAME "getipnodebyname"
#define GETIPNODEBYADDR "getipnodebyaddr"
@@ -740,7 +740,7 @@ static PRStatus AppendV4AddrsToHostent(
PRIntn na, na_old;
char **ap;
char **new_addr_list;
-
+
/* Count the addresses, then grow storage for the pointers */
for (na_old = 0, ap = to->h_addr_list; *ap != 0; na_old++, ap++)
{;} /* nothing to execute */
@@ -851,7 +851,7 @@ PR_IMPLEMENT(PRStatus) PR_GetIPNodeByName(
#ifdef _PR_INET6_PROBE
if (_pr_ipv6_is_present())
#endif
- h = GETHOSTBYNAME2(name, AF_INET6);
+ h = GETHOSTBYNAME2(name, AF_INET6);
}
if ((NULL == h) && (flags & PR_AI_V4MAPPED)
&& ((flags & PR_AI_ADDRCONFIG) == 0 || _pr_have_inet_if))
@@ -890,7 +890,7 @@ PR_IMPLEMENT(PRStatus) PR_GetIPNodeByName(
LOCK_DNS();
h = GETHOSTBYNAME(name);
#endif /* _PR_INET6 */
-
+
if (NULL == h)
{
#if defined(_PR_INET6) && defined(_PR_HAVE_GETIPNODEBYNAME)
@@ -1565,7 +1565,7 @@ static int StringToV6Addr(const char *string, PRIPv6Addr *addr)
}
addr->pr_s6_addr16[section++] = htons((unsigned short)val);
}
-
+
if (*s == '.') {
/* Have a trailing v4 format address */
if (section > 6) return 0; /* not enough room */
@@ -1611,13 +1611,13 @@ static int StringToV6Addr(const char *string, PRIPv6Addr *addr)
addr->pr_s6_addr[2 * section + 1] = val;
section++;
}
-
+
if (double_colon != -1) {
/* Stretch the double colon */
int tosection;
int ncopy = section - double_colon;
for (tosection = 7; ncopy--; tosection--) {
- addr->pr_s6_addr16[tosection] =
+ addr->pr_s6_addr16[tosection] =
addr->pr_s6_addr16[double_colon + ncopy];
}
while (tosection >= double_colon) {
@@ -1734,7 +1734,7 @@ static const char *V6AddrToString(
}
STUFF('\0');
return bufcopy;
-#undef STUFF
+#undef STUFF
}
#endif /* !_PR_HAVE_INET_NTOP */
@@ -1814,7 +1814,7 @@ typedef struct addrinfo PRADDRINFO;
typedef struct addrinfo PRADDRINFO;
-/* getaddrinfo/freeaddrinfo/getnameinfo prototypes */
+/* getaddrinfo/freeaddrinfo/getnameinfo prototypes */
#if defined(WIN32)
#define FUNC_MODIFIER __stdcall
#else
@@ -1911,7 +1911,7 @@ _pr_find_getaddrinfo(void)
#if !defined(_PR_HAVE_GETADDRINFO) || defined(_PR_INET6_PROBE)
/*
* If getaddrinfo does not exist, then we will fall back on
- * PR_GetHostByName, which requires that we allocate a buffer for the
+ * PR_GetHostByName, which requires that we allocate a buffer for the
* PRHostEnt data structure and its members.
*/
typedef struct PRAddrInfoFB {
@@ -1979,11 +1979,11 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInfoByName(const char *hostname,
if (!(flags & PR_AI_NOCANONNAME))
hints.ai_flags |= AI_CANONNAME;
#ifdef AI_ADDRCONFIG
- /*
+ /*
* Propagate AI_ADDRCONFIG to the GETADDRINFO call if PR_AI_ADDRCONFIG
* is set.
- *
- * Need a workaround for loopback host addresses:
+ *
+ * Need a workaround for loopback host addresses:
* The problem is that in glibc and Windows, AI_ADDRCONFIG applies the
* existence of an outgoing network interface to IP addresses of the
* loopback interface, due to a strict interpretation of the
@@ -2104,7 +2104,7 @@ PR_IMPLEMENT(const char *) PR_GetCanonNameFromAddrInfo(const PRAddrInfo *ai)
if (!_pr_ipv6_is_present()) {
const PRAddrInfoFB *fb = (const PRAddrInfoFB *) ai;
return fb->has_cname ? fb->hostent.h_name : NULL;
- }
+ }
#endif
return ((const PRADDRINFO *) ai)->ai_canonname;
#else
diff --git a/pr/src/misc/prolock.c b/pr/src/misc/prolock.c
index 38b77878..a8115460 100644
--- a/pr/src/misc/prolock.c
+++ b/pr/src/misc/prolock.c
@@ -5,16 +5,16 @@
/*
** prolock.c -- NSPR Ordered Lock
-**
+**
** Implement the API defined in prolock.h
-**
+**
*/
#include "prolock.h"
#include "prlog.h"
#include "prerror.h"
-PR_IMPLEMENT(PROrderedLock *)
- PR_CreateOrderedLock(
+PR_IMPLEMENT(PROrderedLock *)
+ PR_CreateOrderedLock(
PRInt32 order,
const char *name
)
@@ -25,9 +25,9 @@ PR_IMPLEMENT(PROrderedLock *)
} /* end PR_CreateOrderedLock() */
-PR_IMPLEMENT(void)
- PR_DestroyOrderedLock(
- PROrderedLock *lock
+PR_IMPLEMENT(void)
+ PR_DestroyOrderedLock(
+ PROrderedLock *lock
)
{
PR_NOT_REACHED("Not implemented"); /* Not implemented yet */
@@ -35,9 +35,9 @@ PR_IMPLEMENT(void)
} /* end PR_DestroyOrderedLock() */
-PR_IMPLEMENT(void)
- PR_LockOrderedLock(
- PROrderedLock *lock
+PR_IMPLEMENT(void)
+ PR_LockOrderedLock(
+ PROrderedLock *lock
)
{
PR_NOT_REACHED("Not implemented"); /* Not implemented yet */
@@ -45,9 +45,9 @@ PR_IMPLEMENT(void)
} /* end PR_LockOrderedLock() */
-PR_IMPLEMENT(PRStatus)
- PR_UnlockOrderedLock(
- PROrderedLock *lock
+PR_IMPLEMENT(PRStatus)
+ PR_UnlockOrderedLock(
+ PROrderedLock *lock
)
{
PR_NOT_REACHED("Not implemented"); /* Not implemented yet */
diff --git a/pr/src/misc/prrng.c b/pr/src/misc/prrng.c
index b5c38f82..1597293c 100644
--- a/pr/src/misc/prrng.c
+++ b/pr/src/misc/prrng.c
@@ -16,10 +16,10 @@
#include <string.h>
#endif
-PRSize _pr_CopyLowBits(
- void *dst,
- PRSize dstlen,
- void *src,
+PRSize _pr_CopyLowBits(
+ void *dst,
+ PRSize dstlen,
+ void *src,
PRSize srclen )
{
if (srclen <= dstlen) {
@@ -32,9 +32,9 @@ PRSize _pr_CopyLowBits(
memcpy(dst, src, dstlen);
#endif
return dstlen;
-}
+}
-PR_IMPLEMENT(PRSize) PR_GetRandomNoise(
+PR_IMPLEMENT(PRSize) PR_GetRandomNoise(
void *buf,
PRSize size
)
diff --git a/pr/src/misc/prsystem.c b/pr/src/misc/prsystem.c
index cdbbe2a5..fe424491 100644
--- a/pr/src/misc/prsystem.c
+++ b/pr/src/misc/prsystem.c
@@ -106,7 +106,7 @@ PR_IMPLEMENT(PRStatus) PR_GetSystemInfo(PRSysInfo cmd, char *buf, PRUint32 bufle
break;
}
len += 1;
- }
+ }
#endif
break;
@@ -159,7 +159,7 @@ PR_IMPLEMENT(PRStatus) PR_GetSystemInfo(PRSysInfo cmd, char *buf, PRUint32 bufle
/*
** PR_GetNumberOfProcessors()
-**
+**
** Implementation notes:
** Every platform does it a bit different.
** numCpus is the returned value.
@@ -169,7 +169,7 @@ PR_IMPLEMENT(PRStatus) PR_GetSystemInfo(PRSysInfo cmd, char *buf, PRUint32 bufle
** order of the if defined()s may be important,
** especially for unix variants. Do platform
** specific implementations before XP_UNIX.
-**
+**
*/
PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void )
{
@@ -244,14 +244,14 @@ PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void )
/*
** PR_GetPhysicalMemorySize()
-**
+**
** Implementation notes:
** Every platform does it a bit different.
** bytes is the returned value.
** for each platform's "if defined" section
** declare your local variable
** do your thing, assign to bytes.
-**
+**
*/
PR_IMPLEMENT(PRUint64) PR_GetPhysicalMemorySize(void)
{
diff --git a/pr/src/misc/prthinfo.c b/pr/src/misc/prthinfo.c
index 2477899c..cdc24276 100644
--- a/pr/src/misc/prthinfo.c
+++ b/pr/src/misc/prthinfo.c
@@ -86,7 +86,7 @@ PR_ThreadScanStackPointers(PRThread* t,
{
prword_t scan;
prword_t limit;
-
+
scan = (prword_t) sp;
limit = (prword_t) esp;
while (scan < limit) {
@@ -124,7 +124,7 @@ PR_ThreadScanStackPointers(PRThread* t,
if (status != PR_SUCCESS)
return status;
}
-
+
return PR_SUCCESS;
}
diff --git a/pr/src/misc/prtime.c b/pr/src/misc/prtime.c
index 92079597..8b9f4a91 100644
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -21,7 +21,7 @@
#include <errno.h> /* for EINVAL */
#include <time.h>
-/*
+/*
* The COUNT_LEAPS macro counts the number of leap years passed by
* till the start of the given year Y. At the start of the year 4
* A.D. the number of leap years passed by is 0, while at the start of
@@ -241,7 +241,7 @@ PR_ImplodeTime(const PRExplodedTime *exploded)
PR_NormalizeTime(&copy, PR_GMTParameters);
numDays = DAYS_BETWEEN_YEARS(1970, copy.tm_year);
-
+
numSecs = copy.tm_yday * 86400 + copy.tm_hour * 3600
+ copy.tm_min * 60 + copy.tm_sec;
@@ -443,7 +443,7 @@ PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params)
/* Recompute yday and wday */
time->tm_yday = time->tm_mday +
lastDayOfMonth[IsLeapYear(time->tm_year)][time->tm_month];
-
+
numDays = DAYS_BETWEEN_YEARS(1970, time->tm_year) + time->tm_yday;
time->tm_wday = (numDays + 4) % 7;
if (time->tm_wday < 0) {
@@ -463,7 +463,7 @@ PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params)
*-------------------------------------------------------------------------
*
* PR_LocalTimeParameters --
- *
+ *
* returns the time parameters for the local time zone
*
* The following uses localtime() from the standard C library.
@@ -480,7 +480,7 @@ PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params)
* In this case we could define the macro as
* #define MT_safe_localtime(timer, result) \
* (localtime_r(timer, result) == 0 ? result : NULL)
- * I chose to compare the return value of localtime_r with -1 so
+ * I chose to compare the return value of localtime_r with -1 so
* that I can catch the cases where localtime_r returns a pointer
* to struct tm. The macro definition above would not be able to
* detect such mistakes because it is legal to compare a pointer
@@ -538,7 +538,7 @@ static struct tm *MT_safe_localtime(const time_t *clock, struct tm *result)
* clock plus ULONG_MAX. So we also have to check for the invalid
* structs returned for timezones west of Greenwich when clock == 0.
*/
-
+
tmPtr = localtime(clock);
#if defined(WIN16) || defined(XP_OS2)
@@ -629,7 +629,7 @@ PR_LocalTimeParameters(const PRExplodedTime *gmt)
/* GMT is 00:00:00, 2nd of Jan. */
- offset2Jan1970 = (PRInt32)localTime.tm_sec
+ offset2Jan1970 = (PRInt32)localTime.tm_sec
+ 60L * (PRInt32)localTime.tm_min
+ 3600L * (PRInt32)localTime.tm_hour
+ 86400L * (PRInt32)((PRInt32)localTime.tm_mday - 2L);
@@ -683,7 +683,7 @@ PR_LocalTimeParameters(const PRExplodedTime *gmt)
}
/*
- * dayOffset is the offset between local time and GMT in
+ * dayOffset is the offset between local time and GMT in
* the day component, which can only be -1, 0, or 1. We
* use the day of the week to compute dayOffset.
*/
@@ -732,7 +732,7 @@ PR_LocalTimeParameters(const PRExplodedTime *gmt)
retVal.tp_dst_offset = 3600;
}
}
-
+
return retVal;
}
@@ -751,26 +751,26 @@ PR_LocalTimeParameters(const PRExplodedTime *gmt)
/*
* Returns the mday of the first sunday of the month, where
* mday and wday are for a given day in the month.
- * mdays start with 1 (e.g. 1..31).
+ * mdays start with 1 (e.g. 1..31).
* wdays start with 0 and are in the range 0..6. 0 = Sunday.
*/
#define firstSunday(mday, wday) (((mday - wday + 7 - 1) % 7) + 1)
/*
- * Returns the mday for the N'th Sunday of the month, where
+ * Returns the mday for the N'th Sunday of the month, where
* mday and wday are for a given day in the month.
- * mdays start with 1 (e.g. 1..31).
+ * mdays start with 1 (e.g. 1..31).
* wdays start with 0 and are in the range 0..6. 0 = Sunday.
* N has the following values: 0 = first, 1 = second (etc), -1 = last.
- * ndays is the number of days in that month, the same value as the
+ * ndays is the number of days in that month, the same value as the
* mday of the last day of the month.
*/
-static PRInt32
-NthSunday(PRInt32 mday, PRInt32 wday, PRInt32 N, PRInt32 ndays)
+static PRInt32
+NthSunday(PRInt32 mday, PRInt32 wday, PRInt32 N, PRInt32 ndays)
{
PRInt32 firstSun = firstSunday(mday, wday);
- if (N < 0)
+ if (N < 0)
N = (ndays - firstSun) / 7;
return firstSun + (7 * N);
}
@@ -837,8 +837,8 @@ PR_USPacificTimeParameters(const PRExplodedTime *gmt)
if (st.tm_month < dst->dst_start_month) {
retVal.tp_dst_offset = 0L;
} else if (st.tm_month == dst->dst_start_month) {
- int NthSun = NthSunday(st.tm_mday, st.tm_wday,
- dst->dst_start_Nth_Sunday,
+ int NthSun = NthSunday(st.tm_mday, st.tm_wday,
+ dst->dst_start_Nth_Sunday,
dst->dst_start_month_ndays);
if (st.tm_mday < NthSun) { /* Before starting Sunday */
retVal.tp_dst_offset = 0L;
@@ -855,8 +855,8 @@ PR_USPacificTimeParameters(const PRExplodedTime *gmt)
} else if (st.tm_month < dst->dst_end_month) {
retVal.tp_dst_offset = 3600L;
} else if (st.tm_month == dst->dst_end_month) {
- int NthSun = NthSunday(st.tm_mday, st.tm_wday,
- dst->dst_end_Nth_Sunday,
+ int NthSun = NthSunday(st.tm_mday, st.tm_wday,
+ dst->dst_end_Nth_Sunday,
dst->dst_end_month_ndays);
if (st.tm_mday < NthSun) { /* Before ending Sunday */
retVal.tp_dst_offset = 3600L;
@@ -1484,7 +1484,7 @@ PR_ParseTimeStringToExplodedTime(
/* "-" is ignored at the beginning of a token if we have not yet
parsed a year (e.g., the second "-" in "30-AUG-1966"), or if
- the character after the dash is not a digit. */
+ the character after the dash is not a digit. */
if (*rest == '-' && ((rest > string &&
isalpha((unsigned char)rest[-1]) && year < 0) ||
rest[1] < '0' || rest[1] > '9'))
@@ -1574,14 +1574,14 @@ PR_ParseTimeStringToExplodedTime(
* time, we call mktime(). However, we need to see if we are
* on 1-Jan-1970 or before. If we are, we can't call mktime()
* because mktime() will crash on win16. In that case, we
- * calculate zone_offset based on the zone offset at
+ * calculate zone_offset based on the zone offset at
* 00:00:00, 2 Jan 1970 GMT, and subtract zone_offset from the
* date we are parsing to transform the date to GMT. We also
* do so if mktime() returns (time_t) -1 (time out of range).
*/
/* month, day, hours, mins and secs are always non-negative
- so we dont need to worry about them. */
+ so we dont need to worry about them. */
if(result->tm_year >= 1970)
{
PRInt64 usec_per_sec;
@@ -1602,7 +1602,7 @@ PR_ParseTimeStringToExplodedTime(
/*
* mktime will return (time_t) -1 if the input is a date
* after 23:59:59, December 31, 3000, US Pacific Time (not
- * UTC as documented):
+ * UTC as documented):
* http://msdn.microsoft.com/en-us/library/d1y53h2a(VS.80).aspx
* But if the year is 3001, mktime also invokes the invalid
* parameter handler, causing the application to crash. This
@@ -1633,7 +1633,7 @@ PR_ParseTimeStringToExplodedTime(
return PR_SUCCESS;
}
}
-
+
/* So mktime() can't handle this case. We assume the
zone_offset for the date we are parsing is the same as
the zone offset on 00:00:00 2 Jan 1970 GMT. */
@@ -1765,7 +1765,7 @@ static const char* abbrevMonths[] =
};
static const char* months[] =
-{
+{
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
};
@@ -1824,17 +1824,17 @@ static unsigned int pr_WeekOfYear(const PRExplodedTime* time,
* needed to write things like MIME headers which must always be in US English.
*
**********************************************************************************/
-
+
PR_IMPLEMENT(PRUint32)
PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize,
const char* format, const PRExplodedTime* time )
{
char* bufPtr = buf;
const char* fmtPtr;
- char tmpBuf[ 40 ];
+ char tmpBuf[ 40 ];
const int tmpBufSize = sizeof( tmpBuf );
-
+
for( fmtPtr=format; *fmtPtr != '\0'; fmtPtr++ )
{
if( *fmtPtr != '%' )
@@ -1849,130 +1849,130 @@ PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize,
/* escaped '%' character */
ADDCHAR( bufPtr, bufSize, '%' );
break;
-
+
case 'a':
/* abbreviated weekday name */
ADDSTR( bufPtr, bufSize, abbrevDays[ time->tm_wday ] );
break;
-
+
case 'A':
/* full weekday name */
ADDSTR( bufPtr, bufSize, days[ time->tm_wday ] );
break;
-
+
case 'b':
/* abbreviated month name */
ADDSTR( bufPtr, bufSize, abbrevMonths[ time->tm_month ] );
break;
-
+
case 'B':
/* full month name */
ADDSTR(bufPtr, bufSize, months[ time->tm_month ] );
break;
-
+
case 'c':
/* Date and time. */
PR_FormatTimeUSEnglish( tmpBuf, tmpBufSize, "%a %b %d %H:%M:%S %Y", time );
ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'd':
/* day of month ( 01 - 31 ) */
PR_snprintf(tmpBuf,tmpBufSize,"%.2ld",time->tm_mday );
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
case 'H':
/* hour ( 00 - 23 ) */
PR_snprintf(tmpBuf,tmpBufSize,"%.2ld",time->tm_hour );
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'I':
/* hour ( 01 - 12 ) */
PR_snprintf(tmpBuf,tmpBufSize,"%.2ld",
(time->tm_hour%12) ? time->tm_hour%12 : (PRInt32) 12 );
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'j':
/* day number of year ( 001 - 366 ) */
PR_snprintf(tmpBuf,tmpBufSize,"%.3d",time->tm_yday + 1);
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'm':
/* month number ( 01 - 12 ) */
PR_snprintf(tmpBuf,tmpBufSize,"%.2ld",time->tm_month+1);
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'M':
/* minute ( 00 - 59 ) */
PR_snprintf(tmpBuf,tmpBufSize,"%.2ld",time->tm_min );
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'p':
/* locale's equivalent of either AM or PM */
- ADDSTR( bufPtr, bufSize, (time->tm_hour<12)?"AM":"PM" );
+ ADDSTR( bufPtr, bufSize, (time->tm_hour<12)?"AM":"PM" );
break;
-
+
case 'S':
/* seconds ( 00 - 61 ), allows for leap seconds */
PR_snprintf(tmpBuf,tmpBufSize,"%.2ld",time->tm_sec );
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'U':
/* week number of year ( 00 - 53 ), Sunday is the first day of week 1 */
PR_snprintf(tmpBuf,tmpBufSize,"%.2d", pr_WeekOfYear( time, 0 ) );
ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'w':
/* weekday number ( 0 - 6 ), Sunday = 0 */
PR_snprintf(tmpBuf,tmpBufSize,"%d",time->tm_wday );
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'W':
/* Week number of year ( 00 - 53 ), Monday is the first day of week 1 */
PR_snprintf(tmpBuf,tmpBufSize,"%.2d", pr_WeekOfYear( time, 1 ) );
ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'x':
/* Date representation */
PR_FormatTimeUSEnglish( tmpBuf, tmpBufSize, "%m/%d/%y", time );
ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'X':
/* Time representation. */
PR_FormatTimeUSEnglish( tmpBuf, tmpBufSize, "%H:%M:%S", time );
ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'y':
/* year within century ( 00 - 99 ) */
PR_snprintf(tmpBuf,tmpBufSize,"%.2d",time->tm_year % 100 );
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'Y':
/* year as ccyy ( for example 1986 ) */
PR_snprintf(tmpBuf,tmpBufSize,"%.4d",time->tm_year );
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
-
+
case 'Z':
/* Time zone name or no characters if no time zone exists.
* Since time zone name is supposed to be independant of locale, we
* defer to PR_FormatTime() for this option.
*/
PR_FormatTime( tmpBuf, tmpBufSize, "%Z", time );
- ADDSTR( bufPtr, bufSize, tmpBuf );
+ ADDSTR( bufPtr, bufSize, tmpBuf );
break;
default:
@@ -1980,7 +1980,7 @@ PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize,
ADDCHAR( bufPtr, bufSize, '%' );
ADDCHAR( bufPtr, bufSize, *fmtPtr );
break;
-
+
}
}
}
@@ -1997,7 +1997,7 @@ PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize,
* Returns the week number of the year (0-53) for the given time. firstDayOfWeek
* is the day on which the week is considered to start (0=Sun, 1=Mon, ...).
* Week 1 starts the first time firstDayOfWeek occurs in the year. In other words,
- * a partial week at the start of the year is considered week 0.
+ * a partial week at the start of the year is considered week 0.
*
**********************************************************************************/
diff --git a/pr/src/misc/prtpool.c b/pr/src/misc/prtpool.c
index c2cc9c80..05867ea7 100644
--- a/pr/src/misc/prtpool.c
+++ b/pr/src/misc/prtpool.c
@@ -107,7 +107,7 @@ struct PRJob {
PRIntervalTime timeout; /* relative value */
PRIntervalTime absolute;
#ifdef OPT_WINNT
- NT_notifier nt_notifier;
+ NT_notifier nt_notifier;
#endif
};
@@ -148,7 +148,7 @@ static void notify_timerq(PRThreadPool *tp);
* tp->ioq.lock,tp->timerq.lock
* |
* V
- * tp->jobq->lock
+ * tp->jobq->lock
*/
/*
@@ -174,7 +174,7 @@ PRCList *head;
PR_Unlock(tp->jobq.lock);
rv = GetQueuedCompletionStatus(tp->jobq.nt_completion_port,
&unused, &shutdown, &olp, INFINITE);
-
+
PR_ASSERT(rv);
if (shutdown)
break;
@@ -190,7 +190,7 @@ PRCList *head;
tp->idle_threads++;
PR_WaitCondVar(tp->jobq.cv, PR_INTERVAL_NO_TIMEOUT);
tp->idle_threads--;
- }
+ }
if (tp->shutdown) {
PR_Unlock(tp->jobq.lock);
break;
@@ -396,8 +396,8 @@ PRIntervalTime now;
for(index = 1; index < (pollfds_used); index++) {
PRInt16 events = pollfds[index].in_flags;
- PRInt16 revents = pollfds[index].out_flags;
- jobp = polljobs[index];
+ PRInt16 revents = pollfds[index].out_flags;
+ jobp = polljobs[index];
if ((revents & PR_POLL_NVAL) || /* busted in all cases */
(revents & PR_POLL_ERR) ||
@@ -419,7 +419,7 @@ PRIntervalTime now;
jobp->iod->error = PR_BAD_DESCRIPTOR_ERROR;
else if (PR_POLL_HUP & revents)
jobp->iod->error = PR_CONNECT_RESET_ERROR;
- else
+ else
jobp->iod->error = PR_IO_ERROR;
/*
@@ -518,7 +518,7 @@ PRIntervalTime now;
/*
* move expired-timer jobs to jobq
*/
- now = PR_IntervalNow();
+ now = PR_IntervalNow();
while (!PR_CLIST_IS_EMPTY(&tp->timerq.list)) {
qp = tp->timerq.list.next;
jobp = JOB_LINKS_PTR(qp);
@@ -704,7 +704,7 @@ alloc_job(PRBool joinable, PRThreadPool *tp)
PRJob *jobp;
jobp = PR_NEWZAP(PRJob);
- if (NULL == jobp)
+ if (NULL == jobp)
goto failed;
if (joinable) {
jobp->join_cv = PR_NewCondVar(tp->join_lock);
diff --git a/pr/src/misc/prtrace.c b/pr/src/misc/prtrace.c
index 058f700b..0b916902 100644
--- a/pr/src/misc/prtrace.c
+++ b/pr/src/misc/prtrace.c
@@ -85,18 +85,18 @@ static PRCondVar *logCVar; /* Sync Condidtion Variable */
** Inter-thread state communication.
** Controling thread writes to logOrder under protection of logCVar
** the logging thread reads logOrder and sets logState on Notify.
-**
+**
** logSegments, logCount, logLostData must be read and written under
** protection of logLock, logCVar.
-**
+**
*/
static enum LogState
{
LogNotRunning, /* Initial state */
LogReset, /* Causes logger to re-calc controls */
LogActive, /* Logging in progress, set only by log thread */
- LogSuspend, /* Suspend Logging */
- LogResume, /* Resume Logging => LogActive */
+ LogSuspend, /* Suspend Logging */
+ LogResume, /* Resume Logging => LogActive */
LogStop /* Stop the log thread */
} logOrder, logState, localState; /* controlling state variables */
static PRInt32 logSegments; /* Number of buffer segments */
@@ -139,7 +139,7 @@ static void NewTraceBuffer( PRInt32 size )
PR_LOG( lm, PR_LOG_ERROR,
("PRTrace: Failed to get trace buffer"));
PR_ASSERT( 0 );
- }
+ }
else
{
PR_LOG( lm, PR_LOG_NOTICE,
@@ -166,7 +166,7 @@ static void _PR_InitializeTrace( void )
PR_ASSERT( traceLock != NULL );
PR_Lock( traceLock );
-
+
PR_INIT_CLIST( &qNameList );
lm = PR_NewLogModule("trace");
@@ -179,14 +179,14 @@ static void _PR_InitializeTrace( void )
logCVar = PR_NewCondVar( logLock );
PR_Unlock( traceLock );
- return;
+ return;
} /* end _PR_InitializeTrace() */
/*
** Create a Trace Handle
*/
PR_IMPLEMENT(PRTraceHandle)
- PR_CreateTrace(
+ PR_CreateTrace(
const char *qName, /* QName for this trace handle */
const char *rName, /* RName for this trace handle */
const char *description /* description for this trace handle */
@@ -234,10 +234,10 @@ PR_IMPLEMENT(PRTraceHandle)
{
qnp = PR_NEWZAP( QName );
PR_ASSERT( qnp != NULL );
- PR_INIT_CLIST( &qnp->link );
- PR_INIT_CLIST( &qnp->rNameList );
+ PR_INIT_CLIST( &qnp->link );
+ PR_INIT_CLIST( &qnp->rNameList );
strcpy( qnp->name, qName );
- PR_APPEND_LINK( &qnp->link, &qNameList );
+ PR_APPEND_LINK( &qnp->link, &qNameList );
}
/* Do we already have a matching RName? */
@@ -267,7 +267,7 @@ PR_IMPLEMENT(PRTraceHandle)
PR_ASSERT(0);
}
- PR_APPEND_LINK( &rnp->link, &qnp->rNameList ); /* add RName to QName's rnList */
+ PR_APPEND_LINK( &rnp->link, &qnp->rNameList ); /* add RName to QName's rnList */
rnp->qName = qnp; /* point the RName to the QName */
/* Unlock the Facility */
@@ -281,15 +281,15 @@ PR_IMPLEMENT(PRTraceHandle)
/*
**
*/
-PR_IMPLEMENT(void)
- PR_DestroyTrace(
+PR_IMPLEMENT(void)
+ PR_DestroyTrace(
PRTraceHandle handle /* Handle to be destroyed */
)
{
RName *rnp = (RName *)handle;
QName *qnp = rnp->qName;
- PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: Deleting: QName: %s, RName: %s",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: Deleting: QName: %s, RName: %s",
qnp->name, rnp->name));
/* Lock the Facility */
@@ -299,7 +299,7 @@ PR_IMPLEMENT(void)
** Remove RName from the list of RNames in QName
** and free RName
*/
- PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: Deleting RName: %s, %p",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: Deleting RName: %s, %p",
rnp->name, rnp));
PR_REMOVE_LINK( &rnp->link );
PR_Free( rnp->lock );
@@ -311,11 +311,11 @@ PR_IMPLEMENT(void)
*/
if ( PR_CLIST_IS_EMPTY( &qnp->rNameList ) )
{
- PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: Deleting unused QName: %s, %p",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: Deleting unused QName: %s, %p",
qnp->name, qnp));
PR_REMOVE_LINK( &qnp->link );
PR_DELETE( qnp );
- }
+ }
/* Unlock the Facility */
PR_Unlock( traceLock );
@@ -325,8 +325,8 @@ PR_IMPLEMENT(void)
/*
** Create a TraceEntry in the trace buffer
*/
-PR_IMPLEMENT(void)
- PR_Trace(
+PR_IMPLEMENT(void)
+ PR_Trace(
PRTraceHandle handle, /* use this trace handle */
PRUint32 userData0, /* User supplied data word 0 */
PRUint32 userData1, /* User supplied data word 1 */
@@ -341,8 +341,8 @@ PR_IMPLEMENT(void)
PRTraceEntry *tep;
PRInt32 mark;
- if ( (traceState == Suspended )
- || ( ((RName *)handle)->state == Suspended ))
+ if ( (traceState == Suspended )
+ || ( ((RName *)handle)->state == Suspended ))
return;
/*
@@ -350,14 +350,14 @@ PR_IMPLEMENT(void)
*/
PR_Lock( traceLock );
- tep = &tBuf[next++];
+ tep = &tBuf[next++];
if ( next > last )
next = 0;
if ( fetchLostData == PR_FALSE && next == fetchLastSeen )
fetchLostData = PR_TRUE;
-
+
mark = next;
-
+
PR_Unlock( traceLock );
/*
@@ -400,8 +400,8 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(void)
- PR_SetTraceOption(
+PR_IMPLEMENT(void)
+ PR_SetTraceOption(
PRTraceOption command, /* One of the enumerated values */
void *value /* command value or NULL */
)
@@ -419,33 +419,33 @@ PR_IMPLEMENT(void)
PR_LOG( lm, PR_LOG_DEBUG,
("PRSetTraceOption: PRTraceBufSize: %ld", bufSize));
break;
-
+
case PRTraceEnable :
rnp = *(RName **)value;
rnp->state = Running;
PR_LOG( lm, PR_LOG_DEBUG,
("PRSetTraceOption: PRTraceEnable: %p", rnp));
break;
-
+
case PRTraceDisable :
rnp = *(RName **)value;
rnp->state = Suspended;
PR_LOG( lm, PR_LOG_DEBUG,
("PRSetTraceOption: PRTraceDisable: %p", rnp));
break;
-
+
case PRTraceSuspend :
traceState = Suspended;
PR_LOG( lm, PR_LOG_DEBUG,
("PRSetTraceOption: PRTraceSuspend"));
break;
-
+
case PRTraceResume :
traceState = Running;
PR_LOG( lm, PR_LOG_DEBUG,
("PRSetTraceOption: PRTraceResume"));
break;
-
+
case PRTraceSuspendRecording :
PR_Lock( logLock );
logOrder = LogSuspend;
@@ -454,7 +454,7 @@ PR_IMPLEMENT(void)
PR_LOG( lm, PR_LOG_DEBUG,
("PRSetTraceOption: PRTraceSuspendRecording"));
break;
-
+
case PRTraceResumeRecording :
PR_LOG( lm, PR_LOG_DEBUG,
("PRSetTraceOption: PRTraceResumeRecording"));
@@ -465,7 +465,7 @@ PR_IMPLEMENT(void)
PR_NotifyCondVar( logCVar );
PR_Unlock( logLock );
break;
-
+
case PRTraceStopRecording :
PR_Lock( logLock );
logOrder = LogStop;
@@ -480,7 +480,7 @@ PR_IMPLEMENT(void)
("PRSetTraceOption: PRTraceLockTraceHandles"));
PR_Lock( traceLock );
break;
-
+
case PRTraceUnLockHandles :
PR_LOG( lm, PR_LOG_DEBUG,
("PRSetTraceOption: PRTraceUnLockHandles"));
@@ -499,8 +499,8 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(void)
- PR_GetTraceOption(
+PR_IMPLEMENT(void)
+ PR_GetTraceOption(
PRTraceOption command, /* One of the enumerated values */
void *value /* command value or NULL */
)
@@ -512,7 +512,7 @@ PR_IMPLEMENT(void)
PR_LOG( lm, PR_LOG_DEBUG,
("PRGetTraceOption: PRTraceBufSize: %ld", bufSize ));
break;
-
+
default:
PR_LOG( lm, PR_LOG_ERROR,
("PRGetTraceOption: Invalid command %ld", command ));
@@ -525,8 +525,8 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(PRTraceHandle)
- PR_GetTraceHandleFromName(
+PR_IMPLEMENT(PRTraceHandle)
+ PR_GetTraceHandleFromName(
const char *qName, /* QName search argument */
const char *rName /* RName search argument */
)
@@ -564,8 +564,8 @@ foundIt:
/*
**
*/
-PR_IMPLEMENT(void)
- PR_GetTraceNameFromHandle(
+PR_IMPLEMENT(void)
+ PR_GetTraceNameFromHandle(
PRTraceHandle handle, /* handle as search argument */
const char **qName, /* pointer to associated QName */
const char **rName, /* pointer to associated RName */
@@ -580,7 +580,7 @@ PR_IMPLEMENT(void)
*description = rnp->desc;
PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: GetConterNameFromHandle: "
- "QNp: %p, RNp: %p,\n\tQName: %s, RName: %s, Desc: %s",
+ "QNp: %p, RNp: %p,\n\tQName: %s, RName: %s, Desc: %s",
qnp, rnp, qnp->name, rnp->name, rnp->desc ));
return;
@@ -589,8 +589,8 @@ PR_IMPLEMENT(void)
/*
**
*/
-PR_IMPLEMENT(PRTraceHandle)
- PR_FindNextTraceQname(
+PR_IMPLEMENT(PRTraceHandle)
+ PR_FindNextTraceQname(
PRTraceHandle handle
)
{
@@ -602,10 +602,10 @@ PR_IMPLEMENT(PRTraceHandle)
qnp = (QName *)PR_LIST_HEAD( &qNameList );
else if ( PR_NEXT_LINK( &qnp->link ) == &qNameList )
qnp = NULL;
- else
+ else
qnp = (QName *)PR_NEXT_LINK( &qnp->link );
- PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: FindNextQname: Handle: %p, Returns: %p",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: FindNextQname: Handle: %p, Returns: %p",
handle, qnp ));
return((PRTraceHandle)qnp);
@@ -614,8 +614,8 @@ PR_IMPLEMENT(PRTraceHandle)
/*
**
*/
-PR_IMPLEMENT(PRTraceHandle)
- PR_FindNextTraceRname(
+PR_IMPLEMENT(PRTraceHandle)
+ PR_FindNextTraceRname(
PRTraceHandle rhandle,
PRTraceHandle qhandle
)
@@ -633,12 +633,12 @@ PR_IMPLEMENT(PRTraceHandle)
else
rnp = (RName *)PR_NEXT_LINK( &rnp->link );
- PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: FindNextRname: Rhandle: %p, QHandle: %p, Returns: %p",
+ PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: FindNextRname: Rhandle: %p, QHandle: %p, Returns: %p",
rhandle, qhandle, rnp ));
return((PRTraceHandle)rnp);
} /* end PR_FindNextTraceRname() */
-
+
/*
**
*/
@@ -665,13 +665,13 @@ static PRFileDesc * InitializeRecording( void )
("RecordTraceEntries: Environment variable not defined. Exiting"));
return NULL;
}
-
+
/* Open the logfile */
logFile = PR_Open( logFileName, PR_WRONLY | PR_CREATE_FILE, 0666 );
if ( logFile == NULL )
{
PR_LOG( lm, PR_LOG_ERROR,
- ("RecordTraceEntries: Cannot open %s as trace log file. OS error: %ld",
+ ("RecordTraceEntries: Cannot open %s as trace log file. OS error: %ld",
logFileName, PR_GetOSError()));
return NULL;
}
@@ -735,7 +735,7 @@ static void WriteTraceSegment( PRFileDesc *logFile, void *buf, PRInt32 amount )
else if ( rc != amount )
PR_LOG( lm, PR_LOG_ERROR,
("RecordTraceEntries: PR_Write() Tried to write: %ld, Wrote: %ld", amount, rc));
- else
+ else
PR_LOG( lm, PR_LOG_DEBUG,
("RecordTraceEntries: PR_Write(): Buffer: %p, bytes: %ld", buf, amount));
@@ -747,7 +747,7 @@ static void WriteTraceSegment( PRFileDesc *logFile, void *buf, PRInt32 amount )
*/
PR_IMPLEMENT(void)
PR_RecordTraceEntries(
- void
+ void
)
{
PRFileDesc *logFile;
@@ -831,14 +831,14 @@ PR_IMPLEMENT(PRIntn)
PRInt32 *found /* number you got */
)
{
- PRInt32 rc;
+ PRInt32 rc;
PRInt32 copied = 0;
-
+
PR_Lock( traceLock );
-
+
/*
** Depending on where the LastSeen and Next indices are,
- ** copy the trace buffer in one or two pieces.
+ ** copy the trace buffer in one or two pieces.
*/
PR_LOG( lm, PR_LOG_ERROR,
("PR_GetTraceEntries: Next: %ld, LastSeen: %ld", next, fetchLastSeen));
diff --git a/pr/src/prvrsion.c b/pr/src/prvrsion.c
index c27b493a..8f42266c 100644
--- a/pr/src/prvrsion.c
+++ b/pr/src/prvrsion.c
@@ -84,7 +84,7 @@ PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint(void)
/*
* Add dummy references to rcsid and sccsid to prevent them
* from being optimized away as unused variables.
- */
+ */
const char *dummy;
dummy = rcsid;
diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c
index f34b0f65..ea1cccf3 100644
--- a/pr/src/pthreads/ptio.c
+++ b/pr/src/pthreads/ptio.c
@@ -189,11 +189,11 @@ static PRBool _pr_ipv6_v6only_on_by_default;
#error "Cannot determine architecture"
#endif
-#if defined(SOLARIS)
+#if defined(SOLARIS)
#ifndef PROTO_SDP
/* on solaris, SDP is a new type of protocol */
#define PROTO_SDP 257
-#endif
+#endif
#define _PR_HAVE_SDP
#elif defined(LINUX)
#ifndef AF_INET_SDP
@@ -280,7 +280,7 @@ static PRBool IsValidNetAddrLen(const PRNetAddr *addr, PRInt32 addr_len)
#if defined(HAVE_SOCKLEN_T) \
|| (defined(__GLIBC__) && __GLIBC__ >= 2)
typedef socklen_t pt_SockLen;
-#elif (defined(AIX) && !defined(AIX4_1))
+#elif (defined(AIX) && !defined(AIX4_1))
typedef PRSize pt_SockLen;
#else
typedef PRIntn pt_SockLen;
@@ -308,7 +308,7 @@ struct pt_Continuation
/*
* For sendfile()
*/
- struct file_spec {
+ struct file_spec {
off_t offset; /* offset in file to send */
size_t nbytes; /* length of file data to send */
size_t st_size; /* file size */
@@ -325,7 +325,7 @@ struct pt_Continuation
int filedesc; /* descriptor of file to send */
int nbytes_to_send; /* size of header and file */
#endif /* HPUX11 */
-
+
#ifdef SOLARIS
/*
* For sendfilev()
@@ -341,7 +341,7 @@ struct pt_Continuation
off_t offset;
size_t count;
#endif /* LINUX */
-
+
PRIntervalTime timeout; /* client (relative) timeout */
PRInt16 event; /* flags for poll()'s events */
@@ -374,7 +374,7 @@ PR_IMPLEMENT(void) PT_FPrintStats(PRFileDesc *debug_out, const char *msg)
LL_SUB(elapsed, PR_Now(), stats.timeStarted);
LL_I2L(aMil, 1000000);
LL_DIV(elapsed, elapsed, aMil);
-
+
if (NULL != msg) PR_fprintf(debug_out, "%s", msg);
PR_fprintf(
debug_out, "\tstarted: %s[%lld]\n", buffer, elapsed);
@@ -416,7 +416,7 @@ static void pt_poll_now_with_select(pt_Continuation *op)
PRIntervalTime epoch, now, elapsed, remaining;
PRBool wait_for_remaining;
PRThread *self = PR_GetCurrentThread();
-
+
PR_ASSERT(PR_INTERVAL_NO_WAIT != op->timeout);
PR_ASSERT(op->arg1.osfd < FD_SETSIZE);
@@ -463,7 +463,7 @@ static void pt_poll_now_with_select(pt_Continuation *op)
revents |= POLLIN;
if ((op->event & POLLOUT) && FD_ISSET(op->arg1.osfd, &wr))
revents |= POLLOUT;
-
+
if (op->function(op, revents))
op->status = pt_continuation_done;
} else if (rv == -1) {
@@ -520,7 +520,7 @@ static void pt_poll_now_with_select(pt_Continuation *op)
revents |= POLLIN;
if ((op->event & POLLOUT) && FD_ISSET(op->arg1.osfd, &wr))
revents |= POLLOUT;
-
+
if (op->function(op, revents))
op->status = pt_continuation_done;
@@ -559,7 +559,7 @@ static void pt_poll_now(pt_Continuation *op)
PRIntervalTime epoch, now, elapsed, remaining;
PRBool wait_for_remaining;
PRThread *self = PR_GetCurrentThread();
-
+
PR_ASSERT(PR_INTERVAL_NO_WAIT != op->timeout);
#if defined (_PR_POLL_WITH_SELECT)
/*
@@ -584,7 +584,7 @@ static void pt_poll_now(pt_Continuation *op)
tmp_pfd.events = op->event;
rv = poll(&tmp_pfd, 1, msecs);
-
+
if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
@@ -642,7 +642,7 @@ static void pt_poll_now(pt_Continuation *op)
msecs = PT_DEFAULT_POLL_MSEC;
}
rv = poll(&tmp_pfd, 1, msecs);
-
+
if (_PT_THREAD_INTERRUPTED(self))
{
self->state &= ~PT_THREAD_ABORTED;
@@ -658,7 +658,7 @@ static void pt_poll_now(pt_Continuation *op)
PRInt16 revents = tmp_pfd.revents;
if ((revents & POLLNVAL) /* busted in all cases */
- || ((events & POLLOUT) && (revents & POLLHUP)))
+ || ((events & POLLOUT) && (revents & POLLHUP)))
/* write op & hup */
{
op->result.code = -1;
@@ -749,7 +749,7 @@ static PRBool pt_read_cont(pt_Continuation *op, PRInt16 revents)
op->result.code = read(
op->arg1.osfd, op->arg2.buffer, op->arg3.amount);
op->syserrno = errno;
- return ((-1 == op->result.code) &&
+ return ((-1 == op->result.code) &&
(EWOULDBLOCK == op->syserrno || EAGAIN == op->syserrno)) ?
PR_FALSE : PR_TRUE;
} /* pt_read_cont */
@@ -773,7 +773,7 @@ static PRBool pt_recv_cont(pt_Continuation *op, PRInt16 revents)
op->arg1.osfd, op->arg2.buffer, op->arg3.amount, op->arg4.flags);
#endif
op->syserrno = errno;
- return ((-1 == op->result.code) &&
+ return ((-1 == op->result.code) &&
(EWOULDBLOCK == op->syserrno || EAGAIN == op->syserrno)) ?
PR_FALSE : PR_TRUE;
} /* pt_recv_cont */
@@ -933,7 +933,7 @@ static PRBool pt_recvfrom_cont(pt_Continuation *op, PRInt16 revents)
op->arg1.osfd, op->arg2.buffer, op->arg3.amount,
op->arg4.flags, (struct sockaddr*)op->arg5.addr, &addr_len);
op->syserrno = errno;
- return ((-1 == op->result.code) &&
+ return ((-1 == op->result.code) &&
(EWOULDBLOCK == op->syserrno || EAGAIN == op->syserrno)) ?
PR_FALSE : PR_TRUE;
} /* pt_recvfrom_cont */
@@ -1041,7 +1041,7 @@ static PRBool pt_hpux_sendfile_cont(pt_Continuation *op, PRInt16 revents)
}
#endif /* HPUX11 */
-#ifdef SOLARIS
+#ifdef SOLARIS
static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents)
{
struct sendfilevec *vec = (struct sendfilevec *) op->arg2.buffer;
@@ -1060,7 +1060,7 @@ static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents)
}
count = xferred;
} else if (count == 0) {
- /*
+ /*
* We are now at EOF. The file was truncated. Solaris sendfile is
* supposed to return 0 and no error in this case, though some versions
* may return -1 and EINVAL .
@@ -1070,7 +1070,7 @@ static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents)
return PR_TRUE;
}
PR_ASSERT(count <= op->nbytes_to_send);
-
+
op->result.code += count;
if (count < op->nbytes_to_send) {
op->nbytes_to_send -= count;
@@ -1094,7 +1094,7 @@ static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents)
}
#endif /* SOLARIS */
-#ifdef LINUX
+#ifdef LINUX
static PRBool pt_linux_sendfile_cont(pt_Continuation *op, PRInt16 revents)
{
ssize_t rv;
@@ -1133,9 +1133,9 @@ void _PR_InitIO(void)
_pr_flock_cv = PR_NewCondVar(_pr_flock_lock);
PR_ASSERT(NULL != _pr_flock_cv);
_pr_rename_lock = PR_NewLock();
- PR_ASSERT(NULL != _pr_rename_lock);
+ PR_ASSERT(NULL != _pr_rename_lock);
- _PR_InitFdCache(); /* do that */
+ _PR_InitFdCache(); /* do that */
_pr_stdin = pt_SetMethods(0, PR_DESC_FILE, PR_FALSE, PR_TRUE);
_pr_stdout = pt_SetMethods(1, PR_DESC_FILE, PR_FALSE, PR_TRUE);
@@ -1170,11 +1170,11 @@ void _PR_CleanupIO(void)
_pr_stdin = NULL;
_PR_Putfd(_pr_stdout);
_pr_stdout = NULL;
- _PR_Putfd(_pr_stderr);
+ _PR_Putfd(_pr_stderr);
_pr_stderr = NULL;
_PR_CleanupFdCache();
-
+
if (_pr_flock_cv)
{
PR_DestroyCondVar(_pr_flock_cv);
@@ -1198,7 +1198,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD osfd)
PR_ASSERT(osfd >= PR_StandardInput && osfd <= PR_StandardError);
if (!_pr_initialized) _PR_ImplicitInitialization();
-
+
switch (osfd)
{
case PR_StandardInput: result = _pr_stdin; break;
@@ -2175,7 +2175,7 @@ static void pt_aix_sendfile_init_routine(void)
dlclose(handle);
}
-/*
+/*
* pt_AIXDispatchSendFile
*/
static PRInt32 pt_AIXDispatchSendFile(PRFileDesc *sd, PRSendFileData *sfd,
@@ -2199,17 +2199,17 @@ static PRInt32 pt_AIXDispatchSendFile(PRFileDesc *sd, PRSendFileData *sfd,
* pt_AIXSendFile
*
* Send file sfd->fd across socket sd. If specified, header and trailer
- * buffers are sent before and after the file, respectively.
+ * buffers are sent before and after the file, respectively.
*
* PR_TRANSMITFILE_CLOSE_SOCKET flag - close socket after sending file
- *
+ *
* return number of bytes sent or -1 on error
*
* This implementation takes advantage of the send_file() system
* call available in AIX 4.3.2.
*/
-static PRInt32 pt_AIXSendFile(PRFileDesc *sd, PRSendFileData *sfd,
+static PRInt32 pt_AIXSendFile(PRFileDesc *sd, PRSendFileData *sfd,
PRTransmitFileFlags flags, PRIntervalTime timeout)
{
struct sf_parms sf_struct;
@@ -2299,14 +2299,14 @@ static PRInt32 pt_AIXSendFile(PRFileDesc *sd, PRSendFileData *sfd,
* buffers are sent before and after the file, respectively.
*
* PR_TRANSMITFILE_CLOSE_SOCKET flag - close socket after sending file
- *
+ *
* return number of bytes sent or -1 on error
*
* This implementation takes advantage of the sendfile() system
* call available in HP-UX B.11.00.
*/
-static PRInt32 pt_HPUXSendFile(PRFileDesc *sd, PRSendFileData *sfd,
+static PRInt32 pt_HPUXSendFile(PRFileDesc *sd, PRSendFileData *sfd,
PRTransmitFileFlags flags, PRIntervalTime timeout)
{
struct stat statbuf;
@@ -2321,7 +2321,7 @@ static PRInt32 pt_HPUXSendFile(PRFileDesc *sd, PRSendFileData *sfd,
if (fstat(sfd->fd->secret->md.osfd, &statbuf) == -1) {
_PR_MD_MAP_FSTAT_ERROR(errno);
return -1;
- }
+ }
file_nbytes_to_send = statbuf.st_size - sfd->file_offset;
} else {
file_nbytes_to_send = sfd->file_nbytes;
@@ -2412,7 +2412,7 @@ static PRInt32 pt_HPUXSendFile(PRFileDesc *sd, PRSendFileData *sfd,
#endif /* HPUX11 */
-#ifdef SOLARIS
+#ifdef SOLARIS
/*
* pt_SolarisSendFile
@@ -2432,9 +2432,9 @@ static PRInt32 pt_SolarisSendFile(PRFileDesc *sd, PRSendFileData *sfd,
PRTransmitFileFlags flags, PRIntervalTime timeout)
{
struct stat statbuf;
- size_t nbytes_to_send, file_nbytes_to_send;
- struct sendfilevec sfv_struct[3];
- int sfvcnt = 0;
+ size_t nbytes_to_send, file_nbytes_to_send;
+ struct sendfilevec sfv_struct[3];
+ int sfvcnt = 0;
size_t xferred;
PRInt32 count;
int syserrno;
@@ -2444,7 +2444,7 @@ static PRInt32 pt_SolarisSendFile(PRFileDesc *sd, PRSendFileData *sfd,
if (fstat(sfd->fd->secret->md.osfd, &statbuf) == -1) {
_PR_MD_MAP_FSTAT_ERROR(errno);
return -1;
- }
+ }
file_nbytes_to_send = statbuf.st_size - sfd->file_offset;
} else {
file_nbytes_to_send = sfd->file_nbytes;
@@ -2455,7 +2455,7 @@ static PRInt32 pt_SolarisSendFile(PRFileDesc *sd, PRSendFileData *sfd,
if (sfd->hlen != 0) {
sfv_struct[sfvcnt].sfv_fd = SFV_FD_SELF;
sfv_struct[sfvcnt].sfv_flag = 0;
- sfv_struct[sfvcnt].sfv_off = (off_t) sfd->header;
+ sfv_struct[sfvcnt].sfv_off = (off_t) sfd->header;
sfv_struct[sfvcnt].sfv_len = sfd->hlen;
sfvcnt++;
}
@@ -2471,7 +2471,7 @@ static PRInt32 pt_SolarisSendFile(PRFileDesc *sd, PRSendFileData *sfd,
if (sfd->tlen != 0) {
sfv_struct[sfvcnt].sfv_fd = SFV_FD_SELF;
sfv_struct[sfvcnt].sfv_flag = 0;
- sfv_struct[sfvcnt].sfv_off = (off_t) sfd->trailer;
+ sfv_struct[sfvcnt].sfv_off = (off_t) sfd->trailer;
sfv_struct[sfvcnt].sfv_len = sfd->tlen;
sfvcnt++;
}
@@ -2480,7 +2480,7 @@ static PRInt32 pt_SolarisSendFile(PRFileDesc *sd, PRSendFileData *sfd,
count = 0;
goto done;
}
-
+
/*
* Strictly speaking, we may have sent some bytes when the
* sendfilev() is interrupted and we should retry it from an
@@ -2555,7 +2555,7 @@ static void pt_solaris_sendfilev_init_routine(void)
{
void *handle;
PRBool close_it = PR_FALSE;
-
+
/*
* We do not want to unload libsendfile.so. This handle is leaked
* intentionally.
@@ -2578,13 +2578,13 @@ static void pt_solaris_sendfilev_init_routine(void)
pt_solaris_sendfilev_fptr = (ssize_t (*)()) dlsym(handle, "sendfilev");
PR_LOG(_pr_io_lm, PR_LOG_DEBUG,
("dlsym(sendfilev) returns %p", pt_solaris_sendfilev_fptr));
-
+
if (close_it) {
dlclose(handle);
}
}
-/*
+/*
* pt_SolarisDispatchSendFile
*/
static PRInt32 pt_SolarisDispatchSendFile(PRFileDesc *sd, PRSendFileData *sfd,
@@ -2613,7 +2613,7 @@ static PRInt32 pt_SolarisDispatchSendFile(PRFileDesc *sd, PRSendFileData *sfd,
* buffers are sent before and after the file, respectively.
*
* PR_TRANSMITFILE_CLOSE_SOCKET flag - close socket after sending file
- *
+ *
* return number of bytes sent or -1 on error
*
* This implementation takes advantage of the sendfile() system
@@ -2624,7 +2624,7 @@ static PRInt32 pt_LinuxSendFile(PRFileDesc *sd, PRSendFileData *sfd,
PRTransmitFileFlags flags, PRIntervalTime timeout)
{
struct stat statbuf;
- size_t file_nbytes_to_send;
+ size_t file_nbytes_to_send;
PRInt32 count = 0;
ssize_t rv;
int syserrno;
@@ -2637,7 +2637,7 @@ static PRInt32 pt_LinuxSendFile(PRFileDesc *sd, PRSendFileData *sfd,
if (fstat(sfd->fd->secret->md.osfd, &statbuf) == -1) {
_PR_MD_MAP_FSTAT_ERROR(errno);
return -1;
- }
+ }
file_nbytes_to_send = statbuf.st_size - sfd->file_offset;
} else {
file_nbytes_to_send = sfd->file_nbytes;
@@ -3132,30 +3132,30 @@ static PRIOMethods _pr_file_methods = {
pt_Seek64,
pt_FileInfo,
pt_FileInfo64,
- (PRWritevFN)_PR_InvalidInt,
- (PRConnectFN)_PR_InvalidStatus,
- (PRAcceptFN)_PR_InvalidDesc,
- (PRBindFN)_PR_InvalidStatus,
- (PRListenFN)_PR_InvalidStatus,
- (PRShutdownFN)_PR_InvalidStatus,
- (PRRecvFN)_PR_InvalidInt,
- (PRSendFN)_PR_InvalidInt,
- (PRRecvfromFN)_PR_InvalidInt,
- (PRSendtoFN)_PR_InvalidInt,
+ (PRWritevFN)_PR_InvalidInt,
+ (PRConnectFN)_PR_InvalidStatus,
+ (PRAcceptFN)_PR_InvalidDesc,
+ (PRBindFN)_PR_InvalidStatus,
+ (PRListenFN)_PR_InvalidStatus,
+ (PRShutdownFN)_PR_InvalidStatus,
+ (PRRecvFN)_PR_InvalidInt,
+ (PRSendFN)_PR_InvalidInt,
+ (PRRecvfromFN)_PR_InvalidInt,
+ (PRSendtoFN)_PR_InvalidInt,
pt_Poll,
- (PRAcceptreadFN)_PR_InvalidInt,
- (PRTransmitfileFN)_PR_InvalidInt,
- (PRGetsocknameFN)_PR_InvalidStatus,
- (PRGetpeernameFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRAcceptreadFN)_PR_InvalidInt,
+ (PRTransmitfileFN)_PR_InvalidInt,
+ (PRGetsocknameFN)_PR_InvalidStatus,
+ (PRGetpeernameFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRGetsocketoptionFN)_PR_InvalidStatus,
(PRSetsocketoptionFN)_PR_InvalidStatus,
- (PRSendfileFN)_PR_InvalidInt,
- (PRConnectcontinueFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
+ (PRConnectcontinueFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -3171,30 +3171,30 @@ static PRIOMethods _pr_pipe_methods = {
(PRSeek64FN)_PR_InvalidInt64,
(PRFileInfoFN)_PR_InvalidStatus,
(PRFileInfo64FN)_PR_InvalidStatus,
- (PRWritevFN)_PR_InvalidInt,
- (PRConnectFN)_PR_InvalidStatus,
- (PRAcceptFN)_PR_InvalidDesc,
- (PRBindFN)_PR_InvalidStatus,
- (PRListenFN)_PR_InvalidStatus,
- (PRShutdownFN)_PR_InvalidStatus,
- (PRRecvFN)_PR_InvalidInt,
- (PRSendFN)_PR_InvalidInt,
- (PRRecvfromFN)_PR_InvalidInt,
- (PRSendtoFN)_PR_InvalidInt,
+ (PRWritevFN)_PR_InvalidInt,
+ (PRConnectFN)_PR_InvalidStatus,
+ (PRAcceptFN)_PR_InvalidDesc,
+ (PRBindFN)_PR_InvalidStatus,
+ (PRListenFN)_PR_InvalidStatus,
+ (PRShutdownFN)_PR_InvalidStatus,
+ (PRRecvFN)_PR_InvalidInt,
+ (PRSendFN)_PR_InvalidInt,
+ (PRRecvfromFN)_PR_InvalidInt,
+ (PRSendtoFN)_PR_InvalidInt,
pt_Poll,
- (PRAcceptreadFN)_PR_InvalidInt,
- (PRTransmitfileFN)_PR_InvalidInt,
- (PRGetsocknameFN)_PR_InvalidStatus,
- (PRGetpeernameFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRAcceptreadFN)_PR_InvalidInt,
+ (PRTransmitfileFN)_PR_InvalidInt,
+ (PRGetsocknameFN)_PR_InvalidStatus,
+ (PRGetpeernameFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRGetsocketoptionFN)_PR_InvalidStatus,
(PRSetsocketoptionFN)_PR_InvalidStatus,
- (PRSendfileFN)_PR_InvalidInt,
- (PRConnectcontinueFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
+ (PRConnectcontinueFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -3233,11 +3233,11 @@ static PRIOMethods _pr_tcp_methods = {
(PRReservedFN)_PR_InvalidInt,
pt_GetSocketOption,
pt_SetSocketOption,
- pt_SendFile,
+ pt_SendFile,
pt_ConnectContinue,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -3272,11 +3272,11 @@ static PRIOMethods _pr_udp_methods = {
(PRReservedFN)_PR_InvalidInt,
pt_GetSocketOption,
pt_SetSocketOption,
- (PRSendfileFN)_PR_InvalidInt,
- (PRConnectcontinueFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
+ (PRConnectcontinueFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -3292,30 +3292,30 @@ static PRIOMethods _pr_socketpollfd_methods = {
(PRSeek64FN)_PR_InvalidInt64,
(PRFileInfoFN)_PR_InvalidStatus,
(PRFileInfo64FN)_PR_InvalidStatus,
- (PRWritevFN)_PR_InvalidInt,
- (PRConnectFN)_PR_InvalidStatus,
- (PRAcceptFN)_PR_InvalidDesc,
- (PRBindFN)_PR_InvalidStatus,
- (PRListenFN)_PR_InvalidStatus,
- (PRShutdownFN)_PR_InvalidStatus,
- (PRRecvFN)_PR_InvalidInt,
- (PRSendFN)_PR_InvalidInt,
- (PRRecvfromFN)_PR_InvalidInt,
- (PRSendtoFN)_PR_InvalidInt,
+ (PRWritevFN)_PR_InvalidInt,
+ (PRConnectFN)_PR_InvalidStatus,
+ (PRAcceptFN)_PR_InvalidDesc,
+ (PRBindFN)_PR_InvalidStatus,
+ (PRListenFN)_PR_InvalidStatus,
+ (PRShutdownFN)_PR_InvalidStatus,
+ (PRRecvFN)_PR_InvalidInt,
+ (PRSendFN)_PR_InvalidInt,
+ (PRRecvfromFN)_PR_InvalidInt,
+ (PRSendtoFN)_PR_InvalidInt,
pt_Poll,
- (PRAcceptreadFN)_PR_InvalidInt,
- (PRTransmitfileFN)_PR_InvalidInt,
- (PRGetsocknameFN)_PR_InvalidStatus,
- (PRGetpeernameFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRAcceptreadFN)_PR_InvalidInt,
+ (PRTransmitfileFN)_PR_InvalidInt,
+ (PRGetsocknameFN)_PR_InvalidStatus,
+ (PRGetpeernameFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRGetsocketoptionFN)_PR_InvalidStatus,
(PRSetsocketoptionFN)_PR_InvalidStatus,
- (PRSendfileFN)_PR_InvalidInt,
- (PRConnectcontinueFN)_PR_InvalidStatus,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
- (PRReservedFN)_PR_InvalidInt,
+ (PRSendfileFN)_PR_InvalidInt,
+ (PRConnectcontinueFN)_PR_InvalidStatus,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
+ (PRReservedFN)_PR_InvalidInt,
(PRReservedFN)_PR_InvalidInt
};
@@ -3368,7 +3368,7 @@ static PRFileDesc *pt_SetMethods(
PRIntn osfd, PRDescType type, PRBool isAcceptedSocket, PRBool imported)
{
PRFileDesc *fd = _PR_Getfd();
-
+
if (fd == NULL) PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
else
{
@@ -3457,7 +3457,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_AllocFileDesc(
fd->secret->state = _PR_FILEDESC_OPEN;
fd->secret->inheritable = _PR_TRI_UNKNOWN;
return fd;
-
+
failed:
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
return fd;
@@ -3549,7 +3549,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto)
#if defined(_PR_INET6_PROBE)
if (PR_AF_INET6 == domain)
domain = _pr_ipv6_is_present() ? AF_INET6 : AF_INET;
-#elif defined(_PR_INET6)
+#elif defined(_PR_INET6)
if (PR_AF_INET6 == domain)
domain = AF_INET6;
#else
@@ -3578,7 +3578,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto)
#if defined(_PR_INET6_PROBE) || !defined(_PR_INET6)
if (fd != NULL) {
/*
- * For platforms with no support for IPv6
+ * For platforms with no support for IPv6
* create layered socket for IPv4-mapped IPv6 addresses
*/
if (PR_AF_INET6 == tmp_domain && PR_AF_INET == domain) {
@@ -3694,7 +3694,7 @@ PR_IMPLEMENT(PRStatus) PR_Access(const char *name, PRAccessHow how)
if (0 == rv) return PR_SUCCESS;
pt_MapError(_PR_MD_MAP_ACCESS_ERROR, errno);
return PR_FAILURE;
-
+
} /* PR_Access */
PR_IMPLEMENT(PRStatus) PR_GetFileInfo(const char *fn, PRFileInfo *info)
@@ -3722,7 +3722,7 @@ PR_IMPLEMENT(PRStatus) PR_Rename(const char *from, const char *to)
** We have to acquire a lock here to stiffle anybody trying to create
** a new file at the same time. And we have to hold that lock while we
** test to see if the file exists and do the rename. The other place
- ** where the lock is held is in PR_Open() when possibly creating a
+ ** where the lock is held is in PR_Open() when possibly creating a
** new file.
*/
@@ -4334,7 +4334,7 @@ retry:
}
}
}
- } else
+ } else
_PR_MD_MAP_SELECT_ERROR(oserror);
}
else if (ready > 0)
@@ -4652,7 +4652,7 @@ PR_IMPLEMENT(PRStatus) PR_LockFile(PRFileDesc *fd)
fd->secret->lockCount += 1;
}
PR_Unlock(_pr_flock_lock);
-
+
return status;
} /* PR_LockFile */
@@ -4670,7 +4670,7 @@ PR_IMPLEMENT(PRStatus) PR_TLockFile(PRFileDesc *fd)
}
else fd->secret->lockCount += 1;
PR_Unlock(_pr_flock_lock);
-
+
return status;
} /* PR_TLockFile */
@@ -4704,7 +4704,7 @@ PR_IMPLEMENT(PRInt32) PR_GetSysfdTableMax(void)
#else
struct rlimit rlim;
- if ( getrlimit(RLIMIT_NOFILE, &rlim) < 0)
+ if ( getrlimit(RLIMIT_NOFILE, &rlim) < 0)
return -1;
return rlim.rlim_max;
@@ -4728,7 +4728,7 @@ PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(PRIntn table_size)
else
rlim.rlim_cur = table_size;
- if ( setrlimit(RLIMIT_NOFILE, &rlim) < 0)
+ if ( setrlimit(RLIMIT_NOFILE, &rlim) < 0)
return -1;
return rlim.rlim_cur;
@@ -4854,7 +4854,7 @@ _PR_getset(PR_fd_set *pr_set, fd_set *set)
if (!pr_set)
return 0;
-
+
FD_ZERO(set);
/* First set the pr file handle osfds */
@@ -4896,7 +4896,7 @@ _PR_setset(PR_fd_set *pr_set, fd_set *set)
}
PR_IMPLEMENT(PRInt32) PR_Select(
- PRInt32 unused, PR_fd_set *pr_rd, PR_fd_set *pr_wr,
+ PRInt32 unused, PR_fd_set *pr_rd, PR_fd_set *pr_wr,
PR_fd_set *pr_ex, PRIntervalTime timeout)
{
fd_set rd, wr, ex;
@@ -4963,7 +4963,7 @@ retry:
}
#endif /* defined(_PR_PTHREADS) */
-#ifdef MOZ_UNICODE
+#ifdef MOZ_UNICODE
/* ================ UTF16 Interfaces ================================ */
PR_IMPLEMENT(PRFileDesc*) PR_OpenFileUTF16(
const PRUnichar *name, PRIntn flags, PRIntn mode)
diff --git a/pr/src/pthreads/ptmisc.c b/pr/src/pthreads/ptmisc.c
index bbc6d56b..9750c251 100644
--- a/pr/src/pthreads/ptmisc.c
+++ b/pr/src/pthreads/ptmisc.c
@@ -22,10 +22,10 @@
void _PR_InitCPUs(void) {PT_LOG("_PR_InitCPUs")}
void _PR_InitStacks(void) {PT_LOG("_PR_InitStacks")}
-PR_IMPLEMENT(void) PR_SetConcurrency(PRUintn numCPUs)
+PR_IMPLEMENT(void) PR_SetConcurrency(PRUintn numCPUs)
{
#ifdef SOLARIS
- thr_setconcurrency(numCPUs);
+ thr_setconcurrency(numCPUs);
#else
PT_LOG("PR_SetConcurrency");
#endif
diff --git a/pr/src/pthreads/ptsynch.c b/pr/src/pthreads/ptsynch.c
index ad337c26..86bc6dae 100644
--- a/pr/src/pthreads/ptsynch.c
+++ b/pr/src/pthreads/ptsynch.c
@@ -47,7 +47,7 @@ pt_pthread_mutex_is_locked(pthread_mutex_t *m)
void _PR_InitLocks(void)
{
int rv;
- rv = _PT_PTHREAD_MUTEXATTR_INIT(&_pt_mattr);
+ rv = _PT_PTHREAD_MUTEXATTR_INIT(&_pt_mattr);
PR_ASSERT(0 == rv);
#if (defined(LINUX) && (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) || \
@@ -136,7 +136,7 @@ PR_IMPLEMENT(PRLock*) PR_NewLock(void)
lock = PR_NEWZAP(PRLock);
if (lock != NULL)
{
- rv = _PT_PTHREAD_MUTEX_INIT(lock->mutex, _pt_mattr);
+ rv = _PT_PTHREAD_MUTEX_INIT(lock->mutex, _pt_mattr);
PR_ASSERT(0 == rv);
}
#if defined(DEBUG)
@@ -174,7 +174,7 @@ PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
PR_ASSERT(NULL == lock->notified.link);
PR_ASSERT(PR_FALSE == lock->locked);
/* Nb: the order of the next two statements is not critical to
- * the correctness of PR_AssertCurrentThreadOwnsLock(), but
+ * the correctness of PR_AssertCurrentThreadOwnsLock(), but
* this particular order makes the assertion more likely to
* catch errors. */
lock->owner = pthread_self();
@@ -213,8 +213,8 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock *lock)
PR_IMPLEMENT(void) PR_AssertCurrentThreadOwnsLock(PRLock *lock)
{
- /* Nb: the order of the |locked| and |owner==me| checks is not critical
- * to the correctness of PR_AssertCurrentThreadOwnsLock(), but
+ /* Nb: the order of the |locked| and |owner==me| checks is not critical
+ * to the correctness of PR_AssertCurrentThreadOwnsLock(), but
* this particular order makes the assertion more likely to
* catch errors. */
PR_ASSERT(lock->locked && pthread_equal(lock->owner, pthread_self()));
@@ -409,7 +409,7 @@ aborted:
PR_IMPLEMENT(PRStatus) PR_NotifyCondVar(PRCondVar *cvar)
{
- PR_ASSERT(cvar != NULL);
+ PR_ASSERT(cvar != NULL);
pt_PostNotifyToCvar(cvar, PR_FALSE);
return PR_SUCCESS;
} /* PR_NotifyCondVar */
@@ -543,7 +543,7 @@ PR_IMPLEMENT(void) PR_DestroyMonitor(PRMonitor *mon)
}
} /* PR_DestroyMonitor */
-/* The GC uses this; it is quite arguably a bad interface. I'm just
+/* The GC uses this; it is quite arguably a bad interface. I'm just
* duplicating it for now - XXXMB
*/
PR_IMPLEMENT(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon)
@@ -667,7 +667,7 @@ PR_IMPLEMENT(PRStatus) PR_Wait(PRMonitor *mon, PRIntervalTime timeout)
PR_ASSERT(pthread_equal(mon->owner, pthread_self()));
/* tuck these away 'till later */
- saved_entries = mon->entryCount;
+ saved_entries = mon->entryCount;
mon->entryCount = 0;
_PT_PTHREAD_COPY_THR_HANDLE(mon->owner, saved_owner);
_PT_PTHREAD_INVALIDATE_THR_HANDLE(mon->owner);
@@ -901,7 +901,7 @@ PR_IMPLEMENT(PRStatus) PR_DeleteSemaphore(const char *name)
}
return PR_SUCCESS;
}
-
+
#elif defined(_PR_HAVE_SYSV_SEMAPHORES)
#include <fcntl.h>
@@ -1106,7 +1106,7 @@ PR_IMPLEMENT(PRStatus) PR_DeleteSemaphore(const char *name)
}
unused.val = 0;
if (semctl(semid, 0, IPC_RMID, unused) == -1)
- {
+ {
_PR_MD_MAP_DEFAULT_ERROR(errno);
return PR_FAILURE;
}
diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c
index 01508002..681380d7 100644
--- a/pr/src/pthreads/ptthread.c
+++ b/pr/src/pthreads/ptthread.c
@@ -371,7 +371,7 @@ static PRThread* _PR_CreateThread(
if (PR_LOCAL_THREAD == scope)
scope = PR_GLOBAL_THREAD;
-
+
if (PR_GLOBAL_BOUND_THREAD == scope) {
#if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
rv = pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM);
@@ -505,7 +505,7 @@ PR_IMPLEMENT(PRThread*) PR_CreateThread(
} /* PR_CreateThread */
PR_IMPLEMENT(PRThread*) PR_CreateThreadGCAble(
- PRThreadType type, void (*start)(void *arg), void *arg,
+ PRThreadType type, void (*start)(void *arg), void *arg,
PRThreadPriority priority, PRThreadScope scope,
PRThreadState state, PRUint32 stackSize)
{
@@ -517,7 +517,7 @@ PR_IMPLEMENT(void*) GetExecutionEnvironment(PRThread *thred)
{
return thred->environment;
} /* GetExecutionEnvironment */
-
+
PR_IMPLEMENT(void) SetExecutionEnvironment(PRThread *thred, void *env)
{
thred->environment = env;
@@ -809,7 +809,7 @@ static void _pt_thread_death(void *arg)
PR_ASSERT(0 == rv);
}
- /* PR_TRUE for: call destructors */
+ /* PR_TRUE for: call destructors */
_pt_thread_death_internal(arg, PR_TRUE);
if (NULL == thred)
@@ -898,7 +898,7 @@ void _PR_InitThreads(
pt_book.maxPrio = PT_PRIO_MAX;
#endif
#endif
-
+
PR_ASSERT(NULL == pt_book.ml);
pt_book.ml = PR_NewLock();
PR_ASSERT(NULL != pt_book.ml);
@@ -1032,7 +1032,7 @@ void _PR_Fini(void)
int rv;
if (!_pr_initialized) {
- /* Either NSPR was never successfully initialized or
+ /* Either NSPR was never successfully initialized or
* PR_Cleanup has been called already. */
if (pt_book.keyCreated)
{
@@ -1047,7 +1047,7 @@ void _PR_Fini(void)
if (NULL != thred)
{
/*
- * PR_FALSE, because it is unsafe to call back to the
+ * PR_FALSE, because it is unsafe to call back to the
* thread private data destructors at final cleanup.
*/
_pt_thread_death_internal(thred, PR_FALSE);
@@ -1153,7 +1153,7 @@ PR_SetThreadDumpProc(PRThread* thread, PRThreadDumpProc dump, void *arg)
thread->dumpArg = arg;
}
-/*
+/*
* Garbage collection support follows.
*/
@@ -1205,7 +1205,7 @@ static void init_pthread_gc_support(void)
sigact_null.sa_flags = SA_RESTART;
sigemptyset (&sigact_null.sa_mask);
rv = sigaction (SIGUSR1, &sigact_null, NULL);
- PR_ASSERT(0 ==rv);
+ PR_ASSERT(0 ==rv);
}
#endif /* defined(PT_NO_SIGTIMEDWAIT) */
}
@@ -1267,8 +1267,8 @@ PR_IMPLEMENT(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg)
if (_PT_IS_GCABLE_THREAD(thred))
{
PR_ASSERT((thred == me) || (thred->suspend & PT_THREAD_SUSPENDED));
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
- ("In PR_EnumerateThreads callback thread %p thid = %X\n",
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ ("In PR_EnumerateThreads callback thread %p thid = %X\n",
thred, thred->id));
rv = func(thred, count++, arg);
@@ -1277,13 +1277,13 @@ PR_IMPLEMENT(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg)
}
thred = next;
}
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
("End PR_EnumerateThreads count = %d \n", count));
return rv;
} /* PR_EnumerateThreads */
/*
- * PR_SuspendAll and PR_ResumeAll are called during garbage collection. The strategy
+ * PR_SuspendAll and PR_ResumeAll are called during garbage collection. The strategy
* we use is to send a SIGUSR2 signal to every gc able thread that we intend to suspend.
* The signal handler will record the stack pointer and will block until resumed by
* the resume call. Since the signal handler is the last routine called for the
@@ -1296,20 +1296,20 @@ PR_IMPLEMENT(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg)
/*
* In the signal handler, we can not use condition variable notify or wait.
- * This does not work consistently across all pthread platforms. We also can not
+ * This does not work consistently across all pthread platforms. We also can not
* use locking since that does not seem to work reliably across platforms.
* Only thing we can do is yielding while testing for a global condition
* to change. This does work on pthread supported platforms. We may have
* to play with priortities if there are any problems detected.
*/
- /*
+ /*
* In AIX, you cannot use ANY pthread calls in the signal handler except perhaps
* pthread_yield. But that is horribly inefficient. Hence we use only sigwait, no
* sigtimedwait is available. We need to use another user signal, SIGUSR1. Actually
* SIGUSR1 is also used by exec in Java. So our usage here breaks the exec in Java,
* for AIX. You cannot use pthread_cond_wait or pthread_delay_np in the signal
- * handler as all synchronization mechanisms just break down.
+ * handler as all synchronization mechanisms just break down.
*/
#if defined(PT_NO_SIGTIMEDWAIT)
@@ -1327,8 +1327,8 @@ static void suspend_signal_handler(PRIntn sig)
PR_ASSERT(_PT_IS_GCABLE_THREAD(me));
PR_ASSERT((me->suspend & PT_THREAD_SUSPENDED) == 0);
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
- ("Begin suspend_signal_handler thred %p thread id = %X\n",
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ ("Begin suspend_signal_handler thred %p thread id = %X\n",
me, me->id));
/*
@@ -1336,10 +1336,10 @@ static void suspend_signal_handler(PRIntn sig)
*/
me->sp = &me;
- /*
+ /*
At this point, the thread's stack pointer has been saved,
And it is going to enter a wait loop until it is resumed.
- So it is _really_ suspended
+ So it is _really_ suspended
*/
me->suspend |= PT_THREAD_SUSPENDED;
@@ -1371,12 +1371,12 @@ static void suspend_signal_handler(PRIntn sig)
/*
* At this point, thread has been resumed, so set a global condition.
- * The ResumeAll needs to know that this has really been resumed.
- * So the signal handler sets a flag which PR_ResumeAll will reset.
+ * The ResumeAll needs to know that this has really been resumed.
+ * So the signal handler sets a flag which PR_ResumeAll will reset.
* The PR_ResumeAll must reset this flag ...
*/
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
("End suspend_signal_handler thred = %p tid = %X\n", me, me->id));
} /* suspend_signal_handler */
@@ -1384,7 +1384,7 @@ static void pt_SuspendSet(PRThread *thred)
{
PRIntn rv;
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
("pt_SuspendSet thred %p thread id = %X\n", thred, thred->id));
@@ -1394,7 +1394,7 @@ static void pt_SuspendSet(PRThread *thred)
PR_ASSERT((thred->suspend & PT_THREAD_SUSPENDED) == 0);
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
("doing pthread_kill in pt_SuspendSet thred %p tid = %X\n",
thred, thred->id));
rv = pthread_kill (thred->id, SIGUSR2);
@@ -1403,14 +1403,14 @@ static void pt_SuspendSet(PRThread *thred)
static void pt_SuspendTest(PRThread *thred)
{
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
("Begin pt_SuspendTest thred %p thread id = %X\n", thred, thred->id));
/*
* Wait for the thread to be really suspended. This happens when the
* suspend signal handler stores the stack pointer and sets the state
- * to suspended.
+ * to suspended.
*/
#if defined(PT_NO_SIGTIMEDWAIT)
@@ -1435,7 +1435,7 @@ static void pt_SuspendTest(PRThread *thred)
static void pt_ResumeSet(PRThread *thred)
{
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
("pt_ResumeSet thred %p thread id = %X\n", thred, thred->id));
/*
@@ -1456,12 +1456,12 @@ static void pt_ResumeSet(PRThread *thred)
static void pt_ResumeTest(PRThread *thred)
{
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
("Begin pt_ResumeTest thred %p thread id = %X\n", thred, thred->id));
/*
* Wait for the threads resume state to change
- * to indicate it is really resumed
+ * to indicate it is really resumed
*/
#if defined(PT_NO_SIGTIMEDWAIT)
pthread_mutex_lock(&thred->suspendResumeMutex);
@@ -1576,8 +1576,8 @@ PR_IMPLEMENT(void) PR_ResumeAll(void)
/* Return the stack pointer for the given thread- used by the GC */
PR_IMPLEMENT(void *)PR_GetSP(PRThread *thred)
{
- PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
- ("in PR_GetSP thred %p thid = %X, sp = %p\n",
+ PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS,
+ ("in PR_GetSP thred %p thid = %X, sp = %p\n",
thred, thred->id, thred->sp));
return thred->sp;
} /* PR_GetSP */
diff --git a/pr/src/threads/combined/prucpu.c b/pr/src/threads/combined/prucpu.c
index 3913dc8d..c1b37aaf 100644
--- a/pr/src/threads/combined/prucpu.c
+++ b/pr/src/threads/combined/prucpu.c
@@ -119,7 +119,7 @@ static _PRCPUQueue *_PR_CreateCPUQueue(void)
PRInt32 index;
_PRCPUQueue *cpuQueue;
cpuQueue = PR_NEWZAP(_PRCPUQueue);
-
+
_MD_NEW_LOCK( &cpuQueue->runQLock );
_MD_NEW_LOCK( &cpuQueue->sleepQLock );
_MD_NEW_LOCK( &cpuQueue->miscQLock );
@@ -191,7 +191,7 @@ static PRStatus _PR_StartCPU(_PRCPU *cpu, PRThread *thread)
cpu->last_clock = PR_IntervalNow();
/* Before we create any threads on this CPU we have to
- * set the current CPU
+ * set the current CPU
*/
_PR_MD_SET_CURRENT_CPU(cpu);
_PR_MD_INIT_RUNNING_CPU(cpu);
@@ -210,7 +210,7 @@ static PRStatus _PR_StartCPU(_PRCPU *cpu, PRThread *thread)
/* didn't clean up CPU queue XXXMB */
PR_DELETE(cpu);
return PR_FAILURE;
- }
+ }
PR_ASSERT(cpu->idle_thread->cpu == cpu);
cpu->idle_thread->no_sched = 0;
@@ -374,7 +374,7 @@ PR_IMPLEMENT(void) PR_SetConcurrency(PRUintn numCPUs)
if (_native_threads_only)
return;
-
+
_PR_CPU_LIST_LOCK();
if (_pr_numCPU < numCPUs) {
newCPU = numCPUs - _pr_numCPU;
diff --git a/pr/src/threads/combined/prucv.c b/pr/src/threads/combined/prucv.c
index d0bf4c42..97c596fb 100644
--- a/pr/src/threads/combined/prucv.c
+++ b/pr/src/threads/combined/prucv.c
@@ -10,10 +10,10 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
@@ -86,8 +86,8 @@ PRBool _PR_NotifyThread (PRThread *thread, PRThread *me)
} else {
_PR_THREAD_UNLOCK(thread);
rv = PR_FALSE;
- }
- }
+ }
+ }
return rv;
}
@@ -142,7 +142,7 @@ void _PR_NotifyLockedThread (PRThread *thread)
thread->state = _PR_RUNNING;
_PR_THREAD_UNLOCK(thread);
_PR_MD_WAKEUP_WAITER(thread);
- }
+ }
_PR_CVAR_UNLOCK(cvar);
return;
@@ -216,9 +216,9 @@ PRStatus _PR_WaitCondVar(
}
_PR_CVAR_UNLOCK(cvar);
_PR_THREAD_UNLOCK(thread);
-
- /*
- ** Release lock protecting the condition variable and thereby giving time
+
+ /*
+ ** Release lock protecting the condition variable and thereby giving time
** to the next thread which can potentially notify on the condition variable
*/
PR_Unlock(lock);
@@ -307,7 +307,7 @@ void _PR_ClockInterrupt(void)
PRThread *thread, *me = _PR_MD_CURRENT_THREAD();
_PRCPU *cpu = me->cpu;
PRIntervalTime elapsed, now;
-
+
PR_ASSERT(_PR_MD_GET_INTSOFF() != 0);
/* Figure out how much time elapsed since the last clock tick */
now = PR_IntervalNow();
@@ -610,7 +610,7 @@ PR_IMPLEMENT(void) PRP_DestroyNakedCondVar(PRCondVar *cvar)
PR_ASSERT(_PR_NAKED_CV_LOCK == cvar->lock);
_PR_MD_FREE_LOCK(&(cvar->ilock));
-
+
PR_DELETE(cvar);
}
diff --git a/pr/src/threads/combined/prulock.c b/pr/src/threads/combined/prulock.c
index 8b2f41ee..3d459dd5 100644
--- a/pr/src/threads/combined/prulock.c
+++ b/pr/src/threads/combined/prulock.c
@@ -7,10 +7,10 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
@@ -99,7 +99,7 @@ void _PR_UnblockLockWaiter(PRLock *lock)
/* Unblock first waiter */
t = _PR_THREAD_CONDQ_PTR(q);
- /*
+ /*
** We are about to change the thread's state to runnable and for local
** threads, we are going to assign a cpu to it. So, protect thread's
** data structure.
@@ -128,9 +128,9 @@ void _PR_UnblockLockWaiter(PRLock *lock)
** thread, we just assign our own cpu to that thread and put it on
** the cpu's run queue. If the the currently running thread is a
** native thread, we assign the primordial cpu to it (on NT,
- ** MD_WAKEUP handles the cpu assignment).
+ ** MD_WAKEUP handles the cpu assignment).
*/
-
+
if ( !_PR_IS_NATIVE_THREAD(t) ) {
t->state = _PR_RUNNABLE;
@@ -206,10 +206,10 @@ PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
PRThread *t;
PRCList *q;
- PR_ASSERT(me != suspendAllThread);
+ PR_ASSERT(me != suspendAllThread);
PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
PR_ASSERT(lock != NULL);
-#ifdef _PR_GLOBAL_THREADS_ONLY
+#ifdef _PR_GLOBAL_THREADS_ONLY
_PR_MD_LOCK(&lock->ilock);
PR_ASSERT(lock->owner == 0);
lock->owner = me;
@@ -258,7 +258,7 @@ retry:
}
#endif
- /*
+ /*
Add this thread to the asked for lock's list of waiting threads. We
add this thread thread in the right priority order so when the unlock
occurs, the thread with the higher priority will get the lock.
@@ -285,7 +285,7 @@ retry:
}
PR_INSERT_BEFORE(&me->waitQLinks, q);
- /*
+ /*
Now grab the threadLock since we are about to change the state. We have
to do this since a PR_Suspend or PR_SetThreadPriority type call that takes
a PRThread* as an argument could be changing the state of this thread from
@@ -317,13 +317,13 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock *lock)
PR_ASSERT(lock != NULL);
PR_ASSERT(lock->owner == me);
- PR_ASSERT(me != suspendAllThread);
+ PR_ASSERT(me != suspendAllThread);
PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
if (lock->owner != me) {
return PR_FAILURE;
}
-#ifdef _PR_GLOBAL_THREADS_ONLY
+#ifdef _PR_GLOBAL_THREADS_ONLY
lock->owner = 0;
_PR_MD_UNLOCK(&lock->ilock);
return PR_SUCCESS;
@@ -397,7 +397,7 @@ PR_IMPLEMENT(PRBool) PR_TestAndLock(PRLock *lock)
PRBool rv = PR_FALSE;
PRIntn is;
-#ifdef _PR_GLOBAL_THREADS_ONLY
+#ifdef _PR_GLOBAL_THREADS_ONLY
is = _PR_MD_TEST_AND_LOCK(&lock->ilock);
if (is == 0) {
lock->owner = me;
diff --git a/pr/src/threads/combined/prustack.c b/pr/src/threads/combined/prustack.c
index 59562bac..f4b760dc 100644
--- a/pr/src/threads/combined/prustack.c
+++ b/pr/src/threads/combined/prustack.c
@@ -141,7 +141,7 @@ PRThreadStack *_PR_NewStack(PRUint32 stackSize)
ts->allocBase, ts->allocBase + ts->allocSize - 1,
ts->allocBase + REDZONE,
ts->allocBase + REDZONE + stackSize - 1));
-
+
_PR_MD_INIT_STACK(ts,REDZONE);
return ts;
diff --git a/pr/src/threads/combined/pruthr.c b/pr/src/threads/combined/pruthr.c
index 436acf84..fe0c4293 100644
--- a/pr/src/threads/combined/pruthr.c
+++ b/pr/src/threads/combined/pruthr.c
@@ -7,7 +7,7 @@
#include <signal.h>
#include <string.h>
-#if defined(WIN95)
+#if defined(WIN95)
/*
** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
@@ -15,7 +15,7 @@
**
*/
#pragma warning(disable : 4101)
-#endif
+#endif
/* _pr_activeLock protects the following global variables */
PRLock *_pr_activeLock;
@@ -28,7 +28,7 @@ PRInt32 _pr_primordialExitCount; /* In PR_Cleanup(), the primordial thread
* If the primordial thread is a system
* thread, then _pr_primordialExitCount
* is 0. If the primordial thread is
- * itself a user thread, then
+ * itself a user thread, then
* _pr_primordialThread is 1.
*/
PRCondVar *_pr_primordialExitCVar; /* When _pr_userActive is decremented to
@@ -195,7 +195,7 @@ void _PR_NotifyJoinWaiters(PRThread *thread)
** Notify on our "termination" condition variable so that joining
** thread will know about our termination. Switch our context and
** come back later on to continue the cleanup.
- */
+ */
PR_ASSERT(thread == _PR_MD_CURRENT_THREAD());
if (thread->term != NULL) {
PR_Lock(_pr_terminationCVLock);
@@ -517,7 +517,7 @@ static void _PR_UserRunThread(void)
/* All done, time to go away */
_PR_CleanupThread(thread);
- _PR_INTSOFF(is);
+ _PR_INTSOFF(is);
_PR_NotifyJoinWaiters(thread);
@@ -704,12 +704,12 @@ static void _PR_Resume(PRThread *thread)
/* PR_ASSERT(thread->wait.monitor->stickyCount == 0); */
break;
- case _PR_LOCK_WAIT:
+ case _PR_LOCK_WAIT:
{
PRLock *wLock = thread->wait.lock;
thread->flags &= ~_PR_SUSPENDING;
-
+
_PR_LOCK_LOCK(wLock);
if (thread->wait.lock->owner == 0) {
_PR_UnblockLockWaiter(thread->wait.lock);
@@ -762,7 +762,7 @@ static PRThread *get_thread(_PRCPU *cpu, PRBool *wakeup_cpus)
thread = NULL;
for (pri = priMax; pri >= priMin ; pri-- ) {
if (r & (1 << pri)) {
- for (qp = _PR_RUNQ(cpu)[pri].next;
+ for (qp = _PR_RUNQ(cpu)[pri].next;
qp != &_PR_RUNQ(cpu)[pri];
qp = qp->next) {
thread = _PR_THREAD_PTR(qp);
@@ -874,7 +874,7 @@ void _PR_Schedule(void)
thread = NULL;
for (pri = priMax; pri >= priMin ; pri-- ) {
if (r & (1 << pri)) {
- for (qp = _PR_RUNQ(cpu)[pri].next;
+ for (qp = _PR_RUNQ(cpu)[pri].next;
qp != &_PR_RUNQ(cpu)[pri];
qp = qp->next) {
thread = _PR_THREAD_PTR(qp);
@@ -935,17 +935,17 @@ found_thread:
("switching to %d[%p]", thread->id, thread));
PR_ASSERT(thread->state != _PR_RUNNING);
thread->state = _PR_RUNNING;
-
+
/* If we are on the runq, it just means that we went to sleep on some
* resource, and by the time we got here another real native thread had
- * already given us the resource and put us back on the runqueue
+ * already given us the resource and put us back on the runqueue
*/
PR_ASSERT(thread->cpu == _PR_MD_CURRENT_CPU());
- if (thread != me)
+ if (thread != me)
_PR_MD_RESTORE_CONTEXT(thread);
#if 0
- /* XXXMB; with setjmp/longjmp it is impossible to land here, but
- * it is not with fibers... Is this a bad thing? I believe it is
+ /* XXXMB; with setjmp/longjmp it is impossible to land here, but
+ * it is not with fibers... Is this a bad thing? I believe it is
* still safe.
*/
PR_NOT_REACHED("impossible return from schedule");
@@ -953,8 +953,8 @@ found_thread:
}
/*
-** Attaches a thread.
-** Does not set the _PR_MD_CURRENT_THREAD.
+** Attaches a thread.
+** Does not set the _PR_MD_CURRENT_THREAD.
** Does not specify the scope of the thread.
*/
static PRThread *
@@ -989,7 +989,7 @@ _PR_AttachThread(PRThreadType type, PRThreadPriority priority,
-PR_IMPLEMENT(PRThread*)
+PR_IMPLEMENT(PRThread*)
_PR_NativeCreateThread(PRThreadType type,
void (*start)(void *arg),
void *arg,
@@ -1025,7 +1025,7 @@ _PR_NativeCreateThread(PRThreadType type,
thread->startFunc = start;
thread->arg = arg;
- /*
+ /*
Set thread flags related to scope and joinable state. If joinable
thread, allocate a "termination" conidition variable.
*/
@@ -1077,7 +1077,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
PRIntn useRecycled = 0;
PRBool status;
- /*
+ /*
First, pin down the priority. Not all compilers catch passing out of
range enum here. If we let bad values thru, priority queues won't work.
*/
@@ -1086,7 +1086,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
} else if (priority < PR_PRIORITY_FIRST) {
priority = PR_PRIORITY_FIRST;
}
-
+
if (!_pr_initialized) _PR_ImplicitInitialization();
if (! (flags & _PR_IDLE_THREAD))
@@ -1138,7 +1138,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
else PR_ATOMIC_INCREMENT(&_pr_userActive);
if (state == PR_JOINABLE_THREAD) {
- if (!thread->term)
+ if (!thread->term)
thread->term = PR_NewCondVar(_pr_terminationCVLock);
}
else {
@@ -1156,7 +1156,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
return thread;
}
}
- thread = _PR_NativeCreateThread(type, start, arg, priority,
+ thread = _PR_NativeCreateThread(type, start, arg, priority,
scope, state, stackSize, flags);
} else {
if (_PR_NUM_DEADUSER > 0) {
@@ -1167,7 +1167,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
} else {
PRCList *ptr;
- /* Go down list checking for a recycled thread with a
+ /* Go down list checking for a recycled thread with a
* large enough stack. XXXMB - this has a bad degenerate case.
*/
ptr = _PR_DEADUSERQ.next;
@@ -1182,7 +1182,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
ptr = ptr->next;
thread = NULL;
}
- }
+ }
_PR_DEADQ_UNLOCK;
@@ -1192,7 +1192,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
thread->arg = arg;
thread->priority = priority;
if (state == PR_JOINABLE_THREAD) {
- if (!thread->term)
+ if (!thread->term)
thread->term = PR_NewCondVar(_pr_terminationCVLock);
} else {
if(thread->term) {
@@ -1203,7 +1203,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
useRecycled++;
}
}
- }
+ }
if (thread == NULL) {
#ifndef HAVE_CUSTOM_USER_THREADS
stack = _PR_NewStack(stackSize);
@@ -1290,7 +1290,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
return NULL;
}
- /*
+ /*
Set thread flags related to scope and joinable state. If joinable
thread, allocate a "termination" condition variable.
*/
@@ -1307,9 +1307,9 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
return NULL;
}
}
-
+
}
-
+
/* Update thread type counter */
PR_Lock(_pr_activeLock);
thread->flags = flags;
@@ -1347,7 +1347,7 @@ PR_IMPLEMENT(PRThread*) _PR_CreateThread(PRThreadType type,
** If the creating thread is a kernel thread, we need to
** awaken the user thread idle thread somehow; potentially
** it could be sleeping in its idle loop, and we need to poke
- ** it. To do so, wake the idle thread...
+ ** it. To do so, wake the idle thread...
*/
_PR_MD_WAKEUP_WAITER(NULL);
} else if (_PR_IS_NATIVE_THREAD(me)) {
@@ -1368,7 +1368,7 @@ PR_IMPLEMENT(PRThread*) PR_CreateThread(PRThreadType type,
PRThreadState state,
PRUint32 stackSize)
{
- return _PR_CreateThread(type, start, arg, priority, scope, state,
+ return _PR_CreateThread(type, start, arg, priority, scope, state,
stackSize, 0);
}
@@ -1483,7 +1483,7 @@ void _PRI_DetachThread(void)
_PR_MD_CLEAN_THREAD(me);
_PR_MD_SET_CURRENT_THREAD(NULL);
- if (!me->threadAllocatedOnStack)
+ if (!me->threadAllocatedOnStack)
PR_DELETE(me->stack);
_PR_MD_FREE_LOCK(&me->threadLock);
PR_DELETE(me);
@@ -1491,9 +1491,9 @@ void _PRI_DetachThread(void)
/*
** Wait for thread termination:
-** "thread" is the target thread
+** "thread" is the target thread
**
-** This can return PR_FAILURE if no joinable thread could be found
+** This can return PR_FAILURE if no joinable thread could be found
** corresponding to the specified target thread.
**
** The calling thread is suspended until the target thread completes.
@@ -1530,12 +1530,12 @@ PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thread)
(void) PR_WaitCondVar(term, PR_INTERVAL_NO_TIMEOUT);
}
(void) PR_Unlock (_pr_terminationCVLock);
-
- /*
+
+ /*
Remove target thread from global waiting to join Q; make it runnable
again and put it back on its run Q. When it gets scheduled later in
_PR_RunThread code, it will clean up its stack.
- */
+ */
if (!_PR_IS_NATIVE_THREAD(me))
_PR_INTSOFF(is);
thread->state = _PR_RUNNABLE;
@@ -1558,14 +1558,14 @@ PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thread)
ErrorExit:
if ( !_PR_IS_NATIVE_THREAD(me)) _PR_INTSON(is);
- return PR_FAILURE;
+ return PR_FAILURE;
}
PR_IMPLEMENT(void) PR_SetThreadPriority(PRThread *thread,
PRThreadPriority newPri)
{
- /*
+ /*
First, pin down the priority. Not all compilers catch passing out of
range enum here. If we let bad values thru, priority queues won't work.
*/
@@ -1574,7 +1574,7 @@ PR_IMPLEMENT(void) PR_SetThreadPriority(PRThread *thread,
} else if ((PRIntn)newPri < (PRIntn)PR_PRIORITY_FIRST) {
newPri = PR_PRIORITY_FIRST;
}
-
+
if ( _PR_IS_NATIVE_THREAD(thread) ) {
thread->priority = newPri;
_PR_MD_SET_PRIORITY(&(thread->md), newPri);
@@ -1614,7 +1614,7 @@ PR_IMPLEMENT(const char *) PR_GetThreadName(const PRThread *thread)
/*
-** This routine prevents all other threads from running. This call is needed by
+** This routine prevents all other threads from running. This call is needed by
** the garbage collector.
*/
PR_IMPLEMENT(void) PR_SuspendAll(void)
@@ -1631,7 +1631,7 @@ PR_IMPLEMENT(void) PR_SuspendAll(void)
_PR_MD_BEGIN_SUSPEND_ALL();
for (qp = _PR_ACTIVE_LOCAL_THREADQ().next;
qp != &_PR_ACTIVE_LOCAL_THREADQ(); qp = qp->next) {
- if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
+ if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
_PR_IS_GCABLE_THREAD(_PR_ACTIVE_THREAD_PTR(qp))) {
_PR_Suspend(_PR_ACTIVE_THREAD_PTR(qp));
PR_ASSERT((_PR_ACTIVE_THREAD_PTR(qp))->state != _PR_RUNNING);
@@ -1642,13 +1642,13 @@ PR_IMPLEMENT(void) PR_SuspendAll(void)
if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
_PR_IS_GCABLE_THREAD(_PR_ACTIVE_THREAD_PTR(qp)))
/* PR_Suspend(_PR_ACTIVE_THREAD_PTR(qp)); */
- _PR_MD_SUSPEND_THREAD(_PR_ACTIVE_THREAD_PTR(qp));
+ _PR_MD_SUSPEND_THREAD(_PR_ACTIVE_THREAD_PTR(qp));
}
_PR_MD_END_SUSPEND_ALL();
}
/*
-** This routine unblocks all other threads that were suspended from running by
+** This routine unblocks all other threads that were suspended from running by
** PR_SuspendAll(). This call is needed by the garbage collector.
*/
PR_IMPLEMENT(void) PR_ResumeAll(void)
@@ -1662,7 +1662,7 @@ PR_IMPLEMENT(void) PR_ResumeAll(void)
_PR_MD_BEGIN_RESUME_ALL();
for (qp = _PR_ACTIVE_LOCAL_THREADQ().next;
qp != &_PR_ACTIVE_LOCAL_THREADQ(); qp = qp->next) {
- if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
+ if ((me != _PR_ACTIVE_THREAD_PTR(qp)) &&
_PR_IS_GCABLE_THREAD(_PR_ACTIVE_THREAD_PTR(qp)))
_PR_Resume(_PR_ACTIVE_THREAD_PTR(qp));
}
@@ -1784,7 +1784,7 @@ _PR_AddSleepQ(PRThread *thread, PRIntervalTime timeout)
** must be one) so that they remain relative to us.
*/
PR_ASSERT (thread->links.next != &_PR_SLEEPQ(cpu));
-
+
t = _PR_THREAD_PTR(thread->links.next);
PR_ASSERT(_PR_THREAD_PTR(t->links.prev) == thread);
t->sleep -= sleep;
@@ -1818,11 +1818,11 @@ _PR_DelSleepQ(PRThread *thread, PRBool propogate_time)
if (propogate_time == PR_TRUE) {
PRThread *after = _PR_THREAD_PTR(q);
after->sleep += thread->sleep;
- } else
+ } else
_PR_SLEEPQMAX(cpu) -= thread->sleep;
} else {
/* Check if prev is the beggining of the list; if so,
- * we are the only element on the list.
+ * we are the only element on the list.
*/
if (thread->links.prev != &_PR_SLEEPQ(cpu))
_PR_SLEEPQMAX(cpu) -= thread->sleep;
@@ -1834,7 +1834,7 @@ _PR_DelSleepQ(PRThread *thread, PRBool propogate_time)
thread->flags &= ~_PR_ON_PAUSEQ;
}
PR_REMOVE_LINK(&thread->links);
- } else
+ } else
PR_ASSERT(0);
}
diff --git a/pr/src/threads/prcthr.c b/pr/src/threads/prcthr.c
index d271f312..78401b9d 100644
--- a/pr/src/threads/prcthr.c
+++ b/pr/src/threads/prcthr.c
@@ -7,17 +7,17 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
extern PRLock *_pr_sleeplock; /* allocated and initialized in prinit */
-/*
+/*
** Routines common to both native and user threads.
**
**
@@ -188,7 +188,7 @@ PR_IMPLEMENT(PRStatus) PR_Interrupt(PRThread *thread)
/*
* Need to hold the thread lock when calling
* _PR_Unblock_IO_Wait(). On return lock is
- * released.
+ * released.
*/
#if defined(XP_UNIX) || defined(WINNT) || defined(WIN16)
if (!(thread->flags & _PR_INTERRUPT_BLOCKED))
@@ -326,7 +326,7 @@ PR_IMPLEMENT(PRThread*) PR_CreateThreadGCAble(PRThreadType type,
PRThreadState state,
PRUint32 stackSize)
{
- return _PR_CreateThread(type, start, arg, priority, scope, state,
+ return _PR_CreateThread(type, start, arg, priority, scope, state,
stackSize, _PR_GCABLE_THREAD);
}
@@ -339,7 +339,7 @@ PR_IMPLEMENT(PRThread*) PR_CreateThreadBound(PRThreadType type,
PRThreadState state,
PRUint32 stackSize)
{
- return _PR_CreateThread(type, start, arg, priority, scope, state,
+ return _PR_CreateThread(type, start, arg, priority, scope, state,
stackSize, _PR_BOUND_THREAD);
}
#endif
@@ -358,7 +358,7 @@ PR_IMPLEMENT(void) PR_SetThreadGCAble()
if (!_pr_initialized) _PR_ImplicitInitialization();
PR_Lock(_pr_activeLock);
_PR_MD_CURRENT_THREAD()->flags |= _PR_GCABLE_THREAD;
- PR_Unlock(_pr_activeLock);
+ PR_Unlock(_pr_activeLock);
}
PR_IMPLEMENT(void) PR_ClearThreadGCAble()
diff --git a/pr/src/threads/prdump.c b/pr/src/threads/prdump.c
index b40bee30..6c74eeaf 100644
--- a/pr/src/threads/prdump.c
+++ b/pr/src/threads/prdump.c
@@ -7,10 +7,10 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
diff --git a/pr/src/threads/prrwlock.c b/pr/src/threads/prrwlock.c
index 1dd9e0a9..baa8cb21 100644
--- a/pr/src/threads/prrwlock.c
+++ b/pr/src/threads/prrwlock.c
@@ -90,7 +90,7 @@ static void _PR_RELEASE_LOCK_STACK(void *lock_stack);
/*
* PR_NewRWLock
* Create a reader-writer lock, with the given lock rank and lock name
- *
+ *
*/
PR_IMPLEMENT(PRRWLock *)
@@ -118,7 +118,7 @@ PR_NewRWLock(PRUint32 lock_rank, const char *lock_name)
} else {
rwlock->rw_name = NULL;
}
-
+
#if defined(HAVE_UNIX98_RWLOCK) || defined(HAVE_UI_RWLOCK)
err = RWLOCK_INIT(&rwlock->rw_lock);
if (err != 0) {
@@ -148,7 +148,7 @@ PR_NewRWLock(PRUint32 lock_rank, const char *lock_name)
failed:
if (rwlock->rw_reader_waitq != NULL) {
- PR_DestroyCondVar(rwlock->rw_reader_waitq);
+ PR_DestroyCondVar(rwlock->rw_reader_waitq);
}
if (rwlock->rw_lock != NULL) {
PR_DestroyLock(rwlock->rw_lock);
@@ -171,8 +171,8 @@ PR_DestroyRWLock(PRRWLock *rwlock)
PR_ASSERT(err == 0);
#else
PR_ASSERT(rwlock->rw_reader_cnt == 0);
- PR_DestroyCondVar(rwlock->rw_reader_waitq);
- PR_DestroyCondVar(rwlock->rw_writer_waitq);
+ PR_DestroyCondVar(rwlock->rw_reader_waitq);
+ PR_DestroyCondVar(rwlock->rw_writer_waitq);
PR_DestroyLock(rwlock->rw_lock);
#endif
if (rwlock->rw_name != NULL)
@@ -196,7 +196,7 @@ int err;
* be equal to or greater than the highest rank of all the locks held by
* the thread.
*/
- PR_ASSERT((rwlock->rw_rank == PR_RWLOCK_RANK_NONE) ||
+ PR_ASSERT((rwlock->rw_rank == PR_RWLOCK_RANK_NONE) ||
(rwlock->rw_rank >= _PR_GET_THREAD_RWLOCK_RANK()));
#endif
@@ -250,7 +250,7 @@ int err;
* be equal to or greater than the highest rank of all the locks held by
* the thread.
*/
- PR_ASSERT((rwlock->rw_rank == PR_RWLOCK_RANK_NONE) ||
+ PR_ASSERT((rwlock->rw_rank == PR_RWLOCK_RANK_NONE) ||
(rwlock->rw_rank >= _PR_GET_THREAD_RWLOCK_RANK()));
#endif
@@ -409,7 +409,7 @@ PRStatus rv;
*/
if (lock_stack) {
if (lock_stack->trs_index < _PR_RWLOCK_RANK_ORDER_LIMIT)
- lock_stack->trs_stack[lock_stack->trs_index++] = rwlock;
+ lock_stack->trs_stack[lock_stack->trs_index++] = rwlock;
}
}
@@ -426,7 +426,7 @@ _PR_RELEASE_LOCK_STACK(void *lock_stack)
* return thread's lock rank. If thread-private-data for the lock
* stack is not allocated, return PR_RWLOCK_RANK_NONE.
*/
-
+
static PRUint32
_PR_GET_THREAD_RWLOCK_RANK(void)
{
@@ -445,7 +445,7 @@ _PR_GET_THREAD_RWLOCK_RANK(void)
* remove the rwlock from the lock stack. Since locks may not be
* unlocked in a FIFO order, the entire lock stack is searched.
*/
-
+
static void
_PR_UNSET_THREAD_RWLOCK_RANK(PRRWLock *rwlock)
{
diff --git a/pr/src/threads/prsem.c b/pr/src/threads/prsem.c
index f5f261fe..4b1617ca 100644
--- a/pr/src/threads/prsem.c
+++ b/pr/src/threads/prsem.c
@@ -61,16 +61,16 @@ PR_IMPLEMENT(void) PR_DestroySem(PRSemaphore *sem)
/*
** Wait on a Semaphore.
-**
-** This routine allows a calling thread to wait or proceed depending upon the
-** state of the semahore sem. The thread can proceed only if the counter value
-** of the semaphore sem is currently greater than 0. If the value of semaphore
-** sem is positive, it is decremented by one and the routine returns immediately
-** allowing the calling thread to continue. If the value of semaphore sem is 0,
-** the calling thread blocks awaiting the semaphore to be released by another
+**
+** This routine allows a calling thread to wait or proceed depending upon the
+** state of the semahore sem. The thread can proceed only if the counter value
+** of the semaphore sem is currently greater than 0. If the value of semaphore
+** sem is positive, it is decremented by one and the routine returns immediately
+** allowing the calling thread to continue. If the value of semaphore sem is 0,
+** the calling thread blocks awaiting the semaphore to be released by another
** thread.
-**
-** This routine can return PR_PENDING_INTERRUPT if the waiting thread
+**
+** This routine can return PR_PENDING_INTERRUPT if the waiting thread
** has been interrupted.
*/
PR_IMPLEMENT(PRStatus) PR_WaitSem(PRSemaphore *sem)
@@ -92,13 +92,13 @@ PR_IMPLEMENT(PRStatus) PR_WaitSem(PRSemaphore *sem)
sem->count--;
PR_Unlock(sem->cvar->lock);
#endif
-
+
return (status);
}
/*
-** This routine increments the counter value of the semaphore. If other threads
-** are blocked for the semaphore, then the scheduler will determine which ONE
+** This routine increments the counter value of the semaphore. If other threads
+** are blocked for the semaphore, then the scheduler will determine which ONE
** thread will be unblocked.
*/
PR_IMPLEMENT(void) PR_PostSem(PRSemaphore *sem)
@@ -132,7 +132,7 @@ PR_IMPLEMENT(PRUintn) PR_GetValueSem(PRSemaphore *sem)
rv = sem->count;
PR_Unlock(sem->cvar->lock);
#endif
-
+
return rv;
}
#endif
diff --git a/pr/src/threads/prtpd.c b/pr/src/threads/prtpd.c
index 96ed0403..650da675 100644
--- a/pr/src/threads/prtpd.c
+++ b/pr/src/threads/prtpd.c
@@ -39,10 +39,10 @@
#if defined(WIN95)
/*
-** Some local variables report warnings on Win95 because the code paths
+** Some local variables report warnings on Win95 because the code paths
** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
** The pragma suppresses the warning.
-**
+**
*/
#pragma warning(disable : 4101)
#endif
@@ -74,22 +74,22 @@ void _PR_CleanupTPD(void)
} /* _PR_CleanupTPD */
/*
-** This routine returns a new index for per-thread-private data table.
-** The index is visible to all threads within a process. This index can
-** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines
+** This routine returns a new index for per-thread-private data table.
+** The index is visible to all threads within a process. This index can
+** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines
** to save and retrieve data associated with the index for a thread.
**
-** The index independently maintains specific values for each binding thread.
+** The index independently maintains specific values for each binding thread.
** A thread can only get access to its own thread-specific-data.
**
** Upon a new index return the value associated with the index for all threads
-** is NULL, and upon thread creation the value associated with all indices for
-** that thread is NULL.
+** is NULL, and upon thread creation the value associated with all indices for
+** that thread is NULL.
**
** "dtor" is the destructor function to invoke when the private
** data is set or destroyed
**
-** Returns PR_FAILURE if the total number of indices will exceed the maximun
+** Returns PR_FAILURE if the total number of indices will exceed the maximun
** allowed.
*/
@@ -123,7 +123,7 @@ PR_IMPLEMENT(PRStatus) PR_NewThreadPrivateIndex(
/*
** Define some per-thread-private data.
** "index" is an index into the per-thread private data table
-** "priv" is the per-thread-private data
+** "priv" is the per-thread-private data
**
** If the per-thread private data table has a previously registered
** destructor function and a non-NULL per-thread-private data value,
@@ -191,9 +191,9 @@ PR_IMPLEMENT(PRStatus) PR_SetThreadPrivate(PRUintn index, void *priv)
/*
** Recover the per-thread-private data for the current thread. "index" is
-** the index into the per-thread private data table.
+** the index into the per-thread private data table.
**
-** The returned value may be NULL which is indistinguishable from an error
+** The returned value may be NULL which is indistinguishable from an error
** condition.
**
*/
diff --git a/pr/tests/accept.c b/pr/tests/accept.c
index f49bb44d..0b26ccdb 100644
--- a/pr/tests/accept.c
+++ b/pr/tests/accept.c
@@ -12,7 +12,7 @@
**
** Modification History:
** 04-Jun-97 AGarcia - Reconvert test file to return a 0 for PASS and a 1 for FAIL
-** 13-May-97 AGarcia- Converted the test to accomodate the debug_mode
+** 13-May-97 AGarcia- Converted the test to accomodate the debug_mode
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
@@ -122,7 +122,7 @@ ClientThread(void *_action)
if (!sock) {
if (!debug_mode)
failed_already=1;
- else
+ else
PR_fprintf(output, "client: unable to create socket\n");
return;
}
@@ -133,8 +133,8 @@ ClientThread(void *_action)
timeoutTime)) < 0) {
if (!debug_mode)
failed_already=1;
- else
- PR_fprintf(output,
+ else
+ PR_fprintf(output,
"client: unable to connect to server (%ld, %ld, %ld, %ld)\n",
iterations, rv, PR_GetError(), PR_GetOSError());
goto ErrorExit;
@@ -172,7 +172,7 @@ ErrorExit:
}
-static void
+static void
RunTest(PRInt32 acceptType, PRInt32 clientAction)
{
int i;
@@ -353,58 +353,58 @@ int i;
void AcceptUpdatedTest(void)
-{
- RunTest(ACCEPT_NORMAL, CLIENT_NORMAL);
+{
+ RunTest(ACCEPT_NORMAL, CLIENT_NORMAL);
}
void AcceptNotUpdatedTest(void)
-{
- RunTest(ACCEPT_FAST, CLIENT_NORMAL);
+{
+ RunTest(ACCEPT_FAST, CLIENT_NORMAL);
}
void AcceptReadTest(void)
-{
- RunTest(ACCEPT_READ, CLIENT_NORMAL);
+{
+ RunTest(ACCEPT_READ, CLIENT_NORMAL);
}
void AcceptReadNotUpdatedTest(void)
-{
- RunTest(ACCEPT_READ_FAST, CLIENT_NORMAL);
+{
+ RunTest(ACCEPT_READ_FAST, CLIENT_NORMAL);
}
void AcceptReadCallbackTest(void)
-{
- RunTest(ACCEPT_READ_FAST_CB, CLIENT_NORMAL);
+{
+ RunTest(ACCEPT_READ_FAST_CB, CLIENT_NORMAL);
}
void TimeoutAcceptUpdatedTest(void)
-{
- RunTest(ACCEPT_NORMAL, CLIENT_TIMEOUT_ACCEPT);
+{
+ RunTest(ACCEPT_NORMAL, CLIENT_TIMEOUT_ACCEPT);
}
void TimeoutAcceptNotUpdatedTest(void)
-{
- RunTest(ACCEPT_FAST, CLIENT_TIMEOUT_ACCEPT);
+{
+ RunTest(ACCEPT_FAST, CLIENT_TIMEOUT_ACCEPT);
}
void TimeoutAcceptReadCallbackTest(void)
-{
- RunTest(ACCEPT_READ_FAST_CB, CLIENT_TIMEOUT_ACCEPT);
+{
+ RunTest(ACCEPT_READ_FAST_CB, CLIENT_TIMEOUT_ACCEPT);
}
void TimeoutReadUpdatedTest(void)
-{
- RunTest(ACCEPT_NORMAL, CLIENT_TIMEOUT_SEND);
+{
+ RunTest(ACCEPT_NORMAL, CLIENT_TIMEOUT_SEND);
}
void TimeoutReadNotUpdatedTest(void)
-{
- RunTest(ACCEPT_FAST, CLIENT_TIMEOUT_SEND);
+{
+ RunTest(ACCEPT_FAST, CLIENT_TIMEOUT_SEND);
}
void TimeoutReadReadTest(void)
-{
- RunTest(ACCEPT_READ, CLIENT_TIMEOUT_SEND);
+{
+ RunTest(ACCEPT_READ, CLIENT_TIMEOUT_SEND);
}
void TimeoutReadReadNotUpdatedTest(void)
-{
- RunTest(ACCEPT_READ_FAST, CLIENT_TIMEOUT_SEND);
+{
+ RunTest(ACCEPT_READ_FAST, CLIENT_TIMEOUT_SEND);
}
void TimeoutReadReadCallbackTest(void)
-{
- RunTest(ACCEPT_READ_FAST_CB, CLIENT_TIMEOUT_SEND);
+{
+ RunTest(ACCEPT_READ_FAST_CB, CLIENT_TIMEOUT_SEND);
}
/************************************************************************/
diff --git a/pr/tests/acceptread.c b/pr/tests/acceptread.c
index 47ba90bd..1d3dab6e 100644
--- a/pr/tests/acceptread.c
+++ b/pr/tests/acceptread.c
@@ -100,7 +100,7 @@ static void AcceptingThread(void *arg)
if (NULL == listen_sock)
{
PL_FPrintError(err_out, "PR_NewTCPSocket (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
sock_opt.option = PR_SockOpt_Reuseaddr;
sock_opt.value.reuse_addr = PR_TRUE;
@@ -108,19 +108,19 @@ static void AcceptingThread(void *arg)
if (PR_FAILURE == rv)
{
PL_FPrintError(err_out, "PR_SetSocketOption (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
rv = PR_Bind(listen_sock, listen_addr);
if (PR_FAILURE == rv)
{
PL_FPrintError(err_out, "PR_Bind (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
rv = PR_Listen(listen_sock, 10);
if (PR_FAILURE == rv)
{
PL_FPrintError(err_out, "PR_Listen (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
bytes = PR_AcceptRead(
listen_sock, &accept_sock, &accept_addr, buf, buf_size, accept_timeout);
diff --git a/pr/tests/acceptreademu.c b/pr/tests/acceptreademu.c
index efe28cb9..bc5f6daf 100644
--- a/pr/tests/acceptreademu.c
+++ b/pr/tests/acceptreademu.c
@@ -116,18 +116,18 @@ static void AcceptingThread(void *arg)
if (NULL == listen_sock)
{
PL_FPrintError(err_out, "PR_NewTCPSocket (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
layer = PR_CreateIOLayerStub(emu_layer_ident, &emu_layer_methods);
if (NULL == layer)
{
PL_FPrintError(err_out, "PR_CreateIOLayerStub (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
if (PR_PushIOLayer(listen_sock, PR_TOP_IO_LAYER, layer) == PR_FAILURE)
{
PL_FPrintError(err_out, "PR_PushIOLayer (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
sock_opt.option = PR_SockOpt_Reuseaddr;
sock_opt.value.reuse_addr = PR_TRUE;
@@ -135,19 +135,19 @@ static void AcceptingThread(void *arg)
if (PR_FAILURE == rv)
{
PL_FPrintError(err_out, "PR_SetSocketOption (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
rv = PR_Bind(listen_sock, listen_addr);
if (PR_FAILURE == rv)
{
PL_FPrintError(err_out, "PR_Bind (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
rv = PR_Listen(listen_sock, 10);
if (PR_FAILURE == rv)
{
PL_FPrintError(err_out, "PR_Listen (server) failed");
- PR_ProcessExit(1);
+ PR_ProcessExit(1);
}
bytes = PR_AcceptRead(
listen_sock, &accept_sock, &accept_addr, buf, buf_size, accept_timeout);
diff --git a/pr/tests/addrstr.c b/pr/tests/addrstr.c
index 4e830a71..6c84b55f 100644
--- a/pr/tests/addrstr.c
+++ b/pr/tests/addrstr.c
@@ -19,12 +19,12 @@ const char *testaddrs[] = {
"::FFFE:9504:3501", "::fffe:9504:3501",
"0:0:1:0:35c:0:0:0", "0:0:1:0:35c::",
"0:0:3f4c:0:0:4552:0:0", "::3f4c:0:0:4552:0:0",
- "0:0:1245:0:0:0:0567:0", "0:0:1245::567:0",
- "0:1:2:3:4:5:6:7", "0:1:2:3:4:5:6:7",
- "1:2:3:0:4:5:6:7", "1:2:3:0:4:5:6:7",
- "1:2:3:4:5:6:7:0", "1:2:3:4:5:6:7:0",
- "1:2:3:4:5:6:7:8", "1:2:3:4:5:6:7:8",
- "1:2:3:4:5:6::7", "1:2:3:4:5:6:0:7",
+ "0:0:1245:0:0:0:0567:0", "0:0:1245::567:0",
+ "0:1:2:3:4:5:6:7", "0:1:2:3:4:5:6:7",
+ "1:2:3:0:4:5:6:7", "1:2:3:0:4:5:6:7",
+ "1:2:3:4:5:6:7:0", "1:2:3:4:5:6:7:0",
+ "1:2:3:4:5:6:7:8", "1:2:3:4:5:6:7:8",
+ "1:2:3:4:5:6::7", "1:2:3:4:5:6:0:7",
0
};
diff --git a/pr/tests/affinity.c b/pr/tests/affinity.c
index cfc20e63..52a9b28f 100644
--- a/pr/tests/affinity.c
+++ b/pr/tests/affinity.c
@@ -21,7 +21,7 @@ static void PR_CALLBACK thread_start(void *arg)
{
PRUint32 mask = 0;
- if (PR_GetThreadAffinityMask(PR_GetCurrentThread(), &mask))
+ if (PR_GetThreadAffinityMask(PR_GetCurrentThread(), &mask))
printf("\tthread_start: PR_GetCurrentThreadAffinityMask failed\n");
else
printf("\tthread_start: AffinityMask = 0x%x\n",mask);
@@ -35,7 +35,7 @@ int main(int argc, char **argv)
printf("main: creating local thread\n");
t = PR_CreateThread(PR_USER_THREAD,
- thread_start, 0,
+ thread_start, 0,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_JOINABLE_THREAD,
@@ -50,7 +50,7 @@ int main(int argc, char **argv)
printf("main: creating global thread\n");
t = PR_CreateThread(PR_USER_THREAD,
- thread_start, 0,
+ thread_start, 0,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_JOINABLE_THREAD,
@@ -65,7 +65,7 @@ int main(int argc, char **argv)
printf("main: creating global bound thread\n");
t = PR_CreateThread(PR_USER_THREAD,
- thread_start, 0,
+ thread_start, 0,
PR_PRIORITY_NORMAL,
PR_GLOBAL_BOUND_THREAD,
PR_JOINABLE_THREAD,
diff --git a/pr/tests/alarm.c b/pr/tests/alarm.c
index e3dedb67..3a2ff35e 100644
--- a/pr/tests/alarm.c
+++ b/pr/tests/alarm.c
@@ -71,17 +71,17 @@ static void Notifier(void *arg)
/***********************************************************************
** PRIVATE FUNCTION: ConditionNotify
** DESCRIPTION:
-**
+**
** INPUTS: loops
** OUTPUTS: None
** RETURN: overhead
** SIDE EFFECTS:
-**
+**
** RESTRICTIONS:
** None
** MEMORY: NA
** ALGORITHM:
-**
+**
***********************************************************************/
@@ -90,7 +90,7 @@ static PRIntervalTime ConditionNotify(PRUint32 loops)
PRThread *thread;
NotifyData notifyData;
PRIntervalTime timein, overhead;
-
+
timein = PR_IntervalNow();
notifyData.counter = loops;
@@ -120,7 +120,7 @@ static PRIntervalTime ConditionNotify(PRUint32 loops)
PR_DestroyCondVar(notifyData.child);
PR_DestroyCondVar(notifyData.parent);
PR_DestroyLock(notifyData.ml);
-
+
overhead += (PR_IntervalNow() - timein); /* more overhead */
return overhead;
@@ -175,14 +175,14 @@ static PRBool AlarmFn1(PRAlarmID *id, void *clientData, PRUint32 late)
if (!keepGoing)
rv = PR_NotifyCondVar(ad->cv);
resetAlarm = ((ad->times % 31) == 0) ? PR_TRUE : PR_FALSE;
-
+
interval = (ad->period + ad->rate - 1) / ad->rate;
if (!late && (interval > 10))
{
interval &= (now & 0x03) + 1;
PR_WaitCondVar(ad->cv, interval);
}
-
+
PR_Unlock(ad->ml);
if (rv != PR_SUCCESS)
@@ -190,18 +190,18 @@ static PRBool AlarmFn1(PRAlarmID *id, void *clientData, PRUint32 late)
if (!debug_mode) failed_already=1;
else
printf("AlarmFn: notify status: FAIL\n");
-
+
}
if (resetAlarm)
- {
+ {
ad->rate += 3;
ad->late = ad->times = 0;
if (PR_ResetAlarm(id, ad->period, ad->rate) != PR_SUCCESS)
{
if (!debug_mode)
failed_already=1;
- else
+ else
printf("AlarmFn: Resetting alarm status: FAIL\n");
keepGoing = PR_FALSE;
@@ -235,7 +235,7 @@ static PRIntervalTime Alarms1(PRUint32 loops)
(void)PR_SetAlarm(
alarm, ad.period, ad.rate, AlarmFn1, &ad);
-
+
overhead = PR_IntervalNow() - timein;
PR_Lock(ml);
@@ -248,7 +248,7 @@ static PRIntervalTime Alarms1(PRUint32 loops)
PR_DestroyCondVar(cv);
PR_DestroyLock(ml);
overhead += (PR_IntervalNow() - timein);
-
+
return duration + overhead;
} /* Alarms1 */
@@ -306,14 +306,14 @@ static PRIntervalTime Alarms2(PRUint32 loops)
(void)PR_SetAlarm(
alarm, ad.period, ad.rate, AlarmFn2, &ad);
-
+
overhead = PR_IntervalNow() - timein;
PR_Lock(ml);
while ((PRIntervalTime)(PR_IntervalNow() - ad.timein) < duration)
PR_WaitCondVar(cv, PR_INTERVAL_NO_TIMEOUT);
PR_Unlock(ml);
-
+
timein = PR_IntervalNow();
rv = PR_DestroyAlarm(alarm);
@@ -321,16 +321,16 @@ static PRIntervalTime Alarms2(PRUint32 loops)
{
if (!debug_mode)
failed_already=1;
- else
+ else
printf("***Destroying alarm status: FAIL\n");
}
-
+
PR_DestroyCondVar(cv);
PR_DestroyLock(ml);
-
+
overhead += (PR_IntervalNow() - timein);
-
+
return duration + overhead;
} /* Alarms2 */
@@ -370,7 +370,7 @@ static PRIntervalTime Alarms3(PRUint32 loops)
alarm, ad[i].period, ad[i].rate,
AlarmFn2, &ad[i]);
}
-
+
overhead = PR_IntervalNow() - timein;
PR_Lock(ml);
@@ -387,18 +387,18 @@ static PRIntervalTime Alarms3(PRUint32 loops)
printf
("Alarms3 finished at %u, %u, %u\n",
ad[0].timein, ad[1].timein, ad[2].timein);
-
+
rv = PR_DestroyAlarm(alarm);
if (rv != PR_SUCCESS)
{
- if (!debug_mode)
+ if (!debug_mode)
failed_already=1;
- else
+ else
printf("***Destroying alarm status: FAIL\n");
}
PR_DestroyCondVar(cv);
PR_DestroyLock(ml);
-
+
overhead += (duration / 3);
overhead += (PR_IntervalNow() - timein);
@@ -435,7 +435,7 @@ static PRUint32 TimeThis(
}
else
{
- if (debug_mode)
+ if (debug_mode)
printf(
"\ttotal: %d usecs\n\toverhead: %d usecs\n\tcost: %6.3f usecs\n\n",
usecs, overhead, ((double)(usecs - overhead) / (double)loops));
@@ -486,7 +486,7 @@ int prmain(int argc, char** argv)
if (debug_mode)
printf("Alarm: Using %d loops\n", loops);
- if (debug_mode)
+ if (debug_mode)
printf("Alarm: Using %d cpu(s)\n", cpus);
for (cpu = 1; cpu <= cpus; ++cpu)
diff --git a/pr/tests/anonfm.c b/pr/tests/anonfm.c
index 85e29024..1c3468f3 100644
--- a/pr/tests/anonfm.c
+++ b/pr/tests/anonfm.c
@@ -5,7 +5,7 @@
/*
** File: anonfm.c
-** Description: Test anonymous file map
+** Description: Test anonymous file map
**
** Synopsis: anonfm [options] [dirName]
**
@@ -13,7 +13,7 @@
** -d enable debug mode
** -h display a help message
** -s <n> size of the anonymous memory map, in KBytes. default: 100KBytes.
-** -C 1 Operate this process as ClientOne()
+** -C 1 Operate this process as ClientOne()
** -C 2 Operate this process as ClientTwo()
**
** anonfn.c contains two tests, corresponding to the two protocols for
@@ -28,8 +28,8 @@
** PRProcessAttr structure.
**
*/
-#include <plgetopt.h>
-#include <nspr.h>
+#include <plgetopt.h>
+#include <nspr.h>
#include <private/primpl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -74,10 +74,10 @@ static void ClientOne( void )
PR_LOG(lm, msgLevel,
("ClientOne() starting"));
-
+
fmString = PR_GetEnv( fmEnvName );
if ( NULL == fmString ) {
- failed_already = 1;
+ failed_already = 1;
PR_LOG(lm, msgLevel,
("ClientOne(): PR_Getenv() failed"));
return;
@@ -87,7 +87,7 @@ static void ClientOne( void )
fm = PR_ImportFileMapFromString( fmString );
if ( NULL == fm ) {
- failed_already = 1;
+ failed_already = 1;
PR_LOG(lm, msgLevel,
("ClientOne(): PR_ImportFileMapFromString() failed"));
return;
@@ -97,7 +97,7 @@ static void ClientOne( void )
addr = PR_MemMap( fm, LL_ZERO, fmSize );
if ( NULL == addr ) {
- failed_already = 1;
+ failed_already = 1;
PR_LOG(lm, msgLevel,
("ClientOne(): PR_MemMap() failed, OSError: %d", PR_GetOSError() ));
return;
@@ -115,7 +115,7 @@ static void ClientOne( void )
rc = PR_CloseFileMap( fm );
if ( PR_FAILURE == rc ) {
- failed_already = 1;
+ failed_already = 1;
PR_LOG(lm, msgLevel,
("ClientOne(): PR_MemUnap() failed, OSError: %d", PR_GetOSError() ));
return;
@@ -151,20 +151,20 @@ static void ServerOne( void )
PR_LOG(lm, msgLevel,
("ServerOne() starting"));
-
+
fm = PR_OpenAnonFileMap( dirName, fmSize, fmProt );
if ( NULL == fm ) {
- failed_already = 1;
+ failed_already = 1;
PR_LOG(lm, msgLevel,
("PR_OpenAnonFileMap() failed"));
return;
}
PR_LOG(lm, msgLevel,
("ServerOne(): FileMap: %p", fm ));
-
+
rc = PR_ExportFileMapAsString( fm, sizeof(fmString), fmString );
if ( PR_FAILURE == rc ) {
- failed_already = 1;
+ failed_already = 1;
PR_LOG(lm, msgLevel,
("PR_ExportFileMap() failed"));
return;
@@ -175,10 +175,10 @@ static void ServerOne( void )
*/
PR_snprintf( envBuf, sizeof(envBuf), "%s=%s", fmEnvName, fmString);
putenv( envBuf );
-
+
addr = PR_MemMap( fm, LL_ZERO, fmSize );
if ( NULL == addr ) {
- failed_already = 1;
+ failed_already = 1;
PR_LOG(lm, msgLevel,
("PR_MemMap() failed"));
return;
@@ -186,11 +186,11 @@ static void ServerOne( void )
/* set initial value for client */
for (i = 0; i < (PRIntn)fmSize ; i++ )
- *(addr+i) = 0x00;
+ *(addr+i) = 0x00;
PR_LOG(lm, msgLevel,
("ServerOne(): PR_MemMap(): addr: %p", addr ));
-
+
/*
** set arguments for child process
*/
@@ -224,7 +224,7 @@ static void ServerOne( void )
rc = PR_MemUnmap( addr, fmSize);
if ( PR_FAILURE == rc ) {
- failed_already = 1;
+ failed_already = 1;
PR_LOG(lm, msgLevel,
("PR_MemUnmap() failed"));
return;
@@ -234,7 +234,7 @@ static void ServerOne( void )
rc = PR_CloseFileMap(fm);
if ( PR_FAILURE == rc ) {
- failed_already = 1;
+ failed_already = 1;
PR_LOG(lm, msgLevel,
("PR_CloseFileMap() failed"));
return;
diff --git a/pr/tests/atomic.c b/pr/tests/atomic.c
index eb9df949..42d25da8 100644
--- a/pr/tests/atomic.c
+++ b/pr/tests/atomic.c
@@ -2,7 +2,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
+
#include "prio.h"
#include "prprf.h"
#include "pratom.h"
diff --git a/pr/tests/attach.c b/pr/tests/attach.c
index 0b935fff..5d09680f 100644
--- a/pr/tests/attach.c
+++ b/pr/tests/attach.c
@@ -57,17 +57,17 @@ PRIntn debug_mode;
int count;
-static void
+static void
AttachDetach(void)
{
PRThread *me;
PRInt32 index;
for (index=0;index<count; index++) {
- me = PR_AttachThread(PR_USER_THREAD,
+ me = PR_AttachThread(PR_USER_THREAD,
PR_PRIORITY_NORMAL,
NULL);
-
+
if (!me) {
fprintf(stderr, "Error attaching thread %d: PR_AttachThread failed\n",
count);
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
goto exit_now;
#endif
- if(0 == count) count = DEFAULT_COUNT;
+ if(0 == count) count = DEFAULT_COUNT;
/*
* To force the implicit initialization of nspr20
@@ -175,7 +175,7 @@ int main(int argc, char **argv)
failed_already=1;
goto exit_now;
}
-
+
rv = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
if (debug_mode) PR_ASSERT(0 == rv);
else if (0 != rv) {
@@ -213,7 +213,7 @@ int main(int argc, char **argv)
if(!debug_mode) {
failed_already=1;
goto exit_now;
- } else
+ } else
fprintf(stderr, "thread creation failed: error code %d\n", rv);
}
rv = thr_join(threadID, NULL, NULL);
@@ -245,7 +245,7 @@ int main(int argc, char **argv)
#elif defined(OS2)
threadID = (TID) _beginthread((void *)threadStartFunc, NULL,
- 32768, NULL);
+ 32768, NULL);
if (threadID == -1) {
fprintf(stderr, "thread creation failed: error code %d\n", errno);
failed_already=1;
@@ -262,7 +262,7 @@ int main(int argc, char **argv)
#else
if (!debug_mode)
failed_already=1;
- else
+ else
printf("The attach test does not apply to this platform because\n"
"either this platform does not have native threads or the\n"
"test needs to be written for this platform.\n");
@@ -270,7 +270,7 @@ int main(int argc, char **argv)
#endif
exit_now:
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/bigfile.c b/pr/tests/bigfile.c
index 35bf1570..6780d64f 100644
--- a/pr/tests/bigfile.c
+++ b/pr/tests/bigfile.c
@@ -165,14 +165,14 @@ int main(int argc, char **argv)
LL_I2L(filesize64, filesize);
buffer = (char*)PR_MALLOC(BUFFER_SIZE);
LL_I2L(big_fragment, BUFFER_SIZE);
- LL_MUL(filesize64, filesize64, one_meg);
+ LL_MUL(filesize64, filesize64, one_meg);
for (loop = 0; loop < BUFFER_SIZE; ++loop) buffer[loop] = (char)loop;
VERBOSE(v_whisper, "Creating big file");
file = PR_Open(filename, PR_CREATE_FILE | PR_WRONLY, 0666);
if (NULL == file) return Error("PR_Open()", filename);
-
+
VERBOSE(v_whisper, "Testing available space in empty file");
big_answer = file->methods->available64(file);
if (!LL_IS_ZERO(big_answer)) return Error("empty available64()", filename);
diff --git a/pr/tests/bug1test.c b/pr/tests/bug1test.c
index a8df97f7..f26c0b89 100644
--- a/pr/tests/bug1test.c
+++ b/pr/tests/bug1test.c
@@ -48,7 +48,7 @@ void spin (PRInt32 aDelay)
for (index = 0; index < delay * 10; index++)
// consume a bunch of cpu cycles
;
- PR_Sleep(0);
+ PR_Sleep(0);
}
void doWriteThread (void* arg)
@@ -83,7 +83,7 @@ void doWriteThread (void* arg)
PR_ASSERT (gCounter == (last + 1)); // test invariance
- // -- exit write lock
+ // -- exit write lock
// if (0 < gReadWaiting) // notify waiting reads (do it anyway to show off the CondWait bug)
PR_NotifyAll (gMonitor);
@@ -104,7 +104,7 @@ void doReadThread (void* arg)
while (1)
{
// -- enter read lock
- PR_EnterMonitor (gMonitor);
+ PR_EnterMonitor (gMonitor);
if (0 < gWriteWaiting) // give up the monitor to waiting writes
{
@@ -186,7 +186,7 @@ int pseudoMain (int argc, char** argv, char *pad)
fireThread ("W4", doWriteThread, &a5);
fireThread ("W5", doWriteThread, &a6);
fireThread ("W6", doWriteThread, &a7);
-
+
while (1)
{
PRInt32 writeCount, readCount;
@@ -196,9 +196,9 @@ int pseudoMain (int argc, char** argv, char *pad)
// print some stats, not threadsafe, informative only
writeCount = gCounter;
readCount = gReads;
- printf ("\ntick %d writes (+%d), %d reads (+%d) [max %d, %d, %d]",
+ printf ("\ntick %d writes (+%d), %d reads (+%d) [max %d, %d, %d]",
writeCount, writeCount - lastWriteCount,
- readCount, readCount - lastReadCount,
+ readCount, readCount - lastReadCount,
gMaxReads, gMaxWriteWaits, gMaxReadWaits);
lastWriteCount = writeCount;
lastReadCount = readCount;
diff --git a/pr/tests/cleanup.c b/pr/tests/cleanup.c
index 4079aae1..d5803a52 100644
--- a/pr/tests/cleanup.c
+++ b/pr/tests/cleanup.c
@@ -81,8 +81,8 @@ int main(int argc, char **argv)
PR_fprintf(err, "\tConcurrency: %d\n", concurrency);
PR_fprintf(err, "\tNumber of threads: %d\n", threads);
PR_fprintf(err, "\tThread sleep: %d\n", child_sleep);
- PR_fprintf(err, "\tMain sleep: %d\n", main_sleep);
- PR_fprintf(err, "\tCleanup will %sbe called\n\n", (cleanup) ? "" : "NOT ");
+ PR_fprintf(err, "\tMain sleep: %d\n", main_sleep);
+ PR_fprintf(err, "\tCleanup will %sbe called\n\n", (cleanup) ? "" : "NOT ");
PR_SetConcurrency(concurrency);
diff --git a/pr/tests/cltsrv.c b/pr/tests/cltsrv.c
index 1941687e..17ca7caa 100644
--- a/pr/tests/cltsrv.c
+++ b/pr/tests/cltsrv.c
@@ -23,7 +23,7 @@
* The debug mode will print all of the printfs associated with this test.
* The regress mode will be the default mode. Since the regress tool limits
* the output to a one line status:PASS or FAIL,all of the printf statements
- * have been handled with an if (debug_mode) statement.
+ * have been handled with an if (debug_mode) statement.
*/
#include "prclist.h"
@@ -228,7 +228,7 @@ static void PR_CALLBACK Client(void *arg)
PRInt32 bytes, descbytes, filebytes, netbytes;
(void)PR_NetAddrToString(&client->serverAddress, buffer, sizeof(buffer));
- TEST_LOG(cltsrv_log_file, TEST_LOG_INFO,
+ TEST_LOG(cltsrv_log_file, TEST_LOG_INFO,
("\tClient(0x%p): connecting to server at %s\n", me, buffer));
fd = PR_Socket(domain, SOCK_STREAM, protocol);
@@ -405,7 +405,7 @@ static PRStatus ProcessRequest(PRFileDesc *fd, CSServer_t *server)
TEST_ASSERT(sizeof(*descriptor) == bytes);
TEST_LOG(
- cltsrv_log_file, TEST_LOG_VERBOSE,
+ cltsrv_log_file, TEST_LOG_VERBOSE,
("\t\tProcessRequest(0x%p): read descriptor {%d, %s}\n",
me, descbytes, descriptor->filename));
@@ -569,7 +569,7 @@ static PRStatus ProcessRequest(PRFileDesc *fd, CSServer_t *server)
}
TEST_ASSERT(bytes > 0);
}
-
+
PR_Lock(server->ml);
server->bytesTransferred += filebytes;
PR_Unlock(server->ml);
@@ -615,7 +615,7 @@ static PRStatus CreateWorker(CSServer_t *server, CSPool_t *pool)
return PR_FAILURE;
}
- TEST_LOG(cltsrv_log_file, TEST_LOG_STATUS,
+ TEST_LOG(cltsrv_log_file, TEST_LOG_STATUS,
("\tCreateWorker(0x%p): create new worker (0x%p)\n",
PR_GetCurrentThread(), worker->thread));
@@ -657,7 +657,7 @@ static void PR_CALLBACK Worker(void *arg)
me, (Aborted(rv) ? "interrupted" : "stopped")));
goto exit;
}
- }
+ }
pool->accepting += 1; /* how many are really in accept */
PR_Unlock(server->ml);
@@ -666,7 +666,7 @@ static void PR_CALLBACK Worker(void *arg)
("\t\tWorker(0x%p): calling accept\n", me));
fd = PR_Accept(server->listener, &from, PR_INTERVAL_NO_TIMEOUT);
- PR_Lock(server->ml);
+ PR_Lock(server->ml);
pool->accepting -= 1;
PR_NotifyCondVar(pool->acceptComplete);
@@ -713,7 +713,7 @@ static void PR_CALLBACK Worker(void *arg)
}
exit:
- PR_ClearInterrupt();
+ PR_ClearInterrupt();
PR_Unlock(server->ml);
if (NULL != fd)
@@ -848,7 +848,7 @@ static void PR_CALLBACK Server(void *arg)
static void WaitForCompletion(PRIntn execution)
{
while (execution > 0)
- {
+ {
PRIntn dally = (execution > 30) ? 30 : execution;
PR_Sleep(PR_SecondsToInterval(dally));
if (pthread_stats) PT_FPrintStats(debug_out, "\nPThread Statistics\n");
@@ -1053,7 +1053,7 @@ int main(int argc, char** argv)
cltsrv_log_file, TEST_LOG_VERBOSE,
("main(0x%p): creating %d client threads\n",
PR_GetCurrentThread(), clients));
-
+
if (!serverIsLocal)
{
rv = PR_GetHostByName(serverName, buffer, BUFFER_SIZE, &host);
@@ -1112,7 +1112,7 @@ int main(int argc, char** argv)
{
for (index = 0; index < clients; ++index)
{
- TEST_LOG(cltsrv_log_file, TEST_LOG_STATUS,
+ TEST_LOG(cltsrv_log_file, TEST_LOG_STATUS,
("main(0x%p): notifying client(0x%p) to stop\n",
PR_GetCurrentThread(), client[index].thread));
@@ -1127,7 +1127,7 @@ int main(int argc, char** argv)
}
PR_Unlock(client[index].ml);
- TEST_LOG(cltsrv_log_file, TEST_LOG_VERBOSE,
+ TEST_LOG(cltsrv_log_file, TEST_LOG_VERBOSE,
("main(0x%p): joining client(0x%p)\n",
PR_GetCurrentThread(), client[index].thread));
@@ -1143,7 +1143,7 @@ int main(int argc, char** argv)
{
/* All clients joined - retrieve the server */
TEST_LOG(
- cltsrv_log_file, TEST_LOG_NOTICE,
+ cltsrv_log_file, TEST_LOG_NOTICE,
("main(0x%p): notifying server(0x%p) to stop\n",
PR_GetCurrentThread(), server->thread));
@@ -1155,7 +1155,7 @@ int main(int argc, char** argv)
PR_Unlock(server->ml);
TEST_LOG(
- cltsrv_log_file, TEST_LOG_NOTICE,
+ cltsrv_log_file, TEST_LOG_NOTICE,
("main(0x%p): joining server(0x%p)\n",
PR_GetCurrentThread(), server->thread));
joinStatus = PR_JoinThread(server->thread);
@@ -1169,7 +1169,7 @@ int main(int argc, char** argv)
}
TEST_LOG(
- cltsrv_log_file, TEST_LOG_ALWAYS,
+ cltsrv_log_file, TEST_LOG_ALWAYS,
("main(0x%p): test complete\n", PR_GetCurrentThread()));
PT_FPrintStats(debug_out, "\nPThread Statistics\n");
diff --git a/pr/tests/concur.c b/pr/tests/concur.c
index 108f9066..1b8f001b 100644
--- a/pr/tests/concur.c
+++ b/pr/tests/concur.c
@@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
-** File: concur.c
+** File: concur.c
** Description: test of adding and removing concurrency options
*/
@@ -127,7 +127,7 @@ PRIntn PR_CALLBACK Concur(PRIntn argc, char **argv)
}
}
-
+
if (debug)
PR_fprintf(
PR_STDERR, "Waiting for %d thread(s) to exit\n", context.have);
diff --git a/pr/tests/cvar.c b/pr/tests/cvar.c
index e2be526e..bbb94225 100644
--- a/pr/tests/cvar.c
+++ b/pr/tests/cvar.c
@@ -8,7 +8,7 @@
**
** Name: cvar.c
**
-** Description: Tests Condition Variable Operations
+** Description: Tests Condition Variable Operations
**
** Modification History:
** 13-May-97 AGarcia- Converted the test to accomodate the debug_mode flag.
@@ -58,17 +58,17 @@ static PRBool failed = PR_FALSE;
static CircBuf* NewCB(void)
{
CircBuf *cbp;
-
+
cbp = PR_NEW(CircBuf);
if (cbp == NULL)
return (NULL);
-
+
cbp->bufLock = PR_NewLock();
cbp->startIdx = 0;
cbp->numFull = 0;
cbp->notFull = PR_NewCondVar(cbp->bufLock);
cbp->notEmpty = PR_NewCondVar(cbp->bufLock);
-
+
return (cbp);
}
@@ -85,7 +85,7 @@ static void DeleteCB(CircBuf *cbp)
/*
-** PutCBData puts new data on the queue. If the queue is full, it waits
+** PutCBData puts new data on the queue. If the queue is full, it waits
** until there is room.
*/
static void PutCBData(CircBuf *cbp, void *data)
@@ -96,7 +96,7 @@ static void PutCBData(CircBuf *cbp, void *data)
PR_WaitCondVar(cbp->notFull,PR_INTERVAL_NO_TIMEOUT);
cbp->data[(cbp->startIdx + cbp->numFull) % kQSIZE] = data;
cbp->numFull += 1;
-
+
/* let a waiting reader know that there is data */
PR_NotifyCondVar(cbp->notEmpty);
PR_Unlock(cbp->bufLock);
@@ -105,13 +105,13 @@ static void PutCBData(CircBuf *cbp, void *data)
/*
-** GetCBData gets the oldest data on the queue. If the queue is empty, it waits
+** GetCBData gets the oldest data on the queue. If the queue is empty, it waits
** until new data appears.
*/
static void* GetCBData(CircBuf *cbp)
{
void *data;
-
+
PR_Lock(cbp->bufLock);
/* wait while the buffer is empty */
while (cbp->numFull == 0)
@@ -119,11 +119,11 @@ static void* GetCBData(CircBuf *cbp)
data = cbp->data[cbp->startIdx];
cbp->startIdx =(cbp->startIdx + 1) % kQSIZE;
cbp->numFull -= 1;
-
+
/* let a waiting writer know that there is room */
PR_NotifyCondVar(cbp->notFull);
PR_Unlock(cbp->bufLock);
-
+
return (data);
}
@@ -144,7 +144,7 @@ static void PR_CALLBACK CXReader(void *arg)
if ((int)data != i)
if (debug_mode) printf("data mismatch at for i = %d usec\n", i);
}
-
+
PR_EnterMonitor(mon);
--alive;
PR_Notify(mon);
@@ -178,14 +178,14 @@ static void CondWaitContextSwitch(PRThreadScope scope1, PRThreadScope scope2)
cbp = NewCB();
t1 = PR_CreateThread(PR_USER_THREAD,
- CXReader, cbp,
+ CXReader, cbp,
PR_PRIORITY_NORMAL,
scope1,
PR_UNJOINABLE_THREAD,
0);
PR_ASSERT(t1);
t2 = PR_CreateThread(PR_USER_THREAD,
- CXWriter, cbp,
+ CXWriter, cbp,
PR_PRIORITY_NORMAL,
scope2,
PR_UNJOINABLE_THREAD,
@@ -284,7 +284,7 @@ static PRIntn PR_CALLBACK RealMain(int argc, char **argv)
int main(int argc, char *argv[])
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/cvar2.c b/pr/tests/cvar2.c
index c61405e2..c2efbe85 100644
--- a/pr/tests/cvar2.c
+++ b/pr/tests/cvar2.c
@@ -11,14 +11,14 @@
** Description: Simple test creates several local and global threads;
** half use a single,shared condvar, and the
** other half have their own condvar. The main thread then loops
-** notifying them to wakeup.
+** notifying them to wakeup.
**
** Modification History:
** 14-May-97 AGarcia- Converted the test to accomodate the debug_mode flag.
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
#include "nspr.h"
@@ -117,8 +117,8 @@ DPRINTF(("PrivateCondVarThread: thread 0x%lx notified exitcvar = 0x%lx cnt = %ld
#endif
}
-void
-CreateTestThread(threadinfo *info,
+void
+CreateTestThread(threadinfo *info,
PRInt32 id,
PRLock *lock,
PRCondVar *cvar,
@@ -128,7 +128,7 @@ CreateTestThread(threadinfo *info,
PRLock *exitlock,
PRCondVar *exitcvar,
PRInt32 *exitcount,
- PRBool shared,
+ PRBool shared,
PRThreadScope scope)
{
info->id = id;
@@ -154,7 +154,7 @@ CreateTestThread(threadinfo *info,
}
-void
+void
CondVarTestSUU(void *_arg)
{
PRInt32 arg = (PRInt32)_arg;
@@ -164,7 +164,7 @@ CondVarTestSUU(void *_arg)
PRCondVar *sharedcvar;
PRLock *exitlock;
PRCondVar *exitcvar;
-
+
exitcount=0;
tcount=0;
list = (threadinfo *)PR_MALLOC(sizeof(threadinfo) * (arg * 4));
@@ -213,7 +213,7 @@ CondVarTestSUU(void *_arg)
}
/* Join all the threads */
- for(index=0; index<(arg); index++)
+ for(index=0; index<(arg); index++)
PR_JoinThread(list[index].thread);
PR_DestroyCondVar(sharedcvar);
@@ -224,7 +224,7 @@ CondVarTestSUU(void *_arg)
PR_DELETE(list);
}
-void
+void
CondVarTestSUK(void *_arg)
{
PRInt32 arg = (PRInt32)_arg;
@@ -287,7 +287,7 @@ CondVarTestSUK(void *_arg)
}
/* Join all the threads */
- for(index=0; index<(arg); index++)
+ for(index=0; index<(arg); index++)
PR_JoinThread(list[index].thread);
PR_DestroyCondVar(sharedcvar);
@@ -298,7 +298,7 @@ CondVarTestSUK(void *_arg)
PR_DELETE(list);
}
-void
+void
CondVarTestPUU(void *_arg)
{
PRInt32 arg = (PRInt32)_arg;
@@ -384,7 +384,7 @@ DPRINTF(("CondVarTestPUU: thread 0x%lx waiting on exitcvar = 0x%lx cnt = %ld\n",
PR_DELETE(saved_tcount);
}
-void
+void
CondVarTestPUK(void *_arg)
{
PRInt32 arg = (PRInt32)_arg;
@@ -465,7 +465,7 @@ CondVarTestPUK(void *_arg)
PR_DELETE(saved_tcount);
}
-void
+void
CondVarTest(void *_arg)
{
PRInt32 arg = (PRInt32)_arg;
@@ -598,7 +598,7 @@ CondVarTest(void *_arg)
PR_DELETE(saved_ptcount);
}
-void
+void
CondVarTimeoutTest(void *_arg)
{
PRInt32 arg = (PRInt32)_arg;
@@ -709,7 +709,7 @@ CondVarTimeoutTest(void *_arg)
PR_DELETE(list);
}
-void
+void
CondVarMixedTest(void *_arg)
{
PRInt32 arg = (PRInt32)_arg;
@@ -833,7 +833,7 @@ CondVarMixedTest(void *_arg)
PR_DELETE(list);
}
-void
+void
CondVarCombinedTest(void *arg)
{
PRThread *threads[3];
@@ -953,7 +953,7 @@ default_threads, default_threads*2, default_threads*3, default_threads*4);
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/dbmalloc.c b/pr/tests/dbmalloc.c
index 67173fe6..fa96c964 100644
--- a/pr/tests/dbmalloc.c
+++ b/pr/tests/dbmalloc.c
@@ -14,7 +14,7 @@
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
#include <stdio.h>
#include <stdlib.h>
@@ -135,7 +135,7 @@ t2
l++;
n = get_node(buffer);
- if( (node_pt)0 == n )
+ if( (node_pt)0 == n )
{
printf("[%s]: Line %d: malloc failure!\n", name, l);
continue;
@@ -268,15 +268,15 @@ int main(int argc, char **argv)
struct threadlist *n;
n = (struct threadlist *)malloc(sizeof(struct threadlist));
- if( (struct threadlist *)0 == n )
+ if( (struct threadlist *)0 == n )
{
fprintf(stderr, "This is getting tedious. \"%s\"\n", *argv);
continue;
}
n->next = threadhead;
- n->thread = PR_CreateThread(PR_USER_THREAD, (void (*)(void *))test,
- *argv, PR_PRIORITY_NORMAL,
+ n->thread = PR_CreateThread(PR_USER_THREAD, (void (*)(void *))test,
+ *argv, PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD, PR_JOINABLE_THREAD,
0);
if( (PRThread *)0 == n->thread )
diff --git a/pr/tests/dbmalloc1.c b/pr/tests/dbmalloc1.c
index 4069afd3..cb13ecf7 100644
--- a/pr/tests/dbmalloc1.c
+++ b/pr/tests/dbmalloc1.c
@@ -89,16 +89,16 @@ int main(int argc, char **argv)
{
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
r2();
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
-
+
}
diff --git a/pr/tests/dceemu.c b/pr/tests/dceemu.c
index 99fd6cb7..5a1eb78d 100644
--- a/pr/tests/dceemu.c
+++ b/pr/tests/dceemu.c
@@ -41,33 +41,33 @@ static PRIntn prmain(PRIntn argc, char **argv)
rv = PRP_TryLock(ml);
PR_ASSERT(PR_SUCCESS == rv);
- if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
-
+ if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
+
rv = PRP_TryLock(ml);
PR_ASSERT(PR_FAILURE == rv);
- if ((rv != PR_FAILURE) & (!debug_mode)) failed_already=1;
+ if ((rv != PR_FAILURE) & (!debug_mode)) failed_already=1;
rv = PRP_NakedNotify(cv);
PR_ASSERT(PR_SUCCESS == rv);
- if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
+ if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
rv = PRP_NakedBroadcast(cv);
PR_ASSERT(PR_SUCCESS == rv);
- if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
+ if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
rv = PRP_NakedWait(cv, ml, tenmsecs);
PR_ASSERT(PR_SUCCESS == rv);
- if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
+ if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
+
+ PR_Unlock(ml);
- PR_Unlock(ml);
-
rv = PRP_NakedNotify(cv);
PR_ASSERT(PR_SUCCESS == rv);
- if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
+ if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
rv = PRP_NakedBroadcast(cv);
PR_ASSERT(PR_SUCCESS == rv);
- if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
+ if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1;
PRP_DestroyNakedCondVar(cv);
PR_DestroyLock(ml);
@@ -81,7 +81,7 @@ static PRIntn prmain(PRIntn argc, char **argv)
int main(int argc, char **argv)
{
PR_Initialize(prmain, argc, argv, 0);
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/depend.c b/pr/tests/depend.c
index 6df38c11..98ce245e 100644
--- a/pr/tests/depend.c
+++ b/pr/tests/depend.c
@@ -15,7 +15,7 @@
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
#include "prinit.h"
@@ -112,7 +112,7 @@ int main(int argc, char **argv)
const char *buildDate = __DATE__, *buildTime = __TIME__;
printf("Depend.c build time is %s %s\n", buildDate, buildTime);
-
+
if (NULL != info) ChaseDependents(info, tab);
return 0;
diff --git a/pr/tests/dll/mygetval.c b/pr/tests/dll/mygetval.c
index 53a6408e..7fb70024 100644
--- a/pr/tests/dll/mygetval.c
+++ b/pr/tests/dll/mygetval.c
@@ -17,7 +17,7 @@ PR_IMPLEMENT(PRIntn) My_GetValue()
}
#if defined(WIN16)
-int CALLBACK LibMain( HINSTANCE hInst, WORD wDataSeg,
+int CALLBACK LibMain( HINSTANCE hInst, WORD wDataSeg,
WORD cbHeapSize, LPSTR lpszCmdLine )
{
return TRUE;
diff --git a/pr/tests/dlltest.c b/pr/tests/dlltest.c
index 1cf82bc8..aec632ff 100644
--- a/pr/tests/dlltest.c
+++ b/pr/tests/dlltest.c
@@ -163,7 +163,7 @@ int main(int argc, char** argv)
{
PRStaticLinkTable slt[10];
PRLibrary *lib;
-
+
lib = PR_LoadStaticLibrary( "my.dll", slt );
if ( lib == NULL )
{
@@ -177,7 +177,7 @@ int main(int argc, char** argv)
}
goto exit_now;
-exit_now:
+exit_now:
PR_Cleanup();
if (failed_already) {
diff --git a/pr/tests/dtoa.c b/pr/tests/dtoa.c
index 59c6db98..a33c5c56 100644
--- a/pr/tests/dtoa.c
+++ b/pr/tests/dtoa.c
@@ -31,7 +31,7 @@ int main(int argc, char **argv)
double zero = 0.0;
char cnvt[50];
char *thousands;
-
+
num = 1e24;
num1 = PR_strtod("1e24",NULL);
if(num1 != num){
diff --git a/pr/tests/env.c b/pr/tests/env.c
index c11588d6..5da05b60 100644
--- a/pr/tests/env.c
+++ b/pr/tests/env.c
@@ -73,7 +73,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
} /* end block "Get command line options" */
-#if 0
+#if 0
{
/*
** This uses Windows native environment manipulation
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
}
if (verbose) printf("env: SetEnvironmentVariable() worked\n");
- size = GetEnvironmentVariable( ENVNAME, envBuf, ENVBUFSIZE );
+ size = GetEnvironmentVariable( ENVNAME, envBuf, ENVBUFSIZE );
if ( size == 0 ) {
if (debug) printf("env: Shit! GetEnvironmentVariable() failed. Found: %s\n", envBuf );
failedAlready = PR_TRUE;
@@ -245,7 +245,7 @@ int main(int argc, char **argv)
} else {
if (verbose) printf( "env: PR_GetEnv() after RAW un-set found: %s\n", value );
}
-
+
/* ---------------------------------------------------------------------- */
/* set it again ... */
envBuf = NewBuffer( ENVBUFSIZE );
diff --git a/pr/tests/exit.c b/pr/tests/exit.c
index 258868dd..fe6fc31e 100644
--- a/pr/tests/exit.c
+++ b/pr/tests/exit.c
@@ -91,14 +91,14 @@ static PRIntn PR_CALLBACK RealMain(PRIntn argc, char **argv)
}
}
return 0;
-
+
}
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/fdcach.c b/pr/tests/fdcach.c
index 37bec0d8..2fb2e5b8 100644
--- a/pr/tests/fdcach.c
+++ b/pr/tests/fdcach.c
@@ -55,7 +55,7 @@ int main(int argc, char **argv)
if (PR_Close(savefds[i]) == PR_FAILURE) {
fprintf(stderr, "PR_Close failed\n");
exit(1);
- }
+ }
}
/*
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
if (PR_Close(savefds[i]) == PR_FAILURE) {
fprintf(stderr, "PR_Close failed\n");
exit(1);
- }
+ }
}
/* Switch to the fd stack. */
@@ -109,7 +109,7 @@ int main(int argc, char **argv)
if (PR_Close(savefds[i]) == PR_FAILURE) {
fprintf(stderr, "PR_Close failed\n");
exit(1);
- }
+ }
}
/*
@@ -132,7 +132,7 @@ int main(int argc, char **argv)
if (PR_Close(savefds[i]) == PR_FAILURE) {
fprintf(stderr, "PR_Close failed\n");
exit(1);
- }
+ }
}
/* Switch to the fd cache. */
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
if (PR_Close(savefds[i]) == PR_FAILURE) {
fprintf(stderr, "PR_Close failed\n");
exit(1);
- }
+ }
}
for (i = 0; i < numfds; i++) {
@@ -175,7 +175,7 @@ int main(int argc, char **argv)
if (PR_Close(savefds[i]) == PR_FAILURE) {
fprintf(stderr, "PR_Close failed\n");
exit(1);
- }
+ }
}
/* Switch to the fd stack. */
@@ -200,7 +200,7 @@ int main(int argc, char **argv)
if (PR_Close(savefds[i]) == PR_FAILURE) {
fprintf(stderr, "PR_Close failed\n");
exit(1);
- }
+ }
}
for (i = 0; i < numfds; i++) {
@@ -218,7 +218,7 @@ int main(int argc, char **argv)
if (PR_Close(savefds[i]) == PR_FAILURE) {
fprintf(stderr, "PR_Close failed\n");
exit(1);
- }
+ }
}
PR_Cleanup();
diff --git a/pr/tests/fileio.c b/pr/tests/fileio.c
index be611a35..ac1fdb1a 100644
--- a/pr/tests/fileio.c
+++ b/pr/tests/fileio.c
@@ -7,7 +7,7 @@
**
** Name: fileio.c
**
-** Description: Program to copy one file to another.
+** Description: Program to copy one file to another.
**
** Modification History:
** 14-May-97 AGarcia- Converted the test to accomodate the debug_mode flag.
@@ -49,21 +49,21 @@ static void InitialSetup(void)
{
PRUintn i;
PRInt32 nWritten, rv;
-
+
t1 = PR_Open("t1.tmp", PR_CREATE_FILE | PR_RDWR, 0);
- PR_ASSERT(t1 != NULL);
-
+ PR_ASSERT(t1 != NULL);
+
for (i=0; i<TBSIZE; i++)
tbuf[i] = i;
-
+
nWritten = PR_Write((PRFileDesc*)t1, tbuf, TBSIZE);
- PR_ASSERT(nWritten == TBSIZE);
-
+ PR_ASSERT(nWritten == TBSIZE);
+
rv = PR_Seek(t1,0,PR_SEEK_SET);
- PR_ASSERT(rv == 0);
+ PR_ASSERT(rv == 0);
t2 = PR_Open("t2.tmp", PR_CREATE_FILE | PR_RDWR, 0);
- PR_ASSERT(t2 != NULL);
+ PR_ASSERT(t2 != NULL);
}
@@ -71,16 +71,16 @@ static void VerifyAndCleanup(void)
{
PRUintn i;
PRInt32 nRead, rv;
-
+
for (i=0; i<TBSIZE; i++)
tbuf[i] = 0;
-
+
rv = PR_Seek(t2,0,PR_SEEK_SET);
- PR_ASSERT(rv == 0);
+ PR_ASSERT(rv == 0);
nRead = PR_Read((PRFileDesc*)t2, tbuf, TBSIZE);
- PR_ASSERT(nRead == TBSIZE);
-
+ PR_ASSERT(nRead == TBSIZE);
+
for (i=0; i<TBSIZE; i++)
if (tbuf[i] != (PRUint8)i) {
if (debug_mode) printf("data mismatch for index= %d \n", i);
@@ -120,7 +120,7 @@ static void PR_CALLBACK reader(void *arg)
{
PRUintn i = 0;
PRInt32 nbytes;
-
+
do {
(void) PR_WaitSem(emptyBufs);
nbytes = PR_Read((PRFileDesc*)arg, buf[i].data, BSIZE);
@@ -136,7 +136,7 @@ static void PR_CALLBACK writer(void *arg)
{
PRUintn i = 0;
PRInt32 nbytes;
-
+
do {
(void) PR_WaitSem(fullBufs);
nbytes = buf[i].nbytes;
@@ -162,18 +162,18 @@ int main(int argc, char **argv)
/* Create initial temp file setup */
InitialSetup();
-
+
/* create the reader thread */
-
+
r = PR_CreateThread(PR_USER_THREAD,
- reader, t1,
+ reader, t1,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_JOINABLE_THREAD,
0);
w = PR_CreateThread(PR_USER_THREAD,
- writer, t2,
+ writer, t2,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_JOINABLE_THREAD,
diff --git a/pr/tests/foreign.c b/pr/tests/foreign.c
index 167d7601..6c682f30 100644
--- a/pr/tests/foreign.c
+++ b/pr/tests/foreign.c
@@ -13,7 +13,7 @@
** in.
**
** The goal: try to survive.
-**
+**
*/
#include "prcvar.h"
@@ -134,14 +134,14 @@ static PRStatus NSPRPUB_TESTS_CreateThread(StartFn start, void *arg)
#if defined(WIN32)
{
void *th;
- PRUintn id;
+ PRUintn id;
StartObject *start_object;
start_object = PR_NEW(StartObject);
PR_ASSERT(NULL != start_object);
start_object->start = start;
start_object->arg = arg;
th = (void*)_beginthreadex(
- NULL, /* LPSECURITY_ATTRIBUTES - pointer to thread security attributes */
+ NULL, /* LPSECURITY_ATTRIBUTES - pointer to thread security attributes */
0U, /* DWORD - initial thread stack size, in bytes */
windows_start, /* LPTHREAD_START_ROUTINE - pointer to thread function */
start_object, /* LPVOID - argument for new thread */
@@ -182,46 +182,46 @@ static void OneShot(void *arg)
switch (test)
{
case 0:
- lock = PR_NewLock();
+ lock = PR_NewLock();
DPRINTF((output,"Thread[0x%x] called PR_NewLock\n",
PR_GetCurrentThread()));
PR_DestroyLock(lock);
break;
-
+
case 1:
(void)PR_SecondsToInterval(1);
DPRINTF((output,"Thread[0x%x] called PR_SecondsToInterval\n",
PR_GetCurrentThread()));
break;
-
+
case 2: (void)PR_CreateThread(
PR_USER_THREAD, lazyEntry, NULL, PR_PRIORITY_NORMAL,
- PR_LOCAL_THREAD, PR_UNJOINABLE_THREAD, 0);
+ PR_LOCAL_THREAD, PR_UNJOINABLE_THREAD, 0);
DPRINTF((output,"Thread[0x%x] called PR_CreateThread\n",
PR_GetCurrentThread()));
break;
-
+
case 3:
- fd = PR_Open("foreign.tmp", PR_CREATE_FILE | PR_RDWR, 0666);
+ fd = PR_Open("foreign.tmp", PR_CREATE_FILE | PR_RDWR, 0666);
DPRINTF((output,"Thread[0x%x] called PR_Open\n",
PR_GetCurrentThread()));
PR_Close(fd);
break;
-
+
case 4:
- fd = PR_NewUDPSocket();
+ fd = PR_NewUDPSocket();
DPRINTF((output,"Thread[0x%x] called PR_NewUDPSocket\n",
PR_GetCurrentThread()));
PR_Close(fd);
break;
-
+
case 5:
- fd = PR_NewTCPSocket();
+ fd = PR_NewTCPSocket();
DPRINTF((output,"Thread[0x%x] called PR_NewTCPSocket\n",
PR_GetCurrentThread()));
PR_Close(fd);
break;
-
+
case 6:
#define TEMP_DIR "/tmp/"
dir = PR_OpenDir(TEMP_DIR);
@@ -229,19 +229,19 @@ static void OneShot(void *arg)
PR_GetCurrentThread()));
PR_CloseDir(dir);
break;
-
+
case 7:
(void)PR_NewThreadPrivateIndex(&pdkey, NULL);
DPRINTF((output,"Thread[0x%x] called PR_NewThreadPrivateIndex\n",
PR_GetCurrentThread()));
break;
-
+
case 8:
(void)PR_GetEnv("PATH");
DPRINTF((output,"Thread[0x%x] called PR_GetEnv\n",
PR_GetCurrentThread()));
break;
-
+
case 9:
(void)PR_NewTCPSocketPair(pair);
DPRINTF((output,"Thread[0x%x] called PR_NewTCPSocketPair\n",
@@ -249,7 +249,7 @@ static void OneShot(void *arg)
PR_Close(pair[0]);
PR_Close(pair[1]);
break;
-
+
case 10:
PR_SetConcurrency(2);
DPRINTF((output,"Thread[0x%x] called PR_SetConcurrency\n",
@@ -261,8 +261,8 @@ static void OneShot(void *arg)
DPRINTF((output,"Thread[0x%x] called PR_SetThreadPriority\n",
PR_GetCurrentThread()));
break;
-
- default:
+
+ default:
break;
} /* switch() */
}
diff --git a/pr/tests/forktest.c b/pr/tests/forktest.c
index aeb22d50..a7385baf 100644
--- a/pr/tests/forktest.c
+++ b/pr/tests/forktest.c
@@ -169,7 +169,7 @@ DoIO(void)
}
/*
- * Make sure it has proper null byte to mark end of string
+ * Make sure it has proper null byte to mark end of string
*/
buf[sizeof(buf) - 1] = '\0';
diff --git a/pr/tests/gethost.c b/pr/tests/gethost.c
index 779bce45..e2226416 100644
--- a/pr/tests/gethost.c
+++ b/pr/tests/gethost.c
@@ -131,7 +131,7 @@ int main(int argc, char **argv)
PrintHostent(&reversehe);
}
printf("PR_GetHostByAddr with PR_AF_INET6 done\n");
-
+
PR_StringToNetAddr("::1", &addr);
if (PR_IsNetAddrType(&addr, PR_IpAddrV4Mapped) == PR_TRUE) {
fprintf(stderr, "addr should not be ipv4 mapped address\n");
diff --git a/pr/tests/i2l.c b/pr/tests/i2l.c
index cd96edef..8f41fa34 100644
--- a/pr/tests/i2l.c
+++ b/pr/tests/i2l.c
@@ -92,7 +92,7 @@ static PRIntn PR_CALLBACK RealMain(PRIntn argc, char **argv)
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/inrval.c b/pr/tests/inrval.c
index e8eadaa3..c9192221 100644
--- a/pr/tests/inrval.c
+++ b/pr/tests/inrval.c
@@ -123,7 +123,7 @@ static void TestIntervals(void)
LL_I2L(thousand, 1000);
LL_DIV(elapsed, elapsed, thousand);
LL_L2UI(delta, elapsed);
- if (debug_mode) PR_fprintf(output,
+ if (debug_mode) PR_fprintf(output,
"TestIntervals: %swaiting %ld seconds took %ld msecs\n",
((rv == PR_SUCCESS) ? "" : "FAILED "), seconds, delta);
}
@@ -144,7 +144,7 @@ static PRIntn PR_CALLBACK RealMain(int argc, char** argv)
*/
/* main test */
-
+
PLOptStatus os;
PLOptState *opt = PL_CreateOptState(argc, argv, "dl:c:");
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -166,7 +166,7 @@ static PRIntn PR_CALLBACK RealMain(int argc, char** argv)
}
}
PL_DestroyOptState(opt);
-
+
output = PR_GetSpecialFD(PR_StandardOutput);
PR_fprintf(output, "inrval: Examine stdout to determine results.\n");
@@ -190,7 +190,7 @@ static PRIntn PR_CALLBACK RealMain(int argc, char** argv)
TestConversions();
TestIntervals();
}
-
+
return 0;
}
@@ -198,7 +198,7 @@ static PRIntn PR_CALLBACK RealMain(int argc, char** argv)
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/instrumt.c b/pr/tests/instrumt.c
index 5094e5db..f8e42e9b 100644
--- a/pr/tests/instrumt.c
+++ b/pr/tests/instrumt.c
@@ -39,19 +39,19 @@
#include <plstr.h>
#include <prclist.h>
#include <prmem.h>
-#include <plgetopt.h>
-#include <prlog.h>
-#include <prmon.h>
-#include <pratom.h>
-#include <prtrace.h>
-#include <prcountr.h>
-#include <prolock.h>
+#include <plgetopt.h>
+#include <prlog.h>
+#include <prmon.h>
+#include <pratom.h>
+#include <prtrace.h>
+#include <prcountr.h>
+#include <prolock.h>
#define COUNT_LIMIT (10 * ( 1024))
#define SMALL_TRACE_BUFSIZE ( 60 * 1024 )
-typedef enum
+typedef enum
{
CountLoop = 1,
TraceLoop = 2,
@@ -74,7 +74,7 @@ PR_DEFINE_TRACE( hTrace );
static void Help(void)
{
printf("Help? ... Ha!\n");
-}
+}
static void ListCounters(void)
{
@@ -95,13 +95,13 @@ static void ListCounters(void)
PR_GET_COUNTER_NAME_FROM_HANDLE( rh, qname, rname, desc );
PR_GET_COUNTER(tCtr, rh);
PR_LOG( lm, msgLevel,
- ( "QName: %s RName: %s Desc: %s Value: %ld\n",
+ ( "QName: %s RName: %s Desc: %s Value: %ld\n",
qn, rn, dn, tCtr ));
PR_FIND_NEXT_COUNTER_RNAME(rh, rh, qh );
- }
+ }
PR_FIND_NEXT_COUNTER_QNAME(qh, qh);
}
- return;
+ return;
} /* end ListCounters() */
static void ListTraces(void)
@@ -121,13 +121,13 @@ static void ListTraces(void)
{
PR_GET_TRACE_NAME_FROM_HANDLE( rh, qname, rname, desc );
PR_LOG( lm, msgLevel,
- ( "QName: %s RName: %s Desc: %s",
+ ( "QName: %s RName: %s Desc: %s",
qn, rn, dn ));
PR_FIND_NEXT_TRACE_RNAME(rh, rh, qh );
- }
+ }
PR_FIND_NEXT_TRACE_QNAME(qh, qh);
}
- return;
+ return;
} /* end ListCounters() */
@@ -146,7 +146,7 @@ static void PR_CALLBACK CountSomething( void *arg )
PR_LOG( lm, msgLevel,
("CountSomething: begin thread %ld", switchVar ));
-
+
for ( i = 0; i < COUNT_LIMIT ; i++)
{
switch ( switchVar )
@@ -172,13 +172,13 @@ static void PR_CALLBACK CountSomething( void *arg )
PR_LOG( lm, msgLevel,
("CounterSomething: end thread %ld", switchVar ));
-
+
PR_EnterMonitor(mon);
--activeThreads;
PR_Notify( mon );
PR_ExitMonitor(mon);
- return;
+ return;
} /* end CountSomething() */
/*
@@ -193,7 +193,7 @@ static void CounterTest( void )
PR_LOG( lm, msgLevel,
("Begin CounterTest"));
-
+
/*
** Test Get and Set of a counter.
**
@@ -215,7 +215,7 @@ static void CounterTest( void )
PR_ASSERT( tc == hCounter );
t1 = PR_CreateThread(PR_USER_THREAD,
- CountSomething, &one,
+ CountSomething, &one,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -223,23 +223,23 @@ static void CounterTest( void )
PR_ASSERT(t1);
t2 = PR_CreateThread(PR_USER_THREAD,
- CountSomething, &two,
+ CountSomething, &two,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
0);
PR_ASSERT(t2);
-
+
t3 = PR_CreateThread(PR_USER_THREAD,
- CountSomething, &three,
+ CountSomething, &three,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
0);
PR_ASSERT(t3);
-
+
t4 = PR_CreateThread(PR_USER_THREAD,
- CountSomething, &four,
+ CountSomething, &four,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -265,7 +265,7 @@ static void PR_CALLBACK RecordTrace(void *arg )
PR_Notify( mon );
PR_ExitMonitor(mon);
- return;
+ return;
} /* end RecordTrace() */
@@ -280,7 +280,7 @@ static void PR_CALLBACK SampleTrace( void *arg )
PRInt32 found, rc;
PRTraceEntry *foundEntries;
PRInt32 i;
-
+
foundEntries = (PRTraceEntry *)PR_Malloc( NUM_TRACE_RECORDS * sizeof(PRTraceEntry));
PR_ASSERT(foundEntries != NULL );
@@ -298,9 +298,9 @@ static void PR_CALLBACK SampleTrace( void *arg )
("SampleTrace, detail: Thread: %p, Time: %llX, UD0: %ld, UD1: %ld, UD2: %8.8ld",
(foundEntries +i)->thread,
(foundEntries +i)->time,
- (foundEntries +i)->userData[0],
- (foundEntries +i)->userData[1],
- (foundEntries +i)->userData[2] ));
+ (foundEntries +i)->userData[0],
+ (foundEntries +i)->userData[1],
+ (foundEntries +i)->userData[2] ));
}
}
PR_Sleep(PR_MillisecondsToInterval(50));
@@ -318,7 +318,7 @@ static void PR_CALLBACK SampleTrace( void *arg )
("SampleTrace(): exiting"));
#endif
- return;
+ return;
} /* end RecordTrace() */
/*
@@ -330,14 +330,14 @@ static void TraceTest( void )
PRInt32 size;
PR_DEFINE_TRACE( th );
PRThread *t1, *t2;
-
+
PR_LOG( lm, msgLevel,
- ("Begin TraceTest"));
+ ("Begin TraceTest"));
size = SMALL_TRACE_BUFSIZE;
PR_SET_TRACE_OPTION( PRTraceBufSize, &size );
PR_GET_TRACE_OPTION( PRTraceBufSize, &i );
-
+
PR_CREATE_TRACE( th, "TraceTest", "tt2", "A description for the trace test" );
PR_CREATE_TRACE( th, "TraceTest", "tt3", "A description for the trace test" );
PR_CREATE_TRACE( th, "TraceTest", "tt4", "A description for the trace test" );
@@ -362,7 +362,7 @@ static void TraceTest( void )
activeThreads += 2;
t1 = PR_CreateThread(PR_USER_THREAD,
- RecordTrace, NULL,
+ RecordTrace, NULL,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -370,20 +370,20 @@ static void TraceTest( void )
PR_ASSERT(t1);
t2 = PR_CreateThread(PR_USER_THREAD,
- SampleTrace, 0,
+ SampleTrace, 0,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
0);
PR_ASSERT(t2);
-
+
ListTraces();
PR_GET_TRACE_HANDLE_FROM_NAME( th, "TraceTest","tt1" );
PR_ASSERT( th == hTrace );
PR_LOG( lm, msgLevel,
- ("End TraceTest"));
+ ("End TraceTest"));
return;
} /* end TraceTest() */
@@ -394,9 +394,9 @@ static void TraceTest( void )
static void OrderedLockTest( void )
{
PR_LOG( lm, msgLevel,
- ("Begin OrderedLockTest"));
+ ("Begin OrderedLockTest"));
+
-
} /* end OrderedLockTest() */
diff --git a/pr/tests/intrupt.c b/pr/tests/intrupt.c
index b5970808..ce5e06d7 100644
--- a/pr/tests/intrupt.c
+++ b/pr/tests/intrupt.c
@@ -289,7 +289,7 @@ void PR_CALLBACK Intrupt(void *arg)
PR_ASSERT(PR_SUCCESS == rv);
PR_DestroyCondVar(cv);
- PR_DestroyLock(ml);
+ PR_DestroyLock(ml);
} /* Intrupt */
int main(int argc, char **argv)
diff --git a/pr/tests/io_timeout.c b/pr/tests/io_timeout.c
index fa6399c1..0ac4eef6 100644
--- a/pr/tests/io_timeout.c
+++ b/pr/tests/io_timeout.c
@@ -14,7 +14,7 @@
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
/***********************************************************************
** Includes
@@ -44,7 +44,7 @@ PRIntn debug_mode = 0;
#define GLOBAL_SCOPE_STRING "GLOBAL scope"
#define GLOBAL_BOUND_SCOPE_STRING "GLOBAL_BOUND scope"
-void
+void
thread_main(void *_info)
{
threadInfo *info = (threadInfo *)_info;
@@ -56,7 +56,7 @@ thread_main(void *_info)
PRThreadScope tscope;
char *scope_str;
-
+
if (debug_mode)
printf("thread %d is alive\n", info->id);
tscope = PR_GetThreadScope(PR_GetCurrentThread());
@@ -84,7 +84,7 @@ thread_main(void *_info)
failed_already=1;
goto dead;
}
-
+
listenAddr.inet.family = PR_AF_INET;
listenAddr.inet.port = PR_htons(BASE_PORT + info->id);
listenAddr.inet.ip = PR_htonl(PR_INADDR_ANY);
@@ -105,15 +105,15 @@ thread_main(void *_info)
}
if (debug_mode)
- printf("thread %d going into accept for %d seconds\n",
+ printf("thread %d going into accept for %d seconds\n",
info->id, info->accept_timeout + info->id);
clientSock = PR_Accept(listenSock, &clientAddr, PR_SecondsToInterval(info->accept_timeout +info->id));
if (clientSock == NULL) {
if (PR_GetError() == PR_IO_TIMEOUT_ERROR) {
- if (debug_mode) {
- printf("PR_Accept() timeout worked!\n");
+ if (debug_mode) {
+ printf("PR_Accept() timeout worked!\n");
printf("TEST PASSED! PR_Accept() returned error %d\n",
PR_IO_TIMEOUT_ERROR);
}
@@ -160,7 +160,7 @@ thread_test(PRThreadScope scope, PRInt32 num_threads)
dead_lock = PR_NewLock();
dead_cv = PR_NewCondVar(dead_lock);
alive = num_threads;
-
+
for (index = 0; index < num_threads; index++) {
threadInfo *info = (threadInfo *)PR_Malloc(sizeof(threadInfo));
@@ -169,7 +169,7 @@ thread_test(PRThreadScope scope, PRInt32 num_threads)
info->dead_cv = dead_cv;
info->alive = &alive;
info->accept_timeout = DEFAULT_ACCEPT_TIMEOUT;
-
+
thr = PR_CreateThread( PR_USER_THREAD,
thread_main,
(void *)info,
@@ -231,7 +231,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
if (0 == num_threads)
num_threads = NUM_THREADS;
diff --git a/pr/tests/io_timeoutk.c b/pr/tests/io_timeoutk.c
index cf6cb491..0d22a03b 100644
--- a/pr/tests/io_timeoutk.c
+++ b/pr/tests/io_timeoutk.c
@@ -41,7 +41,7 @@ PRIntn failed_already=0;
PRIntn debug_mode;
-void
+void
thread_main(void *_info)
{
threadInfo *info = (threadInfo *)_info;
@@ -50,7 +50,7 @@ thread_main(void *_info)
PRFileDesc *listenSock = NULL;
PRFileDesc *clientSock;
PRStatus rv;
-
+
if (debug_mode) printf("thread %d is alive\n", info->id);
listenSock = PR_NewTCPSocket();
@@ -58,7 +58,7 @@ thread_main(void *_info)
if (debug_mode) printf("unable to create listen socket\n");
goto dead;
}
-
+
listenAddr.inet.family = AF_INET;
listenAddr.inet.port = PR_htons(BASE_PORT + info->id);
listenAddr.inet.ip = PR_htonl(INADDR_ANY);
@@ -74,13 +74,13 @@ thread_main(void *_info)
goto dead;
}
- if (debug_mode) printf("thread %d going into accept for %d seconds\n",
+ if (debug_mode) printf("thread %d going into accept for %d seconds\n",
info->id, info->accept_timeout + info->id);
clientSock = PR_Accept(listenSock, &clientAddr, PR_SecondsToInterval(info->accept_timeout +info->id));
if (clientSock == NULL) {
- if (PR_GetError() == PR_IO_TIMEOUT_ERROR)
+ if (PR_GetError() == PR_IO_TIMEOUT_ERROR)
if (debug_mode) {
printf("PR_Accept() timeout worked!\n");
printf("TEST FAILED! PR_Accept() returned error %d\n",
@@ -119,7 +119,7 @@ thread_test(PRInt32 scope, PRInt32 num_threads)
dead_lock = PR_NewLock();
dead_cv = PR_NewCondVar(dead_lock);
alive = num_threads;
-
+
for (index = 0; index < num_threads; index++) {
threadInfo *info = (threadInfo *)malloc(sizeof(threadInfo));
@@ -128,7 +128,7 @@ thread_test(PRInt32 scope, PRInt32 num_threads)
info->dead_cv = dead_cv;
info->alive = &alive;
info->accept_timeout = DEFAULT_ACCEPT_TIMEOUT;
-
+
thr = PR_CreateThread( PR_USER_THREAD,
thread_main,
(void *)info,
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
if (argc > 2)
num_threads = atoi(argv[2]);
else
@@ -192,8 +192,8 @@ int main(int argc, char **argv)
thread_test(PR_GLOBAL_THREAD, num_threads);
PR_Cleanup();
-
- if(failed_already)
+
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/io_timeoutu.c b/pr/tests/io_timeoutu.c
index 7b3ba7c9..9a24457a 100644
--- a/pr/tests/io_timeoutu.c
+++ b/pr/tests/io_timeoutu.c
@@ -40,7 +40,7 @@ typedef struct threadInfo {
PRIntn failed_already=0;
PRIntn debug_mode;
-void
+void
thread_main(void *_info)
{
threadInfo *info = (threadInfo *)_info;
@@ -49,7 +49,7 @@ thread_main(void *_info)
PRFileDesc *listenSock = NULL;
PRFileDesc *clientSock;
PRStatus rv;
-
+
if (debug_mode) printf("thread %d is alive\n", info->id);
listenSock = PR_NewTCPSocket();
@@ -57,7 +57,7 @@ thread_main(void *_info)
if (debug_mode) printf("unable to create listen socket\n");
goto dead;
}
-
+
listenAddr.inet.family = AF_INET;
listenAddr.inet.port = PR_htons(BASE_PORT + info->id);
listenAddr.inet.ip = PR_htonl(INADDR_ANY);
@@ -73,7 +73,7 @@ thread_main(void *_info)
goto dead;
}
- if (debug_mode) printf("thread %d going into accept for %d seconds\n",
+ if (debug_mode) printf("thread %d going into accept for %d seconds\n",
info->id, info->accept_timeout + info->id);
clientSock = PR_Accept(
@@ -81,7 +81,7 @@ thread_main(void *_info)
info->accept_timeout + info->id));
if (clientSock == NULL) {
- if (PR_GetError() == PR_IO_TIMEOUT_ERROR)
+ if (PR_GetError() == PR_IO_TIMEOUT_ERROR)
if (debug_mode) {
printf("PR_Accept() timeout worked!\n");
printf("TEST FAILED! PR_Accept() returned error %d\n",
@@ -120,7 +120,7 @@ thread_test(PRInt32 scope, PRInt32 num_threads)
dead_lock = PR_NewLock();
dead_cv = PR_NewCondVar(dead_lock);
alive = num_threads;
-
+
for (index = 0; index < num_threads; index++) {
threadInfo *info = (threadInfo *)malloc(sizeof(threadInfo));
@@ -129,7 +129,7 @@ thread_test(PRInt32 scope, PRInt32 num_threads)
info->dead_cv = dead_cv;
info->alive = &alive;
info->accept_timeout = DEFAULT_ACCEPT_TIMEOUT;
-
+
thr = PR_CreateThread( PR_USER_THREAD,
thread_main,
(void *)info,
@@ -180,7 +180,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
if (argc > 2)
num_threads = atoi(argv[2]);
else
@@ -193,10 +193,10 @@ int main(int argc, char **argv)
thread_test(PR_LOCAL_THREAD, num_threads);
PR_Cleanup();
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
-
+
}
diff --git a/pr/tests/ioconthr.c b/pr/tests/ioconthr.c
index 0a1dda87..6b6a5523 100644
--- a/pr/tests/ioconthr.c
+++ b/pr/tests/ioconthr.c
@@ -92,7 +92,7 @@ int main(int argc, char **argv)
printf("Threads terminated in %d milliseconds\n",
PR_IntervalToMilliseconds(elapsed));
fflush(stdout);
-
+
/* We are being very generous and allow 10 seconds. */
if (elapsed >= PR_SecondsToInterval(10)) {
fprintf(stderr, "Interrupting threads took longer than 10 seconds!!\n");
diff --git a/pr/tests/join.c b/pr/tests/join.c
index ae3873fa..bd399017 100644
--- a/pr/tests/join.c
+++ b/pr/tests/join.c
@@ -10,13 +10,13 @@
** Description: Tests PR_SetMallocCountdown PR_ClearMallocCountdown functions.
**
** Modification History:
-**
+**
** 19-May-97 AGarcia - separate the four join tests into different unit test modules.
** AGarcia- Converted the test to accomodate the debug_mode flag.
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
/***********************************************************************
@@ -40,12 +40,12 @@
** OUTPUTS: None
** RETURN: None
** SIDE EFFECTS:
-**
+**
** RESTRICTIONS:
** None
** MEMORY: NA
** ALGORITHM: Determine what the status is and print accordingly.
-**
+**
***********************************************************************/
@@ -84,9 +84,9 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
PRThread *low,*high;
/* create the low and high priority threads */
-
+
low = PR_CreateThread(PR_USER_THREAD,
- lowPriority, 0,
+ lowPriority, 0,
PR_PRIORITY_LOW,
scope1,
PR_JOINABLE_THREAD,
@@ -98,7 +98,7 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
}
high = PR_CreateThread(PR_USER_THREAD,
- highPriority, 0,
+ highPriority, 0,
PR_PRIORITY_HIGH,
scope2,
PR_JOINABLE_THREAD,
@@ -131,9 +131,9 @@ void joinWithUnjoinable(void)
PRThread *thread;
/* create the unjoinable thread */
-
+
thread = PR_CreateThread(PR_USER_THREAD,
- unjoinable, 0,
+ unjoinable, 0,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -173,7 +173,7 @@ static PRIntn PR_CALLBACK RealMain(int argc, char **argv)
test.
Usage: test_name -d
*/
-
+
PLOptStatus os;
PLOptState *opt = PL_CreateOptState(argc, argv, "d:");
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -213,7 +213,7 @@ static PRIntn PR_CALLBACK RealMain(int argc, char **argv)
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/joinkk.c b/pr/tests/joinkk.c
index dde5d62b..433fc48e 100644
--- a/pr/tests/joinkk.c
+++ b/pr/tests/joinkk.c
@@ -10,7 +10,7 @@
** Description: Tests PR_SetMallocCountdown PR_ClearMallocCountdown functions.
**
** Modification History:
-**
+**
** 19-May-97 AGarcia - separate the four join tests into different unit test modules.
** AGarcia- Converted the test to accomodate the debug_mode flag.
** The debug mode will print all of the printfs associated with this test.
@@ -55,9 +55,9 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
PRThread *low,*high;
/* create the low and high priority threads */
-
+
low = PR_CreateThread(PR_USER_THREAD,
- lowPriority, 0,
+ lowPriority, 0,
PR_PRIORITY_LOW,
scope1,
PR_JOINABLE_THREAD,
@@ -69,7 +69,7 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
}
high = PR_CreateThread(PR_USER_THREAD,
- highPriority, 0,
+ highPriority, 0,
PR_PRIORITY_HIGH,
scope2,
PR_JOINABLE_THREAD,
@@ -105,7 +105,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
test.
Usage: test_name -d
*/
-
+
PLOptStatus os;
PLOptState *opt = PL_CreateOptState(argc, argv, "d:");
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -127,7 +127,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
if (debug_mode) printf("Kernel-Kernel test\n");
runTest(PR_GLOBAL_THREAD, PR_GLOBAL_THREAD);
- if(failed_already)
+ if(failed_already)
{
printf("FAIL\n");
return 1;
@@ -143,7 +143,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/joinku.c b/pr/tests/joinku.c
index f18894cd..8278303b 100644
--- a/pr/tests/joinku.c
+++ b/pr/tests/joinku.c
@@ -10,7 +10,7 @@
** Description: Tests PR_SetMallocCountdown PR_ClearMallocCountdown functions.
**
** Modification History:
-**
+**
** 19-May-97 AGarcia - separate the four join tests into different unit test modules.
** AGarcia- Converted the test to accomodate the debug_mode flag.
** The debug mode will print all of the printfs associated with this test.
@@ -57,9 +57,9 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
PRThread *low,*high;
/* create the low and high priority threads */
-
+
low = PR_CreateThread(PR_USER_THREAD,
- lowPriority, 0,
+ lowPriority, 0,
PR_PRIORITY_LOW,
scope1,
PR_JOINABLE_THREAD,
@@ -71,7 +71,7 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
}
high = PR_CreateThread(PR_USER_THREAD,
- highPriority, 0,
+ highPriority, 0,
PR_PRIORITY_HIGH,
scope2,
PR_JOINABLE_THREAD,
@@ -107,7 +107,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
test.
Usage: test_name -d
*/
-
+
PLOptStatus os;
PLOptState *opt = PL_CreateOptState(argc, argv, "d:");
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -133,14 +133,14 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
runTest(PR_GLOBAL_THREAD, PR_LOCAL_THREAD);
- if(failed_already)
+ if(failed_already)
{
- printf("FAIL\n");
+ printf("FAIL\n");
return 1;
}
else
{
- printf("PASS\n");
+ printf("PASS\n");
return 0;
}
@@ -150,7 +150,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/joinuk.c b/pr/tests/joinuk.c
index 3b496fcd..1b6fe9b2 100644
--- a/pr/tests/joinuk.c
+++ b/pr/tests/joinuk.c
@@ -10,7 +10,7 @@
** Description: Join kernel - user
**
** Modification History:
-**
+**
** 19-May-97 AGarcia - separate the four join tests into different unit test modules.
** AGarcia- Converted the test to accomodate the debug_mode flag.
** The debug mode will print all of the printfs associated with this test.
@@ -55,9 +55,9 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
PRThread *low,*high;
/* create the low and high priority threads */
-
+
low = PR_CreateThread(PR_USER_THREAD,
- lowPriority, 0,
+ lowPriority, 0,
PR_PRIORITY_LOW,
scope1,
PR_JOINABLE_THREAD,
@@ -69,7 +69,7 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
}
high = PR_CreateThread(PR_USER_THREAD,
- highPriority, 0,
+ highPriority, 0,
PR_PRIORITY_HIGH,
scope2,
PR_JOINABLE_THREAD,
@@ -105,7 +105,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
test.
Usage: test_name -d
*/
-
+
PLOptStatus os;
PLOptState *opt = PL_CreateOptState(argc, argv, "d:");
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -131,11 +131,11 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
runTest(PR_LOCAL_THREAD, PR_GLOBAL_THREAD);
- if(failed_already)
+ if(failed_already)
{
printf("FAIL\n");
return 1;
- } else
+ } else
{
printf("PASS\n");
return 0;
@@ -146,7 +146,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/joinuu.c b/pr/tests/joinuu.c
index 9b7d8c21..b03b6fff 100644
--- a/pr/tests/joinuu.c
+++ b/pr/tests/joinuu.c
@@ -10,7 +10,7 @@
** Description: Join tests user - user
**
** Modification History:
-**
+**
** 19-May-97 AGarcia - separate the four join tests into different unit test modules.
** AGarcia- Converted the test to accomodate the debug_mode flag.
** The debug mode will print all of the printfs associated with this test.
@@ -57,9 +57,9 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
PRThread *low,*high;
/* create the low and high priority threads */
-
+
low = PR_CreateThread(PR_USER_THREAD,
- lowPriority, 0,
+ lowPriority, 0,
PR_PRIORITY_LOW,
scope1,
PR_JOINABLE_THREAD,
@@ -71,7 +71,7 @@ void runTest(PRThreadScope scope1, PRThreadScope scope2)
}
high = PR_CreateThread(PR_USER_THREAD,
- highPriority, 0,
+ highPriority, 0,
PR_PRIORITY_HIGH,
scope2,
PR_JOINABLE_THREAD,
@@ -107,7 +107,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
test.
Usage: test_name -d
*/
-
+
PLOptStatus os;
PLOptState *opt = PL_CreateOptState(argc, argv, "d:");
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -131,11 +131,11 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
if (debug_mode) printf("User-User test\n");
runTest(PR_LOCAL_THREAD, PR_LOCAL_THREAD);
- if(failed_already)
+ if(failed_already)
{
printf("FAIL\n");
return 1;
- } else
+ } else
{
printf("PASS\n");
return 0;
@@ -148,7 +148,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/layer.c b/pr/tests/layer.c
index b64a5331..0272f0ea 100644
--- a/pr/tests/layer.c
+++ b/pr/tests/layer.c
@@ -93,7 +93,7 @@ static PRFileDesc *PopLayer(PRFileDesc *stack)
if (verbosity > quiet)
PR_fprintf(logFile, "Popped layer(0x%x) from stack(0x%x)\n", popped, stack);
popped->dtor(popped);
-
+
return stack;
} /* PopLayer */
#endif
@@ -127,7 +127,7 @@ static void PR_CALLBACK Client(void *arg)
if (verbosity > quiet)
PR_fprintf(logFile, "Client shutting down stack\n");
-
+
rv = PR_Shutdown(stack, PR_SHUTDOWN_BOTH); PR_ASSERT(PR_SUCCESS == rv);
} /* Client */
diff --git a/pr/tests/lazyinit.c b/pr/tests/lazyinit.c
index 4b9a910c..35b8a3a8 100644
--- a/pr/tests/lazyinit.c
+++ b/pr/tests/lazyinit.c
@@ -55,47 +55,47 @@ int main(int argc, char **argv)
}
else
test = atoi(argv[1]);
-
+
switch (test)
{
- case 0: ml = PR_NewLock();
+ case 0: ml = PR_NewLock();
break;
-
+
case 1: interval = PR_SecondsToInterval(1);
break;
-
+
case 2: thread = PR_CreateThread(
PR_USER_THREAD, lazyEntry, NULL, PR_PRIORITY_NORMAL,
- PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0);
+ PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0);
break;
-
- case 3: file = PR_Open("/usr/tmp/", PR_RDONLY, 0);
+
+ case 3: file = PR_Open("/usr/tmp/", PR_RDONLY, 0);
break;
-
- case 4: udp = PR_NewUDPSocket();
+
+ case 4: udp = PR_NewUDPSocket();
break;
-
- case 5: tcp = PR_NewTCPSocket();
+
+ case 5: tcp = PR_NewTCPSocket();
break;
-
- case 6: dir = PR_OpenDir("/usr/tmp/");
+
+ case 6: dir = PR_OpenDir("/usr/tmp/");
break;
-
+
case 7: (void)PR_NewThreadPrivateIndex(&pdkey, NULL);
break;
-
+
case 8: path = PR_GetEnv("PATH");
break;
-
+
case 9: status = PR_NewTCPSocketPair(pair);
break;
-
+
case 10: PR_SetConcurrency(2);
break;
-
- default:
+
+ default:
printf(
- "lazyinit: unrecognized command line argument: %s\n",
+ "lazyinit: unrecognized command line argument: %s\n",
argv[1] );
printf( "FAIL\n" );
exit( 1 );
diff --git a/pr/tests/lltest.c b/pr/tests/lltest.c
index 7e21e76f..36e67984 100644
--- a/pr/tests/lltest.c
+++ b/pr/tests/lltest.c
@@ -2,7 +2,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
+
/*
** testll.c -- test suite for 64bit integer (longlong) operations
**
@@ -15,11 +15,11 @@
**
** Description:
** lltest.c tests the functions defined in NSPR 2.0's prlong.h.
-**
+**
** Successive tests begin to depend on other LL functions working
** correctly. So, ... Do not change the order of the tests as run
** from main().
-**
+**
** Caveats:
** Do not even begin to think that this is an exhaustive test!
**
@@ -54,8 +54,8 @@ static PRBool verboseMode = PR_FALSE;
const PRInt64 bigZero = LL_INIT( 0, 0 );
const PRInt64 bigOne = LL_INIT( 0, 1 );
const PRInt64 bigTwo = LL_INIT( 0, 2 );
-const PRInt64 bigSixTeen = LL_INIT( 0, 16 );
-const PRInt64 bigThirtyTwo = LL_INIT( 0, 32 );
+const PRInt64 bigSixTeen = LL_INIT( 0, 16 );
+const PRInt64 bigThirtyTwo = LL_INIT( 0, 32 );
const PRInt64 bigMinusOne = LL_INIT( 0xffffffff, 0xffffffff );
const PRInt64 bigMinusTwo = LL_INIT( 0xffffffff, 0xfffffffe );
const PRInt64 bigNumber = LL_INIT( 0x7fffffff, 0xffffffff );
@@ -107,7 +107,7 @@ ResultFailed( char *what, char *how, PRInt64 expected, PRInt64 got)
PR_fprintf(output, "Expected: 0x%llx Got: 0x%llx\n", expected, got );
}
return;
-}
+}
/*
@@ -127,106 +127,106 @@ static void TestAssignment( void )
/*
** TestComparisons() -- Test the longlong comparison operations
*/
-static void
+static void
TestComparisons( void )
{
ReportProgress("Testing Comparisons Operations\n");
-
- /* test for zero */
+
+ /* test for zero */
if ( !LL_IS_ZERO( bigZero ))
SetFailed( "LL_IS_ZERO", "Zero is not zero" );
-
+
if ( LL_IS_ZERO( bigOne ))
SetFailed( "LL_IS_ZERO", "One tests as zero" );
-
+
if ( LL_IS_ZERO( bigMinusOne ))
SetFailed( "LL_IS_ZERO", "Minus One tests as zero" );
-
+
/* test equal */
if ( !LL_EQ( bigZero, bigZero ))
SetFailed( "LL_EQ", "zero EQ zero");
-
+
if ( !LL_EQ( bigOne, bigOne ))
SetFailed( "LL_EQ", "one EQ one" );
-
+
if ( !LL_EQ( bigNumber, bigNumber ))
SetFailed( "LL_EQ", "bigNumber EQ bigNumber" );
-
+
if ( !LL_EQ( bigMinusOne, bigMinusOne ))
SetFailed( "LL_EQ", "minus one EQ minus one");
-
+
if ( LL_EQ( bigZero, bigOne ))
SetFailed( "LL_EQ", "zero EQ one");
-
+
if ( LL_EQ( bigOne, bigZero ))
SetFailed( "LL_EQ", "one EQ zero" );
-
+
if ( LL_EQ( bigMinusOne, bigOne ))
SetFailed( "LL_EQ", "minus one EQ one");
-
+
if ( LL_EQ( bigNumber, bigOne ))
SetFailed( "LL_EQ", "bigNumber EQ one");
-
+
/* test not equal */
if ( LL_NE( bigZero, bigZero ))
SetFailed( "LL_NE", "0 NE 0");
-
+
if ( LL_NE( bigOne, bigOne ))
SetFailed( "LL_NE", "1 NE 1");
-
+
if ( LL_NE( bigMinusOne, bigMinusOne ))
SetFailed( "LL_NE", "-1 NE -1");
-
+
if ( LL_NE( bigNumber, bigNumber ))
SetFailed( "LL_NE", "n NE n");
-
+
if ( LL_NE( bigMinusNumber, bigMinusNumber ))
SetFailed( "LL_NE", "-n NE -n");
-
+
if ( !LL_NE( bigZero, bigOne))
SetFailed( "LL_NE", "0 NE 1");
-
+
if ( !LL_NE( bigOne, bigMinusNumber))
SetFailed( "LL_NE", "1 NE -n");
-
+
/* Greater than or equal to zero */
if ( !LL_GE_ZERO( bigZero ))
SetFailed( "LL_GE_ZERO", "0");
-
+
if ( !LL_GE_ZERO( bigOne ))
SetFailed( "LL_GE_ZERO", "1");
-
+
if ( !LL_GE_ZERO( bigNumber ))
SetFailed( "LL_GE_ZERO", "n");
-
+
if ( LL_GE_ZERO( bigMinusOne ))
SetFailed( "LL_GE_ZERO", "-1");
-
+
if ( LL_GE_ZERO( bigMinusNumber ))
SetFailed( "LL_GE_ZERO", "-n");
-
+
/* Algebraic Compare two values */
if ( !LL_CMP( bigZero, ==, bigZero ))
SetFailed( "LL_CMP", "0 == 0");
-
+
if ( LL_CMP( bigZero, >, bigZero ))
SetFailed( "LL_CMP", "0 > 0");
-
+
if ( LL_CMP( bigZero, <, bigZero ))
SetFailed( "LL_CMP", "0 < 0");
-
+
if ( LL_CMP( bigNumber, <, bigOne ))
SetFailed( "LL_CMP", "n < 1");
-
+
if ( !LL_CMP( bigNumber, >, bigOne ))
SetFailed( "LL_CMP", "n <= 1");
-
+
if ( LL_CMP( bigOne, >, bigNumber ))
SetFailed( "LL_CMP", "1 > n");
-
+
if ( LL_CMP( bigMinusNumber, >, bigNumber ))
SetFailed( "LL_CMP", "-n > n");
-
+
if ( LL_CMP( bigNumber, !=, bigNumber))
SetFailed( "LL_CMP", "n != n");
@@ -287,22 +287,22 @@ TestComparisons( void )
/* Bitwise Compare two numbers */
if ( !LL_UCMP( bigZero, ==, bigZero ))
SetFailed( "LL_UCMP", "0 == 0");
-
+
if ( LL_UCMP( bigZero, >, bigZero ))
SetFailed( "LL_UCMP", "0 > 0");
-
+
if ( LL_UCMP( bigZero, <, bigZero ))
SetFailed( "LL_UCMP", "0 < 0");
-
+
if ( LL_UCMP( bigNumber, <, bigOne ))
SetFailed( "LL_UCMP", "n < 1");
-
+
if ( !LL_UCMP( bigNumber, >, bigOne ))
SetFailed( "LL_UCMP", "n < 1");
-
+
if ( LL_UCMP( bigOne, >, bigNumber ))
SetFailed( "LL_UCMP", "1 > n");
-
+
if ( LL_UCMP( bigMinusNumber, <, bigNumber ))
SetFailed( "LL_UCMP", "-n < n");
@@ -365,14 +365,14 @@ static void
TestLogicalOperations( void )
{
PRUint64 result, result2;
-
+
ReportProgress("Testing Logical Operations\n");
-
+
/* Test AND */
LL_AND( result, bigZero, bigZero );
if ( !LL_IS_ZERO( result ))
ResultFailed( "LL_AND", "0 & 0", bigZero, result );
-
+
LL_AND( result, bigOne, bigOne );
if ( LL_IS_ZERO( result ))
ResultFailed( "LL_AND", "1 & 1", bigOne, result );
@@ -384,47 +384,47 @@ TestLogicalOperations( void )
LL_AND( result, bigMinusOne, bigMinusOne );
if ( !LL_UCMP( result, ==, bigMinusOne ))
ResultFailed( "LL_AND", "-1 & -1", bigMinusOne, result );
-
+
/* test OR */
LL_OR( result, bigZero, bigZero );
if ( !LL_IS_ZERO( result ))
ResultFailed( "LL_OR", "0 | 1", bigZero, result);
-
+
LL_OR( result, bigZero, bigOne );
if ( LL_IS_ZERO( result ))
ResultFailed( "LL_OR", "0 | 1", bigOne, result );
-
+
LL_OR( result, bigZero, bigMinusNumber );
if ( !LL_UCMP( result, ==, bigMinusNumber ))
ResultFailed( "LL_OR", "0 | -n", bigMinusNumber, result);
-
+
LL_OR( result, bigMinusNumber, bigZero );
if ( !LL_UCMP( result, ==, bigMinusNumber ))
ResultFailed( "LL_OR", "-n | 0", bigMinusNumber, result );
-
+
/* test XOR */
LL_XOR( result, bigZero, bigZero );
if ( LL_UCMP( result, !=, bigZero ))
ResultFailed( "LL_XOR", "0 ^ 0", bigZero, result);
-
+
LL_XOR( result, bigOne, bigZero );
if ( LL_UCMP( result, !=, bigOne ))
ResultFailed( "LL_XOR", "1 ^ 0", bigZero, result );
-
+
LL_XOR( result, bigMinusNumber, bigZero );
if ( LL_UCMP( result, !=, bigMinusNumber ))
ResultFailed( "LL_XOR", "-n ^ 0", bigMinusNumber, result );
-
+
LL_XOR( result, bigMinusNumber, bigMinusNumber );
if ( LL_UCMP( result, !=, bigZero ))
ResultFailed( "LL_XOR", "-n ^ -n", bigMinusNumber, result);
-
+
/* test OR2. */
result = bigZero;
LL_OR2( result, bigOne );
if ( LL_UCMP( result, !=, bigOne ))
ResultFailed( "LL_OR2", "(r=0) |= 1", bigOne, result);
-
+
result = bigOne;
LL_OR2( result, bigNumber );
if ( LL_UCMP( result, !=, bigNumber ))
@@ -440,7 +440,7 @@ TestLogicalOperations( void )
LL_NOT( result2, result);
if ( LL_UCMP( result2, !=, bigMinusNumber ))
ResultFailed( "LL_NOT", "r != ~(~-n)", bigMinusNumber, result);
-
+
/* test Negation */
LL_NEG( result, bigMinusNumber );
LL_NEG( result2, result );
@@ -465,79 +465,79 @@ TestConversion( void )
PRUint32 resultU32;
float resultF;
PRFloat64 resultD;
-
+
ReportProgress("Testing Conversion Operations\n");
-
+
/* LL_L2I -- Convert to signed 32bit */
LL_L2I(result32, bigOne );
- if ( result32 != one )
+ if ( result32 != one )
SetFailed( "LL_L2I", "r != 1");
-
+
LL_L2I(result32, bigMinusOne );
- if ( result32 != minusOne )
+ if ( result32 != minusOne )
SetFailed( "LL_L2I", "r != -1");
-
+
/* LL_L2UI -- Convert 64bit to unsigned 32bit */
LL_L2UI( resultU32, bigMinusOne );
if ( resultU32 != (PRUint32) minusOne )
SetFailed( "LL_L2UI", "r != -1");
-
+
LL_L2UI( resultU32, bigOne );
if ( resultU32 != (PRUint32) one )
SetFailed( "LL_L2UI", "r != 1");
-
+
/* LL_L2F -- Convert to 32bit floating point */
LL_L2F( resultF, bigOne );
if ( resultF != 1.0 )
SetFailed( "LL_L2F", "r != 1.0");
-
+
LL_L2F( resultF, bigMinusOne );
if ( resultF != -1.0 )
SetFailed( "LL_L2F", "r != 1.0");
-
+
/* LL_L2D -- Convert to 64bit floating point */
LL_L2D( resultD, bigOne );
if ( resultD != 1.0L )
SetFailed( "LL_L2D", "r != 1.0");
-
+
LL_L2D( resultD, bigMinusOne );
if ( resultD != -1.0L )
SetFailed( "LL_L2D", "r != -1.0");
-
+
/* LL_I2L -- Convert 32bit signed to 64bit signed */
LL_I2L( result, one );
if ( LL_CMP(result, !=, bigOne ))
SetFailed( "LL_I2L", "r != 1");
-
+
LL_I2L( result, minusOne );
if ( LL_CMP(result, !=, bigMinusOne ))
SetFailed( "LL_I2L", "r != -1");
-
+
/* LL_UI2L -- Convert 32bit unsigned to 64bit unsigned */
LL_UI2L( resultU, (PRUint32) one );
if ( LL_CMP(resultU, !=, bigOne ))
SetFailed( "LL_UI2L", "r != 1");
-
- /* [lth.] This did not behave as expected, but it is correct
+
+ /* [lth.] This did not behave as expected, but it is correct
*/
LL_UI2L( resultU, (PRUint32) minusOne );
if ( LL_CMP(resultU, !=, bigZeroFox ))
ResultFailed( "LL_UI2L", "r != -1", bigZeroFox, resultU);
-
+
/* LL_F2L -- Convert 32bit float to 64bit signed */
LL_F2L( result, 1.0 );
if ( LL_CMP(result, !=, bigOne ))
SetFailed( "LL_F2L", "r != 1");
-
+
LL_F2L( result, -1.0 );
if ( LL_CMP(result, !=, bigMinusOne ))
SetFailed( "LL_F2L", "r != -1");
-
+
/* LL_D2L -- Convert 64bit Float to 64bit signed */
LL_D2L( result, 1.0L );
if ( LL_CMP(result, !=, bigOne ))
SetFailed( "LL_D2L", "r != 1");
-
+
LL_D2L( result, -1.0L );
if ( LL_CMP(result, !=, bigMinusOne ))
SetFailed( "LL_D2L", "r != -1");
@@ -561,7 +561,7 @@ static void ShiftCompileOnly()
LL_ISHL(ia, 49, 32);
} /* ShiftCompileOnly */
-
+
/*
** TestShift() -- Test Shifting Operations
@@ -575,21 +575,21 @@ TestShift( void )
PRUint64 resultU;
ReportProgress("Testing Shifting Operations\n");
-
+
/* LL_SHL -- Shift left algebraic */
LL_SHL( result, bigOne, one );
if ( LL_CMP( result, !=, bigTwo ))
ResultFailed( "LL_SHL", "r != 2", bigOne, result );
-
+
LL_SHL( result, bigTwo, thirtyTwo );
if ( LL_CMP( result, !=, largeTwoZero ))
ResultFailed( "LL_SHL", "r != twoZero", largeTwoZero, result);
-
+
/* LL_SHR -- Shift right algebraic */
LL_SHR( result, bigFoxZero, thirtyTwo );
if ( LL_CMP( result, !=, bigMinusOne ))
ResultFailed( "LL_SHR", "r != -1", bigMinusOne, result);
-
+
LL_SHR( result, bigTwo, one );
if ( LL_CMP( result, !=, bigOne ))
ResultFailed( "LL_SHR", "r != 1", bigOne, result);
@@ -597,31 +597,31 @@ TestShift( void )
LL_SHR( result, bigFoxFox, thirtyTwo );
if ( LL_CMP( result, !=, bigMinusOne ))
ResultFailed( "LL_SHR", "r != -1 (was ff,ff)", bigMinusOne, result);
-
+
/* LL_USHR -- Logical shift right */
LL_USHR( resultU, bigZeroFox, thirtyTwo );
if ( LL_UCMP( resultU, !=, bigZero ))
ResultFailed( "LL_USHR", "r != 0 ", bigZero, result);
-
+
LL_USHR( resultU, bigFoxFox, thirtyTwo );
if ( LL_UCMP( resultU, !=, bigZeroFox ))
ResultFailed( "LL_USHR", "r != 0 ", bigZeroFox, result);
-
+
/* LL_ISHL -- Shift a 32bit integer into a 64bit result */
LL_ISHL( resultU, minusOne, thirtyTwo );
if ( LL_UCMP( resultU, !=, bigFoxZero ))
ResultFailed( "LL_ISHL", "r != ff,00 ", bigFoxZero, result);
-
+
LL_ISHL( resultU, one, sixtyThree );
if ( LL_UCMP( resultU, !=, bigEightZero ))
ResultFailed( "LL_ISHL", "r != 80,00 ", bigEightZero, result);
-
+
LL_ISHL( resultU, one, sixteen );
if ( LL_UCMP( resultU, !=, big64K ))
ResultFailed( "LL_ISHL", "r != 64K ", big64K, resultU);
-
+
return;
-}
+}
/*
@@ -637,10 +637,10 @@ TestArithmetic( void )
PRInt64 largeMultCand = LL_INIT( 0x00000000, 0x7fffffff );
PRInt64 largeMinusMultCand = LL_INIT( 0xffffffff, 0x10000001 );
PRInt64 largeMultCandx64K = LL_INIT( 0x00007fff, 0xffff0000 );
- PRInt64 largeNumSHL5 = LL_INIT( 0x0000001f, 0xffffffe0 );
+ PRInt64 largeNumSHL5 = LL_INIT( 0x0000001f, 0xffffffe0 );
PRInt64 result, result2;
- /* Addition */
+ /* Addition */
LL_ADD( result, bigOne, bigOne );
if ( LL_CMP( result, !=, bigTwo ))
ResultFailed( "LL_ADD", "r != 1 + 1", bigTwo, result);
@@ -652,30 +652,30 @@ TestArithmetic( void )
LL_ADD( result, largeVal, bigOne );
if ( LL_CMP( result, !=, largeValPlusOne ))
ResultFailed( "LL_ADD", "lVP1 != lV + 1", largeValPlusOne, result);
-
+
/* Subtraction */
LL_SUB( result, bigOne, bigOne );
if ( LL_CMP( result, !=, bigZero ))
ResultFailed( "LL_SUB", "r != 1 - 1", bigZero, result);
-
+
LL_SUB( result, bigTwo, bigOne );
if ( LL_CMP( result, !=, bigOne ))
ResultFailed( "LL_SUB", "r != 2 - 1", bigOne, result);
-
+
LL_SUB( result, largeValPlusOne, bigOne );
if ( LL_CMP( result, !=, largeVal ))
ResultFailed( "LL_SUB", "r != lVP1 - 1", largeVal, result);
-
-
+
+
/* Multiply */
LL_MUL( result, largeVal, bigTwo );
if ( LL_CMP( result, !=, largeValTimesTwo ))
ResultFailed( "LL_MUL", "r != lV*2", largeValTimesTwo, result);
-
+
LL_MUL( result, largeMultCand, big64K );
if ( LL_CMP( result, !=, largeMultCandx64K ))
ResultFailed( "LL_MUL", "r != lV*64K", largeMultCandx64K, result);
-
+
LL_NEG( result2, largeMultCand );
LL_MUL( result, largeMultCand, bigMinusOne );
if ( LL_CMP( result, !=, result2 ))
@@ -686,13 +686,13 @@ TestArithmetic( void )
if ( LL_CMP( result, !=, largeNumSHL5 ))
ResultFailed( "LL_MUL", "r != 0f<<5", largeNumSHL5, result );
-
+
/* LL_DIV() Division */
LL_DIV( result, bigOne, bigOne);
if ( LL_CMP( result, !=, bigOne ))
ResultFailed( "LL_DIV", "1 != 1", bigOne, result);
-
+
LL_DIV( result, bigNumber, bigOne );
if ( LL_CMP( result, !=, bigNumber ))
ResultFailed( "LL_DIV", "r != n / 1", bigNumber, result);
@@ -704,32 +704,32 @@ TestArithmetic( void )
LL_DIV( result, bigMinusNumber, bigMinusOne );
if ( LL_CMP( result, !=, bigNumber ))
ResultFailed( "LL_DIV", "r != -n / -1", bigNumber, result);
-
+
LL_SHL( result2, bigZeroFox, 5 );
LL_DIV( result, result2, bigOne );
if ( LL_CMP( result, !=, result2 ))
ResultFailed( "LL_DIV", "0f<<5 != 0f<<5", result2, result);
-
+
LL_SHL( result2, bigZeroFox, 5 );
LL_NEG( result2, result2 );
LL_DIV( result, result2, bigOne );
if ( LL_CMP( result, !=, result2 ))
ResultFailed( "LL_DIV", "-0f<<5 != -0f<<5", result2, result);
-
+
LL_SHL( result2, bigZeroFox, 17 );
LL_DIV( result, result2, bigMinusOne );
LL_NEG( result2, result2 );
if ( LL_CMP( result, !=, result2 ))
ResultFailed( "LL_DIV", "-0f<<17 != -0f<<17", result2, result);
-
-
+
+
/* LL_MOD() Modulo Division */
LL_ADD( result2, bigThirtyTwo, bigOne );
LL_MOD( result, result2, bigSixTeen );
if ( LL_CMP( result, !=, bigOne ))
ResultFailed( "LL_MOD", "r != 1", bigSixTeen, result);
-
-
+
+
LL_MUL( result2, bigZeroFox, bigThirtyTwo );
LL_ADD( result2, result2, bigSixTeen);
LL_MOD( result, result2, bigThirtyTwo );
@@ -740,10 +740,10 @@ TestArithmetic( void )
LL_DIV( result, bigOne, bigOne);
if ( LL_CMP( result, !=, bigOne ))
ResultFailed( "LL_DIV", "r != 16", bigSixTeen, result);
-
+
return;
-}
+}
static void TestWellknowns(void)
{
@@ -755,7 +755,7 @@ static void TestWellknowns(void)
ResultFailed( "min, mmin", "min != mmin", max, mmin);
if (LL_NE(zero, mzero))
ResultFailed( "zero, mzero", "zero != mzero", zero, mzero);
-} /* TestWellknowns */
+} /* TestWellknowns */
/*
** Initialize() -- Initialize the test case
@@ -771,7 +771,7 @@ Initialize( PRIntn argc, char **argv )
/*
** Parse command line options
- */
+ */
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
{
if (PL_OPT_BAD == os) continue;
@@ -780,12 +780,12 @@ Initialize( PRIntn argc, char **argv )
case 'd': /* set debug mode */
debugMode = PR_TRUE;
break;
-
+
case 'v': /* set verbose mode */
verboseMode = PR_TRUE;
debugMode = PR_TRUE;
break;
-
+
case 'h': /* user wants some guidance */
default:
PR_fprintf(output, "You get help.\n");
@@ -794,7 +794,7 @@ Initialize( PRIntn argc, char **argv )
}
PL_DestroyOptState(opt);
return(0);
-}
+}
int main(int argc, char **argv)
{
@@ -811,14 +811,14 @@ int main(int argc, char **argv)
TestShift();
TestArithmetic();
TestWellknowns();
-
+
/*
** That's all folks!
*/
if ( failedAlready )
{
PR_fprintf(output, "FAIL\n");\
- }
+ }
else
{
PR_fprintf(output, "PASS\n");\
diff --git a/pr/tests/lock.c b/pr/tests/lock.c
index 178315ae..f10f80fd 100644
--- a/pr/tests/lock.c
+++ b/pr/tests/lock.c
@@ -25,7 +25,7 @@
** - l <num> to control the number of loops
** - c <num> to control the number of CPUs.
** (was positional argv).
-**
+**
**
***********************************************************************/
@@ -247,7 +247,7 @@ static PRIntervalTime ReentrantMonitor(PRUint32 loops)
if (debug_mode) PR_fprintf(std_err, "Monitor released second time\n");
status = PR_JoinThread(thread);
- if (debug_mode) PR_fprintf(std_err,
+ if (debug_mode) PR_fprintf(std_err,
"Reentrant thread joined %s\n",
(status == PR_SUCCESS) ? "successfully" : "in error");
@@ -382,17 +382,17 @@ static PRIntervalTime ContentiousCMonitor(PRUint32 loops)
static PRIntervalTime Test(
const char* msg, PRUint32 (*test)(PRUint32 loops),
PRUint32 loops, PRIntervalTime overhead)
-{
+{
/*
* overhead - overhead not measured by the test.
* duration - wall clock time it took to perform test.
- * predicted - extra time test says should not be counted
+ * predicted - extra time test says should not be counted
*
* Time accountable to the test is duration - overhead - predicted
* All times are Intervals and accumulated for all iterations.
*/
PRFloat64 elapsed;
- PRIntervalTime accountable, duration;
+ PRIntervalTime accountable, duration;
PRUintn spaces = PL_strlen(msg);
PRIntervalTime timeout, timein = PR_IntervalNow();
PRIntervalTime predicted = test(loops);
@@ -420,7 +420,7 @@ int main(int argc, char **argv)
PRIntervalTime duration;
PRUint32 cpu, cpus = 2, loops = 100;
-
+
PR_STDIO_INIT();
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
{
@@ -503,14 +503,14 @@ int main(int argc, char **argv)
failed_already=1;
}
- if(failed_already)
+ if(failed_already)
{
- PR_fprintf(PR_STDOUT, "FAIL\n");
+ PR_fprintf(PR_STDOUT, "FAIL\n");
return 1;
- }
+ }
else
{
- PR_fprintf(PR_STDOUT, "PASS\n");
+ PR_fprintf(PR_STDOUT, "PASS\n");
return 0;
}
diff --git a/pr/tests/lockfile.c b/pr/tests/lockfile.c
index 9c2de8c8..903b5035 100644
--- a/pr/tests/lockfile.c
+++ b/pr/tests/lockfile.c
@@ -136,17 +136,17 @@ static PRIntervalTime ContentiousLock(PRInt32 loops)
static PRIntervalTime Test(
const char* msg, PRIntervalTime (*test)(PRInt32 loops),
PRInt32 loops, PRIntervalTime overhead)
-{
+{
/*
* overhead - overhead not measured by the test.
* duration - wall clock time it took to perform test.
- * predicted - extra time test says should not be counted
+ * predicted - extra time test says should not be counted
*
* Time accountable to the test is duration - overhead - predicted
* All times are Intervals and accumulated for all iterations.
*/
PRFloat64 elapsed;
- PRIntervalTime accountable, duration;
+ PRIntervalTime accountable, duration;
PRUintn spaces = strlen(msg);
PRIntervalTime timeout, timein = PR_IntervalNow();
PRIntervalTime predicted = test(loops);
@@ -171,7 +171,7 @@ int main(int argc, char **argv)
PRUint32 cpu, cpus = 2;
PRInt32 loops = 100;
-
+
/* The command line argument: -d is used to determine if the test is being run
in debug mode. The regress tool requires only one line output:PASS or FAIL.
All of the printfs associated with this test has been handled with a if (debug_mode)
@@ -195,7 +195,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
@@ -212,7 +212,7 @@ int main(int argc, char **argv)
{
if (debug_mode) printf("\nLockFile: Using %d CPU(s)\n", cpu);
PR_SetConcurrency(cpu);
-
+
duration = Test("LockFile non-contentious locking/unlocking", NonContentiousLock, loops, 0);
(void)Test("LockFile contentious locking/unlocking", ContentiousLock, loops, duration);
}
@@ -220,7 +220,7 @@ int main(int argc, char **argv)
PR_Delete(LOCKFILE); /* try to get rid of evidence */
if (debug_mode) printf("%s: test %s\n", "Lock(mutex) test", ((failed_already) ? "failed" : "passed"));
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/logger.c b/pr/tests/logger.c
index a44ef4ee..2ba0b394 100644
--- a/pr/tests/logger.c
+++ b/pr/tests/logger.c
@@ -40,7 +40,7 @@ static void PR_CALLBACK forked(void *arg)
PRIntn i;
PRLock *ml;
PRCondVar *cv;
-
+
PR_LogPrint("%s logging creating mutex\n", (const char*)arg);
ml = PR_NewLock();
PR_LogPrint("%s logging creating condition variable\n", (const char*)arg);
@@ -53,7 +53,7 @@ static void PR_CALLBACK forked(void *arg)
PR_WaitCondVar(cv, PR_SecondsToInterval(1));
PR_Unlock(ml);
}
-
+
PR_LogPrint("%s logging destroying condition variable\n", (const char*)arg);
PR_DestroyCondVar(cv);
PR_LogPrint("%s logging destroying mutex\n", (const char*)arg);
@@ -107,7 +107,7 @@ int main(int argc, char **argv)
/*
** Now change buffering.
*/
- PR_SetLogBuffering( 65500 );
+ PR_SetLogBuffering( 65500 );
thread = PR_CreateThread(
PR_USER_THREAD, forked, (void*)argv[0], PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0);
diff --git a/pr/tests/many_cv.c b/pr/tests/many_cv.c
index 8bddd786..1a408596 100644
--- a/pr/tests/many_cv.c
+++ b/pr/tests/many_cv.c
@@ -100,7 +100,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
PR_DELETE(cv);
PR_DestroyLock(ml);
-
+
printf("PASS\n");
PT_FPrintStats(err, "\nPThread Statistics\n");
@@ -111,7 +111,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/mbcs.c b/pr/tests/mbcs.c
index 50d5dd00..c5760939 100644
--- a/pr/tests/mbcs.c
+++ b/pr/tests/mbcs.c
@@ -10,9 +10,9 @@
**
** where dirName is the directory to be traversed. dirName is required.
**
-** Description:
+** Description:
** mbcs.c tests use of multi-byte characters, as would be passed to
-** NSPR funtions by internationalized applications.
+** NSPR funtions by internationalized applications.
**
** mbcs.c, when run on any single-byte platform, should run correctly.
** In truth, running the mbcs test on a single-byte platform is
@@ -31,11 +31,11 @@
** named such that when represented in the local multi-byte character
** set, one or more characters of the name is longer than a single
** byte.
-**
+**
*/
-#include <plgetopt.h>
-#include <nspr.h>
+#include <plgetopt.h>
+#include <nspr.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -68,7 +68,7 @@ static void TraverseDirectory( unsigned char *dir )
printf("Directory: %s\n", dir );
cwd = PR_OpenDir( dir );
if ( NULL == cwd ) {
- printf("PR_OpenDir() failed on directory: %s, with error: %d, %d\n",
+ printf("PR_OpenDir() failed on directory: %s, with error: %d, %d\n",
dir, PR_GetError(), PR_GetOSError());
exit(1);
}
@@ -76,7 +76,7 @@ static void TraverseDirectory( unsigned char *dir )
sprintf( file, "%s/%s", dir, dirEntry->name );
rc = PR_GetFileInfo( file, &info );
if ( PR_FAILURE == rc ) {
- printf("PR_GetFileInfo() failed on file: %s, with error: %d, %d\n",
+ printf("PR_GetFileInfo() failed on file: %s, with error: %d, %d\n",
dirEntry->name, PR_GetError(), PR_GetOSError());
exit(1);
}
@@ -84,12 +84,12 @@ static void TraverseDirectory( unsigned char *dir )
printf("File: %s \tsize: %ld\n", dirEntry->name, info.size );
fd = PR_Open( file, PR_RDONLY, 0 );
if ( NULL == fd ) {
- printf("PR_Open() failed. Error: %ld, OSError: %ld\n",
+ printf("PR_Open() failed. Error: %ld, OSError: %ld\n",
PR_GetError(), PR_GetOSError());
}
rc = PR_Close( fd );
if ( PR_FAILURE == rc ) {
- printf("PR_Close() failed. Error: %ld, OSError: %ld\n",
+ printf("PR_Close() failed. Error: %ld, OSError: %ld\n",
PR_GetError(), PR_GetOSError());
}
} else if ( PR_FILE_DIRECTORY == info.type ) {
@@ -104,7 +104,7 @@ static void TraverseDirectory( unsigned char *dir )
rc = PR_CloseDir( cwd );
if ( PR_FAILURE == rc ) {
- printf("PR_CloseDir() failed on directory: %s, with error: %d, %d\n",
+ printf("PR_CloseDir() failed on directory: %s, with error: %d, %d\n",
dir, PR_GetError(), PR_GetOSError());
}
@@ -132,8 +132,8 @@ int main(int argc, char **argv)
msgLevel = PR_LOG_DEBUG;
break;
default:
- dirName = strdup(opt->value);
- break;
+ dirName = strdup(opt->value);
+ break;
}
}
PL_DestroyOptState(opt);
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
lm = PR_NewLogModule("Test"); /* Initialize logging */
-
+
if ( dirName == NULL ) {
printf("you gotta specify a directory as an operand!\n");
exit(1);
diff --git a/pr/tests/nameshm1.c b/pr/tests/nameshm1.c
index 490ecb5d..beadb98d 100644
--- a/pr/tests/nameshm1.c
+++ b/pr/tests/nameshm1.c
@@ -6,10 +6,10 @@
/*
** File: nameshm1.c -- Test Named Shared Memory
**
-** Description:
+** Description:
** nameshm1 tests Named Shared Memory. nameshm1 performs two tests of
-** named shared memory.
-**
+** named shared memory.
+**
** The first test is a basic test. The basic test operates as a single
** process. The process exercises all the API elements of the facility.
** This test also attempts to write to all locations in the shared
@@ -31,7 +31,7 @@
** order.
**
** Synopsis: nameshm1 [options] [name]
-**
+**
** Options:
** -d Enables debug trace via PR_LOG()
** -v Enables verbose mode debug trace via PR_LOG()
@@ -39,7 +39,7 @@
** mapped as read-only. When this option is specified, the
** test should crash with a seg-fault; this is a destructive
** test and is considered successful when it seg-faults.
-**
+**
** -C Causes nameshm1 to start as the client-side of a
** client-server pair of processes. Only the instance
** of nameshm1 operating as the server-side process should
@@ -48,7 +48,7 @@
** The client-side uses the shared memory segment created by
** the server-side to communicate with the server-side
** process.
-**
+**
** -p <n> Specify the number of iterations the client-server tests
** should perform. Default: 1000.
**
@@ -66,7 +66,7 @@
** /lth. Aug-1999.
*/
-#include <plgetopt.h>
+#include <plgetopt.h>
#include <nspr.h>
#include <stdlib.h>
#include <string.h>
@@ -104,7 +104,7 @@ char optName[NameSize] = OPT_NAME;
char buf[1024] = "";
-static void BasicTest( void )
+static void BasicTest( void )
{
PRSharedMemory *shm;
char *addr; /* address of shared memory segment */
@@ -134,7 +134,7 @@ static void BasicTest( void )
( "nameshm1: RW Create: success: %p", shm ));
addr = PR_AttachSharedMemory( shm , 0 );
- if ( NULL == addr )
+ if ( NULL == addr )
{
PR_LOG( lm, msgLevel,
( "nameshm1: RW Attach: Error: %ld. OSError: %ld", PR_GetError(), PR_GetOSError()));
@@ -211,7 +211,7 @@ static void ReadOnlyTest( void )
roAddr = PR_AttachSharedMemory( shm , PR_SHM_READONLY );
- if ( NULL == roAddr )
+ if ( NULL == roAddr )
{
PR_LOG( lm, msgLevel,
( "nameshm1: RO Attach: Error: %ld. OSError: %ld", PR_GetError(), PR_GetOSError()));
@@ -273,7 +273,7 @@ static void DoClient( void )
PRStatus rc;
PRSem *sem1, *sem2;
PRSharedMemory *shm;
- PRUint32 *addr;
+ PRUint32 *addr;
PRInt32 i;
PR_LOG( lm, msgLevel,
@@ -289,7 +289,7 @@ static void DoClient( void )
if ( NULL == shm )
{
PR_LOG( lm, msgLevel,
- ( "nameshm1: DoClient(): Create: Error: %ld. OSError: %ld",
+ ( "nameshm1: DoClient(): Create: Error: %ld. OSError: %ld",
PR_GetError(), PR_GetOSError()));
failed_already = 1;
return;
@@ -298,10 +298,10 @@ static void DoClient( void )
( "nameshm1: DoClient(): Create: success: %p", shm ));
addr = PR_AttachSharedMemory( shm , 0 );
- if ( NULL == addr )
+ if ( NULL == addr )
{
PR_LOG( lm, msgLevel,
- ( "nameshm1: DoClient(): Attach: Error: %ld. OSError: %ld",
+ ( "nameshm1: DoClient(): Attach: Error: %ld. OSError: %ld",
PR_GetError(), PR_GetOSError()));
failed_already = 1;
return;
@@ -317,9 +317,9 @@ static void DoClient( void )
{
rc = PR_WaitSemaphore( sem2 );
PR_ASSERT( PR_FAILURE != rc );
-
+
(*addr)++;
- PR_ASSERT( (*addr % 2) == 0 );
+ PR_ASSERT( (*addr % 2) == 0 );
if ( optVerbose )
PR_LOG( lm, msgLevel,
( "nameshm1: Client ping: %d, i: %d", *addr, i));
@@ -338,7 +338,7 @@ static void DoClient( void )
if ( PR_FAILURE == rc )
{
PR_LOG( lm, msgLevel,
- ( "nameshm1: DoClient(): Detach: Error: %ld. OSError: %ld",
+ ( "nameshm1: DoClient(): Detach: Error: %ld. OSError: %ld",
PR_GetError(), PR_GetOSError()));
failed_already = 1;
return;
@@ -350,7 +350,7 @@ static void DoClient( void )
if ( PR_FAILURE == rc )
{
PR_LOG( lm, msgLevel,
- ( "nameshm1: DoClient(): Close: Error: %ld. OSError: %ld",
+ ( "nameshm1: DoClient(): Close: Error: %ld. OSError: %ld",
PR_GetError(), PR_GetOSError()));
failed_already = 1;
return;
@@ -368,7 +368,7 @@ static void ClientServerTest( void )
PRProcess *proc;
PRInt32 exit_status;
PRSharedMemory *shm;
- PRUint32 *addr;
+ PRUint32 *addr;
PRInt32 i;
char *child_argv[8];
char buf[24];
@@ -398,7 +398,7 @@ static void ClientServerTest( void )
( "nameshm1: Server: Create: success: %p", shm ));
addr = PR_AttachSharedMemory( shm , 0 );
- if ( NULL == addr )
+ if ( NULL == addr )
{
PR_LOG( lm, msgLevel,
( "nameshm1: Server: Attach: Error: %ld. OSError: %ld", PR_GetError(), PR_GetOSError()));
@@ -431,7 +431,7 @@ static void ClientServerTest( void )
*addr = 1;
for ( i = 0 ; i < optPing ; i++ )
- {
+ {
rc = PR_WaitSemaphore( sem1 );
PR_ASSERT( PR_FAILURE != rc );
@@ -441,7 +441,7 @@ static void ClientServerTest( void )
PR_LOG( lm, msgLevel,
( "nameshm1: Server pong: %d, i: %d", *addr, i));
-
+
rc = PR_PostSemaphore( sem2 );
PR_ASSERT( PR_FAILURE != rc );
}
@@ -465,7 +465,7 @@ static void ClientServerTest( void )
if ( PR_FAILURE == rc )
{
PR_LOG( lm, msgLevel,
- ( "nameshm1: Server: Detach: Error: %ld. OSError: %ld",
+ ( "nameshm1: Server: Detach: Error: %ld. OSError: %ld",
PR_GetError(), PR_GetOSError()));
failed_already = 1;
return;
@@ -477,7 +477,7 @@ static void ClientServerTest( void )
if ( PR_FAILURE == rc )
{
PR_LOG( lm, msgLevel,
- ( "nameshm1: Server: Close: Error: %ld. OSError: %ld",
+ ( "nameshm1: Server: Close: Error: %ld. OSError: %ld",
PR_GetError(), PR_GetOSError()));
failed_already = 1;
return;
@@ -489,7 +489,7 @@ static void ClientServerTest( void )
if ( PR_FAILURE == rc )
{
PR_LOG( lm, msgLevel,
- ( "nameshm1: Server: Destroy: Error: %ld. OSError: %ld",
+ ( "nameshm1: Server: Destroy: Error: %ld. OSError: %ld",
PR_GetError(), PR_GetOSError()));
failed_already = 1;
return;
@@ -545,7 +545,7 @@ int main(int argc, char **argv)
}
lm = PR_NewLogModule("Test"); /* Initialize logging */
-
+
PR_LOG( lm, msgLevel,
( "nameshm1: Starting" ));
diff --git a/pr/tests/nbconn.c b/pr/tests/nbconn.c
index e113a7e1..8ff01efa 100644
--- a/pr/tests/nbconn.c
+++ b/pr/tests/nbconn.c
@@ -303,7 +303,7 @@ connection_success_test()
* Now create a thread to accept a connection
*/
sp.sp_fd = sockfd;
- thr = PR_CreateThread(PR_USER_THREAD, TCP_Server, (void *)&sp,
+ thr = PR_CreateThread(PR_USER_THREAD, TCP_Server, (void *)&sp,
PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0);
if (thr == NULL) {
fprintf(stderr,"Error - PR_CreateThread failed: (%d,%d)\n",
diff --git a/pr/tests/nblayer.c b/pr/tests/nblayer.c
index 0d9aec42..1b4064bd 100644
--- a/pr/tests/nblayer.c
+++ b/pr/tests/nblayer.c
@@ -182,7 +182,7 @@ static void PR_CALLBACK Client(void *arg)
if (verbosity > quiet)
PR_fprintf(logFile, "Client shutting down stack\n");
-
+
rv = PR_Shutdown(stack, PR_SHUTDOWN_BOTH); PR_ASSERT(PR_SUCCESS == rv);
} /* Client */
@@ -217,7 +217,7 @@ static void PR_CALLBACK Server(void *arg)
}
} while (NULL == service);
PR_ASSERT(NULL != service);
-
+
if (verbosity > quiet)
PR_fprintf(logFile, "Server accepting connection\n");
diff --git a/pr/tests/nonblock.c b/pr/tests/nonblock.c
index ed447a2c..e9d19d18 100644
--- a/pr/tests/nonblock.c
+++ b/pr/tests/nonblock.c
@@ -198,7 +198,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
retVal = PR_Recv(sock, buf, sizeof(buf), 0, PR_INTERVAL_NO_TIMEOUT);
if (retVal != CHUNK_SIZE) {
PL_PrintError("Second Receive:\n");
- fprintf(stderr, "Second PR_Recv: retVal: %ld, Error: %ld\n",
+ fprintf(stderr, "Second PR_Recv: retVal: %ld, Error: %ld\n",
retVal, PR_GetError());
exit(1);
}
@@ -215,7 +215,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/ntioto.c b/pr/tests/ntioto.c
index 7af65944..0686241b 100644
--- a/pr/tests/ntioto.c
+++ b/pr/tests/ntioto.c
@@ -5,7 +5,7 @@
/*
** File: ntioto.c
-** Description:
+** Description:
** This test, ntioto.c, was designed to reproduce a bug reported by NES
** on WindowsNT (fibers implementation). NSPR was asserting in ntio.c
** after PR_AcceptRead() had timed out. I/O performed subsequent to the
@@ -16,12 +16,12 @@
** Design:
** This test will fail with an assert in ntio.c if the problem it was
** designed to catch occurs. It returns 0 otherwise.
-**
+**
** The main() thread initializes and tears things down. A file is
** opened for writing; this file will be written to by AcceptThread()
** and JitterThread(). Main() creates a socket for reading, listens
** and binds the socket.
-**
+**
** ConnectThread() connects to the socket created by main, then polls
** the "state" variable. When state is AllDone, ConnectThread() exits.
**
@@ -36,11 +36,11 @@
** AcceptThread() and JitterThread() or may take a while. The default
** iteration count, jitter, is set by DEFAULT_JITTER. This may be
** modified at the command line with the -j option.
-**
+**
*/
-#include <plgetopt.h>
-#include <nspr.h>
+#include <plgetopt.h>
+#include <nspr.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -97,7 +97,7 @@ static void AcceptThread(void *arg)
PRFileDesc *arSock;
PRNetAddr *arAddr;
- bytesRead = PR_AcceptRead( listenSock,
+ bytesRead = PR_AcceptRead( listenSock,
&arSock,
&arAddr,
dataBuf,
@@ -160,8 +160,8 @@ static void ConnectThread( void *arg )
memset(&serverAddress, 0, sizeof(serverAddress));
rv = PR_InitializeNetAddr(PR_IpAddrLoopback, BASE_PORT, &serverAddress);
PR_ASSERT( PR_SUCCESS == rv );
- rv = PR_Connect( clientSock,
- &serverAddress,
+ rv = PR_Connect( clientSock,
+ &serverAddress,
PR_SecondsToInterval(1));
PR_ASSERT( PR_SUCCESS == rv );
diff --git a/pr/tests/obsints.c b/pr/tests/obsints.c
index e7a15d9c..30501ad7 100644
--- a/pr/tests/obsints.c
+++ b/pr/tests/obsints.c
@@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
- * Test: obsints.c
+ * Test: obsints.c
*
* Description: make sure that protypes.h defines the obsolete integer
* types intn, uintn, uint, int8, uint8, int16, uint16, int32, uint32,
diff --git a/pr/tests/op_2long.c b/pr/tests/op_2long.c
index deecf79e..8a6e1c3a 100644
--- a/pr/tests/op_2long.c
+++ b/pr/tests/op_2long.c
@@ -31,7 +31,7 @@ PRIntn error_code;
/*
* should exceed any system's maximum file name length
* Note: was set at 4096. This is legal on some unix (Linux 2.1+) platforms.
- *
+ *
*/
#define TOO_LONG 5000
@@ -64,12 +64,12 @@ int main(int argc, char **argv)
return 1;
}
}
-
+
else {
printf ("Test passed\n");
return 0;
}
-
-}
+
+}
diff --git a/pr/tests/op_excl.c b/pr/tests/op_excl.c
index 4b46891f..630b7637 100644
--- a/pr/tests/op_excl.c
+++ b/pr/tests/op_excl.c
@@ -13,8 +13,8 @@
** 27-Oct-1999 lth. Initial version
***********************************************************************/
-#include <plgetopt.h>
-#include <nspr.h>
+#include <plgetopt.h>
+#include <nspr.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/pr/tests/op_filnf.c b/pr/tests/op_filnf.c
index da66a7ac..61c4d497 100644
--- a/pr/tests/op_filnf.c
+++ b/pr/tests/op_filnf.c
@@ -48,4 +48,4 @@ int main(int argc, char **argv)
printf ("opened a file that should not exist\n");
printf ("FAIL\n");
return 1;
-}
+}
diff --git a/pr/tests/op_filok.c b/pr/tests/op_filok.c
index 035765a8..f8110cc4 100644
--- a/pr/tests/op_filok.c
+++ b/pr/tests/op_filok.c
@@ -45,4 +45,4 @@ int main(int argc, char **argv)
return 1;
}
}
-}
+}
diff --git a/pr/tests/op_nofil.c b/pr/tests/op_nofil.c
index 0e51c741..2b809672 100644
--- a/pr/tests/op_nofil.c
+++ b/pr/tests/op_nofil.c
@@ -53,4 +53,4 @@ int main(int argc, char **argv)
}
printf ("FAIL\n");
return 1;
-}
+}
diff --git a/pr/tests/openfile.c b/pr/tests/openfile.c
index d0b664f3..265e0418 100644
--- a/pr/tests/openfile.c
+++ b/pr/tests/openfile.c
@@ -24,7 +24,7 @@ int main(int argc, char **argv)
PRInt32 nbytes;
PRFileDesc *fd;
-
+
/* Write in text mode. Let stdio deal with line endings. */
template = fopen(TEMPLATE_FILE_NAME, "w");
fputs("line 1\nline 2\n", template);
diff --git a/pr/tests/parent.c b/pr/tests/parent.c
index e49af2a9..f1bfc415 100644
--- a/pr/tests/parent.c
+++ b/pr/tests/parent.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
PR_DELETE(child);
PR_Cleanup();
return test_status;
-
+
} /* main */
/* parent.c */
diff --git a/pr/tests/parsetm.c b/pr/tests/parsetm.c
index be1fc491..d4629dd4 100644
--- a/pr/tests/parsetm.c
+++ b/pr/tests/parsetm.c
@@ -46,7 +46,7 @@ static void PrintExplodedTime(const PRExplodedTime *et) {
}
hourOffset = totalOffset / 3600;
minOffset = (totalOffset % 3600) / 60;
- if (debug_mode)
+ if (debug_mode)
printf("%s%02ld%02ld ", sign, hourOffset, minOffset);
}
diff --git a/pr/tests/perf.c b/pr/tests/perf.c
index 91248eb2..8247eaf8 100644
--- a/pr/tests/perf.c
+++ b/pr/tests/perf.c
@@ -116,7 +116,7 @@ static void CDThread(void)
for (i = 0; i < num_threads; i++) {
PRThread *t = PR_CreateThread(PR_USER_THREAD,
- dull, 0,
+ dull, 0,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -190,7 +190,7 @@ static void ContextSwitch(PRThreadScope scope1, PRThreadScope scope2)
cxq = 0;
t1 = PR_CreateThread(PR_USER_THREAD,
- CXReader, 0,
+ CXReader, 0,
PR_PRIORITY_NORMAL,
scope1,
PR_UNJOINABLE_THREAD,
@@ -204,7 +204,7 @@ static void ContextSwitch(PRThreadScope scope1, PRThreadScope scope2)
t1));
}
t2 = PR_CreateThread(PR_USER_THREAD,
- CXWriter, 0,
+ CXWriter, 0,
PR_PRIORITY_NORMAL,
scope2,
PR_UNJOINABLE_THREAD,
@@ -285,8 +285,8 @@ static void SemaContextSwitch(PRThreadScope scope1, PRThreadScope scope2)
cxq = 0;
t1 = PR_CreateThread(PR_USER_THREAD,
- SemaThread,
- sem_set1,
+ SemaThread,
+ sem_set1,
PR_PRIORITY_NORMAL,
scope1,
PR_UNJOINABLE_THREAD,
@@ -300,8 +300,8 @@ static void SemaContextSwitch(PRThreadScope scope1, PRThreadScope scope2)
t1));
}
t2 = PR_CreateThread(PR_USER_THREAD,
- SemaThread,
- sem_set2,
+ SemaThread,
+ sem_set2,
PR_PRIORITY_NORMAL,
scope2,
PR_UNJOINABLE_THREAD,
@@ -383,7 +383,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
if (0 == count) count = DEFAULT_COUNT;
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_BlockClockInterrupts();
PR_UnblockClockInterrupts();
diff --git a/pr/tests/poll_er.c b/pr/tests/poll_er.c
index 5f7ec2e5..7c204dc8 100755
--- a/pr/tests/poll_er.c
+++ b/pr/tests/poll_er.c
@@ -87,7 +87,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
@@ -124,7 +124,7 @@ int main(int argc, char **argv)
if ((listenSock2 = PR_NewTCPSocket()) == NULL) {
fprintf(stderr, "Can't create a new TCP socket\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
addr.inet.family = AF_INET;
@@ -132,18 +132,18 @@ int main(int argc, char **argv)
addr.inet.port = PR_htons(0);
if (PR_Bind(listenSock2, &addr) == PR_FAILURE) {
fprintf(stderr, "Can't bind socket\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
if (PR_GetSockName(listenSock2, &addr) == PR_FAILURE) {
fprintf(stderr, "PR_GetSockName failed\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
listenPort2 = PR_ntohs(addr.inet.port);
if (PR_Listen(listenSock2, 5) == PR_FAILURE) {
fprintf(stderr, "Can't listen on a socket\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
PR_snprintf(buf, sizeof(buf),
@@ -185,14 +185,14 @@ int main(int argc, char **argv)
fprintf(stderr, "Failed to detect the bad fd: "
"PR_Poll returns %d, out_flags is 0x%hx\n",
retVal, pds[2].out_flags);
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
if (debug_mode) printf("PR_Poll detected the bad fd. Test passed.\n\n");
PR_Cleanup();
goto exit_now;
exit_now:
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/poll_nm.c b/pr/tests/poll_nm.c
index 4842606f..59a24864 100644
--- a/pr/tests/poll_nm.c
+++ b/pr/tests/poll_nm.c
@@ -64,7 +64,7 @@ clientThreadFunc(void *arg)
for (i = 0; i < NUM_ITERATIONS; i++) {
sock = PR_NewTCPSocket();
PR_ASSERT(sock != NULL);
-
+
sts = PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT);
PR_ASSERT(sts == PR_SUCCESS);
@@ -112,7 +112,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
if ((listenSock2 = PR_NewTCPSocket()) == NULL) {
fprintf(stderr, "Can't create a new TCP socket\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
addr.inet.family = PR_AF_INET;
@@ -161,19 +161,19 @@ int main(int argc, char **argv)
addr.inet.port = PR_htons(0);
if (PR_Bind(listenSock2, &addr) == PR_FAILURE) {
fprintf(stderr, "Can't bind socket\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
if (PR_GetSockName(listenSock2, &addr) == PR_FAILURE) {
fprintf(stderr, "PR_GetSockName failed\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
listenPort2 = PR_ntohs(addr.inet.port);
PR_SetSocketOption(listenSock2, &optval);
if (PR_Listen(listenSock2, 5) == PR_FAILURE) {
fprintf(stderr, "Can't listen on a socket\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
PR_snprintf(buf, sizeof(buf),
@@ -201,7 +201,7 @@ int main(int argc, char **argv)
PR_UNJOINABLE_THREAD, 0);
if (clientThread == NULL) {
fprintf(stderr, "can't create thread\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
@@ -211,7 +211,7 @@ int main(int argc, char **argv)
PR_UNJOINABLE_THREAD, 0);
if (clientThread == NULL) {
fprintf(stderr, "can't create thread\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
@@ -234,7 +234,7 @@ int main(int argc, char **argv)
PR_ASSERT(retVal != 0); /* no timeout */
if (retVal == -1) {
fprintf(stderr, "PR_Poll failed\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
@@ -251,7 +251,7 @@ int main(int argc, char **argv)
sock = PR_Accept(pds[j].fd, NULL, PR_INTERVAL_NO_TIMEOUT);
if (sock == NULL) {
fprintf(stderr, "PR_Accept() failed\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
other_pds[nextIndex].fd = sock;
@@ -259,12 +259,12 @@ int main(int argc, char **argv)
nextIndex++;
} else if (pds[j].out_flags & PR_POLL_ERR) {
fprintf(stderr, "PR_Poll() indicates that an fd has error\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
} else if (pds[j].out_flags & PR_POLL_NVAL) {
fprintf(stderr, "PR_Poll() indicates that fd %d is invalid\n",
PR_FileDesc2NativeHandle(pds[j].fd));
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
}
@@ -292,7 +292,7 @@ int main(int argc, char **argv)
PR_ASSERT(nAvail == nRead);
if (nRead == -1) {
fprintf(stderr, "PR_Read() failed\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
} else if (nRead == 0) {
PR_Close(pds[j].fd);
@@ -304,11 +304,11 @@ int main(int argc, char **argv)
}
} else if (pds[j].out_flags & PR_POLL_ERR) {
fprintf(stderr, "PR_Poll() indicates that an fd has error\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
} else if (pds[j].out_flags & PR_POLL_NVAL) {
fprintf(stderr, "PR_Poll() indicates that an fd is invalid\n");
- failed_already=1;
+ failed_already=1;
goto exit_now;
}
other_pds[nextIndex] = pds[j];
@@ -336,8 +336,8 @@ exit_now:
}
PR_Cleanup();
-
- if(failed_already)
+
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/poll_to.c b/pr/tests/poll_to.c
index 40d1a261..b1af515d 100644
--- a/pr/tests/poll_to.c
+++ b/pr/tests/poll_to.c
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
@@ -112,7 +112,7 @@ int main(int argc, char **argv)
if ((listenSock2 = PR_NewTCPSocket()) == NULL) {
fprintf(stderr, "Can't create a new TCP socket\n");
- if (!debug_mode) failed_already=1;
+ if (!debug_mode) failed_already=1;
goto exit_now;
}
addr.inet.family = PR_AF_INET;
@@ -120,18 +120,18 @@ int main(int argc, char **argv)
addr.inet.port = PR_htons(0);
if (PR_Bind(listenSock2, &addr) == PR_FAILURE) {
fprintf(stderr, "Can't bind socket\n");
- if (!debug_mode) failed_already=1;
+ if (!debug_mode) failed_already=1;
goto exit_now;
}
if (PR_GetSockName(listenSock2, &addr) == PR_FAILURE) {
fprintf(stderr, "PR_GetSockName failed\n");
- if (!debug_mode) failed_already=1;
+ if (!debug_mode) failed_already=1;
goto exit_now;
}
listenPort2 = PR_ntohs(addr.inet.port);
if (PR_Listen(listenSock2, 5) == PR_FAILURE) {
fprintf(stderr, "Can't listen on a socket\n");
- if (!debug_mode) failed_already=1;
+ if (!debug_mode) failed_already=1;
goto exit_now;
}
PR_snprintf(buf, sizeof(buf),
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
"PR_Poll should time out and return 0, but it returns %ld\n",
retVal);
fprintf(stderr, "%s", buf);
- if (!debug_mode) failed_already=1;
+ if (!debug_mode) failed_already=1;
goto exit_now;
}
if (debug_mode) printf("PR_Poll timed out. Test passed.\n\n");
@@ -173,7 +173,7 @@ exit_now:
PR_Cleanup();
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/prftest1.c b/pr/tests/prftest1.c
index 0e9ca49f..83e7c103 100644
--- a/pr/tests/prftest1.c
+++ b/pr/tests/prftest1.c
@@ -14,7 +14,7 @@
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
/***********************************************************************
** Includes
@@ -39,12 +39,12 @@
** OUTPUTS: None
** RETURN: None
** SIDE EFFECTS:
-**
+**
** RESTRICTIONS:
** None
** MEMORY: NA
** ALGORITHM: Determine what the status is and print accordingly.
-**
+**
***********************************************************************/
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
/* main test */
PR_STDIO_INIT();
-
+
i16 = -1;
n = -1;
i32 = -1;
diff --git a/pr/tests/prftest2.c b/pr/tests/prftest2.c
index 6a62a260..4ab7eb32 100644
--- a/pr/tests/prftest2.c
+++ b/pr/tests/prftest2.c
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_STDIO_INIT();
i16 = -32;
diff --git a/pr/tests/provider.c b/pr/tests/provider.c
index 75c7168a..bb5dd329 100644
--- a/pr/tests/provider.c
+++ b/pr/tests/provider.c
@@ -23,7 +23,7 @@
* The debug mode will print all of the printfs associated with this test.
* The regress mode will be the default mode. Since the regress tool limits
* the output to a one line status:PASS or FAIL,all of the printf statements
- * have been handled with an if (debug_mode) statement.
+ * have been handled with an if (debug_mode) statement.
*/
#include "prclist.h"
@@ -230,7 +230,7 @@ static void PR_CALLBACK Client(void *arg)
PRInt32 bytes, descbytes, filebytes, netbytes;
(void)PR_NetAddrToString(&client->serverAddress, buffer, sizeof(buffer));
- TEST_LOG(cltsrv_log_file, TEST_LOG_INFO,
+ TEST_LOG(cltsrv_log_file, TEST_LOG_INFO,
("\tClient(0x%p): connecting to server at %s\n", me, buffer));
fd = PR_Socket(domain, SOCK_STREAM, protocol);
@@ -406,7 +406,7 @@ static PRStatus ProcessRequest(PRFileDesc *fd, CSServer_t *server)
TEST_ASSERT(sizeof(*descriptor) == bytes);
TEST_LOG(
- cltsrv_log_file, TEST_LOG_VERBOSE,
+ cltsrv_log_file, TEST_LOG_VERBOSE,
("\t\tProcessRequest(0x%p): read descriptor {%d, %s}\n",
me, descbytes, descriptor->filename));
@@ -569,7 +569,7 @@ static PRStatus ProcessRequest(PRFileDesc *fd, CSServer_t *server)
}
TEST_ASSERT(bytes > 0);
}
-
+
PR_Lock(server->ml);
server->bytesTransferred += filebytes;
PR_Unlock(server->ml);
@@ -657,7 +657,7 @@ static PRStatus JoinThread(PRThread *thread)
rv = PR_FAILURE;
break;
}
- return rv;
+ return rv;
} /* JoinThread */
static PRStatus NewThread(
@@ -715,14 +715,14 @@ static PRStatus NewThread(
#if defined(WIN32)
{
void *th;
- PRUintn id;
+ PRUintn id;
StartObject *start_object;
start_object = PR_NEW(StartObject);
PR_ASSERT(NULL != start_object);
start_object->start = start;
start_object->arg = arg;
th = (void*)_beginthreadex(
- NULL, /* LPSECURITY_ATTRIBUTES - pointer to thread security attributes */
+ NULL, /* LPSECURITY_ATTRIBUTES - pointer to thread security attributes */
0U, /* DWORD - initial thread stack size, in bytes */
windows_start, /* LPTHREAD_START_ROUTINE - pointer to thread function */
start_object, /* LPVOID - argument for new thread */
@@ -753,7 +753,7 @@ static PRStatus CreateWorker(CSServer_t *server, CSPool_t *pool)
Worker, worker, DEFAULT_SERVER_PRIORITY, PR_UNJOINABLE_THREAD);
if (PR_FAILURE == rv) PR_DELETE(worker);
- TEST_LOG(cltsrv_log_file, TEST_LOG_STATUS,
+ TEST_LOG(cltsrv_log_file, TEST_LOG_STATUS,
("\tCreateWorker(0x%p): create new worker (0x%p)\n",
PR_GetCurrentThread(), worker->thread));
@@ -796,7 +796,7 @@ static void PR_CALLBACK Worker(void *arg)
me, (Aborted(rv) ? "interrupted" : "stopped")));
goto exit;
}
- }
+ }
pool->accepting += 1; /* how many are really in accept */
PR_Unlock(server->ml);
@@ -805,7 +805,7 @@ static void PR_CALLBACK Worker(void *arg)
("\t\tWorker(0x%p): calling accept\n", me));
fd = PR_Accept(server->listener, &from, PR_INTERVAL_NO_TIMEOUT);
- PR_Lock(server->ml);
+ PR_Lock(server->ml);
pool->accepting -= 1;
PR_NotifyCondVar(pool->acceptComplete);
@@ -852,7 +852,7 @@ static void PR_CALLBACK Worker(void *arg)
}
exit:
- PR_ClearInterrupt();
+ PR_ClearInterrupt();
PR_Unlock(server->ml);
if (NULL != fd)
@@ -984,7 +984,7 @@ static void PR_CALLBACK Server(void *arg)
static void WaitForCompletion(PRIntn execution)
{
while (execution > 0)
- {
+ {
PRIntn dally = (execution > 30) ? 30 : execution;
PR_Sleep(PR_SecondsToInterval(dally));
if (pthread_stats) PT_FPrintStats(debug_out, "\nPThread Statistics\n");
@@ -1190,7 +1190,7 @@ int main(int argc, char **argv)
cltsrv_log_file, TEST_LOG_VERBOSE,
("main(0x%p): creating %d client threads\n",
PR_GetCurrentThread(), clients));
-
+
if (!serverIsLocal)
{
rv = PR_GetHostByName(serverName, buffer, BUFFER_SIZE, &host);
@@ -1244,7 +1244,7 @@ int main(int argc, char **argv)
{
for (index = 0; index < clients; ++index)
{
- TEST_LOG(cltsrv_log_file, TEST_LOG_STATUS,
+ TEST_LOG(cltsrv_log_file, TEST_LOG_STATUS,
("main(0x%p): notifying client(0x%p) to stop\n",
PR_GetCurrentThread(), client[index].thread));
@@ -1259,7 +1259,7 @@ int main(int argc, char **argv)
}
PR_Unlock(client[index].ml);
- TEST_LOG(cltsrv_log_file, TEST_LOG_VERBOSE,
+ TEST_LOG(cltsrv_log_file, TEST_LOG_VERBOSE,
("main(0x%p): joining client(0x%p)\n",
PR_GetCurrentThread(), client[index].thread));
@@ -1275,7 +1275,7 @@ int main(int argc, char **argv)
{
/* All clients joined - retrieve the server */
TEST_LOG(
- cltsrv_log_file, TEST_LOG_NOTICE,
+ cltsrv_log_file, TEST_LOG_NOTICE,
("main(0x%p): notifying server(0x%p) to stop\n",
PR_GetCurrentThread(), server->thread));
@@ -1287,7 +1287,7 @@ int main(int argc, char **argv)
PR_Unlock(server->ml);
TEST_LOG(
- cltsrv_log_file, TEST_LOG_NOTICE,
+ cltsrv_log_file, TEST_LOG_NOTICE,
("main(0x%p): joining server(0x%p)\n",
PR_GetCurrentThread(), server->thread));
joinStatus = JoinThread(server->thread);
@@ -1301,7 +1301,7 @@ int main(int argc, char **argv)
}
TEST_LOG(
- cltsrv_log_file, TEST_LOG_ALWAYS,
+ cltsrv_log_file, TEST_LOG_ALWAYS,
("main(0x%p): test complete\n", PR_GetCurrentThread()));
if (thread_provider == thread_win32)
diff --git a/pr/tests/prpollml.c b/pr/tests/prpollml.c
index cef22052..82194f5f 100644
--- a/pr/tests/prpollml.c
+++ b/pr/tests/prpollml.c
@@ -43,7 +43,7 @@ static void Test(void)
for (i = POLL_DESC_COUNT; i >= 1; i--) {
rv = PR_Poll(pd, i, timeout);
if (rv != 0) {
- fprintf(stderr, "PR_Poll should time out but returns %d\n",
+ fprintf(stderr, "PR_Poll should time out but returns %d\n",
(int) rv);
exit(1);
}
@@ -85,7 +85,7 @@ int main(int argc, char **argv)
(int) PR_GetError(), (int) PR_GetOSError());
exit(1);
}
-
+
pd[i].fd = sock;
pd[i].in_flags = PR_POLL_READ;
}
diff --git a/pr/tests/prselect.c b/pr/tests/prselect.c
index 15aa8558..9006fe4c 100644
--- a/pr/tests/prselect.c
+++ b/pr/tests/prselect.c
@@ -15,7 +15,7 @@
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
/***********************************************************************
@@ -45,12 +45,12 @@
** OUTPUTS: None
** RETURN: None
** SIDE EFFECTS:
-**
+**
** RESTRICTIONS:
** None
** MEMORY: NA
** ALGORITHM: Determine what the status is and print accordingly.
-**
+**
***********************************************************************/
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
diff --git a/pr/tests/randseed.c b/pr/tests/randseed.c
index 45871777..1b655eab 100644
--- a/pr/tests/randseed.c
+++ b/pr/tests/randseed.c
@@ -5,17 +5,17 @@
/*
** File: rngseed.c
-** Description:
+** Description:
** Test NSPR's Random Number Seed generator
**
** Initial test: Just make sure it outputs some data.
-**
+**
** ... more? ... check some iterations to ensure it is random (no dupes)
** ... more? ... histogram distribution of random numbers
*/
#include "plgetopt.h"
-#include "nspr.h"
+#include "nspr.h"
#include "prrng.h"
#include <stdio.h>
#include <stdlib.h>
@@ -55,22 +55,22 @@ static void PrintRand( void *buf, PRIntn size )
switch( size ) {
case 1 :
printf("%2.2X\n", *(rp++) );
- size -= 4;
+ size -= 4;
break;
case 2 :
printf("%4.4X\n", *(rp++) );
- size -= 4;
+ size -= 4;
break;
case 3 :
printf("%6.6X\n", *(rp++) );
- size -= 4;
+ size -= 4;
break;
default:
while ( size >= 4) {
PRIntn i = 3;
do {
printf("%8.8X ", *(rp++) );
- size -= 4;
+ size -= 4;
} while( i-- );
i = 3;
printf("\n");
diff --git a/pr/tests/ranfile.c b/pr/tests/ranfile.c
index 08a4a98b..a62fc1a5 100644
--- a/pr/tests/ranfile.c
+++ b/pr/tests/ranfile.c
@@ -284,7 +284,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
@@ -355,9 +355,9 @@ int main(int argc, char **argv)
duration = PR_IntervalToMilliseconds(
PR_IntervalNow() - hammer[poll].timein);
writes = hammer[poll].writes * 1000 / duration;
- if (writes < writesMin)
+ if (writes < writesMin)
writesMin = writes;
- if (writes > writesMax)
+ if (writes > writesMax)
writesMax = writes;
writesTot += hammer[poll].writes;
durationTot += duration;
@@ -377,7 +377,7 @@ int main(int argc, char **argv)
PR_DestroyCondVar(cv);
PR_DestroyLock(ml);
- if (failed_already)
+ if (failed_already)
{
printf("FAIL\n");
return 1;
diff --git a/pr/tests/rmdir.c b/pr/tests/rmdir.c
index e0c1eac8..3e6feda9 100644
--- a/pr/tests/rmdir.c
+++ b/pr/tests/rmdir.c
@@ -5,9 +5,9 @@
/*
** File: rmdir.c
-** Description: Demonstrate bugzilla 80884.
+** Description: Demonstrate bugzilla 80884.
**
-** after fix to unix_errors.c, message should report correct
+** after fix to unix_errors.c, message should report correct
** failure of PR_Rmdir().
**
**
@@ -70,7 +70,7 @@ int main(int argc, char **argv)
failed_already = PR_TRUE;
goto Finished;
}
-
+
PR_Close(fd);
if (PR_RmDir( DIRNAME ) == PR_SUCCESS) {
@@ -78,7 +78,7 @@ int main(int argc, char **argv)
failed_already = PR_TRUE;
goto Finished;
}
-
+
err = PR_GetError();
fprintf(stderr, "remove directory fails with: %d: %s\n", err,
PR_ErrorToString(err, PR_LANGUAGE_I_DEFAULT));
diff --git a/pr/tests/rwlocktest.c b/pr/tests/rwlocktest.c
index d9368a4c..7b312ad9 100644
--- a/pr/tests/rwlocktest.c
+++ b/pr/tests/rwlocktest.c
@@ -15,9 +15,9 @@
* Each one of the threads acquires a read lock to verify that the sum of
* the arrays A and B is equal to array C, and acquires a write lock to
* consistently update arrays A and B so that their is equal to array C.
- *
+ *
*/
-
+
#include "nspr.h"
#include "plgetopt.h"
#include "prrwlock.h"
@@ -145,13 +145,13 @@ int main(int argc, char **argv)
PR_DELETE(threads);
PR_DELETE(params);
- PR_DELETE(array_A);
- PR_DELETE(array_B);
- PR_DELETE(array_C);
+ PR_DELETE(array_A);
+ PR_DELETE(array_B);
+ PR_DELETE(array_C);
PR_DestroyRWLock(rwlock1);
-
+
printf("PASS\n");
return 0;
}
diff --git a/pr/tests/sel_spd.c b/pr/tests/sel_spd.c
index 10d49786..c0210ad2 100644
--- a/pr/tests/sel_spd.c
+++ b/pr/tests/sel_spd.c
@@ -99,7 +99,7 @@ _server_thread(void *arg_id)
read_done,
write_done,
close_done;
-
+
#ifdef DEBUG
fprintf(stdout, "server thread %d alive\n", *id);
@@ -141,12 +141,12 @@ _server_thread(void *arg_id)
}
/* Tell the client to start */
- if ( (thread = PR_CreateThread(PR_USER_THREAD,
- _client_thread,
- id,
- PR_PRIORITY_NORMAL,
- scope2,
- PR_UNJOINABLE_THREAD,
+ if ( (thread = PR_CreateThread(PR_USER_THREAD,
+ _client_thread,
+ id,
+ PR_PRIORITY_NORMAL,
+ scope2,
+ PR_UNJOINABLE_THREAD,
0)) == NULL)
fprintf(stderr, "Error creating client thread %d\n", *id);
@@ -170,7 +170,7 @@ _server_thread(void *arg_id)
connect_done = PR_IntervalNow();
-
+
if ( _readn(newsock, data_buffer, _client_data) < _client_data) {
fprintf(stderr, "Error reading client data for iteration %d in server thread %d\n", index, *id );
goto done;
@@ -251,7 +251,7 @@ _client_thread(void *arg_id)
memset(&sa, 0 , sizeof(sa));
rv = PR_InitializeNetAddr(PR_IpAddrLoopback, PORT_BASE + *id, &sa);
PR_ASSERT(PR_SUCCESS == rv);
-
+
for (index = 0; index< _iterations; index++) {
#ifdef DEBUG
@@ -331,16 +331,16 @@ void do_work(void)
*id = index;
- if ( (thread = PR_CreateThread(PR_USER_THREAD,
- _server_thread,
- id,
- PR_PRIORITY_NORMAL,
- scope1,
- PR_UNJOINABLE_THREAD,
+ if ( (thread = PR_CreateThread(PR_USER_THREAD,
+ _server_thread,
+ id,
+ PR_PRIORITY_NORMAL,
+ scope1,
+ PR_UNJOINABLE_THREAD,
0)) == NULL)
fprintf(stderr, "Error creating server thread %d\n", index);
}
-
+
PR_EnterMonitor(exit_cv);
while (_thread_exit_count > 0)
PR_Wait(exit_cv, PR_INTERVAL_NO_TIMEOUT);
@@ -422,7 +422,7 @@ int main(int argc, char **argv)
case 'v':
verbose = 1;
break;
- default:
+ default:
break;
}
}
@@ -431,14 +431,14 @@ int main(int argc, char **argv)
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
- fprintf(stdout, "Running test for %d iterations with %d simultaneous threads.\n",
+ fprintf(stdout, "Running test for %d iterations with %d simultaneous threads.\n",
_iterations, _threads);
- fprintf(stdout, "\tWill send %d bytes of client data and %d bytes of server data\n",
+ fprintf(stdout, "\tWill send %d bytes of client data and %d bytes of server data\n",
_client_data, _server_data);
- if ( (exit_cv = PR_NewMonitor()) == NULL)
+ if ( (exit_cv = PR_NewMonitor()) == NULL)
fprintf(stderr, "Error creating monitor for exit cv\n");
- if ( (timer_data = (timer_slot_t *)PR_Malloc(2*_threads * sizeof(timer_slot_t))) == NULL)
+ if ( (timer_data = (timer_slot_t *)PR_Malloc(2*_threads * sizeof(timer_slot_t))) == NULL)
fprintf(stderr, "error allocating thread time results array\n");
memset(timer_data, 0 , 2*_threads*sizeof(timer_slot_t));
diff --git a/pr/tests/selct_er.c b/pr/tests/selct_er.c
index 8df259fd..70007f1e 100755
--- a/pr/tests/selct_er.c
+++ b/pr/tests/selct_er.c
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
PR_Cleanup();
goto exit_now;
exit_now:
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/selct_nm.c b/pr/tests/selct_nm.c
index 1b54c2af..663f3b8c 100644
--- a/pr/tests/selct_nm.c
+++ b/pr/tests/selct_nm.c
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
@@ -277,7 +277,7 @@ failed_already=1;
PR_Cleanup();
goto exit_now;
exit_now:
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/selct_to.c b/pr/tests/selct_to.c
index be0fb9e0..950579ed 100644
--- a/pr/tests/selct_to.c
+++ b/pr/tests/selct_to.c
@@ -75,7 +75,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
@@ -165,7 +165,7 @@ int main(int argc, char **argv)
PR_Cleanup();
exit_now:
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/select2.c b/pr/tests/select2.c
index d82bb1ef..d20f94ef 100644
--- a/pr/tests/select2.c
+++ b/pr/tests/select2.c
@@ -14,7 +14,7 @@
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
/***********************************************************************
@@ -45,12 +45,12 @@ PRInt32 count;
** OUTPUTS: None
** RETURN: None
** SIDE EFFECTS:
-**
+**
** RESTRICTIONS:
** None
** MEMORY: NA
** ALGORITHM: Determine what the status is and print accordingly.
-**
+**
***********************************************************************/
@@ -129,9 +129,9 @@ static void PRSelectTest(void)
loops++;
- if (debug_mode) printf("Going into accept\n");
+ if (debug_mode) printf("Going into accept\n");
- newSock = PR_Accept(listenSocket,
+ newSock = PR_Accept(listenSocket,
&rAddr,
PR_INTERVAL_NO_TIMEOUT);
@@ -210,7 +210,7 @@ static void NativeSelectTest(void)
loops++;
- if (debug_mode) printf("Going into accept\n");
+ if (debug_mode) printf("Going into accept\n");
newSock = PR_Accept(listenSocket, &rAddr, PR_INTERVAL_NO_TIMEOUT);
@@ -274,7 +274,7 @@ static void Measure(void (*func)(void), const char *msg)
int main(int argc, char **argv)
{
-
+
/* The command line argument: -d is used to determine if the test is being run
in debug mode. The regress tool requires only one line output:PASS or FAIL.
All of the printfs associated with this test has been handled with a if (debug_mode)
@@ -298,7 +298,7 @@ int main(int argc, char **argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
diff --git a/pr/tests/sem.c b/pr/tests/sem.c
index ec7bb6e2..7610b740 100644
--- a/pr/tests/sem.c
+++ b/pr/tests/sem.c
@@ -35,8 +35,8 @@
PRIntn failed_already=0;
PRIntn debug_mode;
-/*
- Since we don't have stdin, stdout everywhere, we will fake
+/*
+ Since we don't have stdin, stdout everywhere, we will fake
it with our in-memory buffers called stdin and stdout.
*/
@@ -55,7 +55,7 @@ static PRStatus finalResult = PR_SUCCESS;
static size_t dread (PRUintn device, char *buf, size_t bufSize)
{
PRUintn i;
-
+
/* during first read call, initialize the stdinBuf buffer*/
if (stdinBufIdx == 0) {
for (i=0; i<SBSIZE; i++)
@@ -75,7 +75,7 @@ static size_t dread (PRUintn device, char *buf, size_t bufSize)
static size_t dwrite (PRUintn device, char *buf, size_t bufSize)
{
PRUintn i, j;
-
+
/* copy data from the given buffer upto bufSize to stdoutBuf */
for (i=0; i<bufSize; i++) {
if (stdoutBufIdx == SBSIZE)
@@ -97,8 +97,8 @@ static size_t dwrite (PRUintn device, char *buf, size_t bufSize)
/*------------------ Following is the real test program ---------*/
/*
Program to copy standard input to standard output. The program
- uses two threads. One reads the input and puts the data in a
- double buffer. The other reads the buffer contents and writes
+ uses two threads. One reads the input and puts the data in a
+ double buffer. The other reads the buffer contents and writes
it to standard output.
*/
@@ -116,7 +116,7 @@ static void PR_CALLBACK reader(void *arg)
{
PRUintn i = 0;
size_t nbytes;
-
+
do {
(void) PR_WaitSem(emptyBufs);
nbytes = dread(0, buf[i].data, BSIZE);
@@ -130,7 +130,7 @@ static void writer(void)
{
PRUintn i = 0;
size_t nbytes;
-
+
do {
(void) PR_WaitSem(fullBufs);
nbytes = buf[i].nbytes;
@@ -171,7 +171,7 @@ int main(int argc, char **argv)
}
}
PL_DestroyOptState(opt);
- }
+ }
/* main test */
@@ -180,9 +180,9 @@ int main(int argc, char **argv)
fullBufs = PR_NewSem(0); /* zero full buffers */
/* create the reader thread */
-
+
r = PR_CreateThread(PR_USER_THREAD,
- reader, 0,
+ reader, 0,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -202,7 +202,7 @@ int main(int argc, char **argv)
failed_already=1;
}
PR_Cleanup();
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/semaerr1.c b/pr/tests/semaerr1.c
index f56a97ee..0d839371 100644
--- a/pr/tests/semaerr1.c
+++ b/pr/tests/semaerr1.c
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
fprintf(stderr, "PR_DeleteSemaphore failed\n");
exit(1);
}
-
+
/*
* Opening an existing semaphore with PR_SEM_CREATE|PR_SEM_EXCL.
* should fail with PR_FILE_EXISTS_ERROR.
diff --git a/pr/tests/sendzlf.c b/pr/tests/sendzlf.c
index 0f3df3f7..8b4b5680 100644
--- a/pr/tests/sendzlf.c
+++ b/pr/tests/sendzlf.c
@@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
- * Test: sendzlf.c
+ * Test: sendzlf.c
*
* Description: send a zero-length file with PR_SendFile and
* PR_TransmitFile.
diff --git a/pr/tests/server_test.c b/pr/tests/server_test.c
index b1750ec2..3840c828 100644
--- a/pr/tests/server_test.c
+++ b/pr/tests/server_test.c
@@ -8,7 +8,7 @@
** This server simulates a server running in loopback mode.
**
** The idea is that a single server is created. The server initially creates
-** a number of worker threads. Then, with the server running, a number of
+** a number of worker threads. Then, with the server running, a number of
** clients are created which start requesting service from the server.
**
**
@@ -17,7 +17,7 @@
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
/***********************************************************************
@@ -73,12 +73,12 @@ PRCondVar *ServerStateCV;
** OUTPUTS: None
** RETURN: None
** SIDE EFFECTS:
-**
+**
** RESTRICTIONS:
** None
** MEMORY: NA
** ALGORITHM: Determine what the status is and print accordingly.
-**
+**
***********************************************************************/
@@ -126,7 +126,7 @@ WaitServerState(char *waiter, PRInt32 state)
PR_WaitCondVar(ServerStateCV, PR_INTERVAL_NO_TIMEOUT);
rv = ServerState;
- if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
+ if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
waiter, state, ServerState);
PR_Unlock(ServerStateCVLock);
@@ -170,7 +170,7 @@ WorkerThreadFunc(void *_listenSock)
if (debug_mode) DPRINTF("\tServer thread going into accept\n");
- bytesRead = PR_AcceptRead(listenSock,
+ bytesRead = PR_AcceptRead(listenSock,
&newSock,
&rAddr,
dataBuf,
@@ -183,7 +183,7 @@ WorkerThreadFunc(void *_listenSock)
}
if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead);
-
+
PR_AtomicIncrement(&workerThreadsBusy);
if (workerThreadsBusy == workerThreads) {
PR_Lock(workerThreadsLock);
@@ -208,13 +208,13 @@ WorkerThreadFunc(void *_listenSock)
}
PR_Unlock(workerThreadsLock);
}
-
+
bytesToRead -= bytesRead;
while (bytesToRead) {
- bytesRead = PR_Recv(newSock,
- dataBuf,
- bytesToRead,
- 0,
+ bytesRead = PR_Recv(newSock,
+ dataBuf,
+ bytesToRead,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesRead < 0) {
if (debug_mode) printf("\tServer error receiving data (%d)\n", bytesRead);
@@ -224,16 +224,16 @@ WorkerThreadFunc(void *_listenSock)
}
bytesWritten = PR_Send(newSock,
- sendBuf,
- bytesToWrite,
- 0,
+ sendBuf,
+ bytesToWrite,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data) {
- if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
+ if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
- }
+ }
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);
@@ -380,7 +380,7 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connecting\n");
- rv = PR_Connect(clientSocket,
+ rv = PR_Connect(clientSocket,
&serverAddr,
PR_INTERVAL_NO_TIMEOUT);
if (!clientSocket) {
@@ -390,10 +390,10 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connected\n");
- rv = PR_Send(clientSocket,
- sendBuf,
- _client_data,
- 0,
+ rv = PR_Send(clientSocket,
+ sendBuf,
+ _client_data,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv != _client_data) {
if (debug_mode) printf("Client error sending data (%d)\n", rv);
@@ -405,13 +405,13 @@ ClientThreadFunc(void *unused)
bytesNeeded = _server_data;
while(bytesNeeded) {
- rv = PR_Recv(clientSocket,
- recvBuf,
- bytesNeeded,
- 0,
+ rv = PR_Recv(clientSocket,
+ recvBuf,
+ bytesNeeded,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv <= 0) {
- if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
+ if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
rv, (_server_data - bytesNeeded), _server_data);
break;
}
@@ -420,7 +420,7 @@ ClientThreadFunc(void *unused)
}
PR_Close(clientSocket);
-
+
PR_AtomicDecrement(&numRequests);
}
@@ -445,7 +445,7 @@ RunClients(void)
for (index=0; index<_clients; index++) {
PRThread *clientThread;
-
+
clientThread = PR_CreateThread(
PR_USER_THREAD,
ClientThreadFunc,
@@ -583,7 +583,7 @@ int main(int argc, char **argv)
printf("Enter size of server data : \n");
scanf("%d", &_server_data);
}
- else
+ else
{
_iterations = 10;
@@ -591,11 +591,11 @@ int main(int argc, char **argv)
_client_data = 10;
_server_data = 10;
}
-
+
if (debug_mode) {
- printf("\n\n%d iterations with %d client threads.\n",
+ printf("\n\n%d iterations with %d client threads.\n",
_iterations, _clients);
- printf("Sending %d bytes of client data and %d bytes of server data\n",
+ printf("Sending %d bytes of client data and %d bytes of server data\n",
_client_data, _server_data);
}
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
@@ -605,11 +605,11 @@ int main(int argc, char **argv)
ServerStateCV = PR_NewCondVar(ServerStateCVLock);
Measure(do_workUU, "server loop user/user");
- #if 0
+ #if 0
Measure(do_workUK, "server loop user/kernel");
Measure(do_workKU, "server loop kernel/user");
Measure(do_workKK, "server loop kernel/kernel");
- #endif
+ #endif
PR_Cleanup();
diff --git a/pr/tests/servr_kk.c b/pr/tests/servr_kk.c
index 836c1484..8fd59b26 100644
--- a/pr/tests/servr_kk.c
+++ b/pr/tests/servr_kk.c
@@ -8,7 +8,7 @@
** This server simulates a server running in loopback mode.
**
** The idea is that a single server is created. The server initially creates
-** a number of worker threads. Then, with the server running, a number of
+** a number of worker threads. Then, with the server running, a number of
** clients are created which start requesting service from the server.
**
**
@@ -90,7 +90,7 @@ WaitServerState(char *waiter, PRInt32 state)
PR_WaitCondVar(ServerStateCV, PR_INTERVAL_NO_TIMEOUT);
rv = ServerState;
- if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
+ if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
waiter, state, ServerState);
PR_Unlock(ServerStateCVLock);
@@ -134,7 +134,7 @@ WorkerThreadFunc(void *_listenSock)
if (debug_mode) DPRINTF("\tServer thread going into accept\n");
- bytesRead = PR_AcceptRead(listenSock,
+ bytesRead = PR_AcceptRead(listenSock,
&newSock,
&rAddr,
dataBuf,
@@ -147,7 +147,7 @@ WorkerThreadFunc(void *_listenSock)
}
if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead);
-
+
PR_AtomicIncrement(&workerThreadsBusy);
if (workerThreadsBusy == workerThreads) {
PR_Lock(workerThreadsLock);
@@ -172,13 +172,13 @@ WorkerThreadFunc(void *_listenSock)
}
PR_Unlock(workerThreadsLock);
}
-
+
bytesToRead -= bytesRead;
while (bytesToRead) {
- bytesRead = PR_Recv(newSock,
- dataBuf,
- bytesToRead,
- 0,
+ bytesRead = PR_Recv(newSock,
+ dataBuf,
+ bytesToRead,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesRead < 0) {
if (debug_mode) printf("\tServer error receiving data (%d)\n", bytesRead);
@@ -188,12 +188,12 @@ WorkerThreadFunc(void *_listenSock)
}
bytesWritten = PR_Send(newSock,
- sendBuf,
- bytesToWrite,
- 0,
+ sendBuf,
+ bytesToWrite,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data) {
- if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
+ if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
@@ -344,7 +344,7 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connecting\n");
- rv = PR_Connect(clientSocket,
+ rv = PR_Connect(clientSocket,
&serverAddr,
PR_INTERVAL_NO_TIMEOUT);
if (!clientSocket) {
@@ -354,10 +354,10 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connected\n");
- rv = PR_Send(clientSocket,
- sendBuf,
- _client_data,
- 0,
+ rv = PR_Send(clientSocket,
+ sendBuf,
+ _client_data,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv != _client_data) {
if (debug_mode) printf("Client error sending data (%d)\n", rv);
@@ -369,13 +369,13 @@ ClientThreadFunc(void *unused)
bytesNeeded = _server_data;
while(bytesNeeded) {
- rv = PR_Recv(clientSocket,
- recvBuf,
- bytesNeeded,
- 0,
+ rv = PR_Recv(clientSocket,
+ recvBuf,
+ bytesNeeded,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv <= 0) {
- if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
+ if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
rv, (_server_data - bytesNeeded), _server_data);
break;
}
@@ -384,7 +384,7 @@ ClientThreadFunc(void *unused)
}
PR_Close(clientSocket);
-
+
PR_AtomicDecrement(&numRequests);
}
@@ -409,7 +409,7 @@ RunClients(void)
for (index=0; index<_clients; index++) {
PRThread *clientThread;
-
+
clientThread = PR_CreateThread(
PR_USER_THREAD,
ClientThreadFunc,
@@ -547,7 +547,7 @@ int main(int argc, char **argv)
printf("Enter size of server data : \n");
scanf("%d", &_server_data);
}
- else
+ else
{
_iterations = 7;
_clients = 7;
@@ -556,9 +556,9 @@ int main(int argc, char **argv)
}
if (debug_mode) {
- printf("\n\n%d iterations with %d client threads.\n",
+ printf("\n\n%d iterations with %d client threads.\n",
_iterations, _clients);
- printf("Sending %d bytes of client data and %d bytes of server data\n",
+ printf("Sending %d bytes of client data and %d bytes of server data\n",
_client_data, _server_data);
}
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
@@ -574,9 +574,9 @@ int main(int argc, char **argv)
PR_Cleanup();
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
-
+
}
diff --git a/pr/tests/servr_ku.c b/pr/tests/servr_ku.c
index c120ad01..13e8ee15 100644
--- a/pr/tests/servr_ku.c
+++ b/pr/tests/servr_ku.c
@@ -8,7 +8,7 @@
** This server simulates a server running in loopback mode.
**
** The idea is that a single server is created. The server initially creates
-** a number of worker threads. Then, with the server running, a number of
+** a number of worker threads. Then, with the server running, a number of
** clients are created which start requesting service from the server.
**
**
@@ -91,7 +91,7 @@ WaitServerState(char *waiter, PRInt32 state)
PR_WaitCondVar(ServerStateCV, PR_INTERVAL_NO_TIMEOUT);
rv = ServerState;
- if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
+ if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
waiter, state, ServerState);
PR_Unlock(ServerStateCVLock);
@@ -135,7 +135,7 @@ WorkerThreadFunc(void *_listenSock)
if (debug_mode) DPRINTF("\tServer thread going into accept\n");
- bytesRead = PR_AcceptRead(listenSock,
+ bytesRead = PR_AcceptRead(listenSock,
&newSock,
&rAddr,
dataBuf,
@@ -148,7 +148,7 @@ WorkerThreadFunc(void *_listenSock)
}
if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead);
-
+
PR_AtomicIncrement(&workerThreadsBusy);
if (workerThreadsBusy == workerThreads) {
PR_Lock(workerThreadsLock);
@@ -173,13 +173,13 @@ WorkerThreadFunc(void *_listenSock)
}
PR_Unlock(workerThreadsLock);
}
-
+
bytesToRead -= bytesRead;
while (bytesToRead) {
- bytesRead = PR_Recv(newSock,
- dataBuf,
- bytesToRead,
- 0,
+ bytesRead = PR_Recv(newSock,
+ dataBuf,
+ bytesToRead,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesRead < 0) {
if (debug_mode) printf("\tServer error receiving data (%d)\n", bytesRead);
@@ -189,12 +189,12 @@ WorkerThreadFunc(void *_listenSock)
}
bytesWritten = PR_Send(newSock,
- sendBuf,
- bytesToWrite,
- 0,
+ sendBuf,
+ bytesToWrite,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data) {
- if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
+ if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
@@ -345,7 +345,7 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connecting\n");
- rv = PR_Connect(clientSocket,
+ rv = PR_Connect(clientSocket,
&serverAddr,
PR_INTERVAL_NO_TIMEOUT);
if (!clientSocket) {
@@ -355,10 +355,10 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connected\n");
- rv = PR_Send(clientSocket,
- sendBuf,
- _client_data,
- 0,
+ rv = PR_Send(clientSocket,
+ sendBuf,
+ _client_data,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv != _client_data) {
if (debug_mode) printf("Client error sending data (%d)\n", rv);
@@ -370,13 +370,13 @@ ClientThreadFunc(void *unused)
bytesNeeded = _server_data;
while(bytesNeeded) {
- rv = PR_Recv(clientSocket,
- recvBuf,
- bytesNeeded,
- 0,
+ rv = PR_Recv(clientSocket,
+ recvBuf,
+ bytesNeeded,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv <= 0) {
- if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
+ if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
rv, (_server_data - bytesNeeded), _server_data);
break;
}
@@ -385,7 +385,7 @@ ClientThreadFunc(void *unused)
}
PR_Close(clientSocket);
-
+
PR_AtomicDecrement(&numRequests);
}
@@ -410,7 +410,7 @@ RunClients(void)
for (index=0; index<_clients; index++) {
PRThread *clientThread;
-
+
clientThread = PR_CreateThread(
PR_USER_THREAD,
ClientThreadFunc,
@@ -529,7 +529,7 @@ int main(int argc, char **argv)
printf("Enter size of server data : \n");
scanf("%d", &_server_data);
}
- else
+ else
{
_iterations = 7;
_clients = 7;
@@ -538,9 +538,9 @@ int main(int argc, char **argv)
}
if (debug_mode) {
- printf("\n\n%d iterations with %d client threads.\n",
+ printf("\n\n%d iterations with %d client threads.\n",
_iterations, _clients);
- printf("Sending %d bytes of client data and %d bytes of server data\n",
+ printf("Sending %d bytes of client data and %d bytes of server data\n",
_client_data, _server_data);
}
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
@@ -554,7 +554,7 @@ int main(int argc, char **argv)
Measure(do_workKU, "server loop kernel/user");
PR_Cleanup();
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/servr_uk.c b/pr/tests/servr_uk.c
index 896309e7..79074e83 100644
--- a/pr/tests/servr_uk.c
+++ b/pr/tests/servr_uk.c
@@ -8,7 +8,7 @@
** This server simulates a server running in loopback mode.
**
** The idea is that a single server is created. The server initially creates
-** a number of worker threads. Then, with the server running, a number of
+** a number of worker threads. Then, with the server running, a number of
** clients are created which start requesting service from the server.
**
**
@@ -93,7 +93,7 @@ WaitServerState(char *waiter, PRInt32 state)
PR_WaitCondVar(ServerStateCV, PR_INTERVAL_NO_TIMEOUT);
rv = ServerState;
- if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
+ if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
waiter, state, ServerState);
PR_Unlock(ServerStateCVLock);
@@ -137,7 +137,7 @@ WorkerThreadFunc(void *_listenSock)
if (debug_mode) DPRINTF("\tServer thread going into accept\n");
- bytesRead = PR_AcceptRead(listenSock,
+ bytesRead = PR_AcceptRead(listenSock,
&newSock,
&rAddr,
dataBuf,
@@ -150,7 +150,7 @@ WorkerThreadFunc(void *_listenSock)
}
if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead);
-
+
PR_AtomicIncrement(&workerThreadsBusy);
if (workerThreadsBusy == workerThreads) {
PR_Lock(workerThreadsLock);
@@ -175,13 +175,13 @@ WorkerThreadFunc(void *_listenSock)
}
PR_Unlock(workerThreadsLock);
}
-
+
bytesToRead -= bytesRead;
while (bytesToRead) {
- bytesRead = PR_Recv(newSock,
- dataBuf,
- bytesToRead,
- 0,
+ bytesRead = PR_Recv(newSock,
+ dataBuf,
+ bytesToRead,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesRead < 0) {
if (debug_mode) printf("\tServer error receiving data (%d)\n", bytesRead);
@@ -191,12 +191,12 @@ WorkerThreadFunc(void *_listenSock)
}
bytesWritten = PR_Send(newSock,
- sendBuf,
- bytesToWrite,
- 0,
+ sendBuf,
+ bytesToWrite,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data) {
- if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
+ if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
@@ -217,7 +217,7 @@ ServerSetup(void)
if ( (listenSocket = PR_NewTCPSocket()) == NULL) {
if (debug_mode) printf("\tServer error creating listen socket\n");
- else
+ else
return NULL;
}
@@ -347,7 +347,7 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connecting\n");
- rv = PR_Connect(clientSocket,
+ rv = PR_Connect(clientSocket,
&serverAddr,
PR_INTERVAL_NO_TIMEOUT);
if (!clientSocket) {
@@ -357,10 +357,10 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connected\n");
- rv = PR_Send(clientSocket,
- sendBuf,
- _client_data,
- 0,
+ rv = PR_Send(clientSocket,
+ sendBuf,
+ _client_data,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv != _client_data) {
if (debug_mode) printf("Client error sending data (%d)\n", rv);
@@ -372,13 +372,13 @@ ClientThreadFunc(void *unused)
bytesNeeded = _server_data;
while(bytesNeeded) {
- rv = PR_Recv(clientSocket,
- recvBuf,
- bytesNeeded,
- 0,
+ rv = PR_Recv(clientSocket,
+ recvBuf,
+ bytesNeeded,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv <= 0) {
- if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
+ if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
rv, (_server_data - bytesNeeded), _server_data);
break;
}
@@ -387,7 +387,7 @@ ClientThreadFunc(void *unused)
}
PR_Close(clientSocket);
-
+
PR_AtomicDecrement(&numRequests);
}
@@ -412,7 +412,7 @@ RunClients(void)
for (index=0; index<_clients; index++) {
PRThread *clientThread;
-
+
clientThread = PR_CreateThread(
PR_USER_THREAD,
ClientThreadFunc,
@@ -531,7 +531,7 @@ int main(int argc, char **argv)
printf("Enter size of server data : \n");
scanf("%d", &_server_data);
}
- else
+ else
{
_iterations = 7;
_clients = 7;
@@ -540,9 +540,9 @@ int main(int argc, char **argv)
}
if (debug_mode) {
- printf("\n\n%d iterations with %d client threads.\n",
+ printf("\n\n%d iterations with %d client threads.\n",
_iterations, _clients);
- printf("Sending %d bytes of client data and %d bytes of server data\n",
+ printf("Sending %d bytes of client data and %d bytes of server data\n",
_client_data, _server_data);
}
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
@@ -557,7 +557,7 @@ int main(int argc, char **argv)
PR_Cleanup();
- if(failed_already)
+ if(failed_already)
return 1;
else
return 0;
diff --git a/pr/tests/servr_uu.c b/pr/tests/servr_uu.c
index a9638feb..0b7d5e4d 100644
--- a/pr/tests/servr_uu.c
+++ b/pr/tests/servr_uu.c
@@ -8,7 +8,7 @@
** This server simulates a server running in loopback mode.
**
** The idea is that a single server is created. The server initially creates
-** a number of worker threads. Then, with the server running, a number of
+** a number of worker threads. Then, with the server running, a number of
** clients are created which start requesting service from the server.
**
**
@@ -91,7 +91,7 @@ WaitServerState(char *waiter, PRInt32 state)
PR_WaitCondVar(ServerStateCV, PR_INTERVAL_NO_TIMEOUT);
rv = ServerState;
- if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
+ if (debug_mode) DPRINTF("\t%s resuming from wait for state %d; state now %d\n",
waiter, state, ServerState);
PR_Unlock(ServerStateCVLock);
@@ -135,7 +135,7 @@ WorkerThreadFunc(void *_listenSock)
if (debug_mode) DPRINTF("\tServer thread going into accept\n");
- bytesRead = PR_AcceptRead(listenSock,
+ bytesRead = PR_AcceptRead(listenSock,
&newSock,
&rAddr,
dataBuf,
@@ -148,7 +148,7 @@ WorkerThreadFunc(void *_listenSock)
}
if (debug_mode) DPRINTF("\tServer accepted connection (%d bytes)\n", bytesRead);
-
+
PR_AtomicIncrement(&workerThreadsBusy);
if (workerThreadsBusy == workerThreads) {
@@ -174,13 +174,13 @@ WorkerThreadFunc(void *_listenSock)
}
PR_Unlock(workerThreadsLock);
}
-
+
bytesToRead -= bytesRead;
while (bytesToRead) {
- bytesRead = PR_Recv(newSock,
- dataBuf,
- bytesToRead,
- 0,
+ bytesRead = PR_Recv(newSock,
+ dataBuf,
+ bytesToRead,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesRead < 0) {
if (debug_mode) printf("\tServer error receiving data (%d)\n", bytesRead);
@@ -190,16 +190,16 @@ WorkerThreadFunc(void *_listenSock)
}
bytesWritten = PR_Send(newSock,
- sendBuf,
- bytesToWrite,
- 0,
+ sendBuf,
+ bytesToWrite,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (bytesWritten != _server_data) {
- if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
+ if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
} else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
- }
+ }
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);
@@ -346,7 +346,7 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connecting\n");
- rv = PR_Connect(clientSocket,
+ rv = PR_Connect(clientSocket,
&serverAddr,
PR_INTERVAL_NO_TIMEOUT);
if (!clientSocket) {
@@ -356,10 +356,10 @@ ClientThreadFunc(void *unused)
if (debug_mode) DPRINTF("\tClient connected\n");
- rv = PR_Send(clientSocket,
- sendBuf,
- _client_data,
- 0,
+ rv = PR_Send(clientSocket,
+ sendBuf,
+ _client_data,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv != _client_data) {
if (debug_mode) printf("Client error sending data (%d)\n", rv);
@@ -371,13 +371,13 @@ ClientThreadFunc(void *unused)
bytesNeeded = _server_data;
while(bytesNeeded) {
- rv = PR_Recv(clientSocket,
- recvBuf,
- bytesNeeded,
- 0,
+ rv = PR_Recv(clientSocket,
+ recvBuf,
+ bytesNeeded,
+ 0,
PR_INTERVAL_NO_TIMEOUT);
if (rv <= 0) {
- if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
+ if (debug_mode) printf("Client error receiving data (%d) (%d/%d)\n",
rv, (_server_data - bytesNeeded), _server_data);
break;
}
@@ -386,7 +386,7 @@ ClientThreadFunc(void *unused)
}
PR_Close(clientSocket);
-
+
PR_AtomicDecrement(&numRequests);
}
@@ -411,7 +411,7 @@ RunClients(void)
for (index=0; index<_clients; index++) {
PRThread *clientThread;
-
+
clientThread = PR_CreateThread(
PR_USER_THREAD,
ClientThreadFunc,
@@ -529,7 +529,7 @@ int main(int argc, char **argv)
printf("Enter size of server data : \n");
scanf("%d", &_server_data);
}
- else
+ else
{
_iterations = 7;
_clients = 7;
@@ -538,9 +538,9 @@ int main(int argc, char **argv)
}
if (debug_mode) {
- printf("\n\n%d iterations with %d client threads.\n",
+ printf("\n\n%d iterations with %d client threads.\n",
_iterations, _clients);
- printf("Sending %d bytes of client data and %d bytes of server data\n",
+ printf("Sending %d bytes of client data and %d bytes of server data\n",
_client_data, _server_data);
}
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
@@ -554,10 +554,10 @@ int main(int argc, char **argv)
Measure(do_workUU, "server loop user/user");
PR_Cleanup();
-
- if(failed_already)
+
+ if(failed_already)
return 1;
else
return 0;
-
+
}
diff --git a/pr/tests/short_thread.c b/pr/tests/short_thread.c
index 87294014..e39c3809 100644
--- a/pr/tests/short_thread.c
+++ b/pr/tests/short_thread.c
@@ -38,9 +38,9 @@ int main (int argc, char **argv)
}
PL_DestroyOptState(opt);
- if (( housekeeping_tid =
+ if (( housekeeping_tid =
PR_CreateThread (PR_USER_THREAD, housecleaning, (void*)&thread_start_time,
- PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD, 0))
+ PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD, 0))
== NULL ) {
fprintf(stderr,
"simple_test: Error - PR_CreateThread failed: (%ld, %ld)\n",
@@ -52,7 +52,7 @@ int main (int argc, char **argv)
}
static void
-housecleaning (void *cur_time)
+housecleaning (void *cur_time)
{
DPRINTF(("Child Thread exiting\n"));
}
diff --git a/pr/tests/socket.c b/pr/tests/socket.c
index 00c7341c..9a9470c8 100644
--- a/pr/tests/socket.c
+++ b/pr/tests/socket.c
@@ -199,7 +199,7 @@ retry:
}
#endif
return -1;
- }
+ }
}
return len;
}
@@ -331,14 +331,14 @@ PRInt32 native_thread = 0;
#else
HANDLE thandle;
unsigned tid;
-
+
thandle = (HANDLE) _beginthreadex(
NULL,
stackSize,
(unsigned (__stdcall *)(void *))start,
arg,
STACK_SIZE_PARAM_IS_A_RESERVATION,
- &tid);
+ &tid);
return((PRThread *) thandle);
#endif
} else {
@@ -372,7 +372,7 @@ TCP_Server(void *arg)
goto exit;
}
memset(&netaddr, 0 , sizeof(netaddr));
-
+
if (PR_SetNetAddr(PR_IpAddrAny, server_domain, TCP_SERVER_PORT,
&netaddr) == PR_FAILURE) {
fprintf(stderr,"prsocket_test: PR_SetNetAddr failed\n");
@@ -383,7 +383,7 @@ TCP_Server(void *arg)
* use
*/
i = 0;
-
+
while (PR_Bind(sockfd, &netaddr) < 0) {
if (PR_GetError() == PR_ADDRESS_IN_USE_ERROR) {
netaddr.inet.port += 2;
@@ -450,7 +450,7 @@ TCP_Server(void *arg)
scp->datalen = sp->datalen;
t = create_new_thread(PR_USER_THREAD,
- Serve_Client, (void *)scp,
+ Serve_Client, (void *)scp,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -552,7 +552,7 @@ UDP_Server(void *arg)
if ((client_domain == PR_AF_INET6) && (server_domain == PR_AF_INET))
PR_ConvertIPv4AddrToIPv6(PR_htonl(INADDR_LOOPBACK),
&udp_server_addr.ipv6.ip);
-
+
/*
* Wake up parent thread because server address is bound and made
* available in the global variable 'udp_server_addr'
@@ -709,7 +709,7 @@ TCP_Client(void *arg)
/*
* UDP_Client
* Client Thread
- * Create a socket and bind an address
+ * Create a socket and bind an address
* Communicate with the server at the address specified in the argument.
* Fill in a buffer, write data to server, read it back and check
* for data corruption.
@@ -840,7 +840,7 @@ UDP_Client(void *arg)
/*
* TCP_Socket_Client_Server_Test - concurrent server test
- *
+ *
* One server and several clients are started
* Each client connects to the server and sends a chunk of data
* For each connection, server starts another thread to read the data
@@ -892,7 +892,7 @@ TCP_Socket_Client_Server_Test(void)
sparamp->exit_counter = &thread_count;
sparamp->datalen = datalen;
t = PR_CreateThread(PR_USER_THREAD,
- TCP_Server, (void *)sparamp,
+ TCP_Server, (void *)sparamp,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -956,7 +956,7 @@ TCP_Socket_Client_Server_Test(void)
/*
* UDP_Socket_Client_Server_Test - iterative server test
- *
+ *
* One server and several clients are started
* Each client connects to the server and sends a chunk of data
* For each connection, server starts another thread to read the data
@@ -1010,7 +1010,7 @@ UDP_Socket_Client_Server_Test(void)
sparamp->datalen = datalen;
DPRINTF(("Creating UDP server"));
t = PR_CreateThread(PR_USER_THREAD,
- UDP_Server, (void *)sparamp,
+ UDP_Server, (void *)sparamp,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -1794,7 +1794,7 @@ TransmitFile_Server(void *arg)
scp->datalen = sp->datalen;
t[i] = PR_CreateThread(PR_USER_THREAD,
- Serve_TransmitFile_Client, (void *)scp,
+ Serve_TransmitFile_Client, (void *)scp,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_JOINABLE_THREAD,
@@ -1837,8 +1837,8 @@ exit:
}
/*
- * Socket_Misc_Test - test miscellaneous functions
- *
+ * Socket_Misc_Test - test miscellaneous functions
+ *
*/
static PRInt32
Socket_Misc_Test(void)
@@ -2052,7 +2052,7 @@ Socket_Misc_Test(void)
sparamp->exit_counter = &thread_count;
sparamp->datalen = datalen;
t = PR_CreateThread(PR_USER_THREAD,
- TransmitFile_Server, (void *)sparamp,
+ TransmitFile_Server, (void *)sparamp,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -2223,12 +2223,12 @@ int main(int argc, char **argv)
} else
printf("TCP_Socket_Client_Server_Test Passed\n");
test_cancelio = 0;
-
+
/*
* Misc socket tests - including transmitfile, etc.
*/
- /* File transmission test can not be done in Symbian OS because of
+ /* File transmission test can not be done in Symbian OS because of
* large file's size and the incomplete mmap() implementation. */
#if !defined(WIN16)
/*
diff --git a/pr/tests/sockopt.c b/pr/tests/sockopt.c
index c83ecea0..1f85d2a2 100644
--- a/pr/tests/sockopt.c
+++ b/pr/tests/sockopt.c
@@ -86,49 +86,49 @@ int main(int argc, char **argv)
{
case PR_SockOpt_Nonblocking:
data.value.non_blocking = PR_TRUE;
- break;
+ break;
case PR_SockOpt_Linger:
data.value.linger.polarity = PR_TRUE;
- data.value.linger.linger = PR_SecondsToInterval(2);
- break;
+ data.value.linger.linger = PR_SecondsToInterval(2);
+ break;
case PR_SockOpt_Reuseaddr:
- data.value.reuse_addr = PR_TRUE;
- break;
- case PR_SockOpt_Keepalive:
- data.value.keep_alive = PR_TRUE;
- break;
+ data.value.reuse_addr = PR_TRUE;
+ break;
+ case PR_SockOpt_Keepalive:
+ data.value.keep_alive = PR_TRUE;
+ break;
case PR_SockOpt_RecvBufferSize:
- data.value.recv_buffer_size = segment;
- break;
- case PR_SockOpt_SendBufferSize:
- data.value.send_buffer_size = segment;
- break;
+ data.value.recv_buffer_size = segment;
+ break;
+ case PR_SockOpt_SendBufferSize:
+ data.value.send_buffer_size = segment;
+ break;
case PR_SockOpt_IpTimeToLive:
- data.value.ip_ttl = 64;
- break;
+ data.value.ip_ttl = 64;
+ break;
case PR_SockOpt_IpTypeOfService:
- data.value.tos = 0;
- break;
+ data.value.tos = 0;
+ break;
case PR_SockOpt_McastTimeToLive:
- fd = udp;
- data.value.mcast_ttl = 4;
- break;
+ fd = udp;
+ data.value.mcast_ttl = 4;
+ break;
case PR_SockOpt_McastLoopback:
- fd = udp;
- data.value.mcast_loopback = PR_TRUE;
- break;
+ fd = udp;
+ data.value.mcast_loopback = PR_TRUE;
+ break;
case PR_SockOpt_NoDelay:
- data.value.no_delay = PR_TRUE;
- break;
+ data.value.no_delay = PR_TRUE;
+ break;
#ifndef WIN32
case PR_SockOpt_MaxSegment:
- data.value.max_segment = segment;
- break;
+ data.value.max_segment = segment;
+ break;
#endif
case PR_SockOpt_Broadcast:
- fd = udp;
- data.value.broadcast = PR_TRUE;
- break;
+ fd = udp;
+ data.value.broadcast = PR_TRUE;
+ break;
#ifdef SO_REUSEPORT
case PR_SockOpt_Reuseport:
data.value.reuse_port = PR_TRUE;
diff --git a/pr/tests/stack.c b/pr/tests/stack.c
index c09bf4a2..8da1894e 100644
--- a/pr/tests/stack.c
+++ b/pr/tests/stack.c
@@ -7,7 +7,7 @@
/*
*
* Test atomic stack operations
- *
+ *
* Two stacks are created and threads add data items (each containing
* one of the first n integers) to the first stack, remove data items
* from the first stack and add them to the second stack. The primordial
@@ -15,7 +15,7 @@
* integers in the data items in the second stack. The test succeeds if
* they are equal.
*/
-
+
#include "nspr.h"
#include "plgetopt.h"
@@ -122,7 +122,7 @@ int main(int argc, char **argv)
thread_args[cnt].list1 = list1;
thread_args[cnt].list2 = list2;
thread_args[cnt].loops = loops;
- thread_args[cnt].data_cnt = data_cnt;
+ thread_args[cnt].data_cnt = data_cnt;
thread_args[cnt].initial_data_value = 1 + cnt * data_cnt;
if (cnt & 1)
diff --git a/pr/tests/stat.c b/pr/tests/stat.c
index c570056f..c3c869f2 100644
--- a/pr/tests/stat.c
+++ b/pr/tests/stat.c
@@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
- * Program to test different ways to get file info; right now it
+ * Program to test different ways to get file info; right now it
* only works for solaris and OS/2.
*
*/
@@ -35,7 +35,7 @@ static void statPRStat(void)
{
PRFileInfo finfo;
PRInt32 index = count;
-
+
for (;index--;) {
PR_GetFileInfo(filename, &finfo);
}
@@ -45,7 +45,7 @@ static void statStat(void)
{
struct stat finfo;
PRInt32 index = count;
-
+
for (;index--;) {
stat(filename, &finfo);
}
diff --git a/pr/tests/strod.c b/pr/tests/strod.c
index 3d1503e0..7a148923 100644
--- a/pr/tests/strod.c
+++ b/pr/tests/strod.c
@@ -67,7 +67,7 @@ static PRIntn PR_CALLBACK RealMain(PRIntn argc, char **argv)
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/suspend.c b/pr/tests/suspend.c
index 7a4f83fd..8afb5a33 100644
--- a/pr/tests/suspend.c
+++ b/pr/tests/suspend.c
@@ -63,7 +63,7 @@ static PRStatus PR_CALLBACK print_thread(PRThread *thread, int i, void *arg)
PRWord *registers;
printf(
- "\nprint_thread[0x%lx]: %-20s - i = %ld\n",thread,
+ "\nprint_thread[0x%lx]: %-20s - i = %ld\n",thread,
(PR_GLOBAL_THREAD == PR_GetThreadScope(thread)) ?
"PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD", i);
registers = PR_GetGCRegisters(thread, 0, (int *)&words);
@@ -88,8 +88,8 @@ static void Level_0_Thread(PRThreadScope scope1, PRThreadScope scope2)
alive = count;
for (n=0; n<count; n++) {
thr = PR_CreateThreadGCAble(PR_USER_THREAD,
- Level_1_Thread,
- (void *)scope2,
+ Level_1_Thread,
+ (void *)scope2,
PR_PRIORITY_NORMAL,
scope1,
PR_UNJOINABLE_THREAD,
diff --git a/pr/tests/switch.c b/pr/tests/switch.c
index 43c5ce56..b79e30c4 100644
--- a/pr/tests/switch.c
+++ b/pr/tests/switch.c
@@ -201,7 +201,7 @@ PRIntn PR_CALLBACK Switch(PRIntn argc, char **argv)
if (debug_mode)
PL_FPrintError(debug_out, "Failed to interrupt");
}
- link = link->next;
+ link = link->next;
}
for (thread_count = 1; thread_count <= thread_limit; ++thread_count)
diff --git a/pr/tests/testfile.c b/pr/tests/testfile.c
index 8a89b92f..360ef1f7 100644
--- a/pr/tests/testfile.c
+++ b/pr/tests/testfile.c
@@ -137,14 +137,14 @@ PRInt32 native_thread = 0;
#else
HANDLE thandle;
unsigned tid;
-
+
thandle = (HANDLE) _beginthreadex(
NULL,
stackSize,
(unsigned (__stdcall *)(void *))start,
arg,
STACK_SIZE_PARAM_IS_A_RESERVATION,
- &tid);
+ &tid);
return((PRThread *) thandle);
#endif
} else {
@@ -167,7 +167,7 @@ int offset, len;
buf = fp->buf;
offset = fp->offset;
len = fp->len;
-
+
fd_file = PR_Open(name, PR_RDWR | PR_CREATE_FILE, 0777);
if (fd_file == NULL) {
printf("testfile failed to create/open file %s\n",name);
@@ -176,11 +176,11 @@ int offset, len;
if (PR_Seek(fd_file, offset, PR_SEEK_SET) < 0) {
printf("testfile failed to seek in file %s\n",name);
return;
- }
+ }
if ((PR_Write(fd_file, buf, len)) < 0) {
printf("testfile failed to write to file %s\n",name);
return;
- }
+ }
DPRINTF(("Write out_buf[0] = 0x%x\n",(*((int *) buf))));
PR_Close(fd_file);
PR_DELETE(fp);
@@ -203,7 +203,7 @@ int offset, len;
buf = fp->buf;
offset = fp->offset;
len = fp->len;
-
+
fd_file = PR_Open(name, PR_RDONLY, 0);
if (fd_file == NULL) {
printf("testfile failed to open file %s\n",name);
@@ -212,11 +212,11 @@ int offset, len;
if (PR_Seek(fd_file, offset, PR_SEEK_SET) < 0) {
printf("testfile failed to seek in file %s\n",name);
return;
- }
+ }
if ((PR_Read(fd_file, buf, len)) < 0) {
printf("testfile failed to read to file %s\n",name);
return;
- }
+ }
DPRINTF(("Read in_buf[0] = 0x%x\n",(*((int *) buf))));
PR_Close(fd_file);
PR_DELETE(fp);
@@ -353,7 +353,7 @@ char tmpname[1024];
rv = -1;
goto cleanup;
}
-
+
PR_Seek(fd_file, 0, PR_SEEK_SET);
len = PR_Available(fd_file);
if (len < 0) {
@@ -417,7 +417,7 @@ File_Rdwr_Param *fparamp;
if (fd_dir == NULL) {
printf("testfile failed to open dir %s\n",TEST_DIR);
rv = -1;
- goto cleanup;
+ goto cleanup;
}
PR_CloseDir(fd_dir);
@@ -431,14 +431,14 @@ File_Rdwr_Param *fparamp;
printf(
"testfile failed to alloc buffer struct\n");
rv = -1;
- goto cleanup;
+ goto cleanup;
}
out_buf = PR_NEW(buffer);
if (out_buf == NULL) {
printf(
"testfile failed to alloc buffer struct\n");
rv = -1;
- goto cleanup;
+ goto cleanup;
}
/*
@@ -453,7 +453,7 @@ File_Rdwr_Param *fparamp;
printf(
"testfile failed to alloc File_Rdwr_Param struct\n");
rv = -1;
- goto cleanup;
+ goto cleanup;
}
fparamp->pathname = pathname;
fparamp->buf = out_buf->data + offset;
@@ -462,7 +462,7 @@ File_Rdwr_Param *fparamp;
memset(fparamp->buf, i, len);
t = create_new_thread(PR_USER_THREAD,
- File_Write, (void *)fparamp,
+ File_Write, (void *)fparamp,
PR_PRIORITY_NORMAL,
scope,
PR_UNJOINABLE_THREAD,
@@ -489,7 +489,7 @@ File_Rdwr_Param *fparamp;
printf(
"testfile failed to alloc File_Rdwr_Param struct\n");
rv = -1;
- goto cleanup;
+ goto cleanup;
}
fparamp->pathname = pathname;
fparamp->buf = in_buf->data + offset;
@@ -497,7 +497,7 @@ File_Rdwr_Param *fparamp;
fparamp->len = len;
t = create_new_thread(PR_USER_THREAD,
- File_Read, (void *)fparamp,
+ File_Read, (void *)fparamp,
PR_PRIORITY_NORMAL,
scope,
PR_UNJOINABLE_THREAD,
@@ -517,13 +517,13 @@ File_Rdwr_Param *fparamp;
if (memcmp(in_buf->data, out_buf->data, offset) != 0) {
printf("File Test failed: file data corrupted\n");
rv = -1;
- goto cleanup;
+ goto cleanup;
}
if ((PR_Delete(pathname)) < 0) {
printf("testfile failed to unlink file %s\n",pathname);
rv = -1;
- goto cleanup;
+ goto cleanup;
}
/*
@@ -565,7 +565,7 @@ struct dirtest_arg thrarg;
thrarg.done= 0;
t = create_new_thread(PR_USER_THREAD,
- DirTest, &thrarg,
+ DirTest, &thrarg,
PR_PRIORITY_NORMAL,
PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD,
@@ -623,7 +623,7 @@ HANDLE hfile;
strcat(pathname, "/");
strcat(pathname, FILE_NAME);
path_len = strlen(pathname);
-
+
for (i = 0; i < FILES_IN_DIR; i++) {
sprintf(pathname + path_len,"%d%s",i,"");
@@ -662,7 +662,7 @@ HANDLE hfile;
#elif defined(WINCE)
DPRINTF(("Creating hidden test file %s\n",pathname));
- MultiByteToWideChar(CP_ACP, 0, pathname, -1, wPathname, 256);
+ MultiByteToWideChar(CP_ACP, 0, pathname, -1, wPathname, 256);
hfile = CreateFile(wPathname, GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL,
@@ -675,7 +675,7 @@ HANDLE hfile;
return -1;
}
CloseHandle(hfile);
-
+
#elif defined(XP_PC) && defined(WIN32)
DPRINTF(("Creating hidden test file %s\n",pathname));
hfile = CreateFile(pathname, GENERIC_READ,
@@ -690,7 +690,7 @@ HANDLE hfile;
return -1;
}
CloseHandle(hfile);
-
+
#elif defined(OS2)
DPRINTF(("Creating hidden test file %s\n",pathname));
fd_file = PR_Open(pathname, PR_RDWR | PR_CREATE_FILE, (int)FILE_HIDDEN);
@@ -720,7 +720,7 @@ HANDLE hfile;
TEST_DIR, PR_GetError(), PR_GetOSError());
return -1;
}
-
+
/*
* List all files, including hidden files
*/
@@ -743,7 +743,7 @@ HANDLE hfile;
pathname, PR_GetError(), PR_GetOSError());
return -1;
}
-
+
if (info.type != PR_FILE_FILE) {
printf(
"testfile incorrect fileinfo for file %s [%d, %d]\n",
@@ -774,7 +774,7 @@ HANDLE hfile;
TEST_DIR, PR_GetError(), PR_GetOSError());
return -1;
}
-
+
DPRINTF(("Listing non-hidden files in directory %s\n",TEST_DIR));
while ((dirEntry = PR_ReadDir(fd_dir, PR_SKIP_HIDDEN)) != NULL) {
DPRINTF(("\t%s\n",dirEntry->name));
@@ -808,7 +808,7 @@ HANDLE hfile;
TEST_DIR, PR_GetError(), PR_GetOSError());
return -1;
}
-
+
if (PR_FAILURE == PR_MkDir(TEST_DIR, 0777)) {
printf(
"testfile failed to recreate dir %s [%d, %d]\n",
@@ -847,7 +847,7 @@ HANDLE hfile;
strcat(pathname, "/");
strcat(pathname, FILE_NAME);
path_len = strlen(pathname);
-
+
for (i = 0; i < FILES_IN_DIR; i++) {
sprintf(pathname + path_len,"%d%s",i,"");
@@ -920,7 +920,7 @@ int main(int argc, char **argv)
/*
* enough space for prdir
*/
- WideCharToMultiByte(CP_ACP, 0, tdir, -1, testdir, TMPDIR_LEN, 0, 0);
+ WideCharToMultiByte(CP_ACP, 0, tdir, -1, testdir, TMPDIR_LEN, 0, 0);
}
}
#else
diff --git a/pr/tests/threads.c b/pr/tests/threads.c
index 1b9b133d..09b5963a 100644
--- a/pr/tests/threads.c
+++ b/pr/tests/threads.c
@@ -16,7 +16,7 @@ PRInt32 count, iterations, alive;
PRBool debug_mode = PR_FALSE, passed = PR_TRUE;
-void
+void
PR_CALLBACK
ReallyDumbThread(void *arg)
{
@@ -65,8 +65,8 @@ static void CreateThreads(PRThreadScope scope1, PRThreadScope scope2)
alive = count;
for (n=0; n<count; n++) {
thr = PR_CreateThread(PR_USER_THREAD,
- DumbThread,
- (void *)scope2,
+ DumbThread,
+ (void *)scope2,
PR_PRIORITY_NORMAL,
scope1,
PR_UNJOINABLE_THREAD,
@@ -79,7 +79,7 @@ static void CreateThreads(PRThreadScope scope1, PRThreadScope scope2)
passed = PR_FALSE;
alive--;
}
-
+
PR_Sleep(0);
}
@@ -137,7 +137,7 @@ int main(int argc, char **argv)
PR_STDIO_INIT();
PR_Init(PR_USER_THREAD, PR_PRIORITY_HIGH, 0);
-
+
{
PLOptStatus os;
PLOptState *opt = PL_CreateOptState(argc, argv, "dc:i:");
diff --git a/pr/tests/thrpool_client.c b/pr/tests/thrpool_client.c
index 7f3df327..1ad3527a 100644
--- a/pr/tests/thrpool_client.c
+++ b/pr/tests/thrpool_client.c
@@ -90,7 +90,7 @@ readn(PRFileDesc *sockfd, char *buf, int len)
PR_GetCurrentThread(), bytes));
if (bytes < 0) {
return -1;
- }
+ }
}
return len;
}
@@ -226,7 +226,7 @@ TCP_Client(void *arg)
/*
* TCP_Socket_Client_Server_Test - concurrent server test
- *
+ *
* Each client connects to the server and sends a chunk of data
* For each connection, server reads the data
* from the client and sends it back to the client, unmodified.
diff --git a/pr/tests/thrpool_server.c b/pr/tests/thrpool_server.c
index 0b77004b..ce2acb41 100644
--- a/pr/tests/thrpool_server.c
+++ b/pr/tests/thrpool_server.c
@@ -66,7 +66,7 @@ char *getcwd(char *buf, size_t size)
_wgetcwd(wpath, MAX_PATH);
WideCharToMultiByte(CP_ACP, 0, wpath, -1, buf, size, 0, 0);
}
-
+
#define perror(s)
#endif
@@ -384,7 +384,7 @@ TCP_Server(void *arg)
argv[index++] = NULL;
}
PR_ASSERT(MAX_ARGS >= (index - 1));
-
+
DPRINTF(("creating client process %s ...\n", path));
if (PR_FAILURE == PR_CreateProcessDetached(path, argv, NULL, NULL)) {
fprintf(stderr,
@@ -557,7 +557,7 @@ int main(int argc, char **argv)
goto done;
}
jobp = PR_QueueJob(tp, TCP_Server, tp, PR_TRUE);
- rv = PR_JoinJob(jobp);
+ rv = PR_JoinJob(jobp);
PR_ASSERT(PR_SUCCESS == rv);
DPRINTF(("%s: calling PR_JoinThreadPool\n", program_name));
diff --git a/pr/tests/thruput.c b/pr/tests/thruput.c
index fd7ecf2e..09ffde7c 100644
--- a/pr/tests/thruput.c
+++ b/pr/tests/thruput.c
@@ -363,11 +363,11 @@ int main(int argc, char **argv)
(PR_GLOBAL_THREAD == thread_scope) ? "GLOBAL" : "LOCAL");
PR_fprintf(err, "Client buffer size will be %u\n", buffer_size);
-
+
if (-1 != xport_buffer)
PR_fprintf(
err, "Transport send & receive buffer size will be %u\n", xport_buffer);
-
+
if (NULL == server_name) Server();
else Client(server_name);
diff --git a/pr/tests/time.c b/pr/tests/time.c
index ed0bff8e..be00231f 100644
--- a/pr/tests/time.c
+++ b/pr/tests/time.c
@@ -53,7 +53,7 @@ static void timeTime(void)
{
PRInt32 index = count;
time_t rv;
-
+
for (;index--;)
rv = time(NULL);
}
@@ -62,7 +62,7 @@ static void timeGethrtime(void)
{
PRInt32 index = count;
time_t rv;
-
+
for (;index--;)
rv = ftime();
}
@@ -72,7 +72,7 @@ static void timeGettimeofday(void)
PRInt32 index = count;
time_t rv;
struct timeval tp;
-
+
for (;index--;)
rv = gettimeofday(&tp, NULL);
}
@@ -85,7 +85,7 @@ static void timePRTime32(void)
PRTime rv;
LL_I2L(q, 1000000);
-
+
for (;index--;) {
rv = PR_Now();
LL_DIV(rv, rv, q);
@@ -97,7 +97,7 @@ static void timePRTime64(void)
{
PRInt32 index = count;
PRTime rv;
-
+
for (;index--;)
rv = PR_Now();
}
diff --git a/pr/tests/timemac.c b/pr/tests/timemac.c
index f714aeb4..a12a2aa1 100644
--- a/pr/tests/timemac.c
+++ b/pr/tests/timemac.c
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
PR_STDIO_INIT();
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
-
+
/*
*************************************************************
**
diff --git a/pr/tests/timetest.c b/pr/tests/timetest.c
index c9bdf9c2..8dec86ef 100644
--- a/pr/tests/timetest.c
+++ b/pr/tests/timetest.c
@@ -52,7 +52,7 @@ static void PrintExplodedTime(const PRExplodedTime *et) {
}
hourOffset = totalOffset / 3600;
minOffset = (totalOffset % 3600) / 60;
- if (debug_mode)
+ if (debug_mode)
printf("%s%02ld%02ld ", sign, hourOffset, minOffset);
}
@@ -107,7 +107,7 @@ testParseTimeString(PRTime t)
totalOffset = et.tm_params.tp_gmt_offset + et.tm_params.tp_dst_offset;
if (totalOffset == 0) {
strcat(timeString, "GMT "); /* I wanted to use "UTC" here, but
- * PR_ParseTimeString doesn't
+ * PR_ParseTimeString doesn't
* understand "UTC". */
} else {
sign = "+";
@@ -147,7 +147,7 @@ int main(int argc, char** argv)
*/
PLOptStatus os;
PLOptState *opt;
-
+
PR_STDIO_INIT();
opt = PL_CreateOptState(argc, argv, "d");
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -165,7 +165,7 @@ int main(int argc, char** argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
/* Testing zero PRTime (the epoch) */
@@ -349,7 +349,7 @@ int main(int argc, char** argv)
et.tm_sec = 23;
et.tm_usec = 0;
et.tm_params.tp_gmt_offset = -8 * 3600; /* PDT */
- et.tm_params.tp_dst_offset = 3600;
+ et.tm_params.tp_dst_offset = 3600;
PR_NormalizeTime(&et, PR_LocalTimeParameters);
if (debug_mode) printf("Nov 7 18:29:23 PDT 1996 is ");
@@ -519,7 +519,7 @@ int main(int argc, char** argv)
return 1;
}
- if (LL_NE(usecs, PR_ImplodeTime(&et1))) {
+ if (LL_NE(usecs, PR_ImplodeTime(&et1))) {
printf("ERROR: PR_ExplodeTime and PR_ImplodeTime are not inverse\n");
PrintExplodedTime(&et1);
printf("\n");
@@ -575,7 +575,7 @@ int main(int argc, char** argv)
printf("** **\n");
printf("*******************************************************\n\n");
}
-
+
LL_I2L(usecPer10Min, 600000000L);
/* 00:00:00 PST Jan. 1, 2005 */
diff --git a/pr/tests/tmoacc.c b/pr/tests/tmoacc.c
index 12c39c91..9bd3a4e0 100644
--- a/pr/tests/tmoacc.c
+++ b/pr/tests/tmoacc.c
@@ -148,7 +148,7 @@ static void Accept(void *arg)
if (NULL != shared->debug) PL_PrintError("Accept");
shared->passed = PR_FALSE;
}
- }
+ }
} while (running == shared->status);
if (NULL != buffer) PR_DELETE(buffer);
} /* Accept */
@@ -210,7 +210,7 @@ PRIntn Tmoacc(PRIntn argc, char **argv)
if (0 == threads) threads = DEFAULT_THREADS;
if (0 == backlog) backlog = DEFAULT_BACKLOG;
if (0 == timeout) timeout = DEFAULT_TIMEOUT;
-
+
PR_STDIO_INIT();
memset(&listenAddr, 0, sizeof(listenAddr));
rv = PR_InitializeNetAddr(PR_IpAddrAny, BASE_PORT, &listenAddr);
diff --git a/pr/tests/tmocon.c b/pr/tests/tmocon.c
index 24cb05f3..c1e2f675 100644
--- a/pr/tests/tmocon.c
+++ b/pr/tests/tmocon.c
@@ -14,7 +14,7 @@
** The debug mode will print all of the printfs associated with this test.
** The regress mode will be the default mode. Since the regress tool limits
** the output to a one line status:PASS or FAIL,all of the printf statements
-** have been handled with an if (debug_mode) statement.
+** have been handled with an if (debug_mode) statement.
***********************************************************************/
/***********************************************************************
@@ -285,7 +285,7 @@ int Tmocon(int argc, char **argv)
memset(&shared->serverAddress, 0, sizeof(shared->serverAddress));
rv = PR_InitializeNetAddr(PR_IpAddrLoopback, BASE_PORT, &shared->serverAddress);
PR_ASSERT(PR_SUCCESS == rv);
-
+
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
{
if (PL_OPT_BAD == os) continue;
diff --git a/pr/tests/tpd.c b/pr/tests/tpd.c
index eef1a1d8..e1486fab 100644
--- a/pr/tests/tpd.c
+++ b/pr/tests/tpd.c
@@ -36,7 +36,7 @@ static void PrintProgress(PRIntn line)
printf(
"@ line %d destructor should%s have been called and was%s\n",
line, ((should) ? "" : " NOT"), ((did) ? "" : " NOT"));
-#else
+#else
PR_fprintf(
fout, "@ line %d destructor should%s have been called and was%s\n",
line, ((should) ? "" : " NOT"), ((did) ? "" : " NOT"));
@@ -75,7 +75,7 @@ static void PR_CALLBACK Thread(void *null)
char *key_string[] = {
"Key #0", "Key #1", "Key #2", "Key #3",
"Bogus #5", "Bogus #6", "Bogus #7", "Bogus #8"};
-
+
did = should = PR_FALSE;
for (keys = 0; keys < 8; ++keys)
{
@@ -99,7 +99,7 @@ static void PR_CALLBACK Thread(void *null)
MY_ASSERT(PR_FAILURE == rv);
}
PrintProgress(__LINE__);
-
+
did = PR_FALSE; should = PR_TRUE;
for (keys = 0; keys < 4; ++keys)
{
@@ -168,7 +168,7 @@ static PRIntn PR_CALLBACK Tpd(PRIntn argc, char **argv)
char *key_string[] = {
"Key #0", "Key #1", "Key #2", "Key #3",
"Bogus #5", "Bogus #6", "Bogus #7", "Bogus #8"};
-
+
fout = PR_STDOUT;
did = should = PR_FALSE;
@@ -204,7 +204,7 @@ static PRIntn PR_CALLBACK Tpd(PRIntn argc, char **argv)
MY_ASSERT(PR_FAILURE == rv);
}
PrintProgress(__LINE__);
-
+
did = PR_FALSE; should = PR_TRUE;
for (keys = 0; keys < 4; ++keys)
{
@@ -268,7 +268,7 @@ static PRIntn PR_CALLBACK Tpd(PRIntn argc, char **argv)
#else
(void)PR_fprintf(
fout, "%s\n",((PR_TRUE == failed) ? "FAILED" : "PASSED"));
-#endif
+#endif
return 0;
diff --git a/pr/tests/udpsrv.c b/pr/tests/udpsrv.c
index 805bccbb..d8aa208f 100644
--- a/pr/tests/udpsrv.c
+++ b/pr/tests/udpsrv.c
@@ -22,21 +22,21 @@
** He detects an EOF condition set by UDP_Client(). For each
** packet received by UDP_Server(), he checks its content for
** expected content, then sends the packet back to UDP_Client().
-**
+**
** UDP_Client() sends packets to UDP_Server() using sendto()
** he recieves packets back from the server via recvfrom().
** After he sends enough packets containing UDP_AMOUNT_TO_WRITE
** bytes of data, he sends an EOF message.
-**
+**
** The test issues a pass/fail message at end.
-**
+**
** Notes:
** The variable "_debug_on" can be set to 1 to cause diagnostic
** messages related to client/server synchronization. Useful when
** the test hangs.
-**
+**
** Error messages are written to stdout.
-**
+**
********************************************************************
*/
/* --- include files --- */
@@ -96,11 +96,11 @@ static PRFileDesc *output = NULL;
void ListNetAddr( char *msg, PRNetAddr *na )
{
char mbuf[256];
-
+
sprintf( mbuf, "ListNetAddr: %s family: %d, port: %d, ip: %8.8X\n",
msg, na->inet.family, PR_ntohs( na->inet.port), PR_ntohl(na->inet.ip) );
-#if 0
- DPRINTF( mbuf );
+#if 0
+ DPRINTF( mbuf );
#endif
} /* --- end ListNetAddr() --- */
@@ -127,7 +127,7 @@ static void PR_CALLBACK UDP_Server( void *arg )
PRBool bound = PR_FALSE;
PRBool endOfInput = PR_FALSE;
PRInt32 numBytes = UDP_DGRAM_SIZE;
-
+
DPRINTF("udpsrv: UDP_Server(): starting\n" );
/* --- Create the socket --- */
@@ -141,13 +141,13 @@ static void PR_CALLBACK UDP_Server( void *arg )
"udpsrv: UDP_Server(): PR_NewUDPSocket() returned NULL\n" );
return;
}
-
+
/* --- Initialize the sockaddr_in structure --- */
- memset( &netaddr, 0, sizeof( netaddr ));
+ memset( &netaddr, 0, sizeof( netaddr ));
netaddr.inet.family = PR_AF_INET;
netaddr.inet.port = PR_htons( UDP_SERVER_PORT );
netaddr.inet.ip = PR_htonl( MY_INADDR );
-
+
/* --- Bind the socket --- */
while ( !bound )
{
@@ -176,7 +176,7 @@ static void PR_CALLBACK UDP_Server( void *arg )
bound = PR_TRUE;
}
ListNetAddr( "UDP_Server: after bind", &netaddr );
-
+
/* --- Recv the socket --- */
while( !endOfInput )
{
@@ -193,15 +193,15 @@ static void PR_CALLBACK UDP_Server( void *arg )
return;
}
ListNetAddr( "UDP_Server after RecvFrom", &netaddr );
-
+
srvBytesRead += rv;
-
+
if ( svrBuf[0] == 'E' )
{
DPRINTF("udpsrv: UDP_Server(): EOF on input detected\n" );
endOfInput = PR_TRUE;
}
-
+
/* --- Send the socket --- */
DPRINTF("udpsrv: UDP_Server(): SendTo(): socket\n" );
rv = PR_SendTo( svrSock, svrBuf, rv, 0, &netaddr, PR_INTERVAL_NO_TIMEOUT );
@@ -217,7 +217,7 @@ static void PR_CALLBACK UDP_Server( void *arg )
}
ListNetAddr( "UDP_Server after SendTo", &netaddr );
}
-
+
/* --- Close the socket --- */
DPRINTF("udpsrv: UDP_Server(): Closing socket\n" );
rv = PR_Close( svrSock );
@@ -229,7 +229,7 @@ static void PR_CALLBACK UDP_Server( void *arg )
"udpsrv: UDP_Server(): PR_Close(): failed to close socket\n" );
return;
}
-
+
DPRINTF("udpsrv: UDP_Server(): Normal end\n" );
} /* --- end UDP_Server() --- */
@@ -264,10 +264,10 @@ static void PR_CALLBACK UDP_Client( void *arg )
PRInt32 numBytes = UDP_DGRAM_SIZE;
PRInt32 writeThisMany = UDP_AMOUNT_TO_WRITE;
int i;
-
-
+
+
DPRINTF("udpsrv: UDP_Client(): starting\n" );
-
+
/* --- Create the socket --- */
cltSock = PR_NewUDPSocket();
if ( cltSock == NULL )
@@ -278,17 +278,17 @@ static void PR_CALLBACK UDP_Client( void *arg )
"udpsrv: UDP_Client(): PR_NewUDPSocket() returned NULL\n" );
return;
}
-
+
/* --- Initialize the sockaddr_in structure --- */
- memset( &netaddr, 0, sizeof( netaddr ));
+ memset( &netaddr, 0, sizeof( netaddr ));
netaddr.inet.family = PR_AF_INET;
netaddr.inet.ip = PR_htonl( MY_INADDR );
netaddr.inet.port = PR_htons( UDP_CLIENT_PORT );
-
- /* --- Initialize the write buffer --- */
+
+ /* --- Initialize the write buffer --- */
for ( i = 0; i < UDP_BUF_SIZE ; i++ )
cltBuf[i] = i;
-
+
/* --- Bind the socket --- */
while ( !bound )
{
@@ -319,26 +319,26 @@ static void PR_CALLBACK UDP_Client( void *arg )
bound = PR_TRUE;
}
ListNetAddr( "UDP_Client after Bind", &netaddr );
-
+
/* --- Initialize the sockaddr_in structure --- */
- memset( &netaddr, 0, sizeof( netaddr ));
+ memset( &netaddr, 0, sizeof( netaddr ));
netaddr.inet.family = PR_AF_INET;
netaddr.inet.ip = PR_htonl( PEER_INADDR );
netaddr.inet.port = PR_htons( UDP_SERVER_PORT );
-
- /* --- send and receive packets until no more data left */
+
+ /* --- send and receive packets until no more data left */
while( !endOfInput )
{
/*
** Signal EOF in the data stream on the last packet
- */
+ */
if ( writeThisMany <= UDP_DGRAM_SIZE )
{
DPRINTF("udpsrv: UDP_Client(): Send EOF packet\n" );
cltBuf[0] = 'E';
endOfInput = PR_TRUE;
}
-
+
/* --- SendTo the socket --- */
if ( writeThisMany > UDP_DGRAM_SIZE )
numBytes = UDP_DGRAM_SIZE;
@@ -347,11 +347,11 @@ static void PR_CALLBACK UDP_Client( void *arg )
writeThisMany -= numBytes;
{
char mbuf[256];
- sprintf( mbuf, "udpsrv: UDP_Client(): write_this_many: %d, numbytes: %d\n",
+ sprintf( mbuf, "udpsrv: UDP_Client(): write_this_many: %d, numbytes: %d\n",
writeThisMany, numBytes );
DPRINTF( mbuf );
}
-
+
DPRINTF("udpsrv: UDP_Client(): SendTo(): socket\n" );
rv = PR_SendTo( cltSock, cltBuf, numBytes, 0, &netaddr, UDP_TIMEOUT );
if ( rv == -1 )
@@ -381,7 +381,7 @@ static void PR_CALLBACK UDP_Client( void *arg )
}
ListNetAddr( "UDP_Client after RecvFrom()", &netaddr );
cltBytesRead += rv;
-
+
/* --- verify buffer --- */
for ( i = 0; i < rv ; i++ )
{
@@ -399,7 +399,7 @@ static void PR_CALLBACK UDP_Client( void *arg )
}
if (debug_mode) PR_fprintf(output, ".");
}
-
+
/* --- Close the socket --- */
DPRINTF("udpsrv: UDP_Server(): Closing socket\n" );
rv = PR_Close( cltSock );
@@ -458,16 +458,16 @@ int main(int argc, char **argv)
}
}
PL_DestroyOptState(opt);
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
output = PR_STDERR;
PR_SetConcurrency(4);
-
+
/*
** Create the Server thread
- */
+ */
DPRINTF( "udpsrv: Creating Server Thread\n" );
srv = PR_CreateThread( PR_USER_THREAD,
UDP_Server,
@@ -481,16 +481,16 @@ int main(int argc, char **argv)
if (debug_mode) PR_fprintf(output, "udpsrv: Cannot create server thread\n" );
passed = PR_FALSE;
}
-
+
/*
** Give the Server time to Start
- */
+ */
DPRINTF( "udpsrv: Pausing to allow Server to start\n" );
PR_Sleep( PR_MillisecondsToInterval(200) );
-
+
/*
** Create the Client thread
- */
+ */
DPRINTF( "udpsrv: Creating Client Thread\n" );
clt = PR_CreateThread( PR_USER_THREAD,
UDP_Client,
@@ -504,14 +504,14 @@ int main(int argc, char **argv)
if (debug_mode) PR_fprintf(output, "udpsrv: Cannot create server thread\n" );
passed = PR_FALSE;
}
-
+
/*
**
*/
DPRINTF("udpsrv: Waiting to join Server & Client Threads\n" );
PR_JoinThread( srv );
- PR_JoinThread( clt );
-
+ PR_JoinThread( clt );
+
/*
** Evaluate test results
*/
diff --git a/pr/tests/version.c b/pr/tests/version.c
index a026de94..a1d4d962 100644
--- a/pr/tests/version.c
+++ b/pr/tests/version.c
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
if (NULL == versionPoint) {
PL_FPrintError(err, "PR_FindSymbol");
return 4;
- }
+ }
version_info = versionPoint();
}
} else
diff --git a/pr/tests/writev.c b/pr/tests/writev.c
index 24544a46..df76ff6d 100644
--- a/pr/tests/writev.c
+++ b/pr/tests/writev.c
@@ -89,7 +89,7 @@ int PR_CALLBACK Writev(int argc, char **argv)
fragment_length = message_length / (IOV_MAX - 2);
number_fragments = (message_length + fragment_length - 1) /
fragment_length + 1;
- if (NULL != debug) PR_fprintf(debug,
+ if (NULL != debug) PR_fprintf(debug,
"Too many fragments - reset fragment length to %ld\n", fragment_length);
}
iov = (PRIOVec*)malloc(number_fragments * sizeof(PRIOVec));
diff --git a/pr/tests/xnotify.c b/pr/tests/xnotify.c
index 97096cc6..00d35210 100644
--- a/pr/tests/xnotify.c
+++ b/pr/tests/xnotify.c
@@ -341,7 +341,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
PR_DestroyLock(ml);
- PR_fprintf(err, "Done!\n");
+ PR_fprintf(err, "Done!\n");
return 0;
} /* main */
@@ -349,7 +349,7 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
int main(int argc, char **argv)
{
PRIntn rv;
-
+
PR_STDIO_INIT();
rv = PR_Initialize(RealMain, argc, argv, 0);
return rv;
diff --git a/pr/tests/y2k.c b/pr/tests/y2k.c
index 12cc16f4..80934142 100644
--- a/pr/tests/y2k.c
+++ b/pr/tests/y2k.c
@@ -115,14 +115,14 @@ static int ExplodedTimeIsEqual(const PRExplodedTime *et1,
*
* Call PR_ImplodeTime for each of the exploded values and compare
* the resulting PRTime values with the original input.
- *
+ *
* This test is run for the values of time T corresponding to the
* following dates:
- * - 12/31/99 - before 2000
- * - 01/01/00 - after 2000
- * - Leap year - Feb 29, 2000
- * - March 1st, 2001 (after 1 year)
- * - March 1st, 2005 (after second leap year)
+ * - 12/31/99 - before 2000
+ * - 01/01/00 - after 2000
+ * - Leap year - Feb 29, 2000
+ * - March 1st, 2001 (after 1 year)
+ * - March 1st, 2005 (after second leap year)
* - 09/09/99 (used by some programs as an end of file marker)
*
* Call PR_Now, convert to calendar time using PR_ExplodeTime and
@@ -130,7 +130,7 @@ static int ExplodedTimeIsEqual(const PRExplodedTime *et1,
* the system clock.
*
* Tested functions: PR_Now, PR_ExplodeTime, PR_ImplodeTime,
- * PR_LocalTimeParameters, PR_GMTParameters.
+ * PR_LocalTimeParameters, PR_GMTParameters.
*/
static PRTime prt[] = {
@@ -228,7 +228,7 @@ static PRStatus TestExplodeImplodeTime(void)
for (idx = 0; idx < array_size; idx++) {
PR_snprintf(buf, sizeof(buf), "%lld", prt[idx]);
- if (debug_mode) printf("Time stamp %s\n", buf);
+ if (debug_mode) printf("Time stamp %s\n", buf);
PR_ExplodeTime(prt[idx], PR_GMTParameters, &et_tmp);
if (!ExplodedTimeIsEqual(&et_tmp, &gmt[idx])) {
fprintf(stderr, "GMT not equal\n");
@@ -339,7 +339,7 @@ typedef struct time_increment {
* Time zone.
*/
typedef struct normalize_test_data {
- PRExplodedTime base_time;
+ PRExplodedTime base_time;
time_increment_t increment;
PRExplodedTime expected_gmt_time;
PRExplodedTime expected_uspt_time;
@@ -410,7 +410,7 @@ normalize_test_data_t normalize_test_array[] = {
/* 2004-04-26 12:00 GMT */
{{0, 0, 0, 20, 3, 0, 2001, 3, 2, { 0, 0}},
{0, 0, 30,0},
- {0, 0, 30, 20, 3, 0, 2001, 3, 2, { 0, 0}},/*Wed Jan 3 20:30:00 2001 UTC*/
+ {0, 0, 30, 20, 3, 0, 2001, 3, 2, { 0, 0}},/*Wed Jan 3 20:30:00 2001 UTC*/
{0, 0, 30, 12, 3, 0, 2001, 3, 2, { -28800, 0}}/*Wed Jan 3 12:30:00
2001 -0800*/
},
@@ -499,7 +499,7 @@ typedef struct ParseTest
PRExplodedTime et; /* expected result of the conversion */
} ParseTest;
-static ParseTest parseArray[] =
+static ParseTest parseArray[] =
{
/* |<----- expected result ------------------------------------------->| */
/* "string to test" usec sec min hour day mo year wday julian {gmtoff, dstoff }*/
@@ -533,7 +533,7 @@ static ParseTest parseArray[] =
{ "69-12-31 00:00:00", { 000000, 00, 00, 00, 31, 11, 2069, 2, 364, {-28800, 0 }}},
{ "69/12/31 00:00:00", { 000000, 00, 00, 00, 31, 11, 2069, 2, 364, {-28800, 0 }}},
- /* "Sun". 31-Dec-1998 (?) */
+ /* "Sun". 31-Dec-1998 (?) */
{ "Thu 31 Dec 1998 00:00:00", { 00000, 00, 00, 00, 31, 11, 1998, 4, 364, {-28800, 0 }}},
{ "12/31/98 00:00:00", { 00000, 00, 00, 00, 31, 11, 1998, 4, 364, {-28800, 0 }}},
{ "12/31/1998 00:00:00", { 00000, 00, 00, 00, 31, 11, 1998, 4, 364, {-28800, 0 }}},
@@ -551,7 +551,7 @@ static ParseTest parseArray[] =
{ "09-09-99 00:00:00", { 000000, 00, 00, 00, 9, 8, 1999, 4, 251, {-28800, 3600 }}},
{ "09-09-1999 00:00:00", { 000000, 00, 00, 00, 9, 8, 1999, 4, 251, {-28800, 3600 }}},
{ "99-09-09 00:00:00", { 000000, 00, 00, 00, 9, 8, 1999, 4, 251, {-28800, 3600 }}},
-
+
/* "Sun". 10-Sep-1999. Because Sun said so. */
{ "10 Sep 1999 00:00:00", { 000000, 00, 00, 00, 10, 8, 1999, 5, 252, {-28800, 3600 }}},
{ "9/10/99 00:00:00", { 000000, 00, 00, 00, 10, 8, 1999, 5, 252, {-28800, 3600 }}},
@@ -659,7 +659,7 @@ static ParseTest parseArray[] =
{ "03-01-2005 00:00:00", { 000000, 00, 00, 00, 1, 2, 2005, 2, 59, {-28800, 0 }}},
/* last element. string must be null */
- { NULL }
+ { NULL }
}; /* end array of ParseTest */
/*
@@ -708,12 +708,12 @@ static PRStatus TestParseTime( void )
PrintExplodedTime( &ptp->et );
printf("\n");
}
-
+
rv = PR_FAILURE;
failed_already = 1;
}
}
-
+
/* point to next element in array, keep going */
ptp++;
sp = ptp->sDate;
@@ -732,7 +732,7 @@ int main(int argc, char** argv)
*/
PLOptStatus os;
PLOptState *opt;
-
+
PR_STDIO_INIT();
opt = PL_CreateOptState(argc, argv, "d");
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -750,7 +750,7 @@ int main(int argc, char** argv)
PL_DestroyOptState(opt);
/* main test */
-
+
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
lm = PR_NewLogModule("test");
@@ -778,9 +778,9 @@ int main(int argc, char** argv)
else
printf("Test 3: Parse Time Test passed\n");
- if (failed_already)
+ if (failed_already)
return 1;
- else
+ else
return 0;
} /* end main() y2k.c */
diff --git a/pr/tests/y2ktmo.c b/pr/tests/y2ktmo.c
index e55cf997..e7ceb436 100644
--- a/pr/tests/y2ktmo.c
+++ b/pr/tests/y2ktmo.c
@@ -28,7 +28,7 @@
* time again, to rule out the possibility that PR_IntervalNow()
* is broken. We allow the actual elapsed time to deviate from
* the specified timeout by a certain tolerance (in milliseconds).
- */
+ */
#include "nspr.h"
#include "plgetopt.h"
@@ -525,7 +525,7 @@ int main(int argc, char **argv)
/* start to time out 5 seconds after a rollover date */
secs = lead_time_secs + 5;
idx = 0;
- for (i = 0; i < num_thread_scopes; i++) {
+ for (i = 0; i < num_thread_scopes; i++) {
for (j = 0; j < num_thread_funcs; j++) {
threads[idx] = PR_CreateThread(PR_USER_THREAD, threadFuncs[j],
(void*)PR_SecondsToInterval(secs), PR_PRIORITY_NORMAL,
diff --git a/pr/tests/yield.c b/pr/tests/yield.c
index c68166e1..1e4b6b89 100644
--- a/pr/tests/yield.c
+++ b/pr/tests/yield.c
@@ -17,7 +17,7 @@
#define THREADS 10
-void
+void
threadmain(void *_id)
{
int id = (int)_id;
diff --git a/pr/tests/zerolen.c b/pr/tests/zerolen.c
index 339d35a9..730be79d 100644
--- a/pr/tests/zerolen.c
+++ b/pr/tests/zerolen.c
@@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
- * Test: zerolen.c
+ * Test: zerolen.c
*
* Description: a test for Bugzilla bug #17699. We perform
* the same test for PR_Writev, PR_Write, and PR_Send. In
diff --git a/tools/httpget.c b/tools/httpget.c
index 848f930f..ec8776f3 100644
--- a/tools/httpget.c
+++ b/tools/httpget.c
@@ -78,7 +78,7 @@ loop:
} else if (*inputHead == '\n') {
lineFound = PR_TRUE;
if (crPtr == dst - 1) {
- dst--;
+ dst--;
}
}
*(dst++) = *(inputHead++);