Skip to content

Commit b0412a6

Browse files
committed
FIX: posix error: too many arguments to function ‘Open_StdIO’
related to: #65
1 parent d873482 commit b0412a6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/os/host-main.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ extern void Init_Ext_Test(void); // see: host-ext-test.c
108108
#endif
109109

110110
// Host bare-bones stdio functs:
111-
extern REBREQ *Open_StdIO(void);
111+
extern REBREQ *Open_StdIO(REBOOL cgi);
112112
extern void Close_StdIO(void);
113113
extern void Put_Str(REBYTE *buf);
114114
extern REBYTE *Get_Str(void);
@@ -343,12 +343,15 @@ int main(int argc, char **argv) {
343343
REBYTE vers[8];
344344
REBINT n;
345345
REBREQ *std_io;
346+
REBOOL cgi;
346347

347348
Parse_Args(argc, (REBCHR **)argv, &Main_Args);
348349

350+
cgi = Main_Args.options & RO_CGI;
351+
349352
// Must be done before an console I/O can occur. Does not use reb-lib,
350353
// so this device should open even if there are other problems.
351-
std_io = Open_StdIO((Main_Args.options & RO_CGI)); // also sets up interrupt handler
354+
std_io = Open_StdIO(cgi); // also sets up interrupt handler
352355

353356
Host_Lib = &Host_Lib_Init;
354357

@@ -390,7 +393,7 @@ int main(int argc, char **argv) {
390393
#endif
391394

392395
if (
393-
!(Main_Args.options & RO_CGI)
396+
!cgi
394397
&& (
395398
!Main_Args.script // no script was provided
396399
|| n < 0 // script halted or had error

0 commit comments

Comments
 (0)