aboutsummaryrefslogtreecommitdiff
path: root/src/state_file.c
Commit message (Collapse)AuthorAge
* include config.h in all sourcesMax Kellermann2009-11-12
| | | | | | After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
* configure.ac: require GLib 2.12Max Kellermann2009-11-10
| | | | | | Drop the required GLib version from 2.16 to 2.12, because many current systems still don't have GLib 2.16. This requires several new compatibility functions in glib_compat.h.
* state_file: use g_timeout_add_seconds()Max Kellermann2009-10-13
|
* state_file: save only if something has changedMax Kellermann2009-10-08
| | | | | | If nothing has changed since the last save, don't save the state file. Saving will spin up the hard drive, which is undesirable on hosts where MPD is idling in background.
* output_state: no CamelCaseMax Kellermann2009-10-06
|
* state_file: don't rewind the stream while reading the state fileMax Kellermann2009-07-15
| | | | | | 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.
* state_file: simplified state_file_finish()Max Kellermann2009-07-15
| | | | | Return early from the destructor function when there is no configured state file. Don't check the timer, don't call g_free(NULL).
* state_file: fixed debug messagesMax Kellermann2009-07-15
| | | | | Print "Loading" instead of "Saving" in state_file_read(). Added debug message to state_file_write().
* playlist: removed {save,read}PlaylistState()Max Kellermann2009-07-14
| | | | | | Those were only wrappers for playlist_state_{save,restore}(). Since sf_callbacks has been removed, we can call the latter functions directly.
* state_file: eliminated the sf_callbacks arrayMax Kellermann2009-07-14
| | | | | There are very few callbacks, and they are not meant to be pluggable. Let's eliminate the array and call the load/save functions manually.
* all: Update copyright header.Avuton Olrich2009-03-13
| | | | | | | | This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
* audio: moved state file code to output_state.cMax Kellermann2009-02-10
|
* main: moved the save_state timer to state_file.cMax Kellermann2009-01-18
| | | | The state_file library should manage its own regular saves.
* state_file: added state_file_init() and state_file_finish()Max Kellermann2009-01-18
| | | | | The constructor/destructor interface should hide the functions read_state_file() and write_state_file().
* state_file: include cleanupMax Kellermann2009-01-18
|
* conf: no CamelCase, part IMax Kellermann2009-01-17
| | | | Renamed functions, types, variables.
* state_file: use GLib instead of utils.h / stat()Max Kellermann2009-01-03
|
* state_file: errors are non-fatal in read_state_file()Max Kellermann2009-01-03
| | | | | If the state file cannot be read, for whatever reason, don't abort MPD. The state file isn't _that_ important.
* state_file: use GLib loggingMax Kellermann2008-12-29
|
* replaced mpd_noreturn by G_GNUC_NORETURNThomas Jansen2008-12-02
| | | | | We want to remove gcc.h eventually. This takes care of all the G_GNUC_NORETURN macros.
* replaced mpd_likely/mpd_unlikely by G_LIKELY/G_UNLIKELYThomas Jansen2008-12-02
| | | | | We want to remove gcc.h eventually. This takes care of all the G_LIKELY/G_UNLIKELY macros.
* don't include os_compat.hMax Kellermann2008-10-08
| | | | | When there are standardized headers, use these instead of the bloated os_compat.h.
* Remove EINTR checking for open(2)Eric Wong2008-09-23
| | | | | | open(2) should only interrupt on "slow" devices, afaik... [mk: still using fopen()]
* unsigned countersMax Kellermann2008-03-26
| | | | | | | | Use unsigned variables for storing the count of items or for iteration variables. Since there can never be a negative number of items, it makes sense to use an unsigned data type here. This change is safe because the unsigned values are only used for adddressing array items. git-svn-id: https://svn.musicpd.org/mpd/trunk@7214 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleanup #includes of standard system headers and put them in one placeEric Wong2008-01-03
| | | | | | | | | | | | | This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* export FATAL() with noreturn attributeEric Wong2007-08-27
| | | | | | | | | | | | | | | | | | | | | This attribute was set in log.c, but not exported to other modules in log.h This allows us to remove some unneccessary variable initializations that were added in r6277. I did audioOutput_shout.c a bit differently, to avoid some jumps. before: $ size src/mpd text data bss dec hex filename 225546 4040 14600 244186 3b9da src/mpd after: $ size src/mpd text data bss dec hex filename 224698 4040 14600 243338 3b68a src/mpd git-svn-id: https://svn.musicpd.org/mpd/trunk@6821 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* After changing ERROR();exit() to FATAL(), gcc incorrectly detects someJ. Alexander Treuman2007-05-26
| | | | | | uninitialized variables and non-returning functions that return. Let's tell it to stfu. git-svn-id: https://svn.musicpd.org/mpd/trunk@6277 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Changing all calls to ERROR() followed by exit(EXIT_FAILURE) with a singleJ. Alexander Treuman2007-05-26
| | | | | call to FATAL(). git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* The massive copyright updateAvuton Olrich2007-04-05
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Don't initialize globals to zero (or NULL)Eric Wong2007-01-14
| | | | | | | | Some compilers and linkers aren't smart enough to optimize this, as global variables are implictly initialized to zero. As a result, binaries are a bit smaller as more goes in the .bss and less in the text section. git-svn-id: https://svn.musicpd.org/mpd/trunk@5254 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* software volume can now be saved and read from the state fileEric Wong2006-07-30
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4495 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Standardize state_file handling routines.Eric Wong2006-07-30
This way it's easier to manage and extend. git-svn-id: https://svn.musicpd.org/mpd/trunk@4494 09075e82-0dd4-0310-85a5-a0d7c8717e4f