=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.172 retrieving revision 1.173 diff -u -p -r1.172 -r1.173 --- mandoc/man_term.c 2015/04/02 22:48:17 1.172 +++ mandoc/man_term.c 2015/04/02 23:48:19 1.173 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.172 2015/04/02 22:48:17 schwarze Exp $ */ +/* $Id: man_term.c,v 1.173 2015/04/02 23:48:19 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -49,7 +49,7 @@ struct mtermp { #define DECL_ARGS struct termp *p, \ struct mtermp *mt, \ struct roff_node *n, \ - const struct man_meta *meta + const struct roff_meta *meta struct termact { int (*pre)(DECL_ARGS); @@ -60,8 +60,10 @@ struct termact { static void print_man_nodelist(DECL_ARGS); static void print_man_node(DECL_ARGS); -static void print_man_head(struct termp *, const void *); -static void print_man_foot(struct termp *, const void *); +static void print_man_head(struct termp *, + const struct roff_meta *); +static void print_man_foot(struct termp *, + const struct roff_meta *); static void print_bvspace(struct termp *, const struct roff_node *, int); @@ -139,7 +141,7 @@ void terminal_man(void *arg, const struct man *man) { struct termp *p; - const struct man_meta *meta; + const struct roff_meta *meta; struct roff_node *n; struct mtermp mt; @@ -1012,13 +1014,11 @@ print_man_nodelist(DECL_ARGS) } static void -print_man_foot(struct termp *p, const void *arg) +print_man_foot(struct termp *p, const struct roff_meta *meta) { - const struct man_meta *meta; char *title; size_t datelen, titlen; - meta = (const struct man_meta *)arg; assert(meta->title); assert(meta->msec); assert(meta->date); @@ -1030,8 +1030,8 @@ print_man_foot(struct termp *p, const void *arg) /* * Temporary, undocumented option to imitate mdoc(7) output. - * In the bottom right corner, use the source instead of - * the title. + * In the bottom right corner, use the operating system + * instead of the title. */ if ( ! p->mdocstyle) { @@ -1041,14 +1041,14 @@ print_man_foot(struct termp *p, const void *arg) } mandoc_asprintf(&title, "%s(%s)", meta->title, meta->msec); - } else if (meta->source) { - title = mandoc_strdup(meta->source); + } else if (meta->os) { + title = mandoc_strdup(meta->os); } else { title = mandoc_strdup(""); } datelen = term_strlen(p, meta->date); - /* Bottom left corner: manual source. */ + /* Bottom left corner: operating system. */ p->flags |= TERMP_NOSPACE | TERMP_NOBREAK; p->trailspace = 1; @@ -1056,8 +1056,8 @@ print_man_foot(struct termp *p, const void *arg) p->rmargin = p->maxrmargin > datelen ? (p->maxrmargin + term_len(p, 1) - datelen) / 2 : 0; - if (meta->source) - term_word(p, meta->source); + if (meta->os) + term_word(p, meta->os); term_flushln(p); /* At the bottom in the middle: manual date. */ @@ -1084,14 +1084,12 @@ print_man_foot(struct termp *p, const void *arg) } static void -print_man_head(struct termp *p, const void *arg) +print_man_head(struct termp *p, const struct roff_meta *meta) { - const struct man_meta *meta; const char *volume; char *title; size_t vollen, titlen; - meta = (const struct man_meta *)arg; assert(meta->title); assert(meta->msec);