diff --git a/src/DAAP2SQL.g b/src/DAAP2SQL.g index a9e8a6e8..b10c772b 100644 --- a/src/DAAP2SQL.g +++ b/src/DAAP2SQL.g @@ -27,6 +27,7 @@ options { @header { #include #include + #include #include #include @@ -35,6 +36,17 @@ options { #include "daap_query.h" } +@members { + struct dmap_query_field_map { + char *dmap_field; + char *db_col; + int as_int; + }; + + /* gperf static hash, daap_query.gperf */ + #include "daap_query_hash.c" +} + query returns [ pANTLR3_STRING result ] : e = expr { diff --git a/src/daap_query.c b/src/daap_query.c index 7b42898e..94a33969 100644 --- a/src/daap_query.c +++ b/src/daap_query.c @@ -34,10 +34,6 @@ #include "DAAP2SQL.h" -/* gperf static hash, daap_query.gperf */ -#include "daap_query_hash.c" - - char * daap_query_parse_sql(const char *daap_query) { diff --git a/src/daap_query.h b/src/daap_query.h index d6f62368..d5a44930 100644 --- a/src/daap_query.h +++ b/src/daap_query.h @@ -5,16 +5,6 @@ #include "logger.h" #include "misc.h" -struct dmap_query_field_map { - char *dmap_field; - char *db_col; - int as_int; -}; - - -/* Generated by gperf - keep in sync, don't alter */ -const struct dmap_query_field_map * -daap_query_field_lookup (register const char *str, register unsigned int len); char * daap_query_parse_sql(const char *daap_query);