/[LeafOK_CVS]/lbbs/src/menu_proc.c
ViewVC logotype

Diff of /lbbs/src/menu_proc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.40 by sysadm, Fri Oct 17 12:23:01 2025 UTC Revision 1.43 by sysadm, Wed Oct 22 04:48:53 2025 UTC
# Line 26  Line 26 
26  #include "menu.h"  #include "menu.h"
27  #include "section_list_display.h"  #include "section_list_display.h"
28  #include "screen.h"  #include "screen.h"
29    #include "user_list_display.h"
30  #include "user_priv.h"  #include "user_priv.h"
31  #include <dlfcn.h>  #include <dlfcn.h>
32  #include <errno.h>  #include <errno.h>
# Line 43  int list_section(void *param) Line 44  int list_section(void *param)
44          return REDRAW;          return REDRAW;
45  }  }
46    
47    typedef union exec_handler_t{
48            void *p;
49            int (*handler)();
50    } exec_handler;
51    
52  int exec_mbem(void *param)  int exec_mbem(void *param)
53  {  {
54          void *hdll;          void *hdll;
55          int (*func)();          exec_handler func;
56          char *c, *s;          char *c, *s;
57          char buf[FILE_PATH_LEN];          char buf[FILE_PATH_LEN];
58    
# Line 69  int exec_mbem(void *param) Line 75  int exec_mbem(void *param)
75                  {                  {
76                          char *error;                          char *error;
77    
78                          if ((func = dlsym(hdll, c ? c : "mod_main")) != NULL)                          if ((func.p = dlsym(hdll, c ? c : "mod_main")) != NULL)
79                                  func();                          {
80                                    func.handler();
81                            }
82                          else if ((error = dlerror()) != NULL)                          else if ((error = dlerror()) != NULL)
83                          {                          {
84                                  clearscr();                                  clearscr();
# Line 335  int favor_topic(void *param) Line 343  int favor_topic(void *param)
343          }          }
344    
345          return REDRAW;          return REDRAW;
346    }
347    
348    int list_user(void *param)
349    {
350            if (user_list_display(0) < 0)
351            {
352                    log_error("user_list_display(all_user) error\n");
353            }
354    
355            return REDRAW;
356    }
357    
358    int list_online_user(void *param)
359    {
360            if (user_list_display(1) < 0)
361            {
362                    log_error("user_list_display(online_user) error\n");
363            }
364    
365            return REDRAW;
366  }  }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1