home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume8 / gnuplot1.10A / part07 / help / help.c < prev    next >
C/C++ Source or Header  |  1989-09-09  |  749b  |  47 lines

  1. /*
  2.  * Program    : help
  3.  * Module    : help.c
  4.  * Programmer    : R. Stolfa
  5.  *
  6.  * Purpose :    To more the current "HELPFILE" to the screen.
  7.  *
  8.  * Modification History:
  9.  *   08/27/87    Created
  10.  *   09/02/87    Added ("Q"|"q") commands
  11.  */
  12.  
  13. #include    "global.h"
  14.  
  15. help ()
  16. {
  17.     FILE    *fd;        /* help text file */
  18.     int    c;        /* temp */
  19.  
  20.     gen_path (HELPFILE);
  21.  
  22.     if ((fd = fopen (Path, "r")) == NULL) {
  23.         printf ("There is no help text on this subject\n");
  24.         return;
  25.     }
  26.  
  27.     /*
  28.      * Note what help subject we are looking at
  29.      */
  30.     if (strlen (cur_path) != 0) {
  31.         present ("TOPIC: ", " ");
  32.         pchar ('\n');
  33.     }
  34.  
  35.     /*
  36.      * Reset the number of lines displayed, and output
  37.      * the new help file text.
  38.      */
  39.     while ((c = getc (fd)) != EOF)
  40.         pchar(c);
  41.  
  42.     fclose (fd);
  43.  
  44.     pchar ('\n');
  45.     lines ++;
  46. }
  47.