Re: weekly_catman not generating the right result?

2011-08-03 Thread Ruslan Ermilov
On Sun, Jul 31, 2011 at 03:57:01PM +0200, Ulrich Spörlein wrote:
> On Sun, 2011-07-31 at 05:43:39 -0700, Xin LI wrote:
> > On 07/31/11 05:17, Ulrich Spörlein wrote:
> > > On Sun, 2011-07-31 at 01:22:36 -0700, Xin LI wrote:
> > >> Hi,
> > >> 
> > >> 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).
> > >> 
> > >> 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.
> > 
> > Thanks, that fixes the problem.
> > 
> > Note that I noticed that setting PAGER to less won't work.  Looking at
> > my 8.2-RELEASE system, the rendered catpages are using ^H when
> > highlighting while on -CURRENT it's an escape sequence (but I didn't see
> > any change to nroff script nor catman itself)...
> 
> The change that did this is r222648. You'll need to use `less -Rs' as
> your PAGER/MANPAGER (or export LESS=-Rs).
> 
> It's debatable if we want catpages to retain the old way of marking up
> bold and underlined text.
> 
> Ruslan: bsd.doc.mk was told to not use SGR in r222647, does it make
> sense to do the same for catpages?

This probably affects your patch that I've just reviewed, but I think
you're right in that catpages should be in the old fashioned format.


Cheers,
-- 
Ruslan Ermilov
r...@freebsd.org
FreeBSD committer
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: weekly_catman not generating the right result?

2011-07-31 Thread Ulrich Spörlein
On Sun, 2011-07-31 at 05:43:39 -0700, Xin LI wrote:
> On 07/31/11 05:17, Ulrich Spörlein wrote:
> > On Sun, 2011-07-31 at 01:22:36 -0700, Xin LI wrote:
> >> Hi,
> >> 
> >> 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).
> >> 
> >> 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.
> 
> Thanks, that fixes the problem.
> 
> Note that I noticed that setting PAGER to less won't work.  Looking at
> my 8.2-RELEASE system, the rendered catpages are using ^H when
> highlighting while on -CURRENT it's an escape sequence (but I didn't see
> any change to nroff script nor catman itself)...

The change that did this is r222648. You'll need to use `less -Rs' as
your PAGER/MANPAGER (or export LESS=-Rs).

It's debatable if we want catpages to retain the old way of marking up
bold and underlined text.

Ruslan: bsd.doc.mk was told to not use SGR in r222647, does it make
sense to do the same for catpages?

Uli


pgpxjlZ2OIjHC.pgp
Description: PGP signature


Re: weekly_catman not generating the right result?

2011-07-31 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 07/31/11 05:17, Ulrich Spörlein wrote:
> On Sun, 2011-07-31 at 01:22:36 -0700, Xin LI wrote:
>> Hi,
>> 
>> 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).
>> 
>> 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.

Thanks, that fixes the problem.

Note that I noticed that setting PAGER to less won't work.  Looking at
my 8.2-RELEASE system, the rendered catpages are using ^H when
highlighting while on -CURRENT it's an escape sequence (but I didn't see
any change to nroff script nor catman itself)...

Cheers,
- -- 
Xin LI https://www.delphij.net/
FreeBSD - The Power to Serve!   Live free or die
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (FreeBSD)

iQEcBAEBCAAGBQJONU37AAoJEATO+BI/yjfBwwkH/2lBNu/Qk+kfYqlknmBN6/f6
1JfwR/oL8ByYwc1wfDVNH9dHFgwwsmkwOja+InJNeSD62Vld8A5kLw7+AopWvsWu
WRSu24qq6mP4l82K9mnClHgHEnQxmXa3AIbYcGqiTF1T8AqzVp9iqZfHnC6FDcNI
l7EQZZdp3x2Uvx5ATPuTsPaZbWs5gdUC2gKEWBVlUzoIK/U2zQtBw92HbYuOuMcR
dViuYNJqetuABre+m0IqslQktmd3/pIwwlJJVoDJ3KYG2SFqZTS1a4cM8dS+dX1U
8JnICR1KfkKiwKyh0QSpnoTtgy2WoCVBb5gwzXofsBZujkUbMCtkChgSxf0ulM8=
=pw5b
-END PGP SIGNATURE-
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: weekly_catman not generating the right result?

2011-07-31 Thread Ulrich Spörlein
On Sun, 2011-07-31 at 01:22:36 -0700, Xin LI wrote:
> Hi,
> 
> 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).
> 
> 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
commit 363e4ce24b5017eb060d6a54bebbf92608ba3873
Author: Ulrich Spörlein 
Date:   Sun Jul 31 14:13:51 2011 +0200

Unbreak catman(1) by removing calls to col(1).

col(1) was mangling the SGR escapes and is not strictly required. Tab
"compression" is now done by passing -h to nroff directly.

See r222650 and r222653 for more details.

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 Ziptype 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 == BZIP ? BZ2CAT_CMD : zipped == GZIP ? GZCAT_CMD : "",
 	src, nroff_device,
 	zipped == BZIP ? BZ2_CMD : zipped == GZIP ? GZ_CMD : "cat",


pgp0Dx1jKVmpu.pgp
Description: PGP signature


weekly_catman not generating the right result?

2011-07-31 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

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).

Is this a known issue?

Cheers,
- -- 
Xin LI https://www.delphij.net/
FreeBSD - The Power to Serve!   Live free or die
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (FreeBSD)

iQEcBAEBCAAGBQJONRDMAAoJEATO+BI/yjfBvm8H/inlCp7yRRpo5wCqGnvskZCw
TueCyHrcDbgU4B+W1ZxRM02S9HpCYpPBB5EQQ6HSCIkPb3IyckK4MJzyJ+w57Dxb
Z6MH0T8zQ8gtto60Xz4Hos+rPJEGRHBw645ABLGm5N2RbQ+zvzvwSR91Ma40zf/Q
l5GMTq0E/L2UsKkX1WQ+RgPDJmefc4ckvOawp0XsnhNGdeAXu8K+DsmJ6x2UoKLr
BwJMbytBjQJ89MCKdpWdvB0r8VmjglqoZ0J8JLdTx3Bv9cG0YAGH4vp9MG1Dv7YT
PaTOof4iN/vt5ZD2nkv6IH1nAGgPcumlXqrS2UX1vw63Bpd+EyzjKW9OdUXz0Qo=
=e88D
-END PGP SIGNATURE-
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"