From a2682a2ee27df62b64e12d6dc1131172319832f4 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 31 Oct 2004 15:32:14 +0000 Subject: [PATCH] Fix "subscript has type char" warnings... --- mxml.h | 6 +++--- mxmldoc.c | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mxml.h b/mxml.h index cb76791..02c1c97 100644 --- a/mxml.h +++ b/mxml.h @@ -1,5 +1,5 @@ /* - * "$Id: mxml.h,v 1.23 2004/10/28 02:58:00 mike Exp $" + * "$Id: mxml.h,v 1.24 2004/10/31 15:32:14 mike Exp $" * * Header file for Mini-XML, a small XML-like file parsing library. * @@ -139,7 +139,7 @@ typedef struct mxml_index_s /**** An XML node index. ****/ typedef int (*mxml_custom_load_cb_t)(mxml_node_t *, const char *); /**** Custom data load callback function ****/ -typedef const char *(*mxml_custom_save_cb_t)(mxml_node_t *); +typedef char *(*mxml_custom_save_cb_t)(mxml_node_t *); /**** Custom data save callback function ****/ @@ -250,5 +250,5 @@ extern mxml_type_t mxml_real_cb(mxml_node_t *node); /* - * End of "$Id: mxml.h,v 1.23 2004/10/28 02:58:00 mike Exp $". + * End of "$Id: mxml.h,v 1.24 2004/10/31 15:32:14 mike Exp $". */ diff --git a/mxmldoc.c b/mxmldoc.c index 66978f8..e9cb340 100644 --- a/mxmldoc.c +++ b/mxmldoc.c @@ -1,5 +1,5 @@ /* - * "$Id: mxmldoc.c,v 1.38 2004/10/28 01:07:00 mike Exp $" + * "$Id: mxmldoc.c,v 1.39 2004/10/31 15:32:14 mike Exp $" * * Documentation generator using Mini-XML, a small XML-like file parsing * library. @@ -1066,7 +1066,7 @@ scan_file(const char *filename, /* I - Filename */ if (ch == '/' && bufptr > buffer && bufptr[-1] == '*') { while (bufptr > buffer && - (bufptr[-1] == '*' || isspace(bufptr[-1]))) + (bufptr[-1] == '*' || isspace(bufptr[-1] & 255))) bufptr --; *bufptr = '\0'; @@ -1523,7 +1523,7 @@ scan_file(const char *filename, /* I - Filename */ buffer); } } - else if (enumeration && !isdigit(buffer[0])) + else if (enumeration && !isdigit(buffer[0] & 255)) { #ifdef DEBUG fprintf(stderr, "Constant: <<<< %s >>>\n", buffer); @@ -1697,13 +1697,13 @@ update_comment(mxml_node_t *parent, /* I - Parent node */ if (*ptr == '\'') { ptr ++; - while (isspace(*ptr)) + while (isspace(*ptr & 255)) ptr ++; if (*ptr == '-') ptr ++; - while (isspace(*ptr)) + while (isspace(*ptr & 255)) ptr ++; safe_strcpy(comment->value.text.string, ptr); @@ -1723,13 +1723,13 @@ update_comment(mxml_node_t *parent, /* I - Parent node */ if (!strcmp(parent->value.element.name, "argument")) mxmlElementSetAttr(parent, "direction", comment->value.text.string); - while (isspace(*ptr)) + while (isspace(*ptr & 255)) ptr ++; if (*ptr == '-') ptr ++; - while (isspace(*ptr)) + while (isspace(*ptr & 255)) ptr ++; safe_strcpy(comment->value.text.string, ptr); @@ -1740,7 +1740,7 @@ update_comment(mxml_node_t *parent, /* I - Parent node */ */ for (ptr = comment->value.text.string; *ptr == '*'; ptr ++); - for (; isspace(*ptr); ptr ++); + for (; isspace(*ptr & 255); ptr ++); if (ptr > comment->value.text.string) safe_strcpy(comment->value.text.string, ptr); @@ -1748,7 +1748,7 @@ update_comment(mxml_node_t *parent, /* I - Parent node */ ptr > comment->value.text.string && *ptr == '*'; ptr --) *ptr = '\0'; - for (; ptr > comment->value.text.string && isspace(*ptr); ptr --) + for (; ptr > comment->value.text.string && isspace(*ptr & 255); ptr --) *ptr = '\0'; #ifdef DEBUG @@ -2745,5 +2745,5 @@ ws_cb(mxml_node_t *node, /* I - Element node */ /* - * End of "$Id: mxmldoc.c,v 1.38 2004/10/28 01:07:00 mike Exp $". + * End of "$Id: mxmldoc.c,v 1.39 2004/10/31 15:32:14 mike Exp $". */