-/* $Id: main.c,v 1.73 2010/05/15 21:53:11 kristaps Exp $ */
+/* $Id: main.c,v 1.74 2010/05/15 22:28:22 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
static int
mmsg(enum mandocerr t, void *arg, int ln, int col, const char *msg)
{
+#if 0
struct curparse *cp;
cp = (struct curparse *)arg;
fprintf(stderr, ": %s", msg);
fputc('\n', stderr);
+#endif
return(1);
}
-/* $Id: roff.c,v 1.72 2010/05/15 22:22:51 kristaps Exp $ */
+/* $Id: roff.c,v 1.73 2010/05/15 22:28:22 kristaps Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Merry fucking Christmas.
*/
- r->last->end = malloc((size_t)i - ppos + 1);
+ r->last->end = malloc((size_t)(i - ppos) + 1);
if (NULL == r->last->end) {
(*r->msg)(MANDOCERR_MEM, r->data, ln, ppos, NULL);
return(ROFF_ERR);
}
- memcpy(r->last->end, &(*bufp)[ppos], (size_t)i - ppos);
- r->last->end[(size_t)i - ppos] = '\0';
+ memcpy(r->last->end, &(*bufp)[ppos], (size_t)(i - ppos));
+ r->last->end[i - ppos] = '\0';
return(ROFF_IGN);
}