From 7ab6e1021611cc6913ee4ab5faf1b31f928a65e9 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 13 Nov 2026 12:01:17 +0100 Subject: Create parser stubs --- source/sys/posix/stdio.elna | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'source/sys/posix/stdio.elna') diff --git a/source/sys/posix/stdio.elna b/source/sys/posix/stdio.elna index 39756a8..c667f43 100644 --- a/source/sys/posix/stdio.elna +++ b/source/sys/posix/stdio.elna @@ -3,13 +3,27 @@ obtain one at https://mozilla.org/MPL/2.0/. *) module -proc printf*(format: ^const Word8) #{varargs} -> Int +import sys.ffi, bits.stdio* + +proc fprintf*(stream: ^FILE; format: ^const CChar) #{varargs} -> CInt +extern + +proc printf*(format: ^const CChar) #{varargs} -> CInt +extern + +proc fputs*(s: ^const CChar; stream: ^FILE) -> CInt +extern + +proc puts*(s: ^const CChar) -> CInt extern -proc puts*(s: ^const Word8) -> Int +proc fputc*(c: CInt; stream: ^FILE) -> CInt extern -proc putchar*(c: Int) -> Int +proc putc*(c: CInt; stream: ^FILE) -> CInt +return fputc(c, stream) + +proc putchar*(c: CInt) -> CInt extern end. -- cgit v1.2.3