Lines Matching refs:cbp
66 CB *cbp; in cut() local
106 namecb: CBNAME(sp, cbp, name); in cut()
113 cbp = &sp->gp->dcb_store; in cut()
120 if (cbp == NULL) { in cut()
121 CALLOC_RET(sp, cbp, 1, sizeof(CB)); in cut()
122 cbp->name = name; in cut()
123 TAILQ_INIT(cbp->textq); in cut()
124 SLIST_INSERT_HEAD(sp->gp->cutq, cbp, q); in cut()
126 text_lfree(cbp->textq); in cut()
127 cbp->len = 0; in cut()
128 cbp->flags = 0; in cut()
134 cbp->flags |= CB_LMODE; in cut()
136 if (cut_line(sp, lno, 0, ENTIRE_LINE, cbp)) in cut()
144 ENTIRE_LINE : (tm->cno - fm->cno) + 1, cbp)) in cut()
149 if (cut_line(sp, lno, 0, ENTIRE_LINE, cbp)) in cut()
154 cut_line(sp, lno, 0, tm->cno + 1, cbp)) in cut()
159 sp->gp->dcbp = cbp; /* Repoint the default buffer on each pass. */ in cut()
163 CBNAME(sp, cbp, name); in cut()
168 cbp = &sp->gp->dcb_store; in cut()
175 text_lfree(cbp->textq); in cut()
176 cbp->len = 0; in cut()
177 cbp->flags = 0; in cut()
188 CB *cbp, *del_cbp = NULL, *pre_cbp = NULL; in cb_rotate() local
190 SLIST_FOREACH(cbp, sp->gp->cutq, q) { in cb_rotate()
191 switch(cbp->name) { in cb_rotate()
195 cbp->name += 1; in cb_rotate()
198 if (cbp == SLIST_FIRST(sp->gp->cutq)) in cb_rotate()
202 del_cbp = cbp; in cb_rotate()
205 pre_cbp = cbp; in cb_rotate()
220 cut_line(SCR *sp, recno_t lno, size_t fcno, size_t clen, CB *cbp) in cut_line() argument
246 TAILQ_INSERT_TAIL(cbp->textq, tp, q); in cut_line()
247 cbp->len += tp->len; in cut_line()
261 CB *cbp; in cut_close() local
264 while ((cbp = SLIST_FIRST(gp->cutq)) != NULL) { in cut_close()
265 if (!TAILQ_EMPTY(cbp->textq)) in cut_close()
266 text_lfree(cbp->textq); in cut_close()
268 free(cbp); in cut_close()
272 cbp = &gp->dcb_store; in cut_close()
273 if (!TAILQ_EMPTY(cbp->textq)) in cut_close()
274 text_lfree(cbp->textq); in cut_close()