diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-06-19 23:52:02 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-06-19 23:52:02 +0200 |
| commit | c8cddbe2715c2d3df6c69823b7972b55b43261c8 (patch) | |
| tree | b5effd13f46fd753215870360b3812950174b610 /boot/stage23 | |
| parent | 9515e2f77e8e26590e7ca00ef18a6637d4fb156a (diff) | |
| download | elna-c8cddbe2715c2d3df6c69823b7972b55b43261c8.tar.gz | |
Delcare extern procedures from libc
Diffstat (limited to 'boot/stage23')
| -rw-r--r-- | boot/stage23/cl.elna | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/boot/stage23/cl.elna b/boot/stage23/cl.elna index 8eb2abb..caebd84 100644 --- a/boot/stage23/cl.elna +++ b/boot/stage23/cl.elna @@ -668,6 +668,7 @@ var word_type: ^ElnaType char_type: ^ElnaType bool_type: ^ElnaType + int_type: ^ElnaType string_type: ^ElnaTypeRecord source_code: Word @@ -2342,7 +2343,7 @@ begin token := elna_lexer_read(cursor); buffer := malloc(token^.start.length + 1); - bzero(buffer, token^.start.length + 1); + memset(buffer, 0, token^.start.length + 1); memcpy(buffer, token^.start.ptr, token^.start.length); result^.kind := ElnaTreeKind.integer_literal; @@ -5834,6 +5835,13 @@ begin current_info := type_info_create(word_type); elna_symbol_table_enter(symbol_table_global, "Word".ptr, 4, current_info); + int_type := malloc(#size(ElnaType)); + int_type^.kind := ElnaTypeKind.primitive; + int_type^.size := 4; + int_type^.alignment := 4; + current_info := type_info_create(int_type); + elna_symbol_table_enter(symbol_table_global, "Int".ptr, 3, current_info); + current_type := malloc(#size(ElnaType)); current_type^.kind := ElnaTypeKind.primitive; current_type^.size := 4; @@ -6538,8 +6546,8 @@ end proc initialize_global_state() begin - stdout := fdopen(1, "w\0"); - stderr := fdopen(2, "w\0"); + stdout := fdopen(1, "w\0".ptr); + stderr := fdopen(2, "w\0".ptr); compiler_strings_position := @compiler_strings; source_code := malloc(495616) end |
