aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-10 12:53:07 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-10 12:53:07 +0000
commitf313579fbb5a5318367521793dc24d2567da2fde (patch)
tree59f0ec418ab638218374512a8cc78a4cde422b54 /roff.h
parentc8505d9515e240b816d67a5b4a08ccfd4268cb6a (diff)
downloadmandoc-f313579fbb5a5318367521793dc24d2567da2fde.tar.gz
mandoc-f313579fbb5a5318367521793dc24d2567da2fde.tar.zst
mandoc-f313579fbb5a5318367521793dc24d2567da2fde.zip
Introduce flags NODE_NOSRC and NODE_NOPRT for AST nodes.
Use them to mark generated nodes and nodes that shall not produce output. Let -Ttree output mode display these new flags. Use NODE_NOSRC for .Ar, .Mt, and .Pa default arguments. Use NODE_NOPRT for .Dd, .Dt, and .Os. These will help to make handling of text production macros more rigorous.
Diffstat (limited to 'roff.h')
-rw-r--r--roff.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/roff.h b/roff.h
index 19ec50f4..783e5daa 100644
--- a/roff.h
+++ b/roff.h
@@ -1,7 +1,7 @@
-/* $OpenBSD$ */
+/* $Id: roff.h,v 1.38 2017/01/10 12:53:08 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -109,6 +109,8 @@ struct roff_node {
#define MAN_VALID MDOC_VALID
#define MAN_EOS MDOC_EOS
#define MAN_LINE MDOC_LINE
+#define NODE_NOSRC (1 << 8) /* Generated node, not in input file. */
+#define NODE_NOPRT (1 << 9) /* Shall not print anything. */
int prev_font; /* Before entering this node. */
int aux; /* Decoded node data, type-dependent. */
enum roff_type type; /* AST node type. */