aboutsummaryrefslogtreecommitdiff
path: root/source/common.elna
diff options
context:
space:
mode:
Diffstat (limited to 'source/common.elna')
-rw-r--r--source/common.elna12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/common.elna b/source/common.elna
index 1bdfa1f..c5b67f8 100644
--- a/source/common.elna
+++ b/source/common.elna
@@ -17,13 +17,13 @@ type
proc write*(fd: Int; buf: Pointer; Word: Int): Int
extern
-proc write_s*(value: []const Char)
+proc write_s*(value: []const Word8)
begin
(* fwrite(cast(value.ptr: Pointer), value.length, 1u, stdout) *)
write(1, cast(value.ptr: Pointer), cast(value.length: Int))
return
-proc write_z*(value: ^Char)
+proc write_z*(value: ^Word8)
begin
write(1, cast(value: Pointer), cast(strlen(value): Int))
return
@@ -37,7 +37,7 @@ begin
end
return
-proc write_c*(value: Char)
+proc write_c*(value: Word8)
begin
putchar(cast(value: Int));
fflush(nil)
@@ -47,7 +47,7 @@ proc write_i*(value: Int)
var
digit: Int
n: Word
- buffer: [10]Char
+ buffer: [10]Word8
begin
n := 10u;
@@ -58,7 +58,7 @@ begin
digit := value % 10;
value := value / 10;
- buffer[n] := cast(cast('0': Int) + digit: Char);
+ buffer[n] := cast(cast('0': Int) + digit: Word8);
n := n - 1u
end;
while n < 10u do
@@ -78,7 +78,7 @@ begin
return nil
(* Returns true or false depending whether two strings are equal. *)
-proc string_compare*(lhs_pointer: ^Char; lhs_length: Word; rhs_pointer: []const Char): Bool
+proc string_compare*(lhs_pointer: ^Word8; lhs_length: Word; rhs_pointer: []const Word8): Bool
var
result: Bool
begin