From f7cc5b2efddece7cdc4fc5b7fc5324d33b7dfa8f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Jul 2009 16:57:37 +0200 Subject: state_file: don't rewind the stream while reading the state file Parse the state file line by line, let each subsystem probe a line. Only the playlist_state code gets the FILE pointer to read the following lines. --- src/playlist_state.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/playlist_state.h') diff --git a/src/playlist_state.h b/src/playlist_state.h index 989430264..7ed7e8c8e 100644 --- a/src/playlist_state.h +++ b/src/playlist_state.h @@ -25,6 +25,7 @@ #ifndef PLAYLIST_STATE_H #define PLAYLIST_STATE_H +#include #include struct playlist; @@ -32,7 +33,7 @@ struct playlist; void playlist_state_save(FILE *fp, const struct playlist *playlist); -void -playlist_state_restore(FILE *fp, struct playlist *playlist); +bool +playlist_state_restore(const char *line, FILE *fp, struct playlist *playlist); #endif -- cgit v1.2.3