Diff for clean compile on OS X (Darwin 8.7.1):
--- clean_utf8_for_xml.c.orig 2006-07-04 07:57:28.000000000 -0500 +++ clean_utf8_for_xml.c 2006-07-05 21:25:13.000000000 -0500 @@ -1,4 +1,4 @@ -#include <malloc.h> +#include <stdlib.h> #include <string.h> #include <stdio.h> @@ -11,7 +11,7 @@ * At a minimum, XML markup characters needs to be escaped. * * In the normal case, this code does nothing more than a quick scan of - * the input, and returns it back. If, however, it finds something amis + * the input, and returns it back. If, however, it finds something amiss * it will allocate another block of memory and attempt to correct a few of * the most common errors. If this occurs, it is the callers responsibility * to free the block that was allocated.
if (*in == 0x09 && *in == 0x0A && *in == 0x0D) { *c++ = *in; } else {
looks for me as if it should be
if (*in == 0x09 || *in == 0x0A || *in == 0x0D) { *c++ = *in; } else {
As for using it in my own projects, is MIT/Apache License compatible with GPL? What do I Need to make it "right"?