=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/tbl_data.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- src/usr.bin/mandoc/tbl_data.c 2015/01/28 15:02:25 1.22 +++ src/usr.bin/mandoc/tbl_data.c 2015/01/28 17:30:37 1.23 @@ -1,4 +1,4 @@ -/* $OpenBSD: tbl_data.c,v 1.22 2015/01/28 15:02:25 schwarze Exp $ */ +/* $OpenBSD: tbl_data.c,v 1.23 2015/01/28 17:30:37 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2015 Ingo Schwarze @@ -62,8 +62,8 @@ */ if (NULL == cp) { - mandoc_msg(MANDOCERR_TBLEXTRADAT, tbl->parse, - ln, *pos, NULL); + mandoc_msg(MANDOCERR_TBLDATA_EXTRA, tbl->parse, + ln, *pos, p + *pos); /* Skip to the end... */ while (p[*pos]) (*pos)++; @@ -129,8 +129,8 @@ TBL_CELL_DHORIZ == dat->layout->pos || TBL_CELL_DOWN == dat->layout->pos) if (TBL_DATA_DATA == dat->pos && '\0' != *dat->string) - mandoc_msg(MANDOCERR_TBLIGNDATA, - tbl->parse, ln, sv, NULL); + mandoc_msg(MANDOCERR_TBLDATA_SPAN, + tbl->parse, ln, sv, dat->string); return; } @@ -161,16 +161,16 @@ dat->pos = TBL_DATA_DATA; if (dat->string) { - sz = strlen(p) + strlen(dat->string) + 2; + sz = strlen(p + pos) + strlen(dat->string) + 2; dat->string = mandoc_realloc(dat->string, sz); (void)strlcat(dat->string, " ", sz); - (void)strlcat(dat->string, p, sz); + (void)strlcat(dat->string, p + pos, sz); } else - dat->string = mandoc_strdup(p); + dat->string = mandoc_strdup(p + pos); if (TBL_CELL_DOWN == dat->layout->pos) - mandoc_msg(MANDOCERR_TBLIGNDATA, tbl->parse, - ln, pos, NULL); + mandoc_msg(MANDOCERR_TBLDATA_SPAN, tbl->parse, + ln, pos, dat->string); return(0); }