diff --git a/mxml-file.c b/mxml-file.c index e49409c..47c0ecb 100644 --- a/mxml-file.c +++ b/mxml-file.c @@ -55,12 +55,10 @@ * Include necessary headers... */ -#include "mxml-private.h" -#ifdef WIN32 -# include -#else +#ifndef WIN32 # include -#endif /* WIN32 */ +#endif /* !WIN32 */ +#include "mxml-private.h" /* diff --git a/mxmldoc.c b/mxmldoc.c index 1b2d63f..d4426dd 100644 --- a/mxmldoc.c +++ b/mxmldoc.c @@ -3183,6 +3183,7 @@ write_html(const char *section, /* I - Section */ * output directory... */ +#ifdef __APPLE__ const char *id; /* Identifier */ @@ -3347,6 +3348,12 @@ write_html(const char *section, /* I - Section */ strerror(errno)); return; } + +#else + fputs("mxmldoc: Xcode documentation sets can only be created on " + "Mac OS X.\n", stderr); + return; +#endif /* __APPLE__ */ } else out = stdout; @@ -3672,6 +3679,7 @@ write_html(const char *section, /* I - Section */ if (out != stdout) fclose(out); +#ifdef __APPLE__ /* * When generating document sets, run the docsetutil program to index it... */ @@ -3722,6 +3730,7 @@ write_html(const char *section, /* I - Section */ } } } +#endif /* __APPLE__ */ } @@ -4750,7 +4759,7 @@ write_toc(FILE *out, /* I - Output file */ end = line + strlen(line); if (end == (line + sizeof(line) - 1) || - !fgets(end, sizeof(line) - (end - line), fp)) + !fgets(end, (int)(sizeof(line) - (end - line)), fp)) break; } @@ -4767,7 +4776,7 @@ write_toc(FILE *out, /* I - Output file */ */ for (ptr = strchr(line, '<'); ptr; ptr = strchr(ptr + 1, '<')) - if (!strncasecmp(ptr, "", 4)) + if (!strncmp(ptr, "", 4) || !strncmp(ptr, "", 4)) break; inelement = 1; @@ -4893,7 +4902,7 @@ write_toc(FILE *out, /* I - Output file */ } else if (*ptr == '<') { - if (!strncasecmp(ptr, "", 4)) + if (!strncmp(ptr, "", 4) || !strncmp(ptr, "", 4)) break; inelement = 1; diff --git a/testmxml.c b/testmxml.c index 979f619..dd180d1 100644 --- a/testmxml.c +++ b/testmxml.c @@ -30,11 +30,9 @@ #include "config.h" #include "mxml.h" -#ifdef WIN32 -# include -#else +#ifndef WIN32 # include -#endif /* WIN32 */ +#endif /* !WIN32 */ #include #ifndef O_BINARY # define O_BINARY 0