Tcl Source Code

Artifact [5e0a37c2fc]
Login

Artifact 5e0a37c2fca192a9e677eea23aca00875cc49901:

Attachment "spacing.patch" to ticket [605578ffff] added by dkf 2002-09-06 21:00:44.
Index: macosx/tclMacOSXBundle.c
===================================================================
RCS file: /cvsroot/tcl/tcl/macosx/tclMacOSXBundle.c,v
retrieving revision 1.2
diff -u -r1.2 tclMacOSXBundle.c
--- macosx/tclMacOSXBundle.c	31 Aug 2002 06:09:45 -0000	1.2
+++ macosx/tclMacOSXBundle.c	6 Sep 2002 13:52:36 -0000
@@ -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);
-
-        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;
-        }
+	CFURLRef libURL;
+
+	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;
 }
-