flush
[m6w6/ext-psi] / psi.d / stdio.psi
index 3e54ac4dd57bcf485909a6d1cf277c99e3a84091..6909354f4be5f2e4dcead79393b704c58937f32f 100644 (file)
@@ -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);
+}
+