=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/optfunc.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** src/usr.bin/less/optfunc.c 2003/04/13 18:26:26 1.4 --- src/usr.bin/less/optfunc.c 2003/04/14 14:33:57 1.5 *************** *** 31,41 **** extern int nbufs; extern int bufspace; extern int pr_type; extern int plusoption; extern int swindow; extern int sc_height; extern int secure; - extern int dohelp; extern int any_display; extern char openquote; extern char closequote; --- 31,41 ---- extern int nbufs; extern int bufspace; extern int pr_type; + extern int nohelp; extern int plusoption; extern int swindow; extern int sc_height; extern int secure; extern int any_display; extern char openquote; extern char closequote; *************** *** 572,577 **** --- 572,579 ---- int type; char *s; { + if (nohelp) + return; switch (type) { case QUERY: *************** *** 579,585 **** error("Use \"h\" for help", NULL_PARG); break; case INIT: ! dohelp = 1; } } --- 581,600 ---- error("Use \"h\" for help", NULL_PARG); break; case INIT: ! /* ! * This is "less -?". ! * It rather ungracefully grabs control, ! * does the initializations normally done in main, ! * shows the help file and exits. ! */ ! raw_mode(1); ! get_term(); ! open_getchr(); ! init(); ! any_display = TRUE; ! help(1); ! quit(QUIT_OK); ! /*NOTREACHED*/ } }