summaryrefslogtreecommitdiffstats
path: root/mac
diff options
context:
space:
mode:
Diffstat (limited to 'mac')
-rw-r--r--mac/tclMac.h67
-rw-r--r--mac/tclMacChan.c31
-rw-r--r--mac/tclMacFile.c2
-rw-r--r--mac/tclMacInt.h30
-rw-r--r--mac/tclMacPort.h28
-rw-r--r--mac/tclMacTime.c5
6 files changed, 39 insertions, 124 deletions
diff --git a/mac/tclMac.h b/mac/tclMac.h
index 593232b..a051cc8 100644
--- a/mac/tclMac.h
+++ b/mac/tclMac.h
@@ -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: tclMac.h,v 1.3 1998/11/10 06:49:22 jingham Exp $
+ * RCS: @(#) $Id: tclMac.h,v 1.4 1999/03/10 05:52:51 stanton Exp $
*/
#ifndef _TCLMAC
@@ -31,70 +31,7 @@
typedef int (*Tcl_MacConvertEventPtr) _ANSI_ARGS_((EventRecord *eventPtr));
-/*
- * This is needed by the shells to handle Macintosh events.
- */
-
-EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr));
-
-/*
- * These routines are useful for handling using scripts from resources
- * in the application shell
- */
-
-EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_((Handle resource));
-EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp *interp,
- char *resourceName, int resourceNumber, char *fileName));
-EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp *interp,
- long resourceType, char *resourceName,
- int resourceNumber, char *resFileRef, int * releaseIt));
-
-/* These routines support the new OSType object type (i.e. the packed 4
- * character type and creator codes).
- */
-
-EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_((Tcl_Interp *interp,
- Tcl_Obj *objPtr, OSType *osTypePtr));
-EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj *objPtr,
- OSType osType));
-EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
-
-
-
-/*
- * The following routines are utility functions in Tcl. They are exported
- * here because they are needed in Tk. They are not officially supported,
- * however. The first set are from the MoreFiles package.
- */
-
-EXTERN pascal OSErr FSpGetDirectoryID(const FSSpec *spec,
- long *theDirID, Boolean *isDirectory);
-EXTERN pascal short FSpOpenResFileCompat(const FSSpec *spec,
- SignedByte permission);
-EXTERN pascal void FSpCreateResFileCompat(const FSSpec *spec,
- OSType creator, OSType fileType,
- ScriptCode scriptTag);
-/*
- * Like the MoreFiles routines these fix problems in the standard
- * Mac calls. These routines is from tclMacUtils.h.
- */
-
-EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length, CONST char *path,
- FSSpecPtr theSpec));
-EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec,
- int *length, Handle *fullPath));
-
-/*
- * These are not in MSL 2.1.2, so we need to export them from the
- * Tcl shared library. They are found in the compat directory
- * except the panic routine which is found in tclMacPanic.h.
- */
-
-EXTERN int strncasecmp _ANSI_ARGS_((CONST char *s1,
- CONST char *s2, size_t n));
-EXTERN int strcasecmp _ANSI_ARGS_((CONST char *s1,
- CONST char *s2));
-EXTERN void panic _ANSI_ARGS_(TCL_VARARGS(char *,format));
+#include "tclPlatDecls.h"
#pragma export reset
diff --git a/mac/tclMacChan.c b/mac/tclMacChan.c
index 781ee64..38be0a4 100644
--- a/mac/tclMacChan.c
+++ b/mac/tclMacChan.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: tclMacChan.c,v 1.3 1998/09/14 18:40:04 stanton Exp $
+ * RCS: @(#) $Id: tclMacChan.c,v 1.4 1999/03/10 05:52:51 stanton Exp $
*/
#include "tclInt.h"
@@ -921,6 +921,35 @@ OpenFileChannel(
/*
*----------------------------------------------------------------------
*
+ * Tcl_MakeFileChannel --
+ *
+ * Makes a Tcl_Channel from an existing OS level file handle.
+ *
+ * Results:
+ * The Tcl_Channel created around the preexisting OS level file handle.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Channel
+Tcl_MakeFileChannel(handle, mode)
+ ClientData handle; /* OS level handle. */
+ int mode; /* ORed combination of TCL_READABLE and
+ * TCL_WRITABLE to indicate file mode. */
+{
+ /*
+ * Not implemented yet.
+ */
+
+ return NULL;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* FileBlockMode --
*
* Set blocking or non-blocking mode on channel. Macintosh files
diff --git a/mac/tclMacFile.c b/mac/tclMacFile.c
index 4de2267..2fc697e 100644
--- a/mac/tclMacFile.c
+++ b/mac/tclMacFile.c
@@ -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: tclMacFile.c,v 1.4 1998/09/14 18:40:05 stanton Exp $
+ * RCS: @(#) $Id: tclMacFile.c,v 1.5 1999/03/10 05:52:51 stanton Exp $
*/
/*
diff --git a/mac/tclMacInt.h b/mac/tclMacInt.h
index a6ceda0..494cf8b 100644
--- a/mac/tclMacInt.h
+++ b/mac/tclMacInt.h
@@ -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: tclMacInt.h,v 1.2 1998/09/14 18:40:05 stanton Exp $
+ * RCS: @(#) $Id: tclMacInt.h,v 1.3 1999/03/10 05:52:51 stanton Exp $
*/
#ifndef _TCLMACINT
@@ -46,34 +46,8 @@
*/
typedef pascal void (*ExitToShellProcPtr)(void);
-/*
- * Prototypes for functions found in the tclMacUtil.c compatability library.
- */
-
-EXTERN int FSpGetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
-EXTERN int FSpSetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
-EXTERN OSErr FSpFindFolder _ANSI_ARGS_((short vRefNum, OSType folderType,
- Boolean createFolder, FSSpec *spec));
-EXTERN void GetGlobalMouse _ANSI_ARGS_((Point *mouse));
-
-/*
- * Prototypes of Mac only internal functions.
- */
+#include "tclIntPlatDecls.h"
-EXTERN void TclCreateMacEventSource _ANSI_ARGS_((void));
-EXTERN int TclMacConsoleInit _ANSI_ARGS_((void));
-EXTERN void TclMacExitHandler _ANSI_ARGS_((void));
-EXTERN void TclMacInitExitToShell _ANSI_ARGS_((int usePatch));
-EXTERN OSErr TclMacInstallExitToShellPatch _ANSI_ARGS_((
- ExitToShellProcPtr newProc));
-EXTERN int TclMacOSErrorToPosixError _ANSI_ARGS_((int error));
-EXTERN void TclMacRemoveTimer _ANSI_ARGS_((void *timerToken));
-EXTERN void * TclMacStartTimer _ANSI_ARGS_((long ms));
-EXTERN int TclMacTimerExpired _ANSI_ARGS_((void *timerToken));
-EXTERN int TclMacRegisterResourceFork _ANSI_ARGS_((short fileRef, Tcl_Obj *tokenPtr,
- int insert));
-EXTERN short TclMacUnRegisterResourceFork _ANSI_ARGS_((char *tokenPtr, Tcl_Obj *resultPtr));
-
#pragma export reset
#endif /* _TCLMACINT */
diff --git a/mac/tclMacPort.h b/mac/tclMacPort.h
index abf1d6c..cd269a9 100644
--- a/mac/tclMacPort.h
+++ b/mac/tclMacPort.h
@@ -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: tclMacPort.h,v 1.5 1998/09/14 18:40:06 stanton Exp $
+ * RCS: @(#) $Id: tclMacPort.h,v 1.6 1999/03/10 05:52:51 stanton Exp $
*/
#ifndef _MACPORT
@@ -182,20 +182,9 @@ extern char **environ;
* Prototypes needed for compatability
*/
-EXTERN int TclMacCreateEnv _ANSI_ARGS_((void));
EXTERN int strncasecmp _ANSI_ARGS_((CONST char *s1,
CONST char *s2, size_t n));
-/*
- * The following declarations belong in tclInt.h, but depend on platform
- * specific types (e.g. struct tm).
- */
-
-EXTERN struct tm * TclpGetDate _ANSI_ARGS_((const time_t *tp,
- int useGMT));
-EXTERN size_t TclStrftime _ANSI_ARGS_((char *s, size_t maxsize,
- const char *format, const struct tm *t));
-
#define tzset()
#define TclpGetPid(pid) ((unsigned long) (pid))
@@ -206,14 +195,10 @@ EXTERN size_t TclStrftime _ANSI_ARGS_((char *s, size_t maxsize,
*/
#define lstat(path, bufPtr) TclStat(path, bufPtr)
-EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((const char *path,
- const char *mode));
#define fopen(path, mode) TclMacFOpenHack(path, mode)
-EXTERN int TclMacReadlink _ANSI_ARGS_((char *path, char *buf, int size));
#define readlink(fileName, buffer, size) TclMacReadlink(fileName, buffer, size)
#ifdef TCL_TEST
#define chmod(path, mode) TclMacChmod(path, mode)
-EXTERN int TclMacChmod(char *path, int mode);
#endif
/*
@@ -254,15 +239,4 @@ void TclUnsetEnv(CONST char *name);
#define TclpFinalize()
-/*
- * The following define should really be in tclInt.h, but tclInt.h does
- * not include tclPort.h, which includes the "struct stat" definition.
- */
-
-EXTERN int TclpSameFile _ANSI_ARGS_((char *file1, char *file2,
- struct stat *sourceStatBufPtr,
- struct stat *destStatBufPtr)) ;
-EXTERN int TclpStat _ANSI_ARGS_ ((CONST char *path, struct stat *buf));
-EXTERN int TclpAccess _ANSI_ARGS_ ((CONST char *path, int mode));
-
#endif /* _MACPORT */
diff --git a/mac/tclMacTime.c b/mac/tclMacTime.c
index 79633de..1a2d1ed 100644
--- a/mac/tclMacTime.c
+++ b/mac/tclMacTime.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: tclMacTime.c,v 1.2 1998/09/14 18:40:07 stanton Exp $
+ * RCS: @(#) $Id: tclMacTime.c,v 1.3 1999/03/10 05:52:51 stanton Exp $
*/
#include "tclInt.h"
@@ -241,9 +241,10 @@ TclpGetTime(
struct tm *
TclpGetDate(
- const time_t *tp, /* Time struct to fill. */
+ TclpTime_t time, /* Time struct to fill. */
int useGMT) /* True if date should reflect GNT time. */
{
+ const time_t *tp = (const time_t *)time;
DateTimeRec dtr;
MachineLocation loc;
long int offset;