File tree 3 files changed +12
-1
lines changed
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ add_executable(cnex
12
12
number.c
13
13
stack.c
14
14
util.c
15
+ lib/random.c
15
16
)
16
17
if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
17
18
set_target_properties (cnex PROPERTIES COMPILE_FLAGS "-std=c99 -Wall -Werror" )
Original file line number Diff line number Diff line change 22
22
"-g" ,
23
23
])
24
24
25
+ envcnex .Append (CPPPATH = [Dir ("." )])
26
+
27
+ rtl_c = ([
28
+ "lib/random.c" ,
29
+ ])
30
+
25
31
cnex = envcnex .Program ("cnex" , [
26
32
"array.c" ,
27
33
"bytecode.c" ,
@@ -34,6 +40,7 @@ cnex = envcnex.Program("cnex", [
34
40
"number.c" ,
35
41
"stack.c" ,
36
42
"util.c" ,
43
+ rtl_c ,
37
44
],
38
45
)
39
46
Original file line number Diff line number Diff line change 1
1
#include "global.h"
2
2
3
+ #include "lib/random.h"
4
+
3
5
#include <assert.h>
4
6
#include <stdarg.h>
5
7
#include <stdint.h>
17
19
#include "util.h"
18
20
19
21
20
-
21
22
#define PDFUNC (name , func ) { name, (void (*)(TExecutor *))(func) }
22
23
23
24
TDispatch gfuncDispatch [] = {
@@ -36,6 +37,8 @@ TDispatch gfuncDispatch[] = {
36
37
37
38
PDFUNC ("io$fprint" , io_fprint ),
38
39
40
+ PDFUNC ("random$uint32" , random_uint32 ),
41
+
39
42
PDFUNC ("sys$exit" , sys_exit ),
40
43
41
44
PDFUNC ("array__append" , array__append ),
You can’t perform that action at this time.
0 commit comments