namespace PT renamed to pt
This commit is contained in:
@@ -57,7 +57,7 @@ namespace misc_private
|
||||
0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x2028,
|
||||
0x2029, 0x202F, 0x205F, 0x3000 };
|
||||
|
||||
PT::WTextStream tmp_qencode;
|
||||
pt::WTextStream tmp_qencode;
|
||||
}
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ void CorrectUrlOnlyAllowedChar(std::wstring & url)
|
||||
{
|
||||
CorrectUrlDots(url);
|
||||
CorrectUrlChars(url);
|
||||
PT::to_lower_emplace(url);
|
||||
pt::to_lower_emplace(url);
|
||||
Trim(url, '_');
|
||||
|
||||
if( url.empty() || url == L"." )
|
||||
@@ -408,7 +408,7 @@ static wchar_t buffer[100];
|
||||
|
||||
|
||||
|
||||
const wchar_t * DateToStr(const PT::Date & d)
|
||||
const wchar_t * DateToStr(const pt::Date & d)
|
||||
{
|
||||
return DateToStr(d.year, d.month, d.day, d.hour, d.min, d.sec);
|
||||
}
|
||||
@@ -416,14 +416,14 @@ const wchar_t * DateToStr(const PT::Date & d)
|
||||
|
||||
const wchar_t * DateToStr(time_t t)
|
||||
{
|
||||
PT::Date date = t;
|
||||
pt::Date date = t;
|
||||
|
||||
return DateToStr(date);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const wchar_t * DateToStrWithoutHours(const PT::Date & d)
|
||||
const wchar_t * DateToStrWithoutHours(const pt::Date & d)
|
||||
{
|
||||
return DateToStr(d.year, d.month, d.day);
|
||||
}
|
||||
@@ -431,7 +431,7 @@ const wchar_t * DateToStrWithoutHours(const PT::Date & d)
|
||||
|
||||
const wchar_t * DateToStrWithoutHours(time_t t)
|
||||
{
|
||||
PT::Date date = t;
|
||||
pt::Date date = t;
|
||||
|
||||
return DateToStrWithoutHours(date);
|
||||
}
|
||||
@@ -460,7 +460,7 @@ return buffer;
|
||||
|
||||
|
||||
|
||||
const char * DateToStrCookie(const PT::Date & d)
|
||||
const char * DateToStrCookie(const pt::Date & d)
|
||||
{
|
||||
return DateToStrCookie(d.year, d.month, d.day, d.hour, d.min, d.sec);
|
||||
}
|
||||
@@ -468,7 +468,7 @@ const char * DateToStrCookie(const PT::Date & d)
|
||||
|
||||
const char * DateToStrCookie(time_t t)
|
||||
{
|
||||
PT::Date date = t;
|
||||
pt::Date date = t;
|
||||
|
||||
return DateToStrCookie(date);
|
||||
}
|
||||
@@ -493,9 +493,9 @@ return buffer;
|
||||
|
||||
|
||||
|
||||
PT::WTextStream IPToStr(unsigned int ip)
|
||||
pt::WTextStream IPToStr(unsigned int ip)
|
||||
{
|
||||
PT::WTextStream buf;
|
||||
pt::WTextStream buf;
|
||||
|
||||
for(int i=0 ; i<4 ; ++i, ip >>= 8)
|
||||
{
|
||||
@@ -509,7 +509,7 @@ return buf;
|
||||
}
|
||||
|
||||
|
||||
PT::WTextStream IPToStr(int ip)
|
||||
pt::WTextStream IPToStr(int ip)
|
||||
{
|
||||
return IPToStr(static_cast<unsigned int>(ip));
|
||||
}
|
||||
@@ -1148,7 +1148,7 @@ std::ifstream get_file_content;
|
||||
/*
|
||||
* we don't report any errors when converting from UTF8 to wide characters here
|
||||
*/
|
||||
PT::UTF8ToWide(get_file_content, content);
|
||||
pt::UTF8ToWide(get_file_content, content);
|
||||
get_file_content.close();
|
||||
|
||||
return true;
|
||||
@@ -1219,31 +1219,31 @@ int SelectFileType(const wchar_t * file_name)
|
||||
|
||||
// as an image we're using only those types which can be rendered
|
||||
// by a web browser
|
||||
if( PT::is_equal_nc(ext, L"jpg") ||
|
||||
PT::is_equal_nc(ext, L"jpeg") ||
|
||||
PT::is_equal_nc(ext, L"jpe") ||
|
||||
PT::is_equal_nc(ext, L"pic") ||
|
||||
PT::is_equal_nc(ext, L"tga") ||
|
||||
PT::is_equal_nc(ext, L"gif") ||
|
||||
PT::is_equal_nc(ext, L"bmp") ||
|
||||
PT::is_equal_nc(ext, L"png") )
|
||||
if( pt::is_equal_nc(ext, L"jpg") ||
|
||||
pt::is_equal_nc(ext, L"jpeg") ||
|
||||
pt::is_equal_nc(ext, L"jpe") ||
|
||||
pt::is_equal_nc(ext, L"pic") ||
|
||||
pt::is_equal_nc(ext, L"tga") ||
|
||||
pt::is_equal_nc(ext, L"gif") ||
|
||||
pt::is_equal_nc(ext, L"bmp") ||
|
||||
pt::is_equal_nc(ext, L"png") )
|
||||
return WINIX_ITEM_FILETYPE_IMAGE;
|
||||
|
||||
if( PT::is_equal_nc(ext, L"pdf") ||
|
||||
PT::is_equal_nc(ext, L"doc") ||
|
||||
PT::is_equal_nc(ext, L"xls") ||
|
||||
PT::is_equal_nc(ext, L"txt") ||
|
||||
PT::is_equal_nc(ext, L"ods") ||
|
||||
PT::is_equal_nc(ext, L"odt") )
|
||||
if( pt::is_equal_nc(ext, L"pdf") ||
|
||||
pt::is_equal_nc(ext, L"doc") ||
|
||||
pt::is_equal_nc(ext, L"xls") ||
|
||||
pt::is_equal_nc(ext, L"txt") ||
|
||||
pt::is_equal_nc(ext, L"ods") ||
|
||||
pt::is_equal_nc(ext, L"odt") )
|
||||
return WINIX_ITEM_FILETYPE_DOCUMENT;
|
||||
|
||||
if( PT::is_equal_nc(ext, L"avi") ||
|
||||
PT::is_equal_nc(ext, L"mp4") ||
|
||||
PT::is_equal_nc(ext, L"flv") ||
|
||||
PT::is_equal_nc(ext, L"mpg") ||
|
||||
PT::is_equal_nc(ext, L"mpeg") ||
|
||||
PT::is_equal_nc(ext, L"mkv") ||
|
||||
PT::is_equal_nc(ext, L"wmv") )
|
||||
if( pt::is_equal_nc(ext, L"avi") ||
|
||||
pt::is_equal_nc(ext, L"mp4") ||
|
||||
pt::is_equal_nc(ext, L"flv") ||
|
||||
pt::is_equal_nc(ext, L"mpg") ||
|
||||
pt::is_equal_nc(ext, L"mpeg") ||
|
||||
pt::is_equal_nc(ext, L"mkv") ||
|
||||
pt::is_equal_nc(ext, L"wmv") )
|
||||
return WINIX_ITEM_FILETYPE_VIDEO;
|
||||
|
||||
return WINIX_ITEM_FILETYPE_UNKNOWN;
|
||||
@@ -1280,7 +1280,7 @@ void UrlEncode(const wchar_t * in, std::string & out, bool clear_out)
|
||||
{
|
||||
static std::string ain;
|
||||
|
||||
PT::WideToUTF8(in, ain);
|
||||
pt::WideToUTF8(in, ain);
|
||||
|
||||
if( clear_out )
|
||||
out.clear();
|
||||
@@ -1301,7 +1301,7 @@ void UrlEncode(const wchar_t * in, std::wstring & out, bool clear_out)
|
||||
{
|
||||
static std::string ain;
|
||||
|
||||
PT::WideToUTF8(in, ain);
|
||||
pt::WideToUTF8(in, ain);
|
||||
|
||||
if( clear_out )
|
||||
out.clear();
|
||||
@@ -1372,7 +1372,7 @@ int c1, c2;
|
||||
|
||||
url_utf8[index] = 0;
|
||||
|
||||
return PT::UTF8ToWide(url_utf8, out, false);
|
||||
return pt::UTF8ToWide(url_utf8, out, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -1418,7 +1418,7 @@ void RemovePostFileTmp(PostFileTab & post_file_tab)
|
||||
|
||||
bool WideToUTF8(const wchar_t * wide_string, char * utf8, size_t utf8_size)
|
||||
{
|
||||
bool res = PT::WideToUTF8(wide_string, utf8, utf8_size);
|
||||
bool res = pt::WideToUTF8(wide_string, utf8, utf8_size);
|
||||
|
||||
if( !res )
|
||||
{
|
||||
|
Reference in New Issue
Block a user