xref: /openbsd-src/usr.bin/vi/ex/ex_open.c (revision 2b0358df1d88d06ef4139321dd05bd5e05d91eaf)
1 /*	$OpenBSD: ex_open.c,v 1.4 2002/02/16 21:27:57 millert Exp $	*/
2 
3 /*-
4  * Copyright (c) 1993, 1994
5  *	The Regents of the University of California.  All rights reserved.
6  * Copyright (c) 1993, 1994, 1995, 1996
7  *	Keith Bostic.  All rights reserved.
8  *
9  * See the LICENSE file for redistribution information.
10  */
11 
12 #include "config.h"
13 
14 #ifndef lint
15 static const char sccsid[] = "@(#)ex_open.c	10.7 (Berkeley) 3/6/96";
16 #endif /* not lint */
17 
18 #include <sys/types.h>
19 #include <sys/queue.h>
20 
21 #include <bitstring.h>
22 #include <limits.h>
23 #include <stdio.h>
24 
25 #include "../common/common.h"
26 
27 /*
28  * ex_open -- :[line] o[pen] [/pattern/] [flags]
29  *
30  *	Switch to single line "open" mode.
31  *
32  * PUBLIC: int ex_open(SCR *, EXCMD *);
33  */
34 int
35 ex_open(sp, cmdp)
36 	SCR *sp;
37 	EXCMD *cmdp;
38 {
39 	/* If open option off, disallow open command. */
40 	if (!O_ISSET(sp, O_OPEN)) {
41 		msgq(sp, M_ERR,
42 	    "140|The open command requires that the open option be set");
43 		return (1);
44 	}
45 
46 	msgq(sp, M_ERR, "141|The open command is not yet implemented");
47 	return (1);
48 }
49