update to 1.01
[nvi.git] / ex / ex_yank.c
blob155f78c7783a2f2247cf65042e5588dba546e580
1 /*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
5 * %sccs.include.redist.c%
6 */
8 #ifndef lint
9 static char sccsid[] = "$Id: ex_yank.c,v 8.3 1994/01/09 14:20:57 bostic Exp $ (Berkeley) $Date: 1994/01/09 14:20:57 $";
10 #endif /* not lint */
12 #include <sys/types.h>
14 #include "vi.h"
15 #include "excmd.h"
18 * ex_yank -- :[line [,line]] ya[nk] [buffer] [count]
20 * Yank the lines into a buffer.
22 int
23 ex_yank(sp, ep, cmdp)
24 SCR *sp;
25 EXF *ep;
26 EXCMDARG *cmdp;
28 return (cut(sp, ep, NULL,
29 F_ISSET(cmdp, E_BUFFER) ? &cmdp->buffer : NULL,
30 &cmdp->addr1, &cmdp->addr2, CUT_LINEMODE));