trunk: backport eventing from 1.4.3

This commit is contained in:
Marian Krivos
2012-02-05 12:16:58 +00:00
parent 59fe68edbe
commit 7d7c02c579
412 changed files with 3564 additions and 3634 deletions

View File

@@ -1,7 +1,7 @@
//
// ASCIIEncoding.cpp
//
// $Id: //poco/svn/Foundation/src/ASCIIEncoding.cpp#2 $
// $Id: //poco/1.4/Foundation/src/ASCIIEncoding.cpp#1 $
//
// Library: Foundation
// Package: Text

View File

@@ -1,7 +1,7 @@
//
// AbstractObserver.cpp
//
// $Id: //poco/svn/Foundation/src/AbstractObserver.cpp#2 $
// $Id: //poco/1.4/Foundation/src/AbstractObserver.cpp#1 $
//
// Library: Foundation
// Package: Notifications

View File

@@ -1,7 +1,7 @@
//
// ActiveDispatcher.cpp
//
// $Id: //poco/svn/Foundation/src/ActiveDispatcher.cpp#2 $
// $Id: //poco/1.4/Foundation/src/ActiveDispatcher.cpp#1 $
//
// Library: Foundation
// Package: Threading

View File

@@ -1,7 +1,7 @@
//
// ArchiveStrategy.cpp
//
// $Id: //poco/Main/Foundation/src/ArchiveStrategy.cpp#9 $
// $Id: //poco/1.4/Foundation/src/ArchiveStrategy.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// AsyncChannel.cpp
//
// $Id: //poco/svn/Foundation/src/AsyncChannel.cpp#2 $
// $Id: //poco/1.4/Foundation/src/AsyncChannel.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// AtomicCounter.cpp
//
// $Id: //poco/1.4/Foundation/src/AtomicCounter.cpp#1 $
// $Id: //poco/1.4/Foundation/src/AtomicCounter.cpp#2 $
//
// Library: Foundation
// Package: Core
@@ -127,7 +127,7 @@ AtomicCounter& AtomicCounter::operator = (AtomicCounter::ValueType value)
// GCC 4.1+ atomic builtins.
//
AtomicCounter::AtomicCounter():
_counter(0)
_counter(0)
{
}
@@ -151,15 +151,15 @@ AtomicCounter::~AtomicCounter()
AtomicCounter& AtomicCounter::operator = (const AtomicCounter& counter)
{
__sync_lock_test_and_set(&_counter, counter.value());
return *this;
__sync_lock_test_and_set(&_counter, counter.value());
return *this;
}
AtomicCounter& AtomicCounter::operator = (AtomicCounter::ValueType value)
{
__sync_lock_test_and_set(&_counter, value);
return *this;
__sync_lock_test_and_set(&_counter, value);
return *this;
}

View File

@@ -1,7 +1,7 @@
//
// Bugcheck.cpp
//
// $Id: //poco/svn/Foundation/src/Bugcheck.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Bugcheck.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// ByteOrder.cpp
//
// $Id: //poco/svn/Foundation/src/ByteOrder.cpp#2 $
// $Id: //poco/1.4/Foundation/src/ByteOrder.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// Channel.cpp
//
// $Id: //poco/svn/Foundation/src/Channel.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Channel.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// Checksum.cpp
//
// $Id: //poco/svn/Foundation/src/Checksum.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Checksum.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// Condition.cpp
//
// $Id: //poco/svn/Foundation/src/Condition.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Condition.cpp#1 $
//
// Library: Foundation
// Package: Threading

View File

@@ -1,7 +1,7 @@
//
// Configurable.cpp
//
// $Id: //poco/svn/Foundation/src/Configurable.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Configurable.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// ConsoleChannel.cpp
//
// $Id: //poco/svn/Foundation/src/ConsoleChannel.cpp#2 $
// $Id: //poco/1.4/Foundation/src/ConsoleChannel.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// CountingStream.cpp
//
// $Id: //poco/svn/Foundation/src/CountingStream.cpp#2 $
// $Id: //poco/1.4/Foundation/src/CountingStream.cpp#1 $
//
// Library: Foundation
// Package: Streams

View File

@@ -1,7 +1,7 @@
//
// DateTime.cpp
//
// $Id: //poco/svn/Foundation/src/DateTime.cpp#2 $
// $Id: //poco/1.4/Foundation/src/DateTime.cpp#1 $
//
// Library: Foundation
// Package: DateTime
@@ -335,9 +335,19 @@ double DateTime::toJulianDay(int year, int month, int day, int hour, int minute,
}
void DateTime::checkLimit(short& lower, short& higher, short limit)
{
if (lower >= limit)
{
higher += short(lower / limit);
lower = short(lower % limit);
}
}
void DateTime::normalize()
{
checkLimit(_microsecond, _millisecond, 1000);
checkLimit(_microsecond, _millisecond, 1000);
checkLimit(_millisecond, _second, 1000);
checkLimit(_second, _minute, 60);
checkLimit(_minute, _hour, 60);

View File

@@ -1,7 +1,7 @@
//
// DateTimeFormat.cpp
//
// $Id: //poco/svn/Foundation/src/DateTimeFormat.cpp#2 $
// $Id: //poco/1.4/Foundation/src/DateTimeFormat.cpp#2 $
//
// Library: Foundation
// Package: DateTime

View File

@@ -1,7 +1,7 @@
//
// DateTimeFormatter.cpp
//
// $Id: //poco/Main/Foundation/src/DateTimeFormatter.cpp#14 $
// $Id: //poco/1.4/Foundation/src/DateTimeFormatter.cpp#3 $
//
// Library: Foundation
// Package: DateTime
@@ -76,16 +76,16 @@ void DateTimeFormatter::append(std::string& str, const DateTime& dateTime, const
case 'H': NumberFormatter::append0(str, dateTime.hour(), 2); break;
case 'h': NumberFormatter::append0(str, dateTime.hourAMPM(), 2); break;
case 'a': str.append(dateTime.isAM() ? "am" : "pm"); break;
case 'A': str.append(dateTime.isAM() ? "AM" : "PM"); break;
case 'M': NumberFormatter::append0(str, dateTime.minute(), 2); break;
case 'S': NumberFormatter::append0(str, dateTime.second(), 2); break;
case 's': NumberFormatter::append0(str, dateTime.second(), 2);
str += '.';
NumberFormatter::append0(str, dateTime.millisecond()*1000 + dateTime.microsecond(), 6);
break;
case 'i': NumberFormatter::append0(str, dateTime.millisecond(), 3); break;
case 'c': NumberFormatter::append(str, dateTime.millisecond()/100); break;
case 'F': NumberFormatter::append0(str, dateTime.millisecond()*1000 + dateTime.microsecond(), 6); break;
case 'A': str.append(dateTime.isAM() ? "AM" : "PM"); break;
case 'M': NumberFormatter::append0(str, dateTime.minute(), 2); break;
case 'S': NumberFormatter::append0(str, dateTime.second(), 2); break;
case 's': NumberFormatter::append0(str, dateTime.second(), 2);
str += '.';
NumberFormatter::append0(str, dateTime.millisecond()*1000 + dateTime.microsecond(), 6);
break;
case 'i': NumberFormatter::append0(str, dateTime.millisecond(), 3); break;
case 'c': NumberFormatter::append(str, dateTime.millisecond()/100); break;
case 'F': NumberFormatter::append0(str, dateTime.millisecond()*1000 + dateTime.microsecond(), 6); break;
case 'z': tzdISO(str, timeZoneDifferential); break;
case 'Z': tzdRFC(str, timeZoneDifferential); break;
default: str += *it;

View File

@@ -1,7 +1,7 @@
//
// DigestEngine.cpp
//
// $Id: //poco/Main/Foundation/src/DigestEngine.cpp#11 $
// $Id: //poco/1.4/Foundation/src/DigestEngine.cpp#1 $
//
// Library: Foundation
// Package: Crypt
@@ -61,43 +61,43 @@ std::string DigestEngine::digestToHex(const Digest& bytes)
unsigned char c = *it;
result += digits[(c >> 4) & 0xF];
result += digits[c & 0xF];
}
return result;
}
return result;
}
DigestEngine::Digest DigestEngine::digestFromHex(const std::string& digest)
{
if (digest.size() % 2 != 0)
throw DataFormatException();
Digest result;
result.reserve(digest.size()/2);
for (std::size_t i = 0; i < digest.size(); ++i)
{
int c = 0;
// first upper 4 bits
if (digest[i] >= '0' && digest[i] <= '9')
c = digest[i] - '0';
else if (digest[i] >= 'a' && digest[i] <= 'f')
c = digest[i] - 'a'+10;
else if (digest[i] >= 'A' && digest[i] <= 'F')
c = digest[i] - 'A'+10;
else
throw DataFormatException();
c <<= 4;
++i;
if (digest[i] >= '0' && digest[i] <= '9')
c += digest[i] - '0';
else if (digest[i] >= 'a' && digest[i] <= 'f')
c += digest[i] - 'a'+10;
else if (digest[i] >= 'A' && digest[i] <= 'F')
c += digest[i] - 'A'+10;
else
throw DataFormatException();
if (digest.size() % 2 != 0)
throw DataFormatException();
Digest result;
result.reserve(digest.size()/2);
for (std::size_t i = 0; i < digest.size(); ++i)
{
int c = 0;
// first upper 4 bits
if (digest[i] >= '0' && digest[i] <= '9')
c = digest[i] - '0';
else if (digest[i] >= 'a' && digest[i] <= 'f')
c = digest[i] - 'a'+10;
else if (digest[i] >= 'A' && digest[i] <= 'F')
c = digest[i] - 'A'+10;
else
throw DataFormatException();
c <<= 4;
++i;
if (digest[i] >= '0' && digest[i] <= '9')
c += digest[i] - '0';
else if (digest[i] >= 'a' && digest[i] <= 'f')
c += digest[i] - 'a'+10;
else if (digest[i] >= 'A' && digest[i] <= 'F')
c += digest[i] - 'A'+10;
else
throw DataFormatException();
result.push_back(static_cast<unsigned char>(c));
}
return result;
result.push_back(static_cast<unsigned char>(c));
}
return result;
}

View File

@@ -1,7 +1,7 @@
//
// DigestStream.cpp
//
// $Id: //poco/svn/Foundation/src/DigestStream.cpp#2 $
// $Id: //poco/1.4/Foundation/src/DigestStream.cpp#1 $
//
// Library: Foundation
// Package: Crypt

View File

@@ -1,7 +1,7 @@
//
// DirectoryIterator.cpp
//
// $Id: //poco/svn/Foundation/src/DirectoryIterator.cpp#2 $
// $Id: //poco/1.4/Foundation/src/DirectoryIterator.cpp#1 $
//
// Library: Foundation
// Package: Filesystem

View File

@@ -1,7 +1,7 @@
//
// DirectoryIterator_UNIX.cpp
//
// $Id: //poco/svn/Foundation/src/DirectoryIterator_UNIX.cpp#2 $
// $Id: //poco/1.4/Foundation/src/DirectoryIterator_UNIX.cpp#2 $
//
// Library: Foundation
// Package: Filesystem

View File

@@ -1,7 +1,7 @@
//
// DirectoryIterator_VMS.cpp
//
// $Id: //poco/svn/Foundation/src/DirectoryIterator_VMS.cpp#2 $
// $Id: //poco/1.4/Foundation/src/DirectoryIterator_VMS.cpp#1 $
//
// Library: Foundation
// Package: Filesystem

View File

@@ -1,7 +1,7 @@
//
// DirectoryIterator_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/DirectoryIterator_WIN32.cpp#2 $
// $Id: //poco/1.4/Foundation/src/DirectoryIterator_WIN32.cpp#1 $
//
// Library: Foundation
// Package: Filesystem

View File

@@ -1,7 +1,7 @@
//
// DirectoryIterator_WIN32U.cpp
//
// $Id: //poco/svn/Foundation/src/DirectoryIterator_WIN32U.cpp#2 $
// $Id: //poco/1.4/Foundation/src/DirectoryIterator_WIN32U.cpp#1 $
//
// Library: Foundation
// Package: Filesystem

View File

@@ -1,7 +1,7 @@
//
// ErrorHandler.cpp
//
// $Id: //poco/svn/Foundation/src/ErrorHandler.cpp#2 $
// $Id: //poco/1.4/Foundation/src/ErrorHandler.cpp#1 $
//
// Library: Foundation
// Package: Threading

View File

@@ -1,7 +1,7 @@
//
// Event.cpp
//
// $Id: //poco/svn/Foundation/src/Event.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Event.cpp#2 $
//
// Library: Foundation
// Package: Threading

View File

@@ -1,7 +1,7 @@
//
// EventArgs.cpp
//
// $Id: //poco/svn/Foundation/src/EventArgs.cpp#2 $
// $Id: //poco/1.4/Foundation/src/EventArgs.cpp#1 $
//
// Library: Foundation
// Package: Events

View File

@@ -1,7 +1,7 @@
//
// EventLogChannel.cpp
//
// $Id: //poco/1.3/Foundation/src/EventLogChannel.cpp#2 $
// $Id: //poco/1.4/Foundation/src/EventLogChannel.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// Event_POSIX.cpp
//
// $Id: //poco/svn/Foundation/src/Event_POSIX.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Event_POSIX.cpp#3 $
//
// Library: Foundation
// Package: Threading

View File

@@ -1,7 +1,7 @@
//
// Event_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/Event_WIN32.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Event_WIN32.cpp#1 $
//
// Library: Foundation
// Package: Threading

View File

@@ -1,7 +1,7 @@
//
// Exception.cpp
//
// $Id: //poco/svn/Foundation/src/Exception.cpp#3 $
// $Id: //poco/1.4/Foundation/src/Exception.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// FPEnvironment.cpp
//
// $Id: //poco/svn/Foundation/src/FPEnvironment.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FPEnvironment.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// FPEnvironment_C99.cpp
//
// $Id: //poco/svn/Foundation/src/FPEnvironment_C99.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FPEnvironment_C99.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// FPEnvironment_DEC.cpp
//
// $Id: //poco/svn/Foundation/src/FPEnvironment_DEC.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FPEnvironment_DEC.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// FPEnvironment_C99.cpp
//
// $Id: //poco/svn/Foundation/src/FPEnvironment_DUMMY.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FPEnvironment_DUMMY.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// FPEnvironment_SUN.cpp
//
// $Id: //poco/svn/Foundation/src/FPEnvironment_SUN.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FPEnvironment_SUN.cpp#1 $
//
// Library: Foundation
// Package: Core
@@ -34,7 +34,7 @@
//
#ifndef __EXTENSIONS__
# define __EXTENSIONS__
# define __EXTENSIONS__
#endif
#include <math.h>
#include "Poco/FPEnvironment_SUN.h"

View File

@@ -1,7 +1,7 @@
//
// FPEnvironment_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/FPEnvironment_WIN32.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FPEnvironment_WIN32.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// File.cpp
//
// $Id: //poco/Main/Foundation/src/File.cpp#22 $
// $Id: //poco/1.4/Foundation/src/File.cpp#3 $
//
// Library: Foundation
// Package: Filesystem
@@ -189,48 +189,48 @@ Timestamp File::getLastModified() const
return getLastModifiedImpl();
}
File& File::setLastModified(const Timestamp& ts)
{
setLastModifiedImpl(ts);
setLastModifiedImpl(ts);
return *this;
}
File::FileSize File::getSize() const
{
return getSizeImpl();
}
File& File::setSize(FileSizeImpl size)
{
setSizeImpl(size);
setSizeImpl(size);
return *this;
}
File& File::setWriteable(bool flag)
{
setWriteableImpl(flag);
setWriteableImpl(flag);
return *this;
}
File& File::setReadOnly(bool flag)
{
setWriteableImpl(!flag);
setWriteableImpl(!flag);
return *this;
}
File& File::setExecutable(bool flag)
{
setExecutableImpl(flag);
setExecutableImpl(flag);
return *this;
}
void File::copyTo(const std::string& path) const
{
Path src(getPathImpl());

View File

@@ -1,7 +1,7 @@
//
// FileChannel.cpp
//
// $Id: //poco/1.3/Foundation/src/FileChannel.cpp#3 $
// $Id: //poco/1.4/Foundation/src/FileChannel.cpp#1 $
//
// Library: Foundation
// Package: Logging
@@ -217,17 +217,17 @@ const std::string& FileChannel::path() const
void FileChannel::setRotation(const std::string& rotation)
{
std::string::const_iterator it = rotation.begin();
std::string::const_iterator end = rotation.end();
int n = 0;
while (it != end && Ascii::isSpace(*it)) ++it;
while (it != end && Ascii::isDigit(*it)) { n *= 10; n += *it++ - '0'; }
while (it != end && Ascii::isSpace(*it)) ++it;
std::string unit;
while (it != end && Ascii::isAlpha(*it)) unit += *it++;
RotateStrategy* pStrategy = 0;
if ((rotation.find(',') != std::string::npos) || (rotation.find(':') != std::string::npos))
std::string::const_iterator it = rotation.begin();
std::string::const_iterator end = rotation.end();
int n = 0;
while (it != end && Ascii::isSpace(*it)) ++it;
while (it != end && Ascii::isDigit(*it)) { n *= 10; n += *it++ - '0'; }
while (it != end && Ascii::isSpace(*it)) ++it;
std::string unit;
while (it != end && Ascii::isAlpha(*it)) unit += *it++;
RotateStrategy* pStrategy = 0;
if ((rotation.find(',') != std::string::npos) || (rotation.find(':') != std::string::npos))
{
if (_times == "utc")
pStrategy = new RotateAtTimeStrategy<DateTime>(rotation);
@@ -313,12 +313,12 @@ void FileChannel::setPurgeAge(const std::string& age)
int n = 0;
while (it != end && Ascii::isSpace(*it)) ++it;
while (it != end && Ascii::isDigit(*it)) { n *= 10; n += *it++ - '0'; }
while (it != end && Ascii::isSpace(*it)) ++it;
std::string unit;
while (it != end && Ascii::isAlpha(*it)) unit += *it++;
Timespan::TimeDiff factor = Timespan::SECONDS;
if (unit == "minutes")
while (it != end && Ascii::isSpace(*it)) ++it;
std::string unit;
while (it != end && Ascii::isAlpha(*it)) unit += *it++;
Timespan::TimeDiff factor = Timespan::SECONDS;
if (unit == "minutes")
factor = Timespan::MINUTES;
else if (unit == "hours")
factor = Timespan::HOURS;
@@ -350,9 +350,9 @@ void FileChannel::setPurgeCount(const std::string& count)
std::string::const_iterator it = count.begin();
std::string::const_iterator end = count.end();
while (it != end && Ascii::isSpace(*it)) ++it;
while (it != end && Ascii::isDigit(*it)) { n *= 10; n += *it++ - '0'; }
while (it != end && Ascii::isSpace(*it)) ++it;
while (it != end && Ascii::isSpace(*it)) ++it;
while (it != end && Ascii::isDigit(*it)) { n *= 10; n += *it++ - '0'; }
while (it != end && Ascii::isSpace(*it)) ++it;
if (0 == n)
throw InvalidArgumentException("Zero is not valid purge count.");

View File

@@ -1,7 +1,7 @@
//
// FileStream.cpp
//
// $Id: //poco/svn/Foundation/src/FileStream.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FileStream.cpp#1 $
//
// Library: Foundation
// Package: Streams

View File

@@ -1,7 +1,7 @@
//
// FileStreamFactory.cpp
//
// $Id: //poco/svn/Foundation/src/FileStreamFactory.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FileStreamFactory.cpp#1 $
//
// Library: Foundation
// Package: URI

View File

@@ -1,7 +1,7 @@
//
// FileStream_POSIX.cpp
//
// $Id: //poco/svn/Foundation/src/FileStream_POSIX.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FileStream_POSIX.cpp#2 $
//
// Library: Foundation
// Package: Streams

View File

@@ -1,7 +1,7 @@
//
// File_UNIX.cpp
//
// $Id: //poco/Main/Foundation/src/File_UNIX.cpp#26 $
// $Id: //poco/1.4/Foundation/src/File_UNIX.cpp#1 $
//
// Library: Foundation
// Package: Filesystem
@@ -404,12 +404,12 @@ void FileImpl::removeImpl()
bool FileImpl::createFileImpl()
{
poco_assert (!_path.empty());
int n = open(_path.c_str(), O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (n != -1)
{
close(n);
poco_assert (!_path.empty());
int n = open(_path.c_str(), O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (n != -1)
{
close(n);
return true;
}
if (n == -1 && errno == EEXIST)

View File

@@ -1,7 +1,7 @@
//
// File_VMS.cpp
//
// $Id: //poco/Main/Foundation/src/File_VMS.cpp#18 $
// $Id: //poco/1.4/Foundation/src/File_VMS.cpp#1 $
//
// Library: Foundation
// Package: Filesystem

View File

@@ -1,7 +1,7 @@
//
// File_WIN32.cpp
//
// $Id: //poco/Main/Foundation/src/File_WIN32.cpp#24 $
// $Id: //poco/1.4/Foundation/src/File_WIN32.cpp#1 $
//
// Library: Foundation
// Package: Filesystem
@@ -46,12 +46,12 @@ namespace Poco {
class FileHandle
{
public:
FileHandle(const std::string& path, DWORD access, DWORD share, DWORD disp)
{
_h = CreateFileA(path.c_str(), access, share, 0, disp, 0, 0);
if (_h == INVALID_HANDLE_VALUE)
{
FileImpl::handleLastErrorImpl(path);
FileHandle(const std::string& path, DWORD access, DWORD share, DWORD disp)
{
_h = CreateFileA(path.c_str(), access, share, 0, disp, 0, 0);
if (_h == INVALID_HANDLE_VALUE)
{
FileImpl::handleLastErrorImpl(path);
}
}

View File

@@ -1,7 +1,7 @@
//
// File_WIN32U.cpp
//
// $Id: //poco/Main/Foundation/src/File_WIN32U.cpp#17 $
// $Id: //poco/1.4/Foundation/src/File_WIN32U.cpp#1 $
//
// Library: Foundation
// Package: Filesystem

View File

@@ -1,7 +1,7 @@
//
// Format.cpp
//
// $Id: //poco/1.4/Foundation/src/Format.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Format.cpp#5 $
//
// Library: Foundation
// Package: Core
@@ -166,17 +166,17 @@ namespace
}
void formatOne(std::string& result, std::string::const_iterator& itFmt, const std::string::const_iterator& endFmt, std::vector<Any>::const_iterator& itVal)
{
std::ostringstream str;
void formatOne(std::string& result, std::string::const_iterator& itFmt, const std::string::const_iterator& endFmt, std::vector<Any>::const_iterator& itVal)
{
std::ostringstream str;
#if !defined(POCO_NO_LOCALE)
str.imbue(std::locale::classic());
str.imbue(std::locale::classic());
#endif
try
{
parseFlags(str, itFmt, endFmt);
parseWidth(str, itFmt, endFmt);
parsePrec(str, itFmt, endFmt);
try
{
parseFlags(str, itFmt, endFmt);
parseWidth(str, itFmt, endFmt);
parsePrec(str, itFmt, endFmt);
char mod = parseMod(itFmt, endFmt);
if (itFmt != endFmt)
{
@@ -234,16 +234,16 @@ namespace
case 'I':
case 'D':
default:
str << type;
}
}
}
catch (Poco::BadCastException&)
{
str << "[ERRFMT]";
}
result.append(str.str());
}
str << type;
}
}
}
catch (Poco::BadCastException&)
{
str << "[ERRFMT]";
}
result.append(str.str());
}
}

View File

@@ -1,7 +1,7 @@
//
// Formatter.cpp
//
// $Id: //poco/svn/Foundation/src/Formatter.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Formatter.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// FormattingChannel.cpp
//
// $Id: //poco/svn/Foundation/src/FormattingChannel.cpp#2 $
// $Id: //poco/1.4/Foundation/src/FormattingChannel.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// Glob.cpp
//
// $Id: //poco/1.3/Foundation/src/Glob.cpp#3 $
// $Id: //poco/1.4/Foundation/src/Glob.cpp#2 $
//
// Library: Foundation
// Package: Filesystem
@@ -259,20 +259,20 @@ void Glob::collect(const Path& pathPattern, const Path& base, const Path& curren
bool Glob::isDirectory(const Path& path, bool followSymlink)
{
File f(path);
bool isDir = false;
try
{
isDir = f.isDirectory();
}
catch (Poco::Exception&)
{
return false;
}
if (isDir)
{
return true;
}
File f(path);
bool isDir = false;
try
{
isDir = f.isDirectory();
}
catch (Poco::Exception&)
{
return false;
}
if (isDir)
{
return true;
}
else if (followSymlink && f.isLink())
{
try

View File

@@ -1,7 +1,7 @@
//
// Hash.cpp
//
// $Id: //poco/svn/Foundation/src/Hash.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Hash.cpp#1 $
//
// Library: Foundation
// Package: Hashing

View File

@@ -1,7 +1,7 @@
//
// HashStatistic.cpp
//
// $Id: //poco/svn/Foundation/src/HashStatistic.cpp#2 $
// $Id: //poco/1.4/Foundation/src/HashStatistic.cpp#1 $
//
// Library: Foundation
// Package: Hashing

View File

@@ -1,7 +1,7 @@
//
// HexBinaryDecoder.cpp
//
// $Id: //poco/svn/Foundation/src/HexBinaryDecoder.cpp#2 $
// $Id: //poco/1.4/Foundation/src/HexBinaryDecoder.cpp#2 $
//
// Library: Foundation
// Package: Streams
@@ -42,7 +42,7 @@ namespace Poco {
HexBinaryDecoderBuf::HexBinaryDecoderBuf(std::istream& istr):
_buf(*istr.rdbuf())
_buf(*istr.rdbuf())
{
}
@@ -62,13 +62,13 @@ int HexBinaryDecoderBuf::readFromDevice()
else if (n >= 'A' && n <= 'F')
c = n - 'A' + 10;
else if (n >= 'a' && n <= 'f')
c = n - 'a' + 10;
else throw DataFormatException();
c <<= 4;
if ((n = readOne()) == -1) throw DataFormatException();
if (n >= '0' && n <= '9')
c |= n - '0';
else if (n >= 'A' && n <= 'F')
c = n - 'a' + 10;
else throw DataFormatException();
c <<= 4;
if ((n = readOne()) == -1) throw DataFormatException();
if (n >= '0' && n <= '9')
c |= n - '0';
else if (n >= 'A' && n <= 'F')
c |= n - 'A' + 10;
else if (n >= 'a' && n <= 'f')
c |= n - 'a' + 10;
@@ -79,10 +79,10 @@ int HexBinaryDecoderBuf::readFromDevice()
int HexBinaryDecoderBuf::readOne()
{
int ch = _buf.sbumpc();
while (ch == ' ' || ch == '\r' || ch == '\t' || ch == '\n')
ch = _buf.sbumpc();
return ch;
int ch = _buf.sbumpc();
while (ch == ' ' || ch == '\r' || ch == '\t' || ch == '\n')
ch = _buf.sbumpc();
return ch;
}

View File

@@ -1,7 +1,7 @@
//
// Latin1Encoding.cpp
//
// $Id: //poco/svn/Foundation/src/Latin1Encoding.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Latin1Encoding.cpp#1 $
//
// Library: Foundation
// Package: Text

View File

@@ -1,7 +1,7 @@
//
// Latin9Encoding.cpp
//
// $Id: //poco/Main/Foundation/src/Latin9Encoding.cpp#12 $
// $Id: //poco/1.4/Foundation/src/Latin9Encoding.cpp#1 $
//
// Library: Foundation
// Package: Text

View File

@@ -1,7 +1,7 @@
//
// LineEndingConverter.cpp
//
// $Id: //poco/svn/Foundation/src/LineEndingConverter.cpp#2 $
// $Id: //poco/1.4/Foundation/src/LineEndingConverter.cpp#1 $
//
// Library: Foundation
// Package: Streams

View File

@@ -1,7 +1,7 @@
//
// LocalDateTime.cpp
//
// $Id: //poco/svn/Foundation/src/LocalDateTime.cpp#3 $
// $Id: //poco/1.4/Foundation/src/LocalDateTime.cpp#2 $
//
// Library: Foundation
// Package: DateTime
@@ -289,19 +289,19 @@ void LocalDateTime::determineTzd(bool adjust)
std::tm* broken = std::localtime(&epochTime);
#endif
if (!broken) throw Poco::SystemException("cannot get local time");
_tzd = (Timezone::utcOffset() + ((broken->tm_isdst == 1) ? 3600 : 0));
_tzd = (Timezone::utcOffset() + ((broken->tm_isdst == 1) ? 3600 : 0));
#else
std::tm broken;
std::tm broken;
#if defined(POCO_VXWORKS)
if (localtime_r(&epochTime, &broken) != OK)
throw Poco::SystemException("cannot get local time");
if (localtime_r(&epochTime, &broken) != OK)
throw Poco::SystemException("cannot get local time");
#else
if (!localtime_r(&epochTime, &broken))
throw Poco::SystemException("cannot get local time");
if (!localtime_r(&epochTime, &broken))
throw Poco::SystemException("cannot get local time");
#endif
_tzd = (Timezone::utcOffset() + ((broken.tm_isdst == 1) ? 3600 : 0));
_tzd = (Timezone::utcOffset() + ((broken.tm_isdst == 1) ? 3600 : 0));
#endif
adjustForTzd();
adjustForTzd();
}
else
{

View File

@@ -1,7 +1,7 @@
//
// LogFile.cpp
//
// $Id: //poco/svn/Foundation/src/LogFile.cpp#2 $
// $Id: //poco/1.4/Foundation/src/LogFile.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// LogFile_STD.cpp
//
// $Id: //poco/svn/Foundation/src/LogFile_STD.cpp#2 $
// $Id: //poco/1.4/Foundation/src/LogFile_STD.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// LogFile_VMS.cpp
//
// $Id: //poco/svn/Foundation/src/LogFile_VMS.cpp#2 $
// $Id: //poco/1.4/Foundation/src/LogFile_VMS.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// LogFile_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/LogFile_WIN32.cpp#2 $
// $Id: //poco/1.4/Foundation/src/LogFile_WIN32.cpp#1 $
//
// Library: Foundation
// Package: Logging
@@ -127,5 +127,4 @@ void LogFileImpl::createFile()
_creationDate = File(_path).created();
}
} // namespace Poco

View File

@@ -1,7 +1,7 @@
//
// LogFile_WIN32U.cpp
//
// $Id: //poco/svn/Foundation/src/LogFile_WIN32U.cpp#2 $
// $Id: //poco/1.4/Foundation/src/LogFile_WIN32U.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// LogStream.cpp
//
// $Id: //poco/svn/Foundation/src/LogStream.cpp#2 $
// $Id: //poco/1.4/Foundation/src/LogStream.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// Logger.cpp
//
// $Id: //poco/svn/Foundation/src/Logger.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Logger.cpp#4 $
//
// Library: Foundation
// Package: Logging
@@ -84,7 +84,7 @@ void Logger::setLevel(int level)
void Logger::setLevel(const std::string& level)
{
setLevel(parseLevel(level));
setLevel(parseLevel(level));
}
@@ -433,26 +433,26 @@ Logger& Logger::parent(const std::string& name)
int Logger::parseLevel(const std::string& level)
{
if (icompare(level, "none") == 0)
return 0;
else if (icompare(level, "fatal") == 0)
return Message::PRIO_FATAL;
else if (icompare(level, "critical") == 0)
return Message::PRIO_CRITICAL;
else if (icompare(level, "error") == 0)
return Message::PRIO_ERROR;
else if (icompare(level, "warning") == 0)
return Message::PRIO_WARNING;
else if (icompare(level, "notice") == 0)
return Message::PRIO_NOTICE;
else if (icompare(level, "information") == 0)
return Message::PRIO_INFORMATION;
else if (icompare(level, "debug") == 0)
return Message::PRIO_DEBUG;
else if (icompare(level, "trace") == 0)
return Message::PRIO_TRACE;
else
throw InvalidArgumentException("Not a valid log level", level);
if (icompare(level, "none") == 0)
return 0;
else if (icompare(level, "fatal") == 0)
return Message::PRIO_FATAL;
else if (icompare(level, "critical") == 0)
return Message::PRIO_CRITICAL;
else if (icompare(level, "error") == 0)
return Message::PRIO_ERROR;
else if (icompare(level, "warning") == 0)
return Message::PRIO_WARNING;
else if (icompare(level, "notice") == 0)
return Message::PRIO_NOTICE;
else if (icompare(level, "information") == 0)
return Message::PRIO_INFORMATION;
else if (icompare(level, "debug") == 0)
return Message::PRIO_DEBUG;
else if (icompare(level, "trace") == 0)
return Message::PRIO_TRACE;
else
throw InvalidArgumentException("Not a valid log level", level);
}

View File

@@ -1,7 +1,7 @@
//
// LoggingFactory.cpp
//
// $Id: //poco/svn/Foundation/src/LoggingFactory.cpp#2 $
// $Id: //poco/1.4/Foundation/src/LoggingFactory.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// LoggingRegistry.cpp
//
// $Id: //poco/svn/Foundation/src/LoggingRegistry.cpp#2 $
// $Id: //poco/1.4/Foundation/src/LoggingRegistry.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// MD4Engine.cpp
//
// $Id: //poco/svn/Foundation/src/MD4Engine.cpp#2 $
// $Id: //poco/1.4/Foundation/src/MD4Engine.cpp#1 $
//
// Library: Foundation
// Package: Crypt

View File

@@ -1,7 +1,7 @@
//
// MD5Engine.cpp
//
// $Id: //poco/svn/Foundation/src/MD5Engine.cpp#2 $
// $Id: //poco/1.4/Foundation/src/MD5Engine.cpp#1 $
//
// Library: Foundation
// Package: Crypt

View File

@@ -1,7 +1,7 @@
//
// Manifest.cpp
//
// $Id: //poco/svn/Foundation/src/Manifest.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Manifest.cpp#1 $
//
// Library: Foundation
// Package: SharedLibrary

View File

@@ -1,7 +1,7 @@
//
// MemoryPool.cpp
//
// $Id: //poco/svn/Foundation/src/MemoryPool.cpp#2 $
// $Id: //poco/1.4/Foundation/src/MemoryPool.cpp#1 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// Message.cpp
//
// $Id: //poco/svn/Foundation/src/Message.cpp#3 $
// $Id: //poco/1.4/Foundation/src/Message.cpp#2 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// Mutex.cpp
//
// $Id: //poco/svn/Foundation/src/Mutex.cpp#3 $
// $Id: //poco/1.4/Foundation/src/Mutex.cpp#2 $
//
// Library: Foundation
// Package: Threading

View File

@@ -1,7 +1,7 @@
//
// Mutex_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/Mutex_WIN32.cpp#3 $
// $Id: //poco/1.4/Foundation/src/Mutex_WIN32.cpp#1 $
//
// Library: Foundation
// Package: Threading

View File

@@ -1,7 +1,7 @@
//
// NamedEvent.cpp
//
// $Id: //poco/svn/Foundation/src/NamedEvent.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedEvent.cpp#2 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// NamedEvent_UNIX.cpp
//
// $Id: //poco/svn/Foundation/src/NamedEvent_UNIX.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedEvent_UNIX.cpp#1 $
//
// Library: Foundation
// Package: Processes
@@ -57,13 +57,13 @@ namespace Poco {
{
int val;
struct semid_ds* buf;
unsigned short int* array;
struct seminfo* __buf;
};
unsigned short int* array;
struct seminfo* __buf;
};
#elif defined(__hpux)
union semun
{
int val;
union semun
{
int val;
struct semid_ds* buf;
ushort* array;
};
@@ -71,13 +71,13 @@ namespace Poco {
NamedEventImpl::NamedEventImpl(const std::string& name):
_name(name)
_name(name)
{
std::string fileName = getFileName();
std::string fileName = getFileName();
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
_sem = sem_open(fileName.c_str(), O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, 0);
if ((long) _sem == (long) SEM_FAILED)
throw SystemException("cannot create named event (sem_open() failed)", _name);
_sem = sem_open(fileName.c_str(), O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, 0);
if ((long) _sem == (long) SEM_FAILED)
throw SystemException("cannot create named event (sem_open() failed)", _name);
#else
int fd = open(fileName.c_str(), O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (fd != -1)
@@ -96,9 +96,9 @@ NamedEventImpl::NamedEventImpl(const std::string& name):
}
else if (errno == EEXIST)
{
_semid = semget(key, 1, 0);
}
else throw SystemException("cannot create named event (semget() failed)", _name);
_semid = semget(key, 1, 0);
}
else throw SystemException("cannot create named event (semget() failed)", _name);
#endif // defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
}
@@ -106,7 +106,7 @@ NamedEventImpl::NamedEventImpl(const std::string& name):
NamedEventImpl::~NamedEventImpl()
{
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
sem_close(_sem);
sem_close(_sem);
#endif
}
@@ -114,8 +114,8 @@ NamedEventImpl::~NamedEventImpl()
void NamedEventImpl::setImpl()
{
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
if (sem_post(_sem) != 0)
throw SystemException("cannot set named event", _name);
if (sem_post(_sem) != 0)
throw SystemException("cannot set named event", _name);
#else
struct sembuf op;
op.sem_num = 0;
@@ -130,9 +130,9 @@ void NamedEventImpl::setImpl()
void NamedEventImpl::waitImpl()
{
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
int err;
do
{
int err;
do
{
err = sem_wait(_sem);
}
while (err && errno == EINTR);

View File

@@ -1,7 +1,7 @@
//
// NamedEvent_VMS.cpp
//
// $Id: //poco/svn/Foundation/src/NamedEvent_VMS.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedEvent_VMS.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// NamedEvent_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/NamedEvent_WIN32.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedEvent_WIN32.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// NamedEvent_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/NamedEvent_WIN32U.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedEvent_WIN32U.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// NamedMutex.cpp
//
// $Id: //poco/svn/Foundation/src/NamedMutex.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedMutex.cpp#2 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// NamedMutex_UNIX.cpp
//
// $Id: //poco/svn/Foundation/src/NamedMutex_UNIX.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedMutex_UNIX.cpp#1 $
//
// Library: Foundation
// Package: Processes
@@ -57,13 +57,13 @@ namespace Poco {
{
int val;
struct semid_ds* buf;
unsigned short int* array;
struct seminfo* __buf;
};
unsigned short int* array;
struct seminfo* __buf;
};
#elif defined(__hpux)
union semun
{
int val;
union semun
{
int val;
struct semid_ds* buf;
ushort* array;
};
@@ -71,13 +71,13 @@ namespace Poco {
NamedMutexImpl::NamedMutexImpl(const std::string& name):
_name(name)
_name(name)
{
std::string fileName = getFileName();
std::string fileName = getFileName();
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
_sem = sem_open(fileName.c_str(), O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, 1);
if ((long) _sem == (long) SEM_FAILED)
throw SystemException("cannot create named mutex (sem_open() failed)", _name);
_sem = sem_open(fileName.c_str(), O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, 1);
if ((long) _sem == (long) SEM_FAILED)
throw SystemException("cannot create named mutex (sem_open() failed)", _name);
#else
int fd = open(fileName.c_str(), O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (fd != -1)
@@ -96,9 +96,9 @@ NamedMutexImpl::NamedMutexImpl(const std::string& name):
}
else if (errno == EEXIST)
{
_semid = semget(key, 1, 0);
}
else throw SystemException("cannot create named mutex (semget() failed)", _name);
_semid = semget(key, 1, 0);
}
else throw SystemException("cannot create named mutex (semget() failed)", _name);
#endif // defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
}
@@ -106,7 +106,7 @@ NamedMutexImpl::NamedMutexImpl(const std::string& name):
NamedMutexImpl::~NamedMutexImpl()
{
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
sem_close(_sem);
sem_close(_sem);
#endif
}
@@ -114,9 +114,9 @@ NamedMutexImpl::~NamedMutexImpl()
void NamedMutexImpl::lockImpl()
{
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
int err;
do
{
int err;
do
{
err = sem_wait(_sem);
}
while (err && errno == EINTR);
@@ -140,9 +140,9 @@ void NamedMutexImpl::lockImpl()
bool NamedMutexImpl::tryLockImpl()
{
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
return sem_trywait(_sem) == 0;
return sem_trywait(_sem) == 0;
#else
struct sembuf op;
struct sembuf op;
op.sem_num = 0;
op.sem_op = -1;
op.sem_flg = SEM_UNDO | IPC_NOWAIT;
@@ -154,8 +154,8 @@ bool NamedMutexImpl::tryLockImpl()
void NamedMutexImpl::unlockImpl()
{
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX__) || defined(_AIX)
if (sem_post(_sem) != 0)
throw SystemException("cannot unlock named mutex", _name);
if (sem_post(_sem) != 0)
throw SystemException("cannot unlock named mutex", _name);
#else
struct sembuf op;
op.sem_num = 0;

View File

@@ -1,7 +1,7 @@
//
// NamedMutex_VMS.cpp
//
// $Id: //poco/svn/Foundation/src/NamedMutex_VMS.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedMutex_VMS.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// NamedMutex_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/NamedMutex_WIN32.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedMutex_WIN32.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// NamedMutex_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/NamedMutex_WIN32U.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NamedMutex_WIN32U.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// NestedDiagnosticContext.cpp
//
// $Id: //poco/svn/Foundation/src/NestedDiagnosticContext.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NestedDiagnosticContext.cpp#1 $
//
// Library: Foundation
// Package: Core
@@ -138,13 +138,13 @@ void NestedDiagnosticContext::clear()
namespace
{
static ThreadLocal<NestedDiagnosticContext> ndc;
static ThreadLocal<NestedDiagnosticContext> ndc;
}
NestedDiagnosticContext& NestedDiagnosticContext::current()
{
return ndc.get();
return ndc.get();
}

View File

@@ -1,7 +1,7 @@
//
// Notification.cpp
//
// $Id: //poco/svn/Foundation/src/Notification.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Notification.cpp#1 $
//
// Library: Foundation
// Package: Notifications

View File

@@ -1,7 +1,7 @@
//
// NotificationQueue.cpp
//
// $Id: //poco/Main/Foundation/src/NotificationQueue.cpp#15 $
// $Id: //poco/1.4/Foundation/src/NotificationQueue.cpp#1 $
//
// Library: Foundation
// Package: Notifications

View File

@@ -1,7 +1,7 @@
//
// NullChannel.cpp
//
// $Id: //poco/svn/Foundation/src/NullChannel.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NullChannel.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// NullStream.cpp
//
// $Id: //poco/svn/Foundation/src/NullStream.cpp#2 $
// $Id: //poco/1.4/Foundation/src/NullStream.cpp#1 $
//
// Library: Foundation
// Package: Streams

View File

@@ -1,7 +1,7 @@
//
// NumberFormatter.cpp
//
// $Id: //poco/Main/Foundation/src/NumberFormatter.cpp#13 $
// $Id: //poco/1.4/Foundation/src/NumberFormatter.cpp#4 $
//
// Library: Foundation
// Package: Core

View File

@@ -1,7 +1,7 @@
//
// OpcomChannel.cpp
//
// $Id: //poco/svn/Foundation/src/OpcomChannel.cpp#2 $
// $Id: //poco/1.4/Foundation/src/OpcomChannel.cpp#1 $
//
// Library: Foundation
// Package: Logging

View File

@@ -1,7 +1,7 @@
//
// Path.cpp
//
// $Id: //poco/svn/Foundation/src/Path.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Path.cpp#5 $
//
// Library: Foundation
// Package: Filesystem
@@ -641,21 +641,21 @@ void Path::listRoots(std::vector<std::string>& roots)
bool Path::find(StringVec::const_iterator it, StringVec::const_iterator end, const std::string& name, Path& path)
{
while (it != end)
{
while (it != end)
{
#if defined(WIN32)
std::string cleanPath(*it);
if (cleanPath.size() > 1 && cleanPath[0] == '"' && cleanPath[cleanPath.size() - 1] == '"')
{
cleanPath = cleanPath.substr(1, cleanPath.size() - 2);
}
Path p(cleanPath);
std::string cleanPath(*it);
if (cleanPath.size() > 1 && cleanPath[0] == '"' && cleanPath[cleanPath.size() - 1] == '"')
{
cleanPath = cleanPath.substr(1, cleanPath.size() - 2);
}
Path p(cleanPath);
#else
Path p(*it);
Path p(*it);
#endif
p.makeDirectory();
p.resolve(Path(name));
File f(p);
p.makeDirectory();
p.resolve(Path(name));
File f(p);
if (f.exists())
{
path = p;

View File

@@ -1,7 +1,7 @@
//
// Path_VMS.cpp
//
// $Id: //poco/svn/Foundation/src/Path_VMS.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Path_VMS.cpp#1 $
//
// Library: Foundation
// Package: Filesystem

View File

@@ -1,7 +1,7 @@
//
// Path_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/Path_WIN32.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Path_WIN32.cpp#4 $
//
// Library: Foundation
// Package: Filesystem
@@ -71,13 +71,13 @@ std::string PathImpl::homeImpl()
std::string PathImpl::tempImpl()
{
char buffer[MAX_PATH];
DWORD n = GetTempPathA(sizeof(buffer), buffer);
if (n > 0 && n < sizeof(buffer))
{
n = GetLongPathNameA(buffer, buffer, static_cast<DWORD>(sizeof buffer));
if (n <= 0) throw SystemException("Cannot get temporary directory long path name");
std::string result(buffer, n);
if (result[n - 1] != '\\')
DWORD n = GetTempPathA(sizeof(buffer), buffer);
if (n > 0 && n < sizeof(buffer))
{
n = GetLongPathNameA(buffer, buffer, static_cast<DWORD>(sizeof buffer));
if (n <= 0) throw SystemException("Cannot get temporary directory long path name");
std::string result(buffer, n);
if (result[n - 1] != '\\')
result.append("\\");
return result;
}

View File

@@ -1,7 +1,7 @@
//
// Path_WIN32U.cpp
//
// $Id: //poco/svn/Foundation/src/Path_WIN32U.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Path_WIN32U.cpp#2 $
//
// Library: Foundation
// Package: Filesystem
@@ -53,13 +53,13 @@ std::string PathImpl::currentImpl()
{
Buffer<wchar_t> buffer(len);
DWORD n = GetCurrentDirectoryW(len, buffer.begin());
if (n > 0 && n <= len)
{
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\')
result.append("\\");
return result;
}
if (n > 0 && n <= len)
{
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\')
result.append("\\");
return result;
}
}
throw SystemException("Cannot get current directory");
}
@@ -79,18 +79,18 @@ std::string PathImpl::homeImpl()
std::string PathImpl::tempImpl()
{
Buffer<wchar_t> buffer(MAX_PATH_LEN);
DWORD n = GetTempPathW(static_cast<DWORD>(buffer.size()), buffer.begin());
if (n > 0)
{
n = GetLongPathNameW(buffer.begin(), buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n <= 0) throw SystemException("Cannot get temporary directory long path name");
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\')
result.append("\\");
return result;
}
throw SystemException("Cannot get temporary directory path");
DWORD n = GetTempPathW(static_cast<DWORD>(buffer.size()), buffer.begin());
if (n > 0)
{
n = GetLongPathNameW(buffer.begin(), buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n <= 0) throw SystemException("Cannot get temporary directory long path name");
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\')
result.append("\\");
return result;
}
throw SystemException("Cannot get temporary directory path");
}

View File

@@ -1,7 +1,7 @@
//
// Pipe.cpp
//
// $Id: //poco/svn/Foundation/src/Pipe.cpp#2 $
// $Id: //poco/1.4/Foundation/src/Pipe.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// PipeImpl.cpp
//
// $Id: //poco/svn/Foundation/src/PipeImpl.cpp#2 $
// $Id: //poco/1.4/Foundation/src/PipeImpl.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// PipeImpl_DUMMY.cpp
//
// $Id: //poco/svn/Foundation/src/PipeImpl_DUMMY.cpp#2 $
// $Id: //poco/1.4/Foundation/src/PipeImpl_DUMMY.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// PipeImpl_POSIX.cpp
//
// $Id: //poco/svn/Foundation/src/PipeImpl_POSIX.cpp#2 $
// $Id: //poco/1.4/Foundation/src/PipeImpl_POSIX.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// PipeImpl_WIN32.cpp
//
// $Id: //poco/svn/Foundation/src/PipeImpl_WIN32.cpp#2 $
// $Id: //poco/1.4/Foundation/src/PipeImpl_WIN32.cpp#1 $
//
// Library: Foundation
// Package: Processes

View File

@@ -1,7 +1,7 @@
//
// PipeStream.cpp
//
// $Id: //poco/svn/Foundation/src/PipeStream.cpp#2 $
// $Id: //poco/1.4/Foundation/src/PipeStream.cpp#1 $
//
// Library: Foundation
// Package: Processes

Some files were not shown because too many files have changed in this diff Show More