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

Diff for /src/usr.bin/mg/Attic/random.c between version 1.17 and 1.18

version 1.17, 2005/11/22 05:02:44 version 1.18, 2006/06/01 04:17:34
Line 116 
Line 116 
 {  {
         struct line     *dotp;          struct line     *dotp;
         int      doto, cr;          int      doto, cr;
           int      fudge = FALSE;
   
         dotp = curwp->w_dotp;          dotp = curwp->w_dotp;
         doto = curwp->w_doto;          doto = curwp->w_doto;
           undo_add_boundary();
           undo_no_boundary(TRUE);
         if (doto == llength(dotp)) {          if (doto == llength(dotp)) {
                 if (--doto <= 0)                  if (--doto <= 0)
                         return (FALSE);                          return (FALSE);
                   backchar(f, 1);
                   fudge = TRUE;
         } else {          } else {
                 if (doto == 0)                  if (doto == 0)
                         return (FALSE);                          return (FALSE);
                 ++curwp->w_doto;  
         }          }
         cr = lgetc(dotp, doto--);          cr = lgetc(dotp, doto - 1);
         lputc(dotp, doto + 1, lgetc(dotp, doto));          backdel(f, 1);
         lputc(dotp, doto, cr);          forwchar(f, 1);
           linsert(1, cr);
           if (fudge != TRUE)
                   backchar(f, 1);
           undo_no_boundary(FALSE);
           undo_add_boundary();
         lchange(WFEDIT);          lchange(WFEDIT);
         return (TRUE);          return (TRUE);
 }  }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18