-# $OpenBSD: Makefile,v 1.13 2017/06/03 15:54:09 schwarze Exp $
+# $OpenBSD: Makefile,v 1.14 2017/06/17 16:47:29 schwarze Exp $
-REGRESS_TARGETS = badarg broken double eof fill literal longhead
+REGRESS_TARGETS = badarg broken double eof fill indent literal longhead
REGRESS_TARGETS += macrotag manyargs sameline spacing width
LINT_TARGETS = broken double eof
--- /dev/null
+.TH TP-INDENT 1 "June 17, 2017" OpenBSD
+.SH NAME
+TP-indent \- indent request inside TP head
+.SH DESCRIPTION
+initial text
+.TP 2n
+tag
+indented
+.TP 8n
+.in 3n
+tag
+indented
+.PP
+final text
--- /dev/null
+TP-INDENT(1) General Commands Manual TP-INDENT(1)
+
+
+
+N\bNA\bAM\bME\bE
+ TP-indent - indent request inside TP head
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ initial text
+
+ tag
+ indented
+
+ tag indented
+
+ final text
+
+
+
+OpenBSD June 17, 2017 TP-INDENT(1)
-/* $OpenBSD: man_macro.c,v 1.83 2017/06/13 19:33:24 schwarze Exp $ */
+/* $OpenBSD: man_macro.c,v 1.84 2017/06/17 16:47:29 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
{ in_line_eoln, 0 }, /* UC */
{ in_line_eoln, MAN_NSCOPED }, /* PD */
{ in_line_eoln, 0 }, /* AT */
- { in_line_eoln, 0 }, /* in */
+ { in_line_eoln, MAN_NSCOPED }, /* in */
{ in_line_eoln, 0 }, /* OP */
{ in_line_eoln, MAN_BSCOPE }, /* EX */
{ in_line_eoln, MAN_BSCOPE }, /* EE */
-/* $OpenBSD: man_validate.c,v 1.99 2017/06/11 19:36:31 schwarze Exp $ */
+/* $OpenBSD: man_validate.c,v 1.100 2017/06/17 16:47:29 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
static void post_AT(CHKARGS);
static void post_IP(CHKARGS);
-static void post_vs(CHKARGS);
static void post_OP(CHKARGS);
static void post_TH(CHKARGS);
static void post_UC(CHKARGS);
static void post_UR(CHKARGS);
+static void post_in(CHKARGS);
+static void post_vs(CHKARGS);
static const v_check __man_valids[MAN_MAX - MAN_TH] = {
post_TH, /* TH */
post_UC, /* UC */
NULL, /* PD */
post_AT, /* AT */
- NULL, /* in */
+ post_in, /* in */
post_OP, /* OP */
NULL, /* EX */
NULL, /* EE */
man->meta.os = mandoc_strdup(p);
}
+static void
+post_in(CHKARGS)
+{
+ char *s;
+
+ if (n->parent->tok != MAN_TP ||
+ n->parent->type != ROFFT_HEAD ||
+ n->child == NULL ||
+ *n->child->string == '+' ||
+ *n->child->string == '-')
+ return;
+ mandoc_asprintf(&s, "+%s", n->child->string);
+ free(n->child->string);
+ n->child->string = s;
+}
+
static void
post_vs(CHKARGS)
{