home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume16 / pcomm2 / part04 / help.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-09-14  |  1.8 KB  |  48 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 "config.h"
  11. #include "misc.h"
  12.  
  13. void
  14. help_screen(hot)
  15. char *hot;
  16. {
  17.     extern int fd;
  18.     WINDOW *h_win, *newwin();
  19.  
  20.     h_win = newwin(17, 80, 0, 0);
  21.  
  22.     mvwattrstr(h_win, 1, 29, A_BOLD, "P C O M M       H E L P\n");
  23.     horizontal(h_win, 2, 0, 80);
  24.     mvwattrstr(h_win, 4, 0, A_BOLD, "       Major Functions          Utility Functions         File Functions\n\n");
  25.     mvwprintw(h_win,  6,  2, "Dialing Directory.%4.4s-D  Program Info ....%4.4s-I  Send Files ....%4.4s-<up>", hot, hot, hot);
  26.     mvwprintw(h_win,  7,  2, "Auto Redial ......%4.4s-R  Setup Screen ....%4.4s-S  Receive Files .%4.4s-<down>", hot, hot, hot);
  27.     mvwprintw(h_win,  8,  2, "Keyboard Macros ..%4.4s-M  Change Directory.%4.4s-B  Pass Thru Mode.%4.4s-T", hot, hot, hot);
  28.     mvwprintw(h_win,  9,  2, "Line Settings ....%4.4s-P  Clear Screen ....%4.4s-C  Directory .....%4.4s-F", hot, hot, hot);
  29.     mvwprintw(h_win, 10,  2, "Exit Pcomm .......%4.4s-X  Toggle Duplex ...%4.4s-E  Screen Dump ...%4.4s-G", hot, hot, hot);
  30.     mvwprintw(h_win, 11,  2, "Unix Gateway .....%4.4s-4  Hang Up Phone ...%4.4s-H  Start Data Log.%4.4s-1", hot, hot, hot);
  31.     mvwprintw(h_win, 12, 28, "Printer On/Off ..%4.4s-L  Toggle Log ....%4.4s-2", hot, hot);
  32.     mvwprintw(h_win, 13, 28, "Toggle CR-CR/LF .%4.4s-3", hot);
  33.     mvwprintw(h_win, 14, 28, "Break Key .......%4.4s-7", hot);
  34.  
  35.     box(h_win, VERT, HORZ);
  36.     mvwaddstr(h_win, 16, 26, " Press any key to continue ");
  37.     wmove(h_win, 16, 79);
  38.     wrefresh(h_win);
  39.  
  40.     wgetch(h_win);
  41.     if (fd == -1) {
  42.         werase(h_win);
  43.         wrefresh(h_win);
  44.     }
  45.     delwin(h_win);
  46.     return;
  47. }
  48.