source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Add comments to some of the enum roff_tok values; particularly
@ 2022-04-30 15:09 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2022-04-30 15:09 UTC (permalink / raw)
  To: source

Log Message:
-----------
Add comments to some of the enum roff_tok values;
particularly useful for values that have non-obvious semantics
like ROFF_MAX, ROFF_cblock, ROFF_RENAMED, and TOKEN_NONE;
no code change.

Modified Files:
--------------
    mandoc:
        roff.h

Revision Data
-------------
Index: roff.h
===================================================================
RCS file: /home/cvs/mandoc/mandoc/roff.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -Lroff.h -Lroff.h -u -p -r1.74 -r1.75
--- roff.h
+++ roff.h
@@ -1,6 +1,6 @@
 /* $Id$	*/
 /*
- * Copyright (c) 2013-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2013-2015,2017-2020,2022 Ingo Schwarze <schwarze@openbsd.org>
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -71,7 +71,7 @@ enum	roff_type {
 };
 
 enum	roff_tok {
-	ROFF_br = 0,
+	ROFF_br = 0,	/* Beginning of roff(7) requests. */
 	ROFF_ce,
 	ROFF_fi,
 	ROFF_ft,
@@ -83,8 +83,8 @@ enum	roff_tok {
 	ROFF_sp,
 	ROFF_ta,
 	ROFF_ti,
-	ROFF_MAX,
-	ROFF_ab,
+	ROFF_MAX,	/* End of requests that generate nodes. */
+	ROFF_ab,	/* Requests only used during preprocessing. */
 	ROFF_ad,
 	ROFF_af,
 	ROFF_aln,
@@ -313,11 +313,11 @@ enum	roff_tok {
 	ROFF_writec,
 	ROFF_writem,
 	ROFF_xflag,
-	ROFF_cblock,
-	ROFF_RENAMED,
-	ROFF_USERDEF,
-	TOKEN_NONE,
-	MDOC_Dd,
+	ROFF_cblock,	/* Block end marker "..". */
+	ROFF_RENAMED,	/* New name of a renamed request or macro. */
+	ROFF_USERDEF,	/* User defined macro. */
+	TOKEN_NONE,	/* Undefined macro or text/tbl/eqn/comment node. */
+	MDOC_Dd,	/* Beginning of mdoc(7) macros. */
 	MDOC_Dt,
 	MDOC_Os,
 	MDOC_Sh,
@@ -438,8 +438,8 @@ enum	roff_tok {
 	MDOC__U,
 	MDOC_Ta,
 	MDOC_Tg,
-	MDOC_MAX,
-	MAN_TH,
+	MDOC_MAX,	/* End of mdoc(7) macros. */
+	MAN_TH,		/* Beginning of man(7) macros. */
 	MAN_SH,
 	MAN_SS,
 	MAN_TP,
@@ -476,7 +476,7 @@ enum	roff_tok {
 	MAN_UE,
 	MAN_MT,
 	MAN_ME,
-	MAN_MAX
+	MAN_MAX		/* End of man(7) macros. */
 };
 
 /*
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-30 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30 15:09 mandoc: Add comments to some of the enum roff_tok values; particularly schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).