summaryrefslogtreecommitdiffstats
path: root/generic/tclIOUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIOUtil.c')
-rw-r--r--generic/tclIOUtil.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 65dca78..1823736 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.9 1999/11/10 02:51:56 hobbs Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.9.6.1 2001/11/28 17:58:37 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -26,6 +26,7 @@
* a linked list is defined.
*/
+#ifndef TCL_NO_FILESYSTEM
typedef struct StatProc {
TclStatProc_ *proc; /* Function to process a 'stat()' call */
struct StatProc *nextPtr; /* The next 'stat()' function to call */
@@ -70,12 +71,17 @@ static AccessProc defaultAccessProc = {
static AccessProc *accessProcList = &defaultAccessProc;
static OpenFileChannelProc defaultOpenFileChannelProc = {
+#ifndef TCL_NO_NONSTDCHAN
&TclpOpenFileChannel, NULL
+#else
+ NULL
+#endif
};
static OpenFileChannelProc *openFileChannelProcList =
&defaultOpenFileChannelProc;
TCL_DECLARE_MUTEX(hookMutex)
+#endif
/*
*---------------------------------------------------------------------------
@@ -270,6 +276,12 @@ TclGetOpenMode(interp, string, seekFlagPtr)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
+#ifndef TCL_NO_NONSTDCHAN
+/* IOS FIXME : in the generic case this functionality can be made
+ * available, it just has to read the file directly instead of using
+ * the channel system. This makes the code platform dependent.
+ */
int
Tcl_EvalFile(interp, fileName)
Tcl_Interp *interp; /* Interpreter in which to process file. */
@@ -342,6 +354,8 @@ Tcl_EvalFile(interp, fileName)
Tcl_DStringFree(&nameString);
return result;
}
+#endif /* TCL_NO_NONSTDCHAN */
+#endif /* TCL_NO_FILESYSTEM */
/*
*----------------------------------------------------------------------
@@ -443,6 +457,7 @@ Tcl_PosixError(interp)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
int
TclStat(path, buf)
CONST char *path; /* Path of file to stat (in current CP). */
@@ -466,6 +481,7 @@ TclStat(path, buf)
return (retVal);
}
+#endif
/*
*----------------------------------------------------------------------
@@ -486,6 +502,7 @@ TclStat(path, buf)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
int
TclAccess(path, mode)
CONST char *path; /* Path of file to access (in current CP). */
@@ -509,6 +526,7 @@ TclAccess(path, mode)
return (retVal);
}
+#endif
/*
*----------------------------------------------------------------------
@@ -530,6 +548,7 @@ TclAccess(path, mode)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
Tcl_Channel
Tcl_OpenFileChannel(interp, fileName, modeString, permissions)
Tcl_Interp *interp; /* Interpreter for error reporting;
@@ -561,6 +580,7 @@ Tcl_OpenFileChannel(interp, fileName, modeString, permissions)
return (retVal);
}
+#endif /* TCL_NO_FILESYSTEM */
/*
*----------------------------------------------------------------------
@@ -584,6 +604,7 @@ Tcl_OpenFileChannel(interp, fileName, modeString, permissions)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
int
TclStatInsertProc (proc)
TclStatProc_ *proc;
@@ -608,6 +629,7 @@ TclStatInsertProc (proc)
return (retVal);
}
+#endif
/*
*----------------------------------------------------------------------
@@ -628,6 +650,7 @@ TclStatInsertProc (proc)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
int
TclStatDeleteProc (proc)
TclStatProc_ *proc;
@@ -664,6 +687,7 @@ TclStatDeleteProc (proc)
Tcl_MutexUnlock(&hookMutex);
return (retVal);
}
+#endif
/*
*----------------------------------------------------------------------
@@ -687,6 +711,7 @@ TclStatDeleteProc (proc)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
int
TclAccessInsertProc(proc)
TclAccessProc_ *proc;
@@ -711,6 +736,7 @@ TclAccessInsertProc(proc)
return (retVal);
}
+#endif
/*
*----------------------------------------------------------------------
@@ -731,6 +757,7 @@ TclAccessInsertProc(proc)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
int
TclAccessDeleteProc(proc)
TclAccessProc_ *proc;
@@ -767,6 +794,7 @@ TclAccessDeleteProc(proc)
return (retVal);
}
+#endif
/*
*----------------------------------------------------------------------
@@ -791,6 +819,7 @@ TclAccessDeleteProc(proc)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
int
TclOpenFileChannelInsertProc(proc)
TclOpenFileChannelProc_ *proc;
@@ -816,6 +845,7 @@ TclOpenFileChannelInsertProc(proc)
return (retVal);
}
+#endif
/*
*----------------------------------------------------------------------
@@ -836,6 +866,7 @@ TclOpenFileChannelInsertProc(proc)
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_FILESYSTEM
int
TclOpenFileChannelDeleteProc(proc)
TclOpenFileChannelProc_ *proc;
@@ -874,3 +905,4 @@ TclOpenFileChannelDeleteProc(proc)
return (retVal);
}
+#endif