home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / pcomm / part03 / help.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-17  |  1.7 KB  |  47 lines

  1. /*
  2.  * Display the help screen.  Press any key to continue.  If the ascii_hot
  3.  * string is more than 4 characters wide, this screen will look silly.
  4.  * Maybe one day, this will also contain page-full descriptions of each
  5.  * command.
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <curses.h>
  10. #include "misc.h"
  11.  
  12. void
  13. help_screen(hot, fd)
  14. char *hot;
  15. int fd;
  16. {
  17.     WINDOW *h_win, *newwin();
  18.  
  19.     h_win = newwin(17, 80, 0, 0);
  20.  
  21.     mvwattrstr(h_win, 1, 29, A_BOLD, "P C O M M       H E L P\n");
  22.     waddstr(h_win, "-------------------------------------------------------------------------------\n\n");
  23.     wattrstr(h_win, A_BOLD, "        Major Functions         Utility Functions         File Functions\n\n");
  24.     wprintw(h_win, "  Dialing Directory .%4.4s-D  Program Info .....%4.4s-I  Send files ....%4.4s-up\n", hot, hot, hot);
  25.     wprintw(h_win, "  Auto Redial .......%4.4s-R  Setup Screen .....%4.4s-S  Receive files .%4.4s-dn\n", hot, hot, hot);
  26.     wprintw(h_win, "  Keyboard Macros ...%4.4s-M  Change Directory .%4.4s-B  Directory .....%4.4s-F\n", hot, hot, hot);
  27.     wprintw(h_win, "  Line Settings .....%4.4s-P  Clear Screen .....%4.4s-C  Screen Dump ...%4.4s-G\n", hot, hot, hot);
  28.     wprintw(h_win, "  Exit Pcomm ........%4.4s-X  Toggle Duplex ....%4.4s-E  Data Logging ..%4.4s-1\n", hot, hot, hot);
  29.     wprintw(h_win, "  Unix Gateway ......%4.4s-4  Hangup Phone .....%4.4s-H  Toggle Log ....%4.4s-2\n", hot, hot, hot);
  30.     mvwprintw(h_win, 12, 29, "Printer On/Off ...%4.4s-L", hot);
  31.     mvwprintw(h_win, 13, 29, "Toggle CR/CR-LF ..%4.4s-3", hot);
  32.     mvwprintw(h_win, 14, 29, "Break Key ........%4.4s-7", hot);
  33.  
  34.     box(h_win, '|', '-');
  35.     mvwaddstr(h_win, 16, 27, " Press any key to continue ");
  36.     wmove(h_win, 16, 79);
  37.     wrefresh(h_win);
  38.  
  39.     wgetch(h_win);
  40.     if (fd == -1) {
  41.         werase(h_win);
  42.         wrefresh(h_win);
  43.     }
  44.     delwin(h_win);
  45.     return;
  46. }
  47.