aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--TODO5
-rw-r--r--roff.78
-rw-r--r--roff_term.c11
-rw-r--r--roff_validate.c10
4 files changed, 19 insertions, 15 deletions
diff --git a/TODO b/TODO
index ef213c6a..fc1d3ad7 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,6 @@
************************************************************************
* Official mandoc TODO.
-* $Id: TODO,v 1.259 2018/08/10 04:41:25 schwarze Exp $
+* $Id: TODO,v 1.260 2018/08/10 20:40:45 schwarze Exp $
************************************************************************
Many issues are annotated for difficulty as follows:
@@ -38,9 +38,6 @@ are mere guesses, and some may be wrong.
--- missing roff features ----------------------------------------------
-- .ft CB selects constant-width bold font
- see groff_out(7) for examples
-
- \*(.T prints the device being used,
see groff_char(7) for an example
diff --git a/roff.7 b/roff.7
index f079c28c..ca692457 100644
--- a/roff.7
+++ b/roff.7
@@ -1,4 +1,4 @@
-.\" $Id: roff.7,v 1.97 2018/08/10 04:41:25 schwarze Exp $
+.\" $Id: roff.7,v 1.98 2018/08/10 20:40:45 schwarze Exp $
.\"
.\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -922,15 +922,15 @@ The following
.Ar font
arguments are supported:
.Bl -tag -width 4n -offset indent
-.It Cm B , BI , 3 , 4
+.It Cm B , BI , CB , 3 , 4
switches to
.Sy bold
font
-.It Cm I , 2
+.It Cm I , CI , 2
switches to
.Em underlined
font
-.It Cm R , CW , 1
+.It Cm R , CR , CW , 1
switches to normal font
.It Cm P No "or no argument"
switches back to the previous font
diff --git a/roff_term.c b/roff_term.c
index b5ec7649..ba673307 100644
--- a/roff_term.c
+++ b/roff_term.c
@@ -1,6 +1,6 @@
-/* $Id: roff_term.c,v 1.14 2017/06/24 14:38:33 schwarze Exp $ */
+/* $Id: roff_term.c,v 1.15 2018/08/10 20:40:45 schwarze Exp $ */
/*
- * Copyright (c) 2010, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010,2014,2015,2017,2018 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
@@ -111,7 +111,12 @@ roff_term_pre_ce(ROFF_TERM_ARGS)
static void
roff_term_pre_ft(ROFF_TERM_ARGS)
{
- switch (*n->child->string) {
+ const char *cp;
+
+ if (*(cp = n->child->string) == 'C')
+ cp++;
+
+ switch (*cp) {
case '4':
case '3':
case 'B':
diff --git a/roff_validate.c b/roff_validate.c
index 801e9314..6a76a1fb 100644
--- a/roff_validate.c
+++ b/roff_validate.c
@@ -1,6 +1,6 @@
-/* $Id: roff_validate.c,v 1.9 2017/06/14 22:51:25 schwarze Exp $ */
+/* $Id: roff_validate.c,v 1.10 2018/08/10 20:40:45 schwarze Exp $ */
/*
- * Copyright (c) 2010, 2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010, 2017, 2018 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
@@ -18,6 +18,7 @@
#include <assert.h>
#include <stddef.h>
+#include <string.h>
#include "mandoc.h"
#include "roff.h"
@@ -58,7 +59,7 @@ roff_validate(struct roff_man *man)
static void
roff_valid_ft(ROFF_VALID_ARGS)
{
- char *cp;
+ const char *cp;
if (n->child == NULL) {
man->next = ROFF_NEXT_CHILD;
@@ -84,7 +85,8 @@ roff_valid_ft(ROFF_VALID_ARGS)
return;
break;
case 'C':
- if (cp[1] == 'W' && cp[2] == '\0')
+ if (cp[1] != '\0' && cp[2] == '\0' &&
+ strchr("BIRW", cp[1]) != NULL)
return;
break;
default: