* Copyright (c) 1992 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Rodney Ruddock of the University of Guelph.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)q.c 5.5 (Berkeley) %G%";
* End this editting session and exit with saving the buffer. If no
* write has occurred since the last buffer modification a warning
* is given once ('Q' over-rides the warning).
int l_which
; /* Which is it? 'q' or 'Q'. */
sigspecial
= 1; /* yes, 1, because we want to ensure it's on */
if ((l_ss
!= ' ') && (l_ss
!= '\n') && (l_ss
!= EOF
)) {
strcpy(help_msg
, "illegal command option");
if ((l_ss
== '\n') || (l_ss
== EOF
))
/* Note: 'Q' will bypass this if stmt., which warns of no save. */
if ((change_flag
== 1L) && ((l_which
== 'q') || (l_which
== -1)) ) {
strcpy(help_msg
, "buffer changes not saved");
/* Do cleanup; should it be even bothered?? */
Start_default
= End_default
= 0;
/* We don't care about the returned errnum val anymore. */
(dbhtmp
->close
) (dbhtmp
); /* Overhead as the cache is flushed. */