aboutsummaryrefslogtreecommitdiff
path: root/source/sys/posix/cstdio.elna
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-10-08 19:45:19 +0200
committerEugen Wissner <belka@caraus.de>2026-10-08 19:45:19 +0200
commit7d07bef760a8807fe49fbe5c90799a1822f95973 (patch)
tree8b8d8ed0003dc61c4bd7313df86f6cbaea3d4b82 /source/sys/posix/cstdio.elna
parentd392f0c54a7748b816ab327758ae835f73cd1c0a (diff)
downloadelna-7d07bef760a8807fe49fbe5c90799a1822f95973.tar.gz
Make modules re-exportable
Diffstat (limited to 'source/sys/posix/cstdio.elna')
-rw-r--r--source/sys/posix/cstdio.elna59
1 files changed, 59 insertions, 0 deletions
diff --git a/source/sys/posix/cstdio.elna b/source/sys/posix/cstdio.elna
new file mode 100644
index 0000000..928c7e1
--- /dev/null
+++ b/source/sys/posix/cstdio.elna
@@ -0,0 +1,59 @@
+(* This Source Code Form is subject to the terms of the Mozilla Public License,
+ v. 2.0. If a copy of the MPL was not distributed with this file, You can
+ obtain one at https://mozilla.org/MPL/2.0/. *)
+module
+
+type
+ FILE* = extern
+
+var
+ stdin*: ^FILE := extern
+ stdout*: ^FILE := extern
+ stderr*: ^FILE := extern
+
+proc fopen*(pathname, mode: ^const Word8) -> ^FILE
+extern
+
+proc fclose*(stream: ^FILE) -> Int
+extern
+
+proc fseek*(stream: ^FILE; off: Int; whence: Int) -> Int
+extern
+
+proc rewind*(stream: ^FILE)
+extern
+
+proc ftell*(stream: ^FILE) -> Int
+extern
+
+proc fflush*(stream: ^FILE) -> Int
+extern
+
+proc fread*#[T](ptr: ^T; size: Word; nmemb: Word; stream: ^FILE) -> Word
+extern
+
+proc fwrite*#[T](ptr: ^const T; size: Word; nitems: Word; stream: ^FILE) -> Word
+extern
+
+proc fputc*(c: Int; stream: ^FILE) -> Word
+extern
+
+proc perror*(s: ^const Word8)
+extern
+
+proc puts*(s: ^const Word8) -> Int
+extern
+
+proc putchar*(c: Int) -> Int
+extern
+
+proc sprintf*(str: ^Word8; format: ^const Word8) #{varargs} -> Int
+extern
+
+proc fprintf*(stream: ^FILE; format: ^const Word8) #{varargs} -> Int
+extern
+
+proc fdopen*(fildes: Int; mode: ^const Word8) -> ^FILE
+extern
+
+end.