2 * Copyright (c) 1992, 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: v_zexit.c,v 10.7 2001/06/25 15:19:37 skimo Exp $";
16 #include <sys/types.h>
17 #include <sys/queue.h>
20 #include <bitstring.h>
25 #include "../common/common.h"
30 * Save the file and exit.
32 * PUBLIC: int v_zexit(SCR *, VICMD *);
35 v_zexit(SCR
*sp
, VICMD
*vp
)
37 /* Write back any modifications. */
38 if (F_ISSET(sp
->ep
, F_MODIFIED
) &&
39 file_write(sp
, NULL
, NULL
, NULL
, FS_ALL
))
42 /* Check to make sure it's not a temporary file. */
46 /* Check for more files to edit. */