search for: r_readconsole

Displaying 20 results from an estimated 25 matches for "r_readconsole".

2005 Mar 18
2
Trouble debugging with gdb, R on Windows
...(gdb) run Starting program: y:\falcon\src\R-devel\src\gnuwin32/../../bin/Rgui.exe Breakpoint 1, WinMain (Instance=0x400000, PrevInstance=0x0, CmdLine=0x261f26 "", CmdShow=10) at ../graphapp/graphappmain.c:59 59 startgraphapp(Instance, PrevInstance, CmdShow); (gdb) break R_ReadConsole Cannot access memory at address 0x23e17 (gdb) info symbol 0x23e17 R_ReadConsole in section .text (gdb) Any suggestions? Attempting to set other break points (do_BLAH) gives the same result. I compiled with 'make DEBUG=T' per the instructions on Duncan Murdoch's Building R for Windows...
2014 Oct 12
1
Is this an incorrect use of the R-API?
...eate a small extension for R here for embedding the current time on the R prompt: https://github.com/musically-ut/extPrompt Things seem to be working overall, but `R CMD check .` raised a warning: > File '[truncated]..Rcheck/extPrompt/libs/extPrompt.so?: > Found non-API call to R: ?ptr_R_ReadConsole? > > Compiled code should not call non-API entry points in R. The concerned file is this: https://github.com/musically-ut/extPrompt/blob/master/src/extPrompt.c and occurs on line 38, I think [1]. I am trying to make the R_ReadConsole API call. However, since a different plugin (like mine) c...
2014 Oct 27
0
Calling the original function after tweaking arguments is an incorrect use of the R-API?
...ing to create a small extension for R here for embedding the current time on the R prompt:https://github.com/musically-ut/extPrompt Things seem to be working overall, but R CMD check . raised a warning: File '[truncated]..Rcheck/extPrompt/libs/extPrompt.so?: Found non-API call > to R: ?ptr_R_ReadConsole? Compiled code should not call non-API entry points in R. The concerned file is this: https://github.com/musically-ut/extPrompt/blob/master/src/extPrompt.c and occurs on line 38, I think. void extPrompt() { > // Initialize the plugin by replacing the R_ReadConsole function > old_R...
2010 Jul 21
1
Plot window does not update in embedded code
...y very condensed and very simplified version of the code is included below. The program can create plots. However, after the plot is initially drawn it is no longer updated. When scaling or updating the plot the window becomes blank, and the window also doesn't want to close. I suspect that my R_ReadConsole routine is the problem. This routine waits for user input and returns this (which I thought it should). It seems that this causes the event loop that updates the windows to also be on hold. I did have a look at 'Rstd_ReadConsole' in 'src/unix/sys-std.c', but I can't figure out w...
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
...\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 similar */ return (int) *ConsoleBu...
2006 Feb 03
1
Interfacing C-code (gets and printf) under WINDOWS (Visual C++)
...king for an answer on the WEB and intercepted some pieces of answers ... but I did not succeed in getting a workable solution. This is the reason why I put this open question here today. I did not find lots of information about the gets solution. Finally, I have chosen to use R_WriteConsole and R_ReadConsole which seemed to be promising solutions. I discovered an information saying that starting R-2.0.1, the include file R-interface.h could help me. This is the reason why I downloaded the latest version available on the R site (R-2.2.1). Unfortunately, I did not find such a file in the include dir...
2000 Jul 11
1
Help: R seg faults
...dler_install (prompt=0x4093c210 "> ", linefunc=0x80e8798 <readline_handler>) at callback.c:95 #4 0x80e89b5 in Rstd_ReadConsole (prompt=0x4093c210 "> ", buf=0xbfffeedc "", len=1024, addtohistory=1) at ../../../R-1.1.0/src/unix/sys-std.c:357 #5 0x80e6b2e in R_ReadConsole (prompt=0x4093c210 "> ", buf=0xbfffeedc "", len=1024, addtohistory=1) at ../../../R-1.1.0/src/unix/system.c:66 #6 0x8097d78 in R_ReplConsole (rho=0x40296338, savestack=0, browselevel=0) at ../../../R-1.1.0/src/main/main.c:128 #7 0x80985e2 in run_Rmainloop () at ../../../R-1...
2001 Jul 03
0
(PR#1008) SIGSEGV under 1.1.1 too
...7e in rl_callback_read_char () from /usr/lib/libreadline.so.3 #5 0x80e4a8f in Rstd_ReadConsole (prompt=0x40982210 "> ", buf=0xbffff038 "for (i in 1:100) an1 <- ann(cbind(runif(1000), runif(1000)), k = 4)\n", len=1024, addtohistory=1) at sys-std.c:376 #6 0x80e2b6e in R_ReadConsole (prompt=0x40982210 "> ", buf=0xbffff038 "for (i in 1:100) an1 <- ann(cbind(runif(1000), runif(1000)), k = 4)\n", len=1024, addtohistory=1) at system.c:66 #7 0x8093618 in R_ReplConsole (rho=0x402dc338, savestack=0, browselevel=0) at main.c:128 #8 0x8093e86 in run...
2001 Nov 26
0
debugging R-devel on WinNT (was RE: zlib location)
...drive/c/WINNT/system32/LZ32.dll": error reading line numbers Breakpoint 1, WinMain (Instance=0x400000, PrevInstance=0x0, CmdLine=0x232b0b "", CmdShow=10) at ../graphapp/graphappmain.c:94 Starting program: /cygdrive/c/Rtools/R-devel1105/src/gnuwin32/../../bin/Rgui.exe (gdb) break R_ReadConsole Error: Cannot access memory at address 0x1f9a4 I tried adding the directories where several source files are (e.g., src/main, src/gnuwin32, src/gnuwin32/graphapp, and src/gnuwin32/front-ends), but still get the same thing. Also, as R starts, I get a bunch of dialog boxes that complained about DLL...
2008 Aug 06
1
RGtk2 on linux: "stack smashing detected"
...b68233ac] > /usr/lib/libgtk-x11-2.0.so.0(gtk_main_iteration+0x34)[0xb6cc70d4] > > /usr/lib/R/site-library/RGtk2/libs/RGtk2.so(R_gtk_eventHandler+0x19)[0xb6f9fb19] > /usr/lib/R/lib/libR.so(R_runHandlers+0x46)[0xb7db9586] > /usr/lib/R/lib/libR.so[0xb7dba98f] > /usr/lib/R/lib/libR.so(R_ReadConsole+0x35)[0xb7db7945] > /usr/lib/R/lib/libR.so(Rf_ReplIteration+0x42b)[0xb7cea63b] > /usr/lib/R/lib/libR.so(run_Rmainloop+0x102)[0xb7cea7b2] > /usr/lib/R/lib/libR.so(Rf_mainloop+0x1c)[0xb7cea80c] > /usr/lib/R/bin/exec/R(main+0x46)[0x8048776] > /lib/tls/i686/cmov/libc.so.6(__libc_start_ma...
2007 Feb 21
3
non-interactive R_tryEval does not return
...at least I think that is what happens, at least on some configurations. Here's a repeatable example: cd R_HOME/tests/Embedding touch tmp.R make tryEval and then (correct) > ./tryEval --slave Error in sqrt("") : Non-numeric argument to mathematical function Caught an error calling sqrt(). Try again with a different argument. [1] 3 versus (non-interactive; no return) >
2003 Mar 20
3
command line limit?
Is there a limit on the length of a command line in R? Thanks, Dan
2003 Aug 29
1
about REPL and loops in general ...
...d I'm not happy with the current REPL, since it prevents any general solution. Are there plans to improve the current REPL anytime soon? The current approach has some deficiencies you are surely aware of (only one input (=external event loop), the loop is blocked while waiting for input in R_ReadConsole, ...). But the major problem is that several packages/modules simply replace the standard REPL with their own implementations by not returning control to the loop. This virtually prevents any cooperation - it is impossible to load two such modules at a time without breaking something. I think...
1999 Mar 14
2
y with diaeresis (PR#143)
...--------- > ΓΏ Save workspace image? [y/n/c]: ---------------------------------------------------------------------------- i.e, 'y diaeresis' seems interpreted as an EOF. I don't know where is the solution but problem seems due to the conversions from int to char (made implicitly by R_ReadConsole) and then back to int made in src/main/gram.y(buffer_getc). Result is that the 'if (c==EOF)' test in that function is true when c='y diaeresis'. Indeed: ---------------------------------------------------------------------------- [~/tmp]% cat a.c #include <stdio.h> int main(...
1998 Mar 15
5
R-beta: R with gnuwin32
...he library which is not the gnu rl one? (d2) Have someone tried to use some free regex library under mingw32? (e) The last point is a proposal for a medium term project. The modifications that I made were necessary to update the windows sources to the changes made in the system interface (R_ReadConsole, R_WriteConsole,....). Now, the gnuplot people has developed a layer between stdio and a windows console (a graphics not a ms-dos one). In this way, for example, just doing some #undef and some #define, you can printf on the console. They also have a version of readline. If we borrow the layer we...
1998 Mar 15
5
R-beta: R with gnuwin32
...he library which is not the gnu rl one? (d2) Have someone tried to use some free regex library under mingw32? (e) The last point is a proposal for a medium term project. The modifications that I made were necessary to update the windows sources to the changes made in the system interface (R_ReadConsole, R_WriteConsole,....). Now, the gnuplot people has developed a layer between stdio and a windows console (a graphics not a ms-dos one). In this way, for example, just doing some #undef and some #define, you can printf on the console. They also have a version of readline. If we borrow the layer we...
2007 Jan 30
1
Solaris 10 compilation issue
...connections.o do_syssleep names.o R_EditFiles platform.o R_getProcTime memory.o R_ExpandFileName Renviron.o R_OpenInitFile main.o R_getClockIncrement eval.o R_ReadConsole connections.o Rf_initialize_R Rmain.o call_dqags registration.o call_dqagi registration.o deflateEnd connections.o ptr_R_EditFile ../unix/libunix.a(edit.o) infla...
2007 Jan 30
1
Difficulty with compiling R-2.4.1 on solaris 10
...connections.o do_syssleep names.o R_EditFiles platform.o R_getProcTime memory.o R_ExpandFileName Renviron.o R_OpenInitFile main.o R_getClockIncrement eval.o R_ReadConsole connections.o Rf_initialize_R Rmain.o call_dqags registration.o call_dqagi registration.o deflateEnd connections.o ptr_R_EditFile ../unix/libunix.a(edit.o) infla...
2007 Jan 30
0
R Compiling issue
...f arithmetic.o Rf_pt arithmetic.o Rf_qf arithmetic.o Rf_qt arithmetic.o Rf_rf random.o Rf_rt random.o chol_ registration.o gzeof connections.o do_syssleep names.o R_EditFiles platform.o R_getProcTime memory.o R_ExpandFileName Renviron.o R_OpenInitFile main.o R_getClockIncrement eval.o R_ReadConsole connections.o Rf_initialize_R Rmain.o call_dqags registration.o call_dqagi registration.o deflateEnd connections.o ptr_R_EditFile ../unix/libunix.a(edit.o) inflateEnd connections.o Rf_lchoose arithmetic.o R_ChooseFile platform.o lminfl_ registration.o deflateInit2_ connections.o N01_kind...
2007 Jan 30
0
Issue with compiling R on solaris 10
...connections.o do_syssleep names.o R_EditFiles platform.o R_getProcTime memory.o R_ExpandFileName Renviron.o R_OpenInitFile main.o R_getClockIncrement eval.o R_ReadConsole connections.o Rf_initialize_R Rmain.o call_dqags registration.o call_dqagi registration.o deflateEnd connections.o ptr_R_EditFile ../unix/libunix.a(edit.o) infla...