=================================================================== RCS file: /cvs/mandoc/html.c,v retrieving revision 1.55 retrieving revision 1.57 diff -u -p -r1.55 -r1.57 --- mandoc/html.c 2009/10/03 16:36:06 1.55 +++ mandoc/html.c 2009/10/04 09:02:40 1.57 @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.55 2009/10/03 16:36:06 kristaps Exp $ */ +/* $Id: html.c,v 1.57 2009/10/04 09:02:40 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -75,6 +75,7 @@ static const char *const htmlattrs[ATTR_MAX] = { "width", "valign", "target", + "id", }; #ifdef __linux__ @@ -511,11 +512,10 @@ buffmt(struct html *h, const char *fmt, ...) va_list ap; va_start(ap, fmt); - (void)vsnprintf(h->buf + h->buflen, + (void)vsnprintf(h->buf + (int)h->buflen, BUFSIZ - h->buflen - 1, fmt, ap); va_end(ap); h->buflen = strlen(h->buf); - assert('\0' == h->buf[h->buflen]); } @@ -528,7 +528,6 @@ bufncat(struct html *h, const char *p, size_t sz) (void)strncat(h->buf, p, sz); h->buflen += sz; - assert('\0' == h->buf[h->buflen]); } @@ -539,7 +538,7 @@ buffmt_includes(struct html *h, const char *name) pp = h->base_includes; while ((p = strchr(pp, '%'))) { - bufncat(h, pp, p - pp); + bufncat(h, pp, (size_t)(p - pp)); switch (*(p + 1)) { case('I'): bufcat(h, name); @@ -563,7 +562,7 @@ buffmt_man(struct html *h, pp = h->base_man; while ((p = strchr(pp, '%'))) { - bufncat(h, pp, p - pp); + bufncat(h, pp, (size_t)(p - pp)); switch (*(p + 1)) { case('S'): bufcat(h, sec);