xref: /csrg-svn/usr.bin/more/help.c (revision 35283)
135209Sbostic /*
235209Sbostic  * Copyright (c) 1988 Mark Nudleman
335209Sbostic  * Copyright (c) 1988 Regents of the University of California.
435209Sbostic  * All rights reserved.
535209Sbostic  *
635209Sbostic  * Redistribution and use in source and binary forms are permitted
735209Sbostic  * provided that the above copyright notice and this paragraph are
835209Sbostic  * duplicated in all such forms and that any documentation,
935209Sbostic  * advertising materials, and other materials related to such
1035209Sbostic  * distribution and use acknowledge that the software was developed
11*35283Sbostic  * by Mark Nudleman and the University of California, Berkeley.  The
12*35283Sbostic  * name of Mark Nudleman or the
1335209Sbostic  * University may not be used to endorse or promote products derived
1435209Sbostic  * from this software without specific prior written permission.
1535209Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1635209Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1735209Sbostic  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1835209Sbostic  */
1935209Sbostic 
2035209Sbostic #ifndef lint
21*35283Sbostic static char sccsid[] = "@(#)help.c	5.4 (Berkeley) 07/25/88";
2235209Sbostic #endif /* not lint */
2335209Sbostic 
2435209Sbostic #include  "less.h"
2535209Sbostic 
2635209Sbostic /*
2735209Sbostic  * Display some help.
2835209Sbostic  * Just invoke another "less" to display the help file.
2935209Sbostic  *
3035209Sbostic  * {{ This makes this function very simple, and makes changing the
3135209Sbostic  *    help file very easy, but it may present difficulties on
3235209Sbostic  *    (non-Unix) systems which do not supply the "system()" function. }}
3335209Sbostic  */
3435209Sbostic 
3535209Sbostic 	public void
3635209Sbostic help()
3735209Sbostic {
3835235Sbostic 	char cmd[MAXPATHLEN+100];
3935209Sbostic 
4035235Sbostic 	(void)sprintf(cmd,
4135209Sbostic 	 "-less -m '-PmHELP -- ?eEND -- Press g to see it again:Press RETURN for more., or q when done ' %s",
4235209Sbostic 	 HELPFILE);
4335209Sbostic 	lsystem(cmd);
4435209Sbostic }
45