/* * scr_update -- * Update all of the screens that are backed by the file that * just changed. */ static int scr_update( SCR *sp, recno_t lno, lnop_t op, int current) { EXF *ep; SCR *tsp; if (F_ISSET(sp, SC_EX)) return (0); ep = sp->ep; if (ep->refcnt != 1) TAILQ_FOREACH(tsp, sp->gp->dq, q) if (sp != tsp && tsp->ep == ep) if (vs_change(tsp, lno, op)) return (1); return (current ? vs_change(sp, lno, op) : 0); }
/* * scr_update -- * Update all of the screens that are backed by the file that * just changed. * * PUBLIC: int scr_update __P((SCR *sp, db_recno_t lno, * PUBLIC: lnop_t op, int current)); */ int scr_update(SCR *sp, db_recno_t lno, lnop_t op, int current) { EXF *ep; SCR *tsp; WIN *wp; if (F_ISSET(sp, SC_EX)) return (0); /* XXXX goes outside of window */ ep = sp->ep; if (ep->refcnt != 1) for (wp = sp->gp->dq.cqh_first; wp != (void *)&sp->gp->dq; wp = wp->q.cqe_next) for (tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) if (sp != tsp && tsp->ep == ep) if (vs_change(tsp, lno, op)) return (1); return (current ? vs_change(sp, lno, op) : 0); }