Displaying 4 results from an estimated 4 matches for "console_buffer_size".
1997 Dec 31
0
R-beta: small patch for R-0.61 on SGI Irix 5.3
...f77 compilers, but it dumped core
in scan.c: ConsoleGetchar(), so I waited for 0.61.  This had the same
problem, which appears to be fixed by the following patch:
*** scan.c.000	Fri Nov 21 00:06:43 1997
--- scan.c	Wed Dec 31 12:11:05 1997
***************
*** 27,33 ****
  
  static char  ConsoleBuf[CONSOLE_BUFFER_SIZE];
  static char *ConsoleBufp;
! static char  ConsoleBufCnt;
  static char  ConsolePrompt[32];
  
  static void InitConsoleGetchar()
--- 27,33 ----
  
  static char  ConsoleBuf[CONSOLE_BUFFER_SIZE];
  static char *ConsoleBufp;
! static int  ConsoleBufCnt;
  static char  ConsolePrompt[32];
  
  stati...
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
...while ((c = ConsoleGetchar())!= '\n' && c != R_EOF) {
		if (bufp >= &buffer[MAXELTSIZE - 2]) continue;
		*bufp++ = c;
	    }
...
}
with ConsoleGetchar():
/* used by readline() and menu() */
static int ConsoleGetchar(void)
{
    if (--ConsoleBufCnt < 0) {
	ConsoleBuf[CONSOLE_BUFFER_SIZE] = '\0';
	if (R_ReadConsole(ConsolePrompt, ConsoleBuf,
			  CONSOLE_BUFFER_SIZE, 0) == 0) {
	    R_ClearerrConsole();
	    return R_EOF;
	}
	ConsoleBufp = ConsoleBuf;
	ConsoleBufCnt = strlen((char *)ConsoleBuf);
	ConsoleBufCnt--;
    }
    /* at this point we need to use unsigned char or si...
1999 Mar 25
4
readline() (PR#147)
Dear R developers,
I have found the following bug with readline() in R 0.63.3:
if you execute the menu-function and then the readline() function, then
readline() prompts "Selection:"
> a <- readline()
hello
> a
[1] "hallo"
> a <- menu(c("a", "b"), title="bitte:")
bitte: 
1:a 
2:b 
Selection: 2
> a <- readline()
Selection:
2015 Aug 21
0
Problems with embedded R, ReplDLL
...d 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 manual (doc/manual/R-exts.texi):
        R_ReplDLLinit();
        while(R_ReplDLLdo1()...