rc.conf: Add and document the missing root_rw_mount=YES
[dragonfly.git] / contrib / nvi2 / ex / ex_put.c
blobc45fc551bfd19f8481a165f68cf2baf394b1ff63
1 /*-
2 * Copyright (c) 1992, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1992, 1993, 1994, 1995, 1996
5 * Keith Bostic. All rights reserved.
7 * See the LICENSE file for redistribution information.
8 */
10 #include "config.h"
12 #include <sys/types.h>
13 #include <sys/queue.h>
14 #include <sys/time.h>
16 #include <bitstring.h>
17 #include <ctype.h>
18 #include <limits.h>
19 #include <stdio.h>
20 #include <string.h>
22 #include "../common/common.h"
25 * ex_put -- [line] pu[t] [buffer]
26 * Append a cut buffer into the file.
28 * PUBLIC: int ex_put(SCR *, EXCMD *);
30 int
31 ex_put(SCR *sp, EXCMD *cmdp)
33 MARK m;
35 NEEDFILE(sp, cmdp);
37 m.lno = sp->lno;
38 m.cno = sp->cno;
39 if (put(sp, NULL,
40 FL_ISSET(cmdp->iflags, E_C_BUFFER) ? &cmdp->buffer : NULL,
41 &cmdp->addr1, &m, 1))
42 return (1);
43 sp->lno = m.lno;
44 sp->cno = m.cno;
45 return (0);