summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSend.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2012-09-12 03:05:29 (GMT)
committerKevin Walzer <kw@codebykevin.com>2012-09-12 03:05:29 (GMT)
commit4d00df90e7901e55bc22ae2b9589a9c005f6d9f7 (patch)
tree531b9edd57ee78802a71cb6c0fd09a0367f59211 /macosx/tkMacOSXSend.c
parent799666382d309825a9bd5d7205fd05662a742391 (diff)
downloadtk-4d00df90e7901e55bc22ae2b9589a9c005f6d9f7.zip
tk-4d00df90e7901e55bc22ae2b9589a9c005f6d9f7.tar.gz
tk-4d00df90e7901e55bc22ae2b9589a9c005f6d9f7.tar.bz2
Review branch for merge of Tk-Cocoa into Tk 8.5 main branch
Diffstat (limited to 'macosx/tkMacOSXSend.c')
-rw-r--r--macosx/tkMacOSXSend.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/macosx/tkMacOSXSend.c b/macosx/tkMacOSXSend.c
index a8077cb..6740c2e 100644
--- a/macosx/tkMacOSXSend.c
+++ b/macosx/tkMacOSXSend.c
@@ -24,11 +24,13 @@
*
* Copyright (c) 1989-1994 The Regents of the University of California.
* Copyright (c) 1994-1998 Sun Microsystems, Inc.
- * Copyright 2001, Apple Computer, Inc.
- * Copyright (c) 2005-2007 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright 2001-2009, Apple Inc.
+ * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
*
- * See the file "license.terms" for information on usage and redistribution of
- * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id$
*/
#include "tkMacOSXInt.h"
@@ -78,7 +80,7 @@ typedef struct NameRegistry {
* XFree; zero means use ckfree. */
} NameRegistry;
-static int initialized = false; /* A flag to denote if we have initialized
+static int initialized = 0; /* A flag to denote if we have initialized
* yet. */
static RegisteredInterp *interpListPtr = NULL;
@@ -198,12 +200,12 @@ static int SendInit(Tcl_Interp *interp);
*--------------------------------------------------------------
*/
-CONST 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. */
- CONST char *name) /* The name that will be used to refer to the
+ const char *name) /* The name that will be used to refer to the
* interpreter in later "send" commands. Must
* be globally unique. */
{
@@ -254,7 +256,7 @@ Tk_SetAppName(
Tcl_IncrRefCount(resultObjPtr);
for (i = 0; ; ) {
result = Tcl_ListObjIndex(NULL, resultObjPtr, i, &interpNamePtr);
- if (interpNamePtr == NULL) {
+ if (result != TCL_OK || interpNamePtr == NULL) {
break;
}
interpName = Tcl_GetString(interpNamePtr);
@@ -323,14 +325,14 @@ Tk_SendObjCmd(
ClientData clientData, /* Used only for deletion */
Tcl_Interp *interp, /* The interp we are sending from */
int objc, /* Number of arguments */
- Tcl_Obj *CONST objv[]) /* The arguments */
+ Tcl_Obj *const objv[]) /* The arguments */
{
const char *sendOptions[] = {"-async", "-displayof", "-", NULL};
char *stringRep, *destName;
- int async = 0;
+ /*int async = 0;*/
int i, index, firstArg;
RegisteredInterp *riPtr;
- Tcl_Obj *resultPtr, *listObjPtr;
+ Tcl_Obj *listObjPtr;
int result = TCL_OK;
for (i = 1; i < (objc - 1); ) {
@@ -341,7 +343,7 @@ Tk_SendObjCmd(
return TCL_ERROR;
}
if (index == 0) {
- async = 1;
+ /*async = 1;*/
i++;
} else if (index == 1) {
i += 2;
@@ -355,15 +357,13 @@ Tk_SendObjCmd(
if (objc < (i + 2)) {
Tcl_WrongNumArgs(interp, 1, objv,
- "?options? interpName arg ?arg ...?");
+ "?-option value ...? interpName arg ?arg ...?");
return TCL_ERROR;
}
destName = Tcl_GetString(objv[i]);
firstArg = i + 1;
- resultPtr = Tcl_GetObjResult(interp);
-
/*
* See if the target interpreter is local. If so, execute the command
* directly without going through the DDE server. The only tricky thing is
@@ -506,3 +506,12 @@ SendInit(
{
return TCL_OK;
}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 4
+ * fill-column: 79
+ * coding: utf-8
+ * End:
+ */