summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclAsync.c36
-rw-r--r--generic/tclGet.c35
-rw-r--r--generic/tclIOSock.c20
-rw-r--r--generic/tclPkgConfig.c6
-rw-r--r--generic/tclPosixStr.c18
-rw-r--r--generic/tclPreserve.c42
-rw-r--r--generic/tclThreadJoin.c22
7 files changed, 89 insertions, 90 deletions
diff --git a/generic/tclAsync.c b/generic/tclAsync.c
index ce29235..5c3a535 100644
--- a/generic/tclAsync.c
+++ b/generic/tclAsync.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclAsync.c,v 1.8 2005/07/19 22:45:19 dkf Exp $
+ * RCS: @(#) $Id: tclAsync.c,v 1.9 2005/11/07 15:19:29 dkf Exp $
*/
#include "tclInt.h"
@@ -52,12 +52,12 @@ typedef struct ThreadSpecificData {
AsyncHandler *lastHandler; /* Last handler or NULL. */
int asyncReady; /* This is set to 1 whenever a handler becomes
* ready and it is cleared to zero whenever
- * Tcl_AsyncInvoke is called. It can be
+ * Tcl_AsyncInvoke is called. It can be
* checked elsewhere in the application by
* calling Tcl_AsyncReady to see if
* Tcl_AsyncInvoke should be invoked. */
int asyncActive; /* Indicates whether Tcl_AsyncInvoke is
- * currently working. If so then we won't set
+ * currently working. If so then we won't set
* asyncReady again until Tcl_AsyncInvoke
* returns. */
Tcl_Mutex asyncMutex; /* Thread-specific AsyncHandler linked-list
@@ -83,7 +83,7 @@ static Tcl_ThreadDataKey dataKey;
*/
void
-TclFinalizeAsync()
+TclFinalizeAsync(void)
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -112,10 +112,10 @@ TclFinalizeAsync()
*/
Tcl_AsyncHandler
-Tcl_AsyncCreate(proc, clientData)
- Tcl_AsyncProc *proc; /* Procedure to call when handler is
+Tcl_AsyncCreate(
+ Tcl_AsyncProc *proc, /* Procedure to call when handler is
* invoked. */
- ClientData clientData; /* Argument to pass to handler. */
+ ClientData clientData) /* Argument to pass to handler. */
{
AsyncHandler *asyncPtr;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -145,7 +145,7 @@ Tcl_AsyncCreate(proc, clientData)
* Tcl_AsyncMark --
*
* This procedure is called to request that an asynchronous handler be
- * invoked as soon as possible. It's typically called from an interrupt
+ * invoked as soon as possible. It's typically called from an interrupt
* handler, where it isn't safe to do anything that depends on or
* modifies application state.
*
@@ -159,8 +159,8 @@ Tcl_AsyncCreate(proc, clientData)
*/
void
-Tcl_AsyncMark(async)
- Tcl_AsyncHandler async; /* Token for handler. */
+Tcl_AsyncMark(
+ Tcl_AsyncHandler async) /* Token for handler. */
{
AsyncHandler *token = (AsyncHandler *) async;
@@ -192,11 +192,11 @@ Tcl_AsyncMark(async)
*/
int
-Tcl_AsyncInvoke(interp, code)
- Tcl_Interp *interp; /* If invoked from Tcl_Eval just after
+Tcl_AsyncInvoke(
+ Tcl_Interp *interp, /* If invoked from Tcl_Eval just after
* completing a command, points to
- * interpreter. Otherwise it is NULL. */
- int code; /* If interp is non-NULL, this gives
+ * interpreter. Otherwise it is NULL. */
+ int code) /* If interp is non-NULL, this gives
* completion code from command that just
* completed. */
{
@@ -263,8 +263,8 @@ Tcl_AsyncInvoke(interp, code)
*/
void
-Tcl_AsyncDelete(async)
- Tcl_AsyncHandler async; /* Token for handler to delete. */
+Tcl_AsyncDelete(
+ Tcl_AsyncHandler async) /* Token for handler to delete. */
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
AsyncHandler *asyncPtr = (AsyncHandler *) async;
@@ -296,7 +296,7 @@ Tcl_AsyncDelete(async)
* Tcl_AsyncReady --
*
* This procedure can be used to tell whether Tcl_AsyncInvoke needs to be
- * called. This procedure is the external interface for checking the
+ * called. This procedure is the external interface for checking the
* thread-specific asyncReady variable.
*
* Results:
@@ -310,7 +310,7 @@ Tcl_AsyncDelete(async)
*/
int
-Tcl_AsyncReady()
+Tcl_AsyncReady(void)
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
return tsdPtr->asyncReady;
diff --git a/generic/tclGet.c b/generic/tclGet.c
index b28b3f92..058323d 100644
--- a/generic/tclGet.c
+++ b/generic/tclGet.c
@@ -11,11 +11,10 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclGet.c,v 1.16 2005/07/24 22:56:43 dkf Exp $
+ * RCS: @(#) $Id: tclGet.c,v 1.17 2005/11/07 15:13:36 dkf Exp $
*/
#include "tclInt.h"
-
/*
*----------------------------------------------------------------------
@@ -37,11 +36,11 @@
*/
int
-Tcl_GetInt(interp, src, intPtr)
- Tcl_Interp *interp; /* Interpreter to use for error reporting. */
- CONST char *src; /* String containing a (possibly signed)
+Tcl_GetInt(
+ Tcl_Interp *interp, /* Interpreter to use for error reporting. */
+ CONST char *src, /* String containing a (possibly signed)
* integer in a form acceptable to strtoul. */
- int *intPtr; /* Place to store converted result. */
+ int *intPtr) /* Place to store converted result. */
{
Tcl_Obj obj;
int code;
@@ -80,12 +79,12 @@ Tcl_GetInt(interp, src, intPtr)
*/
int
-TclGetLong(interp, src, longPtr)
- Tcl_Interp *interp; /* Interpreter used for error reporting if not
+TclGetLong(
+ Tcl_Interp *interp, /* Interpreter used for error reporting if not
* NULL. */
- CONST char *src; /* String containing a (possibly signed) long
+ CONST char *src, /* String containing a (possibly signed) long
* integer in a form acceptable to strtoul. */
- long *longPtr; /* Place to store converted long result. */
+ long *longPtr) /* Place to store converted long result. */
{
Tcl_Obj obj;
int code;
@@ -123,11 +122,11 @@ TclGetLong(interp, src, longPtr)
*/
int
-Tcl_GetDouble(interp, src, doublePtr)
- Tcl_Interp *interp; /* Interpreter used for error reporting. */
- CONST char *src; /* String containing a floating-point number
+Tcl_GetDouble(
+ Tcl_Interp *interp, /* Interpreter used for error reporting. */
+ CONST char *src, /* String containing a floating-point number
* in a form acceptable to strtod. */
- double *doublePtr; /* Place to store converted result. */
+ double *doublePtr) /* Place to store converted result. */
{
Tcl_Obj obj;
int code;
@@ -165,12 +164,12 @@ Tcl_GetDouble(interp, src, doublePtr)
*/
int
-Tcl_GetBoolean(interp, src, boolPtr)
- Tcl_Interp *interp; /* Interpreter used for error reporting. */
- CONST char *src; /* String containing a boolean number
+Tcl_GetBoolean(
+ Tcl_Interp *interp, /* Interpreter used for error reporting. */
+ CONST char *src, /* String containing a boolean number
* specified either as 1/0 or true/false or
* yes/no. */
- int *boolPtr; /* Place to store converted result, which will
+ int *boolPtr) /* Place to store converted result, which will
* be 0 or 1. */
{
Tcl_Obj obj;
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index 366d0ab..69e2351 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOSock.c,v 1.9 2005/07/19 22:45:35 dkf Exp $
+ * RCS: @(#) $Id: tclIOSock.c,v 1.10 2005/11/07 15:17:25 dkf Exp $
*/
#include "tclInt.h"
@@ -33,11 +33,11 @@
*/
int
-TclSockGetPort(interp, string, proto, portPtr)
- Tcl_Interp *interp;
- char *string; /* Integer or service name */
- char *proto; /* "tcp" or "udp", typically */
- int *portPtr; /* Return port number */
+TclSockGetPort(
+ Tcl_Interp *interp,
+ char *string, /* Integer or service name */
+ char *proto, /* "tcp" or "udp", typically */
+ int *portPtr) /* Return port number */
{
struct servent *sp; /* Protocol info for named services */
Tcl_DString ds;
@@ -61,7 +61,7 @@ TclSockGetPort(interp, string, proto, portPtr)
}
if (*portPtr > 0xFFFF) {
Tcl_AppendResult(interp, "couldn't open socket: port number too high",
- (char *) NULL);
+ NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -84,9 +84,9 @@ TclSockGetPort(interp, string, proto, portPtr)
*/
int
-TclSockMinimumBuffers(sock, size)
- int sock; /* Socket file descriptor */
- int size; /* Minimum buffer size */
+TclSockMinimumBuffers(
+ int sock, /* Socket file descriptor */
+ int size) /* Minimum buffer size */
{
int current;
socklen_t len;
diff --git a/generic/tclPkgConfig.c b/generic/tclPkgConfig.c
index b339607..10ddc58 100644
--- a/generic/tclPkgConfig.c
+++ b/generic/tclPkgConfig.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPkgConfig.c,v 1.3 2005/07/21 14:38:50 dkf Exp $
+ * RCS: @(#) $Id: tclPkgConfig.c,v 1.4 2005/11/07 15:14:09 dkf Exp $
*/
/* Note, the definitions in this module are influenced by the following C
@@ -121,8 +121,8 @@ static Tcl_Config cfg[] = {
};
void
-TclInitEmbeddedConfigurationInformation(interp)
- Tcl_Interp* interp; /* Interpreter the configuration command is
+TclInitEmbeddedConfigurationInformation(
+ Tcl_Interp* interp) /* Interpreter the configuration command is
* registered in. */
{
Tcl_RegisterConfig(interp, "tcl", cfg, TCL_CFGVAL_ENCODING);
diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c
index 7cb2bdb..a48c2dd 100644
--- a/generic/tclPosixStr.c
+++ b/generic/tclPosixStr.c
@@ -1,4 +1,4 @@
-/*
+/*
* tclPosixStr.c --
*
* This file contains procedures that generate strings corresponding to
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPosixStr.c,v 1.11 2005/07/19 22:45:35 dkf Exp $
+ * RCS: @(#) $Id: tclPosixStr.c,v 1.12 2005/11/07 15:16:03 dkf Exp $
*/
#include "tclInt.h"
@@ -34,7 +34,7 @@
*/
CONST char *
-Tcl_ErrnoId()
+Tcl_ErrnoId(void)
{
switch (errno) {
#ifdef E2BIG
@@ -480,8 +480,8 @@ Tcl_ErrnoId()
*/
CONST char *
-Tcl_ErrnoMsg(err)
- int err; /* Error number (such as in errno variable). */
+Tcl_ErrnoMsg(
+ int err) /* Error number (such as in errno variable). */
{
switch (err) {
#ifdef E2BIG
@@ -930,8 +930,8 @@ Tcl_ErrnoMsg(err)
*/
CONST char *
-Tcl_SignalId(sig)
- int sig; /* Number of signal. */
+Tcl_SignalId(
+ int sig) /* Number of signal. */
{
switch (sig) {
#ifdef SIGABRT
@@ -1061,8 +1061,8 @@ Tcl_SignalId(sig)
*/
CONST char *
-Tcl_SignalMsg(sig)
- int sig; /* Number of signal. */
+Tcl_SignalMsg(
+ int sig) /* Number of signal. */
{
switch (sig) {
#ifdef SIGABRT
diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c
index 8281bc4..f4dcedc 100644
--- a/generic/tclPreserve.c
+++ b/generic/tclPreserve.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPreserve.c,v 1.7 2005/07/24 22:56:43 dkf Exp $
+ * RCS: @(#) $Id: tclPreserve.c,v 1.8 2005/11/07 15:12:26 dkf Exp $
*/
#include "tclInt.h"
@@ -56,12 +56,12 @@ TCL_DECLARE_MUTEX(preserveMutex)/* To protect the above statics */
*/
typedef struct HandleStruct {
- VOID *ptr; /* Pointer to the memory block being tracked.
+ void *ptr; /* Pointer to the memory block being tracked.
* This field will become NULL when the memory
* block is deleted. This field must be the
* first in the structure. */
#ifdef TCL_MEM_DEBUG
- VOID *ptr2; /* Backup copy of the above pointer used to
+ void *ptr2; /* Backup copy of the above pointer used to
* ensure that the contents of the handle are
* not changed by anyone else. */
#endif
@@ -87,12 +87,12 @@ typedef struct HandleStruct {
/* ARGSUSED */
void
-TclFinalizePreserve()
+TclFinalizePreserve(void)
{
Tcl_MutexLock(&preserveMutex);
if (spaceAvl != 0) {
ckfree((char *) refArray);
- refArray = (Reference *) NULL;
+ refArray = NULL;
inUse = 0;
spaceAvl = 0;
}
@@ -119,8 +119,8 @@ TclFinalizePreserve()
*/
void
-Tcl_Preserve(clientData)
- ClientData clientData; /* Pointer to malloc'ed block of memory. */
+Tcl_Preserve(
+ ClientData clientData) /* Pointer to malloc'ed block of memory. */
{
Reference *refPtr;
int i;
@@ -154,7 +154,7 @@ Tcl_Preserve(clientData)
new = (Reference *) ckalloc((unsigned)
(2*spaceAvl*sizeof(Reference)));
- memcpy((VOID *) new, (VOID *) refArray,
+ memcpy((void *) new, (void *) refArray,
spaceAvl*sizeof(Reference));
ckfree((char *) refArray);
refArray = new;
@@ -195,8 +195,8 @@ Tcl_Preserve(clientData)
*/
void
-Tcl_Release(clientData)
- ClientData clientData; /* Pointer to malloc'ed block of memory. */
+Tcl_Release(
+ ClientData clientData) /* Pointer to malloc'ed block of memory. */
{
Reference *refPtr;
int i;
@@ -274,9 +274,9 @@ Tcl_Release(clientData)
*/
void
-Tcl_EventuallyFree(clientData, freeProc)
- ClientData clientData; /* Pointer to malloc'ed block of memory. */
- Tcl_FreeProc *freeProc; /* Function to actually do free. */
+Tcl_EventuallyFree(
+ ClientData clientData, /* Pointer to malloc'ed block of memory. */
+ Tcl_FreeProc *freeProc) /* Function to actually do free. */
{
Reference *refPtr;
int i;
@@ -338,8 +338,8 @@ Tcl_EventuallyFree(clientData, freeProc)
*/
TclHandle
-TclHandleCreate(ptr)
- VOID *ptr; /* Pointer to an arbitrary block of memory to
+TclHandleCreate(
+ void *ptr) /* Pointer to an arbitrary block of memory to
* be tracked for deletion. Must not be
* NULL. */
{
@@ -374,8 +374,8 @@ TclHandleCreate(ptr)
*/
void
-TclHandleFree(handle)
- TclHandle handle; /* Previously created handle associated with a
+TclHandleFree(
+ TclHandle handle) /* Previously created handle associated with a
* malloc'd block that is being deleted. The
* handle is modified so that doubly
* dereferencing it will give NULL. */
@@ -419,8 +419,8 @@ TclHandleFree(handle)
*/
TclHandle
-TclHandlePreserve(handle)
- TclHandle handle; /* Declare an interest in the block of memory
+TclHandlePreserve(
+ TclHandle handle) /* Declare an interest in the block of memory
* referenced by this handle. */
{
HandleStruct *handlePtr;
@@ -460,8 +460,8 @@ TclHandlePreserve(handle)
*/
void
-TclHandleRelease(handle)
- TclHandle handle; /* Unregister interest in the block of memory
+TclHandleRelease(
+ TclHandle handle) /* Unregister interest in the block of memory
* referenced by this handle. */
{
HandleStruct *handlePtr;
diff --git a/generic/tclThreadJoin.c b/generic/tclThreadJoin.c
index 7abcfcc..6a9304d 100644
--- a/generic/tclThreadJoin.c
+++ b/generic/tclThreadJoin.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclThreadJoin.c,v 1.6 2005/07/19 22:45:35 dkf Exp $
+ * RCS: @(#) $Id: tclThreadJoin.c,v 1.7 2005/11/07 15:15:06 dkf Exp $
*/
#include "tclInt.h"
@@ -78,9 +78,9 @@ static JoinableThread* firstThreadPtr;
*/
int
-TclJoinThread(id, result)
- Tcl_ThreadId id; /* The id of the thread to wait upon. */
- int *result; /* Reference to a location for the result of
+TclJoinThread(
+ Tcl_ThreadId id, /* The id of the thread to wait upon. */
+ int *result) /* Reference to a location for the result of
* the thread we are waiting upon. */
{
JoinableThread *threadPtr;
@@ -226,9 +226,9 @@ TclJoinThread(id, result)
*----------------------------------------------------------------------
*/
-VOID
-TclRememberJoinableThread(id)
- Tcl_ThreadId id; /* The thread to remember as joinable */
+void
+TclRememberJoinableThread(
+ Tcl_ThreadId id) /* The thread to remember as joinable */
{
JoinableThread *threadPtr;
@@ -265,10 +265,10 @@ TclRememberJoinableThread(id)
*----------------------------------------------------------------------
*/
-VOID
-TclSignalExitThread(id,result)
- Tcl_ThreadId id; /* Id of the thread signaling its exit. */
- int result; /* The result from the thread. */
+void
+TclSignalExitThread(
+ Tcl_ThreadId id, /* Id of the thread signaling its exit. */
+ int result) /* The result from the thread. */
{
JoinableThread *threadPtr;