summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.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/tclCmdIL.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/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index bbcab68..b98cf56 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.80 2005/08/26 13:26:55 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.81 2005/09/14 21:32:17 dgp Exp $
*/
#include "tclInt.h"
@@ -3404,16 +3404,11 @@ Tcl_LsearchObjCmd(clientData, interp, objc, objv)
for (j=0 ; j<sortInfo.indexc ; j++) {
if (TclGetIntForIndex(interp, indices[j], SORTIDX_END,
&sortInfo.indexv[j]) != TCL_OK) {
- char buffer[TCL_INTEGER_SPACE];
-
if (sortInfo.indexc > 1) {
ckfree((char *) sortInfo.indexv);
}
- sprintf(buffer, "%d", j);
- Tcl_AddErrorInfo(interp,
- "\n (-index option item number ");
- Tcl_AddErrorInfo(interp, buffer);
- Tcl_AddErrorInfo(interp, ")");
+ TclFormatToErrorInfo(interp,
+ "\n (-index option item number %d)", j);
return TCL_ERROR;
}
}
@@ -4019,16 +4014,11 @@ Tcl_LsortObjCmd(clientData, interp, objc, objv)
for (j=0 ; j<sortInfo.indexc ; j++) {
if (TclGetIntForIndex(interp, indices[j], SORTIDX_END,
&sortInfo.indexv[j]) != TCL_OK) {
- char buffer[TCL_INTEGER_SPACE];
-
if (sortInfo.indexc > 1) {
ckfree((char *) sortInfo.indexv);
}
- sprintf(buffer, "%d", j);
- Tcl_AddErrorInfo(interp,
- "\n (-index option item number ");
- Tcl_AddErrorInfo(interp, buffer);
- Tcl_AddErrorInfo(interp, ")");
+ TclFormatToErrorInfo(interp,
+ "\n (-index option item number %d)", j);
return TCL_ERROR;
}
}