summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
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;
}
}