I have no idea how to do what you want. But
'libc.so.6 i fcntl i i i' cd 0 4 2048
should be
'libc.so.6 fcntl I i i i' cd 0 4 2048
function name, then return type, then argument types.
I have added some text to the error-message page you referenced to
explain the numbering.
Henry Rich
On 7/17/2021 5:08 PM, Michal Wallace wrote:
I am working on a console-mode library for J (something like a simple
ncurses).
I am able to set the terminal up to read individual keypresses one at a
time,
but on linux, the process blocks until a key is pressed.
If I were writing C, I would fix this by calling fcntl, like so:
fcntl(STDIN, F_SETFL, O_NONBLOCK);
(where the STDIN=0, F_SETFL=4, and O_NONBLOCK=2048)
The signature for fcntl looks like this:
int fcntl(int *fildes*, int *cmd*, ...);
But I don't know how to explain the '...' signature to J's 'cd' word.
I have tried a bunch of different combinations of n,i,x,s,* etc in the
signature, but nothing seems to work:
'libc.so.6 i fcntl i i i' cd 0 4 2048
|domain error: cd
| 'libc.so.6 i fcntl i i i' cd 0 4 2048
cder''
5 0
According to https://code.jsoftware.com/wiki/Guides/DLLs/Error_Messages ,
this means 'declaration 0' is invalid. I don't know if that means the
return type or the first argument, or if I'm just completely
misunderstanding everything.
Can someone help? :)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm