Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / nvi / ex / ex_yank.c
blobc7302dae20a80025380bcc09aeddf08b2269496b
1 /* $NetBSD$ */
3 /*-
4 * Copyright (c) 1992, 1993, 1994
5 * The Regents of the University of California. All rights reserved.
6 * Copyright (c) 1992, 1993, 1994, 1995, 1996
7 * Keith Bostic. All rights reserved.
9 * See the LICENSE file for redistribution information.
12 #include "config.h"
14 #ifndef lint
15 static const char sccsid[] = "Id: ex_yank.c,v 10.8 2001/06/25 15:19:22 skimo Exp (Berkeley) Date: 2001/06/25 15:19:22";
16 #endif /* not lint */
18 #include <sys/types.h>
19 #include <sys/queue.h>
21 #include <bitstring.h>
22 #include <limits.h>
23 #include <stdio.h>
25 #include "../common/common.h"
28 * ex_yank -- :[line [,line]] ya[nk] [buffer] [count]
29 * Yank the lines into a buffer.
31 * PUBLIC: int ex_yank __P((SCR *, EXCMD *));
33 int
34 ex_yank(SCR *sp, EXCMD *cmdp)
36 NEEDFILE(sp, cmdp);
39 * !!!
40 * Historically, yanking lines in ex didn't count toward the
41 * number-of-lines-yanked report.
43 return (cut(sp,
44 FL_ISSET(cmdp->iflags, E_C_BUFFER) ? &cmdp->buffer : NULL,
45 &cmdp->addr1, &cmdp->addr2, CUT_LINEMODE));