summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-25 21:27:04 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-06-25 21:27:04 (GMT)
commitfdf8a62f8c24e498f5444a5a110fb51c3b01b8c8 (patch)
tree5bd30b34c8a4c32bbec36f3ad458b295430934e5 /macosx/tkMacOSXInit.c
parenta3129322d24fa7319ca3ad4ec44b37a5ab4f4ec0 (diff)
downloadtk-fdf8a62f8c24e498f5444a5a110fb51c3b01b8c8.zip
tk-fdf8a62f8c24e498f5444a5a110fb51c3b01b8c8.tar.gz
tk-fdf8a62f8c24e498f5444a5a110fb51c3b01b8c8.tar.bz2
CONST -> const. Eliminate unnecessary type-casts and end-of-line spacing
Diffstat (limited to 'macosx/tkMacOSXInit.c')
-rw-r--r--macosx/tkMacOSXInit.c34
1 files changed, 17 insertions, 17 deletions
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);