version 1.30, 2010/03/27 10:04:56 |
version 1.31, 2010/05/15 15:54:39 |
|
|
post_TH(struct man *m) |
post_TH(struct man *m) |
{ |
{ |
struct man_node *n; |
struct man_node *n; |
char *ep; |
|
long lval; |
|
|
|
if (m->meta.title) |
if (m->meta.title) |
free(m->meta.title); |
free(m->meta.title); |
Line 154 post_TH(struct man *m) |
|
Line 152 post_TH(struct man *m) |
|
if (m->meta.source) |
if (m->meta.source) |
free(m->meta.source); |
free(m->meta.source); |
|
|
m->meta.title = m->meta.vol = m->meta.source = NULL; |
m->meta.title = m->meta.vol = |
m->meta.msec = 0; |
m->meta.msec = m->meta.source = NULL; |
m->meta.date = 0; |
m->meta.date = 0; |
|
|
/* ->TITLE<- MSEC DATE SOURCE VOL */ |
/* ->TITLE<- MSEC DATE SOURCE VOL */ |
Line 168 post_TH(struct man *m) |
|
Line 166 post_TH(struct man *m) |
|
|
|
n = n->next; |
n = n->next; |
assert(n); |
assert(n); |
|
m->meta.msec = mandoc_strdup(n->string); |
|
|
lval = strtol(n->string, &ep, 10); |
|
if (n->string[0] != '\0' && *ep == '\0') |
|
m->meta.msec = (int)lval; |
|
else if ( ! man_nwarn(m, n, WMSEC)) |
|
return(0); |
|
|
|
/* TITLE MSEC ->DATE<- SOURCE VOL */ |
/* TITLE MSEC ->DATE<- SOURCE VOL */ |
|
|
n = n->next; |
n = n->next; |
if (n) { |
if (n) { |
m->meta.date = mandoc_a2time |
m->meta.date = mandoc_a2time |
(MTIME_ISO_8601, n->string); |
(MTIME_ISO_8601, n->string); |
|
|
if (0 == m->meta.date) { |
if (0 == m->meta.date) { |
if ( ! man_nwarn(m, n, WDATE)) |
if ( ! man_nwarn(m, n, WDATE)) |
return(0); |
return(0); |