talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit a52401526d1d7d9257623a5dac44ffb378371303
parent e0aa60ca7ac4d26fe0dd4b00cad59a0e770bb009
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Wed, 27 May 2015 22:58:27 +0200

RSSyl: Fix compilation on OS X.

The enums declared in libfeed's parser*.h files sneaked through
to object built from old_feeds.c file, due to parser.h include.
For some reason, this bothers OS X compiler.
Since these enums were only used in their respective parser*.c file,
I just moved them there.

Diffstat:
Msrc/plugins/rssyl/libfeed/parser.c | 9+++++++++
Msrc/plugins/rssyl/libfeed/parser.h | 10----------
Msrc/plugins/rssyl/libfeed/parser_atom10.c | 8++++++++
Msrc/plugins/rssyl/libfeed/parser_atom10.h | 14+++-----------
Msrc/plugins/rssyl/libfeed/parser_rdf.c | 6++++++
Msrc/plugins/rssyl/libfeed/parser_rdf.h | 6------
6 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/src/plugins/rssyl/libfeed/parser.c b/src/plugins/rssyl/libfeed/parser.c @@ -34,6 +34,15 @@ #include "parser.h" +enum { + FEED_TYPE_NONE, + FEED_TYPE_RDF, + FEED_TYPE_RSS_20, + FEED_TYPE_ATOM_03, + FEED_TYPE_ATOM_10, + FEED_TYPE_OPML +} FeedTypes; + static void _handler_set(XML_Parser parser, guint type) { if( parser == NULL ) diff --git a/src/plugins/rssyl/libfeed/parser.h b/src/plugins/rssyl/libfeed/parser.h @@ -32,14 +32,4 @@ gchar *feed_parser_get_attribute_value(const gchar **attr, const gchar *name); int feed_parser_unknown_encoding_handler(void *encdata, const XML_Char *name, XML_Encoding *info); - -enum { - FEED_TYPE_NONE, - FEED_TYPE_RDF, - FEED_TYPE_RSS_20, - FEED_TYPE_ATOM_03, - FEED_TYPE_ATOM_10, - FEED_TYPE_OPML -} FeedTypes; - #endif /* __PARSER_H */ diff --git a/src/plugins/rssyl/libfeed/parser_atom10.c b/src/plugins/rssyl/libfeed/parser_atom10.c @@ -29,6 +29,14 @@ #include "parser.h" #include "parser_atom10.h" +enum { + FEED_LOC_ATOM10_NONE, + FEED_LOC_ATOM10_ENTRY, + FEED_LOC_ATOM10_AUTHOR, + FEED_LOC_ATOM10_SOURCE, + FEED_LOC_ATOM10_CONTENT +} FeedAtom10Locations; + void feed_parser_atom10_start(void *data, const gchar *el, const gchar **attr) { FeedParserCtx *ctx = (FeedParserCtx *)data; diff --git a/src/plugins/rssyl/libfeed/parser_atom10.h b/src/plugins/rssyl/libfeed/parser_atom10.h @@ -17,18 +17,10 @@ * Boston, MA 02111-1307, USA. */ -#ifndef __PARSER_ATOM03_H -#define __PARSER_ATOM03_H +#ifndef __PARSER_ATOM10_H +#define __PARSER_ATOM10_H void feed_parser_atom10_start(void *data, const char *el, const char **attr); void feed_parser_atom10_end(void *data, const char *el); -enum { - FEED_LOC_ATOM10_NONE, - FEED_LOC_ATOM10_ENTRY, - FEED_LOC_ATOM10_AUTHOR, - FEED_LOC_ATOM10_SOURCE, - FEED_LOC_ATOM10_CONTENT -} FeedAtom10Locations; - -#endif /* __PARSER_ATOM03_H */ +#endif /* __PARSER_ATOM10_H */ diff --git a/src/plugins/rssyl/libfeed/parser_rdf.c b/src/plugins/rssyl/libfeed/parser_rdf.c @@ -28,6 +28,12 @@ #include "date.h" #include "parser_rdf.h" +enum { + FEED_LOC_RDF_NONE, + FEED_LOC_RDF_CHANNEL, + FEED_LOC_RDF_ITEM +} FeedRdfLocations; + void feed_parser_rdf_start(void *data, const gchar *el, const gchar **attr) { FeedParserCtx *ctx = (FeedParserCtx *)data; diff --git a/src/plugins/rssyl/libfeed/parser_rdf.h b/src/plugins/rssyl/libfeed/parser_rdf.h @@ -23,10 +23,4 @@ void feed_parser_rdf_start(void *data, const char *el, const char **attr); void feed_parser_rdf_end(void *data, const char *el); -enum { - FEED_LOC_RDF_NONE, - FEED_LOC_RDF_CHANNEL, - FEED_LOC_RDF_ITEM -} FeedRdfLocations; - #endif /* __PARSER_RDF_H */