URI:
       make sure util functions are at the top, move xmlencode before writepage() - saait - the most boring static page generator
  HTML git clone git://git.codemadness.org/saait
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit be11bd1dda2a883fc861f6147167a3477b636fe7
   DIR parent 3d54db5f366efdf4612c9eaa537a22ad11035e45
  HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Tue, 29 Oct 2019 18:07:11 +0100
       
       make sure util functions are at the top, move xmlencode before writepage()
       
       Diffstat:
         M saait.c                             |      32 ++++++++++++++++----------------
       
       1 file changed, 16 insertions(+), 16 deletions(-)
       ---
   DIR diff --git a/saait.c b/saait.c
       @@ -33,22 +33,6 @@ char *argv0;
        
        static struct variable *global;
        
       -/* Escape characters below as HTML 2.0 / XML 1.0. */
       -void
       -xmlencode(const char *s, FILE *fp)
       -{
       -        for (; *s; s++) {
       -                switch(*s) {
       -                case '<':  fputs("&lt;",   fp); break;
       -                case '>':  fputs("&gt;",   fp); break;
       -                case '\'': fputs("&#39;",  fp); break;
       -                case '&':  fputs("&amp;",  fp); break;
       -                case '"':  fputs("&quot;", fp); break;
       -                default:   fputc(*s, fp);
       -                }
       -        }
       -}
       -
        char *
        estrdup(const char *s)
        {
       @@ -302,6 +286,22 @@ readconfig(const char *file)
                return c;
        }
        
       +/* Escape characters below as HTML 2.0 / XML 1.0. */
       +void
       +xmlencode(const char *s, FILE *fp)
       +{
       +        for (; *s; s++) {
       +                switch(*s) {
       +                case '<':  fputs("&lt;",   fp); break;
       +                case '>':  fputs("&gt;",   fp); break;
       +                case '\'': fputs("&#39;",  fp); break;
       +                case '&':  fputs("&amp;",  fp); break;
       +                case '"':  fputs("&quot;", fp); break;
       +                default:   fputc(*s, fp);
       +                }
       +        }
       +}
       +
        void
        writepage(FILE *fp, const char *file, struct variable *c, char *s)
        {