home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 125.img / PRO-C4.ZIP / BENCH1.ZIP / GENSUP / DRAWMENU.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-28  |  798 b   |  42 lines

  1. # include <stdio.h>
  2. # include <bench.h>
  3. # include <proc.io>
  4. # include "iodef.h"
  5. # include "field.h"
  6. # include "sup.h"
  7. # include "screen.h"
  8.  
  9. /*
  10.  * Remove the menu prompts from the screen
  11.  * by overwriting with spaces.
  12. */
  13. void draw_menu(menu, first, last, mode, choice, whdl)
  14. struct optab *menu;
  15. int first;
  16. int last;
  17. int mode;
  18. int *choice;
  19. int *whdl;
  20. {
  21.    int i, j, k = 0;
  22.  
  23.    for (j = first; j <= last; j++)
  24.    {
  25.       i = 0;
  26.       sel_w(&whdl[j]);
  27.       dup_w();
  28.       if (mode == TRUE)
  29.          dsp_opt(menu, choice);
  30.       else
  31.       {
  32.          while (menu[i].text != NULL)
  33.          {
  34.             rephoriz_w(menu[i].row, menu[i].col, NORMAL, strlen(menu[i].text), ' ');
  35.             i++;
  36.          }
  37.          dsp_opt((struct optab *)0, &k);
  38.       }
  39.    }
  40. }
  41.  
  42.