source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Add comments to some of the enum roff_tok values; particularly
Date: Sat, 30 Apr 2022 10:09:56 -0500 (EST)	[thread overview]
Message-ID: <33651ae8eb3b03ff@mandoc.bsd.lv> (raw)

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


                 reply	other threads:[~2022-04-30 15:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=33651ae8eb3b03ff@mandoc.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).