Andy Kriger wrote:
Can someone recommend a good command-line tool for editing mp3 tags?

_____________________

I'm happy with this one:

http://home.wanadoo.nl/squell/id3.html

See attached correspondence for building under cygwin. In the most recent distro, $(CXXFLAGS) was omitted from the makefile at one point where it should follow $(CXX). The only other change I found necessary was the modification of charconv.h suggested below by the author.

_____________________________

Marc R. Schoolderman wrote:

> Charles D. Russell wrote:
>
>> I can successfully build id3 v0.78 under cygwin using the -mno-cygwin option, which invokes the mingw package instead of using the cygwin dll. However, the -q option in id3 then produces output strings terminated with a carriage return that I have to filter out in order to use the string in a bash script. It would be nice if I could get a normal cygwin build with normal unix emulation, but when I omit
>
>
>
> I think you already mailed me on this;


Yes, but I had not encountered the carriage return problem, so I thought it was a complete fix.

> the -mno-cygwin switch seems to me to be a fine approach to take and I'll make sure to document this in next release.
>
> Attached is a quick hack to which should force stdout to binary mode on Windows; please try it.
>
That looks like a GNU patch file, but since I've never used the GNU patch tool, and don't even know if I have it installed, I didn't try this.

>
> As another possible solution, in order to get a regular Cygwin build, changing line 32 in charconv.h:
>
>     #if (__DJGPP__) || (__GNUC__ == 2)
>
> into:
>
>     #if 1
>
> might help.


This does the trick! No error messages in the build, and the .exe has the desired unix-like behavior with no carriage returns in the print strings..

Thanks again.
_____________________________________

--- main.cpp    2006-03-21 10:03:46 +0100
+++ patched.cpp    2007-01-03 22:00:06 +0100
@@ -5,6 +5,8 @@
#include <ctime>
#include <stdexcept>
#include <string>
+#include <io.h>
+#include <fcntl.h>
#include "setgroup.h"
#include "setid3.h"
#include "setfname.h"
@@ -470,6 +472,7 @@

int main(int argc, char *argv[])
{
+    setmode(fileno(stdout), O_BINARY);
    if(char* prog = argv[0]) {                // set up program name
        if(char* p = strrchr(argpath(prog), '/')) prog = p+1;
#if defined(__DJGPP__) || defined(__WIN32__)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to