-# $OpenBSD: Makefile,v 1.11 2015/04/06 13:34:54 schwarze Exp $
+# $OpenBSD: Makefile,v 1.12 2017/06/13 19:33:24 schwarze Exp $
-REGRESS_TARGETS = breaking broken empty literal lonelyRE
+REGRESS_TARGETS = an-margin breaking broken empty literal lonelyRE
REGRESS_TARGETS += nested noRE nowidth REarg width
LINT_TARGETS = empty lonelyRE noRE REarg
--- /dev/null
+RS-AN-MARGIN(1) General Commands Manual RS-AN-MARGIN(1)
+
+
+
+N\bNA\bAM\bME\bE
+ RS-an-margin - reStructuredText peeks at an internal register
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ regular text
+ zero indent 168
+ non-zero indent 252
+ back to zero indent 168
+ back to regular text 168
+
+
+
+OpenBSD June 13, 2017 RS-AN-MARGIN(1)
-/* $OpenBSD: man_macro.c,v 1.82 2017/05/05 15:16:25 schwarze Exp $ */
+/* $OpenBSD: man_macro.c,v 1.83 2017/06/13 19:33:24 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
ntok = man->last->tok;
man_unscope(man, nn);
+ if (tok == MAN_RE && nn->head->aux > 0)
+ roff_setreg(man->roff, "an-margin",
+ nn->head->aux, '-');
+
/* Move a trailing paragraph behind the block. */
if (ntok == MAN_LP || ntok == MAN_PP || ntok == MAN_P) {
head = roff_head_alloc(man, line, ppos, tok);
la = *pos;
- if (man_args(man, line, pos, buf, &p))
+ if (man_args(man, line, pos, buf, &p)) {
roff_word_alloc(man, line, la, p);
+ if (tok == MAN_RS) {
+ if (roff_getreg(man->roff, "an-margin") == 0)
+ roff_setreg(man->roff, "an-margin",
+ 7 * 24, '=');
+ if ((head->aux = strtod(p, NULL) * 24.0) > 0)
+ roff_setreg(man->roff, "an-margin",
+ head->aux, '+');
+ }
+ }
if (buf[*pos] != '\0')
mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse, line,