version 1.13, 2009/01/20 12:51:28 |
version 1.14, 2009/01/20 13:44:05 |
|
|
|
|
#include "private.h" |
#include "private.h" |
|
|
|
/* |
|
* Actions are executed on macros after they've been post-validated: in |
|
* other words, a macro will not be "acted upon" until all of its |
|
* children have been filled in (post-fix order). |
|
*/ |
|
|
struct actions { |
struct actions { |
int (*post)(struct mdoc *); |
int (*post)(struct mdoc *); |
Line 149 const struct actions mdoc_actions[MDOC_MAX] = { |
|
Line 154 const struct actions mdoc_actions[MDOC_MAX] = { |
|
}; |
}; |
|
|
|
|
|
/* |
|
* The `Nm' macro sets the document's name when used the first time with |
|
* an argument. Subsequent calls without a value will result in the |
|
* name value being used. |
|
*/ |
static int |
static int |
post_nm(struct mdoc *mdoc) |
post_nm(struct mdoc *mdoc) |
{ |
{ |
Line 169 post_nm(struct mdoc *mdoc) |
|
Line 179 post_nm(struct mdoc *mdoc) |
|
} |
} |
|
|
|
|
|
/* |
|
* We keep track of the current section in order to provide warnings on |
|
* section ordering, per-section macros, and so on. |
|
*/ |
static int |
static int |
post_sh(struct mdoc *mdoc) |
post_sh(struct mdoc *mdoc) |
{ |
{ |
Line 188 post_sh(struct mdoc *mdoc) |
|
Line 202 post_sh(struct mdoc *mdoc) |
|
} |
} |
|
|
|
|
|
/* |
|
* Prologue title must be parsed into document meta-data. |
|
*/ |
static int |
static int |
post_dt(struct mdoc *mdoc) |
post_dt(struct mdoc *mdoc) |
{ |
{ |
Line 233 post_dt(struct mdoc *mdoc) |
|
Line 250 post_dt(struct mdoc *mdoc) |
|
} |
} |
|
|
|
|
|
/* |
|
* Prologue operating system must be parsed into document meta-data. |
|
*/ |
static int |
static int |
post_os(struct mdoc *mdoc) |
post_os(struct mdoc *mdoc) |
{ |
{ |
Line 253 post_os(struct mdoc *mdoc) |
|
Line 273 post_os(struct mdoc *mdoc) |
|
} |
} |
|
|
|
|
|
/* |
|
* Prologue date must be parsed into document meta-data. |
|
*/ |
static int |
static int |
post_dd(struct mdoc *mdoc) |
post_dd(struct mdoc *mdoc) |
{ |
{ |
Line 299 post_dd(struct mdoc *mdoc) |
|
Line 322 post_dd(struct mdoc *mdoc) |
|
} |
} |
|
|
|
|
|
/* |
|
* The end document shouldn't have the prologue macros as part of the |
|
* syntax tree (they encompass only meta-data). |
|
*/ |
static int |
static int |
post_prologue(struct mdoc *mdoc) |
post_prologue(struct mdoc *mdoc) |
{ |
{ |