summaryrefslogtreecommitdiffstats
path: root/generic/tkMessage.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkMessage.c')
-rw-r--r--generic/tkMessage.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index d12c0a3..3f7a4e7 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -6,12 +6,12 @@
* in a window according to a particular aspect ratio.
*
* Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1994-1995 Sun Microsystems, Inc.
+ * Copyright (c) 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMessage.c,v 1.2 1998/09/14 18:23:15 stanton Exp $
+ * RCS: @(#) $Id: tkMessage.c,v 1.3 1999/04/16 01:51:20 stanton Exp $
*/
#include "tkPort.h"
@@ -40,7 +40,7 @@ typedef struct {
char *string; /* String displayed in message. */
int numChars; /* Number of characters in string, not
- * including terminating NULL character. */
+ * including terminating NULL. */
char *textVarName; /* Name of variable (malloc'ed) or NULL.
* If non-NULL, message displays the contents
* of this variable. */
@@ -274,7 +274,7 @@ Tk_MessageCmd(clientData, interp, argc, argv)
goto error;
}
- interp->result = Tk_PathName(msgPtr->tkwin);
+ Tcl_SetResult(interp, Tk_PathName(msgPtr->tkwin), TCL_STATIC);
return TCL_OK;
error:
@@ -401,7 +401,7 @@ DestroyMessage(memPtr)
*
* Results:
* The return value is a standard Tcl result. If TCL_ERROR is
- * returned, then interp->result contains an error message.
+ * returned, then the interp's result contains an error message.
*
* Side effects:
* Configuration information, such as text string, colors, font,
@@ -465,7 +465,7 @@ ConfigureMessage(interp, msgPtr, argc, argv, flags)
* that couldn't be specified to Tk_ConfigureWidget.
*/
- msgPtr->numChars = strlen(msgPtr->string);
+ msgPtr->numChars = Tcl_NumUtfChars(msgPtr->string, -1);
Tk_SetBackgroundFromBorder(msgPtr->tkwin, msgPtr->border);
@@ -834,8 +834,8 @@ MessageTextVarProc(clientData, interp, name1, name2, flags)
if (msgPtr->string != NULL) {
ckfree(msgPtr->string);
}
- msgPtr->numChars = strlen(value);
- msgPtr->string = (char *) ckalloc((unsigned) (msgPtr->numChars + 1));
+ msgPtr->numChars = Tcl_NumUtfChars(value, -1);
+ msgPtr->string = (char *) ckalloc((unsigned) (strlen(value) + 1));
strcpy(msgPtr->string, value);
ComputeMessageGeometry(msgPtr);