diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-15 15:36:21 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-15 15:36:21 (GMT) |
commit | 83b500a0ded425d44265a396086035da7044b127 (patch) | |
tree | dbea85b04cde9b0f41694864f461837aebedda2b /macosx/tkMacOSXHLEvents.c | |
parent | 9f8f3f41603d986e304aac2f5f2d85bd02606d49 (diff) | |
parent | 0ce2a3994f63c21742fc4f937f58852e167e996a (diff) | |
download | tk-83b500a0ded425d44265a396086035da7044b127.zip tk-83b500a0ded425d44265a396086035da7044b127.tar.gz tk-83b500a0ded425d44265a396086035da7044b127.tar.bz2 |
Merge 8.6. More usage of TCL_UNUSED macro
Diffstat (limited to 'macosx/tkMacOSXHLEvents.c')
-rw-r--r-- | macosx/tkMacOSXHLEvents.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index 4fe315e..9439302 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -54,11 +54,11 @@ static void ProcessAppleEvent(ClientData clientData); * Names of the procedures which can be used to process AppleEvents. */ -static const char* openDocumentProc = "::tk::mac::OpenDocument"; -static const char* launchURLProc = "::tk::mac::LaunchURL"; -static const char* printDocProc = "::tk::mac::PrintDocument"; -static const char* scriptFileProc = "::tk::mac::DoScriptFile"; -static const char* scriptTextProc = "::tk::mac::DoScriptText"; +static const char openDocumentProc[] = "::tk::mac::OpenDocument"; +static const char launchURLProc[] = "::tk::mac::LaunchURL"; +static const char printDocProc[] = "::tk::mac::PrintDocument"; +static const char scriptFileProc[] = "::tk::mac::DoScriptFile"; +static const char scriptTextProc[] = "::tk::mac::DoScriptText"; #pragma mark TKApplication(TKHLEvents) @@ -338,10 +338,10 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText"; typeUTF8Text, &type, data, actual, NULL)) { data[actual] = '\0'; - AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); - Tcl_DString *scriptTextCommand = &AEInfo->command; - Tcl_DStringInit(scriptTextCommand); - Tcl_DStringAppend(scriptTextCommand, scriptTextProc, -1); + AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); + Tcl_DString *scriptTextCommand = &AEInfo->command; + Tcl_DStringInit(scriptTextCommand); + Tcl_DStringAppend(scriptTextCommand, scriptTextProc, -1); Tcl_DStringAppendElement(scriptTextCommand, data); AEInfo->interp = _eventInterp; AEInfo->procedure = scriptTextProc; @@ -351,8 +351,8 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText"; ProcessAppleEvent(AEInfo); } else { AEInfo->replyEvent = nil; - Tcl_DoWhenIdle(ProcessAppleEvent, (ClientData)AEInfo); - ProcessAppleEvent((ClientData)AEInfo); + Tcl_DoWhenIdle(ProcessAppleEvent, AEInfo); + ProcessAppleEvent(AEInfo); } } } @@ -477,11 +477,10 @@ static void ProcessAppleEvent( void TkMacOSXInitAppleEvents( - Tcl_Interp *dummy) /* not used */ + TCL_UNUSED(Tcl_Interp *)) { NSAppleEventManager *aeManager = [NSAppleEventManager sharedAppleEventManager]; static Boolean initialized = FALSE; - (void)dummy; if (!initialized) { initialized = TRUE; @@ -588,12 +587,11 @@ TkMacOSXDoHLEvent( static int ReallyKillMe( Tcl_Event *eventPtr, - int flags) + TCL_UNUSED(int)) { Tcl_Interp *interp = ((KillEvent *) eventPtr)->interp; int quit = Tcl_FindCommand(interp, "::tk::mac::Quit", NULL, 0)!=NULL; int code = Tcl_EvalEx(interp, quit ? "::tk::mac::Quit" : "exit", -1, TCL_EVAL_GLOBAL); - (void)flags; if (code != TCL_OK) { /* |