=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/prompt.c,v retrieving revision 1.19 retrieving revision 1.20 diff -c -r1.19 -r1.20 *** src/usr.bin/less/prompt.c 2016/01/12 23:01:23 1.19 --- src/usr.bin/less/prompt.c 2016/01/13 22:47:45 1.20 *************** *** 120,142 **** { char buf[INT_STRLEN_BOUND(pos) + 2]; ! postoa(pos, buf, sizeof buf); ap_str(buf); } /* - * Append a line number to the end of the message. - */ - static void - ap_linenum(off_t linenum) - { - char buf[INT_STRLEN_BOUND(linenum) + 2]; - - linenumtoa(linenum, buf, sizeof buf); - ap_str(buf); - } - - /* * Append an integer to the end of the message. */ static void --- 120,130 ---- { char buf[INT_STRLEN_BOUND(pos) + 2]; ! postoa(pos, buf, sizeof(buf)); ap_str(buf); } /* * Append an integer to the end of the message. */ static void *************** *** 255,261 **** case 'd': /* Current page number */ linenum = currline(where); if (linenum > 0 && sc_height > 1) ! ap_linenum(PAGE_NUM(linenum)); else ap_quest(); break; --- 243,249 ---- case 'd': /* Current page number */ linenum = currline(where); if (linenum > 0 && sc_height > 1) ! ap_pos(PAGE_NUM(linenum)); else ap_quest(); break; *************** *** 266,278 **** ap_quest(); } else if (len == 0) { /* An empty file has no pages. */ ! ap_linenum(0); } else { linenum = find_linenum(len - 1); if (linenum <= 0) ap_quest(); else ! ap_linenum(PAGE_NUM(linenum)); } break; case 'E': /* Editor name */ --- 254,266 ---- ap_quest(); } else if (len == 0) { /* An empty file has no pages. */ ! ap_pos(0); } else { linenum = find_linenum(len - 1); if (linenum <= 0) ap_quest(); else ! ap_pos(PAGE_NUM(linenum)); } break; case 'E': /* Editor name */ *************** *** 293,299 **** case 'l': /* Current line number */ linenum = currline(where); if (linenum != 0) ! ap_linenum(linenum); else ap_quest(); break; --- 281,287 ---- case 'l': /* Current line number */ linenum = currline(where); if (linenum != 0) ! ap_pos(linenum); else ap_quest(); break; *************** *** 303,309 **** (linenum = find_linenum(len)) <= 0) ap_quest(); else ! ap_linenum(linenum-1); break; case 'm': /* Number of files */ n = ntags(); --- 291,297 ---- (linenum = find_linenum(len)) <= 0) ap_quest(); else ! ap_pos(linenum-1); break; case 'm': /* Number of files */ n = ntags();