Curses App and Cproto
ivelegacy (2674) 139 posts |
hi also, is there a port of dev-util/cproto for RiscOS ? sys-libs/ncurses app-editors/nano dev-util/cproto |
Ronald May (387) 407 posts |
is there any way to port unix applications which depend on libCurses ? The problem is Linux has a proper terminal to run these things in. The only terminal we have is in !Nettle (Ansi Task) No support for UTF-8, though it looks like nano can option that off. |
ivelegacy (2674) 139 posts |
I have launched !Nettle, did ssh connect to a linux machine (i386), and then launched nano: the ENTER key is not working at all with nano. |
Malcolm Hussain-Gambles (1596) 811 posts |
I’m intrigued why you would want to run nano (this isn’t a vi/emacs/pico debate, there’s no point, vi(m) wins) on RISC OS rather than !Zap (Obviously you wouldn’t run StrongEd ;-) ) As for the enter problem, have you checked your TERM setting is correct (i.e. the same on nettle as at the command line) |
ivelegacy (2674) 139 posts |
I prefer nano as terminal editor, it’s the gentoo default, also i want to develop my Apps using Curses I have implemented an editor from scratches, it is currently also used as “code flow” in a debug processor’s TAP. btw, i have already tried { vt100, vt220, linux } in Nettle without any progress: nano is still not working on the remote linux machine is there any port of Cproto ? i am reading this discussion about all troubles about input |
David Gee (1833) 268 posts |
My favourite UNIX text editor is e3—a small binary which can be called by several different names which give different keystroke commands. The default is WordStar; e3me gives Emacs key bindings, while I would usually use e3ne which uses NEdit key bindings: Home goes to start of line, End to end of line, Ctrl-s saves and so on (PC standard but not RISC OS). But this is one editor which cannot be ported to RISC OS. It’s written in X86 assembler. |
Malcolm Hussain-Gambles (1596) 811 posts |
Ah! termios.h, that brings back scary memories! I can’t really drive PICO/nano, not done for ages (20 years). nedit, the daddy of editors ;-) |
Ronald May (387) 407 posts |
btw, i have already tried { vt100, vt220, linux } in Nettle without any progress: nano is still not working on the remote linux machine I haven’t a SSH server running at the moment. You could try Ctrl j or Ctrl m instead of enter? Edit: a further thought, the remote nano may be relying on/expecting UTF-8? |
ivelegacy (2674) 139 posts |
I havent’ tried yet because I am far from my RiscPC (due to my job I need to drive a lot), it may be it’s UTF-8, it may be it’s an other trouble. I will try as soon as i will be back home. btw, is there any port of dev-util/cproto ? I really need it. |
Ronald May (387) 407 posts |
btw, is there any port of dev-util/cproto ? I really need it. I’ve never used it but cproto crosscompiled in a blink. I think though, it would be a good one for you to compile in RISC OS so you can make changes as you see fit. There is a pipe implentation using tempfile for the DOS port that could be useful in RISC OS for example. |
Matthew Phillips (473) 721 posts |
Very unlikely, I’d have thought, that this could be cause of the trouble. UTF-8 and ASCII are identically coded in the ASCII range of characters 0 to 127. It would only be an issue if you try typing pound signs (£) or anything else outside 7-bit ASCII range. |
Ronald May (387) 407 posts |
Very unlikely, I’d have thought, that this could be cause of the trouble. Thanks for the input, I can only add that the linux terminal may have some settings, but by the time nano runs it probably requires a particular environment and it could change. |
ivelegacy (2674) 139 posts |
@Ronald May |
ivelegacy (2674) 139 posts |
i have prepared a pretty launcher, which defines alias with the proper wimpslot of 8Myte, but cproto calls cpp (i have defined an other alias for it, cpp is contained in !gcc) and then it crashes with unexpected behavior. i will post the error-sentence it provides |
Ronald May (387) 407 posts |
Edit: Mmmm -might have revealed an issue with 4.7.4 here, 4.1.2 cpp/cc1 behaves very well with a huge number of c files and a modest wimpslot of 8000k |
ivelegacy (2674) 139 posts |
hi |
Ronald May (387) 407 posts |
I’ve sent another brief one, see if you get this one. |
ivelegacy (2674) 139 posts |
i see your email, and you should have already got a reply typing “cproto hAllo.c” it claims UNIXLIB detected recursion of signal SIGSEGV exiting (repeated twice) and it stops Googling for SIGSEGV I found This signal is generated when a program tries to read or write outside the memory that is allocated for it, or to write memory that can only be read. (Actually, the signals only occur when the program goes far enough outside to be detected by the system’s memory protection mechanism.). The name is an abbreviation for “segmentation violation”. Common ways of getting a SIGSEGV condition include dereferencing a null or uninitialized pointer, or when you use a pointer to step through an array, but fail to check for the end of the array. It varies among systems whether dereferencing a null pointer generates SIGSEGV or SIGBUS. that sounds like, ah, the segmentation fault, the bane of every beginning C programmer’s existence. I am reading about UnixLib wondering what is wrong with my setup. |
Ronald May (387) 407 posts |
UNIXLIB detected recursion of signal SIGSEGV exiting I think you can get this when running out of memory (wimpslot). How much total/free memory do you have? Can you run gcc 4.1.2? Some ported programs crash immediately when HOME has not been set, I didn’t notice cproto looking for HOME though. The memory system is different on RISC OS 4 so I can’t really compare it exactly to my Iyonix 5.20. Maybe someone else with RISC OS 4 out there could try the program? Edit: I have now compiled cproto with gcc3.4 for use with gcc3.4 binaries. |
ivelegacy (2674) 139 posts |
hi i mean, if you have a source.c with int foo(int a) cproto source.c should print int foo(int a); actually it prints foo but, hey ? got progress =D |
Ronald May (387) 407 posts |
cproto source.c should print int foo(int a); Yes, that was the output from using cc1 directly, I have changed it to use the cpp within !gcc 3.4 now.
The ‘q’ suppress’s the header files not found, ‘E 0’ no cpp. I haven’t compared it to linux cproto output yet. Edit: I’ve included the source and working versions of Flex, Bison and M4 are now downloadable. Considering that they run from the makefile independantly from gcc, A taskwindow with a wimpslot large enough for gcc should also cope with Flex/Bison. |
ivelegacy (2674) 139 posts |
here you can see a solution for VIM; it runs as a GUI task, as an ANSI task with Nettle which supports most common terminal types, including vt100, vt102, vt220 and xterm terminal emulation in full color. might the trick also be fine for text-editor/nano ? |