delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/02/13:06:25

X-Spam-Check-By: sourceware.org
Message-ID: <45C37D9D.2030403@bellsouth.net>
Date: Fri, 02 Feb 2007 12:06:21 -0600
From: "Charles D. Russell" <worwor AT bellsouth DOT net>
Reply-To: worwor AT bellsouth DOT net
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: cygwin cygwin <cygwin AT cygwin DOT com>
Subject: Re: mp3 tag editor for cygwin
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019