Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ksh.1 (again) - fix '|' implementation - hard to see - hard to find -- #871

Closed
aabatpurdue opened this issue Sep 14, 2018 · 7 comments
Closed

Comments

@aabatpurdue
Copy link

aabatpurdue commented Sep 14, 2018

Description of problem:
I did a man path/ksh.1 and then searched for the | character. Couldn't find even one. Upon examination, I found that \(bv was being used for |. Changed them to an explicit |. groff_char(7) indicates that is the way to go. There are also several \| instances but I was unsure what they were being used for so I left them. There are several |\|| instances that are displayed as || and I did not check to see if I could find them as || in the man page.

Fixed one typo also. There is a second one in that typo's vicinity but, of course, I lost its position (:@{).

Ksh version:
September 3rd clone.

How reproducible:
n/a

Steps to reproduce:

  1. man path/ksh.1

Actual results:
Could't find |.

Expected results:
Could find |.

Additional info:
Oops forgot to point to this patch kshman2_patch.txt

@krader1961
Copy link
Contributor

I can find three vertical-pipe symbols when I run nroff -man src/cmd/ksh93/ksh.1. Which is far fewer than I would expect and see in the ksh93u+ man page. So obviously the ksh team made some ill-advised change.

@krader1961
Copy link
Contributor

So obviously the ksh team made some ill-advised change.

I take that back. The raw man page in both ksh93u+ and ksh93v- (on which the current code in this project is based) are identical with respect to this issue. Running both files through nroff -man only yields three literal vertical bars. It's been so long since I've had to debug issues with roff man page source I had forgotten that nroff -man /usr/local/share/man/man1/ksh.1 is not the same as man /usr/local/share/man/man1/ksh.1. When I do the latter all the expected vertical bars can be found.

So, @aabatpurdue, this appears to be a quirk of your system. Perhaps you are using a CJK or similar locale. But the ksh man page source is fundamentally the same between now and the last public release. And looking at both man page source files I see exactly the same discrepancy between the number of vertical bars I can find after running the file through nroff -man and just man. Thus I do not think we should apply your patch. At least not without a lot more discussion.

@krader1961
Copy link
Contributor

Looking at the man page source it appears the three places I can see a literal vertical-bar in the nroff -man src/cmd/ksh93/ksh.1 output are the only ones to use a literal ASCII vertical-bar. All the other places use \bv. So the question is whether those three places should be changed to \bv or all the \bv uses changed to a ASCII vertical-bar.

@aabatpurdue
Copy link
Author

@krader1961 - Hmmm. On Cygwin I just tried again using a July 27 clone and the ksh.1.gz that I installed from it. With both the file and the installed man page using man, I found just your three vertical bars. The same with nroff -mandoc (<-- default macro package used by man) and nroff -man of the ./src/cmd/ksh93/ksh.1 file. I also used vim to examine the raw roff file and found only three. It was very interesting because I could see a vertical bar in vims page but could not get vim to acknowledge its existence.

As far as I know, I have done nothing exotic. Most all of everything is default. I am using mintty with a 11pt consolas font. TERM=xterm-256color. Can you suggest anything else I might look for? One problem may be that I do not have a specific locale set. The nroff output is probably utf8 and the \(bv would not be rendered as an ascii |. Hey, I knew that if I talked long enough that I could find a solution. If I set LC_ALL=C in the environment I can find all of the |.

Unfortunately, without the patch that still leaves a man page that will have similar problems if the user does not have the locale set properly.

And to get personal - punched cards? You must be almost as old as I am (:-}). I sure wasted a lot of paper and cardboard back in those days.

@krader1961
Copy link
Contributor

krader1961 commented Sep 14, 2018

If I set LC_ALL=C in the environment I can find all of the |.

That implies there is a problem with the locale subsystem on your platform. As the C/POSIX locale should be the default locale if no locale environment vars (e.g., LANG, LC_ALL) are defined.

Yes, I'm a grey beard. I started programming in high school in 1977 and used both model 33 KSR teletype for learning BASIC then punched cards for FORTRAN. I was still working with punch cards (albeit not very much) in the early 1980's.

@aabatpurdue
Copy link
Author

aabatpurdue commented Sep 14, 2018

I believe that the default locale is utf8 for Cygwin. I think I read that somewhere. Unfortunately, some processes think utf8 and others think C.

Shouldn't use this for interpersonal communication but don't have an email address for you. I was a graduate student in Engineering Geology at Purdue in 1967 when one of my advisors suggested that I take a beginning FORTRAN programming course. Boy, talk about love at first bite. I then graduated to assembly language and that knowledge of assembly language is what eventually got me a job as a systems administrator (called a pud programmer back then) with the Research Computing group at Purdue. I held that job in various guises from 1974 to 2012. FWIW - I also got my MS degree.

@krader1961 krader1961 self-assigned this Sep 18, 2019
@krader1961 krader1961 added this to the will-not-fix milestone Sep 18, 2019
@krader1961
Copy link
Contributor

I'm going to close this as a duplicate of #507 since we have embarked on the task of converting all documentation to reStructuredText + Sphinx format. That makes this issue moot.

JohnoKing added a commit to JohnoKing/ksh that referenced this issue Aug 6, 2020
Most of these fixes are for typos and extra whitespace at the
end of lines. These are the notable changes:
- Fixed a compatibility issue with how asterisks are displayed
  using certain fonts. Bug report: att#764
- Fixed a bug in the man page that caused searches for the '|'
  character to fail. Bug report: att#871
- Removed a duplicate description of 'set -B' from the man
  page. Bug report: att#789
- Added documentation for options missing from the ksh man
  page (applies to 'hist -N', 'sleep -s', 'whence -q' and
  many of ulimit's options). Bug reports:
  att#948
  att#503 (comment)
  att#507 (comment)
- Applied the following ksh2020 man page fixes:
  att#351
  att#352
- Fixed a minor GCC -Wformat warning in procopen.c by changing
  NiL to NULL.
JohnoKing added a commit to JohnoKing/ksh that referenced this issue Aug 6, 2020
Most of these fixes are for typos and extra whitespace at the
end of lines. These are the notable changes:
- Fixed a compatibility issue with how asterisks are displayed
  using certain fonts. Bug report: att#764
- Fixed a bug in the man page that caused searches for the '|'
  character to fail. Bug report: att#871
- Removed a duplicate description of 'set -B' from the man
  page. Bug report: att#789
- Added documentation for options missing from the ksh man
  page (applies to 'hist -N', 'sleep -s', 'whence -q' and
  many of ulimit's options). Bug reports:
  att#948
  att#503 (comment)
  att#507 (comment)
- Applied the following ksh2020 man page fixes:
  att#351
  att#352
- Fixed a minor GCC -Wformat warning in procopen.c by changing
  a sentinel NULL.
JohnoKing added a commit to JohnoKing/ksh that referenced this issue Aug 6, 2020
Most of these fixes are for typos and extra whitespace at the
end of lines. These are the notable changes:
- Fixed a compatibility issue with how asterisks are displayed
  using certain fonts. Bug report: att#764
- Fixed a bug in the man page that caused searches for the '|'
  character to fail. Bug report: att#871
- Removed a duplicate description of 'set -B' from the man
  page. Bug report: att#789
- Added documentation for options missing from the ksh man
  page (applies to 'hist -N', 'sleep -s', 'whence -q' and
  many of ulimit's options). Bug reports:
  att#948
  att#503 (comment)
  att#507 (comment)
- Applied the following ksh2020 man page fixes:
  att#351
  att#352
- Fixed a minor GCC -Wformat warning in procopen.c by changing
  a sentinel NULL.
JohnoKing added a commit to JohnoKing/ksh that referenced this issue Aug 6, 2020
Most of these fixes are for typos and extra whitespace at the
end of lines. These are the notable changes:
- Fixed a compatibility issue with how asterisks are displayed
  using certain fonts. Bug report: att#764
- Fixed a bug in the man page that caused searches for the '|'
  character to fail. Bug report: att#871
- Removed a duplicate description of 'set -B' from the man
  page. Bug report: att#789
- Added documentation for options missing from the ksh man
  page (applies to 'hist -N', 'sleep -s', 'whence -q' and
  many of ulimit's options). Bug reports:
  att#948
  att#503 (comment)
  att#507 (comment)
- Applied the following ksh2020 man page fixes:
  att#351
  att#352
- Fixed a minor GCC -Wformat warning in procopen.c by changing
  a sentinel NULL.
JohnoKing added a commit to JohnoKing/ksh that referenced this issue Aug 6, 2020
Most of these fixes are for typos and extra whitespace at the
end of lines. These are the notable changes:
- Fixed a compatibility issue with how asterisks are displayed
  using certain fonts. Bug report: att#764
- Fixed a bug in the man page that caused searches for the '|'
  character to fail. Bug report: att#871
- Removed a duplicate description of 'set -B' from the man
  page. Bug report: att#789
- Added documentation for options missing from the ksh man
  page (applies to 'hist -N', 'sleep -s', 'whence -q' and
  many of ulimit's options). Bug reports:
  att#948
  att#503 (comment)
  att#507 (comment)
- Applied the following ksh2020 documentation fixes:
  att#351
  att#352
- Fixed a minor GCC -Wformat warning in procopen.c by changing
  a sentinel NULL.
JohnoKing added a commit to JohnoKing/ksh that referenced this issue Aug 6, 2020
Most of these fixes are for typos and extra whitespace at the
end of lines. These are the notable changes:
- Fixed a compatibility issue with how asterisks are displayed
  using certain fonts. Bug report: att#764
- Fixed a bug in the man page that caused searches for the '|'
  character to fail. Bug report: att#871
- Removed a duplicate description of 'set -B' from the man
  page. Bug report: att#789
- Added documentation for options missing from the ksh man
  page (applies to 'hist -N', 'sleep -s', 'whence -q' and
  many of ulimit's options). Bug reports:
  att#948
  att#503 (comment)
  att#507 (comment)
- Applied the following ksh2020 documentation fixes:
  att#351
  att#352
- Fixed a minor GCC -Wformat warning in procopen.c by changing
  a sentinel to NULL.
McDutchie pushed a commit to ksh93/ksh that referenced this issue Aug 6, 2020
Most of these fixes are for typos and extra whitespace at the
end of lines. These are the notable changes:
- Fixed a compatibility issue with how asterisks are displayed
  using certain fonts. Bug report: att#764
- Fixed a bug in the man page that caused searches for the '|'
  character to fail. Bug report: att#871
- Removed a duplicate description of 'set -B' from the man
  page. Bug report: att#789
- Added documentation for options missing from the ksh man
  page (applies to 'hist -N', 'sleep -s', 'whence -q' and
  many of ulimit's options). Bug reports:
  att#948
  att#503 (comment)
  att#507 (comment)
- Applied the following ksh2020 documentation fixes:
  att#351
  att#352
- Fixed a minor GCC -Wformat warning in procopen.c by changing
  a sentinel to NULL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants