summaryrefslogtreecommitdiffstatshomepage
path: root/man_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-17 14:38:34 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-17 14:38:34 +0000
commit0587ad80d46d89f36315c37bbd67cf8899708b8d (patch)
treef6e1521213cb40a637bdb175e43f121249534ba3 /man_term.c
parent79f16537cd09bc054f9d18169708d63030803d98 (diff)
downloadmandoc-0587ad80d46d89f36315c37bbd67cf8899708b8d.tar.gz
mandoc-0587ad80d46d89f36315c37bbd67cf8899708b8d.tar.zst
mandoc-0587ad80d46d89f36315c37bbd67cf8899708b8d.zip
Add mode for -Tlocale. This mode, with this commit, behaves exactly
like -Tascii. While adding this, inline term_alloc() (was a one-liner), remove some switches around the terminal encoding for the symbol table (unnecessary), and split out ascii_alloc() into ascii_init(), which is also called from locale_init().
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/man_term.c b/man_term.c
index 2fcf8b46..38ceeabd 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.108 2011/04/30 22:14:42 kristaps Exp $ */
+/* $Id: man_term.c,v 1.109 2011/05/17 14:38:34 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -156,14 +156,7 @@ terminal_man(void *arg, const struct man *man)
p->tabwidth = term_len(p, 5);
if (NULL == p->symtab)
- switch (p->enc) {
- case (TERMENC_ASCII):
- p->symtab = mchars_alloc();
- break;
- default:
- abort();
- /* NOTREACHED */
- }
+ p->symtab = mchars_alloc();
n = man_node(man);
m = man_meta(man);