slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] kbi-module


On Fri, 18 Mar 2005 10:03:20 +0100, Laurent Perez <Laurent.Perez@xxxxxxxxxxxxxxxxx> said:


> I wrote a simple module which make available keyboard interface to slsh.

In slang 2 there's no SLang_doerror. Here's the patch:

--- kbi-module.c~	Tue Mar 15 11:54:08 2005
+++ kbi-module.c	Fri Mar 18 11:28:29 2005
@@ -19,7 +19,7 @@
    SLtt_get_terminfo ();
    if (-1 == SLkp_init ())
      {	
-	SLang_doerror ("SLkp_init failed.");
+	SLang_verror (SL_INTRINSIC_ERROR, "SLkp_init failed.");
 	exit (1);
      }
    return 0;

> I dont know if this can be of any use for someone, but as it is small, I
> post it here.

Well, since there is already a smg module that does not wrap the keyboard
functions, these modules could be used together to write snake, tetris
etc.  In slang 2, the functions in the smg module have been renamed to
slsmg* (like in the C API, but lowercase).  You should probably rename
kbi_kp_getkey to slkp_getkey, etc.

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]