[BACK]Return to sqlite2mdoc.1 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / public-domain / sqlite / sqlite2mdoc

File: [cvs.NetBSD.org] / src / external / public-domain / sqlite / sqlite2mdoc / sqlite2mdoc.1 (download)

Revision 1.1, Wed Mar 30 21:30:20 2016 UTC (6 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, HEAD

From: https://github.com/kristapsdz/sqlite2mdoc

.Dd $Mdocdate: March 28 2016 $
.Nm sqlite2mdoc
.Nd extract C reference manpages from SQLite header file
.Nm sqlite2mdoc
.Op Fl nv
.Op Fl p Ar prefix
utility extracts C interface descriptions from a header file composed
using the SQLite documentation syntax (see
.Sx SYNTAX ) .
It then emits the corresponding set of
.Xr mdoc 7
manpages, one per interface description.
By default, 
reads from standard input and outputs files into the current directory.
Its arguments are as follows:
.Bl -tag -width Ds
.It Fl n
Don't create files in
.Ar prefix :
just dump everything to stdout.
.It Fl v
Show all missing references.
.It Fl p Ar prefix
Output into
.Ar prefix ,
which must already exist.
This tool was designed for SQLite's header file
.Pa sqlite.h ,
although it will work for any document following the
Historically, all of the SQLite C reference documentation (called the
.Dq C-language Interface Specification )
was only available in HTML.
The syntax for the interface descriptions is as follows:
.Bd -literal
** CAPI3REF: A Brief Description Here
** KEYWORDS: {multiword keyword} single_keyword
** This is a longer description following the blank line.
** You can refer to [other descriptions] by enclosing references to
** keywords (or declaration names) in brackets.
** If the brackets have [some_keyword | a bar] within them, the
** second part is shown while the first is used as a reference.
** Each reference will be collected and its corresponding manpage,
** if found, will be listed in SEE ALSO.
** You can embed <b>HTML</b>, but you must limit this to lists
** (ordered, unordered, description).
** See also: [another_keyword], although since we're the only
** reference, none of these will be found.
** Anything not in [function() | quotes] will be discarded.
** Now we end the comment.  Anything after this, until the next
** blank line, is taken as declarations.
int function_name(char *anarg, char *another);
#define A_DEFINITION "text"
struct a_struct {
	struct embedded_struct {
		int foo;
		int bar;
typedef void (*fptr)(const char *a, const char *b);
It's important that the opening and closing comment parts are flush left
and not followed by spaces.
Paragraph breaks (empty comment lines) should also not have any spaces.
There are many SQLite-specific bits that are purposely not documented so
that people don't use them.
.\" For section 9 functions only.
.\" Not used in OpenBSD.
.\" For sections 2, 3, and 9 function return values only.
.\" For sections 1, 6, 7, and 8 only.
.\" .Sh FILES
.Ex -std
.\" For sections 1, 6, and 8 only.
.\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only.
.\" .Sh ERRORS
.\" For sections 2, 3, 4, and 9 errno settings only.
.Xr mdoc 7 ,
.Lk https://www.sqlite.org/capi3ref.html "C-language Interface Specification for SQLite"
was written by
.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
There are some missing bits:
.Bl -bullet
HTML tables are not parsed.
HTML anchors are not parsed.
Obviously-broken HTML (e.g., unmatched </dt>) isn't worked around.
Structure definitions are discarded except for the structure name.
Comments in definitions will cause extra white-space.
.\" Not used in OpenBSD.