makedoc: Fix fall-through in [c11ce7feaa3e]
authorRocco Rutte <pdmef@gmx.net>
Sun, 31 Aug 2008 19:12:19 +0000 (21:12 +0200)
committerRocco Rutte <pdmef@gmx.net>
Sun, 31 Aug 2008 19:12:19 +0000 (21:12 +0200)
doc/makedoc.c

index 01ad814669a250feaa5161da9b1db22c5dfbcff4..a35de980cac93540d57aee8fc33c6db13ddf760c 100644 (file)
@@ -600,12 +600,14 @@ static int sgml_fputc (int c, FILE *out, int full)
 {
   switch (c)
   {
+    /* the bare minimum for escaping */
     case '<': return fputs ("&lt;", out);
     case '>': return fputs ("&gt;", out);
+    case '&': return fputs ("&amp;", out);
+    /* map to entities, fall-through to raw if !full */
     case '$': if (full) return fputs ("&dollar;", out);
     case '_': if (full) return fputs ("&lowbar;", out);
     case '%': if (full) return fputs ("&percnt;", out);
-    case '&': return fputs ("&amp;", out);
     case '\\': if (full) return fputs ("&bsol;", out);
     case '"': if (full) return fputs ("&quot;", out);
     case '[': if (full) return fputs ("&lsqb;", out);