=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -p -r1.93 -r1.94 --- mandoc/mdoc_term.c 2009/10/19 15:18:30 1.93 +++ mandoc/mdoc_term.c 2009/10/22 18:55:32 1.94 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.93 2009/10/19 15:18:30 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.94 2009/10/22 18:55:32 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -347,8 +347,8 @@ print_node(DECL_ARGS) static void print_foot(DECL_ARGS) { - struct tm *tm; - char *buf, *os; + char buf[DATESIZ]; + char *os; /* * Output the footer in new-groff style, that is, three columns @@ -358,16 +358,11 @@ print_foot(DECL_ARGS) * SYSTEM DATE SYSTEM */ - if (NULL == (buf = malloc(p->rmargin))) - err(EXIT_FAILURE, "malloc"); if (NULL == (os = malloc(p->rmargin))) err(EXIT_FAILURE, "malloc"); - tm = localtime(&m->date); + time2a(m->date, buf, DATESIZ); - if (0 == strftime(buf, p->rmargin, "%B %e, %Y", tm)) - err(EXIT_FAILURE, "strftime"); - (void)strlcpy(os, m->os, p->rmargin); term_vspace(p); @@ -398,7 +393,6 @@ print_foot(DECL_ARGS) p->rmargin = p->maxrmargin; p->flags = 0; - free(buf); free(os); }