source@mandoc.bsd.lv
 help / color / Atom feed
* mandoc: When autogenerating one layout cell from a data cell just beyond 
@ 2020-01-11 20:48 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2020-01-11 20:48 UTC (permalink / raw)
  To: source

Log Message:
-----------
When autogenerating one layout cell from a data cell just beyond the 
last layout cell that was explicitly specified, properly initialize
the spacing attribute to indicate that the default is to be used.
Failing to do so and leaving the spacing at zero in this case caused
misformatting when another row further down the table had even more
explicitly specified cells.
Bug found while trying to write regression tests for tbl_term.c rev. 1.73.

Modified Files:
--------------
    mandoc:
        tbl_data.c

Revision Data
-------------
Index: tbl_data.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/tbl_data.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -Ltbl_data.c -Ltbl_data.c -u -p -r1.52 -r1.53
--- tbl_data.c
+++ tbl_data.c
@@ -21,6 +21,7 @@
 
 #include <assert.h>
 #include <ctype.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -73,6 +74,7 @@ getdata(struct tbl_node *tbl, struct tbl
 		if (dp->layout->last->col + 1 < dp->opts->cols) {
 			cp = mandoc_calloc(1, sizeof(*cp));
 			cp->pos = TBL_CELL_LEFT;
+			cp->spacing = SIZE_MAX;
 			dp->layout->last->next = cp;
 			cp->col = dp->layout->last->col + 1;
 			dp->layout->last = cp;
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-11 20:48 mandoc: When autogenerating one layout cell from a data cell just beyond schwarze

source@mandoc.bsd.lv

Archives are clonable: git clone --mirror http://inbox.vuxu.org/mandoc-source

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.source


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git