aboutsummaryrefslogtreecommitdiff
path: root/src/libc.hff
diff options
context:
space:
mode:
Diffstat (limited to 'src/libc.hff')
-rw-r--r--src/libc.hff14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libc.hff b/src/libc.hff
index 7e2268c..a231614 100644
--- a/src/libc.hff
+++ b/src/libc.hff
@@ -3,11 +3,14 @@ struct FILE;
extern static stdin *FILE,
stdout *FILE,
stderr *FILE;
-extern fn printf(fmt *const u8, ...) void;
-extern fn fprintf(fp *FILE, fmt *const u8, ...) void;
+extern fn printf(fmt *const u8, ...) int;
+extern fn fprintf(fp *FILE, fmt *const u8, ...) int;
+extern fn sprintf(*u8, fmt *const u8, ...) int;
+extern fn snprintf(*u8, usize, fmt *const u8, ...) int;
extern fn fopen(path *const u8, mode *const u8) *FILE;
-extern fn fclose(fp *FILE) int;
-extern fn fgetc(fp *FILE) int;
+extern fn fclose(*FILE) int;
+extern fn fgetc(*FILE) int;
+extern fn fputc(int, *FILE) int;
def EOF = -1;
// stdlib.h
@@ -21,3 +24,6 @@ extern fn free(p *void) void;
// string.h
extern fn strlen(s *const u8) usize;
extern fn strcmp(a *const u8, b *const u8) int;
+
+//ctype.h
+extern fn tolower(int) int;