Skip to content

Files

Latest commit

c52218e · Jul 16, 2023

History

History

man

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 16, 2023
Jul 16, 2023
Jul 16, 2023
Jul 16, 2023
Jul 16, 2023
Jul 16, 2023
Jul 16, 2023
Jul 16, 2023
Jul 16, 2023
Jul 16, 2023
Jul 16, 2023

Display UNIX manual pages -man

The man command is missing from the standard Unix V6 release.

The code here was extracted from the University of California's 1Bsd release. It was written by Bill Joy.

It uses a program also written by Bill Joy -_ ssp_ - single space output, that removes successive blank lines from its standard input. The program is used automatically when output is to the terminal, or not otherwise.

Changes are to the man.c code:

  • Used a #define to define the base path to the manual pages
  • comment out logging of man requests.
  • Fix declarations at the end of the code.

V6 man pages use different nroff macros from later versions of the system. There is the problem of getting working macros that will render the page without some of the tools that understand backspacing and upward/downward motions. I've adapted the standard naa macro set into naa-man.

Compilation

To compile the two programs separately use compile_man that compiles man.c command into a.out. compile_ssp compiles ssp to a.out.

Installation

To compiles both programs and install them in /bin, use install. It will also install naa-man in /usr/doc/man/man0. Manual pages follows UCB practice and they are installed in section 6 of the manual.

Change to ssp

I added some filtering into ssp to remove the vertical movement characters that is output from some pages.

Extra command

I found it useful to be able to run the macros over a file in the current directory, manf will do this.

Running on the host

It seems that current versions of groff can be used with the macros in /usr/doc/man0/taa. However, the page size is built in and I failed to get them to work with an A4 page.