diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index 117c0d830..749a758b1 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -33903,7 +33903,7 @@ qbs *func__readfile(qbs *filespec) } } -int16_t func__writefile(qbs *filespec, qbs *contents) +void sub__writefile(qbs *filespec, qbs *contents) { FILE *file; // file handle; qbs *namez; // 0-term file name; @@ -33915,10 +33915,8 @@ int16_t func__writefile(qbs *filespec, qbs *contents) if (file) { fwrite(contents -> chr, 1, contents -> len, file); fclose(file); - return -1; // return "success" flag true } else { error(QB_ERROR_PATH_FILE_ACCESS_ERROR); // error, we throw best fit - return 0; // return "success" flag false } } diff --git a/internal/c/qbx.cpp b/internal/c/qbx.cpp index 12d57b83f..4ff096e38 100755 --- a/internal/c/qbx.cpp +++ b/internal/c/qbx.cpp @@ -107,7 +107,7 @@ extern int32 func__resizeheight(); extern void sub__title(qbs *title); extern void sub__echo(qbs *message); extern qbs *func__readfile(qbs *filespec); -extern int16_t func__writefile(qbs *filespec, qbs *contents); +extern void sub__writefile(qbs *filespec, qbs *contents); extern void sub__assert(int32 expression, qbs *assert_message, int32 passed); extern void sub__finishdrop(); extern int32 func__filedrop(); diff --git a/source/subs_functions/subs_functions.bas b/source/subs_functions/subs_functions.bas index 2a92ccfa6..a59da6608 100644 --- a/source/subs_functions/subs_functions.bas +++ b/source/subs_functions/subs_functions.bas @@ -1024,11 +1024,10 @@ regid clearid id.n = qb64prefix$ + "WriteFile" -id.subfunc = 1 -id.callname = "func__writefile" +id.subfunc = 2 +id.callname = "sub__writefile" id.args = 2 id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.ret = INTEGERTYPE - ISPOINTER id.hr_syntax = "_WRITEFILE(fileSpec$, contents$)" regid