home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume4 / rolodex / part2 / menuaux.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  1.4 KB  |  78 lines

  1. #include <stdio.h>
  2. #include <ctype.h>
  3.  
  4. #include "sys5.h"
  5.  
  6. #ifdef TMC
  7. #include <ctools.h>
  8. #else
  9. #include "ctools.h"
  10. #endif
  11. #include "args.h"
  12. #include "menu.h"
  13.  
  14. #include "rolofiles.h"
  15. #include "rolodefs.h"
  16. #include "datadef.h"
  17.  
  18.  
  19. rolo_menu_yes_no (prompt,rtn_default,help_allowed,helpfile,subject)
  20.  
  21.   char *prompt;
  22.   int rtn_default;
  23.   int help_allowed;
  24.   char *helpfile, *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(libdir(helpfile),subject,1);
  38.       goto reask;
  39.       break;
  40.     default :
  41.       return(rval);
  42.       break;
  43.   }
  44. }
  45.   
  46.  
  47. rolo_menu_data_help_or_abort (prompt,helpfile,subject,ptr_response)
  48.  
  49.   char *prompt, *helpfile, *subject;
  50.   char **ptr_response;
  51.   
  52.   int rval;
  53.   reask :
  54.   rval = menu_data_help_or_abort(prompt,ABORTSTRING,ptr_response);
  55.   if (rval == MENU_EOF) user_eof();
  56.   if (rval == MENU_HELP) {
  57.      cathelpfile(libdir(helpfile),subject,1);
  58.      goto reask;
  59.   }     
  60.   return(rval);
  61. }
  62.      
  63.  
  64. rolo_menu_number_help_or_abort (prompt,low,high,ptr_ival)
  65.  
  66.   char *prompt;
  67.   int low,high,*ptr_ival;
  68.   
  69. {  
  70.   int rval;
  71.   if (MENU_EOF == (rval = menu_number_help_or_abort (
  72.                                prompt,ABORTSTRING,low,high,ptr_ival
  73.                            )))
  74.      user_eof();
  75.   return(rval);
  76. }
  77.