summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-06-11 12:55:30 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-06-11 12:55:30 +0000
commit1ccc7deff941fab7a5f5bdeb0b7de714ec084ff8 (patch)
treed595aac4ff87f3f639f0db01d8c2fff66fc8558e /mdoc_term.c
parent5f01cd9971ff702a524ae0b46f692bf67ec2486e (diff)
downloadmandoc-1ccc7deff941fab7a5f5bdeb0b7de714ec084ff8.tar.gz
Added "left" -offset tag.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 942c5fc4..9d6f3d1f 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -86,10 +86,10 @@ struct termpair {
struct termpair *ppair;
int type;
#define TERMPAIR_FLAG (1 << 0)
- int flag;
- size_t offset;
- size_t rmargin;
- int count;
+ int flag; /* Whether being used. */
+ size_t offset; /* Left margin. */
+ size_t rmargin; /* Right margin. */
+ int count; /* Enum count. */
};
#define TERMPAIR_SETFLAG(termp, p, fl) \
@@ -602,10 +602,14 @@ arg_offset(const struct mdoc_argv *arg)
{
assert(*arg->value);
+ if (0 == strcmp(*arg->value, "left"))
+ return(0);
if (0 == strcmp(*arg->value, "indent"))
return(INDENT);
if (0 == strcmp(*arg->value, "indent-two"))
return(INDENT * 2);
+
+ /* FIXME: needs to support field-widths (10n, etc.). */
return(strlen(*arg->value));
}