=================================================================== RCS file: /cvs/mandoc/Attic/mlg.c,v retrieving revision 1.2 retrieving revision 1.4 diff -u -p -r1.2 -r1.4 --- mandoc/Attic/mlg.c 2008/12/03 19:21:58 1.2 +++ mandoc/Attic/mlg.c 2008/12/04 11:25:29 1.4 @@ -1,4 +1,4 @@ -/* $Id: mlg.c,v 1.2 2008/12/03 19:21:58 kristaps Exp $ */ +/* $Id: mlg.c,v 1.4 2008/12/04 11:25:29 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -63,7 +63,9 @@ struct md_mlg { static void mlg_roffmsg(void *arg, enum roffmsg, const char *, const char *, char *); -static int mlg_roffhead(void *); +static int mlg_roffhead(void *, const struct tm *, + const char *, const char *, + const char *, const char *); static int mlg_rofftail(void *); static int mlg_roffin(void *, int, int *, char **); static int mlg_roffdata(void *, int, char *); @@ -189,7 +191,7 @@ mlg_indent(struct md_mlg *p) { size_t count; - count = p->indent > MAXINDENT ? MAXINDENT : p->indent; + count = p->indent > MAXINDENT ? (size_t)MAXINDENT : p->indent; count *= INDENT; assert(0 == p->pos); @@ -212,6 +214,7 @@ mlg_newline(struct md_mlg *p) static void mlg_mode(struct md_mlg *p, enum md_tok ns) { + p->flags &= ~ML_OVERRIDE_ONE; p->last = ns; } @@ -252,7 +255,7 @@ mlg_data(struct md_mlg *p, int space, char *buf) if ( ! ml_nputstring(p->mbuf, bufp, sz, &p->pos)) return(0); - if (p->indent * MAXINDENT + sz >= COLUMNS) + if (p->indent * INDENT + sz >= COLUMNS) if ( ! mlg_newline(p)) return(0); if ( ! (ML_OVERRIDE_ALL & p->flags)) @@ -345,7 +348,8 @@ mlg_alloc(const struct md_args *args, static int -mlg_roffhead(void *arg) +mlg_roffhead(void *arg, const struct tm *tm, const char *os, + const char *title, const char *sec, const char *vol) { struct md_mlg *p; @@ -353,7 +357,7 @@ mlg_roffhead(void *arg) p = (struct md_mlg *)arg; mlg_mode(p, MD_BLK_IN); - if ( ! (*p->begin)(p->mbuf, p->args)) + if ( ! (*p->begin)(p->mbuf, p->args, tm, os, title, sec, vol)) return(0); p->indent++;