=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.123 retrieving revision 1.125 diff -u -p -r1.123 -r1.125 --- mandoc/main.c 2010/12/15 23:39:40 1.123 +++ mandoc/main.c 2010/12/22 11:38:17 1.125 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.123 2010/12/15 23:39:40 kristaps Exp $ */ +/* $Id: main.c,v 1.125 2010/12/22 11:38:17 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -145,6 +145,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = /* related to macros and nesting */ "skipping obsolete macro", + "skipping paragraph macro", "blocks badly nested", "child violates parent syntax", "nested displays are not portable", @@ -182,7 +183,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "skipping bad character", "skipping text before the first section header", "skipping unknown macro", - "skipping paragraph macro", "NOT IMPLEMENTED: skipping request", "line scope broken", "argument count wrong", @@ -389,7 +389,7 @@ static void resize_buf(struct buf *buf, size_t initial) { - buf->sz = buf->sz ? 2 * buf->sz : initial; + buf->sz = buf->sz > initial/2 ? 2 * buf->sz : initial; buf->buf = realloc(buf->buf, buf->sz); if (NULL == buf->buf) { perror(NULL);