'undefined' instead of  so that it is clear that the argument that is sent isn't a argument list (like the ones used in apply/3 e.g.). The argument is sent as-is to the driver and this should clarify a bit.
created every time a new character is retrieved.
Updated rebar.config accordingly
…efile. The *.so file would be put in the "wrong" place but the same convention as rebar is used and the *.so file is put in priv/
…with the behaviour gen_server. Also cleaned up some unnecessary code lines and made things more readable.
…lity. Added a new example.
…the keys easier
The input is now done by ncurses itself. The driver starts a thread that will do getch() continuously and send a message back to Erlang when it has a character. meanwhile if a process asks for a char (cecho:getch()) it will block by first sending a message to the cecho_srv process and "register" itself as waiting and then as soon as a key input is read from the driver it will be sent to it. If a message is received from the port and no process is waiting for the character then the message will be discarded. If a process tries to do cecho:getch() at the same time as another one is already blocking the process that called cecho:getch() last will be killed. If special characters need to be captured then cecho:keypad/2 must be used to enable keypad mode. NOTE: erl must be started with +A <N> where N is a number (probably above 40, try e.g. 50 or above) AND the flag -noinput must be given to stop the erlang shell from reading input (and thus competing) with cecho. To test the new feature run cecho_example:input() as follows: $> pwd /home/mazen/dev/repos/cecho $> erl -pa ../cecho/ebin/ -noinput -eval 'cecho_example:input(),halt().' +A 50 $> Use 'q' to quit.
…e taken a window argument before but was not since I hadn't implemented windows yet. Leaving the old functions which don't take a window for easier access to stdscr.
…w specify a border around any window. Also removed the limitation on Char arguments to all functions dealing with Chars as input; this is so that the macros can be used.
…all addch versions) now use chtype as the type passed on to the ncurses function so that the special characters can be used. As a consequence I also removed the limitations in the API which limits the Char arguments to a function to be 0 < X < 256.
…al characters mainly to make "prettier" borders and stuff
…round and vice versa) and BLINK (probably will NEVER be used but included it while I was at it :))
…hich I guess was a really noob C mistake. It has been fixed.
… If the standard screen is to be used one should use the macro ?ceSTDSCR as the window parameter. Also removed a call to refresh inside the do_initscr function in the driver and added it in the cecho_srv.erl file instead so that starting and stopping the application will clear the screen properly on start up