summaryrefslogtreecommitdiff
path: root/pr/include
diff options
context:
space:
mode:
Diffstat (limited to 'pr/include')
-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
44 files changed, 753 insertions, 753 deletions
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 );