summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-04-16 13:36:33 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-04-16 13:36:33 (GMT)
commit3b2f0df2b4603b0565ad30e1e15ae9f0bfe3cb5f (patch)
tree88437ef1c667959b00a3b86ee638cc3a94300aab /unix
parentb443cf5d2f6f6c75dc77a88987ed558a2fca9ba5 (diff)
downloadtcl-3b2f0df2b4603b0565ad30e1e15ae9f0bfe3cb5f.zip
tcl-3b2f0df2b4603b0565ad30e1e15ae9f0bfe3cb5f.tar.gz
tcl-3b2f0df2b4603b0565ad30e1e15ae9f0bfe3cb5f.tar.bz2
Complete the purge of K&R function definitions from manually-written code.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclAppInit.c12
-rw-r--r--unix/tclLoadAix.c5
-rw-r--r--unix/tclLoadDyld.c6
-rw-r--r--unix/tclUnixCompat.c48
-rw-r--r--unix/tclUnixSock.c4
-rw-r--r--unix/tclUnixTest.c12
-rw-r--r--unix/tclUnixTime.c5
-rw-r--r--unix/tclXtNotify.c46
8 files changed, 83 insertions, 55 deletions
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index 8875b92..a5058d8 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.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: tclAppInit.c,v 1.16 2005/07/20 23:16:00 dkf Exp $
+ * RCS: @(#) $Id: tclAppInit.c,v 1.17 2007/04/16 13:36:35 dkf Exp $
*/
#include "tcl.h"
@@ -50,9 +50,9 @@ extern int Tclxttest_Init _ANSI_ARGS_((Tcl_Interp *interp));
*/
int
-main(argc, argv)
- int argc; /* Number of command-line arguments. */
- char **argv; /* Values of command-line arguments. */
+main(
+ int argc, /* Number of command-line arguments. */
+ char **argv) /* Values of command-line arguments. */
{
/*
* The following #if block allows you to change the AppInit function by
@@ -109,8 +109,8 @@ main(argc, argv)
*/
int
-Tcl_AppInit(interp)
- Tcl_Interp *interp; /* Interpreter for application. */
+Tcl_AppInit(
+ Tcl_Interp *interp) /* Interpreter for application. */
{
if (Tcl_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c
index f093896..d238e9a 100644
--- a/unix/tclLoadAix.c
+++ b/unix/tclLoadAix.c
@@ -17,7 +17,7 @@
* for any results of using the software, alterations are clearly marked
* as such, and this notice is not modified.
*
- * RCS: @(#) $Id: tclLoadAix.c,v 1.5 2005/11/11 23:46:34 dkf Exp $
+ * RCS: @(#) $Id: tclLoadAix.c,v 1.6 2007/04/16 13:36:36 dkf Exp $
*
* Note: this file has been altered from the original in a few ways in order
* to work properly with Tcl.
@@ -316,7 +316,8 @@ dlerror(void)
}
int
-dlclose(void *handle)
+dlclose(
+ void *handle)
{
register ModulePtr mp = (ModulePtr)handle;
int result;
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index 332c6c1..94cca40 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclLoadDyld.c,v 1.24 2006/07/20 06:18:38 das Exp $
+ * RCS: @(#) $Id: tclLoadDyld.c,v 1.25 2007/04/16 13:36:36 dkf Exp $
*/
#include "tclInt.h"
@@ -55,7 +55,9 @@ MODULE_SCOPE long tclMacOSXDarwinRelease;
*/
static CONST char*
-DyldOFIErrorMsg(int err) {
+DyldOFIErrorMsg(
+ int err)
+{
switch(err) {
case NSObjectFileImageSuccess:
return NULL;
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index d9deb8a..23905a4 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -6,7 +6,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixCompat.c,v 1.8 2006/09/12 21:59:53 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclUnixCompat.c,v 1.9 2007/04/16 13:36:36 dkf Exp $
*
*/
@@ -88,7 +88,11 @@ static Tcl_Mutex compatLock;
*/
static int
-CopyArray(char **src, int elsize, char *buf, int buflen)
+CopyArray(
+ char **src,
+ int elsize,
+ char *buf,
+ int buflen)
{
int i, j, len = 0;
char *p, **new;
@@ -147,7 +151,10 @@ CopyArray(char **src, int elsize, char *buf, int buflen)
static int
-CopyString(char *src, char *buf, int buflen)
+CopyString(
+ char *src,
+ char *buf,
+ int buflen)
{
int len = 0;
@@ -187,7 +194,10 @@ CopyString(char *src, char *buf, int buflen)
*/
static int
-CopyHostent(struct hostent *tgtPtr, char *buf, int buflen)
+CopyHostent(
+ struct hostent *tgtPtr,
+ char *buf,
+ int buflen)
{
char *p = buf;
int copied, len = 0;
@@ -244,7 +254,10 @@ CopyHostent(struct hostent *tgtPtr, char *buf, int buflen)
*/
static int
-CopyPwd(struct passwd *tgtPtr, char *buf, int buflen)
+CopyPwd(
+ struct passwd *tgtPtr,
+ char *buf,
+ int buflen)
{
char *p = buf;
int copied, len = 0;
@@ -305,7 +318,10 @@ CopyPwd(struct passwd *tgtPtr, char *buf, int buflen)
*/
static int
-CopyGrp(struct group *tgtPtr, char *buf, int buflen)
+CopyGrp(
+ struct group *tgtPtr,
+ char *buf,
+ int buflen)
{
register char *p = buf;
register int copied, len = 0;
@@ -363,7 +379,8 @@ CopyGrp(struct group *tgtPtr, char *buf, int buflen)
*/
struct passwd *
-TclpGetPwNam(const char *name)
+TclpGetPwNam(
+ const char *name)
{
#if !defined(TCL_THREADS)
return getpwnam(name);
@@ -415,7 +432,8 @@ TclpGetPwNam(const char *name)
*/
struct passwd *
-TclpGetPwUid(uid_t uid)
+TclpGetPwUid(
+ uid_t uid)
{
#if !defined(TCL_THREADS)
return getpwuid(uid);
@@ -467,7 +485,8 @@ TclpGetPwUid(uid_t uid)
*/
struct group *
-TclpGetGrNam(const char *name)
+TclpGetGrNam(
+ const char *name)
{
#if !defined(TCL_THREADS)
return getgrnam(name);
@@ -519,7 +538,8 @@ TclpGetGrNam(const char *name)
*/
struct group *
-TclpGetGrGid(gid_t gid)
+TclpGetGrGid(
+ gid_t gid)
{
#if !defined(TCL_THREADS)
return getgrgid(gid);
@@ -571,7 +591,8 @@ TclpGetGrGid(gid_t gid)
*/
struct hostent *
-TclpGetHostByName(const char *name)
+TclpGetHostByName(
+ const char *name)
{
#if !defined(TCL_THREADS) || defined(HAVE_MTSAFE_GETHOSTBYNAME)
return gethostbyname(name);
@@ -632,7 +653,10 @@ TclpGetHostByName(const char *name)
*/
struct hostent *
-TclpGetHostByAddr(const char *addr, int length, int type)
+TclpGetHostByAddr(
+ const char *addr,
+ int length,
+ int type)
{
#if !defined(TCL_THREADS) || defined(HAVE_MTSAFE_GETHOSTBYADDR)
return gethostbyaddr(addr, length, type);
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 819fca6..934b8ec 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.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: tclUnixSock.c,v 1.17 2006/09/07 09:17:33 vasiljevic Exp $
+ * RCS: @(#) $Id: tclUnixSock.c,v 1.18 2007/04/16 13:36:36 dkf Exp $
*/
#include "tclInt.h"
@@ -175,7 +175,7 @@ TclpHasSockets(
*/
void
-TclpFinalizeSockets()
+TclpFinalizeSockets(void)
{
return;
}
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index 54b77b7..eb339aa 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.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: tclUnixTest.c,v 1.23 2006/11/13 08:23:12 das Exp $
+ * RCS: @(#) $Id: tclUnixTest.c,v 1.24 2007/04/16 13:36:36 dkf Exp $
*/
#include "tclInt.h"
@@ -698,11 +698,11 @@ TestgotsigCmd(
*/
static int
-TestchmodCmd(dummy, interp, argc, argv)
- ClientData dummy; /* Not used. */
- Tcl_Interp *interp; /* Current interpreter. */
- int argc; /* Number of arguments. */
- CONST char **argv; /* Argument strings. */
+TestchmodCmd(
+ ClientData dummy, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int argc, /* Number of arguments. */
+ CONST char **argv) /* Argument strings. */
{
int i, mode;
char *rest;
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index d73808d..660a831 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.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: tclUnixTime.c,v 1.28 2007/03/19 16:59:09 dgp Exp $
+ * RCS: @(#) $Id: tclUnixTime.c,v 1.29 2007/04/16 13:36:36 dkf Exp $
*/
#include "tclInt.h"
@@ -193,7 +193,8 @@ TclpGetWideClicks(void)
*/
Tcl_WideInt
-TclpWideClicksToNanoseconds(Tcl_WideInt clicks)
+TclpWideClicksToNanoseconds(
+ Tcl_WideInt clicks)
{
Tcl_WideInt nsec;
diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c
index 3a8a749..f21e938 100644
--- a/unix/tclXtNotify.c
+++ b/unix/tclXtNotify.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: tclXtNotify.c,v 1.8 2005/11/02 23:26:50 dkf Exp $
+ * RCS: @(#) $Id: tclXtNotify.c,v 1.9 2007/04/16 13:36:36 dkf Exp $
*/
#include <X11/Intrinsic.h>
@@ -111,8 +111,8 @@ EXTERN XtAppContext TclSetAppContext(XtAppContext ctx);
*/
XtAppContext
-TclSetAppContext(appContext)
- XtAppContext appContext;
+TclSetAppContext(
+ XtAppContext appContext)
{
if (!initialized) {
InitNotifier();
@@ -178,7 +178,7 @@ TclSetAppContext(appContext)
*/
void
-InitNotifier()
+InitNotifier(void)
{
Tcl_NotifierProcs notifier;
@@ -260,8 +260,8 @@ NotifierExitHandler(
*/
static void
-SetTimer(timePtr)
- Tcl_Time *timePtr; /* Timeout value, may be NULL. */
+SetTimer(
+ Tcl_Time *timePtr) /* Timeout value, may be NULL. */
{
long timeout;
@@ -299,9 +299,9 @@ SetTimer(timePtr)
*/
static void
-TimerProc(data, id)
- caddr_t data; /* Not used. */
- XtIntervalId *id;
+TimerProc(
+ caddr_t data, /* Not used. */
+ XtIntervalId *id)
{
if (*id != notifier.currentTimeout) {
return;
@@ -329,15 +329,15 @@ TimerProc(data, id)
*/
static void
-CreateFileHandler(fd, mask, proc, clientData)
- int fd; /* Handle of stream to watch. */
- int mask; /* OR'ed combination of TCL_READABLE,
+CreateFileHandler(
+ int fd, /* Handle of stream to watch. */
+ int mask, /* OR'ed combination of TCL_READABLE,
* TCL_WRITABLE, and TCL_EXCEPTION: indicates
* conditions under which proc should be
* called. */
- Tcl_FileProc *proc; /* Procedure to call for each selected
+ Tcl_FileProc *proc, /* Procedure to call for each selected
* event. */
- ClientData clientData; /* Arbitrary data to pass to proc. */
+ ClientData clientData) /* Arbitrary data to pass to proc. */
{
FileHandler *filePtr;
@@ -421,8 +421,8 @@ CreateFileHandler(fd, mask, proc, clientData)
*/
static void
-DeleteFileHandler(fd)
- int fd; /* Stream id for which to remove callback
+DeleteFileHandler(
+ int fd) /* Stream id for which to remove callback
* procedure. */
{
FileHandler *filePtr, *prevPtr;
@@ -486,10 +486,10 @@ DeleteFileHandler(fd)
*/
static void
-FileProc(clientData, fd, id)
- caddr_t clientData;
- int *fd;
- XtInputId *id;
+FileProc(
+ caddr_t clientData,
+ int *fd,
+ XtInputId *id)
{
FileHandler *filePtr = (FileHandler *)clientData;
FileHandlerEvent *fileEvPtr;
@@ -555,9 +555,9 @@ FileProc(clientData, fd, id)
*/
static int
-FileHandlerEventProc(evPtr, flags)
- Tcl_Event *evPtr; /* Event to service. */
- int flags; /* Flags that indicate what events to handle,
+FileHandlerEventProc(
+ Tcl_Event *evPtr, /* Event to service. */
+ int flags) /* Flags that indicate what events to handle,
* such as TCL_FILE_EVENTS. */
{
FileHandler *filePtr;