xref: /dragonfly/contrib/nvi2/ex/ex_open.c (revision 479ab7f0)
1 /*-
2  * Copyright (c) 1993, 1994
3  *	The Regents of the University of California.  All rights reserved.
4  * Copyright (c) 1993, 1994, 1995, 1996
5  *	Keith Bostic.  All rights reserved.
6  *
7  * See the LICENSE file for redistribution information.
8  */
9 
10 #include "config.h"
11 
12 #include <sys/types.h>
13 #include <sys/queue.h>
14 #include <sys/time.h>
15 
16 #include <bitstring.h>
17 #include <limits.h>
18 #include <stdio.h>
19 
20 #include "../common/common.h"
21 
22 /*
23  * ex_open -- :[line] o[pen] [/pattern/] [flags]
24  *
25  *	Switch to single line "open" mode.
26  *
27  * PUBLIC: int ex_open(SCR *, EXCMD *);
28  */
29 int
30 ex_open(SCR *sp, EXCMD *cmdp)
31 {
32 	/* If open option off, disallow open command. */
33 	if (!O_ISSET(sp, O_OPEN)) {
34 		msgq(sp, M_ERR,
35 	    "140|The open command requires that the open option be set");
36 		return (1);
37 	}
38 
39 	msgq(sp, M_ERR, "141|The open command is not yet implemented");
40 	return (1);
41 }
42