we can create links (hard links, symbolic links) now
added winix functions: ln winix function 'default' can be used without redirecting now added new tickets types: TypeProgress, TypeString, TypeMultistring, TypeImages, TypeFiles now tickets are combined with files added winix functions: showtickets fixed mountpoints: when the default root mount was created its parameter table was empty and it caused accessing to a non-existing objects fixed logger: modifiers (log1, log2, log3) were incorrectly treated added modifier: log4 (debug info) now we are moving threads to a new plugin 'thread' created directory: plugins/thread (not finished yet) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@704 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -860,6 +860,11 @@ return WINIX_ITEM_FILETYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
int SelectFileType(const std::wstring & file_name)
|
||||
{
|
||||
return SelectFileType(file_name.c_str());
|
||||
}
|
||||
|
||||
|
||||
time_t Time(const tm & par)
|
||||
{
|
||||
@@ -904,3 +909,46 @@ tm Time(time_t par)
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void UrlEncode(const std::string & in, std::string & out, bool clear_out)
|
||||
{
|
||||
char buffer[10];
|
||||
|
||||
if( clear_out )
|
||||
out.clear();
|
||||
|
||||
for(size_t i=0 ; i<in.size() ; ++i)
|
||||
{
|
||||
if( (in[i] >= 'a' && in[i] <= 'z') ||
|
||||
(in[i] >= 'A' && in[i] <= 'Z') ||
|
||||
(in[i] >= '0' && in[i] <= '9') ||
|
||||
in[i] == '.' || in[i] == ',' || in[i] == '/' || in[i] == ':' || in[i] == '#' ||
|
||||
in[i] == '-' || in[i] == '_' || in[i] == '(' || in[i] == ')' )
|
||||
{
|
||||
out += in[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
Toa(static_cast<unsigned char>(in[i]), buffer, 10, 16);
|
||||
out += '%';
|
||||
|
||||
if( buffer[1] == 0 )
|
||||
out += '0'; // there is only one characters in the buffer
|
||||
|
||||
out += buffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void UrlEncode(const std::wstring & in, std::string & out, bool clear_out)
|
||||
{
|
||||
static std::string ain;
|
||||
|
||||
Ezc::WideToUTF8(in, ain);
|
||||
UrlEncode(ain, out, clear_out);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user