Lines Matching refs:gp

40 editor(GS *gp, int argc, char *argv[])
56 if (gp->scr_busy == NULL)
57 gp->scr_busy = vs_busy;
59 if (gp->scr_msg == NULL)
60 gp->scr_msg = vs_msg;
61 gp->catd = (nl_catd)-1;
64 TAILQ_INIT(gp->dq);
65 TAILQ_INIT(gp->hq);
66 SLIST_INIT(gp->ecq);
67 SLIST_INSERT_HEAD(gp->ecq, &gp->excmd, q);
68 gp->noprint = DEFAULT_NOPRINT;
71 TAILQ_INIT(gp->frefq);
72 TAILQ_INIT(gp->dcb_store.textq);
73 SLIST_INIT(gp->cutq);
74 SLIST_INIT(gp->seqq);
101 F_SET(gp, G_SNAPSHOT);
114 if (gp->c_option != NULL) {
118 gp->c_option = optarg;
127 attach(gp);
140 F_CLR(gp, G_SNAPSHOT);
163 if ((gp->tracefp = fopen(optarg, "w")) == NULL) {
167 (void)fprintf(gp->tracefp,
192 (void)gp->scr_usage();
207 if (LF_ISSET(SC_EX) && F_ISSET(gp, G_SCRIPTED))
219 if (screen_init(gp, NULL, &sp)) {
221 TAILQ_INSERT_HEAD(gp->dq, sp, q);
225 TAILQ_INSERT_HEAD(gp->dq, sp, q);
310 if (gp->c_option == NULL) {
360 if (EXCMD_RUNNING(gp)) {
389 (void)gp->scr_bell(sp);
410 v_end(gp);
422 v_end(GS *gp)
428 if (gp->ccl_sp != NULL) {
429 (void)file_end(gp->ccl_sp, NULL, 1);
430 (void)screen_end(gp->ccl_sp);
432 while ((sp = TAILQ_FIRST(gp->dq)) != NULL)
434 while ((sp = TAILQ_FIRST(gp->hq)) != NULL)
440 while ((frp = TAILQ_FIRST(gp->frefq)) != NULL) {
441 TAILQ_REMOVE(gp->frefq, frp, q);
449 free(gp->i_event);
452 cut_close(gp);
455 seq_close(gp);
458 (void)text_lfree(gp->dcb_store.textq);
461 msg_close(gp);
465 if (F_ISSET(gp, G_BELLSCHED))
474 while ((mp = SLIST_FIRST(gp->msgq)) != NULL) {
477 SLIST_REMOVE_HEAD(gp->msgq, q);
486 free(gp->tmp_bp);
490 if (gp->tracefp != NULL)
491 (void)fclose(gp->tracefp);
553 attach(GS *gp)