summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-10-09 10:46:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-10-09 10:46:23 (GMT)
commit22cf6ccfd778871f2ac0415b10e303a0af281e06 (patch)
treecf48226ddb79ba53c2c589ee07a09f4c9f0646e4 /macosx
parent92b77d1dacdd5e990c8b53b8626068bfbb560708 (diff)
downloadtcl-22cf6ccfd778871f2ac0415b10e303a0af281e06.zip
tcl-22cf6ccfd778871f2ac0415b10e303a0af281e06.tar.gz
tcl-22cf6ccfd778871f2ac0415b10e303a0af281e06.tar.bz2
Bring spacing into line with Tcl Engineering Manual guidelines.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tclMacOSXBundle.c88
1 files changed, 43 insertions, 45 deletions
diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c
index 0761744..7e3dfe7 100644
--- a/macosx/tclMacOSXBundle.c
+++ b/macosx/tclMacOSXBundle.c
@@ -50,19 +50,19 @@
* software in accordance with the terms specified in this
* license.
*/
-
- #include <CoreFoundation/CoreFoundation.h>
- #include "tcl.h"
+
+#include <CoreFoundation/CoreFoundation.h>
+#include "tcl.h"
/*
*----------------------------------------------------------------------
*
* Tcl_MacOSXOpenBundleResources --
*
- * Given the bundle name for a shared library, this routine
- * sets libraryPath to the Resources/Scripts directory
- * in the framework package. If hasResourceFile is
- * true, it will also open the main resource file for the bundle.
+ * Given the bundle name for a shared library, this routine sets
+ * libraryPath to the Resources/Scripts directory in the framework
+ * package. If hasResourceFile is true, it will also open the main
+ * resource file for the bundle.
*
*
* Results:
@@ -76,53 +76,51 @@
*/
int
-Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
- CONST char *bundleName,
- int hasResourceFile,
- int maxPathLen,
- char *libraryPath)
+Tcl_MacOSXOpenBundleResources(
+ Tcl_Interp *interp,
+ CONST char *bundleName,
+ int hasResourceFile,
+ int maxPathLen,
+ char *libraryPath)
{
CFBundleRef bundleRef;
CFStringRef bundleNameRef;
-
+
libraryPath[0] = '\0';
-
- bundleNameRef = CFStringCreateWithCString(NULL,
- bundleName, kCFStringEncodingUTF8);
-
+
+ bundleNameRef = CFStringCreateWithCString(NULL,
+ bundleName, kCFStringEncodingUTF8);
+
bundleRef = CFBundleGetBundleWithIdentifier(bundleNameRef);
CFRelease(bundleNameRef);
-
+
if (bundleRef == 0) {
- return TCL_ERROR;
+ return TCL_ERROR;
} else {
- CFURLRef libURL;
-
- if (hasResourceFile) {
- short refNum;
- refNum = CFBundleOpenBundleResourceMap(bundleRef);
- }
-
- libURL = CFBundleCopyResourceURL(bundleRef,
- CFSTR("Scripts"),
- NULL,
- NULL);
+ CFURLRef libURL;
- if (libURL != NULL) {
- /*
- * FIXME: This is a quick fix, it is probably not right
- * for internationalization.
- */
-
- if (CFURLGetFileSystemRepresentation (libURL, true,
- libraryPath, maxPathLen)) {
- }
- CFRelease(libURL);
- } else {
- return TCL_ERROR;
- }
+ if (hasResourceFile) {
+ short refNum;
+ refNum = CFBundleOpenBundleResourceMap(bundleRef);
+ }
+
+ libURL = CFBundleCopyResourceURL(bundleRef,
+ CFSTR("Scripts"), NULL, NULL);
+
+ if (libURL != NULL) {
+ /*
+ * FIXME: This is a quick fix, it is probably not right
+ * for internationalization.
+ */
+
+ if (CFURLGetFileSystemRepresentation(libURL, true,
+ libraryPath, maxPathLen)) {
+ }
+ CFRelease(libURL);
+ } else {
+ return TCL_ERROR;
+ }
}
-
+
return TCL_OK;
}
-