From owner-freebsd-current@FreeBSD.ORG Sun Jul 31 12:17:48 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB61C106566C; Sun, 31 Jul 2011 12:17:48 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4B13B8FC0A; Sun, 31 Jul 2011 12:17:48 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id p6VCHXIk052667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 31 Jul 2011 14:17:33 +0200 (CEST) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1312114653; bh=R7qWdKV3YhuZyuX+ftuh4yKnF0iJPBdVoOKjulXz1jY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=BbRt4xfOTfMu649dtfvm+7aogtgWO4yWFOGHwVSg+8OH7C3lQcVDHYlbLDOu67DAj 3jPSN9RgZnInDuSToveCU4OOUijaF5G0U/9poJw1tdJlPJpQEmATl0WGrspM9X+2KQ poNYWduzekLUFrmVYR13my+KmK2MDSB7jZrl8PXU= Date: Sun, 31 Jul 2011 14:17:33 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: d@delphij.net, ru@FreeBSD.org Message-ID: <20110731121732.GB11991@acme.spoerlein.net> Mail-Followup-To: d@delphij.net, ru@FreeBSD.org, FreeBSD Current References: <4E3510CC.8090300@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4bRzO86E/ozDv8r1" Content-Disposition: inline In-Reply-To: <4E3510CC.8090300@delphij.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Current Subject: Re: weekly_catman not generating the right result? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 12:17:48 -0000 --4bRzO86E/ozDv8r1 Content-Type: multipart/mixed; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 2011-07-31 at 01:22:36 -0700, Xin LI wrote: > Hi, >=20 > I just noticed that weekly_catman is not generating the right result, > e.g. instead of a highlight NAME, it gives 1mNAME0m (looks like the > escape character is missing here). >=20 > Is this a known issue? Now it is :) This is due to the recent changes that made groff emit ANSI sequences and catman(1) is still putting col(1) in the pipe, which is not really required and gobbles up part of the escape sequences. Please try the attached patch. Thanks. Uli --C7zPtVaVf+AK4Oqc Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="catman.diff" Content-Transfer-Encoding: quoted-printable commit 363e4ce24b5017eb060d6a54bebbf92608ba3873 Author: Ulrich Sp=C3=B6rlein Date: Sun Jul 31 14:13:51 2011 +0200 Unbreak catman(1) by removing calls to col(1). =20 col(1) was mangling the SGR escapes and is not strictly required. Tab "compression" is now done by passing -h to nroff directly. =20 See r222650 and r222653 for more details. =20 Reviewed by: ? Approved by: ? MFC after: 3 weeks diff --git a/usr.bin/catman/catman.c b/usr.bin/catman/catman.c index c17a091..886563b 100644 --- a/usr.bin/catman/catman.c +++ b/usr.bin/catman/catman.c @@ -432,7 +432,7 @@ process_page(char *mandir, char *src, char *cat, enum Z= iptype zipped) } snprintf(tmp_file, sizeof tmp_file, "%s.tmp", cat); snprintf(cmd, sizeof cmd, - "%scat %s | tbl | nroff -T%s -man | col | %s > %s.tmp", + "%scat %s | tbl | nroff -h -T%s -man | %s > %s.tmp", zipped =3D=3D BZIP ? BZ2CAT_CMD : zipped =3D=3D GZIP ? GZCAT_CMD : "", src, nroff_device, zipped =3D=3D BZIP ? BZ2_CMD : zipped =3D=3D GZIP ? GZ_CMD : "cat", --C7zPtVaVf+AK4Oqc-- --4bRzO86E/ozDv8r1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQEcBAEBAgAGBQJONUfcAAoJEKOmmGRKr4LOPRMH/iLM7Im3emFm/jYNVsITt9f6 5t7xy3sdRiiZpQ+ET5KehJa1QyO3w84WMG3TqPJu9TxrAz4xIRgT9Z3NKXTtpNXc ZCQcwc+00mbEW1XlZL0ITLEwopEDfpsKZS6Dzin/u6RRprnSGwr7nn84AHJv6e1d /YqX+OT1X5UY71cfBwISvc3EncRtHb2y1xs+6I7XouC7zPJxV4x0skQRu7Rg/+du 8wsEsRWOw5EcZpvnScnlxShnd8o2Y873OF1fHO+gw8EMixeYUA7e2+XooBBTf/kK 7Kot4SHV/CM2kRjkYPocYVxckY6o5/5XRip0sxqyFOUoeiWXuyFL+CQXGPXwgoU= =hDK0 -----END PGP SIGNATURE----- --4bRzO86E/ozDv8r1--