X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/cca89d7ce589d10a226c6dfa212e36cbcad25fd2..3fe2333a1fa62389ad049a1c1ca43fee77a3fef0:/lib/configuration.h diff --git a/lib/configuration.h b/lib/configuration.h index bb90242..148d08f 100644 --- a/lib/configuration.h +++ b/lib/configuration.h @@ -22,11 +22,8 @@ #ifndef CONFIGURATION_H #define CONFIGURATION_H -#if HAVE_PCRE_H -# include -#endif - #include "speaker-protocol.h" +#include "regexp.h" #include "rights.h" #include "addr.h" @@ -70,11 +67,10 @@ struct collectionlist { struct collection *s; }; -#if HAVE_PCRE_H /** @brief A track name part */ struct namepart { char *part; /* part */ - pcre *re; /* compiled regexp */ + regexp *re; /* compiled regexp */ char *res; /* regexp as a string */ char *replace; /* replacement string */ char *context; /* context glob */ @@ -92,7 +88,7 @@ struct transform { char *type; /* track or dir */ char *context; /* sort or choose */ char *replace; /* substitution string */ - pcre *re; /* compiled re */ + regexp *re; /* compiled re */ unsigned flags; /* regexp flags */ }; @@ -101,7 +97,6 @@ struct transformlist { int n; struct transform *t; }; -#endif /** @brief System configuration */ struct config { @@ -185,8 +180,10 @@ struct config { /** @brief Maximum lifetime of a playlist lock */ long playlist_lock_timeout; +#if !_WIN32 /** @brief Home directory for state files */ const char *home; +#endif /** @brief Login username */ char *username; @@ -218,9 +215,7 @@ struct config { /** @brief Minimum time between a track being played again */ long replay_min; -#if HAVE_PCRE_H struct namepartlist namepart; /* transformations */ -#endif /** @brief Termination signal for subprocesses */ int signal; @@ -228,9 +223,7 @@ struct config { /** @brief ALSA output device */ const char *device; -#if HAVE_PCRE_H struct transformlist transform; /* path name transformations */ -#endif /** @brief Address to send audio data to */ struct netaddress broadcast;