-# $OpenBSD: Makefile,v 1.7 2015/01/01 09:06:39 schwarze Exp $
+# $OpenBSD: Makefile,v 1.8 2015/01/07 12:19:17 schwarze Exp $
-REGRESS_TARGETS = append escname factorial indir startde TH Dd
+REGRESS_TARGETS = append cond escname factorial indir startde TH Dd
LINT_TARGETS = escname indir
.include <bsd.regress.mk>
--- /dev/null
+.Dd January 7, 2015
+.Dt DE-COND 1
+.Os OpenBSD
+.Sh NAME
+.Nm de-cond
+.Nd conditional execution of a user-defined macro
+.Sh DESCRIPTION
+.de mym
+This is the text printed by the macro.
+..
+preceding text
+.if n .mym
+following text
--- /dev/null
+DE-COND(1) General Commands Manual DE-COND(1)
+
+N\bNA\bAM\bME\bE
+ d\bde\be-\b-c\bco\bon\bnd\bd - conditional execution of a user-defined macro
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ preceding text This is the text printed by the macro. following text
+
+OpenBSD January 7, 2015 OpenBSD
-/* $OpenBSD: roff.c,v 1.119 2015/01/01 19:28:29 schwarze Exp $ */
+/* $OpenBSD: roff.c,v 1.120 2015/01/07 12:19:17 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
buf->buf = n1;
if (buf->sz == 0)
buf->sz = strlen(buf->buf) + 1;
+ *offs = 0;
return(buf->sz > 1 && buf->buf[buf->sz - 2] == '\n' ?
ROFF_REPARSE : ROFF_APPEND);