X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=psi.d%2Fstdio.psi;h=6909354f4be5f2e4dcead79393b704c58937f32f;hp=3e54ac4dd57bcf485909a6d1cf277c99e3a84091;hb=c9b3436bd51a4dcf7d6cc6817d4c7a8ad99538d4;hpb=974c9580535a1668dd6eed9992d582ebcc29b27a diff --git a/psi.d/stdio.psi b/psi.d/stdio.psi index 3e54ac4..6909354 100644 --- a/psi.d/stdio.psi +++ b/psi.d/stdio.psi @@ -2,7 +2,7 @@ function psi\fopen(string $path, string $mode) : object { let path = pathval($path); let mode = strval($mode); - return to_object(*fopen); + return to_object(fopen); } // extern int fclose(FILE *stream); @@ -64,3 +64,10 @@ function psi\rewind(object $stream) : void { let stream = objval($stream); return void(rewind); } + +//extern int printf(const char *format, ...); +function psi\printf(string $fmt, mixed ...$args) : int { + let format = strval($fmt); + return to_int(printf); +} +