NetBSD Problem Report #48113

From dholland@netbsd.org  Sat Aug 10 22:32:32 2013
Return-Path: <dholland@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id F2C3D71058
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 10 Aug 2013 22:32:31 +0000 (UTC)
Message-Id: <20130810223231.2F8D114A389@mail.netbsd.org>
Date: Sat, 10 Aug 2013 22:32:31 +0000 (UTC)
From: dholland@NetBSD.org
Reply-To: dholland@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: tr -c doesn't work
X-Send-Pr-Version: 3.95

>Number:         48113
>Category:       bin
>Synopsis:       tr -c doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dholland
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 10 22:35:00 +0000 2013
>Closed-Date:    Sun Aug 11 02:00:27 +0000 2013
>Last-Modified:  Sun Aug 11 17:45:00 +0000 2013
>Originator:     David A. Holland
>Release:        NetBSD 6.99.23 (20130810)
>Organization:
>Environment:
System: NetBSD valkyrie 6.99.19 NetBSD 6.99.19 (VALKYRIE) #12: Thu Apr  4 02:19:36 EDT 2013  dholland@valkyrie:/usr/src/sys/arch/amd64/compile/VALKYRIE amd64
Architecture: x86_64
Machine: amd64
>Description:

tr -c doesn't work.

>How-To-Repeat:

% echo ABCDE | tr -c '\0-@' QUACK
KKKKK

It should print 'QUACK'.

>Fix:

>Release-Note:

>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48113 CVS commit: src/tests/usr.bin
Date: Sat, 10 Aug 2013 22:36:16 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Sat Aug 10 22:36:16 UTC 2013

 Modified Files:
 	src/tests/usr.bin: Makefile
 Added Files:
 	src/tests/usr.bin/tr: Makefile t_basic.sh

 Log Message:
 Add tests for tr, including an xfail one for PR 48113.


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.18 src/tests/usr.bin/Makefile
 cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/tr/Makefile \
     src/tests/usr.bin/tr/t_basic.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48113 CVS commit: src/usr.bin/tr
Date: Sun, 11 Aug 2013 00:28:46 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Sun Aug 11 00:28:46 UTC 2013

 Modified Files:
 	src/usr.bin/tr: tr.c

 Log Message:
 Make tr -c work. Fixes PR 48113.

 When -c is in effect, scan string1 first, complement it, and then
 iterate over the results while scanning string2. Otherwise, scan
 string1 and string2 together as before.


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 src/usr.bin/tr/tr.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48113 CVS commit: src/tests/usr.bin/tr
Date: Sun, 11 Aug 2013 00:29:22 +0000

 Module Name:	src
 Committed By:	dholland
 Date:		Sun Aug 11 00:29:22 UTC 2013

 Modified Files:
 	src/tests/usr.bin/tr: t_basic.sh

 Log Message:
 Remove xfail for PR 48113.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/tr/t_basic.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: bin-bug-people->dholland
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 11 Aug 2013 02:00:27 +0000
Responsible-Changed-Why:
I fixed it after all


State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 11 Aug 2013 02:00:27 +0000
State-Changed-Why:
fixed


From: John Nemeth <jnemeth@cue.bc.ca>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/48113 (tr -c doesn't work)
Date: Sat, 10 Aug 2013 23:00:28 -0700

 On Aug 11,  2:00am, dholland@NetBSD.org wrote:
 }
 } Synopsis: tr -c doesn't work
 } 
 } State-Changed-From-To: open->closed
 } State-Changed-By: dholland@NetBSD.org
 } State-Changed-When: Sun, 11 Aug 2013 02:00:27 +0000
 } State-Changed-Why:
 } fixed

      Shouldn't this be pulled up?

 }-- End of excerpt from dholland@NetBSD.org

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: John Nemeth <jnemeth@netbsd.org>
Subject: Re: bin/48113 (tr -c doesn't work)
Date: Sun, 11 Aug 2013 17:44:19 +0000

 On Sun, Aug 11, 2013 at 06:00:00AM +0000, John Nemeth wrote:
  >  On Aug 11,  2:00am, dholland@NetBSD.org wrote:
  >  }
  >  } Synopsis: tr -c doesn't work
  >  } 
  >  } State-Changed-From-To: open->closed
  >  } State-Changed-By: dholland@NetBSD.org
  >  } State-Changed-When: Sun, 11 Aug 2013 02:00:27 +0000
  >  } State-Changed-Why:
  >  } fixed
  >  
  >       Shouldn't this be pulled up?

 Go ahead if you like; given that it's been broken this way since
 basically forever without anyone noticing (until I started reading the
 code), to me it didn't seem worthwhile.

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.