home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name scactpg -- Display (activate) a video page and use
- * recorded cursor state for that page.
- *
- * Synopsis apage = scactpg(page);
- *
- * int apage The video page actually displayed.
- * int page The page to display (activate).
- *
- * Description SCACTPG sets the active display page, i.e., displays the
- * page. It also sets the cursor size and turns the cursor
- * off or on according to the last recorded cursor state
- * for this page.
- *
- * Use SCPAGES to find how many pages are supported by the
- * current device in the current mode. Use SCPAGE to
- * direct C TOOLS PLUS screen output to a given page,
- * whether it is active (displayed) or not. Use SCAPAGE to
- * display a page without altering the cursor state.
- *
- * Returns apage The video page actually displayed.
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bscreen.h>
-
- int scactpg(page)
- int page;
- {
- int device,mode,columns,act_page;
- int old_curpage;
- int row,col,high,low;
-
- old_curpage = b_curpage; /* Save current page number. */
- device = scmode(&mode,&columns,&act_page);
- scpage(act_page); /* Designate former active page */
- /* as current. */
- sccurst(&row,&col,&high,&low); /* Return & record actual */
- /* cursor for current page */
- /* (which now coincides with */
- /* former active page). */
-
- page = scapage(page); /* Display new active page. */
- scpage(page);
- scpgcur(b_curoff [device][page], /* Set cursor state for new page*/
- b_curtype[device][page].high,
- b_curtype[device][page].low,
- CUR_NO_ADJUST);
-
- scpage(old_curpage); /* Restore previous current page*/
-
- return(page);
- }