On Mar 19, 2009, at 12:49 PM, Max Kellermann wrote: > On 2009/03/18 18:05, enco...@xmtp.net wrote: >> PS- hope you enjoyed your vacation > > I'm still in Switzerland, but there's net access everywhere ;)
Get off the net and get to exploring! :) >> Move print_sticker function into the sticker.c file. (FReq >> 2112) > > I'd prefer having a separate library "sticker_print.c" (just like > song_print.c). I don't like that sticker.h or sticker.c include > client.h, I like having light dependencies between the libraries. It > simplifies those test programs in ./test/. Your way, a sticker test > program would need the whole client.c code, and everything else > attached to that. > > In header files (sticker_print.h once you write it), use a forward > struct declaration instead of including client.h. Good idea, will do. > Besides, that patch does not compile: > > src/command.c: In function 'handle_sticker_song': > src/command.c:1491: error: passing argument 2 of 'sticker_foreach' > from incompatible pointer type Interesting, compiles and runs here. I do see the above as a warning though..? I'll get it fixed up so it's not giving a warning or an error. > In the print_sticker function, you're casting GString to char*. That > is illegal. Also never cast functions. I'll get that fixed too, thanks. >> Move db_get_song into sub-handlers. (FReq 2112) > > src/command.c: In function 'handle_sticker_song': > src/command.c:1483: error: 'song' undeclared (first use in this > function) > src/command.c:1483: error: (Each undeclared identifier is reported > only once > src/command.c:1483: error: for each function it appears in.) > cc1: warnings being treated as errors > src/command.c:1484: error: declaration of 'song' shadows previous > non-variable > src/command.c:1498: error: passing argument 2 of 'sticker_foreach' > from incompatible pointer type > src/command.c:1504: error: declaration of 'song' shadows previous > non-variable Now I'm starting to think I failed to properly use stgit again or something. I don't see any of those. >> Basic functionality of the sticker find song command. (FReq >> 2112) > > I don't think we need to search the sticker name. If we really do > need that, we should make it a separate command. Easy enough to remove. >> Add a wildcard to either end of the search term for sticker >> find song. (F > > That's a good one, because clients shouldn't have to deal with > sqlite's LIKE syntax - they shouldn't use it, because MPD might switch > to any other backend library at any time (e.g. BerkeleyDB). Yeah, I would have done it from the get go, but for a while it wasn't working, and to be honest, I'm not totally sure what I changed that allowed it to work. It seemed as though, once I allowed it to free the memory holding the bound variable, it started to work. Seems odd, but I'm not expert with sqlite's C api. e. -- er...@xmtp.net "If the answer isn't violence, neither is your silence!" -- Pop Will Eat Itself, "Ich Bin Ein Auslander" ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team