// pass the remaining command-line arguments to the world void passArguments(int argumentCount, char ** arguments) { mainContext = createMainContext(); exceptionHandlerContext = createExceptionHandlerContext(); // pass all remaining arguments to the script; // place them all directly to the old space since they will live forever OP argumentArray = instantiateClassInOldSpace(ARRAY_OP, argumentCount, 0); for(int index = 0; index < argumentCount; ++index) { int argLength = strlen(arguments[index]); OP argumentString = instantiateClassInOldSpace(STRING_OP, argLength, 0); for(int charIndex = 0; charIndex < argLength; ++charIndex) { storeIndexablePointer(argumentString, charIndex, characterObjectOf(arguments[index][charIndex])); } storeIndexablePointer(argumentArray, index, argumentString); } switchActiveContext(exceptionHandlerContext); activeContextStackPush(argumentArray); sendSelector(OBJECT_ARGUMENTS_SELECTOR_OP, SCRIPTRUNNER_OP, 1); runInterpreter(); mainContext = OBJECT_NIL_OP; exceptionHandlerContext = OBJECT_NIL_OP; }
primitiveDirectoryDelimitor(void) { // FilePlugin>>#primitiveDirectoryDelimitor sqInt ascii; ascii = asciiDirectoryDelimiter(); if ((interpreterProxy->minorVersion()) >= 13) { popthenPush(1, characterObjectOf(ascii)); } else { if ((ascii >= 0) && (ascii <= 0xFF)) { popthenPush(1, fetchPointerofObject(ascii, characterTable())); } else { primitiveFail(); } } }