This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Poor man's manpage reader for cygwin/ming


>   vischne@ibm.net
>   Wed, 18 Feb 1998 13:26:35 GMT
>The following manpage reader script seems to work pretty well under
>cygwin, and is made of handy parts that are easily available and
>portable to cygwin.
>
>In this case, less-332 was compiled using mingwin32, since there was
>alternate code in the less-332 source distribution that lets you take
>advantage of mingwin's rtldll.dll library instead of the cygwin terminal.
>Compiling less-332 using cygwin results in a version of less.exe that
>issues diagnostic messages indicating _where_ the cygwin terminal is broken.
>Also, zmore.exe seems to work well using `ln -s less.exe more.exe' as its
>version of more.exe.
>========================================================================
>
>#!/bin/sh
>zmore $1 | nroff -man - | col | less
>
I have gotten some e-mail indicating problems with compiling less-332. It
takes a little re-working of the source code, particularly filling in
values for things like PATH_MAX (512 sounds good) and defining WINC32
globally so that the MINGW32 compiler can make the program.  You might
also want to use cygwin to configure the thing so as to generate a Makefile
that MINGW32 can use (after modification).

You can alternately compile `more' and use it, but I won't guarantee that
it works with the cygwin terminal.

Also, someone with high aspirations could add code for searching the 
/usr/man and /usr/local/man directories for a .n or .n.gz file with a
prefix given on the command line, but that would take away from the
simplicity of just using a one-liner with the full /usr/man/file.x.gz
name.

For those who like Windows 95/NT batch files, the man.bat version of the
above is:
==========================================================================
man.bat:

sh zmore %1 | nroff -man - | col | less
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]