X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/647ac5444d022537a1f0854dd309494c511dfe07..939639fcf1dad1b8f3a85d641f41d11c49281f3c:/doc/makedoc.c diff --git a/doc/makedoc.c b/doc/makedoc.c index 07d3405..5112809 100644 --- a/doc/makedoc.c +++ b/doc/makedoc.c @@ -117,8 +117,8 @@ static void print_confline (const char *, int, const char *, FILE *); 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[]) @@ -591,14 +591,14 @@ static void sgml_print_strval (const char *v, FILE *out) 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) { @@ -606,25 +606,14 @@ static int sgml_fputc (int c, FILE *out, int full) 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; @@ -716,7 +705,7 @@ static void print_confline (const char *varname, int type, const char *val, FILE fputs ("\n\n", out); - sgml_fputs (varname, out, 1); + sgml_fputs (varname, out); fprintf (out, "\nType: %s", type2human (type)); @@ -1220,7 +1209,7 @@ static int print_it (int special, char *str, FILE *out, int docstat) case SP_STR: { if (docstat & D_TAB) - sgml_fputs (str, out, 0); + sgml_fputs (str, out); else { while (*str) @@ -1238,7 +1227,7 @@ static int print_it (int special, char *str, FILE *out, int docstat) str++; } else - sgml_fputc (*str, out, 1); + sgml_fputc (*str, out); } } } @@ -1271,8 +1260,8 @@ void print_ref (FILE *out, int output_dollar, const char *ref) sgml_id_fputs (ref, out); fputs ("\">", out); if (output_dollar) - fputs ("$", out); - sgml_fputs (ref, out, 1); + fputc ('$', out); + sgml_fputs (ref, out); fputs ("", out); break;