6 Commits
0.6.3 ... 0.6.4

Author SHA1 Message Date
8f8defe0de updated: to the new Ezc API
removed statements: [if-index ...] [is ...] [is-no ...]
added:   generic ezc functions:
         and, any (the same as and), or, one (the same as or), not, cmp, trim
         to_lower, to_upper, index
changed: in misc:
         added treat_new_line_as_white flag to IsWhite() SkipWhite() and TrimWhite()
         TrimWhite(), TrimFirst(), TrimLast(), Trim() are using only wide characters now
         (they were templates before)
         added: IsInt(), IsSize(), IsFloat()
changed: version to 0.6.4






git-svn-id: svn://ttmath.org/publicrep/winix/trunk@989 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-11-02 17:47:34 +00:00
db5572e864 removed: svn:executable attribute from files
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@984 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-11-01 17:05:20 +00:00
1100cf75d7 updated: to the new Ezc API
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@983 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-10-28 19:14:46 +00:00
4fda06b547 fixed: PatternCacher incorrectly rebuilt the cache
some new Ezc::Pattern objects were inserted
       the storage container is std::map<long,...>
       but we traverse it as a std::vector e.g.:
       for(size_t i=0 ; i<pattern_tab.size() ; ++i)
           RebuildCache(pattern_tab[i].pattern);
       so eventually new patterns were added to the map
       (operator [])




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@980 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-10-21 07:27:21 +00:00
fb18b2238e added: two options to the config:
ezc_error_prefix (string)
        ezc_error_postfix (string)
        // prefix and postfix used when there is an error in Ezc patterns
        // default:
        // prefix:  "<!-- "
        // postfix: " -->"
added:  Ezc::Blocks to templates
added:  although patterns have pointers to functions and blocks cached
        the Ezc::Generator should use SetFunctions() and SetBlocks() method
        in order to correctly recognize variables (aliases)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@978 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-10-19 21:20:09 +00:00
5266a7e4e5 updated: to the new Ezc API
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@974 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-10-18 18:12:04 +00:00
437 changed files with 2127 additions and 1354 deletions

0
Makefile Executable file → Normal file
View File

File diff suppressed because one or more lines are too long

0
core/Makefile Executable file → Normal file
View File

164
core/Makefile.dep Executable file → Normal file
View File

@@ -32,39 +32,40 @@ app.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h
app.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
app.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
app.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
app.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
app.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h ../../ezc/src/cache.h
app.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
app.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
app.o: ../../winix/core/basethread.h ../../winix/notify/templatesnotify.h
app.o: ../../winix/core/config.h ../../winix/core/users.h ugcontainer.h
app.o: lastcontainer.h mounts.h mountparser.h crypt.h run.h users.h groups.h
app.o: group.h loadavg.h image.h threadmanager.h timezones.h timezone.h
app.o: sessionmanager.h sessioncontainer.h ipbancontainer.h
app.o: ../../winix/functions/functions.h ../../winix/functions/functionbase.h
app.o: ../../winix/core/request.h ../../winix/core/system.h
app.o: ../../winix/core/synchro.h ../../winix/functions/functionparser.h
app.o: ../../winix/core/cur.h ../../winix/functions/account.h
app.o: ../../winix/functions/adduser.h ../../winix/functions/cat.h
app.o: ../../winix/functions/chmod.h ../../winix/functions/privchanger.h
app.o: ../../winix/functions/chown.h ../../winix/functions/ckeditor.h
app.o: ../../winix/functions/cp.h ../../winix/functions/default.h
app.o: ../../winix/functions/download.h ../../winix/functions/emacs.h
app.o: ../../winix/functions/env.h ../../winix/functions/imgcrop.h
app.o: ../../winix/functions/last.h ../../winix/functions/login.h
app.o: ../../winix/functions/logout.h ../../winix/functions/ln.h
app.o: ../../winix/functions/ls.h ../../winix/functions/man.h
app.o: ../../winix/functions/meta.h ../../winix/functions/mkdir.h
app.o: ../../winix/functions/mv.h ../../winix/functions/nicedit.h
app.o: ../../winix/functions/node.h ../../winix/functions/passwd.h
app.o: ../../winix/functions/priv.h ../../winix/functions/pw.h
app.o: ../../winix/functions/reload.h ../../winix/functions/rm.h
app.o: ../../winix/functions/rmuser.h ../../winix/functions/sort.h
app.o: ../../winix/functions/specialdefault.h ../../winix/functions/stat.h
app.o: ../../winix/functions/subject.h ../../winix/functions/template.h
app.o: ../../winix/functions/tinymce.h ../../winix/functions/uname.h
app.o: ../../winix/functions/upload.h ../../winix/functions/uptime.h
app.o: ../../winix/functions/who.h ../../winix/functions/vim.h
app.o: ../../winix/core/htmlfilter.h ../../winix/templates/templates.h
app.o: ../../ezc/src/pattern.h ../../ezc/src/patternparser.h
app.o: ../../winix/notify/notifythread.h ../../winix/core/basethread.h
app.o: ../../winix/notify/templatesnotify.h ../../winix/core/config.h
app.o: ../../winix/core/users.h ugcontainer.h lastcontainer.h mounts.h
app.o: mountparser.h crypt.h run.h users.h groups.h group.h loadavg.h image.h
app.o: threadmanager.h timezones.h timezone.h sessionmanager.h
app.o: sessioncontainer.h ipbancontainer.h ../../winix/functions/functions.h
app.o: ../../winix/functions/functionbase.h ../../winix/core/request.h
app.o: ../../winix/core/system.h ../../winix/core/synchro.h
app.o: ../../winix/functions/functionparser.h ../../winix/core/cur.h
app.o: ../../winix/functions/account.h ../../winix/functions/adduser.h
app.o: ../../winix/functions/cat.h ../../winix/functions/chmod.h
app.o: ../../winix/functions/privchanger.h ../../winix/functions/chown.h
app.o: ../../winix/functions/ckeditor.h ../../winix/functions/cp.h
app.o: ../../winix/functions/default.h ../../winix/functions/download.h
app.o: ../../winix/functions/emacs.h ../../winix/functions/env.h
app.o: ../../winix/functions/imgcrop.h ../../winix/functions/last.h
app.o: ../../winix/functions/login.h ../../winix/functions/logout.h
app.o: ../../winix/functions/ln.h ../../winix/functions/ls.h
app.o: ../../winix/functions/man.h ../../winix/functions/meta.h
app.o: ../../winix/functions/mkdir.h ../../winix/functions/mv.h
app.o: ../../winix/functions/nicedit.h ../../winix/functions/node.h
app.o: ../../winix/functions/passwd.h ../../winix/functions/priv.h
app.o: ../../winix/functions/pw.h ../../winix/functions/reload.h
app.o: ../../winix/functions/rm.h ../../winix/functions/rmuser.h
app.o: ../../winix/functions/sort.h ../../winix/functions/specialdefault.h
app.o: ../../winix/functions/stat.h ../../winix/functions/subject.h
app.o: ../../winix/functions/template.h ../../winix/functions/tinymce.h
app.o: ../../winix/functions/uname.h ../../winix/functions/upload.h
app.o: ../../winix/functions/uptime.h ../../winix/functions/who.h
app.o: ../../winix/functions/vim.h ../../winix/core/htmlfilter.h
app.o: ../../winix/templates/templates.h
app.o: ../../winix/templates/patterncacher.h
app.o: ../../winix/templates/indexpatterns.h ../../winix/templates/patterns.h
app.o: ../../winix/templates/changepatterns.h
@@ -111,9 +112,10 @@ config.o: ../../winix/core/dircontainer.h ../../winix/core/ugcontainer.h
config.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
config.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
config.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
config.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
config.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
config.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
config.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
config.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
config.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
config.o: ../../ezc/src/patternparser.h ../../winix/notify/notifythread.h
config.o: ../../winix/core/basethread.h ../../winix/notify/templatesnotify.h
config.o: ../../winix/core/config.h ../../winix/core/users.h ugcontainer.h
config.o: lastcontainer.h mounts.h mountparser.h crypt.h run.h users.h
@@ -202,9 +204,10 @@ dirs.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h
dirs.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
dirs.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
dirs.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
dirs.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
dirs.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
dirs.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
dirs.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
dirs.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
dirs.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
dirs.o: ../../ezc/src/patternparser.h ../../winix/notify/notifythread.h
dirs.o: ../../winix/core/basethread.h ../../winix/notify/templatesnotify.h
dirs.o: ../../winix/core/config.h ../../winix/core/users.h ugcontainer.h
dirs.o: lastcontainer.h
@@ -262,9 +265,10 @@ image.o: ../../winix/core/config.h system.h job.h dirs.h dircontainer.h
image.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
image.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
image.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
image.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
image.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
image.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
image.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
image.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
image.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
image.o: ../../ezc/src/patternparser.h ../../winix/notify/notifythread.h
image.o: ../../winix/core/basethread.h ../../winix/notify/templatesnotify.h
image.o: ../../winix/core/users.h ugcontainer.h lastcontainer.h mounts.h
image.o: mountparser.h crypt.h run.h users.h groups.h group.h loadavg.h
@@ -350,9 +354,10 @@ job.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
job.o: ../../winix/core/ugcontainer.h ../../winix/notify/notify.h
job.o: ../../winix/notify/notifypool.h ../../winix/templates/patterns.h
job.o: ../../winix/templates/locale.h ../../winix/templates/localefilter.h
job.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h ../../ezc/src/pattern.h
job.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
job.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
job.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h ../../ezc/src/blocks.h
job.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
job.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
job.o: ../../ezc/src/patternparser.h ../../winix/notify/notifythread.h
job.o: ../../winix/core/basethread.h ../../winix/notify/templatesnotify.h
job.o: ../../winix/core/config.h ../../winix/core/users.h ugcontainer.h
job.o: lastcontainer.h mounts.h mountparser.h crypt.h run.h users.h groups.h
@@ -447,9 +452,10 @@ misc.o: ../../winix/templates/htmltextstream.h ../../winix/core/textstream.h
misc.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
misc.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h
misc.o: ../../winix/templates/templates.h ../../ezc/src/ezc.h
misc.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
misc.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
misc.o: ../../ezc/src/stringconv.h ../../winix/templates/patterncacher.h
misc.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
misc.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
misc.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
misc.o: ../../ezc/src/patternparser.h ../../winix/templates/patterncacher.h
misc.o: ../../winix/core/item.h ../../winix/templates/indexpatterns.h
misc.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
misc.o: ../../winix/templates/changepatterns.h
@@ -494,9 +500,11 @@ mountparser.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
mountparser.o: ../../winix/templates/patterns.h
mountparser.o: ../../winix/templates/locale.h
mountparser.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
mountparser.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
mountparser.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
mountparser.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
mountparser.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
mountparser.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
mountparser.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
mountparser.o: ../../ezc/src/patternparser.h
mountparser.o: ../../winix/notify/notifythread.h
mountparser.o: ../../winix/core/basethread.h
mountparser.o: ../../winix/notify/templatesnotify.h ../../winix/core/config.h
mountparser.o: ../../winix/core/users.h ugcontainer.h lastcontainer.h
@@ -523,9 +531,10 @@ mounts.o: rebus.h ipban.h ../../winix/templates/locale.h
mounts.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
mounts.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
mounts.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
mounts.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
mounts.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
mounts.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
mounts.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
mounts.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
mounts.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
mounts.o: ../../ezc/src/patternparser.h ../../winix/notify/notifythread.h
mounts.o: ../../winix/core/basethread.h ../../winix/notify/templatesnotify.h
mounts.o: ../../winix/core/config.h ../../winix/core/users.h ugcontainer.h
mounts.o: lastcontainer.h mountparser.h plugin.h pluginmsg.h system.h job.h
@@ -587,8 +596,9 @@ plugin.o: ../../winix/core/ugcontainer.h ../../winix/notify/notify.h
plugin.o: ../../winix/notify/notifypool.h ../../winix/templates/patterns.h
plugin.o: ../../winix/templates/locale.h ../../winix/templates/localefilter.h
plugin.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
plugin.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
plugin.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
plugin.o: ../../ezc/src/blocks.h ../../ezc/src/cache.h
plugin.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
plugin.o: ../../ezc/src/pattern.h ../../ezc/src/patternparser.h
plugin.o: ../../winix/notify/notifythread.h ../../winix/core/basethread.h
plugin.o: ../../winix/notify/templatesnotify.h ../../winix/core/config.h
plugin.o: ../../winix/core/users.h ugcontainer.h lastcontainer.h mounts.h
@@ -653,9 +663,10 @@ plugindata.o: ../../winix/core/dircontainer.h ../../winix/core/ugcontainer.h
plugindata.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
plugindata.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
plugindata.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
plugindata.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
plugindata.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
plugindata.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
plugindata.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
plugindata.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
plugindata.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
plugindata.o: ../../ezc/src/patternparser.h ../../winix/notify/notifythread.h
plugindata.o: ../../winix/core/basethread.h
plugindata.o: ../../winix/notify/templatesnotify.h ../../winix/core/config.h
plugindata.o: ../../winix/core/users.h ugcontainer.h lastcontainer.h mounts.h
@@ -748,9 +759,10 @@ request.o: ../../winix/core/dircontainer.h ../../winix/core/ugcontainer.h
request.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
request.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
request.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
request.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
request.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
request.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
request.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
request.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
request.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
request.o: ../../ezc/src/patternparser.h ../../winix/notify/notifythread.h
request.o: ../../winix/core/basethread.h ../../winix/notify/templatesnotify.h
request.o: ../../winix/core/config.h ../../winix/core/users.h ugcontainer.h
request.o: lastcontainer.h mounts.h mountparser.h crypt.h run.h users.h
@@ -857,9 +869,10 @@ sessionmanager.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
sessionmanager.o: ../../winix/templates/patterns.h
sessionmanager.o: ../../winix/templates/locale.h
sessionmanager.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
sessionmanager.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
sessionmanager.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
sessionmanager.o: ../../ezc/src/stringconv.h
sessionmanager.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
sessionmanager.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
sessionmanager.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
sessionmanager.o: ../../ezc/src/patternparser.h
sessionmanager.o: ../../winix/notify/notifythread.h
sessionmanager.o: ../../winix/core/basethread.h
sessionmanager.o: ../../winix/notify/templatesnotify.h
@@ -961,9 +974,10 @@ system.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h
system.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
system.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
system.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
system.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
system.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
system.o: ../../ezc/src/stringconv.h ../../winix/notify/notifythread.h
system.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
system.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
system.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
system.o: ../../ezc/src/patternparser.h ../../winix/notify/notifythread.h
system.o: ../../winix/core/basethread.h ../../winix/notify/templatesnotify.h
system.o: ../../winix/core/config.h ../../winix/core/users.h ugcontainer.h
system.o: lastcontainer.h mounts.h mountparser.h crypt.h run.h users.h
@@ -1067,14 +1081,14 @@ users.o: ../../winix/core/ugcontainer.h log.h logmanipulators.h slog.h
users.o: ../../winix/templates/locale.h ../../winix/notify/notify.h
users.o: ../../winix/notify/notifypool.h ../../winix/templates/patterns.h
users.o: ../../winix/templates/locale.h ../../winix/templates/localefilter.h
users.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
users.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
users.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
users.o: ../../winix/notify/notifythread.h ../../winix/core/basethread.h
users.o: ../../winix/notify/templatesnotify.h ../../winix/core/config.h
users.o: ../../winix/core/users.h ugcontainer.h mounts.h mountparser.h
users.o: crypt.h run.h groups.h group.h loadavg.h image.h threadmanager.h
users.o: timezones.h timezone.h plugin.h pluginmsg.h
users.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h ../../ezc/src/blocks.h
users.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
users.o: ../../ezc/src/funinfo.h ../../ezc/src/pattern.h
users.o: ../../ezc/src/patternparser.h ../../winix/notify/notifythread.h
users.o: ../../winix/core/basethread.h ../../winix/notify/templatesnotify.h
users.o: ../../winix/core/config.h ../../winix/core/users.h ugcontainer.h
users.o: mounts.h mountparser.h crypt.h run.h groups.h group.h loadavg.h
users.o: image.h threadmanager.h timezones.h timezone.h plugin.h pluginmsg.h
users.o: ../../winix/functions/functions.h
users.o: ../../winix/functions/functionbase.h ../../winix/core/request.h
users.o: ../../winix/core/system.h ../../winix/core/synchro.h

0
core/Makefile.o.dep Executable file → Normal file
View File

0
core/acceptbaseparser.cpp Executable file → Normal file
View File

0
core/acceptbaseparser.h Executable file → Normal file
View File

0
core/acceptencodingparser.h Executable file → Normal file
View File

0
core/app.cpp Executable file → Normal file
View File

0
core/app.h Executable file → Normal file
View File

0
core/basethread.cpp Executable file → Normal file
View File

0
core/basethread.h Executable file → Normal file
View File

0
core/bbcodeparser.cpp Executable file → Normal file
View File

0
core/bbcodeparser.h Executable file → Normal file
View File

0
core/compress.cpp Executable file → Normal file
View File

0
core/compress.h Executable file → Normal file
View File

2
core/config.cpp Executable file → Normal file
View File

@@ -269,6 +269,8 @@ void Config::AssignValues(bool stdout_is_closed)
ezc_max_elements = Size(L"ezc_max_elements", 50000);
ezc_max_loop_elements = Size(L"ezc_max_loop_elements", 5000);
ezc_out_streams_size = Size(L"ezc_out_streams_size", 16);
ezc_error_prefix = Text(L"ezc_error_prefix", L"<!-- ");
ezc_error_postfix = Text(L"ezc_error_postfix", L" -->");
account_need_email_verification = Bool(L"account_need_email_verification", true);
reset_password_code_expiration_time = Long(L"reset_password_code_expiration_time", 86400);

7
core/config.h Executable file → Normal file
View File

@@ -552,6 +552,13 @@ public:
// default: 16 (64 maximum)
size_t ezc_out_streams_size;
// prefix and postfix used when there is an error in Ezc patterns
// default:
// prefix: "<!-- "
// postfix: " -->"
std::wstring ezc_error_prefix;
std::wstring ezc_error_postfix;
// when true then when a user want to create a new account
// he has to provide his email and a message will be sent back to him
// with a link to activate the account

0
core/cookieparser.h Executable file → Normal file
View File

0
core/crypt.cpp Executable file → Normal file
View File

0
core/crypt.h Executable file → Normal file
View File

0
core/cur.h Executable file → Normal file
View File

0
core/dircontainer.cpp Executable file → Normal file
View File

0
core/dircontainer.h Executable file → Normal file
View File

0
core/dirs.cpp Executable file → Normal file
View File

0
core/dirs.h Executable file → Normal file
View File

0
core/error.h Executable file → Normal file
View File

0
core/group.h Executable file → Normal file
View File

0
core/groups.cpp Executable file → Normal file
View File

0
core/groups.h Executable file → Normal file
View File

0
core/htmlfilter.cpp Executable file → Normal file
View File

0
core/htmlfilter.h Executable file → Normal file
View File

0
core/httpsimpleparser.cpp Executable file → Normal file
View File

0
core/httpsimpleparser.h Executable file → Normal file
View File

0
core/image.cpp Executable file → Normal file
View File

0
core/image.h Executable file → Normal file
View File

0
core/item.cpp Executable file → Normal file
View File

0
core/item.h Executable file → Normal file
View File

0
core/job.cpp Executable file → Normal file
View File

0
core/job.h Executable file → Normal file
View File

0
core/lastcontainer.cpp Executable file → Normal file
View File

0
core/lastcontainer.h Executable file → Normal file
View File

0
core/loadavg.cpp Executable file → Normal file
View File

0
core/loadavg.h Executable file → Normal file
View File

0
core/lock.cpp Executable file → Normal file
View File

0
core/lock.h Executable file → Normal file
View File

0
core/log.cpp Executable file → Normal file
View File

0
core/log.h Executable file → Normal file
View File

0
core/logmanipulators.h Executable file → Normal file
View File

225
core/misc.cpp Executable file → Normal file
View File

@@ -51,7 +51,7 @@ namespace Winix
namespace misc_private
{
// white_chars table should be sorted
// we do not treat a new line character (10) as a white character
// we do not treat a new line character (10) as a white character here
static const wchar_t white_chars[] = { 0x0009, 0x000B, 0x000C, 0x000D, 0x0020, 0x0085, 0x00A0,
0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004,
0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x2028,
@@ -61,7 +61,16 @@ namespace misc_private
}
/*
* IMPROVE ME
* we ca add our own functions with treat_new_line_as_white flag
* and with a pointer pointing after the number
*
* Toi(const wchar_t * str, const wchar_t ** str_after, bool treat_new_line_as_white);
* Toi(const wchar_t * str, bool treat_new_line_as_white);
* Toi(const std::wstring & str, bool treat_new_line_as_white);
*
*/
int Toi(const std::string & str, int base)
{
return Toi(str.c_str(), base);
@@ -471,9 +480,9 @@ PT::WTextStream IPToStr(int ip)
/*
we do not treat a new line character (10) as a white character
by default we do not treat a new line character (10) as a white character
*/
bool IsWhite(wchar_t c)
bool IsWhite(wchar_t c, bool treat_new_line_as_white)
{
using misc_private::white_chars;
@@ -481,6 +490,9 @@ using misc_private::white_chars;
size_t o1 = 0;
size_t o2 = len - 1;
if( c == 10 )
return treat_new_line_as_white ? true : false;
if( c < white_chars[o1] || c > white_chars[o2] )
return false;
@@ -513,13 +525,7 @@ bool IsWhite(const wchar_t * str, bool treat_new_line_as_white)
{
for( ; *str != 0 ; ++str )
{
if( *str == '\n' )
{
if( !treat_new_line_as_white )
return false;
}
else
if( !IsWhite(*str) )
if( !IsWhite(*str, treat_new_line_as_white) )
return false;
}
@@ -538,6 +544,95 @@ bool IsWhite(const std::wstring & str, bool treat_new_line_as_white)
void TrimWhite(std::wstring & s, bool trim_new_line_too)
{
size_t i;
if( s.empty() )
return;
// looking for white characters at the end
for(i=s.size()-1 ; i>0 && IsWhite(s[i], trim_new_line_too) ; --i);
if( i==0 && IsWhite(s[i], trim_new_line_too) )
{
// the whole string has white characters
s.clear();
return;
}
// deleting white characters at the end
if( i != s.size() - 1 )
s.erase(i+1, std::wstring::npos);
// looking for white characters at the beginning
for(i=0 ; i<s.size() && IsWhite(s[i], trim_new_line_too) ; ++i);
// deleting white characters at the beginning
if( i != 0 )
s.erase(0, i);
}
const wchar_t * SkipWhite(const wchar_t * s, bool treat_new_line_as_white)
{
while( IsWhite(*s, treat_new_line_as_white) )
++s;
return s;
}
void TrimFirst(std::wstring & s, wchar_t c)
{
size_t i;
if( s.empty() )
return;
// looking for the 'c' characters at the beginning
for(i=0 ; i<s.size() && s[i]==c ; ++i);
// deleting the 'c' characters at the beginning
if( i != 0 )
s.erase(0, i);
}
void TrimLast(std::wstring & s, wchar_t c)
{
size_t i;
if( s.empty() )
return;
// looking for the 'c' characters at the end
for(i=s.size()-1 ; i>0 && s[i]==c ; --i);
if( i==0 && s[i]==c )
{
// the whole string has the 'c' characters
s.clear();
return;
}
// deleting 'c' characters at the end
if( i != s.size() - 1 )
s.erase(i+1, std::wstring::npos);
}
void Trim(std::wstring & s, wchar_t c)
{
if( s.empty() )
return;
TrimLast(s, c);
TrimFirst(s, c);
}
bool IsLastSlash(const std::wstring & path)
@@ -549,6 +644,97 @@ return path[path.size()-1] == '/';
}
bool IsInt(const wchar_t * str, bool treat_new_line_as_white, bool allow_negative_value)
{
size_t digit = 0;
str = SkipWhite(str, treat_new_line_as_white);
if( allow_negative_value && *str == '-' )
str += 1;
while( *str>='0' && *str<='9' )
{
digit += 1;
str += 1;
}
if( digit == 0 )
return false;
str = SkipWhite(str, treat_new_line_as_white);
if( *str != 0 )
return false;
return true;
}
bool IsInt(const wchar_t * str, bool treat_new_line_as_white)
{
return IsInt(str, treat_new_line_as_white, true);
}
bool IsInt(const std::wstring & str, bool treat_new_line_as_white)
{
return IsInt(str.c_str(), treat_new_line_as_white);
}
bool IsSize(const wchar_t * str, bool treat_new_line_as_white)
{
return IsInt(str, treat_new_line_as_white, false);
}
bool IsSize(const std::wstring & str, bool treat_new_line_as_white)
{
return IsSize(str.c_str(), treat_new_line_as_white);
}
bool IsFloat(const wchar_t * str, bool treat_new_line_as_white)
{
size_t digit = 0;
size_t comma = 0;
str = SkipWhite(str, treat_new_line_as_white);
if( *str == '-' )
str += 1;
while( (*str == ',' || *str == '.') || (*str>='0' && *str<='9') )
{
if( *str == ',' || *str == '.' )
comma += 1;
else
digit += 1;
str += 1;
}
if( comma > 1 || digit == 0 )
return false;
str = SkipWhite(str, treat_new_line_as_white);
if( *str != 0 )
return false;
return true;
}
bool IsFloat(const std::wstring & str, bool treat_new_line_as_white)
{
return IsFloat(str.c_str(), treat_new_line_as_white);
}
void Overwrite(std::string & str)
{
@@ -564,23 +750,6 @@ void Overwrite(std::wstring & str)
const char * SkipWhite(const char * s)
{
while( IsWhite(*s) )
++s;
return s;
}
const wchar_t * SkipWhite(const wchar_t * s)
{
while( IsWhite(*s) )
++s;
return s;
}
wchar_t ToSmall(wchar_t c)
{

139
core/misc.h Executable file → Normal file
View File

@@ -243,94 +243,70 @@ PT::WTextStream IPToStr(int ip);
bool IsWhite(wchar_t s);
bool IsWhite(wchar_t s, bool treat_new_line_as_white = false);
bool IsWhite(const wchar_t * str, bool treat_new_line_as_white = false);
bool IsWhite(const std::wstring & str, bool treat_new_line_as_white = false);
void TrimWhite(std::wstring & s, bool trim_new_line_too = false);
const wchar_t * SkipWhite(const wchar_t * s, bool treat_new_line_as_white = false);
void TrimFirst(std::wstring & s, wchar_t c);
void TrimLast(std::wstring & s, wchar_t c);
void Trim(std::wstring & s, wchar_t c);
bool IsLastSlash(const std::wstring & path);
template<class StringType>
void TrimWhite(StringType & s)
{
typename StringType::size_type i;
if( s.empty() )
return;
// looking for white characters at the end
for(i=s.size()-1 ; i>0 && IsWhite(s[i]) ; --i);
if( i==0 && IsWhite(s[i]) )
{
// the whole string has white characters
s.clear();
return;
}
// deleting white characters at the end
if( i != s.size() - 1 )
s.erase(i+1, StringType::npos);
// looking for white characters at the beginning
for(i=0 ; i<s.size() && IsWhite(s[i]) ; ++i);
// deleting white characters at the beginning
if( i != 0 )
s.erase(0, i);
}
/*
* returns true if str is an integer number
* white strings at the beginning and at the end are ignored
* e.g. returns true for:
* " 10 "
* " -20 "
* e.g. returns false for:
* ""
* "- 20"
* "z"
*/
bool IsInt(const wchar_t * str, bool treat_new_line_as_white = false);
bool IsInt(const std::wstring & str, bool treat_new_line_as_white = false);
template<class StringType>
void TrimFirst(StringType & s, wchar_t c)
{
typename StringType::size_type i;
if( s.empty() )
return;
// looking for the 'c' characters at the beginning
for(i=0 ; i<s.size() && s[i]==c ; ++i);
// deleting the 'c' characters at the beginning
if( i != 0 )
s.erase(0, i);
}
/*
* returns true if str is a non-negative integer number
* white strings at the beginning and at the end are ignored
* e.g. returns true for:
* " 0 "
* " 10 "
* " 20 "
* e.g. returns false for:
* ""
* " -20 "
* "z"
*/
bool IsSize(const wchar_t * str, bool treat_new_line_as_white = false);
bool IsSize(const std::wstring & str, bool treat_new_line_as_white = false);
template<class StringType>
void TrimLast(StringType & s, wchar_t c)
{
typename StringType::size_type i;
if( s.empty() )
return;
// looking for the 'c' characters at the end
for(i=s.size()-1 ; i>0 && s[i]==c ; --i);
if( i==0 && s[i]==c )
{
// the whole string has the 'c' characters
s.clear();
return;
}
// deleting 'c' characters at the end
if( i != s.size() - 1 )
s.erase(i+1, StringType::npos);
}
template<class StringType>
void Trim(StringType & s, wchar_t c)
{
if( s.empty() )
return;
TrimLast(s, c);
TrimFirst(s, c);
}
/*
* returns true if str is a floating point number
* white strings at the beginning and at the end are ignored
* as a decimal comma can be a dot or a comma
* e.g. returns true for:
* " 10 "
* " -20.3 "
* " 30,5 "
* e.g. returns false for:
* ""
* "- 20.1"
* "20.1.2"
* "z"
*/
bool IsFloat(const wchar_t * str, bool treat_new_line_as_white = false);
bool IsFloat(const std::wstring & str, bool treat_new_line_as_white = false);
void Overwrite(std::string & str);
@@ -391,8 +367,7 @@ bool was_comma = false;
wchar_t ToSmall(wchar_t c);
void ToSmall(std::wstring & s);
const char * SkipWhite(const char * s);
const wchar_t * SkipWhite(const wchar_t * s);

0
core/mount.cpp Executable file → Normal file
View File

0
core/mount.h Executable file → Normal file
View File

0
core/mountparser.cpp Executable file → Normal file
View File

0
core/mountparser.h Executable file → Normal file
View File

0
core/mounts.cpp Executable file → Normal file
View File

0
core/mounts.h Executable file → Normal file
View File

0
core/plugin.cpp Executable file → Normal file
View File

0
core/plugin.h Executable file → Normal file
View File

0
core/plugindata.cpp Executable file → Normal file
View File

0
core/plugindata.h Executable file → Normal file
View File

0
core/pluginmsg.h Executable file → Normal file
View File

0
core/postmultiparser.cpp Executable file → Normal file
View File

0
core/postmultiparser.h Executable file → Normal file
View File

0
core/postparser.h Executable file → Normal file
View File

0
core/rebus.cpp Executable file → Normal file
View File

0
core/rebus.h Executable file → Normal file
View File

0
core/request.cpp Executable file → Normal file
View File

0
core/request.h Executable file → Normal file
View File

0
core/requesttypes.h Executable file → Normal file
View File

0
core/run.cpp Executable file → Normal file
View File

0
core/run.h Executable file → Normal file
View File

0
core/session.cpp Executable file → Normal file
View File

0
core/session.h Executable file → Normal file
View File

0
core/sessioncontainer.cpp Executable file → Normal file
View File

0
core/sessioncontainer.h Executable file → Normal file
View File

0
core/sessionmanager.cpp Executable file → Normal file
View File

0
core/sessionmanager.h Executable file → Normal file
View File

0
core/sessionparser.cpp Executable file → Normal file
View File

0
core/sessionparser.h Executable file → Normal file
View File

0
core/slog.cpp Executable file → Normal file
View File

0
core/slog.h Executable file → Normal file
View File

0
core/synchro.cpp Executable file → Normal file
View File

0
core/synchro.h Executable file → Normal file
View File

0
core/system.cpp Executable file → Normal file
View File

0
core/system.h Executable file → Normal file
View File

0
core/textstream.h Executable file → Normal file
View File

0
core/threadmanager.cpp Executable file → Normal file
View File

0
core/threadmanager.h Executable file → Normal file
View File

0
core/ugcontainer.h Executable file → Normal file
View File

0
core/user.cpp Executable file → Normal file
View File

0
core/user.h Executable file → Normal file
View File

0
core/users.cpp Executable file → Normal file
View File

0
core/users.h Executable file → Normal file
View File

2
core/version.h Executable file → Normal file
View File

@@ -42,7 +42,7 @@ namespace Winix
#define WINIX_VER_MAJOR 0
#define WINIX_VER_MINOR 6
#define WINIX_VER_REVISION 3
#define WINIX_VER_REVISION 4

0
db/Makefile Executable file → Normal file
View File

0
db/Makefile.dep Executable file → Normal file
View File

0
db/Makefile.o.dep Executable file → Normal file
View File

0
db/db.cpp Executable file → Normal file
View File

0
db/db.h Executable file → Normal file
View File

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