head 1.4; access; symbols RELENG_4_0_0_RELEASE:1.4 RELENG_4:1.4.0.6 RELENG_4_BP:1.4 RELENG_3_4_0_RELEASE:1.4 RELENG_3_3_0_RELEASE:1.4 RELENG_3_2_PAO:1.4.0.4 RELENG_3_2_PAO_BP:1.4 RELENG_3_2_0_RELEASE:1.4 RELENG_3_1_0_RELEASE:1.4 RELENG_3:1.4.0.2 RELENG_3_BP:1.4 RELENG_2_2_8_RELEASE:1.1.1.1.8.1 RELENG_3_0_0_RELEASE:1.4 RELENG_2_2_7_RELEASE:1.1.1.1.8.1 RELENG_2_2_6_RELEASE:1.1.1.1 RELENG_2_2_5_RELEASE:1.1.1.1 bsd_44_lite_2:1.1.1.1 RELENG_2_2_2_RELEASE:1.1.1.1 RELENG_2_2_1_RELEASE:1.1.1.1 RELENG_2_2_0_RELEASE:1.1.1.1 RELENG_2_1_7_RELEASE:1.1.1.1 RELENG_2_1_6_1_RELEASE:1.1.1.1 RELENG_2_1_6_RELEASE:1.1.1.1 RELENG_2_2:1.1.1.1.0.8 RELENG_2_2_BP:1.1.1.1 RELENG_2_1_5_RELEASE:1.1.1.1 RELENG_2_1_0_RELEASE:1.1.1.1 RELENG_2_1_0:1.1.1.1.0.6 RELENG_2_1_0_BP:1.1.1.1 RELENG_2_0_5_RELEASE:1.1.1.1 RELENG_2_0_5:1.1.1.1.0.4 RELENG_2_0_5_BP:1.1.1.1 RELENG_2_0_5_ALPHA:1.1.1.1 RELEASE_2_0:1.1.1.1 BETA_2_0:1.1.1.1 ALPHA_2_0:1.1.1.1.0.2 bsd_44_lite:1.1.1.1 CSRG:1.1.1; locks; comment @ * @; 1.4 date 98.07.25.05.28.32; author hoek; state Exp; branches; next 1.3; 1.3 date 98.07.03.23.01.33; author hoek; state Exp; branches; next 1.2; 1.2 date 98.06.14.16.03.39; author steve; state Exp; branches; next 1.1; 1.1 date 94.05.27.12.30.45; author rgrimes; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 94.05.27.12.30.46; author rgrimes; state Exp; branches 1.1.1.1.8.1; next ; 1.1.1.1.8.1 date 98.07.17.04.19.41; author jkh; state Exp; branches; next ; desc @@ 1.4 log @Keep "-c" (top_scroll) through viewing help. PR: bin/5996 Submitted by: Max Euston @ text @/* * Copyright (c) 1988 Mark Nudleman * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef lint static char sccsid[] = "@@(#)help.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include #include #include "pathnames.h" extern int top_scroll; help() { char cmd[MAXPATHLEN + 20]; snprintf(cmd, sizeof(cmd), "-more -e%c %s", top_scroll ? 'c' : ' ', _PATH_HELPFILE); lsystem(cmd); } @ 1.3 log @Use '-e' when viewing helpfile. @ text @d41 1 d44 2 d50 3 a52 1 (void)snprintf(cmd, sizeof(cmd), "-more -e %s", _PATH_HELPFILE); @ 1.2 log @sprintf -> snprintf to avoid potential buffer overflow. PR: 6907 Submitted by: Archie Cobbs @ text @d47 1 a47 1 (void)snprintf(cmd, sizeof(cmd), "-more %s", _PATH_HELPFILE); @ 1.1 log @Initial revision @ text @d47 1 a47 1 (void)sprintf(cmd, "-more %s", _PATH_HELPFILE); @ 1.1.1.1 log @BSD 4.4 Lite Usr.bin Sources @ text @@ 1.1.1.1.8.1 log @MFC: doc fixes, enhancements to locate & more, new tail functionality. @ text @d47 1 a47 1 (void)snprintf(cmd, sizeof(cmd), "-more -e %s", _PATH_HELPFILE); @