From c8cddbe2715c2d3df6c69823b7972b55b43261c8 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 19 Jun 2026 23:52:02 +0200 Subject: Delcare extern procedures from libc --- boot/stage23/cl.elna | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'boot/stage23/cl.elna') 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 -- cgit v1.2.3