[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.10 and 1.11

version 1.10, 2002/02/16 21:27:49 version 1.11, 2002/03/11 13:02:56
Line 68 
Line 68 
 void    vtmove(int, int);  void    vtmove(int, int);
 void    vtputc(int);  void    vtputc(int);
 void    vtpute(int);  void    vtpute(int);
 int     vtputs(char *);  int     vtputs(const char *);
 void    vteeol(void);  void    vteeol(void);
 void    updext(int, int);  void    updext(int, int);
 void    modeline(MGWIN *);  void    modeline(MGWIN *);
Line 221 
Line 221 
  * on the first call to redisplay.   * on the first call to redisplay.
  */   */
 void  void
 vtinit()  vtinit(void)
 {  {
         int     i;          int     i;
   
Line 246 
Line 246 
  * close the terminal channel.   * close the terminal channel.
  */   */
 void  void
 vttidy()  vttidy(void)
 {  {
   
         ttcolor(CTEXT);          ttcolor(CTEXT);
Line 266 
Line 266 
  * more efficient. No checking for errors.   * more efficient. No checking for errors.
  */   */
 void  void
 vtmove(row, col)  vtmove(int row, int col)
         int row, col;  
 {  {
         vtrow = row;          vtrow = row;
         vtcol = col;          vtcol = col;
Line 286 
Line 285 
  * Three guesses how we found this.   * Three guesses how we found this.
  */   */
 void  void
 vtputc(c)  vtputc(int c)
         int     c;  
 {  {
         VIDEO   *vp;          VIDEO   *vp;
   
Line 317 
Line 315 
  * margin.   * margin.
  */   */
 void  void
 vtpute(c)  vtpute(int c)
         int     c;  
 {  {
         VIDEO *vp;          VIDEO *vp;
   
Line 351 
Line 348 
  * hardware erase to end of line command should be used to display this.   * hardware erase to end of line command should be used to display this.
  */   */
 void  void
 vteeol()  vteeol(void)
 {  {
         VIDEO *vp;          VIDEO *vp;
   
Line 370 
Line 367 
  * virtual and physical screens the same.   * virtual and physical screens the same.
  */   */
 void  void
 update()  update(void)
 {  {
         LINE    *lp;          LINE    *lp;
         MGWIN   *wp;          MGWIN   *wp;
Line 610 
Line 607 
  * display has done an update.   * display has done an update.
  */   */
 void  void
 ucopy(vvp, pvp)  ucopy(VIDEO *vvp, VIDEO *pvp)
         VIDEO *vvp;  
         VIDEO *pvp;  
 {  {
   
         vvp->v_flag &= ~VFCHG;          /* Changes done.         */          vvp->v_flag &= ~VFCHG;          /* Changes done.         */
Line 629 
Line 624 
  * left to let the user see where the cursor is   * left to let the user see where the cursor is
  */   */
 void  void
 updext(currow, curcol)  updext(int currow, int curcol)
         int     currow, curcol;  
 {  {
         LINE    *lp;                    /* pointer to current line */          LINE    *lp;                    /* pointer to current line */
         int     j;                      /* index into line */          int     j;                      /* index into line */
Line 662 
Line 656 
  * reverse video works on most terminals.   * reverse video works on most terminals.
  */   */
 void  void
 uline(row, vvp, pvp)  uline(int row, VIDEO *vvp, VIDEO *pvp)
         int     row;  
         VIDEO   *vvp;  
         VIDEO   *pvp;  
 {  {
 #ifdef  MEMMAP  
         putline(row + 1, 1, &vvp->v_text[0]);  
 #else  
         char  *cp1;          char  *cp1;
         char  *cp2;          char  *cp2;
         char  *cp3;          char  *cp3;
Line 677 
Line 665 
         char  *cp5;          char  *cp5;
         int     nbflag;          int     nbflag;
   
   #ifdef  MEMMAP
           putline(row + 1, 1, &vvp->v_text[0]);
   #else
   
         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
Line 759 
Line 751 
  * characters may never be seen.   * characters may never be seen.
  */   */
 void  void
 modeline(wp)  modeline(MGWIN *wp)
         MGWIN  *wp;  
 {  {
         int     n;          int     n;
         BUFFER *bp;          BUFFER *bp;
Line 791 
Line 782 
         }          }
         vtputc('(');          vtputc('(');
         ++n;          ++n;
         for (mode = 0;;) {          for (mode = 0; ; ) {
                 n += vtputs(bp->b_modes[mode]->p_name);                  n += vtputs(bp->b_modes[mode]->p_name);
                 if (++mode > bp->b_nmodes)                  if (++mode > bp->b_nmodes)
                         break;                          break;
Line 809 
Line 800 
  * output a string to the mode line, report how long it was.   * output a string to the mode line, report how long it was.
  */   */
 int  int
 vtputs(s)  vtputs(const char *s)
         char  *s;  
 {  {
         int     n = 0;          int n = 0;
   
         while (*s != '\0') {          while (*s != '\0') {
                 vtputc(*s++);                  vtputc(*s++);
Line 831 
Line 821 
  * just about any machine.   * just about any machine.
  */   */
 void  void
 hash(vp)  hash(VIDEO *vp)
         VIDEO *vp;  
 {  {
         int     i;          int     i;
         int     n;          int     n;
Line 881 
Line 870 
  * bit better; but it looks ugly.   * bit better; but it looks ugly.
  */   */
 void  void
 setscores(offs, size)  setscores(int offs, int size)
         int offs;  
         int size;  
 {  {
         SCORE   *sp;          SCORE   *sp;
         SCORE   *sp1;          SCORE   *sp1;
Line 970 
Line 957 
  * intensive then the code that builds the score matrix!   * intensive then the code that builds the score matrix!
  */   */
 void  void
 traceback(offs, size, i, j)  traceback(int offs, int size, int i, int j)
         int     offs;  
         int     size;  
         int     i;  
         int     j;  
 {  {
         int     itrace;          int     itrace;
         int     jtrace;          int     jtrace;

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11