/[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.39 by sysadm, Fri Oct 17 01:25:08 2025 UTC Revision 1.42 by sysadm, Tue Oct 21 11:11:28 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 110  int copyright(void *param) Line 118  int copyright(void *param)
118          return REDRAW;          return REDRAW;
119  }  }
120    
121    int version(void *param)
122    {
123            display_file(DATA_VERSION, 1);
124    
125            return REDRAW;
126    }
127    
128  int reload_bbs_conf(void *param)  int reload_bbs_conf(void *param)
129  {  {
130          clearscr();          clearscr();
# Line 328  int favor_topic(void *param) Line 343  int favor_topic(void *param)
343          }          }
344    
345          return REDRAW;          return REDRAW;
346    }
347    
348    int user_list(void *param)
349    {
350            if (user_list_display() < 0)
351            {
352                    log_error("user_list_display() error\n");
353            }
354    
355            return REDRAW;
356  }  }


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

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