|
From: Tim R. <row...@us...> - 2002-05-09 01:36:53
|
Update of /cvsroot/squeak/squeak/platforms/Cross/vm
In directory usw-pr-cvs1:/tmp/cvs-serv29610/platforms/Cross/vm
Modified Files:
sqNamedPrims.c
Log Message:
remove obsolete platform.exports file
Index: sqNamedPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Cross/vm/sqNamedPrims.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** sqNamedPrims.c 24 Oct 2001 23:13:24 -0000 1.1.1.1
--- sqNamedPrims.c 9 May 2002 01:36:50 -0000 1.2
***************
*** 13,16 ****
--- 13,24 ----
*****************************************************************************/
#include "sq.h"
+
+
+ typedef struct {
+ char *pluginName;
+ char *primitiveName;
+ void *primitiveAddress;
+ } sqExport;
+
#include "sqNamedPrims.h"
***************
*** 89,93 ****
void *result;
! dprintf(("Looking (externally) for %s ... ", functionName));
if(module->handle)
result = (void*) ioFindExternalFunctionIn(functionName, (int) module->handle);
--- 97,101 ----
void *result;
! dprintf(("Looking (externally) for %s in %s... ", functionName,module->name));
if(module->handle)
result = (void*) ioFindExternalFunctionIn(functionName, (int) module->handle);
***************
*** 106,142 ****
static void *findInternalFunctionIn(char *functionName, char *pluginName)
{
! char *function, *plugin;
! int index;
!
! dprintf(("Looking (internally) for %s in %s ... ", functionName, (pluginName ? pluginName : "<intrinsic>")));
!
! /* canonicalize functionName and pluginName to be NULL if not specified */
! if(functionName && !functionName[0]) functionName = NULL;
! if(pluginName && !pluginName[0]) pluginName = NULL;
!
! for(index=0;;index++) {
! plugin = internalPrimitiveNames[index][0];
! function = internalPrimitiveNames[index][1];
! /* canonicalize plugin and function to be NULL if not specified */
! if(plugin && !plugin[0]) plugin = NULL;
! if(function && !function[0]) function = NULL;
! if(!plugin && !function) {/* At end of table. */
! dprintf(("not found\n"));
! return NULL;
! }
! /* check for module name match */
! if((pluginName == NULL) != (plugin == NULL)) continue; /* one is missing */
! if(plugin && strcmp(pluginName, plugin)) continue; /* name mismatch */
! /* check for function name match */
! if((functionName == NULL) != (function == NULL)) continue; /* one is missing */
! if(function && strcmp(functionName, function)) continue; /* name mismatch */
- /* match */
- dprintf(("found\n"));
- return internalPrimitiveAddresses[index];
- }
}
--- 114,151 ----
static void *findInternalFunctionIn(char *functionName, char *pluginName)
{
! char *function, *plugin;
! int listIndex, index;
! sqExport *exports;
! dprintf(("Looking (internally) for %s in %s ... ", functionName, (pluginName ? pluginName : "<intrinsic>")));
! /* canonicalize functionName and pluginName to be NULL if not specified */
! if(functionName && !functionName[0]) functionName = NULL;
! if(pluginName && !pluginName[0]) pluginName = NULL;
! for(listIndex=0;; listIndex++) {
! exports = pluginExports[listIndex];
! if(!exports) break;
! for(index=0;; index++) {
! plugin = exports[index].pluginName;
! function = exports[index].primitiveName;
! /* canonicalize plugin and function to be NULL if not specified */
! if(plugin && !plugin[0]) plugin = NULL;
! if(function && !function[0]) function = NULL;
! if(!plugin && !function) break; /* At end of table. */
! /* check for module name match */
! if((pluginName == NULL) != (plugin == NULL)) continue; /* one is missing */
! if(plugin && strcmp(pluginName, plugin)) continue; /* name mismatch */
! /* check for function name match */
! if((functionName == NULL) != (function == NULL)) continue; /* one is missing */
! if(function && strcmp(functionName, function)) continue; /* name mismatch */
! /* match */
! dprintf(("found\n"));
! return exports[index].primitiveAddress;
! }
! }
! dprintf(("not found\n"));
! return NULL;
}
***************
*** 407,415 ****
}
/* Notify all interested parties about the fact */
- /* Lookup moduleUnloaded: from the vm core */
- {
- void *fn = findFunctionIn("moduleUnloaded", squeakModule);
- if(fn) {/* call it */ ((int (*) (char *))fn)(entry->name);}
- }
temp = firstModule;
while(temp) {
--- 416,419 ----
***************
*** 453,480 ****
char *ioListBuiltinModule(int moduleIndex)
{
! int index;
! char *function;
! char *plugin;
! for(index=0;;index++) {
! plugin = internalPrimitiveNames[index][0];
! function = internalPrimitiveNames[index][1];
! if(!function && !plugin) return NULL; /* no more plugins */
! if(strcmp(function,"setInterpreter") == 0) {
! /* new module */
! if(--moduleIndex == 0) {
! char *moduleName;
! void * init0;
!
! init0 = findInternalFunctionIn("getModuleName", plugin);
! if(init0) {
! /* Check the compiled name of the module */
! moduleName = ((char* (*) (void))init0)();
! if(moduleName) { return moduleName;}
! }
! return plugin;
! }
! }
}
}
--- 457,489 ----
char *ioListBuiltinModule(int moduleIndex)
{
! int index, listIndex;
! char *function;
! char *plugin;
! sqExport *exports;
! for(listIndex=0;; listIndex++) {
! exports = pluginExports[listIndex];
! if(!exports) break;
! for(index=0;; index++) {
! plugin = exports[index].pluginName;
! function = exports[index].primitiveName;
! if(!function && !plugin) break; /* no more plugins */
! if(strcmp(function,"setInterpreter") == 0) {
! /* new module */
! if(--moduleIndex == 0) {
! char *moduleName;
! void * init0;
! init0 = findInternalFunctionIn("getModuleName", plugin);
! if(init0) {
! /* Check the compiled name of the module */
! moduleName = ((char* (*) (void))init0)();
! if(moduleName) { return moduleName;}
! }
! return plugin;
}
+ }
+ }
+ }
+ return NULL;
}
|