File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed
Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change 1- #include <R_ext/Error.h>
2- #include <R_ext/Print.h>
1+ void Rf_error (const char * , ...);
2+ void Rprintf (const char * , ...);
3+
4+ //#include <R_ext/Error.h>
5+ //#include <R_ext/Print.h>
6+ #include <stdarg.h>
7+ #include <stdio.h>
8+ #include <stdlib.h>
39
410void Rf_abort () {
511 Rf_error ("Error!" );
@@ -9,13 +15,20 @@ void Rf_exit(int code) {
915 Rf_error ("Error: %d" , code );
1016}
1117
18+ void Rf_printf (void * file , const char * fmt , ...) {
19+ va_list args ;
20+ va_start (args , fmt );
21+ Rprintf (fmt , args );
22+ va_end (args );
23+ }
24+
1225#define abort Rf_abort
1326#define exit Rf_exit
1427#define _exit Rf_exit
15- #define fprintf ( file , ...) Rprintf(__VA_ARGS__)
16- #define putchar ( c ) Rprintf("%s", c)
17- #define stderr NULL
18- #define stdout NULL
28+ #define fprintf Rf_printf
29+ // #define putchar Rprintf
30+ // #define stderr NULL
31+ // #define stdout NULL
1932
2033#include "quickjs/cutils.c"
2134#include "quickjs/libbf.c"
You can’t perform that action at this time.
0 commit comments