[BACK]Return to display.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/display.c between version 1.1 and 1.2

version 1.1, 2000/02/25 19:08:47 version 1.2, 2000/02/26 22:53:16
Line 28 
Line 28 
 #endif  #endif
   
 #ifdef  STANDOUT_GLITCH  #ifdef  STANDOUT_GLITCH
 extern int SG;                          /* number of standout glitches  */  #include <term.h>
 #endif  #endif
   
 /*  /*
Line 262 
Line 262 
 VOID  VOID
 update() {  update() {
         register LINE   *lp;          register LINE   *lp;
         register WINDOW *wp;          register MGWIN *wp;
         register VIDEO  *vp1;          register VIDEO  *vp1;
         VIDEO           *vp2;          VIDEO           *vp2;
         register int    i;          register int    i;
Line 547 
Line 547 
         if (vvp->v_color != pvp->v_color) {     /* Wrong color, do a    */          if (vvp->v_color != pvp->v_color) {     /* Wrong color, do a    */
                 ttmove(row, 0);                 /* full redraw.         */                  ttmove(row, 0);                 /* full redraw.         */
 #ifdef  STANDOUT_GLITCH  #ifdef  STANDOUT_GLITCH
                 if (pvp->v_color != CTEXT && SG >= 0) tteeol();                  if (pvp->v_color != CTEXT && magic_cookie_glitch >= 0)
                           tteeol();
 #endif  #endif
                 ttcolor(vvp->v_color);                  ttcolor(vvp->v_color);
 #ifdef  STANDOUT_GLITCH  #ifdef  STANDOUT_GLITCH
                 cp1 = &vvp->v_text[SG > 0 ? SG : 0];                  cp1 = &vvp->v_text[magic_cookie_glitch > 0 ? magic_cookie_glitch : 0];
                 /* the odd code for SG==0 is to avoid putting the invisable                  /* the odd code for magic_cookie_glitch==0
                    * is to avoid putting the invisable
                  * glitch character on the next line.                   * glitch character on the next line.
                  * (Hazeltine executive 80 model 30)                   * (Hazeltine executive 80 model 30)
                  */                   */
                 cp2 = &vvp->v_text[ncol - (SG >= 0 ? (SG!=0 ? SG : 1) : 0)];                  cp2 = &vvp->v_text[ncol - (magic_cookie_glitch >= 0 ? (magic_cookie_glitch!=0 ? magic_cookie_glitch : 1) : 0)];
 #else  #else
                 cp1 = &vvp->v_text[0];                  cp1 = &vvp->v_text[0];
                 cp2 = &vvp->v_text[ncol];                  cp2 = &vvp->v_text[ncol];
Line 598 
Line 600 
         /* Alcyon hack */          /* Alcyon hack */
         ttmove(row, (int)(cp1-&vvp->v_text[0]));          ttmove(row, (int)(cp1-&vvp->v_text[0]));
 #ifdef  STANDOUT_GLITCH  #ifdef  STANDOUT_GLITCH
         if (vvp->v_color != CTEXT && SG > 0) {          if (vvp->v_color != CTEXT && magic_cookie_glitch > 0) {
                 if(cp1 < &vvp->v_text[SG]) cp1 = &vvp->v_text[SG];                  if(cp1 < &vvp->v_text[magic_cookie_glitch]) cp1 = &vvp->v_text[magic_cookie_glitch];
                 if(cp5 > &vvp->v_text[ncol-SG]) cp5 = &vvp->v_text[ncol-SG];                  if(cp5 > &vvp->v_text[ncol-magic_cookie_glitch]) cp5 = &vvp->v_text[ncol-magic_cookie_glitch];
         } else if (SG < 0)          } else if (magic_cookie_glitch < 0)
 #endif  #endif
                 ttcolor(vvp->v_color);                  ttcolor(vvp->v_color);
         while (cp1 != cp5) {          while (cp1 != cp5) {
Line 621 
Line 623 
  * change the modeline format by hacking at   * change the modeline format by hacking at
  * this routine. Called by "update" any time   * this routine. Called by "update" any time
  * there is a dirty window.   * there is a dirty window.
  * Note that if STANDOUT_GLITCH is defined, first and last SG characters   * Note that if STANDOUT_GLITCH is defined, first and last
  * may never be seen.   * magic_cookie_glitch characters may never be seen.
  */   */
 VOID  VOID
 modeline(wp) register WINDOW *wp; {  modeline(wp) register MGWIN *wp; {
         register int    n;          register int    n;
         register BUFFER *bp;          register BUFFER *bp;
         int     mode;          int     mode;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2