Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv14373/squeak/platforms/Mac OS/vm
Modified Files:
sqMacExternalPrims.c
Log Message:
3.7.0b2 Changes for file name encoding. Ensure we use current encoding when working with file names. Change logic in vmPath, imageName, shortImageName, documentName to support CFString which we convert to desired encoding at read time.
Index: sqMacExternalPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacExternalPrims.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** sqMacExternalPrims.c 3 Oct 2003 18:59:08 -0000 1.5
--- sqMacExternalPrims.c 2 Dec 2003 04:52:11 -0000 1.6
***************
*** 12,15 ****
--- 12,16 ----
* Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments
* Oct 2nd, 2003, JMM bug in browser file name creation in os-x, rework how path is resolved
+ 3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding
*****************************************************************************/
***************
*** 17,22 ****
#include "sqMacExternalPrims.h"
#include "sqMacFileLogic.h"
- extern char vmPath[];
CFragConnectionID LoadLibViaPath(char *libName, char *pluginDirPath);
void createBrowserPluginPath(char *pluginDirPath);
--- 18,23 ----
#include "sqMacExternalPrims.h"
#include "sqMacFileLogic.h"
+ #include "sqMacEncoding.h"
CFragConnectionID LoadLibViaPath(char *libName, char *pluginDirPath);
void createBrowserPluginPath(char *pluginDirPath);
***************
*** 37,41 ****
/* first, look in the "<Squeak VM directory>Plugins" directory for the library */
! strcpy(pluginDirPath, vmPath);
#ifdef BROWSERPLUGIN
--- 38,42 ----
/* first, look in the "<Squeak VM directory>Plugins" directory for the library */
! getVMPathWithEncoding(pluginDirPath,gCurrentVMEncoding);
#ifdef BROWSERPLUGIN
***************
*** 50,54 ****
#ifndef BROWSERPLUGIN
/* second, look directly in Squeak VM directory for the library */
! libHandle = LoadLibViaPath(pluginName, vmPath);
if (libHandle != nil) return (int) libHandle;
--- 51,56 ----
#ifndef BROWSERPLUGIN
/* second, look directly in Squeak VM directory for the library */
! getVMPathWithEncoding(pluginDirPath,gCurrentVMEncoding);
! libHandle = LoadLibViaPath(pluginName, pluginDirPath);
if (libHandle != nil) return (int) libHandle;
***************
*** 178,182 ****
return nil;
! theString = CFStringCreateWithCString(kCFAllocatorDefault,lookupName,kCFStringEncodingMacRoman);
if (theString == nil)
return nil;
--- 180,184 ----
return nil;
! theString = CFStringCreateWithCString(kCFAllocatorDefault,lookupName,gCurrentVMEncoding);
if (theString == nil)
return nil;
***************
*** 220,224 ****
// So go back to a cheaper call
filePath = CFStringCreateWithCString(kCFAllocatorDefault,
! (UInt8 *) tempDirPath,kCFStringEncodingMacRoman);
if (filePath == nil)
return nil;
--- 222,226 ----
// So go back to a cheaper call
filePath = CFStringCreateWithCString(kCFAllocatorDefault,
! (UInt8 *) tempDirPath,gCurrentVMEncoding);
if (filePath == nil)
return nil;
***************
*** 234,238 ****
if (theBundle == nil) {
CFStringRef libNameCFString;
! libNameCFString = CFStringCreateWithCString(kCFAllocatorDefault,libName,kCFStringEncodingMacRoman);
err = LoadFrameworkBundle(libNameCFString, &theBundle);
CFRelease(libNameCFString);
--- 236,240 ----
if (theBundle == nil) {
CFStringRef libNameCFString;
! libNameCFString = CFStringCreateWithCString(kCFAllocatorDefault,libName,gCurrentVMEncoding);
err = LoadFrameworkBundle(libNameCFString, &theBundle);
CFRelease(libNameCFString);
|