[PATCH] makedoc: Promote "EXAMPLE" to introducing a subsection
Jon Turney <[email protected]> Fri, 19 Jun 2026 14:57:12 +0100
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Handle "EXAMPPLE" as introducing an "Example" subsection (of which
there's only one instance presently, in wcwidth).
Retain the existing behaviour of the unused "CODE_FRAGMENT".
---
Notes:
Future work: "EXAMPLE" is presently ignored in makedocbook, which also
needs to be fixed.
newlib/doc/doc.str | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/newlib/doc/doc.str b/newlib/doc/doc.str
index 52d41f245..dccbfa418 100644
--- a/newlib/doc/doc.str
+++ b/newlib/doc/doc.str
@@ -23,20 +23,17 @@
skip_past_newline
;
-: EXAMPLE
- skip_past_newline
-
- get_stuff_in_command nokill_bogus_lines translatecomments
- courierize catstr
-
- ;
-
: INODE
"@node " catstr skip_past_newline copy_past_newline catstr
;
+- differs from bodytext in that this just courierizes, so content appears more
+- literally (doen't apply bulletize or do_fancy_stuff)
: CODE_FRAGMENT
- EXAMPLE
+ skip_past_newline
+ get_stuff_in_command nokill_bogus_lines translatecomments
+ courierize
+ catstr
;
: SYNOPSIS
@@ -144,6 +141,11 @@
: NOTES
"@strong{Notes}@*\n" catstr subhead ;
+: EXAMPLE
+ "@strong{Example}@*\n" catstr
+ CODE_FRAGMENT
+ ;
+
: INTERNAL_FUNCTION
;
--
2.51.0