aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/interp/ChangeLog5
-rw-r--r--src/interp/c-doc.boot.pamphlet14
2 files changed, 18 insertions, 1 deletions
diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog
index 37b13828..14955f59 100644
--- a/src/interp/ChangeLog
+++ b/src/interp/ChangeLog
@@ -1,5 +1,10 @@
2007-10-22 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * c-doc.boot.pamphlet (escapePercent): New.
+ (transformAndRecheckComments): Use it.
+
+2007-10-22 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* br-data.boot.pamphlet (getImports): Rename `import' to `doImport'.
* define.boot.pamphlet (hasSigInTargetCategory): Pretty-print
signature in diagnostics.
diff --git a/src/interp/c-doc.boot.pamphlet b/src/interp/c-doc.boot.pamphlet
index d1d0949c..e697614b 100644
--- a/src/interp/c-doc.boot.pamphlet
+++ b/src/interp/c-doc.boot.pamphlet
@@ -270,13 +270,25 @@ checkExtractItemList l == --items are separated by commas or end of line
-- if (t := trimString SUBSTRING(string,i,k-i)) ^= '"" then acc := [t,:acc]
-- acc
+++ Translate '%' in signature to '%%' for proper printing.
+escapePercent x ==
+ x is [y, :z] =>
+ y1 := escapePercent y
+ z1 := escapePercent z
+ EQ(y, y1) and EQ(z, z1) => x
+ [y1, :z1]
+ x = "%" => "%%"
+ x
+
transformAndRecheckComments(name,lines) ==
$checkingXmptex? := false
$x : local := name
$name : local := 'GlossaryPage
$origin : local := 'gloss
$recheckingFlag : local := false
- $exposeFlagHeading : local := ['"--------",name,'"---------"]
+ $exposeFlagHeading : local :=
+ atom name => ['" -- ",name]
+ concat('" --",formatOpSignature(name.0, escapePercent name.1))
if null $exposeFlag then sayBrightly $exposeFlagHeading
u := checkComments(name,lines)
$recheckingFlag := true