[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.46 and 1.47

version 1.46, 2015/03/24 22:28:10 version 1.47, 2015/04/03 22:10:29
Line 17 
Line 17 
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <term.h>
   
 #include "def.h"  #include "def.h"
 #include "kbd.h"  #include "kbd.h"
   
 /*  /*
  * You can change these back to the types  
  * implied by the name if you get tight for space. If you  
  * make both of them "int" you get better code on the VAX.  
  * They do nothing if this is not Gosling redisplay, except  
  * for change the size of a structure that isn't used.  
  * A bit of a cheat.  
  */  
 #define XCHAR   int  
 #define XSHORT  int  
   
 #ifdef  STANDOUT_GLITCH  
 #include <term.h>  
 #endif  
   
 /*  
  * A video structure always holds   * A video structure always holds
  * an array of characters whose length is equal to   * an array of characters whose length is equal to
  * the longest line possible. v_text is allocated   * the longest line possible. v_text is allocated
Line 46 
Line 32 
         short   v_hash;         /* Hash code, for compares.      */          short   v_hash;         /* Hash code, for compares.      */
         short   v_flag;         /* Flag word.                    */          short   v_flag;         /* Flag word.                    */
         short   v_color;        /* Color of the line.            */          short   v_color;        /* Color of the line.            */
         XSHORT  v_cost;         /* Cost of display.              */          int     v_cost;         /* Cost of display.              */
         char    *v_text;        /* The actual characters.        */          char    *v_text;        /* The actual characters.        */
 };  };
   
Line 58 
Line 44 
  * SCORE structures hold the optimal   * SCORE structures hold the optimal
  * trace trajectory, and the cost of redisplay, when   * trace trajectory, and the cost of redisplay, when
  * the dynamic programming redisplay code is used.   * the dynamic programming redisplay code is used.
  * If no fancy redisplay, this isn't used. The trace index  
  * fields can be "char", and the cost a "short", but  
  * this makes the code worse on the VAX.  
  */   */
 struct score {  struct score {
         XCHAR   s_itrace;       /* "i" index for track back.     */          int     s_itrace;       /* "i" index for track back.     */
         XCHAR   s_jtrace;       /* "j" index for trace back.     */          int     s_jtrace;       /* "j" index for trace back.     */
         XSHORT  s_cost;         /* Display cost.                 */          int     s_cost;         /* Display cost.                 */
 };  };
   
 void    vtmove(int, int);  void    vtmove(int, int);

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47