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

Diff for /src/usr.bin/mg/util.c between version 1.20 and 1.21

version 1.20, 2006/06/01 10:10:00 version 1.21, 2006/07/25 08:22:32
Line 31 
Line 31 
         int      ratio;          int      ratio;
   
         /* collect the data */          /* collect the data */
         clp = lforw(curbp->b_linep);          clp = lforw(curbp->b_headp);
         cchar = 0;          cchar = 0;
         cline = 0;          cline = 0;
         cbyte = 0;          cbyte = 0;
Line 52 
Line 52 
                 /* now count the chars */                  /* now count the chars */
                 nchar += llength(clp);                  nchar += llength(clp);
                 clp = lforw(clp);                  clp = lforw(clp);
                 if (clp == curbp->b_linep)                  if (clp == curbp->b_headp)
                         break;                          break;
                 /* count the newline */                  /* count the newline */
                 nchar++;                  nchar++;
Line 60 
Line 60 
         /* determine row */          /* determine row */
         row = curwp->w_toprow + 1;          row = curwp->w_toprow + 1;
         clp = curwp->w_linep;          clp = curwp->w_linep;
         while (clp != curbp->b_linep && clp != curwp->w_dotp) {          while (clp != curbp->b_headp && clp != curwp->w_dotp) {
                 ++row;                  ++row;
                 clp = lforw(clp);                  clp = lforw(clp);
         }          }
Line 206 
Line 206 
         RSIZE    nld;          RSIZE    nld;
   
         lp1 = curwp->w_dotp;          lp1 = curwp->w_dotp;
         while (llength(lp1) == 0 && (lp2 = lback(lp1)) != curbp->b_linep)          while (llength(lp1) == 0 && (lp2 = lback(lp1)) != curbp->b_headp)
                 lp1 = lp2;                  lp1 = lp2;
         lp2 = lp1;          lp2 = lp1;
         nld = (RSIZE)0;          nld = (RSIZE)0;
         while ((lp2 = lforw(lp2)) != curbp->b_linep && llength(lp2) == 0)          while ((lp2 = lforw(lp2)) != curbp->b_headp && llength(lp2) == 0)
                 ++nld;                  ++nld;
         if (nld == 0)          if (nld == 0)
                 return (TRUE);                  return (TRUE);

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21