Index: head/audio/zinf/Makefile =================================================================== --- head/audio/zinf/Makefile (revision 433186) +++ head/audio/zinf/Makefile (revision 433187) @@ -1,53 +1,53 @@ # Created by: Roman Shterenzon # $FreeBSD$ PORTNAME= zinf PORTVERSION= 2.2.5 -PORTREVISION= 20 +PORTREVISION= 21 CATEGORIES= audio ipv6 MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= GTK-based MP3 player LIB_DEPENDS= libid3.so:audio/id3lib \ libgdbm.so:databases/gdbm USES= alias gettext gmake libtool ncurses pathfix perl5 pkgconfig USE_GNOME= gtk20 GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-ipv6 \ --disable-arts CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -lpthread -L${LOCALBASE}/lib OPTIONS_DEFINE= ESOUND VORBIS OPTIONS_DEFAULT=VORBIS OPTIONS_SUB= yes ESOUND_CONFIGURE_OFF= --disable-esd ESOUND_USE= GNOME=esound INSTALL_TARGET= install-strip VORBIS_CONFIGURE_OFF= --disable-vorbis VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis .include .if ${ARCH} == "i386" BUILD_DEPENDS+= nasm:devel/nasm CPPFLAGS+= "-D_M_IX86" .else CONFIGURE_ARGS+= --disable-x86opts .endif post-patch: @${REINPLACE_CMD} -e 's|Player::||' ${WRKSRC}/base/include/player.h post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/etc/sdr/plugins ${INSTALL_DATA} ${FILESDIR}/sdr2.plugin.S100.audio.rtp.mpa.zinf \ ${STAGEDIR}${PREFIX}/etc/sdr/plugins .include Index: head/audio/zinf/files/patch-base_src_downloadmanager.cpp =================================================================== --- head/audio/zinf/files/patch-base_src_downloadmanager.cpp (nonexistent) +++ head/audio/zinf/files/patch-base_src_downloadmanager.cpp (revision 433187) @@ -0,0 +1,38 @@ +--- base/src/downloadmanager.cpp.orig 2003-09-16 17:34:53 UTC ++++ base/src/downloadmanager.cpp +@@ -398,7 +398,7 @@ Error DownloadManager::ReadDownloadFile( + { + // find a suitable plugin + result = kError_FormatNotSupported; +- char* extension = strrchr(url, '.'); ++ const char* extension = strrchr(url, '.'); + + if(extension) + { +@@ -558,7 +558,7 @@ static int32_t GetContentLengthFromHeade + { + int32_t result = -1; + +- char* cp = strstr(buffer, "Content-Length:"); ++ const char* cp = strstr(buffer, "Content-Length:"); + + if(cp) + { +@@ -572,7 +572,7 @@ static int32_t GetContentLengthFromHeade + + static void GetContentTimeFromHeader(const char* buffer, string &mTime) + { +- char* cp = strstr(buffer, "Last-Modified:"); ++ const char* cp = strstr(buffer, "Last-Modified:"); + if(cp) + { + string::size_type pos; +@@ -748,7 +748,7 @@ Error DownloadManager::Download(Download + struct sockaddr_in addr; + struct hostent host; + SOCKET s = -1; +- char* file = NULL; ++ const char* file = NULL; + bool useProxy; + struct stat st; + string destPath; Property changes on: head/audio/zinf/files/patch-base_src_downloadmanager.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/zinf/files/patch-base_src_player.cpp =================================================================== --- head/audio/zinf/files/patch-base_src_player.cpp (nonexistent) +++ head/audio/zinf/files/patch-base_src_player.cpp (revision 433187) @@ -0,0 +1,51 @@ +--- base/src/player.cpp.orig 2004-02-02 17:39:35 UTC ++++ base/src/player.cpp +@@ -547,7 +547,7 @@ void Player::HandleSingleArg(char *arg) + // who needs to get this, plm or dlm? + bool giveToDLM = false; + bool giveToTheme = false; +- char* extension = NULL; ++ const char* extension = NULL; + + extension = strrchr(url.c_str(), '.'); + +@@ -1103,7 +1103,7 @@ char * + Player:: + GetProtocol(const char *title) + { +- char *temp_proto; ++ const char *temp_proto; + char *proto_return = NULL; + + temp_proto = strstr(title, "://"); +@@ -1122,7 +1122,7 @@ char * + Player:: + GetExtension(const char *title) + { +- char *temp_ext; ++ const char *temp_ext; + char *ext_return = NULL; + char *proto = NULL; + +@@ -1961,15 +1961,14 @@ HandlePrefsChanged(Event *pEvent) + m_context->prefs->GetPrefString(kProxyHostPref, &buffer); + } + +- char *port = strchr(buffer.c_str(),':'); +- if (port) { +- *port = '\0'; +- port++; +- } + string proxyAddr = buffer; + int nPort = 80; +- if (port && *port) +- nPort = atoi(port); ++ size_t pos = buffer.find(':'); ++ if (pos != string::npos) { ++ proxyAddr = buffer.substr(0, pos++); ++ if (pos < buffer.size()) ++ nPort = stoi(buffer.substr(pos)); ++ } + } + + Property changes on: head/audio/zinf/files/patch-base_src_player.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/zinf/files/patch-base_src_playlist.cpp =================================================================== --- head/audio/zinf/files/patch-base_src_playlist.cpp (nonexistent) +++ head/audio/zinf/files/patch-base_src_playlist.cpp (revision 433187) @@ -0,0 +1,20 @@ +--- base/src/playlist.cpp.orig 2003-09-16 17:58:13 UTC ++++ base/src/playlist.cpp +@@ -1961,7 +1961,7 @@ Error PlaylistManager::ReadPlaylist(cons + { + // find a suitable plugin + result = kError_FormatNotSupported; +- char* extension = strrchr(url, '.'); ++ const char* extension = strrchr(url, '.'); + + if(extension) + { +@@ -2042,7 +2042,7 @@ Error PlaylistManager::WritePlaylist(con + { + // find a suitable plugin + result = kError_FormatNotSupported; +- char* extension = strrchr(url, '.'); ++ const char* extension = strrchr(url, '.'); + + if(extension) + { Property changes on: head/audio/zinf/files/patch-base_src_playlist.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp =================================================================== --- head/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp (nonexistent) +++ head/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp (revision 433187) @@ -0,0 +1,11 @@ +--- io/cd/unix/src/cdpmo.cpp.orig 2003-09-16 17:34:59 UTC ++++ io/cd/unix/src/cdpmo.cpp +@@ -113,7 +113,7 @@ Error CDPMO::SetTo(const char *url) + if (IsError(Init(&blah))) + return kError_CDInitFailed; + +- char *tracknumber = strrchr(url, '/'); ++ const char *tracknumber = strrchr(url, '/'); + + if (!tracknumber) + tracknumber = (char *)url; Property changes on: head/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp =================================================================== --- head/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp (revision 433186) +++ head/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp (revision 433187) @@ -1,10 +1,19 @@ --- io/wavout/src/wavoutpmo.cpp.orig 2003-09-16 17:35:07 UTC +++ io/wavout/src/wavoutpmo.cpp @@ -28,7 +28,6 @@ ________________________________________ #endif #include #include -#include #include /* project headers */ +@@ -124,7 +124,7 @@ Init(OutputInfo* info) + // it, appending an ! to the filename, and changing the extention + // to wav + std::string path; +- char *pPtr = strrchr(GetUrl().c_str(), DIR_MARKER); ++ const char *pPtr = strrchr(GetUrl().c_str(), DIR_MARKER); + if (pPtr){ + path = pPtr+1; + pPtr = strrchr(path.c_str(), '.'); Index: head/audio/zinf/files/patch-lib_http_src_Http.cpp =================================================================== --- head/audio/zinf/files/patch-lib_http_src_Http.cpp (revision 433186) +++ head/audio/zinf/files/patch-lib_http_src_Http.cpp (revision 433187) @@ -1,18 +1,27 @@ --- lib/http/src/Http.cpp.orig 2003-09-16 17:35:09 UTC +++ lib/http/src/Http.cpp @@ -31,6 +31,7 @@ ________________________________________ #include "config.h" #include +#include #include #include #ifndef WIN32 @@ -39,6 +40,7 @@ ________________________________________ #include #include #include +#include #ifdef WIN32 #include +@@ -768,7 +768,7 @@ int32_t Http::GetContentLengthFromHeader + { + int32_t result = -1; + +- char* cp = strstr(buffer, "Content-Length:"); ++ const char* cp = strstr(buffer, "Content-Length:"); + + if(cp) + { Index: head/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp =================================================================== --- head/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp (nonexistent) +++ head/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp (revision 433187) @@ -0,0 +1,29 @@ +--- plm/metadata/id3lib/id3lib.cpp.orig 2004-02-14 01:51:03 UTC ++++ plm/metadata/id3lib/id3lib.cpp +@@ -363,7 +363,7 @@ bool ID3lib::ReadMetaData(const char* ur + assert(url); + assert(metadata); + +- char *ptr = strrchr(url, '.'); ++ const char *ptr = strrchr(url, '.'); + if (ptr == NULL) + return false; + +@@ -421,7 +421,7 @@ bool ID3lib::WriteMetaData(const char* u + char dummy[20]; + bool bWriteID3v1, bWriteID3v2; + luint whichTags; +- char *ptr; ++ const char *ptr; + + ptr = strrchr(url, '.'); + if (ptr == NULL) +@@ -485,7 +485,7 @@ void ID3lib::LookupGenre(int genreId, ch + + bool ID3lib::readMetadata(const std::string&url, map_type& pairs) + { +- char *ptr = strrchr(url.c_str(), '.'); ++ const char *ptr = strrchr(url.c_str(), '.'); + if (ptr == NULL) + return false; + Property changes on: head/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/zinf/files/patch-plm_metadata_misc_misc.cpp =================================================================== --- head/audio/zinf/files/patch-plm_metadata_misc_misc.cpp (nonexistent) +++ head/audio/zinf/files/patch-plm_metadata_misc_misc.cpp (revision 433187) @@ -0,0 +1,34 @@ +--- plm/metadata/misc/misc.cpp.orig 2003-09-16 17:35:19 UTC ++++ plm/metadata/misc/misc.cpp +@@ -104,26 +104,11 @@ bool Misc::ReadMetaData(const char* url, + if(!strncasecmp(url, "file://", 7) && !metadata->Time()) + { + RegistryItem *lmcItem = NULL; +- char* cp; +- +- cp = strrchr(url, '.'); +- if(cp) +- { +- cp++; +- +- char temp[256]; +- +- strcpy(temp, cp); +- +- cp = temp; +- +- while(*cp) +- { +- *cp = toupper(*cp); +- cp++; +- } +- +- string ext = temp; ++ const string temp(url); ++ size_t pos = temp.rfind('.'); ++ if (pos != string::npos) { ++ string ext = temp.substr(++pos); ++ transform(ext.begin(), ext.end(), ext.begin(), ::toupper); + + ExtensionMap::const_iterator iter = m_extensions.find(ext); + if(iter != m_extensions.end()) Property changes on: head/audio/zinf/files/patch-plm_metadata_misc_misc.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp =================================================================== --- head/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp (revision 433186) +++ head/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp (revision 433187) @@ -1,10 +1,40 @@ --- plm/metadata/vorbis/vorbis.cpp.orig 2004-02-10 18:21:14 UTC +++ plm/metadata/vorbis/vorbis.cpp @@ -23,6 +23,7 @@ ________________________________________ #include #include +#include #include #include #include +@@ -143,17 +143,18 @@ Vorbis::~Vorbis() + bool Vorbis::WriteMetaData(const char *url, const MetaData & metadata) + { + char dummy[20]; +- char *ptr; + bool writetags; + // We will support only id3-like tags. For a more complete list see + // http://reactor-core.org/ogg-tag-standard.html + +- ptr = strrchr(url, '.'); ++ { ++ const char *ptr = strrchr(url, '.'); + if (ptr == NULL) + return false; + + if (strcasecmp(ptr, ".ogg")) + return false; ++ } + + m_context->prefs->GetPrefBoolean(kWriteVorbisTagsPref, &writetags); + +@@ -216,7 +217,7 @@ bool Vorbis::WriteMetaData(const char *u + strncpy(newpath,path.c_str(),path.length()); + FILE *out = NULL; + +- ptr = strrchr(newpath, '.'); ++ char *ptr = strrchr(newpath, '.'); + if (ptr) + { + strcpy(ptr, "XXXXXX"); Index: head/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp =================================================================== --- head/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp (nonexistent) +++ head/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp (revision 433187) @@ -0,0 +1,11 @@ +--- ui/musicbrowser/unix/src/gtkmusicbrowser.cpp.orig 2004-02-02 18:34:19 UTC ++++ ui/musicbrowser/unix/src/gtkmusicbrowser.cpp +@@ -1203,7 +1203,7 @@ void GTKMusicBrowser::SaveCurrentPlaylis + if (m_currentListName.length() == 0) + return; + +- char *ext = strrchr(m_currentListName.c_str(), '.'); ++ const char *ext = strrchr(m_currentListName.c_str(), '.'); + if (ext) + ext = ext + 1; + Error result = kError_NoErr; Property changes on: head/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp =================================================================== --- head/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp (nonexistent) +++ head/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp (revision 433187) @@ -0,0 +1,11 @@ +--- ui/zinf/src/Headlines.cpp.orig 2003-09-16 17:35:32 UTC ++++ ui/zinf/src/Headlines.cpp +@@ -215,7 +215,7 @@ Error Headlines::PCData(string &oData) + + Error Headlines::EndElement(string &oElement) + { +- char *pPtr; ++ const char *pPtr; + int iOffset; + + pPtr = strrchr(m_oPath.c_str(), '/'); Property changes on: head/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp =================================================================== --- head/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp (revision 433186) +++ head/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp (revision 433187) @@ -1,24 +1,33 @@ --- ui/zinf/src/ThemeZip.cpp.orig 2003-09-16 17:36:22 UTC +++ ui/zinf/src/ThemeZip.cpp @@ -21,11 +21,12 @@ $Id: ThemeZip.cpp,v 1.8 2003/09/16 17:36:22 kgk Exp $ ____________________________________________________________________________*/ -#include #include #include #include +#if HAVE_STDINT_H #include +#endif #ifdef WIN32 #include @@ -44,6 +45,7 @@ ________________________________________ #include #endif #include +#include using namespace std; #include "zlib.h" +@@ -143,7 +143,7 @@ Error ThemeZip::CompressThemeZip(const s + pBuffer = new char[iBufferSize]; + for(i = oFileList.begin(); i != oFileList.end(); i++) + { +- char *pPtr; ++ const char *pPtr; + time_t ltime; + + oFile = *(*i); Index: head/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp =================================================================== --- head/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp (nonexistent) +++ head/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp (revision 433187) @@ -0,0 +1,11 @@ +--- ui/zinf/src/ZinfTheme.cpp.orig 2003-09-16 17:36:22 UTC ++++ ui/zinf/src/ZinfTheme.cpp +@@ -1739,7 +1739,7 @@ void ZinfTheme::DropFiles(vector + countbefore = m_pContext->plm->CountItems(); + + for(i = pFileList->begin(); i != pFileList->end(); i++){ +- char *pExtension = NULL; ++ const char *pExtension = NULL; + vector fileList; + struct _stat st; + Property changes on: head/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp =================================================================== --- head/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp (nonexistent) +++ head/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp (revision 433187) @@ -0,0 +1,11 @@ +--- ui/zinf/unix/src/GTKPreferenceWindow.cpp.orig 2003-11-20 23:58:47 UTC ++++ ui/zinf/unix/src/GTKPreferenceWindow.cpp +@@ -1752,7 +1752,7 @@ void GTKPreferenceWindow::UpdateThemeLis + originalValues.listboxIndex = proposedValues.listboxIndex + = currentValues.listboxIndex = iLoop; + else { +- char *name = strrchr((*i).second.c_str(), '/'); ++ const char *name = strrchr((*i).second.c_str(), '/'); + if (name) { + name++; + if (name && *name) { Property changes on: head/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property