gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r2334 - in Extractor/src: include main plugins


From: grothoff
Subject: [GNUnet-SVN] r2334 - in Extractor/src: include main plugins
Date: Fri, 16 Dec 2005 00:48:59 -0800 (PST)

Author: grothoff
Date: 2005-12-16 00:48:57 -0800 (Fri, 16 Dec 2005)
New Revision: 2334

Modified:
   Extractor/src/include/extractor.h
   Extractor/src/main/extractor.c
   Extractor/src/plugins/splitextractor.c
Log:
split

Modified: Extractor/src/include/extractor.h
===================================================================
--- Extractor/src/include/extractor.h   2005-12-16 07:14:31 UTC (rev 2333)
+++ Extractor/src/include/extractor.h   2005-12-16 08:48:57 UTC (rev 2334)
@@ -29,7 +29,7 @@
  * 0.2.6-1 => 0x00020601
  * 4.5.2-0 => 0x04050200
  */
-#define EXTRACTOR_VERSION 0x00050600
+#define EXTRACTOR_VERSION 0x00050801
 
 #include <stdio.h>
 
@@ -139,6 +139,7 @@
   EXTRACTOR_WHITE_BALANCE = 86,
   EXTRACTOR_ORIENTATION = 87,
   EXTRACTOR_TEMPLATE = 88,
+  EXTRACTOR_SPLIT = 89,
 } EXTRACTOR_KeywordType;
 
 /**

Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c      2005-12-16 07:14:31 UTC (rev 2333)
+++ Extractor/src/main/extractor.c      2005-12-16 08:48:57 UTC (rev 2334)
@@ -130,11 +130,12 @@
   gettext_noop("white balance"),
   gettext_noop("orientation"),
   gettext_noop("template"),
+  gettext_noop("split"),
   NULL,
 };
 
 /* the number of keyword types (for bounds-checking) */
-#define HIGHEST_TYPE_NUMBER 89
+#define HIGHEST_TYPE_NUMBER 90
 
 #ifdef HAVE_LIBOGG
 #if HAVE_VORBIS

Modified: Extractor/src/plugins/splitextractor.c
===================================================================
--- Extractor/src/plugins/splitextractor.c      2005-12-16 07:14:31 UTC (rev 
2333)
+++ Extractor/src/plugins/splitextractor.c      2005-12-16 08:48:57 UTC (rev 
2334)
@@ -25,8 +25,8 @@
 static int MINIMUM_KEYWORD_LENGTH = 4;
 
 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;
@@ -36,21 +36,21 @@
 }
 
 static int token(char letter,
-                                                                               
                                                        const char * options) {
+                const char * options) {
   int i;
-
-               if (options == NULL)
-                               options = TOKENIZERS;
+  
+  if (options == NULL)
+    options = TOKENIZERS;
   for (i=0;i<strlen(TOKENIZERS);i++)
     if (letter == TOKENIZERS[i])
       return 1;
   return 0;
 }
 
-static void splitKeywords(char * keyword,
-                                                                               
                                                                                
                                                EXTRACTOR_KeywordType type,
-                                                                               
                                                                                
                                                struct EXTRACTOR_Keywords ** 
list,
-                                                                               
                                                                                
                                                const char * options) {
+static void splitKeywords(const char * keyword,
+                         EXTRACTOR_KeywordType type,
+                         struct EXTRACTOR_Keywords ** list,
+                         const char * options) {
   char * dp;
   int pos;
   int last;
@@ -75,19 +75,19 @@
 
 /* split other keywords into multiple keywords */
 struct EXTRACTOR_Keywords *
-libextractor_split_extract(char * filename,
-                                                                               
                                                                                
                                                        char * data,
-                                                                               
                                                                                
                                                        size_t size,
-                                                                               
                                                                                
                                                        struct 
EXTRACTOR_Keywords * prev,
-                                                                               
                                                                                
                                                        const char * options) {
+libextractor_split_extract(const char * filename,
+                          const char * data,
+                          size_t size,
+                          struct EXTRACTOR_Keywords * prev,
+                          const char * options) {
   struct EXTRACTOR_Keywords * pos;
 
   pos = prev;
   while (pos != NULL) {
     splitKeywords(pos->keyword,
-                                                                               
                                                                
EXTRACTOR_UNKNOWN,
-                                                                               
                                                                &prev,
-                                                                               
                                                                options);
+                 EXTRACTOR_SPLIT,
+                 &prev,
+                 options);
     pos = pos->next;
   }
   return prev;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]