OSDN Git Service

Updated to tk 8.4.1
[pf3gnuchains/sourceware.git] / tk / mac / tkMacSend.c
index 611436e..f33043e 100644 (file)
@@ -234,12 +234,12 @@ static int                ValidateName _ANSI_ARGS_((TkDisplay *dispPtr,
  *--------------------------------------------------------------
  */
 
-char *
+CONST char *
 Tk_SetAppName(
     Tk_Window tkwin,           /* Token for any window in the application
                                 * to be named:  it is just used to identify
                                 * the application and the display.  */
-    char *name)                        /* The name that will be used to
+    CONST char *name)          /* The name that will be used to
                                 * refer to the interpreter in later
                                 * "send" commands.  Must be globally
                                 * unique. */
@@ -249,7 +249,7 @@ Tk_SetAppName(
     int i, suffix, offset, result;
     int createCommand = 0;
     RegisteredInterp *riPtr, *prevPtr;
-    char *actualName;
+    CONST char *actualName;
     Tcl_DString dString;
     Tcl_Obj *resultObjPtr, *interpNamePtr;
     char *interpName;
@@ -306,7 +306,7 @@ Tk_SetAppName(
                actualName = Tcl_DStringValue(&dString);
            }
            suffix++;
-           sprintf(actualName + offset, "%d", suffix);
+           sprintf(Tcl_DStringValue(&dString) + offset, "%d", suffix);
            i = 0;
        } else {
            i++;
@@ -361,7 +361,7 @@ Tk_SendObjCmd(
     int objc,                  /* Number of arguments */
     Tcl_Obj *CONST objv[])     /* The arguments */
 {
-    static char *sendOptions[] = {"-async", "-displayof", "-", (char *) NULL};
+    static CONST char *sendOptions[] = {"-async", "-displayof", "-", (char *) NULL};
     char *stringRep, *destName;
     int async = 0;
     int i, index, firstArg;
@@ -546,4 +546,3 @@ SendInit(
 {
     return TCL_OK;
 }
-