Bug 49791 - less-358-16 (less 358+iso247) fails to number lines with -N
less-358-16 (less 358+iso247) fails to number lines with -N
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: less (Show other bugs)
7.1
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Karsten Hopp
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-23 18:09 EDT by Max
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-09-25 15:36:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Max 2001-07-23 18:09:08 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; NetBSD 1.4.2 i386)

Description of problem:
Running less with the -N option only indents lines with 2 spaces, without
any line numbers prepended.

How reproducible:
Always

Steps to Reproduce:
1. Run /usr/bin/less -N /etc/hosts


Actual Results:  Contents of /etc/hosts are printed with 2 spaces prended
on each line:

  # Do not remove the following line, or various programs
  # that require network functionality will fail.
  127.0.0.1               rebecca localhost.localdomain localhost


Expected Results:  file should have been printed out with line number
prepended:

       1 # Do not remove the following line, or various programs
       2 # that require network functionality will fail.
       3 127.0.0.1               rebecca localhost.localdomain localhost


Additional info:
Comment 1 Telsa Gwynne 2001-08-16 10:17:23 EDT
I don't have RH 7.1. 

This bug is not present on my RH 7.0 box. It is present on the Roswell beta
though.
Comment 2 Need Real Name 2001-09-25 15:36:24 EDT
The i18n patch is botching up line numbers. This patch will fix that:

--- less-358/line.c     Tue Sep 25 13:44:44 2001
+++ less-358_/line.c    Tue Sep 25 13:47:40 2001
@@ -153,8 +153,10 @@
                sprintf(&linebuf[curr], "%*d", LINENUM_WIDTH, lno);
                column += LINENUM_WIDTH;
                for (i = 0;  i < LINENUM_WIDTH;  i++)
+               {
                        charset[curr] = ASCII;
                        attr[curr++] = AT_NORMAL;
+               }
        }
        /*
         * Append enough spaces to bring us to the lmargin.
Comment 3 Karsten Hopp 2001-10-05 06:13:34 EDT
Thanks for the report and the fix !


Note You need to log in before you can comment on or make changes to this bug.