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

Diff for /src/usr.bin/mg/buffer.c between version 1.45 and 1.46

version 1.45, 2005/09/28 06:37:52 version 1.46, 2005/10/11 01:08:52
Line 126 
Line 126 
         BUFFER *bp2;          BUFFER *bp2;
         MGWIN  *wp;          MGWIN  *wp;
         int s;          int s;
           struct undo_rec *rec, *next;
   
         /*          /*
          * Find some other buffer to display. Try the alternate buffer,           * Find some other buffer to display. Try the alternate buffer,
Line 176 
Line 177 
                         bp1->b_altb = (bp->b_altb == bp1) ? NULL : bp->b_altb;                          bp1->b_altb = (bp->b_altb == bp1) ? NULL : bp->b_altb;
                 bp1 = bp1->b_bufp;                  bp1 = bp1->b_bufp;
         }          }
           rec = LIST_FIRST(&bp->b_undo);
           while (rec != NULL) {
                   next = LIST_NEXT(rec, next);
                   free_undo_record(rec);
                   rec = next;
           }
   
         free((char *)bp->b_bname);              /* Release name block    */          free((char *)bp->b_bname);              /* Release name block    */
         free(bp);                               /* Release buffer block */          free(bp);                               /* Release buffer block */
         return (TRUE);          return (TRUE);
Line 488 
Line 496 
         bp->b_nwnd = 0;          bp->b_nwnd = 0;
         bp->b_linep = lp;          bp->b_linep = lp;
         bp->b_nmodes = defb_nmodes;          bp->b_nmodes = defb_nmodes;
           LIST_INIT(&bp->b_undo);
           bp->b_undoptr = NULL;
           memset(&bp->b_undopos, 0, sizeof(bp->b_undopos));
         i = 0;          i = 0;
         do {          do {
                 bp->b_modes[i] = defb_modes[i];                  bp->b_modes[i] = defb_modes[i];

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