|
From: John M M. <jo...@us...> - 2003-10-03 18:59:12
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv16974/squeak/platforms/Mac OS/vm
Modified Files:
sqMacExternalPrims.c
Log Message:
3.5.2b6 Rework path name creation for browser plugin logic. It's busted in os-x, use different method to avoid os-x bug.
Index: sqMacExternalPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacExternalPrims.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sqMacExternalPrims.c 19 May 2003 07:19:49 -0000 1.4
--- sqMacExternalPrims.c 3 Oct 2003 18:59:08 -0000 1.5
***************
*** 11,14 ****
--- 11,15 ----
* NOTES:
* 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
*****************************************************************************/
***************
*** 19,22 ****
--- 20,24 ----
extern char vmPath[];
CFragConnectionID LoadLibViaPath(char *libName, char *pluginDirPath);
+ void createBrowserPluginPath(char *pluginDirPath);
/*** Mac Specific External Primitive Support ***/
***************
*** 38,42 ****
#ifdef BROWSERPLUGIN
! strcat(pluginDirPath, ":Plugins");
#else
strcat(pluginDirPath, "Plugins");
--- 40,44 ----
#ifdef BROWSERPLUGIN
! createBrowserPluginPath(pluginDirPath);
#else
strcat(pluginDirPath, "Plugins");
***************
*** 308,310 ****
return libHandle;
}
! #endif
\ No newline at end of file
--- 310,330 ----
return libHandle;
}
! #endif
!
! void createBrowserPluginPath(char *pluginDirPath) {
! int lengthOfPath = strlen(pluginDirPath);
! int i;
!
! lengthOfPath--;
! pluginDirPath[lengthOfPath] = 0x00;
!
! for (i=lengthOfPath;i>=0;i--) {
! if (pluginDirPath[i] == ':') {
! pluginDirPath[i] = 0x00;
! strcat(pluginDirPath, ":Plugins");
! return;
! }
! }
! /* shouldn't ever get here, path will always contain one : */
! }
!
|