[PATCH] Proposed: kill off "right-brace" warning category

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <20251107100751.ck5ha77gnzb4e4v2@illithid>
I forgot the attachment in my previous message, of course.

Regards,
Branden
kill-off-right-brace-warning-category.diff (text/x-diff, 2.7 KB)
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index bc3c24e56..f993bffbd 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -19380,12 +19380,6 @@ @node Warnings
 A tab character was encountered where a number was expected, or appeared
 in an unquoted macro argument.
 
-@item right-brace
-@itemx 4096
-@cindex @code{\@}}, and warnings
-A right brace escape sequence @code{\@}} was encountered where a number
-was expected.
-
 @item missing
 @itemx 8192
 A request was invoked with a mandatory argument absent.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 0f13f369b..504cd03d4 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -10245,7 +10245,6 @@ static struct warning_category {
   { "number", WARN_NUMBER },
   { "syntax", WARN_SYNTAX },
   { "tab", WARN_TAB },
-  { "right-brace", WARN_RIGHT_BRACE },
   { "missing", WARN_MISSING },
   { "input", WARN_INPUT },
   { "escape", WARN_ESCAPE },
diff --git a/src/roff/troff/number.cpp b/src/roff/troff/number.cpp
index f17629d23..39c85649a 100644
--- a/src/roff/troff/number.cpp
+++ b/src/roff/troff/number.cpp
@@ -245,16 +245,11 @@ static bool is_valid_expression_start()
     warning(WARN_MISSING, "numeric expression missing");
     return false;
   }
-  if (tok.is_tab()) {
-    warning(WARN_TAB, "expected numeric expression, got %1",
+  if (tok.is_tab() || tok.is_right_brace()) {
+    warning(WARN_SYNTAX, "expected numeric expression, got %1",
 	    tok.description());
     return false;
   }
-  if (tok.is_right_brace()) {
-    warning(WARN_RIGHT_BRACE, "expected numeric expression, got right"
-	    " brace escape sequence");
-    return false;
-  }
   return true;
 }
 
diff --git a/src/roff/troff/troff.1.man b/src/roff/troff/troff.1.man
index 0db50aa97..ccfd16748 100644
--- a/src/roff/troff/troff.1.man
+++ b/src/roff/troff/troff.1.man
@@ -572,7 +572,7 @@ .SH Warnings
 _
 0@1@char@10@1024@reg
 1@2@number@11@2048@tab
-2@4@break@12@4096@right\-brace
+2@4@break@12@4096@\fIunused\fP
 3@8@delim@13@8192@missing
 4@16@\fIunused\fP@14@16384@input
 5@32@scale@15@32768@escape
@@ -781,14 +781,6 @@ .SH Warnings
 .
 .
 .sp \n[PD]u
-right\-brace	4096	T{
-A right brace escape sequence
-.B \[rs]}
-was encountered where a number was expected.
-T}
-.
-.
-.sp \n[PD]u
 scale	32	T{
 A scaling unit inappropriate to its context was used in a numeric
 expression.
diff --git a/src/roff/troff/troff.h b/src/roff/troff/troff.h
index 4fb234c5a..2cd273288 100644
--- a/src/roff/troff/troff.h
+++ b/src/roff/troff/troff.h
@@ -59,7 +59,7 @@ enum warning_type {
   WARN_MAC = 01000,
   WARN_REG = 02000,
   WARN_TAB = 04000,
-  WARN_RIGHT_BRACE = 010000,
+  //WARN_RIGHT_BRACE = 010000,
   WARN_MISSING = 020000,
   WARN_INPUT = 040000,
   WARN_ESCAPE = 0100000,
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmkNxPcACgkQ0Z6cfXEm
bc6/xQ//WcVM4BElleqlzbWYDl3up96svb8K3WpMohSL0d3UFHqJiKuudlZWChuV
cEwZt2UJLaVPjwWK3mV7LPc+jkM0FOGh65wiFltVAfETsRETogVL8YZbqqZ9XoVs
+LTzrq+45QA1zfCyfbDfE/TWXVgi0G57lmOLUD+08AqUnXZxoKd85bBQ8gBXl/P8
dgu701/RCJfrW/40yk+1S5v2nbolcDKrhziFD/LMC/zYmBAWKF9VvZO5GS6ARFrg
FJX+Y843GeoWSVy48Oi6ogWELNW9o89KEDr/9lul7YCb3VmLaw7/6MjyczeATrH2
TldFS/4SyF9tPk2iPIvojjrS3pqMSgiJ6EpoXmnPcDajspiRnntv/JH24EhmWQ01
vibTBF/toegRD3QWwWTBy3WZOI0u+bNLYUffiycCo3VPq1GKv5vAjkhqD1QGNTwI
+zRhDIT5aCMTBJMmSgbLQZPixmk30jJZxYos4hX+GevYCPHn4AkILnA64WJxcNOV
hQLOh1stSDcEpjLH9u+H1DJvtMIn4GpHd+Kqc3vxPXyxTXEis+ZJXA+hamgQd5Wy
yg24+/YmMGDvqmSIyGCcL3VNQGHm9xSiEFMDtrrP0oTcl3gLA6BpnYpC1I5RfiR6
DpWFjF66m7kT11asLiDEaPOgElVf0gVIGlr4Y3JS52cB81Xx4Bw=
=Vfff
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.