aboutsummaryrefslogtreecommitdiffstats
path: root/src/locate.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* locate: make variables more localMax Kellermann2012-06-271-19/+10
|
* locate: remove unused function locate_item_new()Max Kellermann2011-09-131-13/+0
|
* copyright year 2011Max Kellermann2011-01-291-1/+1
|
* Update copyright notices.Avuton Olrich2009-12-311-1/+1
|
* include config.h in all sourcesMax Kellermann2009-11-121-0/+1
| | | | | | 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.
* tag: added function tag_name_parse()Max Kellermann2009-11-041-3/+3
| | | | Convert a string into a tag_type enum.
* locate: use g_ascii_strcasecmp() instead of strcasecmp()Max Kellermann2009-04-281-4/+4
| | | | | strcasecmp() is locale dependent, making it a bad choice for internal string comparisons.
* all: Update copyright header.Avuton Olrich2009-03-131-6/+7
| | | | | | | | 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.
* tag: make tag.num_items unsignedMax Kellermann2009-02-271-2/+1
| | | | | | There's no point in declaring num_items as a uint8_t, it doesn't save any space, due to padding. This allows us to lift the articial "255 items" limitation.
* tag: no CamelCaseMax Kellermann2009-02-271-4/+3
| | | | Renamed numOfItems to num_items.
* use g_free() instead of free()Max Kellermann2009-01-251-3/+3
| | | | | | On some platforms, g_free() must be used for memory allocated by GLib. This patch intends to correct a lot of occurrences, but is probably not complete.
* Fix tag not being set when casefolding the locate_item_listQball Cow2009-01-251-1/+3
|
* locate: added locate_item_list_casefold()Max Kellermann2009-01-241-0/+12
| | | | | Merged casefolding code from two locations into this one library function.
* queue_print, dbUtils: use struct locate_item_listMax Kellermann2009-01-241-8/+10
| | | | | Changed the function prototypes to get locate_item_list objects instead of num_items/items.
* locate: added struct locate_item_listMax Kellermann2009-01-241-26/+26
| | | | | Instead of passing two parameters around (number of items, array of items), combine both in a variable size struct.
* locate: initialize the whole visited_types arrayMax Kellermann2009-01-241-2/+6
| | | | | The declaration initialized only the first element. Initialize the whole array with memset() instead.
* locate: use bool instead of intMax Kellermann2009-01-241-31/+30
| | | | Use the C99 bool type instead of integer values (1/0 or 0/-1).
* locate: no CamelCaseMax Kellermann2009-01-241-54/+39
| | | | Renamed functions and variables.
* locate: renamed LocateTagItem to "struct locate_item"Max Kellermann2009-01-241-11/+13
| | | | No CamelCase and no typedefs.
* locate: use const pointersMax Kellermann2009-01-221-5/+7
| | | | Pass const pointers where no writes are performed.
* locate: fix strcmp() return value checkMax Kellermann2009-01-051-1/+1
| | | | | Yesterday's patch set changed tagItemFoundAndMatches() and moved the strcmp() return value into a bool, but forgot to add the ==0 check.
* song: allocate the result of song_get_url()Max Kellermann2009-01-041-5/+11
|
* locate: use GLib instead of utils.hMax Kellermann2009-01-021-4/+5
|
* locate: ignore case when searching in song pathsMax Kellermann2008-12-131-1/+1
| | | | | | The function strstrSearchTag() used g_utf8_casefold() to generate the (pseudo-)lowercase version of the song's URL, but it never used the variable.
* locate: use g_utf8_casefold() instead of string_toupper()Max Kellermann2008-10-151-4/+8
| | | | | | string_toupper() and strDupToUpper() were not able to deal with character sets other than US-ASCII. Use GLib's g_utf8_casefold() for strings.
* song: removed CamelCaseMax Kellermann2008-10-081-2/+2
| | | | CamelCase is ugly... rename all functions.
* song: converted typedef Song to struct songMax Kellermann2008-10-081-4/+10
| | | | Again, a data type which can be forward-declared.
* Switch to C99 types (retaining compat with old compilers)Eric Wong2008-09-291-2/+2
| | | | | | | | | | | | | | | Seeing the "mpd_" prefix _everywhere_ is mind-numbing as the mind needs to retrain itself to skip over the first 4 tokens of a type to get to its meaning. So avoid having extra characters on my terminal to make it easier to follow code at 2:30 am in the morning. Please report any new issues you may come across on Free toolchains. I realize how difficult it can be to build/maintain cross-compiling toolchains and I have no intention of forcing people to upgrade their toolchains to build mpd. Tested with gcc 2.95.4 and and gcc 4.3.1 on x86-32.
* allow searching for albums with an empty tagEric Wong2008-09-291-1/+23
| | | | | | | | | | | | | | | | | | | | tfing wrote: > I have quite some files with an empty album tag as they do not come > from a particular album. > > If I want to look for those files and browse them, this happens: > :: nc localhost 6600 > OK MPD 0.12.0 > find album "" > ACK [2@0] {find} too few arguments for "find" > > I'd like to be able to browse those files in a client like gmpc. > So these 2 items would have to be developed: > - list album should report that some files have an empty tag > - it should be possible to search for an empty tag with the find command Patch-by: Marc Pavot ref: http://musicpd.org/mantis/view.php?id=464
* include cleanupMax Kellermann2008-09-061-0/+1
| | | | As usual, include only headers which are really needed.
* tag: converted MpdTag.items to a pointer listMax Kellermann2008-08-291-4/+4
| | | | | | This prepares the following patches, which aim to reduce MPD's memory usage: we plan to share tag_item instances, instead of just their values.
* converted MpdTagItem.type to an enumMax Kellermann2008-08-261-2/+2
| | | | | Don't use CPP macros when you can use C enum... this also allows better type checking.
* clean up CPP includesMax Kellermann2008-04-121-1/+1
| | | | | | | | | Try to only include headers which are really needed. We should particularly check all "headers including other headers". The long-term goal is to have a manageable, small API for plugins (decoders, output) without so many mpd internals cluttering the namespace. git-svn-id: https://svn.musicpd.org/mpd/trunk@7319 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix -Wconst warningsMax Kellermann2008-02-051-3/+4
| | | | | | [ew: cleaned up the dirty union hack a bit] Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fixed -Wshadow warningsMax Kellermann2008-01-261-4/+4
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Merge branches/ew r7104Eric Wong2007-12-281-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thread-safety work in preparation for rewrite to use pthreads Expect no regressions against trunk (r7078), possibly minor performance improvements in update (due to fewer heap allocations), but increased stack usage. Applied the following patches: * maxpath_str for reentrancy (temporary fix, reverted) * path: start working on thread-safe variants of these methods * Re-entrancy work on path/character-set conversions * directory.c: exploreDirectory() use reentrant functions here * directory/update: more use of reentrant functions + cleanups * string_toupper: a strdup-less version of strDupToUpper * get_song_url: a static-variable-free version of getSongUrl() * Use reentrant/thread-safe get_song_url everywhere * replace rmp2amp with the reentrant version, rmp2amp_r * Get rid of the non-reentrant/non-thread-safe rpp2app, too. * buffer2array: assert strdup() returns a usable value in unit tests * replace utf8ToFsCharset and fsCharsetToUtf8 with thread-safe variants * fix storing playlists w/o absolute paths * parent_path(), a reentrant version of parentPath() * parentPath => parent_path for reentrancy and thread-safety * allow "make test" to automatically run embedded unit tests * remove convStrDup() and maxpath_str() * use MPD_PATH_MAX everywhere instead of MAXPATHLEN * path: get rid of appendSlash, pfx_path and just use pfx_dir * get_song_url: fix the ability to play songs in the top-level music_directory git-svn-id: https://svn.musicpd.org/mpd/trunk@7106 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Use "file" instead of SONG_INFO (literally "file: ") forJ. Alexander Treuman2007-03-201-2/+2
| | | | | | LOCATE_TAG_KEY_FILE. Specifying "file: " as an argument to search/find/list wasn't the point of that patch... git-svn-id: https://svn.musicpd.org/mpd/trunk@5670 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Adding copyright headers to locate.[ch].J. Alexander Treuman2007-02-241-0/+18
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5422 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Moving a bunch of the LocateTagItem code to locate.[ch] so that it canJ. Alexander Treuman2007-02-241-0/+193
later be used for playlist searching. git-svn-id: https://svn.musicpd.org/mpd/trunk@5419 09075e82-0dd4-0310-85a5-a0d7c8717e4f