search for: r_iobufferwritereset

Displaying 2 results from an estimated 2 matches for "r_iobufferwritereset".

2007 Jan 18
0
Emulating a REPL in frontends
...ile((c = *buffer++)) { R_IoBufferPutc(c, &R_ConsoleIob); if(c == ';' || c == '\n') break; } R_PPStackTop = 0; R_CurrentExpr = R_Parse1Buffer(&R_ConsoleIob, 0, &status); if(parse_status) *parse_status = status; switch(status) { case PARSE_NULL: R_IoBufferWriteReset(&R_ConsoleIob); break; case PARSE_OK: R_IoBufferReadReset(&R_ConsoleIob); R_CurrentExpr = R_Parse1Buffer(&R_ConsoleIob, 1, &status); R_Visible = FALSE; R_EvalDepth = 0; PROTECT(R_CurrentExpr); R_Busy(1); value = eval(R_CurrentExpr, rho); if(set_last_sym_value) SET_...
2015 Aug 21
0
Problems with embedded R, ReplDLL
...ded R, and in the process have found some problems with the examples given of embedded R use. One problem can be seen in R_ReplDLLinit, in src/main/main.c: void R_ReplDLLinit(void) { SETJMP(R_Toplevel.cjmpbuf); R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel; R_IoBufferWriteReset(&R_ConsoleIob); prompt_type = 1; DLLbuf[0] = DLLbuf[CONSOLE_BUFFER_SIZE] = '\0'; DLLbufp = DLLbuf; } The call of SETJMP makes no sense. Nothing that follows in this function can possibly cause a long jump. The use of R_ReplDLLinit is illustrated in the R Extensions manua...