diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/README | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXHLEvents.c | 8 | ||||
-rw-r--r-- | macosx/tkMacOSXInit.c | 34 | ||||
-rw-r--r-- | macosx/tkMacOSXPrivate.h | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXServices.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXTest.c | 3 |
6 files changed, 25 insertions, 26 deletions
diff --git a/macosx/README b/macosx/README index f35c128..7df4893 100644 --- a/macosx/README +++ b/macosx/README @@ -702,7 +702,7 @@ that LaunchServices is launching the correct Wish.app. Instructions for doing this are provided below. The command line tool which manages the LaunchServices database has -an amazingly unwieldy path name. So, first, run this command: +an amazingly unwieldy path name. So, first, run this command: alias lsregister='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister' diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index d2843a8..0f63ea6 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -126,7 +126,7 @@ static int ReallyKillMe(Tcl_Event *eventPtr, int flags); - (void) handlePrintDocumentsEvent: (NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent { - + NSString* file = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; const char *printFile=[file UTF8String]; @@ -134,7 +134,7 @@ static int ReallyKillMe(Tcl_Event *eventPtr, int flags); Tcl_DStringInit(&print); if (Tcl_FindCommand(_eventInterp, "::tk::mac::PrintDocument", NULL, 0)) { Tcl_DStringAppend(&print, "::tk::mac::PrintDocument", -1); - } + } Tcl_DStringAppendElement(&print, printFile); int tclErr = Tcl_EvalEx(_eventInterp, Tcl_DStringValue(&print), Tcl_DStringLength(&print), TCL_EVAL_GLOBAL); @@ -272,7 +272,7 @@ static int ReallyKillMe(Tcl_Event *eventPtr, int flags); Tcl_DStringInit(&launch); if (Tcl_FindCommand(_eventInterp, "::tk::mac::LaunchURL", NULL, 0)) { Tcl_DStringAppend(&launch, "::tk::mac::LaunchURL", -1); - } + } Tcl_DStringAppendElement(&launch, cURL); int tclErr = Tcl_EvalEx(_eventInterp, Tcl_DStringValue(&launch), Tcl_DStringLength(&launch), TCL_EVAL_GLOBAL); @@ -454,7 +454,7 @@ TkMacOSXInitAppleEvents( [aeManager setEventHandler:NSApp andSelector:@selector(handleURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; - + } } diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index 3efe0c6..bf0b9f2 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -388,14 +388,14 @@ TkpInit( TkMacOSXRegisterServiceWidgetObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "::tk::mac::iconBitmap", TkMacOSXIconBitmapObjCmd, NULL, NULL); - Tcl_CreateObjCommand(interp, "::tk::mac::GetAppPath", TkMacOSXGetAppPath,(ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); + Tcl_CreateObjCommand(interp, "::tk::mac::GetAppPath", TkMacOSXGetAppPath, NULL, NULL); /* * Initialize the NSServices object here. Apple's docs say to do this - * in applicationDidFinishLaunching, but the Tcl interpreter is not - * initialized until this function call. + * in applicationDidFinishLaunching, but the Tcl interpreter is not + * initialized until this function call. */ - + TkMacOSXServices_Init(interp); return TCL_OK; @@ -457,28 +457,28 @@ int TkMacOSXGetAppPath( ClientData cd, Tcl_Interp *ip, int objc, - Tcl_Obj *CONST objv[]) + Tcl_Obj *const objv[]) { CFURLRef mainBundleURL = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - - /* - * Convert the URL reference into a string reference. + + /* + * Convert the URL reference into a string reference. */ - + CFStringRef appPath = CFURLCopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle); - - /* - * Get the system encoding method. + + /* + * Get the system encoding method. */ - + CFStringEncoding encodingMethod = CFStringGetSystemEncoding(); - - /* - * Convert the string reference into a C string. + + /* + * Convert the string reference into a C string. */ - + char *path = (char *) CFStringGetCStringPtr(appPath, encodingMethod); Tcl_SetResult(ip, path, NULL); diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index a67f894..98ee54f 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -431,7 +431,7 @@ VISIBILITY_HIDDEN #endif /* _TKMACPRIV */ -int TkMacOSXGetAppPath(ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *CONST objv[]); +int TkMacOSXGetAppPath(ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *const objv[]); /* * Local Variables: diff --git a/macosx/tkMacOSXServices.c b/macosx/tkMacOSXServices.c index 6ecb12d..809c708 100644 --- a/macosx/tkMacOSXServices.c +++ b/macosx/tkMacOSXServices.c @@ -158,7 +158,7 @@ TkMacOSXRegisterServiceWidgetObjCmd( ClientData cd, Tcl_Interp *ip, int objc, - Tcl_Obj *CONST objv[]) + Tcl_Obj *const objv[]) { /* * Need proper number of args. diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c index eabc14e..f109b7a 100644 --- a/macosx/tkMacOSXTest.c +++ b/macosx/tkMacOSXTest.c @@ -50,8 +50,7 @@ TkplatformtestInit( */ #if MAC_OS_X_VERSION_MAX_ALLOWED < 1080 - Tcl_CreateObjCommand(interp, "debugger", DebuggerObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "debugger", DebuggerObjCmd, NULL, NULL); #endif return TCL_OK; |