arg1_len not initialized, was pushing extra gunk on the tty queue
[nvi.git] / ex / ex_put.c
blob4ba032cc8eb0014564be71e256e87811798c4ae9
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.3 1993/12/29 09:50:52 bostic Exp $ (Berkeley) $Date: 1993/12/29 09:50:52 $";
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);
39 return (0);