summaryrefslogtreecommitdiffstats
path: root/generic/tclPipe.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-01-25 20:40:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-01-25 20:40:54 (GMT)
commit7bb89f954aeb2e32b07d01513217ab6930f80ccf (patch)
tree90cd60706107518bc582921a1eb262224b8dac22 /generic/tclPipe.c
parente987f887ebf5997e0c4461c254ec85e39a7b0b46 (diff)
downloadtcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.zip
tcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.tar.gz
tcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.tar.bz2
* Updated interfaces of generic/tclEncoding, generic/tclFilename.c,
generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
Diffstat (limited to 'generic/tclPipe.c')
-rw-r--r--generic/tclPipe.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 931f2a7..dcfabdf 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.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: tclPipe.c,v 1.4 2002/01/15 21:19:07 dgp Exp $
+ * RCS: @(#) $Id: tclPipe.c,v 1.5 2002/01/25 20:40:55 dgp Exp $
*/
#include "tclInt.h"
@@ -39,8 +39,9 @@ TCL_DECLARE_MUTEX(pipeMutex) /* Guard access to detList. */
*/
static TclFile FileForRedirect _ANSI_ARGS_((Tcl_Interp *interp,
- char *spec, int atOk, char *arg, char *nextArg,
- int flags, int *skipPtr, int *closePtr, int *releasePtr));
+ CONST char *spec, int atOk, CONST char *arg,
+ CONST char *nextArg, int flags, int *skipPtr,
+ int *closePtr, int *releasePtr));
/*
*----------------------------------------------------------------------
@@ -67,14 +68,14 @@ static TclFile
FileForRedirect(interp, spec, atOK, arg, nextArg, flags, skipPtr, closePtr,
releasePtr)
Tcl_Interp *interp; /* Intepreter to use for error reporting. */
- char *spec; /* Points to character just after
+ CONST char *spec; /* Points to character just after
* redirection character. */
- char *arg; /* Pointer to entire argument containing
+ CONST char *arg; /* Pointer to entire argument containing
* spec: used for error reporting. */
int atOK; /* Non-zero means that '@' notation can be
* used to specify a channel, zero means that
* it isn't. */
- char *nextArg; /* Next argument in argc/argv array, if needed
+ CONST char *nextArg; /* Next argument in argc/argv array, if needed
* for file name or channel name. May be
* NULL. */
int flags; /* Flags to use for opening file or to
@@ -123,7 +124,7 @@ FileForRedirect(interp, spec, atOK, arg, nextArg, flags, skipPtr, closePtr,
Tcl_Flush(chan);
}
} else {
- char *name;
+ CONST char *name;
Tcl_DString nameString;
if (*spec == '\0') {
@@ -439,7 +440,7 @@ TclCreatePipeline(interp, argc, argv, pidArrayPtr, inPipePtr,
outPipePtr, errFilePtr)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
int argc; /* Number of entries in argv. */
- char **argv; /* Array of strings describing commands in
+ CONST char **argv; /* Array of strings describing commands in
* pipeline plus I/O redirection with <,
* <<, >, etc. Argv[argc] must be NULL. */
Tcl_Pid **pidArrayPtr; /* Word at *pidArrayPtr gets filled in with
@@ -476,7 +477,7 @@ TclCreatePipeline(interp, argc, argv, pidArrayPtr, inPipePtr,
* at *pidPtr right now. */
int cmdCount; /* Count of number of distinct commands
* found in argc/argv. */
- char *inputLiteral = NULL; /* If non-null, then this points to a
+ CONST char *inputLiteral = NULL; /* If non-null, then this points to a
* string containing input data (specified
* via <<) to be piped to the first process
* in the pipeline. */
@@ -498,7 +499,7 @@ TclCreatePipeline(interp, argc, argv, pidArrayPtr, inPipePtr,
int errorClose = 0; /* If non-zero, then errorFile should be
* closed when cleaning up. */
int errorRelease = 0;
- char *p;
+ CONST char *p;
int skip, lastBar, lastArg, i, j, atOK, flags, errorToOutput;
Tcl_DString execBuffer;
TclFile pipeIn;
@@ -802,7 +803,7 @@ TclCreatePipeline(interp, argc, argv, pidArrayPtr, inPipePtr,
for (i = 0; i < argc; i = lastArg + 1) {
int result, joinThisError;
Tcl_Pid pid;
- char *oldName;
+ CONST char *oldName;
/*
* Convert the program name into native form.
@@ -992,7 +993,7 @@ Tcl_OpenCommandChannel(interp, argc, argv, flags)
Tcl_Interp *interp; /* Interpreter for error reporting. Can
* NOT be NULL. */
int argc; /* How many arguments. */
- char **argv; /* Array of arguments for command pipe. */
+ CONST char **argv; /* Array of arguments for command pipe. */
int flags; /* Or'ed combination of TCL_STDIN, TCL_STDOUT,
* TCL_STDERR, and TCL_ENFORCE_MODE. */
{