|
From: <arn...@us...> - 2008-03-05 21:23:09
|
Revision: 1026
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1026&view=rev
Author: arnetheduck
Date: 2008-03-05 13:23:05 -0800 (Wed, 05 Mar 2008)
Log Message:
-----------
Patches
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/File.cpp
dcplusplus/trunk/dcpp/Util.cpp
dcplusplus/trunk/win32/AboutDlg.cpp
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-03-04 23:26:14 UTC (rev 1025)
+++ dcplusplus/trunk/changelog.txt 2008-03-05 21:23:05 UTC (rev 1026)
@@ -40,8 +40,8 @@
* [L#195209] Fixed tabbing in hub windows (poy)
* [L#195209] Fixed Ctrl+F that opens favorite hubs (poy)
* [L#194696] Fixed small memory leak
+* Some unix compile fixes (thanks pavel andreev and yakov suraev)
-
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
* Use system header arrows on common controls 6+ (thanks poy)
Modified: dcplusplus/trunk/dcpp/File.cpp
===================================================================
--- dcplusplus/trunk/dcpp/File.cpp 2008-03-04 23:26:14 UTC (rev 1025)
+++ dcplusplus/trunk/dcpp/File.cpp 2008-03-05 21:23:05 UTC (rev 1026)
@@ -225,7 +225,7 @@
throw FileException("Invalid file type");
}
- h = open(fileName.c_str(), m, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+ h = open(filename.c_str(), m, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if(h == -1)
throw FileException("Could not open file");
}
@@ -350,7 +350,7 @@
// This doesn't assume all bytes are written in one write call, it is a bit safer
void File::copyFile(const string& source, const string& target) throw(FileException) {
const size_t BUF_SIZE = 64 * 1024;
- boost::scoped_array<char> buffer(BUF_SIZE);
+ boost::scoped_array<char> buffer(new char[BUF_SIZE]);
size_t count = BUF_SIZE;
File src(source, File::READ, 0);
File dst(target, File::WRITE, File::CREATE | File::TRUNCATE);
Modified: dcplusplus/trunk/dcpp/Util.cpp
===================================================================
--- dcplusplus/trunk/dcpp/Util.cpp 2008-03-04 23:26:14 UTC (rev 1025)
+++ dcplusplus/trunk/dcpp/Util.cpp 2008-03-05 21:23:05 UTC (rev 1026)
@@ -379,7 +379,7 @@
#else
char buf[128];
snprintf(buf, sizeof(buf), _("%'lld B"), (long long int)aBytes);
- return string(buf)
+ return string(buf);
#endif
}
@@ -714,14 +714,17 @@
#else
// will this give wide representations for %a and %A?
// surely win32 can't have a leg up on linux/unixen in this area. - Todd
- AutoArray<char> buf(bufsize);
+ string buf(bufsize, 0);
- while(!strftime(buf, bufsize-1, msg.c_str(), loc)) {
+ buf.resize(strftime(&buf[0], bufsize-1, msg.c_str(), loc));
+
+ while(buf.empty()) {
bufsize+=64;
- buf = new char[bufsize];
+ buf.resize(bufsize);
+ buf.resize(strftime(&buf[0], bufsize-1, msg.c_str(), loc));
}
- return Text::toUtf8(string(buf));
+ return Text::toUtf8(buf);
#endif
}
return Util::emptyString;
Modified: dcplusplus/trunk/win32/AboutDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/AboutDlg.cpp 2008-03-04 23:26:14 UTC (rev 1025)
+++ dcplusplus/trunk/win32/AboutDlg.cpp 2008-03-05 21:23:05 UTC (rev 1026)
@@ -41,7 +41,7 @@
"bsod, sulan, jonathan stone, tim burton, izzzo, guitarm, paka, nils maier, jens oknelid, yoji, "
"krzysztof tyszecki, poison, mikejj, pur, bigmuscle, martin, jove, bart vullings, "
"steven sheehy, tobias nygren, poy, dorian, stephan hohe, mafa_45, mikael eman, james ross,"
-"stanislav maslovski, david grundberg. "
+"stanislav maslovski, david grundberg, pavel andreev, yakov suraev. "
"Keep it coming!";
AboutDlg::AboutDlg(SmartWin::Widget* parent) : WidgetFactory<SmartWin::WidgetModalDialog>(parent) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|