ole2_extractor.c (libextractor-1.8) | : | ole2_extractor.c (libextractor-1.9) | ||
---|---|---|---|---|
/* | /* | |||
This file is part of libextractor. | This file is part of libextractor. | |||
Copyright (C) 2004, 2005, 2006, 2007, 2009, 2012 Vidyut Samanta and Christi an Grothoff | Copyright (C) 2004, 2005, 2006, 2007, 2009, 2012, 2018 Vidyut Samanta and C hristian Grothoff | |||
libextractor is free software; you can redistribute it and/or modify | libextractor is free software; you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published | it under the terms of the GNU General Public License as published | |||
by the Free Software Foundation; either version 3, or (at your | by the Free Software Foundation; either version 3, or (at your | |||
option) any later version. | option) any later version. | |||
libextractor is distributed in the hope that it will be useful, but | libextractor is distributed in the hope that it will be useful, but | |||
WITHOUT ANY WARRANTY; without even the implied warranty of | WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
General Public License for more details. | General Public License for more details. | |||
skipping to change at line 171 | skipping to change at line 171 | |||
* Closure for 'process_metadata'. | * Closure for 'process_metadata'. | |||
*/ | */ | |||
struct ProcContext | struct ProcContext | |||
{ | { | |||
/** | /** | |||
* Function to call for meta data that was found. | * Function to call for meta data that was found. | |||
*/ | */ | |||
EXTRACTOR_MetaDataProcessor proc; | EXTRACTOR_MetaDataProcessor proc; | |||
/** | /** | |||
* Closure for 'proc'. | * Closure for @e proc. | |||
*/ | */ | |||
void *proc_cls; | void *proc_cls; | |||
/** | /** | |||
* Return value; 0 to continue to extract, 1 if we are done | * Return value; 0 to continue to extract, 1 if we are done | |||
*/ | */ | |||
int ret; | int ret; | |||
}; | }; | |||
/** | /** | |||
skipping to change at line 210 | skipping to change at line 210 | |||
if ( (NULL == key) || | if ( (NULL == key) || | |||
(NULL == value) ) | (NULL == value) ) | |||
return; | return; | |||
if (0 != pc->ret) | if (0 != pc->ret) | |||
return; | return; | |||
gval = gsf_doc_prop_get_val (prop); | gval = gsf_doc_prop_get_val (prop); | |||
if (G_VALUE_TYPE(gval) == G_TYPE_STRING) | if (G_VALUE_TYPE(gval) == G_TYPE_STRING) | |||
{ | { | |||
contents = strdup (g_value_get_string (gval)); | const char *gvals; | |||
gvals = g_value_get_string (gval); | ||||
if (NULL == gvals) | ||||
return; | ||||
contents = strdup (gvals); | ||||
} | } | |||
else | else | |||
{ | { | |||
/* convert other formats? */ | /* convert other formats? */ | |||
contents = g_strdup_value_contents (gval); | contents = g_strdup_value_contents (gval); | |||
} | } | |||
if (NULL == contents) | if (NULL == contents) | |||
return; | return; | |||
if (0 == strcmp (type, | if (0 == strcmp (type, | |||
"meta:generator")) | "meta:generator")) | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 8 lines changed or added |