version 1.21, 2009/10/27 08:26:12 |
version 1.23, 2009/10/31 06:10:58 |
|
|
#include <sys/utsname.h> |
#include <sys/utsname.h> |
|
|
#include <assert.h> |
#include <assert.h> |
#include <errno.h> |
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
#include "libman.h" |
#include "libman.h" |
|
#include "libmandoc.h" |
|
|
struct actions { |
struct actions { |
int (*post)(struct man *); |
int (*post)(struct man *); |
Line 141 post_TH(struct man *m) |
|
Line 141 post_TH(struct man *m) |
|
|
|
n = m->last->child; |
n = m->last->child; |
assert(n); |
assert(n); |
|
m->meta.title = mandoc_strdup(n->string); |
|
|
if (NULL == (m->meta.title = strdup(n->string))) |
|
return(man_nerr(m, n, WNMEM)); |
|
|
|
/* TITLE ->MSEC<- DATE SOURCE VOL */ |
/* TITLE ->MSEC<- DATE SOURCE VOL */ |
|
|
n = n->next; |
n = n->next; |
assert(n); |
assert(n); |
|
|
errno = 0; |
|
lval = strtol(n->string, &ep, 10); |
lval = strtol(n->string, &ep, 10); |
if (n->string[0] != '\0' && *ep == '\0') |
if (n->string[0] != '\0' && *ep == '\0') |
m->meta.msec = (int)lval; |
m->meta.msec = (int)lval; |
Line 170 post_TH(struct man *m) |
|
Line 167 post_TH(struct man *m) |
|
/* TITLE MSEC DATE ->SOURCE<- VOL */ |
/* TITLE MSEC DATE ->SOURCE<- VOL */ |
|
|
if (n && (n = n->next)) |
if (n && (n = n->next)) |
if (NULL == (m->meta.source = strdup(n->string))) |
m->meta.source = mandoc_strdup(n->string); |
return(man_nerr(m, n, WNMEM)); |
|
|
|
/* TITLE MSEC DATE SOURCE ->VOL<- */ |
/* TITLE MSEC DATE SOURCE ->VOL<- */ |
|
|
if (n && (n = n->next)) |
if (n && (n = n->next)) |
if (NULL == (m->meta.vol = strdup(n->string))) |
m->meta.vol = mandoc_strdup(n->string); |
return(man_nerr(m, n, WNMEM)); |
|
|
|
/* |
/* |
* The end document shouldn't have the prologue macros as part |
* The end document shouldn't have the prologue macros as part |