c2man patches by Peter Seiderer

Working with c2man I found some minor things which I improved.

Here are the description of the features I added and/or changed and the according patches.

My patches where done against c2man_2.41.orig.tar.gz with applied patch c2man_2.41-10.diff from the debian sources obtained from ftp.debian.org (See links below!).

  1. c2man is doing a simple automatic capitalization. I changed the rules for this because of the following behaviour:

    I had the following Problem:

    this is a sentence with an '.' point in ticks. next sentence

    leads to the wrong output (note the false capital P in Point and the right capital N in Next):

    This is a sentence with an '.' Point in ticks. Next sentence

    instead of the correct output (lower p in point and capital N in Next):

    This is a sentence with an '.' point in ticks. Next sentence

  2. Using the nroff output (unix man pages) there was a missbehaviour when there is a leading tick on a line:

    In the nroff output the following:

    'blabla

    leads to no output. But

    \'blabla

    leads to the correct output

    'blabla

  3. Using a backslash in the comments leads to incorrect output via nroff and latex:

    I used for description of some string functions the following end character description : '\0'

    This leads to false output for latex and nroff

    latex:'\0' --> '\0'

    nroff: '\0' --> '\0'

    The right output would be:

    latex: '\0' --> '$\backslash$0'

    nroff: '\0' --> '\\0'

  4. This patch makes it possible to add source code examples to the man pages. This is done in the following manner. First the file lex.l was changed to get the tabular character '\t' at the beginning of an comment line. Then nroff.c html.c and late.c where changed in such a way, that they recognice if at the beginning of an comment there is tab indicating an source code example. This line and consecutive lines beginning with an tab character are treated without formating. This means in nroff beginnign with '.nf' and ending with '.fi', in latex with '\begin{verbatim}' and '\end{verbatim}' and in html '<pre>' and '</pre>.

  5. Minor bugfix. Do not capitalize when in verbatim mode.

If you apply one of the patches (hopefully the newiest) you will find a new directory 'c2man/test' where README files and examples of the described errors and added features can be found.

Links:

The original files I worked on (from ftp.debian.org).

And the patches:

c2man_peter_patch-1

c2man_peter_patch-2

c2man_peter_patch-3

c2man_peter_patch-4

c2man_peter_patch-5

How to apply the patches:

$> tar -xvzf c2man_2.41.orig.tar.gz

$> patch -p0 < c2man_2.41-10.diff

$> mv c2man-2.41.orig/ c2man

$> patch -p0 < c2man_peter_patch-1

$> patch -p0 < c2man_peter_patch-2

$> patch -p0 < c2man_peter_patch-3

$> patch -p0 < c2man_peter_patch-4

$> patch -p0 < c2man_peter_patch-5

See 'c2man/INSTALL' for information how to compile and install the c2man tool.

copyright © 2001 Peter Seiderer for www.ciselant.de