# HG changeset patch # User Matti Hamalainen # Date 1226431777 -7200 # Node ID 5455d078beddc797408df33109f111571a6b902c # Parent e93532b9dca1e9fcd0cbeba9bab5875723b52d2e Misc. fixes. diff -r e93532b9dca1 -r 5455d078bedd nnchat.c --- a/nnchat.c Tue Nov 11 21:16:11 2008 +0200 +++ b/nnchat.c Tue Nov 11 21:29:37 2008 +0200 @@ -28,6 +28,20 @@ #define SET_DELAY_USEC (SET_DELAY * 1000) +typedef struct { + char c; + char *ent; +} html_entity_t; + + +html_entity_t HTMLEntities[] = { + { '<', "<" }, + { '>', ">" }, +}; + +const int numHTMLEntities = (sizeof(HTMLEntities) / sizeof(HTMLEntities[0])); + + /* Options */ int optPort = 8005; @@ -466,6 +480,7 @@ if (*s == '½') { s++; if (*s == '½') { + fputc((unsigned char) *s, outFile); s++; } else { while (*s && isdigit(*s)) s++; @@ -473,7 +488,7 @@ s++; } } else { - fputc(*s, outFile); + fputc((unsigned char) *s, outFile); s++; } } @@ -796,20 +811,6 @@ } -typedef struct { - char c; - char *ent; -} html_entity_t; - - -html_entity_t HTMLEntities[] = { - { '<', "<" }, - { '>', ">" }, -}; - -const int numHTMLEntities = (sizeof(HTMLEntities) / sizeof(HTMLEntities[0])); - - char *encodeStr2(char *str) { char *result, *s = str;