diff --git a/CMakeLists.txt b/CMakeLists.txt index ae1bb43..3793628 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,21 +1,12 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.7) project( feader ) -add_library( - feader STATIC +add_executable( + feader-cli src/feader.c ) add_library( - sqlite3 STATIC - src/sqlite/sqlite3.c + feader SHARED + src/feader.c ) -add_library( - yxml STATIC - src/yxml/yxml.c - ) -target_link_libraries( - feader - sqlite3 - yxml -) \ No newline at end of file diff --git a/src/feader.c b/src/feader.c index d169ee0..56a61b3 100755 --- a/src/feader.c +++ b/src/feader.c @@ -1,5 +1,4 @@ #include "feader.h" -#include #include #include #include "sqlite/sqlite3.h" diff --git a/src/feader.h b/src/feader.h index fd063ae..8c34236 100644 --- a/src/feader.h +++ b/src/feader.h @@ -35,6 +35,10 @@ typedef struct { char *filter_reject; } feed; +size_t my_write_callback(char *ptr, size_t size, size_t nmemb, xml *x); + +size_t get_xml(xml *x); + void parse_xml_items(xml *x); void get_xml_ptr(xml* x, char* url); @@ -50,3 +54,4 @@ void fead_xml(char* url); void setup_database(sqlite3* handle); void close_database(sqlite3* handle); + diff --git a/src/yxml/yxml.c b/src/yxml/yxml.c index 962fb68..282b478 100644 --- a/src/yxml/yxml.c +++ b/src/yxml/yxml.c @@ -22,7 +22,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "yxml.h" +#include #include typedef enum {