Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 26. október 2026

Rozdiely pre ep/src/menu.c medzi verziami 1.6 a 1.7

verzia 1.6, 2002/02/21 02:22:00 verzia 1.7, 2002/02/25 18:45:53
Riadok 82  typedef struct MENU_STRUCT {
Riadok 82  typedef struct MENU_STRUCT {
 } menu;  } menu;
   
         static void          static void
 free_menu(menu *m)  free_menu(m)
           menu *m;
 {  {
         if (!m) {          if (!m) {
 #ifdef DEBUG  #ifdef DEBUG
Riadok 112  delwin(win);
Riadok 113  delwin(win);
 */  */
   
         static int          static int
 confirm_args(char *prompt, char *format, va_list args)  confirm_args(prompt, format, args)
           char    *prompt;
           char    *format;
           va_list args;
 {  {
         int c;          int c;
   
Riadok 127  confirm_args(char *prompt, char *format,
Riadok 131  confirm_args(char *prompt, char *format,
 }  }
   
         static void          static void
 confirm_error(char *format, ...)  confirm_error(
           char *format,
           ...)
 {  {
         va_list args;          va_list args;
   
Riadok 137  confirm_error(char *format, ...)
Riadok 143  confirm_error(char *format, ...)
 }  }
   
         static int          static int
 confirm(char *prompt, char *format, ...)  confirm(
           char *prompt,
           char *format,
           ...)
 {  {
         va_list args;          va_list args;
         int c;          int c;
Riadok 149  confirm(char *prompt, char *format, ...)
Riadok 158  confirm(char *prompt, char *format, ...)
 }  }
   
         static void          static void
 menu_print_option(menu *m, int n, int selected)  menu_print_option(m, n, selected)
           menu *m;
           int  n;
           int  selected;
 {  {
         int k=0;          int k=0;
         option *o = &m->options[n];          option *o = &m->options[n];
Riadok 211  menu_print_option(menu *m, int n, int se
Riadok 223  menu_print_option(menu *m, int n, int se
 }  }
   
         static void          static void
 menu_print(menu *m)  menu_print(m)
           menu *m;
 {  {
         int i;          int i;
         chtype hbox = '-', vbox = '|';          chtype hbox = '-', vbox = '|';
Riadok 223  menu_print(menu *m)
Riadok 236  menu_print(menu *m)
 }  }
   
         static void          static void
 popup_menu_print_option(menu *m, int n, int selected)  popup_menu_print_option(m, n, selected)
           menu *m;
           int  n;
           int  selected;
 {  {
         option *o = &m->options[n];          option *o = &m->options[n];
   
Riadok 237  popup_menu_print_option(menu *m, int n,
Riadok 253  popup_menu_print_option(menu *m, int n,
 }  }
   
         static void          static void
 popup_menu_print(menu *m)  popup_menu_print(m)
           menu *m;
 {  {
         int i;          int i;
         option *o = &m->options[m->nitems-1];          option *o = &m->options[m->nitems-1];
Riadok 251  popup_menu_print(menu *m)
Riadok 268  popup_menu_print(menu *m)
 }  }
   
         static int          static int
 do_menu(int type, PROCTABLE *p_ptbl, option items[], int y, int x)  do_menu(type, p_ptbl, items, y, x)
           int       type;
           PROCTABLE *p_ptbl;
           option    items[];
           int       y;
           int       x;
 {  {
         int i;          int i;
         option *pom = items;          option *pom = items;
Riadok 483  call_func:
Riadok 505  call_func:
 } /* end do_menu() */  } /* end do_menu() */
   
         static int          static int
 void_exit(PROCTABLE *p_ptbl, int y, int x)  void_exit(p_ptbl, y, x)
           PROCTABLE *p_ptbl;
           int       y;
           int       x;
 {  {
         //      touchwin(stdscr);          //      touchwin(stdscr);
         refresh();          refresh();
Riadok 505  void_exit(PROCTABLE *p_ptbl, int y, int
Riadok 530  void_exit(PROCTABLE *p_ptbl, int y, int
   
 option menu_file_option[] = {  option menu_file_option[] = {
         { 'x', "Exit", "q", void_exit },          { 'x', "Exit", "q", void_exit },
         {0, NULL, NULL, NULL}          { 0, NULL, NULL, NULL }
 };  };
   
         static int          static int
 file_menu(PROCTABLE *p_ptbl, int y, int x)  file_menu(p_ptbl, y, x)
           PROCTABLE *p_ptbl;
           int       y;
           int       x;
 {  {
         return do_menu(STANDARD_MENU, p_ptbl, menu_file_option, y, x);          return do_menu(STANDARD_MENU, p_ptbl, menu_file_option, y, x);
 }  }
Riadok 517  file_menu(PROCTABLE *p_ptbl, int y, int
Riadok 545  file_menu(PROCTABLE *p_ptbl, int y, int
 option menu_memory_option[] = {  option menu_memory_option[] = {
         { 'm', "Me&mory", "M", menu_memory_info },          { 'm', "Me&mory", "M", menu_memory_info },
         { 'p', "Proc&table", "P", menu_proctable_info },          { 'p', "Proc&table", "P", menu_proctable_info },
         {0, NULL, NULL, NULL}          { 0, NULL, NULL, NULL }
 };  };
   
         static int          static int
 memory_menu(PROCTABLE *p_ptbl, int y, int x)  memory_menu(p_ptbl, y, x)
           PROCTABLE *p_ptbl;
           int       y;
           int       x;
 {  {
         return do_menu(STANDARD_MENU, p_ptbl, menu_memory_option, y, x);          return do_menu(STANDARD_MENU, p_ptbl, menu_memory_option, y, x);
 }  }
Riadok 532  option menu_setup_option[] = {
Riadok 563  option menu_setup_option[] = {
         { '!', "Proc&table", "", void_exit },          { '!', "Proc&table", "", void_exit },
         { '!', "&I/O", "", void_exit },          { '!', "&I/O", "", void_exit },
         { '!', "&Memory menu", "", memory_menu },          { '!', "&Memory menu", "", memory_menu },
         {0, NULL, NULL, NULL}          { 0, NULL, NULL, NULL }
 };  };
   
         static int          static int
 setup_menu(PROCTABLE *p_ptbl, int y, int x)  setup_menu(p_ptbl, y, x)
           PROCTABLE *p_ptbl;
           int       y;
           int       x;
 {  {
         return do_menu(STANDARD_MENU, p_ptbl, menu_setup_option, y, x);          return do_menu(STANDARD_MENU, p_ptbl, menu_setup_option, y, x);
 }  }
Riadok 546  option menu_help_option[] = {
Riadok 580  option menu_help_option[] = {
         { '?', "&Keys", "", void_exit },          { '?', "&Keys", "", void_exit },
         { '?', "User's &manual", "", void_exit },          { '?', "User's &manual", "", void_exit },
         { '?', "&Copying", "", void_exit },          { '?', "&Copying", "", void_exit },
         {0, NULL, NULL, NULL}          { 0, NULL, NULL, NULL }
 };  };
   
         static int          static int
 help_menu(PROCTABLE *p_ptbl, int y, int x)  help_menu(p_ptbl, y, x)
           PROCTABLE *p_ptbl;
           int       y;
           int       x;
 {  {
         return do_menu(STANDARD_MENU, p_ptbl, menu_help_option, y, x);          return do_menu(STANDARD_MENU, p_ptbl, menu_help_option, y, x);
 }  }
Riadok 563  option popup_menu_main_option[] = {
Riadok 600  option popup_menu_main_option[] = {
         { 0, NULL, NULL, NULL }          { 0, NULL, NULL, NULL }
 };  };
   
 int menu_main(PROCTABLE *p_ptbl)          int
   menu_main(p_ptbl)
           PROCTABLE *p_ptbl;
 {  {
         return do_menu(POPUP_MENU, p_ptbl, popup_menu_main_option, 0, 0);          return do_menu(POPUP_MENU, p_ptbl, popup_menu_main_option, 0, 0);
 }  }
   
 void menu_curses_init(void)          void
   menu_curses_init(void)
 {  {
         initscr();          initscr();
         clear();          clear();
Riadok 582  void menu_curses_init(void)
Riadok 622  void menu_curses_init(void)
 }  }
   
 #if defined(SELF) || defined(SELFTEST)  #if defined(SELF) || defined(SELFTEST)
 int main(int argc, char *argv[])          int
   main(argc, argv)
           int  argc;
           char **argv;
 {  {
         fd_set fds;          fd_set fds;
         int c;          int c;

Legend:
Odstranené z verzie1.6  
zmenené riadky
  Pridané vo verzii1.7

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok