discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Thomas Klausner <wiz@NetBSD.org>
To: discuss@mdocml.bsd.lv
Subject: Re: pod2mdoc, docbook2mdoc
Date: Thu, 3 Apr 2014 14:17:38 +0200	[thread overview]
Message-ID: <20140403121738.GA6386@danbala.tuwien.ac.at> (raw)
In-Reply-To: <533D4DE1.4030304@bsd.lv>

Hi Kristaps!

On Thu, Apr 03, 2014 at 02:02:41PM +0200, Kristaps Dzonsons wrote:
> I suggest you check out the latest version... run as:
> 
>  pod2mdoc foo.pm | mandoc
> 
> The output is much nicer than pod2man in the same way.  Lots more semantic
> content as mentioned in the "Smarts" subsection of the manual.  Most
> visibly, since the SYNOPSIS is now rendered with Nm, Oo/Oc, Ar, and Fl,
> mandoc can properly format sections.

Thanks.

I've tried DSA_SIG_new.pod, basically at random. Here's the output:

.Dd July 20, 2009
.Dt DSA_SIG_NEW 1
.Os
.Sh NAME
.Nm DSA_SIG_new ,
.Nm DSA_SIG_free 
.Nd allocate and free DSA signature objects
.Sh SYNOPSIS
.Bd -literal
 #include <openssl/dsa.h>
.Ed
.Bd -literal
 DSA_SIG *DSA_SIG_new(void);
.Ed
.Bd -literal
 void   DSA_SIG_free(DSA_SIG *a);
.Ed
.Sh DESCRIPTION
DSA_SIG_new() allocates and initializes a 
.Sy DSA_SIG
structure.
.Pp
DSA_SIG_free() frees the 
.Sy DSA_SIG
structure and its components. The
values are erased before the memory is returned to the system.
.Sh RETURN VALUES
If the allocation fails, DSA_SIG_new() returns 
.Sy NULL
and sets an
error code that can be obtained by
.Xr ERR_get_error 3 Ns  .
Otherwise it returns a pointer
to the newly allocated structure.
.Pp
DSA_SIG_free() returns no value.
.Sh SEE ALSO
.Xr dsa 3 Ns  ,
.Xr ERR_get_error 3 Ns  ,
.Xr DSA_do_sign 3
.Sh HISTORY
DSA_SIG_new() and DSA_SIG_free() were added in OpenSSL 0.9.3.

It's already quite nice!

Some suggestions:
* foo() -> .Fn foo
* too many Ns before punctuation
* section number is 1 instead of 3 (not sure how to detect that)
* .Bd -literal + #include <foo> + Ed -> .In foo
* splitting up the functions in the SYNOPSIS the same way is probably too much effort?

Related question:
How do people use Sy vs. Dv?

I personally always mark up NULL as a Dv and similarly for most other
defined C symbols.

Thanks,
 Thomas
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2014-04-03 12:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <sfid-H20140330-202333-+022.64-1@spamfilter.osbf.lua>
2014-03-30 18:23 ` Kristaps Dzonsons
2014-03-31  9:09   ` Thomas Klausner
2014-03-31 10:30     ` Kristaps Dzonsons
2014-03-31 16:13       ` Ingo Schwarze
2014-03-31 19:40         ` Kristaps Dzonsons
2014-03-31 20:57           ` Ingo Schwarze
2014-03-31 21:30             ` Thomas Klausner
2014-03-31 21:54               ` Kristaps Dzonsons
2014-03-31 22:21                 ` Ingo Schwarze
2014-03-31 22:31                   ` Thomas Klausner
2014-04-03 12:02                     ` Kristaps Dzonsons
2014-04-03 12:17                       ` Thomas Klausner [this message]
2014-04-03 12:33                         ` Kristaps Dzonsons
2014-04-03 13:53                           ` Ingo Schwarze
2014-04-03 16:51                             ` Kristaps Dzonsons
2014-04-03 22:06                             ` Thomas Klausner
2014-04-04 13:43                               ` Kristaps Dzonsons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140403121738.GA6386@danbala.tuwien.ac.at \
    --to=wiz@netbsd.org \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).