=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.151 retrieving revision 1.153 diff -u -p -r1.151 -r1.153 --- mandoc/main.c 2011/03/16 15:28:35 1.151 +++ mandoc/main.c 2011/03/17 12:08:01 1.153 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.151 2011/03/16 15:28:35 kristaps Exp $ */ +/* $Id: main.c,v 1.153 2011/03/17 12:08:01 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze @@ -233,7 +233,7 @@ static void fdesc(struct curparse *); static void ffile(const char *, struct curparse *); static int pfile(const char *, struct curparse *); static int moptions(enum intt *, char *); -static int mmsg(enum mandocerr, void *, +static void mmsg(enum mandocerr, void *, int, int, const char *); static void pset(const char *, int, struct curparse *); static int toptions(struct curparse *, char *); @@ -405,11 +405,7 @@ resize_buf(struct buf *buf, size_t initial) { buf->sz = buf->sz > initial/2 ? 2 * buf->sz : initial; - buf->buf = realloc(buf->buf, buf->sz); - if (NULL == buf->buf) { - perror(NULL); - exit((int)MANDOCLEVEL_SYSERR); - } + buf->buf = mandoc_realloc(buf->buf, buf->sz); } @@ -1040,7 +1036,7 @@ woptions(struct curparse *curp, char *arg) return(1); } -static int +static void mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg) { struct curparse *cp; @@ -1053,7 +1049,7 @@ mmsg(enum mandocerr t, void *arg, int ln, int col, con cp = (struct curparse *)arg; if (level < cp->wlevel) - return(1); + return; fprintf(stderr, "%s:%d:%d: %s: %s", cp->file, ln, col + 1, mandoclevels[level], mandocerrs[t]); @@ -1063,6 +1059,4 @@ mmsg(enum mandocerr t, void *arg, int ln, int col, con if (cp->file_status < level) cp->file_status = level; - - return(level < MANDOCLEVEL_FATAL); }