version 1.46, 2009/10/29 04:34:38 |
version 1.51, 2010/03/31 07:13:53 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
|
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
|
#endif |
|
|
#ifndef OSNAME |
#ifndef OSNAME |
#include <sys/utsname.h> |
#include <sys/utsname.h> |
#endif |
#endif |
|
|
#include <assert.h> |
#include <assert.h> |
#include <errno.h> |
|
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
Line 43 static int concat(struct mdoc *, char *, |
|
Line 46 static int concat(struct mdoc *, char *, |
|
const struct mdoc_node *, size_t); |
const struct mdoc_node *, size_t); |
static inline int order_rs(int); |
static inline int order_rs(int); |
|
|
#ifdef __linux__ |
|
extern size_t strlcat(char *, const char *, size_t); |
|
#endif |
|
|
|
static int post_ar(POST_ARGS); |
static int post_ar(POST_ARGS); |
static int post_at(POST_ARGS); |
static int post_at(POST_ARGS); |
static int post_bl(POST_ARGS); |
static int post_bl(POST_ARGS); |
Line 504 post_dt(POST_ARGS) |
|
Line 503 post_dt(POST_ARGS) |
|
if (cp) { |
if (cp) { |
/* FIXME: where is strtonum!? */ |
/* FIXME: where is strtonum!? */ |
m->meta.vol = mandoc_strdup(cp); |
m->meta.vol = mandoc_strdup(cp); |
errno = 0; |
|
lval = strtol(nn->string, &ep, 10); |
lval = strtol(nn->string, &ep, 10); |
if (nn->string[0] != '\0' && *ep == '\0') |
if (nn->string[0] != '\0' && *ep == '\0') |
m->meta.msec = (int)lval; |
m->meta.msec = (int)lval; |
|
|
post_bl_width(POST_ARGS) |
post_bl_width(POST_ARGS) |
{ |
{ |
size_t width; |
size_t width; |
int i, tok; |
int i; |
|
enum mdoct tok; |
char buf[NUMSIZ]; |
char buf[NUMSIZ]; |
char *p; |
char *p; |
|
|
Line 820 post_ar(POST_ARGS) |
|
Line 819 post_ar(POST_ARGS) |
|
|
|
|
|
/* |
/* |
* Parse the date field in `Dd', primarily through mdoc_atotime(). |
* Parse the date field in `Dd'. |
* FIXME: push mdoc_atotime() into here. |
|
*/ |
*/ |
static int |
static int |
post_dd(POST_ARGS) |
post_dd(POST_ARGS) |
Line 831 post_dd(POST_ARGS) |
|
Line 829 post_dd(POST_ARGS) |
|
if ( ! concat(m, buf, n->child, DATESIZ)) |
if ( ! concat(m, buf, n->child, DATESIZ)) |
return(0); |
return(0); |
|
|
m->meta.date = mdoc_atotime(buf); |
m->meta.date = mandoc_a2time |
|
(MTIME_MDOCDATE | MTIME_CANONICAL, buf); |
|
|
if (0 == m->meta.date) { |
if (0 == m->meta.date) { |
if ( ! mdoc_nwarn(m, n, EBADDATE)) |
if ( ! mdoc_nwarn(m, n, EBADDATE)) |
return(0); |
return(0); |
Line 890 pre_dl(PRE_ARGS) |
|
Line 890 pre_dl(PRE_ARGS) |
|
} |
} |
|
|
|
|
|
/* ARGSUSED */ |
static int |
static int |
pre_offset(PRE_ARGS) |
pre_offset(PRE_ARGS) |
{ |
{ |