commit 9bae9bdb7a993d5cfe74e45ae2afc9ed29bb7c6c
parent 85e9d386f988f4d3b8e3d0f75490d7cd5cfedc79
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 12 Mar 2006 04:38:37 +0000
lowercase
Diffstat:
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/include/extractor.h b/src/include/extractor.h
@@ -151,6 +151,7 @@ typedef enum {
EXTRACTOR_CREATED_BY_SOFTWARE = 98,
EXTRACTOR_MODIFIED_BY_SOFTWARE = 99,
EXTRACTOR_REVISION_HISTORY = 100,
+ EXTRACTOR_LOWERCASE = 101,
} EXTRACTOR_KeywordType;
/**
diff --git a/src/main/extractor.c b/src/main/extractor.c
@@ -142,11 +142,12 @@ static const char *keywordTypes[] = {
gettext_noop("created by software"),
gettext_noop("modified by software"),
gettext_noop("revision history"),
+ gettext_noop("lower case conversion"),
NULL,
};
/* the number of keyword types (for bounds-checking) */
-#define HIGHEST_TYPE_NUMBER 101
+#define HIGHEST_TYPE_NUMBER 102
#ifdef HAVE_LIBOGG
#if HAVE_VORBIS
diff --git a/src/plugins/lowerextractor.c b/src/plugins/lowerextractor.c
@@ -22,8 +22,8 @@
#include "extractor.h"
static void addKeyword(struct EXTRACTOR_Keywords ** list,
- char * keyword,
- EXTRACTOR_KeywordType type) {
+ const char * keyword,
+ EXTRACTOR_KeywordType type) {
EXTRACTOR_KeywordList * next;
next = malloc(sizeof(EXTRACTOR_KeywordList));
next->next = *list;
@@ -33,10 +33,11 @@ static void addKeyword(struct EXTRACTOR_Keywords ** list,
}
/* convert other keywords to lower case */
-struct EXTRACTOR_Keywords * libextractor_lower_extract(char * filename,
- char * data,
- size_t size,
- struct EXTRACTOR_Keywords * prev) {
+struct EXTRACTOR_Keywords *
+libextractor_lower_extract(char * filename,
+ char * data,
+ size_t size,
+ struct EXTRACTOR_Keywords * prev) {
struct EXTRACTOR_Keywords * pos;
char *lower;
unsigned int mem, needed, i;
@@ -61,7 +62,7 @@ struct EXTRACTOR_Keywords * libextractor_lower_extract(char * filename,
if(strcmp(pos->keyword, lower))
{
- addKeyword(&prev, lower, EXTRACTOR_UNKNOWN);
+ addKeyword(&prev, lower, EXTRACTOR_LOWERCASE);
}
pos = pos->next;
}