home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume13 / rolodex / part01 / menuaux.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-01-30  |  1.4 KB  |  82 lines

  1. /* menuaux.c */
  2. #include <stdio.h>
  3. #include <ctype.h>
  4.  
  5. #ifdef TMC
  6. #include <ctools.h>
  7. #else
  8. #include "ctools.h"
  9. #endif
  10. #include "args.h"
  11. #include "menu.h"
  12.  
  13. #include "rolofilz.h"
  14. #include "rolodefs.h"
  15. #include "datadef.h"
  16.  
  17.  
  18. rolo_menu_yes_no (prompt,rtn_default,help_allowed,helpidx,subject)
  19.  
  20.   char *prompt;
  21.   int rtn_default;
  22.   int help_allowed;
  23.   int helpidx;
  24.   char *subject;
  25.   
  26. {
  27.   int rval;
  28.   reask :
  29.   rval = menu_yes_no_abort_or_help (
  30.               prompt,ABORTSTRING,help_allowed,rtn_default
  31.            );
  32.   switch (rval) {
  33.     case MENU_EOF :
  34.       user_eof();
  35.       break;
  36.     case MENU_HELP : 
  37.       cathelpfile(helpidx,subject,1);
  38.       goto reask;
  39.       /* break; */
  40.     default :
  41.       return(rval);
  42.       /* break; */
  43.   }
  44.  
  45.   return(0);
  46. }
  47.   
  48.  
  49. rolo_menu_data_help_or_abort (prompt,helpidx,subject,ptr_response)
  50.  
  51.   char *prompt;
  52.   int helpidx;
  53.   char *subject;
  54.   char **ptr_response;
  55.   
  56.   int rval;
  57.   reask :
  58.   rval = menu_data_help_or_abort(prompt,ABORTSTRING,ptr_response);
  59.   if (rval == MENU_EOF) user_eof();
  60.   if (rval == MENU_HELP) {
  61.      cathelpfile(helpidx,subject,1);
  62.      goto reask;
  63.   }     
  64.   return(rval);
  65. }
  66.      
  67.  
  68. rolo_menu_number_help_or_abort (prompt,low,high,ptr_ival)
  69.  
  70.   char *prompt;
  71.   int low,high,*ptr_ival;
  72.   
  73. {  
  74.   int rval;
  75.   if (MENU_EOF == (rval = menu_number_help_or_abort (
  76.                                prompt,ABORTSTRING,low,high,ptr_ival
  77.                            )))
  78.      user_eof();
  79.   return(rval);
  80. }
  81.