Lines Matching full:gp

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