/red-system/runtime/darwin.reds
Unknown | 39 lines | 33 code | 6 blank | 0 comment | 0 complexity | 91424752f9c6b5de1279fd974792d716 MD5 | raw file
1Red/System [ 2 Title: "Red/System MacOS X runtime" 3 Author: "Nenad Rakocevic" 4 File: %darwin.reds 5 Rights: "Copyright (C) 2011 Nenad Rakocevic. All rights reserved." 6 License: { 7 Distributed under the Boost Software License, Version 1.0. 8 See https://github.com/dockimbel/Red/blob/master/red-system/runtime/BSL-License.txt 9 } 10] 11 12#define OS_TYPE 4 13 14#syscall [ 15 write: 4 [ 16 fd [integer!] 17 buffer [c-string!] 18 count [integer!] 19 return: [integer!] 20 ] 21] 22 23#if use-natives? = yes [ 24 #syscall [ 25 quit: 1 [ ;-- "exit" syscall 26 status [integer!] 27 ] 28 ] 29] 30 31;------------------------------------------- 32;-- Retrieve command-line information from stack 33;------------------------------------------- 34system/args-count: pop 35system/args-list: as str-array! system/stack/top 36system/env-vars: system/args-list + system/args-count + 1 37 38 39#include %BSD.reds