summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-09-18 12:12:35 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-09-18 12:12:35 +0000
commit1019adab755d0d4f9724dc18279adb4ac2772c33 (patch)
treebf27bf4518a93735bc6d72d11b81b9f436e06518
parent71c3c633bd4f9f5495f390233ee79e3b07ef411d (diff)
downloadxine-lib-1019adab755d0d4f9724dc18279adb4ac2772c33.tar.gz
xine-lib-1019adab755d0d4f9724dc18279adb4ac2772c33.tar.bz2
do not hand out unclaimed config entries
CVS patchset: 2687 CVS date: 2002/09/18 12:12:35
-rw-r--r--src/xine-engine/configfile.c5
-rw-r--r--src/xine-engine/xine_interface.c15
2 files changed, 17 insertions, 3 deletions
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index faf8d7155..caca59a9e 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: configfile.c,v 1.31 2002/09/15 11:35:09 jcdutton Exp $
+ * $Id: configfile.c,v 1.32 2002/09/18 12:12:35 guenter Exp $
*
* config object (was: file) management - implementation
*
@@ -616,8 +616,11 @@ void xine_save_config (xine_p xine_ro, const char *filename) {
switch (entry->type) {
case CONFIG_TYPE_UNKNOWN:
+#if 0
+ /* discard unclaimed values */
fprintf (f_config, "%s:%s\n",
entry->key, entry->unknown_value);
+#endif
break;
case CONFIG_TYPE_RANGE:
diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c
index 9f902209c..d9a54b822 100644
--- a/src/xine-engine/xine_interface.c
+++ b/src/xine-engine/xine_interface.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_interface.c,v 1.14 2002/09/18 00:51:34 guenter Exp $
+ * $Id: xine_interface.c,v 1.15 2002/09/18 12:12:35 guenter Exp $
*
* convenience/abstraction layer, functions to implement
* libxine's public interface
@@ -222,6 +222,10 @@ int xine_config_get_first_entry (xine_p this, xine_cfg_entry_t *entry) {
config->cur = config->first;
+ /* do not hand out unclaimed entries */
+ while (config->cur && config->cur->type == CONFIG_TYPE_UNKNOWN);
+ config->cur = config->cur->next;
+
return xine_config_get_current_entry (this, entry);
}
@@ -234,7 +238,10 @@ int xine_config_get_next_entry (xine_p this, xine_cfg_entry_t *entry) {
config_values_t *config = this->config;
- config->cur = config->cur->next;
+ /* do not hand out unclaimed entries */
+ do {
+ config->cur = config->cur->next;
+ } while (config->cur && config->cur->type == CONFIG_TYPE_UNKNOWN);
return xine_config_get_current_entry (this, entry);
}
@@ -250,6 +257,10 @@ int xine_config_lookup_entry (xine_p this, const char *key,
config_values_t *config = this->config;
config->cur = config->lookup_entry (config, key);
+
+ /* do not hand out unclaimed entries */
+ if (config->cur && config->cur->type == CONFIG_TYPE_UNKNOWN)
+ config->cur = NULL;
return xine_config_get_current_entry (this, entry);
}