rework initial error handling -- since we check for any screens on
[nvi.git] / ex / ex_put.c
blobf7de64388afaa0bda2fee6281b3c75ea000a176b
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.4 1994/01/09 14:20:56 bostic Exp $ (Berkeley) $Date: 1994/01/09 14:20:56 $";
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, NULL, F_ISSET(cmdp, E_BUFFER) ? &cmdp->buffer : NULL,
36 &cmdp->addr1, &m, 1))
37 return (1);
38 return (0);