1 /* $NetBSD: ex_stop.c,v 1.2 2013/11/22 15:52:05 christos Exp $ */
3 * Copyright (c) 1993, 1994
4 * The Regents of the University of California. All rights reserved.
5 * Copyright (c) 1992, 1993, 1994, 1995, 1996
6 * Keith Bostic. All rights reserved.
8 * See the LICENSE file for redistribution information.
14 static const char sccsid
[] = "Id: ex_stop.c,v 10.11 2001/06/25 15:19:20 skimo Exp (Berkeley) Date: 2001/06/25 15:19:20 ";
17 #include <sys/types.h>
18 #include <sys/queue.h>
20 #include <bitstring.h>
27 #include "../common/common.h"
34 * PUBLIC: int ex_stop __P((SCR *, EXCMD *));
37 ex_stop(SCR
*sp
, EXCMD
*cmdp
)
41 /* For some strange reason, the force flag turns off autowrite. */
42 if (!FL_ISSET(cmdp
->iflags
, E_C_FORCE
) && file_aw(sp
, FS_ALL
))
45 if (sp
->gp
->scr_suspend(sp
, &allowed
))
48 ex_emsg(sp
, NULL
, EXM_NOSUSPEND
);