summaryrefslogtreecommitdiffstats
path: root/src/H5MMpublic.h
Commit message (Expand)AuthorAgeFilesLines
* [svn-r6546] Purpose:Bill Wendling2003-03-311-4/+14
* [svn-r3781] Purpose:Bill Wendling2001-04-051-3/+3
* [svn-r1418] Modified H5Tconvert to require a dataset transfer property li...Quincey Koziol1999-07-031-0/+4
* [svn-r164] Changes since 19980122Robb Matzke1998-01-221-3/+2
* [svn-r157] Reformatted code with indent...Quincey Koziol1998-01-161-9/+9
* [svn-r35] ./src/H5ACproto.hRobb Matzke1997-08-151-0/+32
lue='bug_b9b2079e6d'>bug_b9b2079e6d Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-10 09:31:57 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-10 09:31:57 (GMT)
commit56053d42643a128b68bddd9b6a830193c4f2b58f (patch)
treeb74fbaf07478b3a916755023109d8257208cc5f0
parent3c366594b5f7da92e751946d7f68850a7e4afa43 (diff)
downloadtcl-56053d42643a128b68bddd9b6a830193c4f2b58f.zip
tcl-56053d42643a128b68bddd9b6a830193c4f2b58f.tar.gz
tcl-56053d42643a128b68bddd9b6a830193c4f2b58f.tar.bz2
MINOR: Formatting fixes, mainly to comments, so code better fits the style in
the Engineering Manual.
Diffstat
-rw-r--r--ChangeLog11
-rw-r--r--generic/tclAlloc.c4
-rw-r--r--generic/tclCmdMZ.c3
-rw-r--r--generic/tclCompExpr.c6
-rw-r--r--generic/tclCompile.c6
-rw-r--r--generic/tclEnv.c4
-rw-r--r--generic/tclEvent.c1
-rw-r--r--generic/tclIO.c5
-rw-r--r--generic/tclIOCmd.c141
-rw-r--r--generic/tclIORChan.c2
-rw-r--r--generic/tclIORTrans.c2
-rw-r--r--generic/tclLiteral.c3
-rw-r--r--generic/tclNotify.c1
-rw-r--r--generic/tclParse.c16
-rw-r--r--generic/tclStringObj.c209
-rw-r--r--generic/tclUtil.c1
-rw-r--r--generic/tclZlib.c48
-rw-r--r--unix/tclUnixFCmd.c38
-rw-r--r--unix/tclUnixNotfy.c135
-rw-r--r--unix/tclUnixPort.h454
-rw-r--r--unix/tclXtNotify.c4
21 files changed, 648 insertions, 446 deletions
diff --git a/ChangeLog b/ChangeLog
index e2b7c37..9619fd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-03-10 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tclAlloc.c, generic/tclCmdMZ.c, generic/tclCompExpr.c:
+ * generic/tclCompile.c, generic/tclEnv.c, generic/tclEvent.c:
+ * generic/tclIO.c, generic/tclIOCmd.c, generic/tclIORChan.c:
+ * generic/tclIORTrans.c, generic/tclLiteral.c, generic/tclNotify.c:
+ * generic/tclParse.c, generic/tclStringObj.c, generic/tclUtil.c:
+ * generic/tclZlib.c, unix/tclUnixFCmd.c, unix/tclUnixNotfy.c:
+ * unix/tclUnixPort.h, unix/tclXtNotify.c: Formatting fixes, mainly to
+ comments, so code better fits the style in the Engineering Manual.
+
2011-03-09 Donal K. Fellows <dkf@users.sf.net>
* tests/incr.test: Update more of the test suite to use Tcltest 2.
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index 51f99e7..6fff92b 100644
--- a/generic/tclAlloc.c
+++ b/generic/tclAlloc.c
@@ -702,7 +702,7 @@ char *
TclpAlloc(
unsigned int numBytes) /* Number of bytes to allocate. */
{
- return (char*) malloc(numBytes);
+ return (char *) malloc(numBytes);
}
/*
@@ -750,7 +750,7 @@ TclpRealloc(
char *oldPtr, /* Pointer to alloced block. */
unsigned int numBytes) /* New size of memory. */
{
- return (char*) realloc(oldPtr, numBytes);
+ return (char *) realloc(oldPtr, numBytes);
}
#endif /* !USE_TCLALLOC */
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index cf375b4e..26831c3 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -3923,6 +3923,7 @@ TclNRSwitchObjCmd(
INT2PTR(pc), (ClientData) pattern);
return TclNREvalObjEx(interp, objv[j], 0, ctxPtr, splitObjs ? j : bidx+j);
}
+
static int
SwitchPostProc(
ClientData data[], /* Data passed from Tcl_NRAddCallback above */
@@ -4772,7 +4773,7 @@ TclListLines(
int i, length = strlen(listStr);
const char *element = NULL, *next = NULL;
ContLineLoc *clLocPtr = TclContinuationsGet(listObj);
- int *clNext= (clLocPtr ? &clLocPtr->loc[0] : NULL);
+ int *clNext = (clLocPtr ? &clLocPtr->loc[0] : NULL);
for (i = 0; i < n; i++) {
TclFindElement(NULL, listStr, length, &element, &next, NULL, NULL);
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 1d42b81..34deff7 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -1333,13 +1333,12 @@ ParseExpr(
numBytes -= scanned;
} /* main parsing loop */
- error:
-
/*
* We only get here if there's been an error. Any errors that didn't get a
* suitable parsePtr->errorType, get recorded as syntax errors.
*/
+ error:
if (parsePtr->errorType == TCL_PARSE_SUCCESS) {
parsePtr->errorType = TCL_PARSE_SYNTAX;
}
@@ -1349,7 +1348,7 @@ ParseExpr(
*/
if (nodes != NULL) {
- ckfree((char*) nodes);
+ ckfree((char *) nodes);
}
if (interp == NULL) {
@@ -1361,7 +1360,6 @@ ParseExpr(
Tcl_DecrRefCount(msg);
}
} else {
-
/*
* Construct the complete error message. Start with the simple error
* message, pulled from the interp result if necessary...
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 9dcafb4..4f04403 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1765,6 +1765,7 @@ TclCompileScript(
* unmodified. We care only if the we are in a context
* which already allows absolute counting.
*/
+
objIndex = TclRegisterNewLiteral(envPtr,
tokenPtr[1].start, tokenPtr[1].size);
@@ -1813,7 +1814,6 @@ TclCompileScript(
&isnew);
Tcl_SetHashValue(hePtr, INT2PTR(wlineat));
-
if (wordIdx <= 255) {
TclEmitInstInt1(INST_INVOKE_STK1, wordIdx, envPtr);
} else {
@@ -2661,7 +2661,7 @@ TclExpandCodeArray(
*/
size_t currBytes = envPtr->codeNext - envPtr->codeStart;
- size_t newBytes = 2*(envPtr->codeEnd - envPtr->codeStart);
+ size_t newBytes = 2 * (envPtr->codeEnd - envPtr->codeStart);
if (envPtr->mallocedCodeArray) {
envPtr->codeStart = (unsigned char *)
@@ -2728,7 +2728,7 @@ EnterCmdStartData(
*/
size_t currElems = envPtr->cmdMapEnd;
- size_t newElems = 2*currElems;
+ size_t newElems = 2 * currElems;
size_t currBytes = currElems * sizeof(CmdLocation);
size_t newBytes = newElems * sizeof(CmdLocation);
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index bd710d6..4a52bea 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -649,8 +649,8 @@ ReplaceString(
env.cache = (char **) ckrealloc((char *) env.cache,
(env.cacheSize + growth) * sizeof(char *));
env.cache[env.cacheSize] = newStr;
- (void) memset(env.cache+env.cacheSize+1, (int) 0,
- (size_t) (growth-1) * sizeof(char*));
+ (void) memset(env.cache+env.cacheSize+1, 0,
+ (size_t) (growth-1) * sizeof(char *));
env.cacheSize += growth;
}
}
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index b4b5299..ad20626 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -119,7 +119,6 @@ static char * VwaitVarProc(ClientData clientData,
Tcl_Interp *interp, const char *name1,
const char *name2, int flags);
static void InvokeExitHandlers(void);
-
/*
*----------------------------------------------------------------------
diff --git a/generic/tclIO.c b/generic/tclIO.c
index d0ebe21..7abbba4 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -3292,10 +3292,11 @@ CloseWrite(
* interpreter */
{
/* Notes: clear-channel-handlers - write side only ? or keep around, just
- * not called */
+ * not called. */
/* No close cllbacks are run - channel is still open (read side) */
- ChannelState *statePtr = chanPtr->state; /* State of real IO channel */
+ ChannelState *statePtr = chanPtr->state;
+ /* State of real IO channel. */
int flushcode;
int result = 0;
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index c889862..abbe002 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -16,8 +16,8 @@
*/
typedef struct AcceptCallback {
- char *script; /* Script to invoke. */
- Tcl_Interp *interp; /* Interpreter in which to run it. */
+ char *script; /* Script to invoke. */
+ Tcl_Interp *interp; /* Interpreter in which to run it. */
} AcceptCallback;
/*
@@ -117,12 +117,12 @@ Tcl_PutsObjCmd(
ThreadSpecificData *tsdPtr;
switch (objc) {
- case 2: /* [puts $x] */
+ case 2: /* [puts $x] */
string = objv[1];
newline = 1;
break;
- case 3: /* [puts -nonewline $x] or [puts $chan $x] */
+ case 3: /* [puts -nonewline $x] or [puts $chan $x] */
if (strcmp(TclGetString(objv[1]), "-nonewline") == 0) {
newline = 0;
} else {
@@ -132,7 +132,8 @@ Tcl_PutsObjCmd(
string = objv[2];
break;
- case 4: /* [puts -nonewline $chan $x] or [puts $chan $x nonewline] */
+ case 4: /* [puts -nonewline $chan $x] or
+ * [puts $chan $x nonewline] */
newline = 0;
if (strcmp(TclGetString(objv[1]), "-nonewline") == 0) {
chanObjPtr = objv[2];
@@ -153,8 +154,8 @@ Tcl_PutsObjCmd(
#endif
}
/* Fall through */
- default:
- /* [puts] or [puts some bad number of arguments...] */
+ default: /* [puts] or
+ * [puts some bad number of arguments...] */
Tcl_WrongNumArgs(interp, 1, objv, "?-nonewline? ?channelId? string");
return TCL_ERROR;
}
@@ -200,9 +201,8 @@ Tcl_PutsObjCmd(
error:
if (!TclChanCaughtErrorBypass(interp, chan)) {
- Tcl_AppendResult(interp, "error writing \"",
- TclGetString(chanObjPtr), "\": ",
- Tcl_PosixError(interp), NULL);
+ Tcl_AppendResult(interp, "error writing \"", TclGetString(chanObjPtr),
+ "\": ", Tcl_PosixError(interp), NULL);
}
return TCL_ERROR;
}
@@ -260,8 +260,8 @@ Tcl_FlushObjCmd(
if (!TclChanCaughtErrorBypass(interp, chan)) {
Tcl_AppendResult(interp, "error flushing \"",
- TclGetString(chanObjPtr), "\": ",
- Tcl_PosixError(interp), NULL);
+ TclGetString(chanObjPtr), "\": ", Tcl_PosixError(interp),
+ NULL);
}
return TCL_ERROR;
}
@@ -319,10 +319,10 @@ Tcl_GetsObjCmd(
Tcl_DecrRefCount(linePtr);
/*
- * TIP #219. Capture error messages put by the driver into the
- * bypass area and put them into the regular interpreter result.
- * Fall back to the regular message if nothing was found in the
- * bypass.
+ * TIP #219.
+ * Capture error messages put by the driver into the bypass area
+ * and put them into the regular interpreter result. Fall back to
+ * the regular message if nothing was found in the bypass.
*/
if (!TclChanCaughtErrorBypass(interp, chan)) {
@@ -341,7 +341,6 @@ Tcl_GetsObjCmd(
return TCL_ERROR;
}
Tcl_SetObjResult(interp, Tcl_NewIntObj(lineLen));
- return TCL_OK;
} else {
Tcl_SetObjResult(interp, linePtr);
}
@@ -417,7 +416,7 @@ Tcl_ReadObjCmd(
"\" wasn't opened for reading", NULL);
return TCL_ERROR;
}
- i++; /* Consumed channel name. */
+ i++; /* Consumed channel name. */
/*
* Compute how many bytes to read.
@@ -425,7 +424,8 @@ Tcl_ReadObjCmd(
toRead = -1;
if (i < objc) {
- if ((TclGetIntFromObj(interp, objv[i], &toRead) != TCL_OK) || (toRead < 0)) {
+ if ((TclGetIntFromObj(interp, objv[i], &toRead) != TCL_OK)
+ || (toRead < 0)) {
#if TCL_MAJOR_VERSION < 9
/*
* The code below provides backwards compatibility with an old
@@ -462,8 +462,8 @@ Tcl_ReadObjCmd(
if (!TclChanCaughtErrorBypass(interp, chan)) {
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "error reading \"",
- TclGetString(chanObjPtr), "\": ",
- Tcl_PosixError(interp), NULL);
+ TclGetString(chanObjPtr), "\": ", Tcl_PosixError(interp),
+ NULL);
}
Tcl_DecrRefCount(resultPtr);
return TCL_ERROR;
@@ -550,10 +550,11 @@ Tcl_SeekObjCmd(
* put them into the regular interpreter result. Fall back to the
* regular message if nothing was found in the bypass.
*/
+
if (!TclChanCaughtErrorBypass(interp, chan)) {
Tcl_AppendResult(interp, "error during seek on \"",
- TclGetString(objv[1]), "\": ",
- Tcl_PosixError(interp), NULL);
+ TclGetString(objv[1]), "\": ", Tcl_PosixError(interp),
+ NULL);
}
return TCL_ERROR;
}
@@ -644,6 +645,10 @@ Tcl_CloseObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to close. */
+ static const char *const dirOptions[] = {
+ "read", "write", NULL
+ };
+ static int dirArray[] = {TCL_CLOSE_READ, TCL_CLOSE_WRITE};
if ((objc != 2) && (objc != 3)) {
Tcl_WrongNumArgs(interp, 1, objv, "channelId ?direction?");
@@ -655,21 +660,17 @@ Tcl_CloseObjCmd(
}
if (objc == 3) {
- int optionIndex, dir;
- static const char *const dirOptions[] = {
- "read", "write", NULL
- };
- static int dirArray[] = {TCL_CLOSE_READ, TCL_CLOSE_WRITE};
+ int index, dir;
/*
* Get direction requested to close, and check syntax.
*/
if (Tcl_GetIndexFromObj(interp, objv[2], dirOptions, "direction", 0,
- &optionIndex) != TCL_OK) {
+ &index) != TCL_OK) {
return TCL_ERROR;
}
- dir = dirArray[optionIndex];
+ dir = dirArray[index];
/*
* Check direction against channel mode. It is an error if we try to
@@ -678,8 +679,7 @@ Tcl_CloseObjCmd(
*/
if (!(dir & Tcl_GetChannelMode(chan))) {
- Tcl_AppendResult(interp, "Half-close of ",
- dirOptions[optionIndex],
+ Tcl_AppendResult(interp, "Half-close of ", dirOptions[index],
"-side not possible, side not opened or already closed",
NULL);
return TCL_ERROR;
@@ -758,8 +758,7 @@ Tcl_FconfigureObjCmd(
int i; /* Iterate over arg-value pairs. */
if ((objc < 2) || (((objc % 2) == 1) && (objc != 3))) {
- Tcl_WrongNumArgs(interp, 1, objv,
- "channelId ?-option value ...?");
+ Tcl_WrongNumArgs(interp, 1, objv, "channelId ?-option value ...?");
return TCL_ERROR;
}
@@ -870,14 +869,9 @@ Tcl_ExecObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- /*
- * This function generates an argv array for the string arguments. It
- * starts out with stack-allocated space but uses dynamically-allocated
- * storage if needed.
- */
-
Tcl_Obj *resultPtr;
- const char **argv;
+ const char **argv; /* An array for the string arguments. Stored
+ * on the _Tcl_ stack. */
const char *string;
Tcl_Channel chan;
int argc, background, i, index, keepNewline, result, skip, length;
@@ -935,8 +929,7 @@ Tcl_ExecObjCmd(
*/
argc = objc - skip;
- argv = (const char **)
- TclStackAlloc(interp, (unsigned)(argc + 1) * sizeof(char *));
+ argv = TclStackAlloc(interp, (unsigned)(argc + 1) * sizeof(char *));
/*
* Copy the string conversions of each (post option) object into the
@@ -948,7 +941,7 @@ Tcl_ExecObjCmd(
}
argv[argc] = NULL;
chan = Tcl_OpenCommandChannel(interp, argc, argv, (background ? 0 :
- (ignoreStderr ? TCL_STDOUT : TCL_STDOUT|TCL_STDERR)));
+ ignoreStderr ? TCL_STDOUT : TCL_STDOUT|TCL_STDERR));
/*
* Free the argv array.
@@ -1108,11 +1101,13 @@ Tcl_OpenObjCmd(
int code = TCL_ERROR;
int scanned = TclParseAllWhiteSpace(permString, -1);
- /* Support legacy octal numbers */
+ /*
+ * Support legacy octal numbers.
+ */
+
if ((permString[scanned] == '0')
&& (permString[scanned+1] >= '0')
&& (permString[scanned+1] <= '7')) {
-
Tcl_Obj *permObj;
TclNewLiteralStringObj(permObj, "0o");
@@ -1259,13 +1254,12 @@ RegisterTcpServerInterpCleanup(
Tcl_HashEntry *hPtr; /* Entry for this record. */
int isNew; /* Is the entry new? */
- hTblPtr = (Tcl_HashTable *)
- Tcl_GetAssocData(interp, "tclTCPAcceptCallbacks", NULL);
+ hTblPtr = Tcl_GetAssocData(interp, "tclTCPAcceptCallbacks", NULL);
if (hTblPtr == NULL) {
hTblPtr = (Tcl_HashTable *) ckalloc((unsigned) sizeof(Tcl_HashTable));
Tcl_InitHashTable(hTblPtr, TCL_ONE_WORD_KEYS);
- (void) Tcl_SetAssocData(interp, "tclTCPAcceptCallbacks",
+ Tcl_SetAssocData(interp, "tclTCPAcceptCallbacks",
TcpAcceptCallbacksDeleteProc, hTblPtr);
}
@@ -1306,8 +1300,7 @@ UnregisterTcpServerInterpCleanupProc(
Tcl_HashTable *hTblPtr;
Tcl_HashEntry *hPtr;
- hTblPtr = (Tcl_HashTable *) Tcl_GetAssocData(interp,
- "tclTCPAcceptCallbacks", NULL);
+ hTblPtr = Tcl_GetAssocData(interp, "tclTCPAcceptCallbacks", NULL);
if (hTblPtr == NULL) {
return;
}
@@ -1345,7 +1338,7 @@ AcceptCallbackProc(
char *address, /* Address of client that was accepted. */
int port) /* Port of client that was accepted. */
{
- AcceptCallback *acceptCallbackPtr = (AcceptCallback *) callbackData;
+ AcceptCallback *acceptCallbackPtr = callbackData;
/*
* Check if the callback is still valid; the interpreter may have gone
@@ -1390,8 +1383,8 @@ AcceptCallbackProc(
Tcl_Release(script);
} else {
/*
- * The interpreter has been deleted, so there is no useful way to
- * utilize the client socket - just close it.
+ * The interpreter has been deleted, so there is no useful way to use
+ * the client socket - just close it.
*/
Tcl_Close(NULL, chan);
@@ -1424,7 +1417,7 @@ TcpServerCloseProc(
ClientData callbackData) /* The data passed in the call to
* Tcl_CreateCloseHandler. */
{
- AcceptCallback *acceptCallbackPtr = (AcceptCallback *) callbackData;
+ AcceptCallback *acceptCallbackPtr = callbackData;
/* The actual data. */
if (acceptCallbackPtr->interp != NULL) {
@@ -1955,25 +1948,25 @@ TclInitChanCmd(
* function at the moment.
*/
static const EnsembleImplMap initMap[] = {
- {"blocked", Tcl_FblockedObjCmd, NULL, NULL, NULL, 0},
- {"close", Tcl_CloseObjCmd, NULL, NULL, NULL, 0},
- {"copy", Tcl_FcopyObjCmd, NULL, NULL, NULL, 0},
- {"create", TclChanCreateObjCmd, NULL, NULL, NULL, 0}, /* TIP #219 */
- {"eof", Tcl_EofObjCmd, NULL, NULL, NULL, 0},
- {"event", Tcl_FileEventObjCmd, NULL, NULL, NULL, 0},
- {"flush", Tcl_FlushObjCmd, NULL, NULL, NULL, 0},
- {"gets", Tcl_GetsObjCmd, NULL, NULL, NULL, 0},
- {"names", TclChannelNamesCmd, NULL, NULL, NULL, 0},
- {"pending", ChanPendingObjCmd, NULL, NULL, NULL, 0}, /* TIP #287 */
- {"pop", TclChanPopObjCmd, NULL, NULL, NULL, 0}, /* TIP #230 */
- {"postevent", TclChanPostEventObjCmd, NULL, NULL, NULL, 0}, /* TIP #219 */
- {"push", TclChanPushObjCmd, NULL, NULL, NULL, 0}, /* TIP #230 */
- {"puts", Tcl_PutsObjCmd, NULL, NULL, NULL, 0},
- {"read", Tcl_ReadObjCmd, NULL, NULL, NULL, 0},
- {"seek", Tcl_SeekObjCmd, NULL, NULL, NULL, 0},
- {"pipe", ChanPipeObjCmd, NULL, NULL, NULL, 0}, /* TIP #304 */
- {"tell", Tcl_TellObjCmd, NULL, NULL, NULL, 0},
- {"truncate", ChanTruncateObjCmd, NULL, NULL, NULL, 0}, /* TIP #208 */
+ {"blocked", Tcl_FblockedObjCmd},
+ {"close", Tcl_CloseObjCmd},
+ {"copy", Tcl_FcopyObjCmd},
+ {"create", TclChanCreateObjCmd}, /* TIP #219 */
+ {"eof", Tcl_EofObjCmd},
+ {"event", Tcl_FileEventObjCmd},
+ {"flush", Tcl_FlushObjCmd},
+ {"gets", Tcl_GetsObjCmd},
+ {"names", TclChannelNamesCmd},
+ {"pending", ChanPendingObjCmd}, /* TIP #287 */
+ {"pop", TclChanPopObjCmd}, /* TIP #230 */
+ {"postevent", TclChanPostEventObjCmd}, /* TIP #219 */
+ {"push", TclChanPushObjCmd}, /* TIP #230 */
+ {"puts", Tcl_PutsObjCmd},
+ {"read", Tcl_ReadObjCmd},
+ {"seek", Tcl_SeekObjCmd},
+ {"pipe", ChanPipeObjCmd}, /* TIP #304 */
+ {"tell", Tcl_TellObjCmd},
+ {"truncate", ChanTruncateObjCmd}, /* TIP #208 */
{NULL, NULL, NULL, NULL, NULL, 0}
};
static const char *const extras[] = {
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 3751d6c..b3e3fde 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -2381,7 +2381,7 @@ ErrnoReturn(
if (((Tcl_GetIntFromObj(rcPtr->interp, resObj, &code) != TCL_OK)
|| (code >= 0))) {
if (strcmp("EAGAIN", Tcl_GetString(resObj)) == 0) {
- code = - EAGAIN;
+ code = -EAGAIN;
} else {
code = 0;
}
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c