summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-11-04 00:06:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-11-04 00:06:49 (GMT)
commit1917d75e5fe50a58035bc8a2a47fdca8338ec9d7 (patch)
tree86211e81a05bc3c61493644f91017b9b65f71771 /macosx
parent169a78358af41a6e77a814a0a73f663542c51a6f (diff)
downloadtcl-1917d75e5fe50a58035bc8a2a47fdca8338ec9d7.zip
tcl-1917d75e5fe50a58035bc8a2a47fdca8338ec9d7.tar.gz
tcl-1917d75e5fe50a58035bc8a2a47fdca8338ec9d7.tar.bz2
ANSIfy
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tclMacOSXBundle.c4
-rw-r--r--macosx/tclMacOSXFCmd.c68
-rw-r--r--macosx/tclMacOSXNotify.c48
3 files changed, 56 insertions, 64 deletions
diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c
index 4b735b7..59cead9 100644
--- a/macosx/tclMacOSXBundle.c
+++ b/macosx/tclMacOSXBundle.c
@@ -169,7 +169,7 @@ Tcl_MacOSXOpenVersionedBundleResources(
bundleRef = versionedBundleRef;
}
- if (bundleRef) {
+ if (bundleRef) {
if (hasResourceFile) {
/*
* Dynamically acquire address for CFBundleOpenBundleResourceMap
@@ -214,7 +214,7 @@ Tcl_MacOSXOpenVersionedBundleResources(
CFRelease(libURL);
}
}
-
+
if (libraryPath[0]) {
return TCL_OK;
} else {
diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c
index 738839d..aab5b44 100644
--- a/macosx/tclMacOSXFCmd.c
+++ b/macosx/tclMacOSXFCmd.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: tclMacOSXFCmd.c,v 1.4 2005/07/25 20:48:34 dkf Exp $
+ * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.5 2005/11/04 00:06:49 dkf Exp $
*/
#include "tclInt.h"
@@ -82,11 +82,11 @@ typedef struct fileinfobuf {
*/
int
-TclMacOSXGetFileAttribute(interp, objIndex, fileName, attributePtrPtr)
- Tcl_Interp *interp; /* The interp we are using for errors. */
- int objIndex; /* The index of the attribute. */
- Tcl_Obj *fileName; /* The name of the file (UTF-8). */
- Tcl_Obj **attributePtrPtr; /* A pointer to return the object with. */
+TclMacOSXGetFileAttribute(
+ Tcl_Interp *interp, /* The interp we are using for errors. */
+ int objIndex, /* The index of the attribute. */
+ Tcl_Obj *fileName, /* The name of the file (UTF-8). */
+ Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
#ifdef HAVE_GETATTRLIST
int result;
@@ -99,8 +99,7 @@ TclMacOSXGetFileAttribute(interp, objIndex, fileName, attributePtrPtr)
if (result != 0) {
Tcl_AppendResult(interp, "could not read \"",
- Tcl_GetString(fileName), "\": ",
- Tcl_PosixError(interp), (char *) NULL);
+ TclGetString(fileName), "\": ", Tcl_PosixError(interp), NULL);
return TCL_ERROR;
}
@@ -111,7 +110,7 @@ TclMacOSXGetFileAttribute(interp, objIndex, fileName, attributePtrPtr)
errno = EISDIR;
Tcl_AppendResult(interp, "invalid attribute: ",
- Tcl_PosixError(interp), (char *) NULL);
+ Tcl_PosixError(interp), NULL);
return TCL_ERROR;
}
@@ -127,8 +126,7 @@ TclMacOSXGetFileAttribute(interp, objIndex, fileName, attributePtrPtr)
if (result != 0) {
Tcl_AppendResult(interp, "could not read attributes of \"",
- Tcl_GetString(fileName), "\": ",
- Tcl_PosixError(interp), (char *) NULL);
+ TclGetString(fileName), "\": ", Tcl_PosixError(interp), NULL);
return TCL_ERROR;
}
@@ -149,8 +147,7 @@ TclMacOSXGetFileAttribute(interp, objIndex, fileName, attributePtrPtr)
}
return TCL_OK;
#else
- Tcl_AppendResult(interp, "Mac OS X file attributes not supported",
- (char *) NULL);
+ Tcl_AppendResult(interp, "Mac OS X file attributes not supported", NULL);
return TCL_ERROR;
#endif
}
@@ -173,11 +170,11 @@ TclMacOSXGetFileAttribute(interp, objIndex, fileName, attributePtrPtr)
*/
int
-TclMacOSXSetFileAttribute(interp, objIndex, fileName, attributePtr)
- Tcl_Interp *interp; /* The interp for error reporting. */
- int objIndex; /* The index of the attribute. */
- Tcl_Obj *fileName; /* The name of the file (UTF-8). */
- Tcl_Obj *attributePtr; /* New owner for file. */
+TclMacOSXSetFileAttribute(
+ Tcl_Interp *interp, /* The interp for error reporting. */
+ int objIndex, /* The index of the attribute. */
+ Tcl_Obj *fileName, /* The name of the file (UTF-8). */
+ Tcl_Obj *attributePtr) /* New owner for file. */
{
#ifdef HAVE_GETATTRLIST
int result;
@@ -190,8 +187,7 @@ TclMacOSXSetFileAttribute(interp, objIndex, fileName, attributePtr)
if (result != 0) {
Tcl_AppendResult(interp, "could not read \"",
- Tcl_GetString(fileName), "\": ",
- Tcl_PosixError(interp), (char *) NULL);
+ TclGetString(fileName), "\": ", Tcl_PosixError(interp), NULL);
return TCL_ERROR;
}
@@ -202,7 +198,7 @@ TclMacOSXSetFileAttribute(interp, objIndex, fileName, attributePtr)
errno = EISDIR;
Tcl_AppendResult(interp, "invalid attribute: ",
- Tcl_PosixError(interp), (char *) NULL);
+ Tcl_PosixError(interp), NULL);
return TCL_ERROR;
}
@@ -218,8 +214,7 @@ TclMacOSXSetFileAttribute(interp, objIndex, fileName, attributePtr)
if (result != 0) {
Tcl_AppendResult(interp, "could not read attributes of \"",
- Tcl_GetString(fileName), "\": ",
- Tcl_PosixError(interp), (char *) NULL);
+ TclGetString(fileName), "\": ", Tcl_PosixError(interp), NULL);
return TCL_ERROR;
}
@@ -257,8 +252,8 @@ TclMacOSXSetFileAttribute(interp, objIndex, fileName, attributePtr)
if (result != 0) {
Tcl_AppendResult(interp, "could not set attributes of \"",
- Tcl_GetString(fileName), "\": ",
- Tcl_PosixError(interp), (char *) NULL);
+ TclGetString(fileName), "\": ",
+ Tcl_PosixError(interp), NULL);
return TCL_ERROR;
}
} else {
@@ -279,8 +274,7 @@ TclMacOSXSetFileAttribute(interp, objIndex, fileName, attributePtr)
if(newRsrcForkSize != 0) {
Tcl_AppendResult(interp,
- "setting nonzero rsrclength not supported",
- (char *) NULL);
+ "setting nonzero rsrclength not supported", NULL);
return TCL_ERROR;
}
@@ -299,16 +293,15 @@ TclMacOSXSetFileAttribute(interp, objIndex, fileName, attributePtr)
if (result != 0) {
Tcl_AppendResult(interp,
"could not truncate resource fork of \"",
- Tcl_GetString(fileName), "\": ",
- Tcl_PosixError(interp), (char *) NULL);
+ TclGetString(fileName), "\": ",
+ Tcl_PosixError(interp), NULL);
return TCL_ERROR;
}
}
}
return TCL_OK;
#else
- Tcl_AppendResult(interp, "Mac OS X file attributes not supported",
- (char *) NULL);
+ Tcl_AppendResult(interp, "Mac OS X file attributes not supported", NULL);
return TCL_ERROR;
#endif
}
@@ -332,10 +325,10 @@ TclMacOSXSetFileAttribute(interp, objIndex, fileName, attributePtr)
*/
int
-TclMacOSXCopyFileAttributes(src, dst, statBufPtr)
- CONST char *src; /* Path name of source file (native). */
- CONST char *dst; /* Path name of target file (native). */
- CONST Tcl_StatBuf *statBufPtr;
+TclMacOSXCopyFileAttributes(
+ CONST char *src, /* Path name of source file (native). */
+ CONST char *dst, /* Path name of target file (native). */
+ CONST Tcl_StatBuf *statBufPtr)
/* Stat info for source file */
{
#ifdef HAVE_GETATTRLIST
@@ -430,9 +423,8 @@ Tcl_GetOSTypeFromObj(
Tcl_UtfToExternalDString(encoding, string, length, &ds);
if (Tcl_DStringLength(&ds) > sizeof(OSType)) {
- Tcl_AppendResult(interp,
- "expected Macintosh OS type but got \"",
- string, "\": ", (char *) NULL);
+ Tcl_AppendResult(interp, "expected Macintosh OS type but got \"",
+ string, "\": ", NULL);
result = TCL_ERROR;
} else {
memset(osTypePtr, 0, sizeof(OSType));
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index 6c46562..67a1a78 100644
--- a/macosx/tclMacOSXNotify.c
+++ b/macosx/tclMacOSXNotify.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: tclMacOSXNotify.c,v 1.4 2005/07/25 20:48:34 dkf Exp $
+ * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.5 2005/11/04 00:06:49 dkf Exp $
*/
#ifdef HAVE_COREFOUNDATION /* Traditional unix select-based notifier is
@@ -233,7 +233,7 @@ static int FileHandlerEventProc(Tcl_Event *evPtr, int flags);
*/
ClientData
-Tcl_InitNotifier()
+Tcl_InitNotifier(void)
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -322,8 +322,8 @@ Tcl_InitNotifier()
*/
void
-Tcl_FinalizeNotifier(clientData)
- ClientData clientData; /* Not used. */
+Tcl_FinalizeNotifier(
+ ClientData clientData) /* Not used. */
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -401,8 +401,8 @@ Tcl_FinalizeNotifier(clientData)
*/
void
-Tcl_AlertNotifier(clientData)
- ClientData clientData;
+Tcl_AlertNotifier(
+ ClientData clientData)
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData;
@@ -434,8 +434,8 @@ Tcl_AlertNotifier(clientData)
*/
void
-Tcl_SetTimer(timePtr)
- Tcl_Time *timePtr; /* Timeout value, may be NULL. */
+Tcl_SetTimer(
+ Tcl_Time *timePtr) /* Timeout value, may be NULL. */
{
/*
* The interval timer doesn't do anything in this implementation, because
@@ -465,8 +465,8 @@ Tcl_SetTimer(timePtr)
*/
void
-Tcl_ServiceModeHook(mode)
- int mode; /* Either TCL_SERVICE_ALL, or
+Tcl_ServiceModeHook(
+ int mode) /* Either TCL_SERVICE_ALL, or
* TCL_SERVICE_NONE. */
{
}
@@ -488,15 +488,15 @@ Tcl_ServiceModeHook(mode)
*/
void
-Tcl_CreateFileHandler(fd, mask, proc, clientData)
- int fd; /* Handle of stream to watch. */
- int mask; /* OR'ed combination of TCL_READABLE,
+Tcl_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; /* Function to call for each
+ Tcl_FileProc *proc, /* Function to call for each
* selected event. */
- ClientData clientData; /* Arbitrary data to pass to proc. */
+ ClientData clientData) /* Arbitrary data to pass to proc. */
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
FileHandler *filePtr;
@@ -565,8 +565,8 @@ Tcl_CreateFileHandler(fd, mask, proc, clientData)
*/
void
-Tcl_DeleteFileHandler(fd)
- int fd; /* Stream id for which to remove callback
+Tcl_DeleteFileHandler(
+ int fd) /* Stream id for which to remove callback
* function. */
{
FileHandler *filePtr, *prevPtr;
@@ -658,9 +658,9 @@ Tcl_DeleteFileHandler(fd)
*/
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. */
{
int mask;
@@ -727,8 +727,8 @@ FileHandlerEventProc(evPtr, flags)
*/
int
-Tcl_WaitForEvent(timePtr)
- Tcl_Time *timePtr; /* Maximum block time, or NULL. */
+Tcl_WaitForEvent(
+ Tcl_Time *timePtr) /* Maximum block time, or NULL. */
{
FileHandler *filePtr;
FileHandlerEvent *fileEvPtr;
@@ -906,8 +906,8 @@ Tcl_WaitForEvent(timePtr)
*/
static void
-NotifierThreadProc(clientData)
- ClientData clientData; /* Not used. */
+NotifierThreadProc(
+ ClientData clientData) /* Not used. */
{
ThreadSpecificData *tsdPtr;
fd_set readableMask;