Implement functions to get stdin, stdout & stderr
All checks were successful
Release / release (push) Successful in 2s

This commit is contained in:
2026-05-17 12:21:23 +01:00
parent 515493b963
commit 2e5163ba33
3 changed files with 34 additions and 9 deletions

View File

@@ -12,9 +12,6 @@ BEGIN_C_LINKAGE
#endif // !WAPP_PLATFORM_CPP
typedef struct WFile WFile;
wapp_extern WFile *WF_STDIN;
wapp_extern WFile *WF_STDOUT;
wapp_extern WFile *WF_STDERR;
typedef enum {
WAPP_ACCESS_READ, // Equivalent to r
@@ -37,6 +34,9 @@ typedef enum {
FILE_SEEK_ORIGIN_COUNT,
} FileSeekOrigin;
wapp_extern WFile *wapp_file_stdin(void);
wapp_extern WFile *wapp_file_stdout(void);
wapp_extern WFile *wapp_file_stderr(void);
WFile *wapp_file_open(const Allocator *allocator, Str8RO *filepath, FileAccessMode mode);
i64 wapp_file_get_current_position(WFile *file);
i64 wapp_file_seek(WFile *file, i64 offset, FileSeekOrigin origin);