aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/chars.in
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-22 20:58:39 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-22 20:58:39 +0000
commita5cf99ba0ce655c79f97727aa85c3afd804f98c9 (patch)
treee92a3c2a62fc2c363af2ca9c2aa16c0bcb34c80f /chars.in
parentfbfac7f409fc3e746d03f0beb37e36723d353e48 (diff)
downloadmandoc-a5cf99ba0ce655c79f97727aa85c3afd804f98c9.tar.gz
mandoc-a5cf99ba0ce655c79f97727aa85c3afd804f98c9.tar.zst
mandoc-a5cf99ba0ce655c79f97727aa85c3afd804f98c9.zip
Implement the \: (optional line break) escape sequence,
documented in the Ossanna-Kernighan-Ritter troff manual and also supported by groff. Missing feature reported by Steffen Nurpmeso <sdaoden at gmail dot com>.
Diffstat (limited to 'chars.in')
-rw-r--r--chars.in20
1 files changed, 12 insertions, 8 deletions
diff --git a/chars.in b/chars.in
index cc6549e7..5c686ff0 100644
--- a/chars.in
+++ b/chars.in
@@ -1,6 +1,7 @@
-/* $Id: chars.in,v 1.43 2013/06/20 22:39:30 schwarze Exp $ */
+/* $Id: chars.in,v 1.44 2014/01/22 20:58:39 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -27,22 +28,25 @@
* XXX - update LINES_MAX if adding more!
*/
-/* Non-breaking, non-collapsing space uses unit separator. */
+/* Special break control characters. */
static const char ascii_nbrsp[2] = { ASCII_NBRSP, '\0' };
+static const char ascii_break[2] = { ASCII_BREAK, '\0' };
CHAR_TBL_START
/* Spacing. */
-CHAR("c", "", 0)
-CHAR("0", " ", 8194)
CHAR(" ", ascii_nbrsp, 160)
CHAR("~", ascii_nbrsp, 160)
-CHAR("%", "", 0)
-CHAR("&", "", 0)
-CHAR("^", "", 0)
+CHAR("0", " ", 8194)
CHAR("|", "", 0)
-CHAR("}", "", 0)
+CHAR("^", "", 0)
+CHAR("&", "", 0)
+CHAR("%", "", 0)
+CHAR(":", ascii_break, 0)
+/* XXX The following three do not really belong into this file. */
CHAR("t", "", 0)
+CHAR("c", "", 0)
+CHAR("}", "", 0)
/* Accents. */
CHAR("a\"", "\"", 779)