On 2010/01/05 22:50, Jeff Frasca <phaed...@u.washington.edu> wrote:
>> On Tue, 5 Jan 2010, Max Kellermann wrote:
>>> The tab command should be disabled with --enable-mini.  It's unlikely
>>> to be useful on those tiny platforms.
>
> Alright, I've got a mockup of the 'mpc radd' code working.  It's
> available at:
>
>       git pull http://sasquatch-labs.org/git/mpc.git mpc-add-regex
>
> (That repo has everything I've done merged in master, so pulling master  
> from there should have the same effect.)

- why are you adding _all_ songs to the temporary file, and apply
  regex later?  You could save a lot of space by doing the filter
  first

- don't include regex.h if !MPC_SMALL_BUILD

- do we need a configure.ac test for regex.h?  Is that portable?
  (what about mingw32?)

- why memset(fnames)?

- why use a temporary file?  You could either allocate all song URIs
  on the heap (may be expensive, but I don't think that's a problem)
  or open a second MPD connection for adding while receiving songs on
  the first one

- is mkstemp() portable to mingw32?

- you can close(tmpf) right after mmap(), the file descriptor isn't
  needed after the mmap has been established

- is mmap() portable to mingw32?

- turn the loop around: first parse all regular expressions, then
  iterate through the list of songs, applying all regular expressions
  to that URI until one matches; eliminates the manual duplicate
  detection

It is particularly important that we don't break the mingw32 build.
Can you test that, please?  (--host=i586-mingw32msvc)

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to