diff options
-rw-r--r-- | audio/zinf/Makefile | 2 | ||||
-rw-r--r-- | audio/zinf/files/patch-base_src_downloadmanager.cpp | 38 | ||||
-rw-r--r-- | audio/zinf/files/patch-base_src_player.cpp | 51 | ||||
-rw-r--r-- | audio/zinf/files/patch-base_src_playlist.cpp | 20 | ||||
-rw-r--r-- | audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp | 11 | ||||
-rw-r--r-- | audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp | 9 | ||||
-rw-r--r-- | audio/zinf/files/patch-lib_http_src_Http.cpp | 9 | ||||
-rw-r--r-- | audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp | 29 | ||||
-rw-r--r-- | audio/zinf/files/patch-plm_metadata_misc_misc.cpp | 34 | ||||
-rw-r--r-- | audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp | 30 | ||||
-rw-r--r-- | audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp | 11 | ||||
-rw-r--r-- | audio/zinf/files/patch-ui_zinf_src_Headlines.cpp | 11 | ||||
-rw-r--r-- | audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp | 9 | ||||
-rw-r--r-- | audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp | 11 | ||||
-rw-r--r-- | audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp | 11 |
15 files changed, 285 insertions, 1 deletions
diff --git a/audio/zinf/Makefile b/audio/zinf/Makefile index dac7d9f7d6f7..ff6f0f60fa7f 100644 --- a/audio/zinf/Makefile +++ b/audio/zinf/Makefile @@ -3,7 +3,7 @@ PORTNAME= zinf PORTVERSION= 2.2.5 -PORTREVISION= 20 +PORTREVISION= 21 CATEGORIES= audio ipv6 MASTER_SITES= SF diff --git a/audio/zinf/files/patch-base_src_downloadmanager.cpp b/audio/zinf/files/patch-base_src_downloadmanager.cpp new file mode 100644 index 000000000000..eaebd03877b8 --- /dev/null +++ b/audio/zinf/files/patch-base_src_downloadmanager.cpp @@ -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; diff --git a/audio/zinf/files/patch-base_src_player.cpp b/audio/zinf/files/patch-base_src_player.cpp new file mode 100644 index 000000000000..5a82a41bd214 --- /dev/null +++ b/audio/zinf/files/patch-base_src_player.cpp @@ -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)); ++ } + } + + diff --git a/audio/zinf/files/patch-base_src_playlist.cpp b/audio/zinf/files/patch-base_src_playlist.cpp new file mode 100644 index 000000000000..75c470dbee27 --- /dev/null +++ b/audio/zinf/files/patch-base_src_playlist.cpp @@ -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) + { diff --git a/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp b/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp new file mode 100644 index 000000000000..259608227b22 --- /dev/null +++ b/audio/zinf/files/patch-io_cd_unix_src_cdpmo.cpp @@ -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; diff --git a/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp b/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp index 6b4c6f003c6c..c60508c0c322 100644 --- a/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp +++ b/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp @@ -8,3 +8,12 @@ #include <string> /* 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(), '.'); diff --git a/audio/zinf/files/patch-lib_http_src_Http.cpp b/audio/zinf/files/patch-lib_http_src_Http.cpp index 5cada3879152..86ee08b4ae01 100644 --- a/audio/zinf/files/patch-lib_http_src_Http.cpp +++ b/audio/zinf/files/patch-lib_http_src_Http.cpp @@ -16,3 +16,12 @@ #ifdef WIN32 #include <io.h> +@@ -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) + { diff --git a/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp b/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp new file mode 100644 index 000000000000..143797f02eb1 --- /dev/null +++ b/audio/zinf/files/patch-plm_metadata_id3lib_id3lib.cpp @@ -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; + diff --git a/audio/zinf/files/patch-plm_metadata_misc_misc.cpp b/audio/zinf/files/patch-plm_metadata_misc_misc.cpp new file mode 100644 index 000000000000..828b88186937 --- /dev/null +++ b/audio/zinf/files/patch-plm_metadata_misc_misc.cpp @@ -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()) diff --git a/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp b/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp index 6442850bb505..9bede1167cd6 100644 --- a/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp +++ b/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp @@ -8,3 +8,33 @@ #include <math.h> #include <assert.h> #include <string> +@@ -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"); diff --git a/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp b/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp new file mode 100644 index 000000000000..a8656c2227e9 --- /dev/null +++ b/audio/zinf/files/patch-ui_musicbrowser_unix_src_gtkmusicbrowser.cpp @@ -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; diff --git a/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp b/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp new file mode 100644 index 000000000000..ae37a79554be --- /dev/null +++ b/audio/zinf/files/patch-ui_zinf_src_Headlines.cpp @@ -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(), '/'); diff --git a/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp b/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp index e84806062df8..207b3fd80bba 100644 --- a/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp +++ b/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp @@ -22,3 +22,12 @@ 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); diff --git a/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp b/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp new file mode 100644 index 000000000000..4a22704586e2 --- /dev/null +++ b/audio/zinf/files/patch-ui_zinf_src_ZinfTheme.cpp @@ -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<string> + countbefore = m_pContext->plm->CountItems(); + + for(i = pFileList->begin(); i != pFileList->end(); i++){ +- char *pExtension = NULL; ++ const char *pExtension = NULL; + vector<char*> fileList; + struct _stat st; + diff --git a/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp b/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp new file mode 100644 index 000000000000..c28ca45c0818 --- /dev/null +++ b/audio/zinf/files/patch-ui_zinf_unix_src_GTKPreferenceWindow.cpp @@ -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) { |