diff options
Diffstat (limited to 'macosx/tkMacOSXSend.c')
-rw-r--r-- | macosx/tkMacOSXSend.c | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/macosx/tkMacOSXSend.c b/macosx/tkMacOSXSend.c index a8077cb..b48a8a0 100644 --- a/macosx/tkMacOSXSend.c +++ b/macosx/tkMacOSXSend.c @@ -24,11 +24,11 @@ * * 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. */ #include "tkMacOSXInt.h" @@ -78,7 +78,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 +198,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 +254,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); @@ -281,7 +281,7 @@ Tk_SetAppName( * We have found a unique name. Now add it to the registry. */ - riPtr = (RegisteredInterp *) ckalloc(sizeof(RegisteredInterp)); + riPtr = ckalloc(sizeof(RegisteredInterp)); riPtr->interp = interp; riPtr->name = ckalloc(strlen(actualName) + 1); riPtr->nextPtr = interpListPtr; @@ -323,14 +323,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}; + const char *const 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 +341,7 @@ Tk_SendObjCmd( return TCL_ERROR; } if (index == 0) { - async = 1; + /*async = 1;*/ i++; } else if (index == 1) { i += 2; @@ -355,15 +355,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 +504,12 @@ SendInit( { return TCL_OK; } + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 79 + * coding: utf-8 + * End: + */ |