2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
5 * %sccs.include.redist.c%
9 static char sccsid
[] = "$Id: ex_delete.c,v 8.3 1993/11/04 16:16:54 bostic Exp $ (Berkeley) $Date: 1993/11/04 16:16:54 $";
12 #include <sys/types.h>
18 ex_delete(sp
, ep
, cmdp
)
27 F_ISSET(cmdp
, E_BUFFER
) ? cmdp
->buffer
: DEFCB
,
28 &cmdp
->addr1
, &cmdp
->addr2
, 1))
31 /* Delete the lines. */
32 if (delete(sp
, ep
, &cmdp
->addr1
, &cmdp
->addr2
, 1))
35 /* Set the cursor to the line after the last line deleted. */
36 sp
->lno
= cmdp
->addr1
.lno
;
38 /* Or the last line in the file if deleted to the end of the file. */
39 if (file_lline(sp
, ep
, &lno
))
45 F_SET(sp
, S_AUTOPRINT
);