Skip to content

Commit

Permalink
Add new functions, fix some white-space, and add our pledge(2) promises.
Browse files Browse the repository at this point in the history
  • Loading branch information
kristaps committed Jun 18, 2018
1 parent ab7d40c commit a93085c
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions man/lowdown.3
Expand Up @@ -43,9 +43,11 @@ library parses Markdown as defined in
into HTML or roff
.Pq Fl ms No or Fl man No macro sets .
It consists of both a high-level interface consisting of
.Xr lowdown_buf 3
and
.Xr lowdown_buf 3 ,
.Xr lowdown_buf_diff 3 ,
.Xr lowdown_file 3 ,
and
.Xr lowdown_file_diff 3 ;
then a series of low-level interfaces directly to the parsers and
renderers.
.Pp
Expand All @@ -54,11 +56,11 @@ Most functions use the
structure to manage features.
.Bd -literal
struct lowdown_opts {
lowdown_msg msg;
enum lowdown_type type;
void *arg;
unsigned int feat;
unsigned int oflags;
lowdown_msg msg;
enum lowdown_type type;
void *arg;
unsigned int feat;
unsigned int oflags;
};
.Ed
.Pp
Expand Down Expand Up @@ -234,8 +236,8 @@ values if
was provided as an input bit.
.Bd -literal
struct lowdown_meta {
char *key;
char *value;
char *key;
char *value;
};
.Ed
.Pp
Expand All @@ -253,7 +255,7 @@ is given in
.Vt "struct lowdown_opts" .
.Bd -literal
typedef void (*lowdown_msg)
(enum lowdown_err, void *, const char *);
(enum lowdown_err, void *, const char *);
.Ed
.Pp
It accepts the following arguments:
Expand All @@ -280,14 +282,31 @@ A footnote reference to an unknown footnote, and is thus being ignored.
.It Dv LOWDOWN_ERR_DUPE_FOOTNOTE
A duplicate footnote reference was encountered, and is thus being ignored.
.El
.Ss Pledge Promises
The
.Nm lowdown
library is built to operate in security-sensitive environments, such as
those using
.Xr pledge 2
on
.Ox .
The only promise required is
.Va stdio
for
.Xr lowdown_file_diff 3
and
.Xr lowdown_file 3 :
both require access to the stream for reading input.
.Sh SEE ALSO
.Xr lowdown 1 ,
.Xr lowdown_buf 3 ,
.Xr lowdown_buf_diff 3 ,
.Xr lowdown_doc_free 3 ,
.Xr lowdown_doc_new 3 ,
.Xr lowdown_doc_parse 3 ,
.Xr lowdown_errstr 3 ,
.Xr lowdown_file 3 ,
.Xr lowdown_file_diff 3 ,
.Xr lowdown_html_free 3 ,
.Xr lowdown_html_new 3 ,
.Xr lowdown_html_rndr 3 ,
Expand Down

0 comments on commit a93085c

Please sign in to comment.