chiark / gitweb /
Concentrate knowledge about the `pcre' API in one place.
[disorder] / lib / configuration.h
index 08304bedbc7ff82cd4101734e5fa7917e0d52f55..148d08f60adda079a105ab00a797d39f34ce2a6c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder.
- * Copyright (C) 2004-2010 Richard Kettlewell
+ * Copyright (C) 2004-2011, 2013 Richard Kettlewell
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,9 +22,8 @@
 #ifndef CONFIGURATION_H
 #define CONFIGURATION_H
 
-#include <pcre.h>
-
 #include "speaker-protocol.h"
+#include "regexp.h"
 #include "rights.h"
 #include "addr.h"
 
@@ -71,7 +70,7 @@ struct collectionlist {
 /** @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 */
@@ -89,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 */
 };
 
@@ -181,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;
@@ -221,6 +222,7 @@ struct config {
 
   /** @brief ALSA output device */
   const char *device;
+
   struct transformlist transform;      /* path name transformations */
 
   /** @brief Address to send audio data to */