2 * Copyright (c) 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1992, 1993, 1994, 1995, 1996
5 * Keith Bostic. All rights reserved.
7 * See the LICENSE file for redistribution information.
13 static const char sccsid[] = "$Id: ex_stop.c,v 10.11 2001/06/25 15:19:20 skimo Exp $";
16 #include <sys/types.h>
17 #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);