libextractor

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

commit 2abeb78e5fab2a405c8aa6358438027b9ac78980
parent a7382176fe64962b2ca7e5b74e96b02f3ddcbc12
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon,  1 May 2006 23:30:38 +0000

From: 
Ronan MELENNEC <ronan.melennec@cena.fr>
  To: 
  christian@grothoff.org
    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
	 <melennec@ath.cena.fr>  | Division Routes, Flux et Modélisations (RFM)
	 +33 (0) 1 69 57 69 28   | Orly Sud 205 -- 94542 ORLY AEROGARE CEDEX


Diffstat:
Msrc/plugins/ole2/ole2extractor.c | 28++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/plugins/ole2/ole2extractor.c b/src/plugins/ole2/ole2extractor.c @@ -446,7 +446,7 @@ libextractor_ole2_extract(const char * filename, 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 @@ libextractor_ole2_extract(const char * filename, /* * 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);