version 1.2, 2015/01/30 04:11:50 |
version 1.6, 2018/12/14 06:33:14 |
|
|
.\" $Id$ |
.\" $Id$ |
.\" |
.\" |
.\" Copyright (c) 2013 Ingo Schwarze <schwarze@openbsd.org> |
.\" Copyright (c) 2013, 2015, 2018 Ingo Schwarze <schwarze@openbsd.org> |
.\" |
.\" |
.\" Permission to use, copy, modify, and distribute this software for any |
.\" Permission to use, copy, modify, and distribute this software for any |
.\" purpose with or without fee is hereby granted, provided that the above |
.\" purpose with or without fee is hereby granted, provided that the above |
|
|
.Nm tbl_free |
.Nm tbl_free |
.Nd roff table parser library for mandoc |
.Nd roff table parser library for mandoc |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.In mandoc.h |
.In sys/types.h |
.In libmandoc.h |
.In tbl.h |
.In libroff.h |
.In tbl_parse.h |
.Ft struct tbl_node * |
.Ft struct tbl_node * |
.Fo tbl_alloc |
.Fo tbl_alloc |
.Fa "int pos" |
.Fa "int pos" |
.Fa "int line" |
.Fa "int line" |
.Fa "struct mparse *parse" |
|
.Fc |
.Fc |
.Ft enum rofferr |
.Ft void |
.Fo tbl_read |
.Fo tbl_read |
.Fa "struct tbl_node *tbl" |
.Fa "struct tbl_node *tbl" |
.Fa "int ln" |
.Fa "int ln" |
Line 67 utility and not designed for stand-alone use. |
|
Line 66 utility and not designed for stand-alone use. |
|
The present manual is intended as a reference for developers working on |
The present manual is intended as a reference for developers working on |
.Xr mandoc 1 . |
.Xr mandoc 1 . |
.Ss Data structures |
.Ss Data structures |
Unless otherwise noted, all of the following data structures are defined in |
Unless otherwise noted, all of the following data structures are declared in |
.In mandoc.h |
.In tbl.h |
and are deleted in |
and are deleted in |
.Fn tbl_free . |
.Fn tbl_free . |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Vt struct tbl_node |
.It Vt struct tbl_node |
This structure describes a complete table. |
This structure describes a complete table. |
It is defined in |
It is declared in |
.In libroff.h , |
.In tbl_int.h , |
created in |
created in |
.Fn tbl_alloc , |
.Fn tbl_alloc , |
and stored in the members |
and stored in the members |
Line 104 but if there is a span, the function |
|
Line 103 but if there is a span, the function |
|
.Fn tbl_layout |
.Fn tbl_layout |
guarantees that these pointers are not |
guarantees that these pointers are not |
.Dv NULL . |
.Dv NULL . |
The function |
|
.Fn tbl_alloc |
|
guarantees that the |
|
.Fa parse |
|
member is not |
|
.Dv NULL . |
|
.It Vt struct tbl_opts |
.It Vt struct tbl_opts |
This structure describes the options of one table. |
This structure describes the options of one table. |
It is used as a substructure of |
It is used as a substructure of |
|
|
.Ss Interface functions |
.Ss Interface functions |
The following functions are implemented in |
The following functions are implemented in |
.Pa tbl.c , |
.Pa tbl.c , |
and all callers in |
and all callers are in |
.Pa roff.c . |
.Pa roff.c . |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fn tbl_alloc |
.It Fn tbl_alloc |
|
|
.Fn roff_reset . |
.Fn roff_reset . |
.El |
.El |
.Ss Private functions |
.Ss Private functions |
|
The following functions are declared in |
|
.In tbl_int.h . |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Ft int Fn tbl_options "struct tbl_node *tbl" "int ln" "const char *p" |
.It Ft int Fn tbl_options "struct tbl_node *tbl" "int ln" "const char *p" |
Parses the options line into |
Parses the options line into |