Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / nvi / ex / ex_put.c
blobf200d696627b2194f0c71fc0de64206b7c2719b7
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_put.c,v 10.8 2001/06/25 15:19:18 skimo Exp (Berkeley) Date: 2001/06/25 15:19:18";
16 #endif /* not lint */
18 #include <sys/types.h>
19 #include <sys/queue.h>
21 #include <bitstring.h>
22 #include <ctype.h>
23 #include <limits.h>
24 #include <stdio.h>
25 #include <string.h>
27 #include "../common/common.h"
30 * ex_put -- [line] pu[t] [buffer]
31 * Append a cut buffer into the file.
33 * PUBLIC: int ex_put __P((SCR *, EXCMD *));
35 int
36 ex_put(SCR *sp, EXCMD *cmdp)
38 MARK m;
40 NEEDFILE(sp, cmdp);
42 m.lno = sp->lno;
43 m.cno = sp->cno;
44 if (put(sp, NULL,
45 FL_ISSET(cmdp->iflags, E_C_BUFFER) ? &cmdp->buffer : NULL,
46 &cmdp->addr1, &m, 1))
47 return (1);
48 sp->lno = m.lno;
49 sp->cno = m.cno;
50 return (0);