summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-09-14 21:32:16 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-09-14 21:32:16 (GMT)
commit62b5bf66c2c8dda87b14b78f81bc58a02cdfb172 (patch)
tree82a5606aa3a2ef7d0ea577afdb0814e7a2a96e48 /generic/tclCmdMZ.c
parentdc74c2b374a963186c53482685a2c91773ade3da (diff)
downloadtcl-62b5bf66c2c8dda87b14b78f81bc58a02cdfb172.zip
tcl-62b5bf66c2c8dda87b14b78f81bc58a02cdfb172.tar.gz
tcl-62b5bf66c2c8dda87b14b78f81bc58a02cdfb172.tar.bz2
* generic/tclStringObj.c: Bug fixes: ObjPrintfVA needed to
support "*" fields and needed to interpret precision limits on %s conversions as a maximum number of bytes, not Tcl_UniChars, to take from the (char *) argument. * generic/tclBasic.c: Updated several callers to use * generic/tclCkalloc.c: TclFormatToErrorInfo() and/or * generic/tclCmdAH.c: TclObjPrintf(). * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclProc.c:
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index e59360d..ebc27f6 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.129 2005/09/14 17:13:18 dgp Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.130 2005/09/14 21:32:17 dgp Exp $
*/
#include "tclInt.h"
@@ -2158,12 +2158,9 @@ Tcl_StringObjCmd(dummy, interp, objc, objv)
length2 = length1 * count;
if ((length2 / count) != length1) {
- char buf[TCL_INTEGER_SPACE+1];
-
- sprintf(buf, "%d", INT_MAX);
- Tcl_AppendResult(interp,
- "string size overflow, must be less than ",
- buf, (char *) NULL);
+ TclObjPrintf(NULL, Tcl_GetObjResult(interp),
+ "string size overflow, must be less than %d",
+ INT_MAX);
return TCL_ERROR;
}
@@ -3058,11 +3055,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) {
- char msg[32 + TCL_INTEGER_SPACE];
-
- sprintf(msg, "\n (\"while\" body line %d)",
+ TclFormatToErrorInfo(interp, "\n (\"while\" body line %d)",
interp->errorLine);
- Tcl_AddErrorInfo(interp, msg);
}
break;
}