using PT::IsSubString* methods from pikotools

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1138 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2018-11-01 00:46:44 +00:00
parent 8f6004d444
commit 919c2f62f5
26 changed files with 272 additions and 143 deletions

View File

@@ -60,6 +60,7 @@ edb.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
edb.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h
edb.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h
edb.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h
edb.o: ../../../../ezc/src/expressionparser.h
edb.o: ../../../../ezc/src/patternparser.h
edb.o: ../../../../winix/winixd/notify/notifythread.h
edb.o: ../../../../winix/winixd/core/basethread.h
@@ -132,6 +133,7 @@ exportinfo.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
exportinfo.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h
exportinfo.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h
exportinfo.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h
exportinfo.o: ../../../../ezc/src/expressionparser.h
exportinfo.o: ../../../../ezc/src/patternparser.h
exportinfo.o: ../../../../winix/winixd/notify/notifythread.h
exportinfo.o: ../../../../winix/winixd/core/basethread.h
@@ -157,6 +159,7 @@ exportinfo.o: ../../../../winix/winixd/db/dbconn.h
exportinfo.o: ../../../../winix/winixd/db/dbtextstream.h
exportinfo.o: ../../../../winix/winixd/core/error.h
exportinfo.o: ../../../../winix/winixd/core/dirs.h message.h exportthread.h
exportinfo.o: ../../../../pikotools/convert/text.h
exportthread.o: exportthread.h ../../../../winix/winixd/core/basethread.h
exportthread.o: ../../../../winix/winixd/core/synchro.h message.h
exportthread.o: ../../../../winix/winixd/core/log.h
@@ -176,6 +179,7 @@ exportthread.o: ../../../../pikotools/membuffer/membuffer.h
exportthread.o: ../../../../pikotools/textstream/types.h
exportthread.o: ../../../../pikotools/utf8/utf8.h
exportthread.o: ../../../../winix/winixd/core/winix_const.h
exportthread.o: ../../../../pikotools/convert/text.h
funexport.o: funexport.h ../../../../winix/winixd/functions/functionbase.h
funexport.o: ../../../../winix/winixd/core/item.h
funexport.o: ../../../../winix/winixd/db/db.h
@@ -240,6 +244,7 @@ funexport.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
funexport.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h
funexport.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h
funexport.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h
funexport.o: ../../../../ezc/src/expressionparser.h
funexport.o: ../../../../ezc/src/patternparser.h
funexport.o: ../../../../winix/winixd/notify/notifythread.h
funexport.o: ../../../../winix/winixd/core/basethread.h
@@ -328,6 +333,7 @@ init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
init.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h
init.o: ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/notify/notifythread.h
init.o: ../../../../winix/winixd/core/basethread.h

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* Copyright (c) 2011-2018, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,8 @@
#include "core/log.h"
#include "exportinfo.h"
#include "convert/text.h"
namespace Winix
{
@@ -140,7 +142,7 @@ bool ExportInfo::SkipDir(long dir_id, std::wstring & dir)
{
if( system->dirs.MakePath(dir_id, tmp_dir) )
{
if( !tmp_dir.empty() && IsSubString(tmp_dir, dir) )
if( !tmp_dir.empty() && PT::IsSubString(tmp_dir, dir) )
{
// tmp_dir has a slash at the end
// we want the slash at the beginning

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* Copyright (c) 2011-2018, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -40,6 +40,8 @@
#include "core/log.h"
#include "core/misc.h"
#include "utf8/utf8.h"
#include "convert/text.h"
namespace Winix
{
@@ -406,13 +408,13 @@ bool ExportThread::HasThumbInAdress(std::string & buf, size_t i)
for( ; i<buf.size() ; ++i)
{
if( IsSubStringp(thumb1, &buf[i]) )
if( PT::IsSubStringp(thumb1, &buf[i]) )
{
buf.erase(i, len1);
return true;
}
if( IsSubStringp(thumb2, &buf[i]) )
if( PT::IsSubStringp(thumb2, &buf[i]) )
{
buf.erase(i, len2);
return true;
@@ -440,7 +442,7 @@ void ExportThread::ChangeAdressesThumb(std::string & buf, const char * http_pref
for(size_t i=0 ; i<buf.size() ; ++i)
{
if( IsSubStringp(look_for_url.c_str(), &buf[i]) )
if( PT::IsSubStringp(look_for_url.c_str(), &buf[i]) )
{
i += look_for_url.size() - 1; // without skipping the last slash