makedoc: Promote "EXAMPLE" to introducing a subsection
Commit Message
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(-)
@@ -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
;