libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit b0cab4e85aed43031a0210f2a31742bbcef7e734
parent 7b62c01e87a1d2f5009f356fc0f3d70662b1e1a9
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 12 Jun 2010 14:23:43 +0000

pass unsigned chars only to isXXXX functions

Diffstat:
MChangeLog | 3+++
Mdoc/version.texi | 4++--
Mpo/de.po | 4++--
Mpo/fr.po | 4++--
Mpo/ga.po | 4++--
Mpo/libextractor.pot | 4++--
Mpo/nl.po | 4++--
Mpo/ro.po | 4++--
Mpo/rw.po | 4++--
Mpo/sv.po | 4++--
Mpo/vi.po | 4++--
Msrc/main/extract.c | 4++--
Msrc/plugins/deb_extractor.c | 2+-
Msrc/plugins/html_extractor.c | 6+++---
Msrc/plugins/id3_extractor.c | 2+-
Msrc/plugins/jpeg_extractor.c | 2+-
Msrc/plugins/man_extractor.c | 2+-
Msrc/plugins/mime_extractor.c | 6+++---
Msrc/plugins/odf_extractor.c | 2+-
19 files changed, 36 insertions(+), 33 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,6 @@ +Sat Jun 12 16:23:14 CEST 2010 + Only pass 'unsigned char's to 'isspace' and similar functions. -CG + Sun Mar 14 00:09:45 CET 2010 Releasing libextractor 0.6.1. diff --git a/doc/version.texi b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 17 May 2010 -@set UPDATED-MONTH May 2010 +@set UPDATED 1 April 2010 +@set UPDATED-MONTH April 2010 @set EDITION 0.6.1 @set VERSION 0.6.1 diff --git a/po/de.po b/po/de.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: libextractor 0.5.14\n" "Report-Msgid-Bugs-To: libextractor@gnu.org\n" -"POT-Creation-Date: 2010-03-14 00:09+0100\n" +"POT-Creation-Date: 2010-05-31 14:54+0200\n" "PO-Revision-Date: 2007-03-23 23:16+0100\n" "Last-Translator: Nils Durner <durner@gnunet.org>\n" "Language-Team: German <translation-team-de@lists.sourceforge.net>\n" @@ -891,7 +891,7 @@ msgstr "%s: Option »-W %s« ist mehrdeutig\n" msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: Option »-W %s« erwartet kein Argument\n" -#: src/main/extractor.c:2158 +#: src/main/extractor.c:2153 #, c-format msgid "Initialization of plugin mechanism failed: %s!\n" msgstr "Initialisierung des Plugin-Mechanismus' ist fehlgeschlagen: %s.\n" diff --git a/po/fr.po b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libextractor-0.5.20a\n" "Report-Msgid-Bugs-To: libextractor@gnu.org\n" -"POT-Creation-Date: 2010-03-14 00:09+0100\n" +"POT-Creation-Date: 2010-05-31 14:54+0200\n" "PO-Revision-Date: 2008-08-24 19:08+0100\n" "Last-Translator: Nicolas Provost <nprovost@quadriv.com>\n" "Language-Team: French <traduc@traduc.org>\n" @@ -912,7 +912,7 @@ msgstr "%s: l'option `-W %s' est ambiguë\n" msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: l'option `-W %s' ne prend pas d'argument\n" -#: src/main/extractor.c:2158 +#: src/main/extractor.c:2153 #, c-format msgid "Initialization of plugin mechanism failed: %s!\n" msgstr "Echec de l'initialisation du module %s !\n" diff --git a/po/ga.po b/po/ga.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: libextractor 0.5.20\n" "Report-Msgid-Bugs-To: libextractor@gnu.org\n" -"POT-Creation-Date: 2010-03-14 00:09+0100\n" +"POT-Creation-Date: 2010-05-31 14:54+0200\n" "PO-Revision-Date: 2008-03-21 20:46-0700\n" "Last-Translator: Kevin Scannell <kscanne@gmail.com>\n" "Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n" @@ -889,7 +889,7 @@ msgstr "%s: T msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: n cheadatear argint i ndiaidh na rogha `-W %s'\n" -#: src/main/extractor.c:2158 +#: src/main/extractor.c:2153 #, c-format msgid "Initialization of plugin mechanism failed: %s!\n" msgstr "Theip ar ths meicnocht na mbreisen: %s!\n" diff --git a/po/libextractor.pot b/po/libextractor.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: libextractor@gnu.org\n" -"POT-Creation-Date: 2010-03-14 00:09+0100\n" +"POT-Creation-Date: 2010-05-31 14:54+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -885,7 +885,7 @@ msgstr "" msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "" -#: src/main/extractor.c:2158 +#: src/main/extractor.c:2153 #, c-format msgid "Initialization of plugin mechanism failed: %s!\n" msgstr "" diff --git a/po/nl.po b/po/nl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libextractor-0.5.20a\n" "Report-Msgid-Bugs-To: libextractor@gnu.org\n" -"POT-Creation-Date: 2010-03-14 00:09+0100\n" +"POT-Creation-Date: 2010-05-31 14:54+0200\n" "PO-Revision-Date: 2009-03-08 16:59+0100\n" "Last-Translator: Erwin Poeze <erwin.poeze@gmail.com>\n" "Language-Team: Dutch <vertaling@vrijschrift.org>\n" @@ -891,7 +891,7 @@ msgstr "%s: optie '-W %s' is niet eenduidig\n" msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: optie '-W %s' staat geen argument toe\n" -#: src/main/extractor.c:2158 +#: src/main/extractor.c:2153 #, c-format msgid "Initialization of plugin mechanism failed: %s!\n" msgstr "Initialisatie van plugin-mechanisme is mislukt: %s\n" diff --git a/po/ro.po b/po/ro.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: libextractor 0.5.3\n" "Report-Msgid-Bugs-To: libextractor@gnu.org\n" -"POT-Creation-Date: 2010-03-14 00:09+0100\n" +"POT-Creation-Date: 2010-05-31 14:54+0200\n" "PO-Revision-Date: 2005-08-16 12:00-0500\n" "Last-Translator: Laurentiu Buzdugan <lbuz@rolix.org>\n" "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n" @@ -893,7 +893,7 @@ msgstr "%s: op msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: opiunea `-W %s' nu permite un argument\n" -#: src/main/extractor.c:2158 +#: src/main/extractor.c:2153 #, c-format msgid "Initialization of plugin mechanism failed: %s!\n" msgstr "iniializare mecanismului de plugin a euat: %s!\n" diff --git a/po/rw.po b/po/rw.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: libextractor 0.4.2\n" "Report-Msgid-Bugs-To: libextractor@gnu.org\n" -"POT-Creation-Date: 2010-03-14 00:09+0100\n" +"POT-Creation-Date: 2010-05-31 14:54+0200\n" "PO-Revision-Date: 2005-04-04 10:55-0700\n" "Last-Translator: Steven Michael Murphy <murf@e-tools.com>\n" "Language-Team: Kinyarwanda <translation-team-rw@lists.sourceforge.net>\n" @@ -955,7 +955,7 @@ msgstr "%s:Ihitamo ni" msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s:Ihitamo Kwemerera" -#: src/main/extractor.c:2158 +#: src/main/extractor.c:2153 #, fuzzy, c-format msgid "Initialization of plugin mechanism failed: %s!\n" msgstr "Bya Byanze" diff --git a/po/sv.po b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libextractor 0.5.22\n" "Report-Msgid-Bugs-To: libextractor@gnu.org\n" -"POT-Creation-Date: 2010-03-14 00:09+0100\n" +"POT-Creation-Date: 2010-05-31 14:54+0200\n" "PO-Revision-Date: 2009-05-12 17:45+0100\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" @@ -888,7 +888,7 @@ msgstr "%s: flagga \"-W %s\" är tvetydig\n" msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: flagga \"-W %s\" tillåter inte ett argument\n" -#: src/main/extractor.c:2158 +#: src/main/extractor.c:2153 #, c-format msgid "Initialization of plugin mechanism failed: %s!\n" msgstr "Initiering av insticksmekanism misslyckades: %s!\n" diff --git a/po/vi.po b/po/vi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: libextractor 0.6.0\n" "Report-Msgid-Bugs-To: libextractor@gnu.org\n" -"POT-Creation-Date: 2010-03-14 00:09+0100\n" +"POT-Creation-Date: 2010-05-31 14:54+0200\n" "PO-Revision-Date: 2010-02-11 00:13+0930\n" "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" @@ -887,7 +887,7 @@ msgstr "%s: tùy chọn « -W %s » là mơ hồ\n" msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: tùy chọn « -W %s » không cho phép đối số\n" -#: src/main/extractor.c:2158 +#: src/main/extractor.c:2153 #, c-format msgid "Initialization of plugin mechanism failed: %s!\n" msgstr "Việc khởi động cơ chế cầm phít bị lỗi: %s\n" diff --git a/src/main/extract.c b/src/main/extract.c @@ -128,7 +128,7 @@ static void formatHelp(const char * general, OUTER: while (ml - p > 78 - slen) { for (j=p+78-slen;j>p;j--) { - if (isspace(trans[j])) { + if (isspace( (unsigned char) trans[j])) { scp = malloc(j-p+1); memcpy(scp, &trans[p], @@ -372,7 +372,7 @@ str_splice(const char * title, if (! isalnum(temp[i]) ) temp[i] = '_'; else - temp[i] = tolower(temp[i]); + temp[i] = tolower( (unsigned int) temp[i]); } return temp; } diff --git a/src/plugins/deb_extractor.c b/src/plugins/deb_extractor.c @@ -104,7 +104,7 @@ processControl (const char *data, colon++; } colon++; - while ((colon < size) && (isspace (data[colon]))) + while ((colon < size) && (isspace ((unsigned char) data[colon]))) colon++; eol = colon; while ((eol < size) && diff --git a/src/plugins/html_extractor.c b/src/plugins/html_extractor.c @@ -100,7 +100,7 @@ skipWhitespace (size_t * pos, const char *data, size_t size) { size_t p = *pos; - while ((p < size) && (isspace (data[p]))) + while ((p < size) && (isspace ( (unsigned char) data[p]))) { if (data[p] == '\0') return 0; @@ -115,7 +115,7 @@ skipLetters (size_t * pos, const char *data, size_t size) { size_t p = *pos; - while ((p < size) && (isalpha (data[p]))) + while ((p < size) && (isalpha ( (unsigned char) data[p]))) { if (data[p] == '\0') return 0; @@ -168,7 +168,7 @@ findEntry (const char *key, } else { - while ((start < end) && (!isspace (*start))) + while ((start < end) && (!isspace ( (unsigned char) *start))) start++; } *mend = start; diff --git a/src/plugins/id3_extractor.c b/src/plugins/id3_extractor.c @@ -202,7 +202,7 @@ static const char *const genre_names[] = { static void trim (char *k) { - while ((strlen (k) > 0) && (isspace (k[strlen (k) - 1]))) + while ((strlen (k) > 0) && (isspace ((unsigned char) k[strlen (k) - 1]))) k[strlen (k) - 1] = '\0'; } diff --git a/src/plugins/jpeg_extractor.c b/src/plugins/jpeg_extractor.c @@ -118,7 +118,7 @@ process_COM (const unsigned char **data, const unsigned char *end) ch = NEXTC (data, end); if ((ch == '\r') || (ch == '\n')) comment[pos++] = '\n'; - else if (isprint (ch)) + else if (isprint ((unsigned char) ch)) comment[pos++] = ch; length--; } diff --git a/src/plugins/man_extractor.c b/src/plugins/man_extractor.c @@ -116,7 +116,7 @@ EXTRACTOR_man_extract (const char *buf, &buf[pos], xlen)) || ((pos != 0) && (buf[pos - 1] != '\n')))) { - if (!isgraph (buf[pos]) && !isspace (buf[pos])) + if (!isgraph (buf[pos]) && !isspace ((unsigned char) buf[pos])) return 0; pos++; } diff --git a/src/plugins/mime_extractor.c b/src/plugins/mime_extractor.c @@ -129,7 +129,7 @@ svgMatcher (const char *data, size_t len, void *cls) while (i < len) { - if (!isprint (data[i])) + if (!isprint ( (unsigned char) data[i])) return 0; switch (state) { @@ -137,7 +137,7 @@ svgMatcher (const char *data, size_t len, void *cls) if (i + 6 >= len) return 0; else if (memcmp (data + i, "<?xml", 5) == 0 - && isspace (*(data + i + 5))) + && isspace ( (unsigned char) *(data + i + 5))) state = XMLCLOSE; break; case XMLCLOSE: @@ -150,7 +150,7 @@ svgMatcher (const char *data, size_t len, void *cls) if (i + 5 >= len) return 0; else if (memcmp (data + i, "<svg", 4) == 0 - && isspace (*(data + i + 4))) + && isspace ( (unsigned char) *(data + i + 4))) return 1; break; default: diff --git a/src/plugins/odf_extractor.c b/src/plugins/odf_extractor.c @@ -93,7 +93,7 @@ libextractor_oo_getmimetype(EXTRACTOR_unzip_file uf) { /* found something */ buf[buf_size] = '\0'; while ( (0 > buf_size) && - isspace(buf[buf_size - 1])) + isspace( (unsigned char) buf[buf_size - 1])) buf[--buf_size] = '\0'; if('\0' == buf[0]) { free(buf);