diff options
author | dgp <dgp@users.sourceforge.net> | 2006-10-31 20:19:43 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-10-31 20:19:43 (GMT) |
commit | ce16019300e66b466f8ad327c5b3a03fe6876f8e (patch) | |
tree | 75652e34b31819c0360f9598db333054faffde99 /generic/tclCmdMZ.c | |
parent | 20c1156972864f916da62a217137e346eb93ac79 (diff) | |
download | tcl-ce16019300e66b466f8ad327c5b3a03fe6876f8e.zip tcl-ce16019300e66b466f8ad327c5b3a03fe6876f8e.tar.gz tcl-ce16019300e66b466f8ad327c5b3a03fe6876f8e.tar.bz2 |
* generic/tclBasic.c: Refactored and renamed the routines
* generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and
* generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of
* generic/tclCmdIL.c: routines TclAppendPrintfToObj,
* generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and
* generic/tclDictObj.c: TclObjFormat, with the intent of making
* generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj
* generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via
* generic/tclIOUtil.c: a revised TIP 270.
* generic/tclInt.h:
* generic/tclMain.c:
* generic/tclNamesp.c:
* generic/tclParseExpr.c:
* generic/tclPkg.c:
* generic/tclProc.c:
* generic/tclStringObj.c:
* generic/tclTimer.c:
* generic/tclUtil.c:
* unix/tclUnixFCmd.c:
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index a77431c..578e977 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.135 2006/08/21 01:08:41 das Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.136 2006/10/31 20:19:45 dgp Exp $ */ #include "tclInt.h" @@ -2128,11 +2128,9 @@ Tcl_StringObjCmd(dummy, interp, objc, objv) length2 = length1 * count; if ((length2 / count) != length1) { - resultPtr = Tcl_NewObj(); - TclObjPrintf(NULL, resultPtr, + Tcl_SetObjResult(interp, TclObjPrintf(NULL, "string size overflow, must be less than %d", - INT_MAX); - Tcl_SetObjResult(interp, resultPtr); + INT_MAX)); return TCL_ERROR; } @@ -2884,9 +2882,10 @@ Tcl_SwitchObjCmd(dummy, interp, objc, objv) if (result == TCL_ERROR) { int limit = 50; int overflow = (patternLength > limit); - TclFormatToErrorInfo(interp, "\n (\"%.*s%s\" arm line %d)", + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, + "\n (\"%.*s%s\" arm line %d)", (overflow ? limit : patternLength), pattern, - (overflow ? "..." : ""), interp->errorLine); + (overflow ? "..." : ""), interp->errorLine)); } return result; } @@ -3031,8 +3030,8 @@ Tcl_WhileObjCmd(dummy, interp, objc, objv) result = Tcl_EvalObjEx(interp, objv[2], 0); if ((result != TCL_OK) && (result != TCL_CONTINUE)) { if (result == TCL_ERROR) { - TclFormatToErrorInfo(interp, "\n (\"while\" body line %d)", - interp->errorLine); + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, + "\n (\"while\" body line %d)", interp->errorLine)); } break; } |