less -> more
[unix-history] / usr / src / usr.bin / more / help.c
index 9a4766f..b0f2d91 100644 (file)
@@ -3,15 +3,13 @@
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
  *
- * This code is derived from software contributed to Berkeley by
- * Mark Nudleman.
- * 
  * Redistribution and use in source and binary forms are permitted
  * provided that the above copyright notice and this paragraph are
  * duplicated in all such forms and that any documentation,
  * advertising materials, and other materials related to such
  * distribution and use acknowledge that the software was developed
  * Redistribution and use in source and binary forms are permitted
  * provided that the above copyright notice and this paragraph are
  * duplicated in all such forms and that any documentation,
  * advertising materials, and other materials related to such
  * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
+ * by Mark Nudleman and the University of California, Berkeley.  The
+ * name of Mark Nudleman or the
  * University may not be used to endorse or promote products derived
  * from this software without specific prior written permission.
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  * University may not be used to endorse or promote products derived
  * from this software without specific prior written permission.
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)help.c     5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)help.c     5.5 (Berkeley) %G%";
 #endif /* not lint */
 
 #endif /* not lint */
 
-#include  "less.h"
+#include <sys/param.h>
+#include <less.h>
 
 
-/*
- * Display some help.
- * Just invoke another "less" to display the help file.
- *
- * {{ This makes this function very simple, and makes changing the
- *    help file very easy, but it may present difficulties on
- *    (non-Unix) systems which do not supply the "system()" function. }}
- */
-
-       public void
+#define        HELPFILE        "/usr/lib/more.help"
 help()
 {
 help()
 {
-       char cmd[MAXPATHLEN+100];
+       char cmd[MAXPATHLEN + 20];
 
 
-       (void)sprintf(cmd,
-        "-less -m '-PmHELP -- ?eEND -- Press g to see it again:Press RETURN for more., or q when done ' %s",
-        HELPFILE);
+       (void)sprintf(cmd, "-more %s", HELPFILE);
        lsystem(cmd);
        lsystem(cmd);
-       error("End of help");
 }
 }