if (cut_line(sp, cnt, 0, 0, &cb)) {
if (cut_line(sp, cnt, 0, CUT_LINE_TO_EOL, &cb)) {
ex_copy(sp, cmdp)	SCR *sp;	EXCMD *cmdp;{	CB cb;	MARK fm1, fm2, m, tm;	recno_t cnt;	int rval;	rval = 0;	NEEDFILE(sp, cmdp);	/*	 * It's possible to copy things into the area that's being	 * copied, e.g. "2,5copy3" is legitimate.  Save the text to	 * a cut buffer.	 */	fm1 = cmdp->addr1;	fm2 = cmdp->addr2;	memset(&cb, 0, sizeof(cb));	CIRCLEQ_INIT(&cb.textq);	for (cnt = fm1.lno; cnt <= fm2.lno; ++cnt)		if (cut_line(sp, cnt, 0, 0, &cb)) {			rval = 1;			goto err;		}	cb.flags |= CB_LMODE;	/* Put the text into place. */	tm.lno = cmdp->lineno;	tm.cno = 0;	if (put(sp, &cb, NULL, &tm, &m, 1))		rval = 1;	else {		/*		 * Copy puts the cursor on the last line copied.  The cursor		 * returned by the put routine is the first line put, not the		 * last, because that's the historic semantic of vi.		 */		cnt = (fm2.lno - fm1.lno) + 1;		sp->lno = m.lno + (cnt - 1);		sp->cno = 0;	}err:	text_lfree(&cb.textq);	return (rval);}