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

Diff for /src/usr.bin/mg/window.c between version 1.6 and 1.7

version 1.6, 2001/05/23 22:36:15 version 1.7, 2001/05/24 03:05:27
Line 7 
Line 7 
 #include "def.h"  #include "def.h"
   
 /*  /*
  * Reposition dot in the current window to line "n".  If the argument is   * Reposition dot in the current window to line "n".  If the argument is
  * positive, it is that line.  If it is negative it is that line from the   * positive, it is that line.  If it is negative it is that line from the
  * bottom.  If it is 0 the window is centered (this is what the standard   * bottom.  If it is 0 the window is centered (this is what the standard
  * redisplay code does).  If GOSREC is undefined, default is 0, so it acts   * redisplay code does).  If GOSREC is undefined, default is 0, so it acts
  * like GNU.  If GOSREC is defined, with no argument it defaults to 1 and   * like GNU.  If GOSREC is defined, with no argument it defaults to 1 and
  * works like in Gosling.   * works like in Gosling.
  */   */
 /* ARGSUSED */  /* ARGSUSED */
Line 30 
Line 30 
 }  }
   
 /*  /*
  * Refresh the display.  A call is made to the "ttresize" entry in the   * Refresh the display.  A call is made to the "ttresize" entry in the
  * terminal handler, which tries to reset "nrow" and "ncol".  They will,   * terminal handler, which tries to reset "nrow" and "ncol".  They will,
  * however, never be set outside of the NROW or NCOL range.  If the display   * however, never be set outside of the NROW or NCOL range.  If the display
  * changed size, arrange that everything is redone, then call "update" to   * changed size, arrange that everything is redone, then call "update" to
  * fix the display.  We do this so the new size can be displayed.  In the   * fix the display.  We do this so the new size can be displayed.  In the
  * normal case the call to "update" in "main.c" refreshes the screen, and   * normal case the call to "update" in "main.c" refreshes the screen, and
  * all of the windows need not be recomputed.  Note that when you get to the   * all of the windows need not be recomputed.  Note that when you get to the
  * "display unusable" message, the screen will be messed up. If you make the   * "display unusable" message, the screen will be messed up. If you make the
  * window bigger again, and send another command, everything will get fixed!   * window bigger again, and send another command, everything will get fixed!
  */   */
 /* ARGSUSED */  /* ARGSUSED */
Line 74 
Line 74 
 }  }
   
 /*  /*
  * The command to make the next window (next => down the screen) the current   * The command to make the next window (next => down the screen) the current
  * window. There are no real errors, although the command does nothing if   * window. There are no real errors, although the command does nothing if
  * there is only 1 window on the screen.   * there is only 1 window on the screen.
  */   */
 /* ARGSUSED */  /* ARGSUSED */
Line 97 
Line 97 
 /* not in Gnu Emacs */  /* not in Gnu Emacs */
 /*  /*
  * This command makes the previous window (previous => up the screen) the   * This command makes the previous window (previous => up the screen) the
  * current window. There are no errors, although the command does not do   * current window. There are no errors, although the command does not do
  * a lot if there is only 1 window.   * a lot if there is only 1 window.
  */   */
 /* ARGSUSED */  /* ARGSUSED */
Line 120 
Line 120 
 #endif /* GOSEMACS */  #endif /* GOSEMACS */
   
 /*  /*
  * This command makes the current window the only window on the screen.  Try   * This command makes the current window the only window on the screen.  Try
  * to set the framing so that "." does not have to move on the display.  Some   * to set the framing so that "." does not have to move on the display.  Some
  * care has to be taken to keep the values of dot and mark in the buffer   * care has to be taken to keep the values of dot and mark in the buffer
  * structures right if the distruction of a window makes a buffer become   * structures right if the distruction of a window makes a buffer become
  * undisplayed.   * undisplayed.
  */   */
 /* ARGSUSED */  /* ARGSUSED */
Line 174 
Line 174 
   
 /*  /*
  * Split the current window.  A window smaller than 3 lines cannot be split.   * Split the current window.  A window smaller than 3 lines cannot be split.
  * The only other error that is possible is a "malloc" failure allocating the   * The only other error that is possible is a "malloc" failure allocating the
  * structure for the new window.   * structure for the new window.
  */   */
 /* ARGSUSED */  /* ARGSUSED */
Line 258 
Line 258 
 }  }
   
 /*  /*
  * Enlarge the current window.  Find the window that loses space.  Make sure   * Enlarge the current window.  Find the window that loses space.  Make sure
  * it is big enough.  If so, hack the window descriptions, and ask redisplay   * it is big enough.  If so, hack the window descriptions, and ask redisplay
  * to do all the hard work.  You don't just set "force reframe" because dot   * to do all the hard work.  You don't just set "force reframe" because dot
  * would move.   * would move.
  */   */
 /* ARGSUSED */  /* ARGSUSED */
Line 311 
Line 311 
 }  }
   
 /*  /*
  * Shrink the current window.  Find the window that gains space.  Hack at the   * Shrink the current window.  Find the window that gains space.  Hack at the
  * window descriptions. Ask the redisplay to do all the hard work.   * window descriptions. Ask the redisplay to do all the hard work.
  */   */
 int  int
Line 365 
Line 365 
 }  }
   
 /*  /*
  * Delete current window. Call shrink-window to do the screen updating, then   * Delete current window. Call shrink-window to do the screen updating, then
  * throw away the window.   * throw away the window.
  */   */
 /* ARGSUSED */  /* ARGSUSED */
Line 403 
Line 403 
 }  }
   
 /*  /*
  * Pick a window for a pop-up.  Split the screen if there is only one window.   * Pick a window for a pop-up.  Split the screen if there is only one window.
  * Pick the uppermost window that isn't the current window. An LRU algorithm   * Pick the uppermost window that isn't the current window. An LRU algorithm
  * might be better. Return a pointer, or NULL on error.   * might be better. Return a pointer, or NULL on error.
  */   */

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7