" Smalltalk/Smalltalk.st -*- Smalltalk -*- " Smalltalk : Object () Smalltalk quit { exit(0); } Smalltalk abort { fflush(stdout); fprintf(stderr, "\nSmalltalk abort\n"); fflush(stderr); abort(); } Smalltalk argumentCount { return _integerObject(_argc); } Smalltalk argumentAt: index [ | _value | index >= self argumentCount ifTrue: [^nil]. { v__value= (oop)_argv[_integerValue(v_index)] }. ^String _value: _value ] Smalltalk arguments [ | argc argv | argc := self argumentCount. argv := Array new: argc. 0 to: argc - 1 do: [:index | argv at: index put: (self argumentAt: index)]. ^argv ] Smalltalk osError { return _integerObject(errno); } Smalltalk _osErrorString: errno { return (oop)strerror(_integerValue(v_errno)); } Smalltalk osErrorString: errno [ ^String _value: (self _osErrorString: errno) ] Smalltalk osErrorString [ ^self osErrorString: self osError ] Smalltalk garbageCollect { GC_gcollect(); } Smalltalk bytesFree { return _integerObject(GC_get_heap_size()); }