Bug 143869

Summary: [PATCH] od(1)/hexdump(1): Incorrect char number for del
Product: Documentation Reporter: Enji Cooper <ngie>
Component: Books & ArticlesAssignee: Gavin Atkinson <gavin>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Enji Cooper freebsd_committer freebsd_triage 2010-02-13 09:10:02 UTC
hexdump(1) and od(1) both state that the humanized conversion character for del is 0xff (255), when the ascii value for DEL is actually 0x7f (127).

The code in conv.c is correct however (from line 169-171):

        } else if (*p == 0x7f) {
                *pr->cchar = 's';
                (void)printf(pr->fmt, "del");

Fix: See attached patch.

Patch attached with submission follows:
How-To-Repeat: n/a
Comment 1 Gavin Atkinson freebsd_committer freebsd_triage 2010-02-18 19:00:58 UTC
State Changed
From-To: open->patched

Fixed in head, r204053.  MFC in 2 weeks. 


Comment 2 Gavin Atkinson freebsd_committer freebsd_triage 2010-02-18 19:00:58 UTC
Responsible Changed
From-To: freebsd-doc->gavin

Mine
Comment 3 dfilter service freebsd_committer freebsd_triage 2010-02-18 19:08:22 UTC
Author: gavin
Date: Thu Feb 18 19:06:30 2010
New Revision: 204053
URL: http://svn.freebsd.org/changeset/base/204053

Log:
  The correct value of DEL is 0x7f, not 0xff.  This is purely a documentation
  issue - od(1) and hexdump(1) behave as expected.
  
  PR:		docs/143869
  Submitted by:	gcooper
  MFC after:	2 weeks

Modified:
  head/usr.bin/hexdump/hexdump.1
  head/usr.bin/hexdump/od.1

Modified: head/usr.bin/hexdump/hexdump.1
==============================================================================
--- head/usr.bin/hexdump/hexdump.1	Thu Feb 18 19:02:33 2010	(r204052)
+++ head/usr.bin/hexdump/hexdump.1	Thu Feb 18 19:06:30 2010	(r204053)
@@ -32,7 +32,7 @@
 .\"	@(#)hexdump.1	8.2 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd July 10, 2004
+.Dd February 18, 2010
 .Dt HEXDUMP 1
 .Os
 .Sh NAME
@@ -258,7 +258,7 @@ strings.
 .It "\&00C\ FF\t00D\ CR\t00E\ SO\t00F\ SI\t010\ DLE\t011\ DC1
 .It "\&012\ DC2\t013\ DC3\t014\ DC4\t015\ NAK\t016\ SYN\t017\ ETB
 .It "\&018\ CAN\t019\ EM\t01A\ SUB\t01B\ ESC\t01C\ FS\t01D\ GS
-.It "\&01E\ RS\t01F\ US\t0FF\ DEL
+.It "\&01E\ RS\t01F\ US\t07F\ DEL
 .El
 .El
 .Pp

Modified: head/usr.bin/hexdump/od.1
==============================================================================
--- head/usr.bin/hexdump/od.1	Thu Feb 18 19:02:33 2010	(r204052)
+++ head/usr.bin/hexdump/od.1	Thu Feb 18 19:06:30 2010	(r204053)
@@ -32,7 +32,7 @@
 .\"	@(#)od.1	8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd December 24, 2006
+.Dd February 18, 2010
 .Os
 .Dt OD 1
 .Sh NAME
@@ -155,7 +155,7 @@ Control characters are displayed using t
 .It "00c FF	00d CR	00e SO	00f SI	010 DLE	011 DC1"
 .It "012 DC2	013 DC3	014 DC4	015 NAK	016 SYN	017 ETB"
 .It "018 CAN	019 EM	01a SUB	01b ESC	01c FS	01d GS"
-.It "01e RS	01f US	020 SP	0ff DEL"
+.It "01e RS	01f US	020 SP	07f DEL"
 .El
 .It Cm c
 Characters in the default character set.
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 4 dfilter service freebsd_committer freebsd_triage 2010-03-10 13:40:47 UTC
Author: gavin
Date: Wed Mar 10 13:40:37 2010
New Revision: 204951
URL: http://svn.freebsd.org/changeset/base/204951

Log:
  Merge r204053 from head:
  
    The correct value of DEL is 0x7f, not 0xff.  This is purely a documentation
    issue - od(1) and hexdump(1) behave as expected.
  
  PR:		docs/143869
  Submitted by:	gcooper

Modified:
  stable/8/usr.bin/hexdump/hexdump.1
  stable/8/usr.bin/hexdump/od.1
Directory Properties:
  stable/8/usr.bin/hexdump/   (props changed)

Modified: stable/8/usr.bin/hexdump/hexdump.1
==============================================================================
--- stable/8/usr.bin/hexdump/hexdump.1	Wed Mar 10 13:23:25 2010	(r204950)
+++ stable/8/usr.bin/hexdump/hexdump.1	Wed Mar 10 13:40:37 2010	(r204951)
@@ -32,7 +32,7 @@
 .\"	@(#)hexdump.1	8.2 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd July 10, 2004
+.Dd February 18, 2010
 .Dt HEXDUMP 1
 .Os
 .Sh NAME
@@ -258,7 +258,7 @@ strings.
 .It "\&00C\ FF\t00D\ CR\t00E\ SO\t00F\ SI\t010\ DLE\t011\ DC1
 .It "\&012\ DC2\t013\ DC3\t014\ DC4\t015\ NAK\t016\ SYN\t017\ ETB
 .It "\&018\ CAN\t019\ EM\t01A\ SUB\t01B\ ESC\t01C\ FS\t01D\ GS
-.It "\&01E\ RS\t01F\ US\t0FF\ DEL
+.It "\&01E\ RS\t01F\ US\t07F\ DEL
 .El
 .El
 .Pp

Modified: stable/8/usr.bin/hexdump/od.1
==============================================================================
--- stable/8/usr.bin/hexdump/od.1	Wed Mar 10 13:23:25 2010	(r204950)
+++ stable/8/usr.bin/hexdump/od.1	Wed Mar 10 13:40:37 2010	(r204951)
@@ -32,7 +32,7 @@
 .\"	@(#)od.1	8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd December 24, 2006
+.Dd February 18, 2010
 .Os
 .Dt OD 1
 .Sh NAME
@@ -155,7 +155,7 @@ Control characters are displayed using t
 .It "00c FF	00d CR	00e SO	00f SI	010 DLE	011 DC1"
 .It "012 DC2	013 DC3	014 DC4	015 NAK	016 SYN	017 ETB"
 .It "018 CAN	019 EM	01a SUB	01b ESC	01c FS	01d GS"
-.It "01e RS	01f US	020 SP	0ff DEL"
+.It "01e RS	01f US	020 SP	07f DEL"
 .El
 .It Cm c
 Characters in the default character set.
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 5 Gavin Atkinson freebsd_committer freebsd_triage 2010-03-10 13:42:51 UTC
State Changed
From-To: patched->closed

Merged to stable/8 and stable/7.  Thanks for your submission!
Comment 6 dfilter service freebsd_committer freebsd_triage 2010-03-10 13:42:57 UTC
Author: gavin
Date: Wed Mar 10 13:42:37 2010
New Revision: 204952
URL: http://svn.freebsd.org/changeset/base/204952

Log:
  Merge r204053 from head:
  
    The correct value of DEL is 0x7f, not 0xff.  This is purely a documentation
    issue - od(1) and hexdump(1) behave as expected.
  
  PR:		docs/143869
  Submitted by:	gcooper

Modified:
  stable/7/usr.bin/hexdump/hexdump.1
  stable/7/usr.bin/hexdump/od.1
Directory Properties:
  stable/7/usr.bin/hexdump/   (props changed)

Modified: stable/7/usr.bin/hexdump/hexdump.1
==============================================================================
--- stable/7/usr.bin/hexdump/hexdump.1	Wed Mar 10 13:40:37 2010	(r204951)
+++ stable/7/usr.bin/hexdump/hexdump.1	Wed Mar 10 13:42:37 2010	(r204952)
@@ -32,7 +32,7 @@
 .\"	@(#)hexdump.1	8.2 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd July 10, 2004
+.Dd February 18, 2010
 .Dt HEXDUMP 1
 .Os
 .Sh NAME
@@ -258,7 +258,7 @@ strings.
 .It "\&00C\ FF\t00D\ CR\t00E\ SO\t00F\ SI\t010\ DLE\t011\ DC1
 .It "\&012\ DC2\t013\ DC3\t014\ DC4\t015\ NAK\t016\ SYN\t017\ ETB
 .It "\&018\ CAN\t019\ EM\t01A\ SUB\t01B\ ESC\t01C\ FS\t01D\ GS
-.It "\&01E\ RS\t01F\ US\t0FF\ DEL
+.It "\&01E\ RS\t01F\ US\t07F\ DEL
 .El
 .El
 .Pp

Modified: stable/7/usr.bin/hexdump/od.1
==============================================================================
--- stable/7/usr.bin/hexdump/od.1	Wed Mar 10 13:40:37 2010	(r204951)
+++ stable/7/usr.bin/hexdump/od.1	Wed Mar 10 13:42:37 2010	(r204952)
@@ -32,7 +32,7 @@
 .\"	@(#)od.1	8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd December 24, 2006
+.Dd February 18, 2010
 .Os
 .Dt OD 1
 .Sh NAME
@@ -155,7 +155,7 @@ Control characters are displayed using t
 .It "00c FF	00d CR	00e SO	00f SI	010 DLE	011 DC1"
 .It "012 DC2	013 DC3	014 DC4	015 NAK	016 SYN	017 ETB"
 .It "018 CAN	019 EM	01a SUB	01b ESC	01c FS	01d GS"
-.It "01e RS	01f US	020 SP	0ff DEL"
+.It "01e RS	01f US	020 SP	07f DEL"
 .El
 .It Cm c
 Characters in the default character set.
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"