summaryrefslogtreecommitdiffstatshomepage
path: root/term.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-02 17:14:46 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-02 17:14:46 +0000
commit162ce81d3a61862bea3503763f631cf91bd28023 (patch)
treec48fa77b4506ea1d073a0f402c7d2c5b0f0754f4 /term.h
parentc6e959568733601f6b74e21b18a4243e63f53f3b (diff)
downloadmandoc-162ce81d3a61862bea3503763f631cf91bd28023.tar.gz
mandoc-162ce81d3a61862bea3503763f631cf91bd28023.tar.zst
mandoc-162ce81d3a61862bea3503763f631cf91bd28023.zip
Added new old escape sequence \*[nn].
Initial correct .Bd support (still only text in literal displays). Symbols put into tables (character-encoding).
Diffstat (limited to 'term.h')
-rw-r--r--term.h50
1 files changed, 48 insertions, 2 deletions
diff --git a/term.h b/term.h
index 48162221..df7dd545 100644
--- a/term.h
+++ b/term.h
@@ -1,4 +1,4 @@
-/* $Id: term.h,v 1.13 2009/03/02 12:09:32 kristaps Exp $ */
+/* $Id: term.h,v 1.14 2009/03/02 17:14:46 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -25,6 +25,50 @@
__BEGIN_DECLS
+enum tsym {
+ TERMSYM_RBRACK = 0,
+ TERMSYM_LBRACK = 1,
+ TERMSYM_LARROW = 2,
+ TERMSYM_RARROW = 3,
+ TERMSYM_UARROW = 4,
+ TERMSYM_DARROW = 5,
+ TERMSYM_LSQUOTE = 6,
+ TERMSYM_RSQUOTE = 7,
+ TERMSYM_SQUOTE = 8,
+ TERMSYM_LDQUOTE = 9,
+ TERMSYM_RDQUOTE = 10,
+ TERMSYM_DQUOTE = 11,
+ TERMSYM_LT = 12,
+ TERMSYM_GT = 13,
+ TERMSYM_LE = 14,
+ TERMSYM_GE = 15,
+ TERMSYM_EQ = 16,
+ TERMSYM_NEQ = 17,
+ TERMSYM_ACUTE = 18,
+ TERMSYM_GRAVE = 19,
+ TERMSYM_PI = 20,
+ TERMSYM_PLUSMINUS = 21,
+ TERMSYM_INF = 22,
+ TERMSYM_INF2 = 23,
+ TERMSYM_NAN = 24,
+ TERMSYM_BAR = 25,
+ TERMSYM_BULLET = 26,
+ TERMSYM_AMP = 27,
+};
+
+
+enum tstyle {
+ TERMSTYLE_CLEAR = 0,
+ TERMSTYLE_BOLD = 1,
+ TERMSTYLE_UNDER = 2,
+ TERMSTYLE_MAX = 3
+};
+
+struct termsym {
+ const char *sym;
+ size_t sz;
+};
+
struct termp {
size_t rmargin;
size_t maxrmargin;
@@ -41,6 +85,8 @@ struct termp {
#define TERMP_IGNDELIM (1 << 6) /* Delims like regulars. */
#define TERMP_NONOSPACE (1 << 7) /* No space (no autounset). */
char *buf;
+ struct termsym *symtab; /* Special-symbol table. */
+ struct termsym *styletab; /* Style table. */
};
struct termpair {
@@ -78,11 +124,11 @@ void word(struct termp *, const char *);
void flushln(struct termp *);
void transcode(struct termp *,
const char *, size_t);
-
void subtree(struct termp *,
const struct mdoc_meta *,
const struct mdoc_node *);
+
const struct termact *termacts;
__END_DECLS