gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r2705 - Extractor/src/plugins/ole2


From: grothoff
Subject: [GNUnet-SVN] r2705 - Extractor/src/plugins/ole2
Date: Mon, 1 May 2006 16:30:41 -0700 (PDT)

Author: grothoff
Date: 2006-05-01 16:30:38 -0700 (Mon, 01 May 2006)
New Revision: 2705

Modified:
   Extractor/src/plugins/ole2/ole2extractor.c
Log:
From: 
Ronan MELENNEC <address@hidden>
  To: 
  address@hidden
    Date: 
    Today 02:18:48 pm
       
         Spam Status: Spamassassin 0% probability of being spam.

         Full report:
         No, score=-0.5 required=5.0 tests=AWL,BAYES_00, 
MSGID_FROM_MTA_HEADER,MSGID_FROM_MTA_ID autolearn=no version=3.1.0  Bogofilter 
0% probability of being spam.

         Full report:
         Ham, tests=bogofilter, spamicity=0.000000, version=1.0.2  
         Hello Christian,

         The patch included here is meant to adjust to the change
         from 'software' to 'generator' keyword in the OLE2 plugin.
         To be applied to 'src/plugins/ole2/ole2extractor.c'.

         Cordially,
         --
         Ronan Melennec          | DGAC/DSNA/DTI/SDER/3/RFM
         <address@hidden>  | Division Routes, Flux et Mod?\195?\169lisations 
(RFM)
         +33 (0) 1 69 57 69 28   | Orly Sud 205 -- 94542 ORLY AEROGARE CEDEX


Modified: Extractor/src/plugins/ole2/ole2extractor.c
===================================================================
--- Extractor/src/plugins/ole2/ole2extractor.c  2006-05-01 13:05:35 UTC (rev 
2704)
+++ Extractor/src/plugins/ole2/ole2extractor.c  2006-05-01 23:30:38 UTC (rev 
2705)
@@ -446,7 +446,7 @@
   GsfInput * src;
   GError * err = NULL;
   const char * name;
-  const char * software = NULL;
+  const char * generator = NULL;
   int i;
   unsigned int lcb;
   unsigned int fcb;
@@ -525,33 +525,33 @@
   /*
    * Hack to return an appropriate mimetype
    */
-  software = EXTRACTOR_extractLast(EXTRACTOR_SOFTWARE, prev);
-  if (NULL == software) {
+  generator = EXTRACTOR_extractLast(EXTRACTOR_GENERATOR, prev);
+  if (NULL == generator) {
      /*
       * when very puzzled, just look at file magic number
       */
     if ( (8 < size)
         && (0 == memcmp(data, "\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1", 8)) )
-      software = "Microsoft Office";
+      generator = "Microsoft Office";
   }
 
-  if(NULL != software) {
+  if(NULL != generator) {
     const char * mimetype = "application/vnd.ms-files";
  
-    if((0 == strncmp(software, "Microsoft Word", 14)) ||
-       (0 == strncmp(software, "Microsoft Office Word", 21)))
+    if((0 == strncmp(generator, "Microsoft Word", 14)) ||
+       (0 == strncmp(generator, "Microsoft Office Word", 21)))
       mimetype = "application/msword";
-    else if((0 == strncmp(software, "Microsoft Excel", 15)) ||
-            (0 == strncmp(software, "Microsoft Office Excel", 22)))
+    else if((0 == strncmp(generator, "Microsoft Excel", 15)) ||
+            (0 == strncmp(generator, "Microsoft Office Excel", 22)))
       mimetype = "application/vnd.ms-excel";
-    else if((0 == strncmp(software, "Microsoft PowerPoint", 20)) ||
-            (0 == strncmp(software, "Microsoft Office PowerPoint", 27)))
+    else if((0 == strncmp(generator, "Microsoft PowerPoint", 20)) ||
+            (0 == strncmp(generator, "Microsoft Office PowerPoint", 27)))
       mimetype = "application/vnd.ms-powerpoint";
-    else if(0 == strncmp(software, "Microsoft Project", 17))
+    else if(0 == strncmp(generator, "Microsoft Project", 17))
       mimetype = "application/vnd.ms-project";
-    else if(0 == strncmp(software, "Microsoft Visio", 15))
+    else if(0 == strncmp(generator, "Microsoft Visio", 15))
       mimetype = "application/vnd.visio";
-    else if(0 == strncmp(software, "Microsoft Office", 16))
+    else if(0 == strncmp(generator, "Microsoft Office", 16))
       mimetype = "application/vnd.ms-office";
   
     prev = addKeyword(prev, mimetype, EXTRACTOR_MIMETYPE);





reply via email to

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