4 * Copyright (c) 1993, 1994
5 * The Regents of the University of California. All rights reserved.
6 * Copyright (c) 1992, 1993, 1994, 1995, 1996
7 * Keith Bostic. All rights reserved.
9 * See the LICENSE file for redistribution information.
15 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";
18 #include <sys/types.h>
19 #include <sys/queue.h>
21 #include <bitstring.h>
28 #include "../common/common.h"
35 * PUBLIC: int ex_stop __P((SCR *, EXCMD *));
38 ex_stop(SCR
*sp
, EXCMD
*cmdp
)
42 /* For some strange reason, the force flag turns off autowrite. */
43 if (!FL_ISSET(cmdp
->iflags
, E_C_FORCE
) && file_aw(sp
, FS_ALL
))
46 if (sp
->gp
->scr_suspend(sp
, &allowed
))
49 ex_emsg(sp
, NULL
, EXM_NOSUSPEND
);