slang-users mailing list

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

Re: [slang-users] Error on RC5 .. Incompatable Pointer types ...


Ok, fixed it using the below:

void Sigwinch_Handler (int sig)
{
   (void) sig;
    Screen_Size_Changed = 1;
   (void) SLsignal_intr (SIGWINCH, Sigwinch_Handler);
}


Now the next question:

Here is the C code snippet that runs the SLAG Menu. Note where
the "SCREEN" size changed is setting. How do I go about "immediately"
re-painting the screen after a re-size has been done, since I am waiting
for input ?

int RunMenu ( void )
{

  char buffer [80] ;
  int menuitem ;
  int returnstatus ;
  if ( !SlagMenu_Initialized )
    return;
  if ( !MENU_IS_INIT )
    return;

  while ( menuitem != MENUEND )
    {

      if (Screen_Size_Changed)        /* screen size has changed */
        {
          SLtt_get_screen_size ();
          SLsmg_reinit_smg ();
          Screen_Size_Changed = 0 ;
        }
      DisplayMenu (  );               /* Displays the menu on the screen */

      menuitem = NOITEM;
      SLang_flush_input ( ) ;
      menuitem = EntryMenu (  );      /* Get keyboard navigation */
      switch ( menuitem )
        {

        case MENUEND:
        case ITEMLEFT:
             goleft ( ) ;
             break;

       .............................. and more code fllows ...


Thanks ....

Ben Duncan wrote:
John, the headers fix worked like a champ but copying straight outta da book:



static sigwinch_handler (int sig)
{
  Screen_Size_Changed = 1;
  SLsignal (SIGWINCH, sigwinch_handler);
}

I get the following compiler warning :

gcc -shared -fPIC -I /usr/include -I ../include appmenu.c utils.c -o slagmenu-module.so -Wl,-R/usr/lib -lm
appmenu.c: In function `sigwinch_handler':
appmenu.c:207: warning: passing arg 2 of `SLsignal' from incompatible pointer type

What do I need to do to clean that up?
Thanks ...


--
Ben Duncan   - VersAccounting Software LLC 336 Elton Road  Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
       - Hanlon's Razor


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


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