=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.40 retrieving revision 1.44 diff -u -p -r1.40 -r1.44 --- mandoc/man_term.c 2009/10/18 19:03:37 1.40 +++ mandoc/man_term.c 2009/10/24 05:45:05 1.44 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.40 2009/10/18 19:03:37 kristaps Exp $ */ +/* $Id: man_term.c,v 1.44 2009/10/24 05:45:05 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -32,6 +32,8 @@ #define INDENT 7 #define HALFINDENT 3 +/* FIXME: have PD set the default vspace width. */ + struct mtermp { int fl; #define MANT_LITERAL (1 << 0) @@ -141,6 +143,7 @@ static const struct termact termacts[MAN_MAX] = { { pre_RS, post_RS }, /* RS */ { pre_ign, NULL }, /* DT */ { pre_ign, NULL }, /* UC */ + { pre_ign, NULL }, /* PD */ }; @@ -191,7 +194,7 @@ arg2height(const struct man_node *n) if ( ! a2roffsu(n->string, &su, SCALE_VS)) SCALE_VS_INIT(&su, strlen(n->string)); - return(term_vspan(&su)); + return((int)term_vspan(&su)); } @@ -203,9 +206,9 @@ arg2width(const struct man_node *n) assert(MAN_TEXT == n->type); assert(n->string); if ( ! a2roffsu(n->string, &su, SCALE_BU)) - SCALE_HS_INIT(&su, strlen(n->string) + 2); + return(-1); - return(term_hspan(&su)); + return((int)term_hspan(&su)); } @@ -909,13 +912,9 @@ print_body(DECL_ARGS) static void print_foot(struct termp *p, const struct man_meta *meta) { - struct tm *tm; - char buf[BUFSIZ]; + char buf[DATESIZ]; - tm = localtime(&meta->date); - - if (0 == strftime(buf, p->rmargin, "%B %d, %Y", tm)) - (void)strlcpy(buf, "(invalid date)", BUFSIZ); + time2a(meta->date, buf, DATESIZ); term_vspace(p);