From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13790 invoked from network); 12 Jan 2022 04:54:36 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 12 Jan 2022 04:54:36 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 0cc099e3 for ; Tue, 11 Jan 2022 23:54:35 -0500 (EST) Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id 3eec7475 for ; Tue, 11 Jan 2022 23:54:35 -0500 (EST) Date: Tue, 11 Jan 2022 23:54:35 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: More accurately represent cells containing horizontal lines in X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <3363fd1e36f122a4@mandoc.bsd.lv> Log Message: ----------- More accurately represent cells containing horizontal lines in -T tree output. In particular, do not represent "_" as "-", and distinguish "_" from "\_" and "=" from "\=". Output tweak following a related question from Ted Bullock . Modified Files: -------------- mandoc: tree.c Revision Data ------------- Index: tree.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/tree.c,v retrieving revision 1.91 retrieving revision 1.92 diff -Ltree.c -Ltree.c -u -p -r1.91 -r1.92 --- tree.c +++ tree.c @@ -1,7 +1,7 @@ /* $Id$ */ /* * Copyright (c) 2008, 2009, 2011, 2014 Kristaps Dzonsons - * Copyright (c) 2013-2015, 2017-2021 Ingo Schwarze + * Copyright (c) 2013-2015, 2017-2022 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -509,12 +509,16 @@ print_span(const struct tbl_span *sp, in putchar('x'); } switch (dp->pos) { - case TBL_DATA_HORIZ: case TBL_DATA_NHORIZ: - putchar('-'); + putchar('\\'); + /* FALLTHROUGH */ + case TBL_DATA_HORIZ: + putchar('_'); break; - case TBL_DATA_DHORIZ: case TBL_DATA_NDHORIZ: + putchar('\\'); + /* FALLTHROUGH */ + case TBL_DATA_DHORIZ: putchar('='); break; default: -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv