static void handle_confline (char *, FILE *);
static void makedoc (FILE *, FILE *);
static void pretty_default (char *, size_t, const char *, int);
-static int sgml_fputc (int, FILE *, int);
-static int sgml_fputs (const char *, FILE *, int);
+static int sgml_fputc (int, FILE *);
+static int sgml_fputs (const char *, FILE *);
static int sgml_id_fputs (const char *, FILE *);
int main (int argc, char *argv[])
if (*v < ' ' || *v & 0x80)
{
char_to_escape (buff, (unsigned int) *v);
- sgml_fputs (buff, out, 1);
+ sgml_fputs (buff, out);
continue;
}
- sgml_fputc ((unsigned int) *v, out, 1);
+ sgml_fputc ((unsigned int) *v, out);
}
}
-static int sgml_fputc (int c, FILE *out, int full)
+static int sgml_fputc (int c, FILE *out)
{
switch (c)
{
case '<': return fputs ("<", out);
case '>': return fputs (">", out);
case '&': return fputs ("&", out);
- /* map to entities, fall-through to raw if !full */
- case '$': if (full) return fputs ("$", out);
- case '_': if (full) return fputs ("_", out);
- case '%': if (full) return fputs ("%", out);
- case '\\': if (full) return fputs ("\", out);
- case '"': if (full) return fputs (""", out);
- case '[': if (full) return fputs ("[", out);
- case ']': if (full) return fputs ("]", out);
- case '~': if (full) return fputs ("˜", out);
- case '|': if (full) return fputs ("|", out);
- case '^': if (full) return fputs ("ˆ", out);
default: return fputc (c, out);
}
}
-static int sgml_fputs (const char *s, FILE *out, int full)
+static int sgml_fputs (const char *s, FILE *out)
{
for (; *s; s++)
- if (sgml_fputc ((unsigned int) *s, out, full) == EOF)
+ if (sgml_fputc ((unsigned int) *s, out) == EOF)
return EOF;
return 0;
fputs ("\n<sect2 id=\"", out);
sgml_id_fputs(varname, out);
fputs ("\">\n<title>", out);
- sgml_fputs (varname, out, 1);
+ sgml_fputs (varname, out);
fprintf (out, "</title>\n<literallayout>Type: %s", type2human (type));
case SP_STR:
{
if (docstat & D_TAB)
- sgml_fputs (str, out, 0);
+ sgml_fputs (str, out);
else
{
while (*str)
str++;
}
else
- sgml_fputc (*str, out, 1);
+ sgml_fputc (*str, out);
}
}
}
sgml_id_fputs (ref, out);
fputs ("\">", out);
if (output_dollar)
- fputs ("$", out);
- sgml_fputs (ref, out, 1);
+ fputc ('$', out);
+ sgml_fputs (ref, out);
fputs ("</link>", out);
break;