home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume16 / less5 / part02 / help.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-09-22  |  530 b   |  23 lines

  1. #include  "less.h"
  2.  
  3. /*
  4.  * Display some help.
  5.  * Just invoke another "less" to display the help file.
  6.  *
  7.  * {{ This makes this function very simple, and makes changing the
  8.  *    help file very easy, but it may present difficulties on
  9.  *    (non-Unix) systems which do not supply the "system()" function. }}
  10.  */
  11.  
  12.     public void
  13. help()
  14. {
  15.     char cmd[FILENAME+100];
  16.  
  17.     sprintf(cmd, 
  18.      "-less -m '-PmHELP -- ?eEND -- Press g to see it again:Press RETURN for more., or q when done ' %s",
  19.      HELPFILE);
  20.     lsystem(cmd);
  21.     error("End of help");
  22. }
  23.