|
Bugzilla – Full Text Bug Listing |
| Summary: | man page open for tcl not correct | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Andreas Klein <asklein> |
| Component: | Basesystem | Assignee: | Reinhard Max <max> |
| Status: | RESOLVED UPSTREAM | QA Contact: | Karl Eichwalder <ke> |
| Severity: | Minor | ||
| Priority: | P3 - Medium | CC: | maiku.fabian, max, vetter, werner, wl |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
patch to avoid nasty warnings about line breakage/adjusting
patch for an-old.tmac patch for env.cpp patch for open.n |
||
|
Description
Andreas Klein
2005-02-03 00:40:23 UTC
AFAIK, this is a problem with recent versions of groff. People in the Tcl community that use other implementations of nroff told me, that they don't get these warnings and the resulting misformattings. Werner, can you shed some light on this? You should ask Mike. I've also a problem with mm files of the ksh. Still does not work in 9,3b1 These are just warning messages and the man page in question still formats just fine. See also: http://lists.gnu.org/archive/html/groff/2005-02/msg00025.html Only if you press ctrl+l to refresh the screen, otherwise the first lines are "hidden" by the warnings. I don't know what you are using to view your man-pages.
I tried "man open" with the default settings (pager is "less")
and M-x man in (X)Emacs. In (X)Emacs you cannot see the warnings
at all. When using "man open" on the command line you can see the
warnings for a very short moment only (on a fast machine) then
you can only see the rendered result in less. The warnings go to
stderr and the result goes to stdout. "less" gets only the result
from stdout, not the warning from stderr. So how should "less" be able
to display the warnings?
The only way for me to see these warnings longer than a few milliseconds
was using something like:
man open 2>&1 | less
But who does that?
Are you using some strange terminal or a very strange pager?
I am logged in with fvwm. Terminal is a standard xterm from fvwm menu: xterm -geometry 80x24+513+10 -e bash -login -sl 10000 PAGER is less. I also only see the warnings for a moment when using the same arguments to xterm as you, but there are some misformattings in the manpage that are related to the warnings. BTW, the warnings and misformattings seem always to be related to changebars. E.g. the in the description of the -mode option in open(n), the line that shows the syntax (-mode baud,parity,data,stop) is needlessly broken in two lines, and the second of them has two changebars. Try
zcat /usr/share/man/mann/open.n.gz | nroff -mandoc > /dev/null
to get stderr.
Why so complicated? I just used "man n open > /dev/null". ;) BTW my point wasn't that I can't get to see the warnings, but that they are not normally contained in what less displays, and that there are in fact misformattings. Yes, and because they are not normally contained in what less displays, they are not very important in my opinion. And, if something needs to be fixed it is the source of the man-page, not groff. These manpages work fine with other implementation of nroff, and with older versions of groff. So why do you think it is a bug in the source of the manpage? But anyways, if you can show me how to fix the man pages so that they work fine with current groff, AND other nroff implementations, I'll be glad to do make the change. Complicated? Hmm ... I want only be sure to see
the result of a bad nroff text file instead of
a automatic preprocessor like tbl or eqn.
As you can see from line 389ff of /usr/share/man/mann/open.n.gz
.TP
\fB\-mode\fR \fIbaud\fB,\fIparity\fB,\fIdata\fB,\fIstop\fR
which leads to the bad formated ident mark:
-mode baud,par- |
ity,data,stop
the change to
.TP
\fB\-mode\fR \fIbaud\fB, \fIparity\fB, \fIdata\fB, \fIstop\fR
would give a better formated ident mark:
-mode baud, parity, data, |
stop
but also with a folded text within the mark.
This change is wrong, as the -mode option doesn't allow any white space in it's arguments. Werner, do you have an idea where these unneeded foldings and duplicated changebars might come from? Is it groff, or is it something in the man.macros file that comes with Tcl, and gets copied into each manpage during installation? BTW, when I use "man -T n open", I get no warnings, and the resulting Postscript output doesn't contain extra foldings or double change bars. IMHO the groff package seems to be very sensitive if used for terminal output. Maybe caused by some nroff macros of open.n by its self. Could be done by a defined macro which does not reset its used spacing after finishing .. ? I don't think this is architecture speciffic. But I still have no idea how to deal with it. To comment #16: I have no idea how to define such a macro. Werner, if you can't help me, probably nobody here can, and I'll close this as WONTFIX and hope it will be fixed upstream one day (either in groff or in tcl). It's a tcl problem, not a groff problem. Why do you think so? As said in comment #1 other people from the Tcl community told me that the manpages render correctly on their unix flavours with other implementations of nroff. So as long as nobody can show me what's excactly wrong in the nroff source of the Tcl manpages, I'll assume that they are OK, and just trigger a bug in groff. Created attachment 37901 [details]
patch to avoid nasty warnings about line breakage/adjusting
Try out the patch in the attachment.
It switches of the VS before an .TP or .IP
macro and reanble the VS afterwards.
Werner Lemberg, the upstream author of groff, said that recent versions of groff have become more picky about errors in the source files (like man-pages) which were previously ignored. Just like gcc4 warns about a lot of stuff older gcc versions just ignored. It works for people on other flavours of Linux like systems only because they have older implementations of nroff which are less picky. to comment #21: excluding .TP and .IP from the change bars is a workaround, but not a solution. If these lines have changed, it is desired that they also have the change bars. to comment #22: These people are not on other flavours of Linux, but on other (non-Linux) flavours of Unx with different (non-GNU) implementations of *roff. And what drives me to the conclusion, that the bug is in groff is not that they get no warnings, but that they do get correctly formatted output. Reinhard> These people are not on other flavours of Linux, but on other Reinhard> (non-Linux) flavours of Unx I only wrote "Linux like systems" because in one of our Tuesday meetings it was said that this is the preferred expression to talk about UNIX like systems because UNIX is a trade mark. And if Linux is UNIX like, UNIX is also Linux like. ☺ Here's a little excerpt form the Tcl'ers chat, where I just brought up the topic
again:
[16:25] dkf OK, located the original roff manual
[16:27] dkf And we're just specifying a margin character
[16:28] dkf Looks exactly like a groff bug to me :)
[16:30] dkf In fact, the roff manual *demonstrates* the use of .mc (or 'mc?)
in a way compatible with Tcl's use
[16:30] dkf AIUI anyway
[16:33] dkf Page 26 of the Troff User's Manual (aka Bell Labs CSTR#54,
http://cm.bell-labs.com/cm/cs/cstr/54.ps.gz)
[16:55] dkf The key is that CSTR#54 is *the* normative reference for *roff
[16:55] dkf It's referenced from everywhere else
Add Werner LEMBERG <wl@gnu.org> (current upstream groff maintainer) to CC:. Werner, is this a bug in groff or in the source of the man-pages? If it is a bug in the source of the man-pages, how should the man-pages be changed? It is a bug in the groff sources. The term "groff sources" is ambiguous. Do you mean the C source code of groff, or the source code of the manpages? And BTW, Mike's question was directed to Werner Lemberg, not Werner Fink :) As this seems to be a bug in groff, there is nothing I can do about it. Reassigning to the groff maintainer. maintainer groff mfabian@suse.de Whoops, sorry, I confused "maintainer groff" and "maintainer man" ;) Somehow this bug has disappeared from my radar screen...
I've fixed that now. It was mainly a bug in groff's man macros which
didn't handle margin characters correctly in .TP and friends.
Interestingly, my fix exposed another bug in the troff binary, causing
a crash.
Besides this, there are problems with the macro stuff in open.n --
this is something you should probably forward to the tcl/tk people.
Note that I intentionally don't enhance the macros to use groff
extensions, and my modifications are as small as possible.
. The implementation of .VE is flawed. I would, similar to .VS, add
two arguments; the first to be ignored (being a version number),
the second telling .VS to emit a .br command. To make the margin
character stop at the right line I've modified the man page
slightly.
. The .BS line has a typo IMHO. Without this fix, the two lines
surrounding the NAME and SYNOPSIS sections have different lengths.
It is arguable whether those two lines should really have that
length...
. Another typo is in .BE, which fortunately has no effect.
I've attached three patches; the two regarding groff are already in
the CVS.
Created attachment 85379 [details]
patch for an-old.tmac
Created attachment 85380 [details]
patch for env.cpp
Created attachment 85381 [details]
patch for open.n
Thanks, Werner. I'll take care to push your improvements upstream into Tcl/Tk. *** Bug 196763 has been marked as a duplicate of this bug. *** Reinhard, can we close this bug now? I consider it as Resolved UPstream - correct? Yes, I just checked the open(n) manpage of the upcoming 8.6 release of Tcl and it doesn't print any warnings anymore. |