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

Diff for /src/usr.bin/less/jump.c between version 1.8 and 1.9

version 1.8, 2015/11/06 15:50:33 version 1.9, 2015/11/09 16:39:13
Line 33 
Line 33 
         off_t end_pos;          off_t end_pos;
   
         if (ch_end_seek()) {          if (ch_end_seek()) {
                 error("Cannot seek to end of file", NULL_PARG);                  error("Cannot seek to end of file", NULL);
                 return;                  return;
         }          }
         /*          /*
Line 81 
Line 81 
                 jump_loc(pos, jump_sline);                  jump_loc(pos, jump_sline);
         } else if (linenum <= 1 && ch_beg_seek() == 0) {          } else if (linenum <= 1 && ch_beg_seek() == 0) {
                 jump_loc(ch_tell(), jump_sline);                  jump_loc(ch_tell(), jump_sline);
                 error("Cannot seek to beginning of file", NULL_PARG);                  error("Cannot seek to beginning of file", NULL);
         } else {          } else {
                 parg.p_linenum = linenum;                  parg.p_linenum = linenum;
                 error("Cannot seek to line number %n", &parg);                  error("Cannot seek to line number %n", &parg);
Line 117 
Line 117 
          * (the specified percentage of the file's length).           * (the specified percentage of the file's length).
          */           */
         if ((len = ch_length()) == -1) {          if ((len = ch_length()) == -1) {
                 ierror("Determining length of file", NULL_PARG);                  ierror("Determining length of file", NULL);
                 ch_end_seek();                  ch_end_seek();
         }          }
         if ((len = ch_length()) == -1) {          if ((len = ch_length()) == -1) {
                 error("Don't know length of file", NULL_PARG);                  error("Don't know length of file", NULL);
                 return;                  return;
         }          }
         pos = percent_pos(len, percent, fraction);          pos = percent_pos(len, percent, fraction);
Line 193 
Line 193 
          * Seek to the desired location.           * Seek to the desired location.
          */           */
         if (ch_seek(pos)) {          if (ch_seek(pos)) {
                 error("Cannot seek to that file position", NULL_PARG);                  error("Cannot seek to that file position", NULL);
                 return;                  return;
         }          }
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9