summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-09-15 16:40:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-09-15 16:40:02 (GMT)
commitdad41b847302dce4ebd5139c0568aad2ad7a0776 (patch)
tree238980bfb093b32ba311f36a2774bde6bba0c4ee /generic/tclUtil.c
parent75aee26af34aeea93c32910c88c0d5cef7077ff7 (diff)
downloadtcl-dad41b847302dce4ebd5139c0568aad2ad7a0776.zip
tcl-dad41b847302dce4ebd5139c0568aad2ad7a0776.tar.gz
tcl-dad41b847302dce4ebd5139c0568aad2ad7a0776.tar.bz2
* generic/tclBasic.c: More callers of TclObjPrintf and
* generic/tclCkalloc.c: TclFormatToErrorInfo. * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c * unix/configure: autoconf-2.59
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 0654f65..1dd6fcb 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtil.c,v 1.64 2005/09/06 14:40:11 dkf Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.65 2005/09/15 16:40:02 dgp Exp $
*/
#include "tclInt.h"
@@ -235,18 +235,17 @@ TclFindElement(interp, list, listLength, elementPtr, nextPtr, sizePtr,
*/
if (interp != NULL) {
- char buf[100];
-
+ Tcl_Obj *objPtr = Tcl_NewObj();
p2 = p;
while ((p2 < limit)
&& (!isspace(UCHAR(*p2))) /* INTL: ISO space. */
&& (p2 < p+20)) {
p2++;
}
- sprintf(buf,
- "list element in braces followed by \"%.*s\" instead of space",
- (int) (p2-p), p);
- Tcl_SetResult(interp, buf, TCL_VOLATILE);
+ TclObjPrintf(NULL, objPtr,
+ "list element in braces followed by \"%.*s\" "
+ "instead of space", (int) (p2-p), p);
+ Tcl_SetObjResult(interp, objPtr);
}
return TCL_ERROR;
}
@@ -297,18 +296,17 @@ TclFindElement(interp, list, listLength, elementPtr, nextPtr, sizePtr,
*/
if (interp != NULL) {
- char buf[100];
-
+ Tcl_Obj *objPtr = Tcl_NewObj();
p2 = p;
while ((p2 < limit)
&& (!isspace(UCHAR(*p2))) /* INTL: ISO space */
&& (p2 < p+20)) {
p2++;
}
- sprintf(buf,
- "list element in quotes followed by \"%.*s\" %s",
- (int) (p2-p), p, "instead of space");
- Tcl_SetResult(interp, buf, TCL_VOLATILE);
+ TclObjPrintf(NULL, objPtr,
+ "list element in quotes followed by \"%.*s\" "
+ "instead of space", (int) (p2-p), p);
+ Tcl_SetObjResult(interp, objPtr);
}
return TCL_ERROR;
}