rework ARGS structures as part of ex parser rework
[nvi.git] / ex / ex_put.c
blob871c8ed5589632f70d9117dd3ce030d6169a1e21
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_put.c,v 8.2 1993/11/04 16:16:54 bostic Exp $ (Berkeley) $Date: 1993/11/04 16:16:54 $";
10 #endif /* not lint */
12 #include <sys/types.h>
14 #include <ctype.h>
15 #include <string.h>
17 #include "vi.h"
18 #include "excmd.h"
21 * ex_put -- [line] pu[t] [buffer]
23 * Append a cut buffer into the file.
25 int
26 ex_put(sp, ep, cmdp)
27 SCR *sp;
28 EXF *ep;
29 EXCMDARG *cmdp;
31 MARK m;
33 m.lno = sp->lno;
34 m.cno = sp->cno;
35 if (put(sp, ep,
36 F_ISSET(cmdp, E_BUFFER) ? DEFCB : cmdp->buffer,
37 &cmdp->addr1, &m, 1))
38 return (1);
40 F_SET(sp, S_AUTOPRINT);
41 return (0);