Your locale isn't set. In Debian-Base
you should use dpkg-reconfigure locales
to set it.
Some of packages
depend on locales package
and its variable
such as LC_* series
...!
It means $LANG
is empty.
You have not specified your desired output format but from the things you've tried, it looks like you're not picky. This will produce correctly formatted, unwrapped html but it needs to be run on the actual man page file.
So, first locate the man file you're interested in:
$ man -w mmap
/usr/share/man/man2/mmap.2.gz
Them, run man2html
on it:
man2html /usr/share/man/man2/mmap2.2.gz > mmap.html
Or, simply
zcat $(man -w mmap) | man2html > mmap.html
The output looks like this:
man2html
was available in the Debian repository, I installed it with sudo apt-get install man2html
.
Once you have it in HTML, you can translate to other formats easily enough: Actually, these won't work, they'll wrap the line automatically again.
man2html /usr/share/man/man1/grep.1.gz | html2ps > grep.ps
man2html /usr/share/man/man1/grep.1.gz | html2ps | ps2pdf14 - grep.man.pdf
`
Best Answer
On Ubuntu, Mint, and relatives,
strlcpy
andstrlcat
are available in thelibbsd-dev
package. RunThis will install the libraries, header files, and man pages.
To use the functions from C code, add the line
to your files, and add
-lbsd
, or the more portable$(pkg-config --libs libbsd)
, to yourgcc
command line to link the library.