Mercurial > hg > nnchat
changeset 58:5455d078bedd
Misc. fixes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 11 Nov 2008 21:29:37 +0200 |
parents | e93532b9dca1 |
children | d57a8acf92bf |
files | nnchat.c |
diffstat | 1 files changed, 16 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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;