=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/linenum.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- src/usr.bin/less/linenum.c 2015/12/25 14:29:22 1.13 +++ src/usr.bin/less/linenum.c 2016/01/12 17:48:04 1.14 @@ -44,7 +44,7 @@ struct linenum_info *prev; /* Line to previous in the list */ off_t pos; /* File position */ off_t gap; /* Gap between prev and next */ - LINENUM line; /* Line number */ + off_t line; /* Line number */ }; /* * "gap" needs some explanation: the gap of any particular line number @@ -120,7 +120,7 @@ * FIRST character in the specified line. */ void -add_lnum(LINENUM linenum, off_t pos) +add_lnum(off_t linenum, off_t pos) { struct linenum_info *p; struct linenum_info *new; @@ -202,7 +202,7 @@ static void longish(void) { - if (loopcount >= 0 && ++loopcount > 100) { + if (++loopcount > 100) { loopcount = 0; if (time(NULL) >= startime + LONGTIME) { ierror("Calculating line numbers", NULL); @@ -231,11 +231,11 @@ * Find the line number associated with a given position. * Return 0 if we can't figure it out. */ -LINENUM +off_t find_linenum(off_t pos) { struct linenum_info *p; - LINENUM linenum; + off_t linenum; off_t cpos; if (!linenums) @@ -340,11 +340,11 @@ * Return -1 if we can't figure it out. */ off_t -find_pos(LINENUM linenum) +find_pos(off_t linenum) { struct linenum_info *p; off_t cpos; - LINENUM clinenum; + off_t clinenum; if (linenum <= 1) /* @@ -411,12 +411,12 @@ * The argument "where" tells which line is to be considered * the "current" line (e.g. TOP, BOTTOM, MIDDLE, etc). */ -LINENUM +off_t currline(int where) { off_t pos; off_t len; - LINENUM linenum; + off_t linenum; pos = position(where); len = ch_length();