/* -*-C-*- bopact.h */ /*-->bopact*/ /**********************************************************************/ /******************************* bopact *******************************/ /**********************************************************************/ void bopact() /* beginning-of-page action */ { int y; /* Define a shorthand for inverse-video strings */ #define OUTIV(str) (void)fprintf(plotfp,"\033[7m%s\033[m",str) pbghpos = pbgvpos = -99; cpagep = (long)FTELL(dvifp) - 1L; ppagep = (long)nosignex(dvifp,(BYTE)4); if (!g_interactive) return; /* no action if not a terminal */ OUTS("\033:["); /* BBNPSH push context */ OUTS("\033:2e"); /* BBNSEM Select Emulation Mode VT100 */ OUTS("\033(B"); /* revert to ASCII character set */ OUTS("\033[H\033[K"); /* cursor to line 1 and clear */ OUTIV("SPACE"); /* Output help message in top line */ OUTS(":next-page "); OUTIV("P"); OUTS(":previous-page "); OUTIV("^L"); OUTS(":current-page "); OUTIV("L"); OUTS(":Left "); OUTIV("R"); OUTS(":right "); OUTIV("D"); OUTS(":Down "); OUTIV("U"); OUTS(":up"); OUTS("\033[2H\033[K"); /* cursor to line 2 and clear */ OUTIV("@"); OUTS(":initial position "); OUTIV("EMACS keys, arrow keys, l, r, d, u"); OUTS(":move in small steps "); OUTS("\033[3H\033[K"); /* cursor to line 3 and clear */ OUTIV("Z"); OUTS(": zoom up "); OUTIV("z"); OUTS(": zoom down "); OUTIV("###"); OUTS(":goto page ### "); OUTS("\033[4H\033[K"); /* cursor to line 4 and clear */ (void)fprintf(plotfp,"Document page: %d/%d TeX pages: %s", (int)(cur_index+1),(int)page_count,tctos()); (void)fprintf(plotfp," Xscreen = %d, Yscreen = %d, Mag = %ld", (int)xscreen, (int)yscreen, (long)runmag); OUTS("\033[5H\033[J"); /* clear from line 5 to end of screen */ OUTS("\033[H"); /* home cursor */ OUTS("\033:]"); /* BBNPOP pop context */ /* Draw menu bars across screen */ OUTS("\033:15v"); /* BBNSDO - set drawing operation to foreground color */ for (y = YSIZE; y < YSIZE + 8; y += 2) (void)fprintf(plotfp,"\033:0;%dm\033:%d;%dd",y,XSIZE-1,y); }