changed: now we do not use std::string and char* in the Winix API
everywhere we are using std::wstring and wchar_t* (std::string and char* is used only locally in some places especially when creating a path to OS file system etc.) added: to the special thread when winix closes: a write function for curl: FetchPageOnExitCurlCallback() without this function the curl library will print the page's content to the standart output changed: TextStream<> class from core can make UTF8<->wide strings conversions removed: from config: utf8 option now winix expects UTF8 from the user's input (html forms, url-es) and outputs strings in the UTF8 format git-svn-id: svn://ttmath.org/publicrep/winix/trunk@965 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
4abf6642f7
commit
8196fb77d1
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,15 @@
|
|||
# DO NOT DELETE
|
||||
|
||||
acceptbaseparser.o: acceptbaseparser.h
|
||||
acceptbaseparser.o: acceptbaseparser.h misc.h item.h
|
||||
acceptbaseparser.o: ../../pikotools/space/space.h
|
||||
acceptbaseparser.o: ../../pikotools/textstream/types.h
|
||||
acceptbaseparser.o: ../../pikotools/date/date.h requesttypes.h
|
||||
acceptbaseparser.o: ../../pikotools/textstream/textstream.h
|
||||
acceptbaseparser.o: ../../pikotools/convert/convert.h
|
||||
acceptbaseparser.o: ../../pikotools/convert/inttostr.h
|
||||
acceptbaseparser.o: ../../pikotools/membuffer/membuffer.h
|
||||
acceptbaseparser.o: ../../pikotools/textstream/types.h
|
||||
acceptbaseparser.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
app.o: app.h config.h ../../pikotools/space/spaceparser.h
|
||||
app.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
app.o: htmlfilter.h system.h job.h basethread.h synchro.h
|
||||
|
@ -12,7 +21,7 @@ app.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
|||
app.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
app.o: ../../pikotools/membuffer/membuffer.h
|
||||
app.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
app.o: ../../winix/core/error.h ../../winix/db/dbitemquery.h
|
||||
app.o: winix_const.h ../../winix/core/error.h ../../winix/db/dbitemquery.h
|
||||
app.o: ../../winix/core/item.h ../../winix/db/dbitemcolumns.h
|
||||
app.o: ../../winix/core/user.h ../../winix/core/group.h
|
||||
app.o: ../../winix/core/dircontainer.h ../../winix/core/ugcontainer.h log.h
|
||||
|
@ -66,18 +75,18 @@ app.o: postmultiparser.h acceptencodingparser.h acceptbaseparser.h
|
|||
basethread.o: basethread.h synchro.h
|
||||
bbcodeparser.o: bbcodeparser.h htmlfilter.h
|
||||
compress.o: compress.h requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
compress.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
compress.o: ../../pikotools/convert/convert.h
|
||||
compress.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
compress.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
|
||||
compress.o: ../../pikotools/convert/inttostr.h
|
||||
compress.o: ../../pikotools/membuffer/membuffer.h
|
||||
compress.o: ../../pikotools/textstream/types.h log.h textstream.h
|
||||
compress.o: logmanipulators.h slog.h cur.h request.h item.h error.h config.h
|
||||
compress.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
compress.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
compress.o: ../../winix/templates/htmltextstream.h
|
||||
compress.o: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
compress.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
compress.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
|
||||
compress.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
compress.o: winix_const.h ../../pikotools/space/spacetojson.h session.h
|
||||
compress.o: user.h plugindata.h rebus.h ipban.h mount.h
|
||||
compress.o: ../../winix/templates/locale.h
|
||||
config.o: config.h ../../pikotools/space/spaceparser.h
|
||||
config.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
config.o: htmlfilter.h log.h textstream.h logmanipulators.h
|
||||
|
@ -90,9 +99,9 @@ config.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
|||
config.o: requesttypes.h item.h error.h
|
||||
config.o: ../../winix/templates/htmltextstream.h
|
||||
config.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
config.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
|
||||
config.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h plugin.h
|
||||
config.o: pluginmsg.h system.h job.h basethread.h synchro.h dirs.h
|
||||
config.o: winix_const.h ../../pikotools/space/spacetojson.h session.h user.h
|
||||
config.o: plugindata.h rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
config.o: plugin.h pluginmsg.h system.h job.h basethread.h synchro.h dirs.h
|
||||
config.o: dircontainer.h ../../winix/db/db.h ../../winix/db/dbbase.h
|
||||
config.o: ../../winix/db/dbconn.h ../../winix/db/dbtextstream.h
|
||||
config.o: ../../winix/core/error.h ../../winix/db/dbitemquery.h
|
||||
|
@ -151,10 +160,11 @@ crypt.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
|||
crypt.o: ../../pikotools/membuffer/membuffer.h
|
||||
crypt.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
crypt.o: requesttypes.h item.h error.h ../../winix/templates/htmltextstream.h
|
||||
crypt.o: ../../winix/core/textstream.h misc.h
|
||||
crypt.o: ../../winix/core/textstream.h misc.h winix_const.h
|
||||
crypt.o: ../../pikotools/space/spacetojson.h session.h plugindata.h rebus.h
|
||||
crypt.o: ipban.h mount.h ../../winix/templates/locale.h
|
||||
dircontainer.o: dircontainer.h item.h ../../pikotools/space/space.h
|
||||
dircontainer.o: ../../pikotools/textstream/types.h
|
||||
dircontainer.o: ../../pikotools/date/date.h log.h textstream.h
|
||||
dircontainer.o: logmanipulators.h ../../pikotools/textstream/textstream.h
|
||||
dircontainer.o: ../../pikotools/convert/convert.h
|
||||
|
@ -163,24 +173,24 @@ dircontainer.o: ../../pikotools/membuffer/membuffer.h
|
|||
dircontainer.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
dircontainer.o: requesttypes.h error.h config.h
|
||||
dircontainer.o: ../../pikotools/space/spaceparser.h
|
||||
dircontainer.o: ../../pikotools/space/space.h
|
||||
dircontainer.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
dircontainer.o: ../../pikotools/space/space.h htmlfilter.h
|
||||
dircontainer.o: ../../winix/templates/htmltextstream.h
|
||||
dircontainer.o: ../../winix/core/textstream.h misc.h
|
||||
dircontainer.o: ../../pikotools/utf8/utf8.h
|
||||
dircontainer.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
dircontainer.o: ../../pikotools/space/spacetojson.h session.h user.h
|
||||
dircontainer.o: plugindata.h rebus.h ipban.h mount.h
|
||||
dircontainer.o: ../../winix/templates/locale.h
|
||||
dirs.o: dirs.h item.h ../../pikotools/space/space.h
|
||||
dirs.o: ../../pikotools/date/date.h dircontainer.h ../../winix/db/db.h
|
||||
dirs.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
dirs.o: ../../winix/db/dbtextstream.h ../../winix/core/textstream.h misc.h
|
||||
dirs.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
dirs.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
dirs.o: dircontainer.h ../../winix/db/db.h ../../winix/db/dbbase.h
|
||||
dirs.o: ../../winix/db/dbconn.h ../../winix/db/dbtextstream.h
|
||||
dirs.o: ../../winix/core/textstream.h misc.h requesttypes.h
|
||||
dirs.o: ../../pikotools/textstream/textstream.h
|
||||
dirs.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
dirs.o: ../../pikotools/membuffer/membuffer.h
|
||||
dirs.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
dirs.o: ../../winix/core/error.h ../../pikotools/space/spaceparser.h
|
||||
dirs.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
dirs.o: winix_const.h ../../winix/core/error.h
|
||||
dirs.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
dirs.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
dirs.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
dirs.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
|
||||
|
@ -201,14 +211,15 @@ dirs.o: lastcontainer.h
|
|||
groups.o: groups.h group.h ugcontainer.h ../../winix/db/db.h
|
||||
groups.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
groups.o: ../../winix/db/dbtextstream.h ../../winix/core/textstream.h misc.h
|
||||
groups.o: item.h ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
groups.o: item.h ../../pikotools/space/space.h
|
||||
groups.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
groups.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
groups.o: ../../pikotools/convert/convert.h
|
||||
groups.o: ../../pikotools/convert/inttostr.h
|
||||
groups.o: ../../pikotools/membuffer/membuffer.h
|
||||
groups.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
groups.o: ../../winix/core/error.h ../../pikotools/space/spaceparser.h
|
||||
groups.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
groups.o: winix_const.h ../../winix/core/error.h
|
||||
groups.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
groups.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
groups.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
groups.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
|
||||
|
@ -218,17 +229,27 @@ groups.o: ../../winix/templates/htmltextstream.h
|
|||
groups.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
|
||||
groups.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
htmlfilter.o: htmlfilter.h
|
||||
httpsimpleparser.o: httpsimpleparser.h
|
||||
httpsimpleparser.o: httpsimpleparser.h misc.h item.h
|
||||
httpsimpleparser.o: ../../pikotools/space/space.h
|
||||
httpsimpleparser.o: ../../pikotools/textstream/types.h
|
||||
httpsimpleparser.o: ../../pikotools/date/date.h requesttypes.h
|
||||
httpsimpleparser.o: ../../pikotools/textstream/textstream.h
|
||||
httpsimpleparser.o: ../../pikotools/convert/convert.h
|
||||
httpsimpleparser.o: ../../pikotools/convert/inttostr.h
|
||||
httpsimpleparser.o: ../../pikotools/membuffer/membuffer.h
|
||||
httpsimpleparser.o: ../../pikotools/textstream/types.h
|
||||
httpsimpleparser.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
image.o: image.h basethread.h synchro.h textstream.h ../../winix/db/db.h
|
||||
image.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
image.o: ../../winix/db/dbtextstream.h ../../winix/core/textstream.h misc.h
|
||||
image.o: item.h ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
image.o: item.h ../../pikotools/space/space.h
|
||||
image.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
image.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
image.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
image.o: ../../pikotools/membuffer/membuffer.h
|
||||
image.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
image.o: ../../winix/core/error.h ../../pikotools/space/spaceparser.h
|
||||
image.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
image.o: winix_const.h ../../winix/core/error.h
|
||||
image.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
image.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
image.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
image.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
|
||||
|
@ -283,42 +304,45 @@ image.o: ../../winix/templates/htmltextstream.h
|
|||
image.o: ../../winix/core/sessionmanager.h lock.h
|
||||
ipbancontainer.o: ipbancontainer.h ipban.h log.h textstream.h
|
||||
ipbancontainer.o: logmanipulators.h ../../pikotools/textstream/textstream.h
|
||||
ipbancontainer.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
ipbancontainer.o: ../../pikotools/space/space.h
|
||||
ipbancontainer.o: ../../pikotools/textstream/types.h
|
||||
ipbancontainer.o: ../../pikotools/date/date.h
|
||||
ipbancontainer.o: ../../pikotools/convert/convert.h
|
||||
ipbancontainer.o: ../../pikotools/convert/inttostr.h
|
||||
ipbancontainer.o: ../../pikotools/membuffer/membuffer.h
|
||||
ipbancontainer.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
ipbancontainer.o: requesttypes.h item.h error.h config.h
|
||||
ipbancontainer.o: ../../pikotools/space/spaceparser.h
|
||||
ipbancontainer.o: ../../pikotools/space/space.h
|
||||
ipbancontainer.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
ipbancontainer.o: ../../pikotools/space/space.h htmlfilter.h
|
||||
ipbancontainer.o: ../../winix/templates/htmltextstream.h
|
||||
ipbancontainer.o: ../../winix/core/textstream.h misc.h
|
||||
ipbancontainer.o: ../../pikotools/utf8/utf8.h
|
||||
ipbancontainer.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
ipbancontainer.o: ../../pikotools/space/spacetojson.h session.h user.h
|
||||
ipbancontainer.o: plugindata.h rebus.h mount.h ../../winix/templates/locale.h
|
||||
item.o: item.h ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
item.o: misc.h requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
item.o: item.h ../../pikotools/space/space.h
|
||||
item.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h misc.h
|
||||
item.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
item.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
item.o: ../../pikotools/membuffer/membuffer.h
|
||||
item.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
item.o: crypt.h run.h config.h ../../pikotools/space/spaceparser.h
|
||||
item.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
item.o: winix_const.h crypt.h run.h config.h
|
||||
item.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
item.o: htmlfilter.h user.h
|
||||
job.o: job.h basethread.h synchro.h ../../pikotools/space/space.h plugin.h
|
||||
job.o: pluginmsg.h log.h textstream.h logmanipulators.h
|
||||
job.o: ../../pikotools/textstream/textstream.h ../../pikotools/date/date.h
|
||||
job.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
job.o: job.h basethread.h synchro.h ../../pikotools/space/space.h
|
||||
job.o: ../../pikotools/textstream/types.h plugin.h pluginmsg.h log.h
|
||||
job.o: textstream.h logmanipulators.h ../../pikotools/textstream/textstream.h
|
||||
job.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
|
||||
job.o: ../../pikotools/convert/inttostr.h
|
||||
job.o: ../../pikotools/membuffer/membuffer.h
|
||||
job.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
job.o: requesttypes.h item.h error.h config.h
|
||||
job.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
job.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
job.o: ../../winix/templates/htmltextstream.h ../../winix/core/textstream.h
|
||||
job.o: misc.h ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
|
||||
job.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
|
||||
job.o: ../../winix/templates/locale.h system.h dirs.h dircontainer.h
|
||||
job.o: ../../winix/db/db.h ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
job.o: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
job.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
job.o: winix_const.h ../../pikotools/space/spacetojson.h session.h user.h
|
||||
job.o: plugindata.h rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
job.o: system.h dirs.h dircontainer.h ../../winix/db/db.h
|
||||
job.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
job.o: ../../winix/db/dbtextstream.h ../../winix/core/error.h
|
||||
job.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
job.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
|
@ -368,62 +392,62 @@ lastcontainer.o: lastcontainer.h ../../pikotools/date/date.h log.h
|
|||
lastcontainer.o: textstream.h logmanipulators.h
|
||||
lastcontainer.o: ../../pikotools/textstream/textstream.h
|
||||
lastcontainer.o: ../../pikotools/space/space.h
|
||||
lastcontainer.o: ../../pikotools/textstream/types.h
|
||||
lastcontainer.o: ../../pikotools/convert/convert.h
|
||||
lastcontainer.o: ../../pikotools/convert/inttostr.h
|
||||
lastcontainer.o: ../../pikotools/membuffer/membuffer.h
|
||||
lastcontainer.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
lastcontainer.o: requesttypes.h item.h error.h config.h
|
||||
lastcontainer.o: ../../pikotools/space/spaceparser.h
|
||||
lastcontainer.o: ../../pikotools/space/space.h
|
||||
lastcontainer.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
lastcontainer.o: ../../pikotools/space/space.h htmlfilter.h
|
||||
lastcontainer.o: ../../winix/templates/htmltextstream.h
|
||||
lastcontainer.o: ../../winix/core/textstream.h misc.h
|
||||
lastcontainer.o: ../../pikotools/utf8/utf8.h
|
||||
lastcontainer.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
lastcontainer.o: ../../pikotools/space/spacetojson.h session.h user.h
|
||||
lastcontainer.o: plugindata.h rebus.h ipban.h mount.h
|
||||
lastcontainer.o: ../../winix/templates/locale.h
|
||||
loadavg.o: loadavg.h log.h textstream.h logmanipulators.h
|
||||
loadavg.o: ../../pikotools/textstream/textstream.h
|
||||
loadavg.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
loadavg.o: ../../pikotools/convert/convert.h
|
||||
loadavg.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
loadavg.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
|
||||
loadavg.o: ../../pikotools/convert/inttostr.h
|
||||
loadavg.o: ../../pikotools/membuffer/membuffer.h
|
||||
loadavg.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
loadavg.o: requesttypes.h item.h error.h config.h
|
||||
loadavg.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
loadavg.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
loadavg.o: ../../winix/templates/htmltextstream.h
|
||||
loadavg.o: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
loadavg.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
loadavg.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
|
||||
loadavg.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
loadavg.o: winix_const.h ../../pikotools/space/spacetojson.h session.h user.h
|
||||
loadavg.o: plugindata.h rebus.h ipban.h mount.h
|
||||
loadavg.o: ../../winix/templates/locale.h
|
||||
lock.o: lock.h synchro.h
|
||||
log.o: log.h textstream.h logmanipulators.h
|
||||
log.o: ../../pikotools/textstream/textstream.h ../../pikotools/space/space.h
|
||||
log.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
|
||||
log.o: ../../pikotools/convert/inttostr.h
|
||||
log.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
log.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
log.o: ../../pikotools/membuffer/membuffer.h
|
||||
log.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
log.o: requesttypes.h item.h error.h config.h
|
||||
log.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
log.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
log.o: ../../winix/templates/htmltextstream.h ../../winix/core/textstream.h
|
||||
log.o: misc.h ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
|
||||
log.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
|
||||
log.o: ../../winix/templates/locale.h timezones.h timezone.h
|
||||
log.o: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
log.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
log.o: winix_const.h ../../pikotools/space/spacetojson.h session.h user.h
|
||||
log.o: plugindata.h rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
log.o: timezones.h timezone.h
|
||||
misc.o: misc.h item.h ../../pikotools/space/space.h
|
||||
misc.o: ../../pikotools/date/date.h requesttypes.h
|
||||
misc.o: ../../pikotools/textstream/textstream.h
|
||||
misc.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
misc.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
misc.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
misc.o: ../../pikotools/membuffer/membuffer.h
|
||||
misc.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h log.h
|
||||
misc.o: textstream.h logmanipulators.h slog.h cur.h request.h error.h
|
||||
misc.o: config.h ../../pikotools/space/spaceparser.h
|
||||
misc.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
misc.o: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
misc.o: ../../winix/core/textstream.h ../../pikotools/space/spacetojson.h
|
||||
misc.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
|
||||
misc.o: ../../winix/templates/locale.h ../../winix/templates/templates.h
|
||||
misc.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
misc.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
misc.o: winix_const.h log.h textstream.h logmanipulators.h slog.h cur.h
|
||||
misc.o: request.h error.h config.h ../../pikotools/space/spaceparser.h
|
||||
misc.o: ../../pikotools/space/space.h htmlfilter.h
|
||||
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: ../../winix/core/item.h ../../winix/templates/indexpatterns.h
|
||||
|
@ -439,30 +463,31 @@ misc.o: ../../winix/db/dbitemquery.h ../../winix/db/dbitemcolumns.h
|
|||
misc.o: ../../winix/core/user.h ../../winix/core/group.h
|
||||
misc.o: ../../winix/core/dircontainer.h ../../winix/core/ugcontainer.h
|
||||
mount.o: mount.h misc.h item.h ../../pikotools/space/space.h
|
||||
mount.o: ../../pikotools/date/date.h requesttypes.h
|
||||
mount.o: ../../pikotools/textstream/textstream.h
|
||||
mount.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
mount.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
mount.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
mount.o: ../../pikotools/membuffer/membuffer.h
|
||||
mount.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
mount.o: winix_const.h
|
||||
mountparser.o: mountparser.h mount.h item.h ../../pikotools/space/space.h
|
||||
mountparser.o: ../../pikotools/date/date.h dirs.h dircontainer.h
|
||||
mountparser.o: ../../winix/db/db.h ../../winix/db/dbbase.h
|
||||
mountparser.o: ../../winix/db/dbconn.h ../../winix/db/dbtextstream.h
|
||||
mountparser.o: ../../winix/core/textstream.h misc.h requesttypes.h
|
||||
mountparser.o: ../../pikotools/textstream/textstream.h
|
||||
mountparser.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
mountparser.o: dirs.h dircontainer.h ../../winix/db/db.h
|
||||
mountparser.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
mountparser.o: ../../winix/db/dbtextstream.h ../../winix/core/textstream.h
|
||||
mountparser.o: misc.h requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
mountparser.o: ../../pikotools/convert/convert.h
|
||||
mountparser.o: ../../pikotools/convert/inttostr.h
|
||||
mountparser.o: ../../pikotools/membuffer/membuffer.h
|
||||
mountparser.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
mountparser.o: ../../winix/core/error.h ../../pikotools/space/spaceparser.h
|
||||
mountparser.o: ../../pikotools/space/space.h
|
||||
mountparser.o: ../../pikotools/textstream/types.h
|
||||
mountparser.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
mountparser.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
mountparser.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
|
||||
mountparser.o: ../../winix/core/ugcontainer.h log.h textstream.h
|
||||
mountparser.o: logmanipulators.h slog.h cur.h request.h error.h config.h
|
||||
mountparser.o: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
mountparser.o: winix_const.h ../../winix/core/error.h
|
||||
mountparser.o: ../../pikotools/space/spaceparser.h
|
||||
mountparser.o: ../../pikotools/space/space.h ../../winix/db/dbitemquery.h
|
||||
mountparser.o: ../../winix/core/item.h ../../winix/db/dbitemcolumns.h
|
||||
mountparser.o: ../../winix/core/user.h ../../winix/core/group.h
|
||||
mountparser.o: ../../winix/core/dircontainer.h ../../winix/core/ugcontainer.h
|
||||
mountparser.o: log.h textstream.h logmanipulators.h slog.h cur.h request.h
|
||||
mountparser.o: error.h config.h htmlfilter.h
|
||||
mountparser.o: ../../winix/templates/htmltextstream.h
|
||||
mountparser.o: ../../pikotools/space/spacetojson.h session.h user.h
|
||||
mountparser.o: plugindata.h rebus.h ipban.h ../../winix/templates/locale.h
|
||||
mountparser.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
|
||||
|
@ -476,17 +501,17 @@ 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
|
||||
mounts.o: mounts.h mount.h error.h dirs.h item.h
|
||||
mounts.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
mounts.o: dircontainer.h ../../winix/db/db.h ../../winix/db/dbbase.h
|
||||
mounts.o: ../../winix/db/dbconn.h ../../winix/db/dbtextstream.h
|
||||
mounts.o: ../../winix/core/textstream.h misc.h requesttypes.h
|
||||
mounts.o: ../../pikotools/textstream/textstream.h
|
||||
mounts.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
mounts.o: ../../pikotools/date/date.h dircontainer.h ../../winix/db/db.h
|
||||
mounts.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
mounts.o: ../../winix/db/dbtextstream.h ../../winix/core/textstream.h misc.h
|
||||
mounts.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
mounts.o: ../../pikotools/convert/convert.h
|
||||
mounts.o: ../../pikotools/convert/inttostr.h
|
||||
mounts.o: ../../pikotools/membuffer/membuffer.h
|
||||
mounts.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
mounts.o: ../../winix/core/error.h ../../pikotools/space/spaceparser.h
|
||||
mounts.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
mounts.o: winix_const.h ../../winix/core/error.h
|
||||
mounts.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
mounts.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
mounts.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
mounts.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
|
||||
|
@ -541,19 +566,18 @@ mounts.o: ../../winix/templates/htmltextstream.h
|
|||
mounts.o: ../../winix/core/sessionmanager.h
|
||||
plugin.o: plugin.h pluginmsg.h log.h textstream.h logmanipulators.h
|
||||
plugin.o: ../../pikotools/textstream/textstream.h
|
||||
plugin.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
plugin.o: ../../pikotools/convert/convert.h
|
||||
plugin.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
plugin.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
|
||||
plugin.o: ../../pikotools/convert/inttostr.h
|
||||
plugin.o: ../../pikotools/membuffer/membuffer.h
|
||||
plugin.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
plugin.o: requesttypes.h item.h error.h config.h
|
||||
plugin.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
plugin.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
plugin.o: ../../winix/templates/htmltextstream.h
|
||||
plugin.o: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
plugin.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
plugin.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
|
||||
plugin.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h system.h
|
||||
plugin.o: job.h basethread.h synchro.h dirs.h dircontainer.h
|
||||
plugin.o: winix_const.h ../../pikotools/space/spacetojson.h session.h user.h
|
||||
plugin.o: plugindata.h rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
plugin.o: system.h job.h basethread.h synchro.h dirs.h dircontainer.h
|
||||
plugin.o: ../../winix/db/db.h ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
plugin.o: ../../winix/db/dbtextstream.h ../../winix/core/error.h
|
||||
plugin.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
|
@ -605,28 +629,28 @@ plugin.o: ../../winix/templates/htmltextstream.h
|
|||
plugin.o: ../../winix/core/sessionmanager.h
|
||||
plugindata.o: plugindata.h plugin.h pluginmsg.h log.h textstream.h
|
||||
plugindata.o: logmanipulators.h ../../pikotools/textstream/textstream.h
|
||||
plugindata.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
plugindata.o: ../../pikotools/space/space.h
|
||||
plugindata.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
plugindata.o: ../../pikotools/convert/convert.h
|
||||
plugindata.o: ../../pikotools/convert/inttostr.h
|
||||
plugindata.o: ../../pikotools/membuffer/membuffer.h
|
||||
plugindata.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
plugindata.o: requesttypes.h item.h error.h config.h
|
||||
plugindata.o: ../../pikotools/space/spaceparser.h
|
||||
plugindata.o: ../../pikotools/space/space.h
|
||||
plugindata.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
plugindata.o: ../../pikotools/space/space.h htmlfilter.h
|
||||
plugindata.o: ../../winix/templates/htmltextstream.h
|
||||
plugindata.o: ../../winix/core/textstream.h misc.h
|
||||
plugindata.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
|
||||
plugindata.o: session.h user.h rebus.h ipban.h mount.h
|
||||
plugindata.o: ../../winix/templates/locale.h system.h job.h basethread.h
|
||||
plugindata.o: synchro.h dirs.h dircontainer.h ../../winix/db/db.h
|
||||
plugindata.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
plugindata.o: ../../winix/db/dbtextstream.h ../../winix/core/error.h
|
||||
plugindata.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
plugindata.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
plugindata.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
|
||||
plugindata.o: ../../winix/core/ugcontainer.h ../../winix/notify/notify.h
|
||||
plugindata.o: ../../winix/notify/notifypool.h
|
||||
plugindata.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
plugindata.o: ../../pikotools/space/spacetojson.h session.h user.h rebus.h
|
||||
plugindata.o: ipban.h mount.h ../../winix/templates/locale.h system.h job.h
|
||||
plugindata.o: basethread.h synchro.h dirs.h dircontainer.h
|
||||
plugindata.o: ../../winix/db/db.h ../../winix/db/dbbase.h
|
||||
plugindata.o: ../../winix/db/dbconn.h ../../winix/db/dbtextstream.h
|
||||
plugindata.o: ../../winix/core/error.h ../../winix/db/dbitemquery.h
|
||||
plugindata.o: ../../winix/core/item.h ../../winix/db/dbitemcolumns.h
|
||||
plugindata.o: ../../winix/core/user.h ../../winix/core/group.h
|
||||
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
|
||||
|
@ -673,16 +697,17 @@ plugindata.o: ../../winix/templates/htmltextstream.h
|
|||
plugindata.o: ../../winix/core/sessionmanager.h
|
||||
postmultiparser.o: postmultiparser.h error.h requesttypes.h
|
||||
postmultiparser.o: ../../pikotools/textstream/textstream.h
|
||||
postmultiparser.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
postmultiparser.o: ../../pikotools/space/space.h
|
||||
postmultiparser.o: ../../pikotools/textstream/types.h
|
||||
postmultiparser.o: ../../pikotools/date/date.h
|
||||
postmultiparser.o: ../../pikotools/convert/convert.h
|
||||
postmultiparser.o: ../../pikotools/convert/inttostr.h
|
||||
postmultiparser.o: ../../pikotools/membuffer/membuffer.h
|
||||
postmultiparser.o: ../../pikotools/textstream/types.h config.h
|
||||
postmultiparser.o: ../../pikotools/space/spaceparser.h
|
||||
postmultiparser.o: ../../pikotools/space/space.h
|
||||
postmultiparser.o: ../../pikotools/textstream/types.h htmlfilter.h misc.h
|
||||
postmultiparser.o: item.h ../../pikotools/utf8/utf8.h log.h textstream.h
|
||||
postmultiparser.o: logmanipulators.h slog.h cur.h request.h
|
||||
postmultiparser.o: ../../pikotools/space/space.h htmlfilter.h misc.h item.h
|
||||
postmultiparser.o: ../../pikotools/utf8/utf8.h winix_const.h log.h
|
||||
postmultiparser.o: textstream.h logmanipulators.h slog.h cur.h request.h
|
||||
postmultiparser.o: ../../winix/templates/htmltextstream.h
|
||||
postmultiparser.o: ../../winix/core/textstream.h
|
||||
postmultiparser.o: ../../pikotools/space/spacetojson.h session.h user.h
|
||||
|
@ -690,39 +715,38 @@ postmultiparser.o: plugindata.h rebus.h ipban.h mount.h
|
|||
postmultiparser.o: ../../winix/templates/locale.h
|
||||
rebus.o: log.h textstream.h logmanipulators.h
|
||||
rebus.o: ../../pikotools/textstream/textstream.h
|
||||
rebus.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
rebus.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
rebus.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
rebus.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
|
||||
rebus.o: ../../pikotools/convert/inttostr.h
|
||||
rebus.o: ../../pikotools/membuffer/membuffer.h
|
||||
rebus.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
rebus.o: requesttypes.h item.h error.h config.h
|
||||
rebus.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
rebus.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
rebus.o: ../../winix/templates/htmltextstream.h ../../winix/core/textstream.h
|
||||
rebus.o: misc.h ../../pikotools/utf8/utf8.h
|
||||
rebus.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
|
||||
rebus.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
rebus.o: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
rebus.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
rebus.o: winix_const.h ../../pikotools/space/spacetojson.h session.h user.h
|
||||
rebus.o: plugindata.h rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
request.o: request.h requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
request.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
request.o: ../../pikotools/convert/convert.h
|
||||
request.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
request.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
|
||||
request.o: ../../pikotools/convert/inttostr.h
|
||||
request.o: ../../pikotools/membuffer/membuffer.h
|
||||
request.o: ../../pikotools/textstream/types.h item.h error.h config.h
|
||||
request.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
request.o: ../../pikotools/textstream/types.h htmlfilter.h textstream.h
|
||||
request.o: ../../winix/templates/htmltextstream.h
|
||||
request.o: htmlfilter.h textstream.h ../../winix/templates/htmltextstream.h
|
||||
request.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
request.o: ../../pikotools/space/spacetojson.h log.h logmanipulators.h slog.h
|
||||
request.o: cur.h session.h user.h plugindata.h rebus.h ipban.h mount.h
|
||||
request.o: ../../winix/templates/locale.h plugin.h pluginmsg.h system.h job.h
|
||||
request.o: basethread.h synchro.h dirs.h dircontainer.h ../../winix/db/db.h
|
||||
request.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
request.o: ../../winix/db/dbtextstream.h ../../winix/core/error.h
|
||||
request.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
request.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
request.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
|
||||
request.o: ../../winix/core/ugcontainer.h ../../winix/notify/notify.h
|
||||
request.o: ../../winix/notify/notifypool.h ../../winix/templates/patterns.h
|
||||
request.o: ../../winix/templates/locale.h
|
||||
request.o: winix_const.h ../../pikotools/space/spacetojson.h log.h
|
||||
request.o: logmanipulators.h slog.h cur.h session.h user.h plugindata.h
|
||||
request.o: rebus.h ipban.h mount.h ../../winix/templates/locale.h plugin.h
|
||||
request.o: pluginmsg.h system.h job.h basethread.h synchro.h dirs.h
|
||||
request.o: dircontainer.h ../../winix/db/db.h ../../winix/db/dbbase.h
|
||||
request.o: ../../winix/db/dbconn.h ../../winix/db/dbtextstream.h
|
||||
request.o: ../../winix/core/error.h ../../winix/db/dbitemquery.h
|
||||
request.o: ../../winix/core/item.h ../../winix/db/dbitemcolumns.h
|
||||
request.o: ../../winix/core/user.h ../../winix/core/group.h
|
||||
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
|
||||
|
@ -767,57 +791,57 @@ request.o: ../../winix/templates/htmltextstream.h
|
|||
request.o: ../../winix/core/sessionmanager.h
|
||||
run.o: run.h log.h textstream.h logmanipulators.h
|
||||
run.o: ../../pikotools/textstream/textstream.h ../../pikotools/space/space.h
|
||||
run.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
|
||||
run.o: ../../pikotools/convert/inttostr.h
|
||||
run.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
run.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
run.o: ../../pikotools/membuffer/membuffer.h
|
||||
run.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
run.o: requesttypes.h item.h error.h config.h
|
||||
run.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
run.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
run.o: ../../winix/templates/htmltextstream.h ../../winix/core/textstream.h
|
||||
run.o: misc.h ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
|
||||
run.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
|
||||
run.o: ../../winix/templates/locale.h
|
||||
run.o: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
run.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
run.o: winix_const.h ../../pikotools/space/spacetojson.h session.h user.h
|
||||
run.o: plugindata.h rebus.h ipban.h mount.h ../../winix/templates/locale.h
|
||||
session.o: session.h item.h ../../pikotools/space/space.h
|
||||
session.o: ../../pikotools/date/date.h error.h user.h plugindata.h rebus.h
|
||||
session.o: textstream.h ipban.h misc.h requesttypes.h
|
||||
session.o: ../../pikotools/textstream/textstream.h
|
||||
session.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
session.o: error.h user.h plugindata.h rebus.h textstream.h ipban.h misc.h
|
||||
session.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
session.o: ../../pikotools/convert/convert.h
|
||||
session.o: ../../pikotools/convert/inttostr.h
|
||||
session.o: ../../pikotools/membuffer/membuffer.h
|
||||
session.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
session.o: winix_const.h
|
||||
sessioncontainer.o: sessioncontainer.h session.h item.h
|
||||
sessioncontainer.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
sessioncontainer.o: error.h user.h plugindata.h rebus.h textstream.h ipban.h
|
||||
sessioncontainer.o: cur.h request.h requesttypes.h
|
||||
sessioncontainer.o: ../../pikotools/textstream/textstream.h
|
||||
sessioncontainer.o: ../../pikotools/space/space.h
|
||||
sessioncontainer.o: ../../pikotools/textstream/types.h
|
||||
sessioncontainer.o: ../../pikotools/date/date.h error.h user.h plugindata.h
|
||||
sessioncontainer.o: rebus.h textstream.h ipban.h cur.h request.h
|
||||
sessioncontainer.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
sessioncontainer.o: ../../pikotools/convert/convert.h
|
||||
sessioncontainer.o: ../../pikotools/convert/inttostr.h
|
||||
sessioncontainer.o: ../../pikotools/membuffer/membuffer.h
|
||||
sessioncontainer.o: ../../pikotools/textstream/types.h config.h
|
||||
sessioncontainer.o: ../../pikotools/space/spaceparser.h
|
||||
sessioncontainer.o: ../../pikotools/space/space.h
|
||||
sessioncontainer.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
sessioncontainer.o: ../../pikotools/space/space.h htmlfilter.h
|
||||
sessioncontainer.o: ../../winix/templates/htmltextstream.h
|
||||
sessioncontainer.o: ../../winix/core/textstream.h misc.h
|
||||
sessioncontainer.o: ../../pikotools/utf8/utf8.h
|
||||
sessioncontainer.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
sessioncontainer.o: ../../pikotools/space/spacetojson.h mount.h log.h
|
||||
sessioncontainer.o: logmanipulators.h slog.h ../../winix/templates/locale.h
|
||||
sessionmanager.o: sessionmanager.h sessioncontainer.h session.h item.h
|
||||
sessionmanager.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
sessionmanager.o: error.h user.h plugindata.h rebus.h textstream.h ipban.h
|
||||
sessionmanager.o: cur.h request.h requesttypes.h
|
||||
sessionmanager.o: ../../pikotools/space/space.h
|
||||
sessionmanager.o: ../../pikotools/textstream/types.h
|
||||
sessionmanager.o: ../../pikotools/date/date.h error.h user.h plugindata.h
|
||||
sessionmanager.o: rebus.h textstream.h ipban.h cur.h request.h requesttypes.h
|
||||
sessionmanager.o: ../../pikotools/textstream/textstream.h
|
||||
sessionmanager.o: ../../pikotools/convert/convert.h
|
||||
sessionmanager.o: ../../pikotools/convert/inttostr.h
|
||||
sessionmanager.o: ../../pikotools/membuffer/membuffer.h
|
||||
sessionmanager.o: ../../pikotools/textstream/types.h config.h
|
||||
sessionmanager.o: ../../pikotools/space/spaceparser.h
|
||||
sessionmanager.o: ../../pikotools/space/space.h
|
||||
sessionmanager.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
sessionmanager.o: ../../pikotools/space/space.h htmlfilter.h
|
||||
sessionmanager.o: ../../winix/templates/htmltextstream.h
|
||||
sessionmanager.o: ../../winix/core/textstream.h misc.h
|
||||
sessionmanager.o: ../../pikotools/utf8/utf8.h
|
||||
sessionmanager.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
sessionmanager.o: ../../pikotools/space/spacetojson.h mount.h
|
||||
sessionmanager.o: ipbancontainer.h lastcontainer.h system.h job.h
|
||||
sessionmanager.o: basethread.h synchro.h dirs.h dircontainer.h
|
||||
|
@ -884,47 +908,48 @@ sessionmanager.o: ../../winix/templates/changepatterns.h
|
|||
sessionmanager.o: ../../winix/templates/htmltextstream.h
|
||||
sessionmanager.o: ../../winix/core/sessionmanager.h
|
||||
sessionparser.o: sessionparser.h session.h item.h
|
||||
sessionparser.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
sessionparser.o: error.h user.h plugindata.h rebus.h textstream.h ipban.h
|
||||
sessionparser.o: sessioncontainer.h cur.h request.h requesttypes.h
|
||||
sessionparser.o: ../../pikotools/space/space.h
|
||||
sessionparser.o: ../../pikotools/textstream/types.h
|
||||
sessionparser.o: ../../pikotools/date/date.h error.h user.h plugindata.h
|
||||
sessionparser.o: rebus.h textstream.h ipban.h sessioncontainer.h cur.h
|
||||
sessionparser.o: request.h requesttypes.h
|
||||
sessionparser.o: ../../pikotools/textstream/textstream.h
|
||||
sessionparser.o: ../../pikotools/convert/convert.h
|
||||
sessionparser.o: ../../pikotools/convert/inttostr.h
|
||||
sessionparser.o: ../../pikotools/membuffer/membuffer.h
|
||||
sessionparser.o: ../../pikotools/textstream/types.h config.h
|
||||
sessionparser.o: ../../pikotools/space/spaceparser.h
|
||||
sessionparser.o: ../../pikotools/space/space.h
|
||||
sessionparser.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
sessionparser.o: ../../pikotools/space/space.h htmlfilter.h
|
||||
sessionparser.o: ../../winix/templates/htmltextstream.h
|
||||
sessionparser.o: ../../winix/core/textstream.h misc.h
|
||||
sessionparser.o: ../../pikotools/utf8/utf8.h
|
||||
sessionparser.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
sessionparser.o: ../../pikotools/space/spacetojson.h mount.h users.h log.h
|
||||
sessionparser.o: logmanipulators.h slog.h ../../winix/templates/locale.h
|
||||
slog.o: slog.h cur.h request.h requesttypes.h
|
||||
slog.o: ../../pikotools/textstream/textstream.h ../../pikotools/space/space.h
|
||||
slog.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
|
||||
slog.o: ../../pikotools/convert/inttostr.h
|
||||
slog.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
|
||||
slog.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
slog.o: ../../pikotools/membuffer/membuffer.h
|
||||
slog.o: ../../pikotools/textstream/types.h item.h error.h config.h
|
||||
slog.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
slog.o: ../../pikotools/textstream/types.h htmlfilter.h textstream.h
|
||||
slog.o: ../../winix/templates/htmltextstream.h ../../winix/core/textstream.h
|
||||
slog.o: misc.h ../../pikotools/utf8/utf8.h
|
||||
slog.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
|
||||
slog.o: rebus.h ipban.h mount.h logmanipulators.h
|
||||
slog.o: htmlfilter.h textstream.h ../../winix/templates/htmltextstream.h
|
||||
slog.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
slog.o: winix_const.h ../../pikotools/space/spacetojson.h session.h user.h
|
||||
slog.o: plugindata.h rebus.h ipban.h mount.h logmanipulators.h
|
||||
slog.o: ../../winix/templates/locale.h
|
||||
synchro.o: synchro.h
|
||||
system.o: system.h job.h basethread.h synchro.h ../../pikotools/space/space.h
|
||||
system.o: dirs.h item.h ../../pikotools/date/date.h dircontainer.h
|
||||
system.o: ../../winix/db/db.h ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
system.o: ../../pikotools/textstream/types.h dirs.h item.h
|
||||
system.o: ../../pikotools/date/date.h dircontainer.h ../../winix/db/db.h
|
||||
system.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
system.o: ../../winix/db/dbtextstream.h ../../winix/core/textstream.h misc.h
|
||||
system.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
system.o: ../../pikotools/convert/convert.h
|
||||
system.o: ../../pikotools/convert/inttostr.h
|
||||
system.o: ../../pikotools/membuffer/membuffer.h
|
||||
system.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
system.o: ../../winix/core/error.h ../../pikotools/space/spaceparser.h
|
||||
system.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
system.o: winix_const.h ../../winix/core/error.h
|
||||
system.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
system.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
system.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
system.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
|
||||
|
@ -977,40 +1002,42 @@ system.o: ../../winix/functions/vim.h plugin.h pluginmsg.h sessionmanager.h
|
|||
system.o: sessioncontainer.h ipbancontainer.h
|
||||
threadmanager.o: threadmanager.h basethread.h synchro.h log.h textstream.h
|
||||
threadmanager.o: logmanipulators.h ../../pikotools/textstream/textstream.h
|
||||
threadmanager.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
|
||||
threadmanager.o: ../../pikotools/space/space.h
|
||||
threadmanager.o: ../../pikotools/textstream/types.h
|
||||
threadmanager.o: ../../pikotools/date/date.h
|
||||
threadmanager.o: ../../pikotools/convert/convert.h
|
||||
threadmanager.o: ../../pikotools/convert/inttostr.h
|
||||
threadmanager.o: ../../pikotools/membuffer/membuffer.h
|
||||
threadmanager.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
|
||||
threadmanager.o: requesttypes.h item.h error.h config.h
|
||||
threadmanager.o: ../../pikotools/space/spaceparser.h
|
||||
threadmanager.o: ../../pikotools/space/space.h
|
||||
threadmanager.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
threadmanager.o: ../../pikotools/space/space.h htmlfilter.h
|
||||
threadmanager.o: ../../winix/templates/htmltextstream.h
|
||||
threadmanager.o: ../../winix/core/textstream.h misc.h
|
||||
threadmanager.o: ../../pikotools/utf8/utf8.h
|
||||
threadmanager.o: ../../pikotools/utf8/utf8.h winix_const.h
|
||||
threadmanager.o: ../../pikotools/space/spacetojson.h session.h user.h
|
||||
threadmanager.o: plugindata.h rebus.h ipban.h mount.h
|
||||
threadmanager.o: ../../winix/templates/locale.h
|
||||
timezone.o: timezone.h ../../pikotools/date/date.h
|
||||
timezone.o: ../../pikotools/space/space.h misc.h item.h requesttypes.h
|
||||
timezone.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
timezone.o: misc.h item.h requesttypes.h
|
||||
timezone.o: ../../pikotools/textstream/textstream.h
|
||||
timezone.o: ../../pikotools/convert/convert.h
|
||||
timezone.o: ../../pikotools/convert/inttostr.h
|
||||
timezone.o: ../../pikotools/membuffer/membuffer.h
|
||||
timezone.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
timezone.o: winix_const.h
|
||||
timezones.o: timezones.h timezone.h ../../pikotools/date/date.h
|
||||
timezones.o: ../../pikotools/space/space.h
|
||||
timezones.o: ../../pikotools/space/spaceparser.h
|
||||
timezones.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
timezones.o: misc.h item.h requesttypes.h
|
||||
timezones.o: ../../pikotools/space/spaceparser.h
|
||||
timezones.o: ../../pikotools/space/space.h misc.h item.h requesttypes.h
|
||||
timezones.o: ../../pikotools/textstream/textstream.h
|
||||
timezones.o: ../../pikotools/convert/convert.h
|
||||
timezones.o: ../../pikotools/convert/inttostr.h
|
||||
timezones.o: ../../pikotools/membuffer/membuffer.h
|
||||
timezones.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
timezones.o: log.h textstream.h logmanipulators.h slog.h cur.h request.h
|
||||
timezones.o: error.h config.h htmlfilter.h
|
||||
timezones.o: winix_const.h log.h textstream.h logmanipulators.h slog.h cur.h
|
||||
timezones.o: request.h error.h config.h htmlfilter.h
|
||||
timezones.o: ../../winix/templates/htmltextstream.h
|
||||
timezones.o: ../../winix/core/textstream.h
|
||||
timezones.o: ../../pikotools/space/spacetojson.h session.h user.h
|
||||
|
@ -1018,35 +1045,36 @@ timezones.o: plugindata.h rebus.h ipban.h mount.h
|
|||
timezones.o: ../../winix/templates/locale.h
|
||||
user.o: user.h
|
||||
users.o: users.h sessionmanager.h sessioncontainer.h session.h item.h
|
||||
users.o: ../../pikotools/space/space.h ../../pikotools/date/date.h error.h
|
||||
users.o: user.h plugindata.h rebus.h textstream.h ipban.h cur.h request.h
|
||||
users.o: requesttypes.h ../../pikotools/textstream/textstream.h
|
||||
users.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
users.o: ../../pikotools/date/date.h error.h user.h plugindata.h rebus.h
|
||||
users.o: textstream.h ipban.h cur.h request.h requesttypes.h
|
||||
users.o: ../../pikotools/textstream/textstream.h
|
||||
users.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
users.o: ../../pikotools/membuffer/membuffer.h
|
||||
users.o: ../../pikotools/textstream/types.h config.h
|
||||
users.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
users.o: ../../pikotools/textstream/types.h htmlfilter.h
|
||||
users.o: ../../winix/templates/htmltextstream.h ../../winix/core/textstream.h
|
||||
users.o: misc.h ../../pikotools/utf8/utf8.h
|
||||
users.o: ../../pikotools/space/spacetojson.h mount.h ipbancontainer.h
|
||||
users.o: lastcontainer.h system.h job.h basethread.h synchro.h dirs.h
|
||||
users.o: dircontainer.h ../../winix/db/db.h ../../winix/db/dbbase.h
|
||||
users.o: ../../winix/db/dbconn.h ../../winix/db/dbtextstream.h
|
||||
users.o: ../../winix/core/error.h ../../winix/db/dbitemquery.h
|
||||
users.o: ../../winix/core/item.h ../../winix/db/dbitemcolumns.h
|
||||
users.o: ../../winix/core/user.h ../../winix/core/group.h
|
||||
users.o: ../../winix/core/dircontainer.h ../../winix/core/ugcontainer.h log.h
|
||||
users.o: logmanipulators.h slog.h ../../winix/templates/locale.h
|
||||
users.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
|
||||
users.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
|
||||
users.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
|
||||
users.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
users.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
|
||||
users.o: ../../ezc/src/stringconv.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: htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
users.o: ../../winix/core/textstream.h misc.h ../../pikotools/utf8/utf8.h
|
||||
users.o: winix_const.h ../../pikotools/space/spacetojson.h mount.h
|
||||
users.o: ipbancontainer.h lastcontainer.h system.h job.h basethread.h
|
||||
users.o: synchro.h dirs.h dircontainer.h ../../winix/db/db.h
|
||||
users.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
users.o: ../../winix/db/dbtextstream.h ../../winix/core/error.h
|
||||
users.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
users.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
users.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
|
||||
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: ../../winix/functions/functions.h
|
||||
users.o: ../../winix/functions/functionbase.h ../../winix/core/request.h
|
||||
users.o: ../../winix/core/system.h ../../winix/core/synchro.h
|
||||
|
|
|
@ -32,8 +32,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#include <wchar.h>
|
||||
#include "acceptbaseparser.h"
|
||||
#include "misc.h"
|
||||
|
||||
|
||||
|
||||
namespace Winix
|
||||
|
@ -58,28 +60,11 @@ void AcceptBaseParser::SkipWhite()
|
|||
}
|
||||
|
||||
|
||||
void AcceptBaseParser::RemoveWhiteFromEnd(std::string & str)
|
||||
{
|
||||
if( str.empty() )
|
||||
return;
|
||||
|
||||
size_t i = str.size() - 1;
|
||||
|
||||
for( ; i!=0 && IsWhite(str[i]) ; --i);
|
||||
|
||||
if( !IsWhite(str[i]) )
|
||||
++i;
|
||||
|
||||
if( i < str.size() )
|
||||
str.erase(i); // erasing until the end of the string
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AcceptBaseParser::ReadParameter()
|
||||
{
|
||||
param.clear();
|
||||
|
||||
SkipWhite();
|
||||
|
||||
while( *text!=0 && *text!=',' && *text!=';' )
|
||||
|
@ -88,14 +73,13 @@ void AcceptBaseParser::ReadParameter()
|
|||
++text;
|
||||
}
|
||||
|
||||
RemoveWhiteFromEnd(param);
|
||||
TrimWhite(param);
|
||||
}
|
||||
|
||||
|
||||
void AcceptBaseParser::ReadQ()
|
||||
{
|
||||
q = 1.0;
|
||||
|
||||
SkipWhite();
|
||||
|
||||
if( *text != ';' )
|
||||
|
@ -113,7 +97,7 @@ void AcceptBaseParser::ReadQ()
|
|||
++text; // skipping '='
|
||||
|
||||
SkipWhite();
|
||||
q = strtod(text, (char**)&text);
|
||||
q = wcstod(text, (wchar_t**)&text);
|
||||
}
|
||||
|
||||
|
||||
|
@ -127,7 +111,7 @@ void AcceptBaseParser::SkipParam()
|
|||
|
||||
|
||||
|
||||
void AcceptBaseParser::Parse(const char * str)
|
||||
void AcceptBaseParser::Parse(const wchar_t * str)
|
||||
{
|
||||
text = str;
|
||||
Init();
|
||||
|
@ -143,6 +127,12 @@ void AcceptBaseParser::Parse(const char * str)
|
|||
|
||||
|
||||
|
||||
void AcceptBaseParser::Parse(const std::wstring & str)
|
||||
{
|
||||
Parse(str.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace Winix
|
||||
|
||||
|
|
|
@ -45,29 +45,29 @@ namespace Winix
|
|||
|
||||
|
||||
// sample (you must create your own class derived from this one):
|
||||
// object.Parse(" text/html ; , ; q = 45, application / xhtml+xml ; q = 0.4 , application/xml ; q = 0.9 , */* ; q = 0.8 ");
|
||||
// object.Parse(L" text/html ; , ; q = 45, application / xhtml+xml ; q = 0.4 , application/xml ; q = 0.9 , */* ; q = 0.8 ");
|
||||
class AcceptBaseParser
|
||||
{
|
||||
public:
|
||||
|
||||
void Parse(const char * str);
|
||||
void Parse(const wchar_t * str);
|
||||
void Parse(const std::wstring & str);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
virtual void Init() {} ;
|
||||
virtual void Param(const std::string & param, double q) = 0;
|
||||
virtual void Param(const std::wstring & param, double q) = 0;
|
||||
|
||||
bool IsWhite(int c);
|
||||
void SkipWhite();
|
||||
void RemoveWhiteFromEnd(std::string & str);
|
||||
void ReadParameter();
|
||||
void ReadQ();
|
||||
void SkipParam();
|
||||
|
||||
|
||||
const char * text;
|
||||
std::string param;
|
||||
const wchar_t * text;
|
||||
std::wstring param;
|
||||
double q;
|
||||
};
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
void ParseAndLog(const char * str)
|
||||
void ParseAndLog(const wchar_t * str)
|
||||
{
|
||||
Parse(str);
|
||||
|
||||
|
@ -84,6 +84,12 @@ public:
|
|||
}
|
||||
|
||||
|
||||
void ParseAndLog(const std::wstring & str)
|
||||
{
|
||||
ParseAndLog(str.c_str());
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void Init()
|
||||
|
@ -93,14 +99,14 @@ private:
|
|||
}
|
||||
|
||||
|
||||
void Param(const std::string & param, double q)
|
||||
void Param(const std::wstring & param, double q)
|
||||
{
|
||||
if( param=="deflate" && q!=0.0 )
|
||||
if( param == L"deflate" && q!=0.0 )
|
||||
{
|
||||
accept_deflate = true;
|
||||
}
|
||||
|
||||
if( param=="gzip" && q!=0.0 )
|
||||
if( param == L"gzip" && q!=0.0 )
|
||||
{
|
||||
accept_gzip = true;
|
||||
}
|
||||
|
|
274
core/app.cpp
274
core/app.cpp
|
@ -114,12 +114,70 @@ App::App()
|
|||
|
||||
|
||||
|
||||
bool App::InitFCGI(char * sock, char * sock_user, char * sock_group)
|
||||
{
|
||||
if( !WideToUTF8(config.fcgi_socket, sock, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
if( !WideToUTF8(config.fcgi_socket_user, sock_user, WINIX_OS_USERNAME_SIZE) )
|
||||
return false;
|
||||
|
||||
if( !WideToUTF8(config.fcgi_socket_group, sock_group, WINIX_OS_USERNAME_SIZE) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* chmod and chown of the socket are set before winix drops privileges
|
||||
*/
|
||||
bool App::InitFCGIChmodChownSocket(char * sock, char * sock_user, char * sock_group)
|
||||
{
|
||||
if( chmod(sock, config.fcgi_socket_chmod) < 0 )
|
||||
{
|
||||
log << log1 << "App: I cannot chmod a FastCGI socket, check fcgi_socket_chmod in the config" << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
passwd * pw = getpwnam(sock_user);
|
||||
|
||||
if( !pw )
|
||||
{
|
||||
log << log1 << "App: there is no a user: " << config.fcgi_socket_user << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
group * gr = getgrnam(sock_group);
|
||||
|
||||
if( !gr )
|
||||
{
|
||||
log << log1 << "App: there is no a group: " << config.fcgi_socket_group << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( chown(sock, pw->pw_uid, gr->gr_gid) < 0 )
|
||||
{
|
||||
log << log1 << "App: I cannot chown a FastCGI socket, check fcgi_socket_user "
|
||||
<< "and fcgi_socket_group in the config" << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool App::InitFCGI()
|
||||
{
|
||||
const char * sock = config.fcgi_socket.c_str();
|
||||
unlink(sock);
|
||||
char sock[WINIX_OS_PATH_SIZE];
|
||||
char sock_user[WINIX_OS_USERNAME_SIZE];
|
||||
char sock_group[WINIX_OS_USERNAME_SIZE];
|
||||
|
||||
fcgi_socket = FCGX_OpenSocket(sock, 100); // !! dodac 100 do konfiga
|
||||
if( !InitFCGI(sock, sock_user, sock_group) )
|
||||
return false;
|
||||
|
||||
unlink(sock);
|
||||
fcgi_socket = FCGX_OpenSocket(sock, config.fcgi_socket_listen);
|
||||
|
||||
if( fcgi_socket < 0 )
|
||||
{
|
||||
|
@ -128,25 +186,9 @@ bool App::InitFCGI()
|
|||
}
|
||||
|
||||
log << log3 << "App: FastCGI socket number: " << fcgi_socket << logend;
|
||||
chmod(sock, config.fcgi_socket_chmod);
|
||||
|
||||
passwd * pw = getpwnam(config.fcgi_socket_user.c_str());
|
||||
|
||||
if( !pw )
|
||||
{
|
||||
log << log1 << "App: there is no user: " << config.fcgi_socket_user << logend;
|
||||
if( !InitFCGIChmodChownSocket(sock, sock_user, sock_group) )
|
||||
return false;
|
||||
}
|
||||
|
||||
group * gr = getgrnam(config.fcgi_socket_group.c_str());
|
||||
|
||||
if( !gr )
|
||||
{
|
||||
log << log1 << "App: there is no group: " << config.fcgi_socket_group << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
chown(sock, pw->pw_uid, gr->gr_gid);
|
||||
|
||||
if( FCGX_Init() != 0 )
|
||||
{
|
||||
|
@ -185,12 +227,9 @@ bool App::Init()
|
|||
|
||||
CreateStaticTree();
|
||||
|
||||
post_parser.UTF8(config.utf8);
|
||||
post_parser.LogValueSize(config.log_post_value_size);
|
||||
// post_multi_parser has a pointer to the config
|
||||
|
||||
cookie_parser.UTF8(config.utf8);
|
||||
|
||||
plugin.Call((Session*)0, WINIX_PLUGIN_INIT);
|
||||
|
||||
return true;
|
||||
|
@ -218,7 +257,7 @@ void App::BaseUrlRedirect(int code, bool add_subdomain)
|
|||
}
|
||||
|
||||
cur.request->redirect_to += config.base_url;
|
||||
AssignString(cur.request->env_request_uri, cur.request->redirect_to, false);
|
||||
cur.request->redirect_to += cur.request->env_request_uri;
|
||||
// cur.request->env_request_uri should not be UrlEncoded because it contains slashes
|
||||
cur.request->redirect_type = code;
|
||||
}
|
||||
|
@ -241,7 +280,7 @@ bool App::BaseUrlRedirect()
|
|||
if( cur.request->method == Request::post )
|
||||
return false;
|
||||
|
||||
if( Equal(config.base_url.c_str(), cur.request->env_http_host) )
|
||||
if( config.base_url == cur.request->env_http_host )
|
||||
return false;
|
||||
|
||||
BaseUrlRedirect(config.base_url_redirect_code, false);
|
||||
|
@ -345,7 +384,28 @@ void App::ProcessRequestThrow()
|
|||
}
|
||||
|
||||
plugin.Call(WINIX_SESSION_CHANGED);
|
||||
|
||||
if( cur.request->env_request_uri.size() <= WINIX_URL_MAX_SIZE )
|
||||
{
|
||||
functions.Parse(); // parsing directories, files, functions and parameters
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* IMPROVE ME
|
||||
* it will not have the root directory set
|
||||
* so as a response only a blank page is shown
|
||||
* (root directory is set in funcions.Parse())
|
||||
*
|
||||
* IMPROVE ME
|
||||
* we can add a better return code (http status):
|
||||
* http://www.ietf.org/rfc/rfc2616.txt
|
||||
* "A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle"
|
||||
*
|
||||
*/
|
||||
cur.request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
log << log1 << "App: the URL is too long: " << cur.request->env_request_uri.size() << logend;
|
||||
}
|
||||
|
||||
cur.mount = system.mounts.CalcCurMount();
|
||||
|
||||
|
@ -637,17 +697,21 @@ void App::LogEnvironmentVariables()
|
|||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* reading the request (without GET parameters in the URL)
|
||||
*/
|
||||
void App::ReadRequest()
|
||||
{
|
||||
ReadEnvVariables();
|
||||
ReadEnvRemoteIP();
|
||||
CheckRequestMethod();
|
||||
CheckSSL();
|
||||
SetSubdomain();
|
||||
|
||||
LogAccess();
|
||||
|
||||
ReadGetPostVars();
|
||||
ReadPostVars();
|
||||
|
||||
cookie_parser.Parse(cur.request->env_http_cookie, cur.request->cookie_tab);
|
||||
accept_encoding_parser.ParseAndLog(cur.request->env_http_accept_encoding);
|
||||
|
||||
|
@ -663,43 +727,54 @@ void App::ReadRequest()
|
|||
|
||||
|
||||
|
||||
void App::SetEnv(const char * & env, const char * name)
|
||||
void App::SetEnv(const char * name, std::wstring & env)
|
||||
{
|
||||
const char * v = FCGX_GetParam(name, fcgi_request.envp);
|
||||
|
||||
if( v )
|
||||
env = v;
|
||||
|
||||
// by default env is set to an empty string (in cur.request->Clear() method)
|
||||
{
|
||||
PT::UTF8ToWide(v, env);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void App::ReadEnvVariables()
|
||||
{
|
||||
// we store that values because FCGX_GetParam has O(n) complexity
|
||||
// with this variables (env_*) we have O(1)
|
||||
|
||||
SetEnv(cur.request->env_request_method, "REQUEST_METHOD"); // !! mozna nie uzywac tego, teraz mamy w strukturze fcgi_request
|
||||
SetEnv(cur.request->env_request_uri, "REQUEST_URI");
|
||||
SetEnv(cur.request->env_http_cookie, "HTTP_COOKIE");
|
||||
SetEnv(cur.request->env_remote_addr, "REMOTE_ADDR");
|
||||
SetEnv(cur.request->env_http_host, "HTTP_HOST");
|
||||
SetEnv(cur.request->env_http_user_agent, "HTTP_USER_AGENT");
|
||||
SetEnv(cur.request->env_fcgi_role, "FCGI_ROLE");
|
||||
SetEnv(cur.request->env_content_type, "CONTENT_TYPE");
|
||||
SetEnv(cur.request->env_http_accept_encoding, "HTTP_ACCEPT_ENCODING");
|
||||
SetEnv(cur.request->env_https, "HTTPS");
|
||||
|
||||
cur.request->ip = (int)inet_addr(cur.request->env_remote_addr);
|
||||
SetEnv("REQUEST_METHOD", cur.request->env_request_method);
|
||||
SetEnv("REQUEST_URI", cur.request->env_request_uri);
|
||||
SetEnv("HTTP_COOKIE", cur.request->env_http_cookie);
|
||||
SetEnv("REMOTE_ADDR", cur.request->env_remote_addr);
|
||||
SetEnv("HTTP_HOST", cur.request->env_http_host);
|
||||
SetEnv("HTTP_USER_AGENT", cur.request->env_http_user_agent);
|
||||
SetEnv("FCGI_ROLE", cur.request->env_fcgi_role);
|
||||
SetEnv("CONTENT_TYPE", cur.request->env_content_type);
|
||||
SetEnv("HTTP_ACCEPT_ENCODING", cur.request->env_http_accept_encoding);
|
||||
SetEnv("HTTPS", cur.request->env_https);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void App::ReadEnvRemoteIP()
|
||||
{
|
||||
const char * v = FCGX_GetParam("REMOTE_ADDR", fcgi_request.envp);
|
||||
|
||||
if( v )
|
||||
{
|
||||
cur.request->ip = (int)inet_addr(v);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void App::CheckRequestMethod()
|
||||
{
|
||||
cur.request->method = Request::unknown_method;
|
||||
|
||||
if( !cur.request->env_request_method.empty() )
|
||||
{
|
||||
if( ToSmall(cur.request->env_request_method[0]) == 'g' )
|
||||
cur.request->method = Request::get;
|
||||
else
|
||||
|
@ -709,6 +784,7 @@ void App::CheckRequestMethod()
|
|||
if( ToSmall(cur.request->env_request_method[0]) == 'h' )
|
||||
cur.request->method = Request::head;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -718,14 +794,14 @@ void App::CheckSSL()
|
|||
// value "on" exists in lighttpd server
|
||||
// make sure that for other servers is "on" too
|
||||
|
||||
if( EqualNoCase(cur.request->env_https, "on") )
|
||||
if( EqualNoCase(cur.request->env_https.c_str(), L"on") )
|
||||
cur.request->using_ssl = true;
|
||||
}
|
||||
|
||||
|
||||
void App::SetSubdomain()
|
||||
{
|
||||
CreateSubdomain(config.base_url.c_str(), cur.request->env_http_host, cur.request->subdomain);
|
||||
CreateSubdomain(config.base_url.c_str(), cur.request->env_http_host.c_str(), cur.request->subdomain);
|
||||
}
|
||||
|
||||
|
||||
|
@ -747,15 +823,11 @@ void App::LogAccess()
|
|||
|
||||
|
||||
|
||||
|
||||
void App::ReadGetPostVars()
|
||||
void App::ReadPostVars()
|
||||
{
|
||||
// get parameters we have always
|
||||
//get_parser.Parse(cur.request->env_request_uri, cur.request->get_tab);
|
||||
|
||||
if( cur.request->method == Request::post )
|
||||
{
|
||||
if( IsSubStringNoCase("multipart/form-data", cur.request->env_content_type) )
|
||||
if( IsSubStringNoCase(L"multipart/form-data", cur.request->env_content_type.c_str()) )
|
||||
{
|
||||
log << log3 << "App: post content type: multipart/form-data" << logend;
|
||||
post_multi_parser.Parse(fcgi_request.in, cur.request->post_tab, cur.request->post_file_tab);
|
||||
|
@ -772,24 +844,16 @@ void App::ReadGetPostVars()
|
|||
|
||||
void App::CheckIE()
|
||||
{
|
||||
const char * msie = strstr(cur.request->env_http_user_agent, "MSIE");
|
||||
|
||||
if( msie )
|
||||
cur.request->browser_msie = true;
|
||||
else
|
||||
cur.request->browser_msie = false;
|
||||
size_t msie = cur.request->env_http_user_agent.find(L"MSIE");
|
||||
cur.request->browser_msie = (msie != std::wstring::npos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void App::CheckKonqueror()
|
||||
{
|
||||
const char * kon = strstr(cur.request->env_http_user_agent, "Konqueror");
|
||||
|
||||
if( kon )
|
||||
cur.request->browser_konqueror = true;
|
||||
else
|
||||
cur.request->browser_konqueror = false;
|
||||
size_t kon = cur.request->env_http_user_agent.find(L"Konqueror");
|
||||
cur.request->browser_konqueror = (kon != std::wstring::npos);
|
||||
}
|
||||
|
||||
|
||||
|
@ -875,7 +939,7 @@ bool App::PrepareHeadersStaticCreateResource(PT::WTextStream & out_path)
|
|||
}
|
||||
|
||||
size_t how_many_dirs = system.dirs.DirLevel(dir->id);
|
||||
const char * path = SkipDirs(cur.request->env_request_uri, how_many_dirs);
|
||||
const wchar_t * path = SkipDirs(cur.request->env_request_uri.c_str(), how_many_dirs);
|
||||
|
||||
// the path begins with a slash only if how_many_dirs is zero
|
||||
while( *path == '/' )
|
||||
|
@ -954,7 +1018,7 @@ void App::PrepareHeaderContentType()
|
|||
}
|
||||
}
|
||||
|
||||
if( value && config.utf8 )
|
||||
if( value )
|
||||
*value += L"; charset=UTF-8";
|
||||
}
|
||||
}
|
||||
|
@ -1066,11 +1130,19 @@ void App::SendHeaders()
|
|||
FCGX_PutS("\r\n", fcgi_request.out);
|
||||
|
||||
if( config.log_http_answer_headers )
|
||||
log << "HTTP Header: " << aheader_name << ": " << aheader_value << logend;
|
||||
log << log1 << "HTTP Header: " << aheader_name << ": " << aheader_value << logend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class RawType>
|
||||
DbTextStream::RawText<RawType> R(const RawType & par)
|
||||
{
|
||||
return DbTextStream::RawText<RawType>(par);
|
||||
}
|
||||
|
||||
|
||||
void App::SendCookies()
|
||||
{
|
||||
PT::Space::TableSingle::iterator i;
|
||||
|
@ -1090,7 +1162,7 @@ void App::SendCookies()
|
|||
FCGX_PutS("\r\n", fcgi_request.out);
|
||||
|
||||
if( config.log_http_answer_headers )
|
||||
log << "HTTP Header: " << "Set-Cookie: " << aheader_name << "=" << aheader_value << logend;
|
||||
log << log1 << "HTTP Header: Set-Cookie: " << aheader_name << "=" << aheader_value << logend;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1296,10 +1368,7 @@ size_t output_size = 0;
|
|||
|
||||
SelectCompression(source->length(), compressing, compress_encoding);
|
||||
|
||||
if( config.utf8 )
|
||||
PT::WideToUTF8(*source, output_8bit);
|
||||
else
|
||||
AssignString(*source, output_8bit);
|
||||
|
||||
// !! IMPROVE ME add to log the binary stream as well
|
||||
if( config.log_server_answer )
|
||||
|
@ -1525,13 +1594,27 @@ void App::LogUserGroups()
|
|||
|
||||
|
||||
|
||||
bool App::DropPrivileges(const std::string & user, uid_t uid, gid_t gid, bool additional_groups)
|
||||
|
||||
bool App::DropPrivileges(char * user, char * group)
|
||||
{
|
||||
if( !WideToUTF8(config.user, user, WINIX_OS_USERNAME_SIZE) )
|
||||
return false;
|
||||
|
||||
if( !WideToUTF8(config.group, group, WINIX_OS_USERNAME_SIZE) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool App::DropPrivileges(const char * user, uid_t uid, gid_t gid, bool additional_groups)
|
||||
{
|
||||
if( additional_groups )
|
||||
{
|
||||
if( initgroups(user.c_str(), gid) < 0 )
|
||||
if( initgroups(user, gid) < 0 )
|
||||
{
|
||||
log << log1 << "App: I can't init groups for user: " << user << logend;
|
||||
log << log1 << "App: I can't init groups for a user: " << user << logend;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1545,7 +1628,7 @@ bool App::DropPrivileges(const std::string & user, uid_t uid, gid_t gid, bool ad
|
|||
}
|
||||
|
||||
// for setting real and saved gid too
|
||||
if( setgid(gid) )
|
||||
if( setgid(gid) < 0 )
|
||||
{
|
||||
log << log1 << "App: I can't change real and saved gid" << logend;
|
||||
return false;
|
||||
|
@ -1568,8 +1651,12 @@ return true;
|
|||
}
|
||||
|
||||
|
||||
|
||||
bool App::DropPrivileges()
|
||||
{
|
||||
char user_name[WINIX_OS_USERNAME_SIZE];
|
||||
char group_name[WINIX_OS_USERNAME_SIZE];
|
||||
|
||||
if( getuid()!=0 && geteuid()!=0 )
|
||||
return true;
|
||||
|
||||
|
@ -1577,20 +1664,23 @@ bool App::DropPrivileges()
|
|||
|
||||
if( config.user.empty() )
|
||||
{
|
||||
log << log1 << "App: you should specify user name in the config file "
|
||||
log << log1 << "App: in the config file you should specify a user name and a group "
|
||||
<< "to which I have to drop privileges" << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( config.group.empty() )
|
||||
{
|
||||
log << log1 << "App: you should specify group name in the config file "
|
||||
log << log1 << "App: you should specify a group name in the config file "
|
||||
<< "to which I have to drop privileges" << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
passwd * p = getpwnam(config.user.c_str());
|
||||
group * g = getgrnam(config.group.c_str());
|
||||
if( !DropPrivileges(user_name, group_name) )
|
||||
return false;
|
||||
|
||||
passwd * p = getpwnam(user_name);
|
||||
group * g = getgrnam(group_name);
|
||||
|
||||
if( !p )
|
||||
{
|
||||
|
@ -1604,7 +1694,7 @@ bool App::DropPrivileges()
|
|||
return false;
|
||||
}
|
||||
|
||||
if( !DropPrivileges(config.user, p->pw_uid, g->gr_gid, config.additional_groups) )
|
||||
if( !DropPrivileges(user_name, p->pw_uid, g->gr_gid, config.additional_groups) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -1674,6 +1764,16 @@ void App::WaitForThreads()
|
|||
|
||||
|
||||
|
||||
size_t App::FetchPageOnExitCurlCallback(char *ptr, size_t size, size_t nmemb, void *userdata)
|
||||
{
|
||||
/*
|
||||
* without this function the curl library will print the page's content
|
||||
* to the standart output
|
||||
*/
|
||||
return size * nmemb;
|
||||
}
|
||||
|
||||
|
||||
void App::FetchPageOnExit()
|
||||
{
|
||||
// stupid trick to break FCGX_Accept_r() function
|
||||
|
@ -1690,7 +1790,15 @@ void App::FetchPageOnExit()
|
|||
curl_easy_setopt(curl, CURLOPT_URL, url_to_fetch_on_exit.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
|
||||
curl_easy_perform(curl);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, FetchPageOnExitCurlCallback);
|
||||
|
||||
if( curl_easy_perform(curl) != 0 )
|
||||
{
|
||||
Lock();
|
||||
log << log1 << "App: I cannot correctly fetch a page from the special thread" << logend << logsave;
|
||||
Unlock();
|
||||
}
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
|
|
11
core/app.h
11
core/app.h
|
@ -156,6 +156,10 @@ private:
|
|||
std::string output_8bit;
|
||||
BinaryPage compressed_output;
|
||||
|
||||
bool InitFCGI(char * sock, char * sock_user, char * sock_group);
|
||||
bool InitFCGIChmodChownSocket(char * sock, char * sock_user, char * sock_group);
|
||||
bool DropPrivileges(char * user, char * group);
|
||||
bool DropPrivileges(const char * user, uid_t uid, gid_t gid, bool additional_groups);
|
||||
bool CheckAccessFromPlugins();
|
||||
void ProcessRequestThrow();
|
||||
void ProcessRequest();
|
||||
|
@ -178,9 +182,10 @@ private:
|
|||
|
||||
void LogEnvironmentVariables();
|
||||
|
||||
void SetEnv(const char * & env, const char * name);
|
||||
void SetEnv(const char * name, std::wstring & env);
|
||||
void ReadEnvVariables();
|
||||
void ReadGetPostVars();
|
||||
void ReadEnvRemoteIP();
|
||||
void ReadPostVars();
|
||||
|
||||
void CheckIE();
|
||||
void CheckKonqueror();
|
||||
|
@ -217,9 +222,9 @@ private:
|
|||
void LogUsers();
|
||||
void LogEffectiveGroups(std::vector<gid_t> & tab);
|
||||
void LogGroups();
|
||||
bool DropPrivileges(const std::string & user, uid_t uid, gid_t gid, bool additional_groups);
|
||||
|
||||
static void * SpecialThreadForSignals(void*);
|
||||
static size_t FetchPageOnExitCurlCallback(char *ptr, size_t size, size_t nmemb, void *userdata);
|
||||
void FetchPageOnExit();
|
||||
|
||||
void CreateStaticTree();
|
||||
|
|
|
@ -70,14 +70,14 @@ void Config::ShowError()
|
|||
|
||||
case PT::SpaceParser::cant_open_file:
|
||||
if( errors_to_stdout )
|
||||
std::cout << "Config: cant open a config file: " << config_file << std::endl;
|
||||
std::wcout << L"Config: I cannot open a config file: " << config_file << std::endl;
|
||||
|
||||
log << log1 << "Config: cant open a config file: " << config_file << logend;
|
||||
break;
|
||||
|
||||
case PT::SpaceParser::syntax_error:
|
||||
if( errors_to_stdout )
|
||||
std::cout << "Config: syntax error, line: " << parser.line << std::endl;
|
||||
std::wcout << "Config: syntax error, line: " << parser.line << std::endl;
|
||||
|
||||
log << log1 << "Config: syntax error, line: " << parser.line << logend;
|
||||
break;
|
||||
|
@ -102,7 +102,6 @@ bool Config::ReadConfig(bool errors_to_stdout_, bool stdout_is_closed)
|
|||
log << log2 << "Config: reading a config file" << logend;
|
||||
|
||||
parser.SplitSingle(true);
|
||||
parser.UTF8(true); // config is always read in UTF-8
|
||||
parser.SetSpace(space);
|
||||
|
||||
PT::SpaceParser::Status status = parser.Parse(config_file);
|
||||
|
@ -127,17 +126,18 @@ void Config::AssignValues(bool stdout_is_closed)
|
|||
{
|
||||
demonize = Bool(L"demonize", true);
|
||||
|
||||
user = AText(L"user");
|
||||
group = AText(L"group");
|
||||
user = Text(L"user");
|
||||
group = Text(L"group");
|
||||
additional_groups = Bool(L"additional_groups", true);
|
||||
|
||||
log_file = AText(L"log_file");
|
||||
log_notify_file = AText(L"log_notify_file");
|
||||
log_file = Text(L"log_file");
|
||||
log_notify_file = Text(L"log_notify_file");
|
||||
log_delimiter = Text(L"log_delimiter", L"---------------------------------------------------------------------------------");
|
||||
fcgi_socket = AText(L"fcgi_socket");
|
||||
fcgi_socket = Text(L"fcgi_socket");
|
||||
fcgi_socket_chmod = Int(L"fcgi_socket_chmod", 0770);
|
||||
fcgi_socket_user = AText(L"fcgi_socket_user");
|
||||
fcgi_socket_group = AText(L"fcgi_socket_group");
|
||||
fcgi_socket_user = Text(L"fcgi_socket_user");
|
||||
fcgi_socket_group = Text(L"fcgi_socket_group");
|
||||
fcgi_socket_listen = Int(L"fcgi_socket_listen", 100);
|
||||
log_level = Int(L"log_level", 1);
|
||||
log_request = Int(L"log_request", 1);
|
||||
log_save_each_line = Bool(L"log_save_each_line", false);
|
||||
|
@ -157,7 +157,7 @@ void Config::AssignValues(bool stdout_is_closed)
|
|||
NoLastSlash(upload_dir);
|
||||
NoLastSlash(common_dir);
|
||||
|
||||
upload_group = AText(L"upload_group");
|
||||
upload_group = Text(L"upload_group");
|
||||
upload_dirs_chmod = Int(L"upload_dirs_chmod", 0750);
|
||||
upload_files_chmod = Int(L"upload_files_chmod", 0640);
|
||||
ListText(L"static_dirs", static_dirs);
|
||||
|
@ -184,9 +184,9 @@ void Config::AssignValues(bool stdout_is_closed)
|
|||
template_only_root_use_template_fun = Bool(L"template_only_root_use_template_fun", false);
|
||||
|
||||
http_session_id_name = Text(L"http_session_id_name", L"session_id");
|
||||
db_database = AText(L"db_database");
|
||||
db_user = AText(L"db_user");
|
||||
db_pass = AText(L"db_pass");
|
||||
db_database = Text(L"db_database");
|
||||
db_user = Text(L"db_user");
|
||||
db_pass = Text(L"db_pass");
|
||||
item_url_empty = Text(L"item_url_empty");
|
||||
|
||||
url_proto = Text(L"url_proto", L"http://");
|
||||
|
@ -214,7 +214,7 @@ void Config::AssignValues(bool stdout_is_closed)
|
|||
|
||||
session_max_idle = Int(L"session_max_idle", 10800); // 3h
|
||||
session_remember_max_idle = Int(L"session_remember_max_idle", 16070400); // 3 months
|
||||
session_file = AText(L"session_file");
|
||||
session_file = Text(L"session_file");
|
||||
session_max = Size(L"session_max", 1000000);
|
||||
|
||||
compression = Bool(L"compression", true);
|
||||
|
@ -247,7 +247,6 @@ void Config::AssignValues(bool stdout_is_closed)
|
|||
NoLastSlash(plugins_dir);
|
||||
ListText(L"plugins", plugin_file);
|
||||
|
||||
utf8 = Bool(L"utf8", true);
|
||||
symlinks_follow_max = Size(L"symlinks_follow_max", 20);
|
||||
|
||||
ticket_form_prefix = Text(L"ticket_form_prefix", L"ticketparam");
|
||||
|
@ -368,25 +367,6 @@ std::wstring & Config::Text(const std::wstring & name, const wchar_t * def)
|
|||
}
|
||||
|
||||
|
||||
std::string & Config::AText(const wchar_t * name)
|
||||
{
|
||||
return space.AText(name);
|
||||
}
|
||||
|
||||
|
||||
std::string & Config::AText(const wchar_t * name, const char * def)
|
||||
{
|
||||
return space.AText(name, def);
|
||||
}
|
||||
|
||||
|
||||
std::string & Config::AText(const std::wstring & name, const char * def)
|
||||
{
|
||||
return space.AText(name, def);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int Config::Int(const wchar_t * name)
|
||||
{
|
||||
return space.Int(name);
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
|
||||
// name of the config file
|
||||
// this is the parameter passed to winix programm
|
||||
std::string config_file;
|
||||
std::wstring config_file;
|
||||
|
||||
// start as a demon (in the background)
|
||||
// default: true
|
||||
|
@ -61,11 +61,11 @@ public:
|
|||
|
||||
// system user's name to whom winix should drop privileges
|
||||
// used only if winix is started as the root
|
||||
std::string user;
|
||||
std::wstring user;
|
||||
|
||||
// system group's name to which drop privileges
|
||||
// used only if winix is started as the root
|
||||
std::string group;
|
||||
std::wstring group;
|
||||
|
||||
// setting additional effective groups from /etc/group
|
||||
// by using initgroups()
|
||||
|
@ -74,7 +74,7 @@ public:
|
|||
bool additional_groups;
|
||||
|
||||
// log file name, log file name for notifications (sending emails, etc)
|
||||
std::string log_file, log_notify_file;
|
||||
std::wstring log_file, log_notify_file;
|
||||
|
||||
// the log level (how much info should be inserted to logs)
|
||||
// 1 - minimum
|
||||
|
@ -132,16 +132,24 @@ public:
|
|||
bool log_http_answer_headers;
|
||||
|
||||
// fast cgi: socket (unix domain)
|
||||
std::string fcgi_socket;
|
||||
std::wstring fcgi_socket;
|
||||
|
||||
// fast cgi: socket permissions
|
||||
// chmod and chown of the socket are set before winix drops privileges
|
||||
int fcgi_socket_chmod;
|
||||
|
||||
// fast cgi: owner of the socket
|
||||
std::string fcgi_socket_user;
|
||||
// chmod and chown of the socket are set before winix drops privileges
|
||||
std::wstring fcgi_socket_user;
|
||||
|
||||
// fast cgi: group of the socket
|
||||
std::string fcgi_socket_group;
|
||||
// chmod and chown of the socket are set before winix drops privileges
|
||||
std::wstring fcgi_socket_group;
|
||||
|
||||
// fcgi_socket_listen is the listen queue depth used in the listen() call
|
||||
// when creating a FastCGI socket for the web server
|
||||
// default: 100
|
||||
int fcgi_socket_listen;
|
||||
|
||||
std::wstring templates_dir;
|
||||
std::wstring templates_dir_default; // html templates from winix
|
||||
|
@ -165,9 +173,9 @@ public:
|
|||
bool template_only_root_use_template_fun;
|
||||
|
||||
// the database name, user name and a password for the PostgreSQL database
|
||||
std::string db_database;
|
||||
std::string db_user;
|
||||
std::string db_pass;
|
||||
std::wstring db_database;
|
||||
std::wstring db_user;
|
||||
std::wstring db_pass;
|
||||
|
||||
// the name of the cookie which has the session identifier
|
||||
std::wstring http_session_id_name;
|
||||
|
@ -189,7 +197,7 @@ public:
|
|||
|
||||
// a file to which winix stores sessions info
|
||||
// it is used when winix starts (boots) and quits
|
||||
std::string session_file;
|
||||
std::wstring session_file;
|
||||
|
||||
// how many sessions can be (zero turn off this checking)
|
||||
// default: 1000000 (one milion)
|
||||
|
@ -295,7 +303,7 @@ public:
|
|||
|
||||
// system group's name for new uploaded files (created directories in the file system)
|
||||
// it can be empty (it is not used then)
|
||||
std::string upload_group;
|
||||
std::wstring upload_group;
|
||||
|
||||
// this value will be set based on upload_group
|
||||
// will be -1 if upload_group is empty or if it is invalid
|
||||
|
@ -462,11 +470,6 @@ public:
|
|||
// (if true the html code for root is not filtered)
|
||||
bool editors_html_safe_mode_skip_root;
|
||||
|
||||
// charset used in templates, locales, logs etc.
|
||||
// default: true (UTF-8)
|
||||
// if false it means 8-bit ASCII
|
||||
bool utf8;
|
||||
|
||||
// how many maximum symlinks can be followed
|
||||
// (symlinks on directories as well)
|
||||
// default: 20
|
||||
|
@ -666,9 +669,6 @@ public:
|
|||
std::wstring & Text(const wchar_t * name);
|
||||
std::wstring & Text(const wchar_t * name, const wchar_t * def);
|
||||
std::wstring & Text(const std::wstring & name, const wchar_t * def);
|
||||
std::string & AText(const wchar_t * name);
|
||||
std::string & AText(const wchar_t * name, const char * def);
|
||||
std::string & AText(const std::wstring & name, const char * def);
|
||||
|
||||
int Int(const wchar_t *);
|
||||
int Int(const wchar_t * name, int def);
|
||||
|
@ -700,7 +700,6 @@ public:
|
|||
private:
|
||||
|
||||
PT::SpaceParser parser;
|
||||
std::string default_str;
|
||||
bool errors_to_stdout;
|
||||
|
||||
void ShowError();
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#ifndef headerfile_winix_core_cookieparser
|
||||
#define headerfile_winix_core_cookieparser
|
||||
|
||||
#include <fcgiapp.h>
|
||||
#include "httpsimpleparser.h"
|
||||
#include "requesttypes.h"
|
||||
#include "log.h"
|
||||
|
@ -49,10 +48,8 @@ namespace Winix
|
|||
class CookieParser : public HttpSimpleParser
|
||||
{
|
||||
|
||||
const char * cookie_string;
|
||||
const wchar_t * cookie_string;
|
||||
CookieTab * cookie_tab;
|
||||
std::wstring temp_name, temp_value;
|
||||
bool input_as_utf8;
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -63,32 +60,23 @@ protected:
|
|||
if( !cookie_string || *cookie_string == 0 )
|
||||
return -1;
|
||||
|
||||
return (int)(unsigned char)*(cookie_string++);
|
||||
return (int)*(cookie_string++);
|
||||
}
|
||||
|
||||
void ConvStr(const std::string & src, std::wstring & dst)
|
||||
{
|
||||
if( input_as_utf8 )
|
||||
PT::UTF8ToWide(src, dst);
|
||||
else
|
||||
AssignString(src, dst);
|
||||
}
|
||||
|
||||
virtual void Parameter(std::string & name, std::string & value)
|
||||
|
||||
virtual void Parameter(std::wstring & name, std::wstring & value)
|
||||
{
|
||||
// Cookie names are case insensitive according to section 3.1 of RFC 2965
|
||||
// (we don't use locale here)
|
||||
ToLower(name);
|
||||
|
||||
ConvStr(name, temp_name);
|
||||
ConvStr(value, temp_value);
|
||||
|
||||
std::pair<CookieTab::iterator, bool> res = cookie_tab->insert( std::make_pair(temp_name, temp_value) );
|
||||
log << log2 << "Cookie, name: \"" << temp_name << "\", value: \"" << temp_value << "\"";
|
||||
std::pair<CookieTab::iterator, bool> res = cookie_tab->insert( std::make_pair(name, value) );
|
||||
log << log2 << "Cookie, name: \"" << name << "\", value: \"" << value << "\"";
|
||||
|
||||
if( res.second == false )
|
||||
{
|
||||
res.first->second = temp_value;
|
||||
res.first->second = value;
|
||||
log << " (overwritten)";
|
||||
}
|
||||
|
||||
|
@ -101,21 +89,16 @@ public:
|
|||
|
||||
CookieParser()
|
||||
{
|
||||
input_as_utf8 = false;
|
||||
HttpSimpleParser::separator = ';';
|
||||
HttpSimpleParser::value_can_be_quoted = true;
|
||||
HttpSimpleParser::skip_white_chars = true;
|
||||
HttpSimpleParser::recognize_special_chars = false;
|
||||
HttpSimpleParser::getchar_returns_utf8_chars = false;
|
||||
}
|
||||
|
||||
|
||||
void UTF8(bool utf)
|
||||
{
|
||||
input_as_utf8 = utf;
|
||||
}
|
||||
|
||||
// cookie_string can be null
|
||||
void Parse(const char * cookie_string_, CookieTab & cookie_tab_)
|
||||
void Parse(const wchar_t * cookie_string_, CookieTab & cookie_tab_)
|
||||
{
|
||||
cookie_string = cookie_string_;
|
||||
cookie_tab = &cookie_tab_;
|
||||
|
@ -123,6 +106,11 @@ public:
|
|||
HttpSimpleParser::Parse();
|
||||
}
|
||||
|
||||
void Parse(const std::wstring & cookie_string_, CookieTab & cookie_tab_)
|
||||
{
|
||||
Parse(cookie_string_.c_str(), cookie_tab_);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
*/
|
||||
|
||||
#include "httpsimpleparser.h"
|
||||
#include "misc.h"
|
||||
#include "utf8/utf8.h"
|
||||
|
||||
|
||||
|
||||
namespace Winix
|
||||
|
@ -41,14 +44,12 @@ namespace Winix
|
|||
|
||||
|
||||
|
||||
void HttpSimpleParser::ToLower(std::string & s)
|
||||
void HttpSimpleParser::ToLower(std::wstring & s)
|
||||
{
|
||||
std::string::iterator i;
|
||||
|
||||
for(i=s.begin() ; i!= s.end() ; ++i)
|
||||
for(wchar_t & c : s)
|
||||
{
|
||||
if( *i>='A' && *i<='Z' )
|
||||
*i = *i - 'A' + 'a';
|
||||
if( c>='A' && c<='Z' )
|
||||
c = c - 'A' + 'a';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,38 +71,6 @@ void HttpSimpleParser::SkipWhiteChars()
|
|||
|
||||
|
||||
|
||||
void HttpSimpleParser::TrimWhiteChars(std::string & s)
|
||||
{
|
||||
if( s.empty() )
|
||||
return;
|
||||
|
||||
std::string::size_type i;
|
||||
|
||||
for(i = 0 ; i<s.size() && IsWhite(s[i]) ; ++i);
|
||||
|
||||
if( i == s.size() )
|
||||
{
|
||||
// all characters are white
|
||||
s.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
if( i > 0 )
|
||||
// there are some white characters at the beginning
|
||||
s.erase(0, i);
|
||||
|
||||
|
||||
// s is not empty now (i was not equal s.size())
|
||||
// and we have some non white characters
|
||||
// we stops at the last non white character
|
||||
for(i = s.size()-1 ; i>0 && IsWhite(s[i]) ; --i);
|
||||
|
||||
if( i != s.size()-1 )
|
||||
// there are some white characters at the end
|
||||
// we're starting from i+1 even when i==0 (there are some non white characters)
|
||||
s.erase(i+1, s.size() - i - 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int HttpSimpleParser::ParseHalfHex(int c)
|
||||
|
@ -152,33 +121,42 @@ void HttpSimpleParser::CheckSpecialChar()
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void HttpSimpleParser::ReadName()
|
||||
{
|
||||
// we're checking 'separator' and '=' because the string is allowed not having '=' (the value is optional)
|
||||
|
||||
utf8_token.clear();
|
||||
last_name.clear();
|
||||
|
||||
for( ; last_c!=-1 && last_c!=separator && last_c!='=' ; last_c = GetChar() )
|
||||
{
|
||||
if( recognize_special_chars )
|
||||
CheckSpecialChar();
|
||||
|
||||
if( last_c != -1 )
|
||||
{
|
||||
if( getchar_returns_utf8_chars )
|
||||
utf8_token += last_c;
|
||||
else
|
||||
last_name += last_c;
|
||||
}
|
||||
}
|
||||
|
||||
if( getchar_returns_utf8_chars )
|
||||
PT::UTF8ToWide(utf8_token, last_name);
|
||||
|
||||
if( last_c == '=' )
|
||||
last_c = GetChar();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void HttpSimpleParser::ReadQuotedValue()
|
||||
{
|
||||
// skipping '"'
|
||||
last_c = GetChar();
|
||||
|
||||
utf8_token.clear();
|
||||
last_value.clear();
|
||||
|
||||
for( ; last_c!=-1 && last_c!='"' ; last_c = GetChar() )
|
||||
{
|
||||
|
@ -186,9 +164,16 @@ void HttpSimpleParser::ReadQuotedValue()
|
|||
CheckSpecialChar();
|
||||
|
||||
if( last_c != -1 )
|
||||
{
|
||||
if( getchar_returns_utf8_chars )
|
||||
utf8_token += last_c;
|
||||
else
|
||||
last_value += last_c;
|
||||
}
|
||||
}
|
||||
|
||||
if( getchar_returns_utf8_chars )
|
||||
PT::UTF8ToWide(utf8_token, last_value);
|
||||
|
||||
if( last_c == '"' )
|
||||
last_c = GetChar();
|
||||
|
@ -199,27 +184,40 @@ void HttpSimpleParser::ReadQuotedValue()
|
|||
}
|
||||
|
||||
|
||||
void HttpSimpleParser::ReadValue()
|
||||
void HttpSimpleParser::ReadNormalValue()
|
||||
{
|
||||
if( skip_white_chars )
|
||||
SkipWhiteChars();
|
||||
utf8_token.clear();
|
||||
last_value.clear();
|
||||
|
||||
if( value_can_be_quoted && last_c == '"' )
|
||||
{
|
||||
ReadQuotedValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
for( ; last_c!=-1 && last_c!=separator ; last_c = GetChar() )
|
||||
{
|
||||
if( recognize_special_chars )
|
||||
CheckSpecialChar();
|
||||
|
||||
if( last_c != -1 )
|
||||
{
|
||||
if( getchar_returns_utf8_chars )
|
||||
utf8_token += last_c;
|
||||
else
|
||||
last_value += last_c;
|
||||
}
|
||||
}
|
||||
|
||||
if( getchar_returns_utf8_chars )
|
||||
PT::UTF8ToWide(utf8_token, last_value);
|
||||
}
|
||||
|
||||
|
||||
void HttpSimpleParser::ReadValue()
|
||||
{
|
||||
if( skip_white_chars )
|
||||
SkipWhiteChars();
|
||||
|
||||
if( value_can_be_quoted && last_c == '"' )
|
||||
ReadQuotedValue();
|
||||
else
|
||||
ReadNormalValue();
|
||||
|
||||
|
||||
if( last_c == separator )
|
||||
last_c = GetChar();
|
||||
|
@ -228,6 +226,21 @@ void HttpSimpleParser::ReadValue()
|
|||
|
||||
|
||||
|
||||
/*
|
||||
* there can be some important values like passwords so its better
|
||||
* to clear them now
|
||||
*/
|
||||
void HttpSimpleParser::Clear()
|
||||
{
|
||||
Overwrite(last_name);
|
||||
Overwrite(last_value);
|
||||
Overwrite(utf8_token);
|
||||
last_name.clear();
|
||||
last_value.clear();
|
||||
utf8_token.clear();
|
||||
}
|
||||
|
||||
|
||||
void HttpSimpleParser::Parse()
|
||||
{
|
||||
for( last_c = GetChar() ; last_c != -1 ; )
|
||||
|
@ -242,12 +255,14 @@ void HttpSimpleParser::Parse()
|
|||
|
||||
if( skip_white_chars )
|
||||
{
|
||||
TrimWhiteChars(last_name);
|
||||
TrimWhiteChars(last_value);
|
||||
TrimWhite(last_name);
|
||||
TrimWhite(last_value);
|
||||
}
|
||||
|
||||
Parameter(last_name, last_value); // user definied function
|
||||
}
|
||||
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,26 +52,33 @@ protected:
|
|||
bool skip_white_chars;
|
||||
bool recognize_special_chars;
|
||||
|
||||
// if false then GetChar() returns wide characters (converted to int)
|
||||
// if true then GetChar() returns utf8 characters (we have to convert them from utf8 to wide chars)
|
||||
bool getchar_returns_utf8_chars;
|
||||
|
||||
int ParseHalfHex(int c);
|
||||
void ReadName();
|
||||
void ReadQuotedValue();
|
||||
void ReadNormalValue();
|
||||
void ReadValue();
|
||||
void Clear();
|
||||
|
||||
std::string last_name;
|
||||
std::string last_value;
|
||||
std::wstring last_name;
|
||||
std::wstring last_value;
|
||||
std::string utf8_token;
|
||||
|
||||
int last_c;
|
||||
int separator;
|
||||
|
||||
// '-1' means end (eof)
|
||||
// when there is an eof this method can be called more than once (it should always return -1 in such a case)
|
||||
virtual int GetChar() = 0;
|
||||
virtual void Parameter(std::string & last_name, std::string & last_value) = 0;
|
||||
virtual void Parameter(std::wstring & last_name, std::wstring & last_value) = 0;
|
||||
|
||||
void ToLower(std::string & s);
|
||||
void ToLower(std::wstring & s);
|
||||
bool IsWhite(int c);
|
||||
|
||||
void SkipWhiteChars();
|
||||
void TrimWhiteChars(std::string & s);
|
||||
void CheckSpecialChar();
|
||||
|
||||
void Parse();
|
||||
|
@ -87,6 +94,7 @@ public:
|
|||
value_can_be_quoted = false;
|
||||
skip_white_chars = false;
|
||||
recognize_special_chars = true;
|
||||
getchar_returns_utf8_chars = false;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -545,10 +545,7 @@ void Image::SaveImage()
|
|||
{
|
||||
// it doesn't matter for us if there is an error when chmod/chown on a file
|
||||
// the admin (root) will correct it
|
||||
std::string dst_patha; // IMPROVE ME temporary -- in the futere there'll be SetPriv() with std::wstring
|
||||
PT::WideToUTF8(dst_path, dst_patha);
|
||||
SetPriv(dst_patha, config->upload_files_chmod, config->upload_group_int);
|
||||
|
||||
SetPriv(dst_path, config->upload_files_chmod, config->upload_group_int);
|
||||
ImageSavedCorrectly();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -78,14 +78,14 @@ int Log::LogLevel()
|
|||
|
||||
|
||||
|
||||
void Log::Init(int log_level_, bool save_each_line_, const std::string & log_file_, bool log_std, int log_max_requests)
|
||||
void Log::Init(int log_level_, bool save_each_line_, const std::wstring & log_file_, bool log_std, int log_max_requests)
|
||||
{
|
||||
log_level = log_level_;
|
||||
log_file = log_file_;
|
||||
log_stdout = log_std;
|
||||
max_requests = log_max_requests;
|
||||
save_each_line = save_each_line_;
|
||||
|
||||
PT::WideToUTF8(log_file_, log_file);
|
||||
// don't open the file here
|
||||
// because it would be created with the root as an owner
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
~Log();
|
||||
|
||||
void SetTimeZones(TimeZones * ptime_zones);
|
||||
void Init(int log_level_, bool save_each_line_, const std::string & log_file_, bool log_std, int log_max_requests);
|
||||
void Init(int log_level_, bool save_each_line_, const std::wstring & log_file_, bool log_std, int log_max_requests);
|
||||
|
||||
Log & operator<<(const void * s);
|
||||
Log & operator<<(const char * s);
|
||||
|
|
359
core/misc.cpp
359
core/misc.cpp
|
@ -57,9 +57,6 @@ namespace misc_private
|
|||
0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x2028,
|
||||
0x2029, 0x202F, 0x205F, 0x3000 };
|
||||
|
||||
std::ifstream get_file_content;
|
||||
std::string get_file_content_ansi;
|
||||
|
||||
PT::WTextStream tmp_qencode;
|
||||
}
|
||||
|
||||
|
@ -177,7 +174,7 @@ return buffer;
|
|||
|
||||
void Toa(int value, std::string & res, int base, bool clear)
|
||||
{
|
||||
static char buffer[50];
|
||||
static char buffer[50]; // !! IMPROVE ME this 'static' is not needed here?
|
||||
size_t len = sizeof(buffer) / sizeof(char);
|
||||
|
||||
if( clear )
|
||||
|
@ -190,7 +187,7 @@ size_t len = sizeof(buffer) / sizeof(char);
|
|||
|
||||
void Toa(long value, std::string & res, int base, bool clear)
|
||||
{
|
||||
static char buffer[50];
|
||||
static char buffer[50]; // !! IMPROVE ME the same as above
|
||||
size_t len = sizeof(buffer) / sizeof(char);
|
||||
|
||||
if( clear )
|
||||
|
@ -203,7 +200,7 @@ size_t len = sizeof(buffer) / sizeof(char);
|
|||
|
||||
void Toa(int value, std::wstring & res, int base, bool clear)
|
||||
{
|
||||
static wchar_t buffer[50];
|
||||
static wchar_t buffer[50]; // !!
|
||||
size_t len = sizeof(buffer) / sizeof(wchar_t);
|
||||
|
||||
if( clear )
|
||||
|
@ -216,7 +213,7 @@ size_t len = sizeof(buffer) / sizeof(wchar_t);
|
|||
|
||||
void Toa(long value, std::wstring & res, int base, bool clear)
|
||||
{
|
||||
static wchar_t buffer[50];
|
||||
static wchar_t buffer[50]; // !!
|
||||
size_t len = sizeof(buffer) / sizeof(wchar_t);
|
||||
|
||||
if( clear )
|
||||
|
@ -231,142 +228,6 @@ size_t len = sizeof(buffer) / sizeof(wchar_t);
|
|||
|
||||
|
||||
|
||||
|
||||
void AssignString(const char * src, size_t len, std::wstring & dst, bool clear)
|
||||
{
|
||||
if( clear )
|
||||
dst.clear();
|
||||
|
||||
if( dst.capacity() < dst.size() + len )
|
||||
dst.reserve(dst.size() + len + 128);
|
||||
|
||||
for(size_t i=0 ; i<len ; ++i )
|
||||
dst += static_cast<unsigned char>(src[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AssignString(const char * src, std::wstring & dst, bool clear)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
for(len=0 ; src[len] ; ++len){}
|
||||
|
||||
AssignString(src, len, dst, clear);
|
||||
}
|
||||
|
||||
|
||||
void AssignString(const std::string & src, std::wstring & dst, bool clear)
|
||||
{
|
||||
AssignString(src.c_str(), src.size(), dst, clear);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void AssignString(const wchar_t * src, size_t len, std::string & dst, bool clear)
|
||||
{
|
||||
if( clear )
|
||||
dst.clear();
|
||||
|
||||
if( dst.capacity() < dst.size() + len )
|
||||
dst.reserve(dst.size() + len + 128);
|
||||
|
||||
for(size_t i=0 ; i<len ; ++i)
|
||||
dst += static_cast<char>(src[i]);
|
||||
}
|
||||
|
||||
|
||||
void AssignString(const wchar_t * src, std::string & dst, bool clear)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
for(len=0 ; src[len] ; ++len){}
|
||||
|
||||
AssignString(src, len, dst, clear);
|
||||
}
|
||||
|
||||
|
||||
void AssignString(const std::wstring & src, std::string & dst, bool clear)
|
||||
{
|
||||
AssignString(src.c_str(), src.size(), dst, clear);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AssignString(const char * src, size_t len, std::string & dst, bool clear)
|
||||
{
|
||||
if( clear )
|
||||
dst.clear();
|
||||
|
||||
// we suppose that append is smart enough and we don't have to use reserve()
|
||||
dst.append(src, len);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AssignString(const char * src, std::string & dst, bool clear)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
for(len=0 ; src[len] ; ++len){}
|
||||
|
||||
AssignString(src, len, dst, clear);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AssignString(const std::string & src, std::string & dst, bool clear)
|
||||
{
|
||||
if( clear )
|
||||
dst.clear();
|
||||
|
||||
dst.append(src);
|
||||
}
|
||||
|
||||
|
||||
void AssignString(const wchar_t * src, size_t len, std::wstring & dst, bool clear)
|
||||
{
|
||||
if( clear )
|
||||
dst.clear();
|
||||
|
||||
// we suppose that append is smart enough and we don't have to use reserve()
|
||||
dst.append(src, len);
|
||||
}
|
||||
|
||||
|
||||
void AssignString(const wchar_t * src, std::wstring & dst, bool clear)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
for(len=0 ; src[len] ; ++len){}
|
||||
|
||||
AssignString(src, len, dst, clear);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AssignString(const std::wstring & src, std::wstring & dst, bool clear)
|
||||
{
|
||||
if( clear )
|
||||
dst.clear();
|
||||
|
||||
dst.append(src);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool CorrectUrlChar(wchar_t c)
|
||||
{
|
||||
return (c >= 'a' && c <='z') ||
|
||||
|
@ -689,6 +550,18 @@ return path[path.size()-1] == '/';
|
|||
|
||||
|
||||
|
||||
void Overwrite(std::string & str)
|
||||
{
|
||||
for(char & c : str)
|
||||
c = 0;
|
||||
}
|
||||
|
||||
void Overwrite(std::wstring & str)
|
||||
{
|
||||
for(wchar_t & c : str)
|
||||
c = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const char * SkipWhite(const char * s)
|
||||
|
@ -792,11 +665,12 @@ bool ValidateEmail(const std::wstring & email)
|
|||
bool IsFile(const wchar_t * file)
|
||||
{
|
||||
struct stat sb;
|
||||
static std::string afile;
|
||||
char file_name[WINIX_OS_PATH_SIZE];
|
||||
|
||||
PT::WideToUTF8(file, afile);
|
||||
if( !WideToUTF8(file, file_name, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
return (stat(afile.c_str(), &sb) == 0);
|
||||
return (stat(file_name, &sb) == 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -811,19 +685,20 @@ bool IsFile(const std::wstring & file)
|
|||
*/
|
||||
bool CreateDir(const wchar_t * dir, int priv, int group)
|
||||
{
|
||||
static std::string adir;
|
||||
char dir_name[WINIX_OS_PATH_SIZE];
|
||||
|
||||
if( !IsFile(dir) )
|
||||
{
|
||||
PT::WideToUTF8(dir, adir);
|
||||
if( !WideToUTF8(dir, dir_name, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
if( mkdir(adir.c_str(), 0777) < 0 )
|
||||
if( mkdir(dir_name, 0777) < 0 )
|
||||
{
|
||||
log << log1 << "Can't create a directory on fs: " << adir << logend;
|
||||
log << log1 << "Can't create a directory on fs: " << dir << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
return SetPriv(adir, priv, group);
|
||||
return SetPriv(dir, priv, group);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -841,7 +716,7 @@ bool CreateDir(const std::wstring & dir, int priv, int group)
|
|||
// 'dirs' can begin with a slash (will be skipped)
|
||||
bool CreateDirs(const wchar_t * base_dir, const wchar_t * dirs, int priv, int group, bool skip_last)
|
||||
{
|
||||
static std::wstring temp;
|
||||
static std::wstring temp; // !! IMPROVE ME change to char[WINIX_OS_PATH_SIZE] or just remove 'static'
|
||||
const wchar_t * p = dirs;
|
||||
|
||||
temp = base_dir; // we start creating from 'base_dir'
|
||||
|
@ -883,15 +758,19 @@ bool CreateDirs(const std::wstring & base_dir, const std::wstring & dirs, int pr
|
|||
|
||||
|
||||
|
||||
int GetGroupId(const char * name)
|
||||
int GetGroupId(const wchar_t * name)
|
||||
{
|
||||
struct group gr;
|
||||
struct group * result;
|
||||
char group_name[WINIX_OS_USERNAME_SIZE];
|
||||
char buffer[512];
|
||||
|
||||
if( getgrnam_r(name, &gr, buffer, sizeof(buffer)/sizeof(char), &result) != 0 )
|
||||
if( !WideToUTF8(name, group_name, WINIX_OS_USERNAME_SIZE) )
|
||||
return -1;
|
||||
|
||||
if( getgrnam_r(group_name, &gr, buffer, sizeof(buffer)/sizeof(char), &result) != 0 )
|
||||
{
|
||||
log << log1 << "I cannot get the group_id for group name: " << name << logend;
|
||||
log << log1 << "Misc: I cannot get the group_id for group name: " << name << logend;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -900,7 +779,7 @@ char buffer[512];
|
|||
*/
|
||||
if( result == 0 )
|
||||
{
|
||||
log << log1 << "There is no a group with name: " << name << logend;
|
||||
log << log1 << "Misc: There is no a group with name: " << name << logend;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -908,7 +787,7 @@ return gr.gr_gid;
|
|||
}
|
||||
|
||||
|
||||
int GetGroupId(const std::string & name)
|
||||
int GetGroupId(const std::wstring & name)
|
||||
{
|
||||
return GetGroupId(name.c_str());
|
||||
}
|
||||
|
@ -918,19 +797,25 @@ int GetGroupId(const std::string & name)
|
|||
* setting priveleges and a group id on a file or on a directory
|
||||
* group can be -1 (it is not used then)
|
||||
*/
|
||||
bool SetPriv(const char * name, int priv, int group)
|
||||
bool SetPriv(const wchar_t * name, int priv, int group)
|
||||
{
|
||||
if( chmod(name, priv) < 0 )
|
||||
char file_name[WINIX_OS_PATH_SIZE];
|
||||
|
||||
if( !WideToUTF8(name, file_name, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
if( chmod(file_name, priv) < 0 )
|
||||
{
|
||||
log << log1 << "Can't set proper fs privileges on: " << name << logend;
|
||||
log << log1 << "Misc: Can't set proper fs privileges on: " << name << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( group != -1 )
|
||||
{
|
||||
if( chown(name, geteuid(), group) < 0 )
|
||||
if( chown(file_name, geteuid(), group) < 0 )
|
||||
{
|
||||
log << log1 << "Can't set proper fs group on: " << name << logend;
|
||||
log << log1 << "Can't set proper fs group on: " << name
|
||||
<< ", group id was: " << group << logend;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -939,7 +824,7 @@ return true;
|
|||
}
|
||||
|
||||
|
||||
bool SetPriv(const std::string & name, int priv, int group)
|
||||
bool SetPriv(const std::wstring & name, int priv, int group)
|
||||
{
|
||||
return SetPriv(name.c_str(), priv, group);
|
||||
}
|
||||
|
@ -970,18 +855,22 @@ return true;
|
|||
|
||||
bool CopyFile(const wchar_t * src, const wchar_t * dst)
|
||||
{
|
||||
static std::string asrc, adst;
|
||||
char src_name[WINIX_OS_PATH_SIZE];
|
||||
char dst_name[WINIX_OS_PATH_SIZE];
|
||||
FILE * in, * out;
|
||||
|
||||
PT::WideToUTF8(src, asrc);
|
||||
PT::WideToUTF8(dst, adst);
|
||||
if( !WideToUTF8(src, src_name, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
in = fopen(asrc.c_str(), "rb");
|
||||
if( !WideToUTF8(dst, dst_name, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
in = fopen(src_name, "rb");
|
||||
|
||||
if( !in )
|
||||
return false;
|
||||
|
||||
out = fopen(adst.c_str(), "wb");
|
||||
out = fopen(dst_name, "wb");
|
||||
|
||||
if( !out )
|
||||
{
|
||||
|
@ -998,7 +887,7 @@ FILE * in, * out;
|
|||
res = false;
|
||||
|
||||
if( !res )
|
||||
remove(adst.c_str());
|
||||
remove(dst_name);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -1013,11 +902,12 @@ bool CopyFile(const std::wstring & src, const std::wstring & dst)
|
|||
|
||||
bool RemoveFile(const wchar_t * file)
|
||||
{
|
||||
static std::string afile;
|
||||
char file_name[WINIX_OS_PATH_SIZE];
|
||||
|
||||
PT::WideToUTF8(file, afile);
|
||||
if( !WideToUTF8(file, file_name, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
return unlink(afile.c_str()) == 0;
|
||||
return unlink(file_name) == 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1030,12 +920,16 @@ bool RemoveFile(const std::wstring & file)
|
|||
|
||||
bool RenameFile(const wchar_t * from, const wchar_t * to)
|
||||
{
|
||||
static std::string afrom, ato;
|
||||
char from_name[WINIX_OS_PATH_SIZE];
|
||||
char to_name[WINIX_OS_PATH_SIZE];
|
||||
|
||||
PT::WideToUTF8(from, afrom);
|
||||
PT::WideToUTF8(to, ato);
|
||||
if( !WideToUTF8(from, from_name, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
return rename(afrom.c_str(), ato.c_str()) == 0;
|
||||
if( !WideToUTF8(to, to_name, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
return rename(from_name, to_name) == 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1048,19 +942,25 @@ bool RenameFile(const std::wstring & from, const std::wstring & to)
|
|||
|
||||
|
||||
|
||||
bool GetUTF8File(const char * file_path, std::wstring & content, bool clear_content)
|
||||
bool GetUTF8File(const wchar_t * file_path, std::wstring & content, bool clear_content)
|
||||
{
|
||||
using namespace misc_private;
|
||||
char file[WINIX_OS_PATH_SIZE];
|
||||
std::ifstream get_file_content;
|
||||
|
||||
if( clear_content )
|
||||
content.clear();
|
||||
|
||||
get_file_content.clear();
|
||||
get_file_content.open(file_path, std::ios_base::in | std::ios_base::binary);
|
||||
if( !WideToUTF8(file_path, file, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
get_file_content.open(file, std::ios_base::in | std::ios_base::binary);
|
||||
|
||||
if( !get_file_content )
|
||||
return false;
|
||||
|
||||
/*
|
||||
* we don't report any errors when converting from UTF8 to wide characters here
|
||||
*/
|
||||
PT::UTF8ToWide(get_file_content, content);
|
||||
get_file_content.close();
|
||||
|
||||
|
@ -1068,21 +968,6 @@ return true;
|
|||
}
|
||||
|
||||
|
||||
bool GetUTF8File(const wchar_t * file_path, std::wstring & content, bool clear_content)
|
||||
{
|
||||
using namespace misc_private;
|
||||
|
||||
PT::WideToUTF8(file_path, get_file_content_ansi);
|
||||
return GetUTF8File(get_file_content_ansi.c_str(), content, clear_content);
|
||||
}
|
||||
|
||||
|
||||
bool GetUTF8File(const std::string & file_path, std::wstring & content, bool clear_content)
|
||||
{
|
||||
return GetUTF8File(file_path.c_str(), content, clear_content);
|
||||
}
|
||||
|
||||
|
||||
bool GetUTF8File(const std::wstring & file_path, std::wstring & content, bool clear_content)
|
||||
{
|
||||
return GetUTF8File(file_path.c_str(), content, clear_content);
|
||||
|
@ -1222,6 +1107,69 @@ void UrlEncode(const std::wstring & in, std::wstring & out, bool clear_out)
|
|||
|
||||
|
||||
|
||||
bool UrlDecodeFromHex(int c, int & out)
|
||||
{
|
||||
if( c>='0' && c<='9' )
|
||||
{
|
||||
out = c - '0';
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if( c>='a' && c<='f' )
|
||||
{
|
||||
out = c - 'a' + 10;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if( c>='A' && c<='F' )
|
||||
{
|
||||
out = c - 'A' + 10;
|
||||
return true;
|
||||
}
|
||||
|
||||
out = 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool UrlDecode(const char * url, std::wstring & out, bool clear_out)
|
||||
{
|
||||
char url_utf8[WINIX_URL_MAX_SIZE];
|
||||
size_t index = 0;
|
||||
int c1, c2;
|
||||
|
||||
if( clear_out )
|
||||
out.clear();
|
||||
|
||||
while( *url && index < WINIX_URL_MAX_SIZE-1 )
|
||||
{
|
||||
if( *url == '%' && *(url+1) && *(url+2) &&
|
||||
UrlDecodeFromHex(*(url+1), c1) && UrlDecodeFromHex(*(url+2), c2) )
|
||||
{
|
||||
url_utf8[index++] = (c1 << 4) + c2;
|
||||
url += 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
url_utf8[index++] = *url;
|
||||
url += 1;
|
||||
}
|
||||
}
|
||||
|
||||
url_utf8[index] = 0;
|
||||
|
||||
return PT::UTF8ToWide(url_utf8, out, false);
|
||||
}
|
||||
|
||||
|
||||
bool UrlDecode(const std::string & url, std::wstring & out, bool clear_out)
|
||||
{
|
||||
return UrlDecode(url.c_str(), out, clear_out);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QEncode(const std::wstring & in, std::string & out, bool clear)
|
||||
{
|
||||
|
@ -1254,6 +1202,27 @@ 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);
|
||||
|
||||
if( !res )
|
||||
{
|
||||
/*
|
||||
* either the 'utf8' buffer is too small or there was an error when converting
|
||||
*/
|
||||
log << log1 << "Misc: I cannot convert from a wide string to an UTF-8 string, original string was: "
|
||||
<< wide_string << logend;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
bool WideToUTF8(const std::wstring & wide_string, char * utf8, size_t utf8_size)
|
||||
{
|
||||
return WideToUTF8(wide_string.c_str(), utf8, utf8_size);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Winix
|
||||
|
|
70
core/misc.h
70
core/misc.h
|
@ -44,6 +44,9 @@
|
|||
#include "date/date.h"
|
||||
#include "textstream/textstream.h"
|
||||
#include "utf8/utf8.h"
|
||||
#include "winix_const.h"
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Winix
|
||||
|
@ -212,34 +215,6 @@ void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
|
|||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
conversions between ascii text and wide characters
|
||||
(destination is always std::string or std::wstring)
|
||||
|
||||
characters are copied as they are without any locales checking
|
||||
*/
|
||||
|
||||
void AssignString(const char * src, size_t len, std::wstring & dst, bool clear = true);
|
||||
void AssignString(const char * src, std::wstring & dst, bool clear = true);
|
||||
void AssignString(const std::string & src, std::wstring & dst, bool clear = true);
|
||||
|
||||
void AssignString(const wchar_t * src, size_t len, std::string & dst, bool clear = true);
|
||||
void AssignString(const wchar_t * src, std::string & dst, bool clear = true);
|
||||
void AssignString(const std::wstring & src, std::string & dst, bool clear = true);
|
||||
|
||||
void AssignString(const char * src, size_t len, std::string & dst, bool clear = true);
|
||||
void AssignString(const char * src, std::string & dst, bool clear = true);
|
||||
void AssignString(const std::string & src, std::string & dst, bool clear = true);
|
||||
|
||||
void AssignString(const wchar_t * src, size_t len, std::wstring & dst, bool clear = true);
|
||||
void AssignString(const wchar_t * src, std::wstring & dst, bool clear = true);
|
||||
void AssignString(const std::wstring & src, std::wstring & dst, bool clear = true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool CorrectUrlChar(wchar_t c);
|
||||
void CorrectUrlDots(std::wstring & url);
|
||||
void CorrectUrlChars(std::wstring & url);
|
||||
|
@ -358,6 +333,10 @@ void Trim(StringType & s, wchar_t c)
|
|||
|
||||
|
||||
|
||||
void Overwrite(std::string & str);
|
||||
void Overwrite(std::wstring & str);
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void MaxSize(StringType & str, size_t max_size)
|
||||
|
@ -756,11 +735,11 @@ bool CreateDir(const std::wstring & dir, int priv, int group = -1);
|
|||
bool CreateDirs(const wchar_t * base_dir, const wchar_t * dirs, int priv = 0755, int group = -1, bool skip_last = false);
|
||||
bool CreateDirs(const std::wstring & base_dir, const std::wstring & dirs, int priv = 0755, int group = -1, bool skip_last = false);
|
||||
|
||||
int GetGroupId(const char * name);
|
||||
int GetGroupId(const std::string & name);
|
||||
int GetGroupId(const wchar_t * name);
|
||||
int GetGroupId(const std::wstring & name);
|
||||
|
||||
bool SetPriv(const char * name, int priv, int group = -1);
|
||||
bool SetPriv(const std::string & name, int priv, int group = -1);
|
||||
bool SetPriv(const wchar_t * name, int priv, int group = -1);
|
||||
bool SetPriv(const std::wstring & name, int priv, int group = -1);
|
||||
|
||||
bool CopyFile(FILE * in, FILE * out);
|
||||
bool CopyFile(const wchar_t * src, const wchar_t * dst);
|
||||
|
@ -772,9 +751,7 @@ bool RemoveFile(const std::wstring & file);
|
|||
bool RenameFile(const wchar_t * from, const wchar_t * to);
|
||||
bool RenameFile(const std::wstring & from, const std::wstring & to);
|
||||
|
||||
bool GetUTF8File(const char * file_path, std::wstring & content, bool clear_content = true);
|
||||
bool GetUTF8File(const wchar_t * file_path, std::wstring & content, bool clear_content = true);
|
||||
bool GetUTF8File(const std::string & file_path, std::wstring & content, bool clear_content = true);
|
||||
bool GetUTF8File(const std::wstring & file_path, std::wstring & content, bool clear_content = true);
|
||||
|
||||
|
||||
|
@ -897,6 +874,19 @@ void UrlEncode(const std::wstring & in, std::wstring & out, bool clear_out = tru
|
|||
|
||||
|
||||
|
||||
/*
|
||||
* decoding a URL
|
||||
*
|
||||
* return false is the url is too long (longer than WINIX_URL_MAX_SIZE)
|
||||
* or it cannot be correctly converted from UTF8 to wide characters
|
||||
*
|
||||
*/
|
||||
bool UrlDecode(const char * url, std::wstring & out, bool clear_out = true);
|
||||
bool UrlDecode(const std::string & url, std::wstring & out, bool clear_out = true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename char_type, size_t stack_size, size_t heap_block_size>
|
||||
void QEncodeAddChar(char_type c, PT::TextStreamBase<char_type, stack_size, heap_block_size> & out)
|
||||
|
@ -1076,6 +1066,18 @@ void JSONescape(Stream & out, const StringType & str)
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* converting from a wide string to an UTF-8 string
|
||||
* and puts a log if the conversion fails
|
||||
*
|
||||
* it uses PT::WideToUTF8()
|
||||
*/
|
||||
bool WideToUTF8(const wchar_t * wide_string, char * utf8, size_t utf8_size);
|
||||
bool WideToUTF8(const std::wstring & wide_string, char * utf8, size_t utf8_size);
|
||||
|
||||
|
||||
|
||||
} // namespace Winix
|
||||
|
||||
|
||||
|
|
|
@ -186,17 +186,18 @@ void Plugin::LoadPlugins(const std::wstring & plugins_dir, const std::vector<std
|
|||
}
|
||||
|
||||
|
||||
void Plugin::LoadPlugin(const std::string & filename)
|
||||
{
|
||||
LoadPlugin(filename.c_str());
|
||||
}
|
||||
|
||||
|
||||
// we don't have to use Lock() here because plusings are read
|
||||
// we don't have to use Lock() here because plugins are read
|
||||
// before threads are started
|
||||
void * Plugin::LoadInitFun(const char * filename, Fun1 & fun_init)
|
||||
void * Plugin::LoadInitFun(const wchar_t * filename, Fun1 & fun_init)
|
||||
{
|
||||
void * p = dlopen(filename, RTLD_NOW | RTLD_LOCAL);
|
||||
char file[WINIX_OS_PATH_SIZE];
|
||||
|
||||
if( !WideToUTF8(filename, file, WINIX_OS_PATH_SIZE) )
|
||||
return 0;
|
||||
|
||||
void * p = dlopen(file, RTLD_NOW | RTLD_LOCAL);
|
||||
|
||||
if( !p )
|
||||
{
|
||||
|
@ -225,7 +226,7 @@ return p;
|
|||
|
||||
|
||||
|
||||
void Plugin::LoadPlugin(const char * filename)
|
||||
void Plugin::LoadPlugin(const wchar_t * filename)
|
||||
{
|
||||
Fun1 fun_init;
|
||||
void * plugin_handle;
|
||||
|
@ -255,19 +256,13 @@ PluginInfo info;
|
|||
}
|
||||
|
||||
|
||||
void Plugin::LoadPlugin(const wchar_t * filename)
|
||||
{
|
||||
AssignString(filename, afilename);
|
||||
LoadPlugin(afilename.c_str());
|
||||
}
|
||||
|
||||
|
||||
void Plugin::LoadPlugin(const std::wstring & filename)
|
||||
{
|
||||
LoadPlugin(filename.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Plugin::HasPlugin(const wchar_t * name)
|
||||
{
|
||||
if( *name == 0 )
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace Winix
|
|||
|
||||
in the Init you can add your own functions by using plugin.Assign() method
|
||||
and you can set the name of the plugin by setting info.p1 pointer
|
||||
to a string buffer (const char *)
|
||||
to a string buffer (const wchar_t *)
|
||||
(this buffer will not be copied so it should not be destroyed after Init finishes)
|
||||
also in Init you can only use logger (log) info.config and info.db objects
|
||||
(the rest winix objects are not initialized yet)
|
||||
|
@ -201,8 +201,6 @@ public:
|
|||
void SetSynchro(Synchro * psynchro);
|
||||
void SetSessionManager(SessionManager * psession_manager);
|
||||
|
||||
void LoadPlugin(const char * filename);
|
||||
void LoadPlugin(const std::string & filename);
|
||||
void LoadPlugin(const wchar_t * filename);
|
||||
void LoadPlugin(const std::wstring & filename);
|
||||
|
||||
|
@ -256,14 +254,13 @@ private:
|
|||
SessionManager * session_manager;
|
||||
|
||||
std::wstring temp_path; // used when loading plugins
|
||||
std::string afilename;
|
||||
|
||||
Plugins plugins;
|
||||
|
||||
typedef std::multimap<int, Slot> Slots;
|
||||
Slots slots;
|
||||
|
||||
void * LoadInitFun(const char * filename, Fun1 & fun_init);
|
||||
void * LoadInitFun(const wchar_t * filename, Fun1 & fun_init);
|
||||
void Call(Session * ses, int message, Slots::iterator & slot, PluginInfo & info);
|
||||
|
||||
bool SetPointers(PluginInfo & info);
|
||||
|
|
|
@ -268,8 +268,8 @@ namespace Winix
|
|||
#define WINIX_BASE_URL_REDIRECT 31030
|
||||
|
||||
// raw POST parameters
|
||||
// in p1 there is a pointer to std::string meaning a parameter's name
|
||||
// in p2 there is a pointer to std::string value
|
||||
// in p1 there is a pointer to std::wstring meaning a parameter's name
|
||||
// in p2 there is a pointer to std::wstring value
|
||||
// this is sent only from PostParser
|
||||
// PostMultiParser (multipart/form-data html forms) doesn't send this messsage
|
||||
// there is no a session set (session pointer is null)
|
||||
|
|
|
@ -388,10 +388,7 @@ void PostMultiParser::ReadContent()
|
|||
|
||||
void PostMultiParser::ConvStr(const std::string & src, std::wstring & dst)
|
||||
{
|
||||
if( config->utf8 )
|
||||
PT::UTF8ToWide(src, dst);
|
||||
else
|
||||
AssignString(src, dst);
|
||||
}
|
||||
|
||||
|
||||
|
@ -484,7 +481,7 @@ void PostMultiParser::CheckBoundaryEnd()
|
|||
|
||||
void PostMultiParser::CreateTmpFile()
|
||||
{
|
||||
wchar_t buf[1024];
|
||||
wchar_t buf[WINIX_OS_PATH_SIZE];
|
||||
size_t buf_len = sizeof(buf)/sizeof(wchar_t);
|
||||
|
||||
if( config->upload_dir.empty() )
|
||||
|
@ -501,7 +498,7 @@ size_t buf_len = sizeof(buf)/sizeof(wchar_t);
|
|||
PT::WideToUTF8(tmp_filename, atmp_filename);
|
||||
|
||||
tmp_file.open(atmp_filename.c_str(), std::ios_base::binary | std::ios_base::out);
|
||||
// !! dodac ustawienie chmod config.upload_files_chmod dla tymczasowego pliku
|
||||
// !! IMPROVE ME dodac ustawienie chmod config.upload_files_chmod dla tymczasowego pliku
|
||||
|
||||
if( !tmp_file )
|
||||
{
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "misc.h"
|
||||
#include "utf8/utf8.h"
|
||||
#include "log.h"
|
||||
#include "config.h"
|
||||
#include "plugin.h"
|
||||
|
||||
|
||||
|
@ -53,18 +52,14 @@ namespace Winix
|
|||
|
||||
class PostParser : public HttpSimpleParser
|
||||
{
|
||||
|
||||
FCGX_Stream * in;
|
||||
PostTab * post_tab;
|
||||
std::wstring temp_name, temp_value;
|
||||
bool input_as_utf8;
|
||||
size_t log_value_size;
|
||||
int var_index;
|
||||
bool has_winix_post_params_msg;
|
||||
bool has_winix_raw_post_msg;
|
||||
std::string raw_post;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
@ -79,20 +74,20 @@ protected:
|
|||
}
|
||||
|
||||
|
||||
void CreateLog(bool param_added)
|
||||
void CreateLog(bool param_added, const std::wstring & name, const std::wstring & value)
|
||||
{
|
||||
log << log2 << "Method POST, name: \"" << temp_name << "\"";
|
||||
log << log2 << "Method POST, name: \"" << name << "\"";
|
||||
|
||||
if( log_value_size > 0 && !IsSubStringNoCase(L"pass", temp_name.c_str()) )
|
||||
if( log_value_size > 0 && !IsSubStringNoCase(L"pass", name.c_str()) )
|
||||
{
|
||||
log << ", value: ";
|
||||
|
||||
if( temp_value.size() > log_value_size )
|
||||
if( value.size() > log_value_size )
|
||||
log << "(first " << log_value_size << " characters) ";
|
||||
|
||||
log << "\"";
|
||||
log.LogString(temp_value, log_value_size);
|
||||
log << "\" (size: " << temp_value.size() << ")";
|
||||
log.LogString(value, log_value_size);
|
||||
log << "\" (size: " << value.size() << ")";
|
||||
}
|
||||
|
||||
if( param_added == false )
|
||||
|
@ -102,16 +97,8 @@ protected:
|
|||
}
|
||||
|
||||
|
||||
void ConvStr(const std::string & src, std::wstring & dst)
|
||||
{
|
||||
if( input_as_utf8 )
|
||||
PT::UTF8ToWide(src, dst);
|
||||
else
|
||||
AssignString(src, dst);
|
||||
}
|
||||
|
||||
|
||||
virtual void Parameter(std::string & name, std::string & value)
|
||||
virtual void Parameter(std::wstring & name, std::wstring & value)
|
||||
{
|
||||
bool added;
|
||||
std::pair<PostTab::iterator, bool> res;
|
||||
|
@ -119,22 +106,19 @@ protected:
|
|||
if( has_winix_post_params_msg )
|
||||
plugin.Call(0, WINIX_POST_PARAMS, &name, &value);
|
||||
|
||||
ConvStr(name, temp_name);
|
||||
ConvStr(value, temp_value);
|
||||
|
||||
res = post_tab->insert( std::make_pair(temp_name, temp_value) );
|
||||
res = post_tab->insert( std::make_pair(name, value) );
|
||||
added = res.second;
|
||||
|
||||
if( !added )
|
||||
{
|
||||
temp_name += L"_inc";
|
||||
temp_name += Toa(var_index);
|
||||
res = post_tab->insert( std::make_pair(temp_name, temp_value) );
|
||||
name += L"_inc";
|
||||
name += Toa(var_index);
|
||||
res = post_tab->insert( std::make_pair(name, value) );
|
||||
added = res.second;
|
||||
var_index += 1;
|
||||
}
|
||||
|
||||
CreateLog(added);
|
||||
CreateLog(added, name, value);
|
||||
}
|
||||
|
||||
|
||||
|
@ -142,13 +126,8 @@ public:
|
|||
|
||||
PostParser()
|
||||
{
|
||||
input_as_utf8 = false;
|
||||
log_value_size = 0;
|
||||
}
|
||||
|
||||
void UTF8(bool utf)
|
||||
{
|
||||
input_as_utf8 = utf;
|
||||
HttpSimpleParser::getchar_returns_utf8_chars = true;
|
||||
}
|
||||
|
||||
void LogValueSize(size_t s)
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace Winix
|
|||
|
||||
|
||||
|
||||
Request::Request() : char_empty(0)
|
||||
Request::Request()
|
||||
{
|
||||
id = 0;
|
||||
config = 0;
|
||||
|
@ -102,16 +102,16 @@ void Request::Clear()
|
|||
|
||||
page_generated = false;
|
||||
|
||||
env_request_method = &char_empty;
|
||||
env_request_uri = &char_empty;
|
||||
env_http_cookie = &char_empty;
|
||||
env_remote_addr = &char_empty;
|
||||
env_http_host = &char_empty;
|
||||
env_http_user_agent = &char_empty;
|
||||
env_fcgi_role = &char_empty;
|
||||
env_content_type = &char_empty;
|
||||
env_http_accept_encoding = &char_empty;
|
||||
env_https = &char_empty;
|
||||
env_request_method.clear();
|
||||
env_request_uri.clear();
|
||||
env_http_cookie.clear();
|
||||
env_remote_addr.clear();
|
||||
env_http_host.clear();
|
||||
env_http_user_agent.clear();
|
||||
env_http_accept_encoding.clear();
|
||||
env_fcgi_role.clear();
|
||||
env_content_type.clear();
|
||||
env_https.clear();
|
||||
|
||||
item_tab.clear();
|
||||
item.Clear();
|
||||
|
|
|
@ -123,19 +123,16 @@ struct Request
|
|||
|
||||
|
||||
// environment variables
|
||||
// they are not null -- when the server doesn't have such a variable
|
||||
// it will be pointing into 'char_empty' which is default '\0'
|
||||
// !! IMPROVE ME change it to std::wstring, or may PT::Space too?
|
||||
const char * env_request_method;
|
||||
const char * env_request_uri;
|
||||
const char * env_http_cookie;
|
||||
const char * env_remote_addr;
|
||||
const char * env_http_host;
|
||||
const char * env_http_user_agent;
|
||||
const char * env_http_accept_encoding;
|
||||
const char * env_fcgi_role;
|
||||
const char * env_content_type;
|
||||
const char * env_https;
|
||||
std::wstring env_request_method;
|
||||
std::wstring env_request_uri;
|
||||
std::wstring env_http_cookie;
|
||||
std::wstring env_remote_addr;
|
||||
std::wstring env_http_host;
|
||||
std::wstring env_http_user_agent;
|
||||
std::wstring env_http_accept_encoding;
|
||||
std::wstring env_fcgi_role;
|
||||
std::wstring env_content_type;
|
||||
std::wstring env_https;
|
||||
|
||||
// current IP address of the remote host (read from REMOTE_ADDR environment variable)
|
||||
// (at the moment only IPv4 are supported)
|
||||
|
@ -377,10 +374,6 @@ private:
|
|||
|
||||
Config * config;
|
||||
|
||||
// contains '\0'
|
||||
// used to set env_* pointers to the empty value
|
||||
const char char_empty;
|
||||
|
||||
// used in ParamValue() and PostVar() when there is no such a param
|
||||
const std::wstring str_empty;
|
||||
|
||||
|
@ -390,6 +383,7 @@ private:
|
|||
|
||||
|
||||
|
||||
|
||||
template<typename NameType, typename ValueType>
|
||||
std::wstring & Request::AddCookie(const NameType & name, const ValueType & value, PT::Date * expires)
|
||||
{
|
||||
|
|
|
@ -400,10 +400,15 @@ SessionContainer::Iterator i;
|
|||
|
||||
void SessionManager::SaveSessions()
|
||||
{
|
||||
char file_path[WINIX_OS_PATH_SIZE];
|
||||
|
||||
if( config->session_file.empty() )
|
||||
return;
|
||||
|
||||
std::ofstream file(config->session_file.c_str());
|
||||
if( !WideToUTF8(config->session_file, file_path, WINIX_OS_PATH_SIZE) )
|
||||
return;
|
||||
|
||||
std::ofstream file(file_path);
|
||||
|
||||
if( !file )
|
||||
{
|
||||
|
@ -428,7 +433,7 @@ void SessionManager::SaveSessions()
|
|||
}
|
||||
|
||||
file.close();
|
||||
chmod(config->session_file.c_str(), 0600);
|
||||
chmod(file_path, 0600);
|
||||
|
||||
log << log2 << "SM: saved " << len << " session(s)" << logend;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace Winix
|
|||
|
||||
|
||||
|
||||
bool SessionParser::Parse(const std::string & path, SessionContainer & container)
|
||||
bool SessionParser::Parse(const std::wstring & path, SessionContainer & container)
|
||||
{
|
||||
return Parse(path.c_str(), container);
|
||||
}
|
||||
|
@ -54,10 +54,16 @@ void SessionParser::SetUsers(Users * pusers)
|
|||
}
|
||||
|
||||
|
||||
bool SessionParser::Parse(const char * path, SessionContainer & container)
|
||||
bool SessionParser::Parse(const wchar_t * path, SessionContainer & container)
|
||||
{
|
||||
char file_path[WINIX_OS_PATH_SIZE];
|
||||
|
||||
container.Clear();
|
||||
file.open(path, std::ios_base::in | std::ios_base::binary);
|
||||
|
||||
if( !WideToUTF8(path, file_path, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
file.open(file_path, std::ios_base::in | std::ios_base::binary);
|
||||
|
||||
if( !file )
|
||||
{
|
||||
|
|
|
@ -51,8 +51,8 @@ class SessionParser
|
|||
{
|
||||
public:
|
||||
|
||||
bool Parse(const char * path, SessionContainer & container);
|
||||
bool Parse(const std::string & path, SessionContainer & container);
|
||||
bool Parse(const wchar_t * path, SessionContainer & container);
|
||||
bool Parse(const std::wstring & path, SessionContainer & container);
|
||||
void SetUsers(Users * pusers);
|
||||
|
||||
private:
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
*/
|
||||
|
||||
#include "slog.h"
|
||||
#include "utf8/utf8.h"
|
||||
|
||||
|
||||
namespace Winix
|
||||
|
@ -188,7 +189,7 @@ return *this;
|
|||
|
||||
SLog & SLog::TranslateText(const char * str)
|
||||
{
|
||||
AssignString(str, key_temp);
|
||||
PT::UTF8ToWide(str, key_temp);
|
||||
return TranslateText(key_temp.c_str());
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "space/space.h"
|
||||
#include "date/date.h"
|
||||
#include "textstream/textstream.h"
|
||||
#include "utf8/utf8.h"
|
||||
|
||||
|
||||
namespace Winix
|
||||
|
@ -54,7 +55,17 @@ namespace Winix
|
|||
similar to std::ostringstream
|
||||
|
||||
StringType can be either std::string or std::wstring
|
||||
this class doesn't use UTF-8 in any kind
|
||||
|
||||
this class uses UTF-8 <-> wide characters conversions:
|
||||
if StringType is std::string:
|
||||
operator<<(const char*) only copies the input string
|
||||
operator<<(const wchar_t*) converts from wide characters to UTF-8
|
||||
(similary for an operator with std::string and std::wstring)
|
||||
if StringType is std::wstring:
|
||||
operator<<(const char*) converts from UTF-8 to wide characters
|
||||
operator<<(const wchar_t*) only copies the input string
|
||||
(similary for an operator with std::string and std::wstring)
|
||||
|
||||
*/
|
||||
template<class StringType>
|
||||
class TextStream
|
||||
|
@ -108,7 +119,26 @@ public:
|
|||
protected:
|
||||
|
||||
StringType buffer;
|
||||
std::wstring space_str; // for using with spaces
|
||||
|
||||
void Convert(wchar_t c, std::string & dst);
|
||||
void Convert(wchar_t c, std::wstring & dst);
|
||||
|
||||
void Convert(const char * src, size_t len, std::wstring & dst);
|
||||
void Convert(const char * src, std::wstring & dst);
|
||||
void Convert(const std::string & src, std::wstring & dst);
|
||||
|
||||
void Convert(const wchar_t * src, size_t len, std::string & dst);
|
||||
void Convert(const wchar_t * src, std::string & dst);
|
||||
void Convert(const std::wstring & src, std::string & dst);
|
||||
|
||||
void Convert(const char * src, size_t len, std::string & dst);
|
||||
void Convert(const char * src, std::string & dst);
|
||||
void Convert(const std::string & src, std::string & dst);
|
||||
|
||||
void Convert(const wchar_t * src, size_t len, std::wstring & dst);
|
||||
void Convert(const wchar_t * src, std::wstring & dst);
|
||||
void Convert(const std::wstring & src, std::wstring & dst);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -178,7 +208,7 @@ typename TextStream<StringType>::CharType TextStream<StringType>::operator[](siz
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(const char * str)
|
||||
{
|
||||
AssignString(str, buffer, false);
|
||||
Convert(str, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -187,7 +217,7 @@ return *this;
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(const std::string * str)
|
||||
{
|
||||
AssignString(*str, buffer, false);
|
||||
Convert(*str, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -196,7 +226,7 @@ return *this;
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(const std::string & str)
|
||||
{
|
||||
AssignString(str, buffer, false);
|
||||
Convert(str, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -206,7 +236,7 @@ return *this;
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(const wchar_t * str)
|
||||
{
|
||||
AssignString(str, buffer, false);
|
||||
Convert(str, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -215,7 +245,7 @@ return *this;
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(const std::wstring * str)
|
||||
{
|
||||
AssignString(*str, buffer, false);
|
||||
Convert(*str, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -224,7 +254,7 @@ return *this;
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(const std::wstring & str)
|
||||
{
|
||||
AssignString(str, buffer, false);
|
||||
Convert(str, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -234,6 +264,10 @@ return *this;
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(char v)
|
||||
{
|
||||
/*
|
||||
* there is no any possibility to treat 'v' as UTF-8 character if we have got
|
||||
* only one character so we only copy it
|
||||
*/
|
||||
buffer += v;
|
||||
|
||||
return *this;
|
||||
|
@ -243,7 +277,7 @@ return *this;
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(wchar_t v)
|
||||
{
|
||||
buffer += static_cast<CharType>(v);
|
||||
Convert(v, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -256,7 +290,7 @@ wchar_t buf[50];
|
|||
size_t len = sizeof(buf) / sizeof(wchar_t);
|
||||
|
||||
Toa(v, buf, len);
|
||||
AssignString(buf, buffer, false);
|
||||
Convert(buf, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -269,7 +303,7 @@ wchar_t buf[50];
|
|||
size_t len = sizeof(buf) / sizeof(wchar_t);
|
||||
|
||||
Toa(v, buf, len);
|
||||
AssignString(buf, buffer, false);
|
||||
Convert(buf, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -282,7 +316,7 @@ wchar_t buf[50];
|
|||
size_t len = sizeof(buf) / sizeof(wchar_t);
|
||||
|
||||
Toa(v, buf, len);
|
||||
AssignString(buf, buffer, false);
|
||||
Convert(buf, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -295,7 +329,7 @@ wchar_t buf[50];
|
|||
size_t len = sizeof(buf) / sizeof(wchar_t);
|
||||
|
||||
Toa(v, buf, len);
|
||||
AssignString(buf, buffer, false);
|
||||
Convert(buf, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -307,7 +341,7 @@ TextStream<StringType> & TextStream<StringType>::operator<<(double v)
|
|||
char buf[50];
|
||||
|
||||
sprintf(buf, "%f", v);
|
||||
AssignString(buf, buffer, false);
|
||||
Convert(buf, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -323,7 +357,7 @@ size_t len = sizeof(buf) / sizeof(wchar_t);
|
|||
buf[1] = 'x';
|
||||
|
||||
Toa(reinterpret_cast<unsigned long>(v), buf+2, len-2, 16);
|
||||
AssignString(buf, buffer, false);
|
||||
Convert(buf, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -332,7 +366,7 @@ return *this;
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::Write(const char * buf, size_t len)
|
||||
{
|
||||
AssignString(buf, len, buffer, false);
|
||||
Convert(buf, len, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -348,7 +382,7 @@ TextStream<StringType> & TextStream<StringType>::write(const char * buf, size_t
|
|||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::Write(const wchar_t * buf, size_t len)
|
||||
{
|
||||
AssignString(buf, len, buffer, false);
|
||||
Convert(buf, len, buffer);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -396,6 +430,124 @@ return *this;
|
|||
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(wchar_t c, std::string & dst)
|
||||
{
|
||||
PT::IntToUTF8((int)c, dst, false);
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(wchar_t c, std::wstring & dst)
|
||||
{
|
||||
dst += c;
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const char * src, size_t len, std::wstring & dst)
|
||||
{
|
||||
PT::UTF8ToWide(src, len, dst, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const char * src, std::wstring & dst)
|
||||
{
|
||||
PT::UTF8ToWide(src, dst, false);
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const std::string & src, std::wstring & dst)
|
||||
{
|
||||
PT::UTF8ToWide(src, dst, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const wchar_t * src, size_t len, std::string & dst)
|
||||
{
|
||||
PT::WideToUTF8(src, len, dst, false);
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const wchar_t * src, std::string & dst)
|
||||
{
|
||||
PT::WideToUTF8(src, dst, false);
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const std::wstring & src, std::string & dst)
|
||||
{
|
||||
PT::WideToUTF8(src, dst, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const char * src, size_t len, std::string & dst)
|
||||
{
|
||||
// we suppose that append is smart enough and we don't have to use reserve()
|
||||
dst.append(src, len);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const char * src, std::string & dst)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
for(len=0 ; src[len] ; ++len){}
|
||||
|
||||
Convert(src, len, dst);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const std::string & src, std::string & dst)
|
||||
{
|
||||
dst.append(src);
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const wchar_t * src, size_t len, std::wstring & dst)
|
||||
{
|
||||
// we suppose that append is smart enough and we don't have to use reserve()
|
||||
dst.append(src, len);
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const wchar_t * src, std::wstring & dst)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
for(len=0 ; src[len] ; ++len){}
|
||||
|
||||
Convert(src, len, dst);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void TextStream<StringType>::Convert(const std::wstring & src, std::wstring & dst)
|
||||
{
|
||||
dst.append(src);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Winix
|
||||
|
||||
|
||||
|
|
|
@ -164,7 +164,6 @@ void TimeZones::ParseZones()
|
|||
// just space by space (not implemented in Space at the moment)
|
||||
bool TimeZones::ReadTimeZones(const wchar_t * path)
|
||||
{
|
||||
parser.UTF8(true);
|
||||
parser.SetSpace(temp_space);
|
||||
zone_tab.clear();
|
||||
temp_space.Clear();
|
||||
|
|
|
@ -255,7 +255,7 @@ bool Users::LoginUser(long user_id, bool remember_me, bool use_ses_log)
|
|||
if( !cur->session->new_session )
|
||||
session_manager->ChangeSessionId(cur->session->id);
|
||||
|
||||
last.UserLogin(user_id, cur->session->puser->name, inet_addr(cur->request->env_remote_addr), cur->session->id);
|
||||
last.UserLogin(user_id, cur->session->puser->name, cur->request->ip, cur->session->id);
|
||||
how_many_logged += 1;
|
||||
|
||||
log << log2 << "Users: user " << cur->session->puser->name << " (id: " << user_id << ") logged" << logend;
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace Winix
|
|||
|
||||
#define WINIX_VER_MAJOR 0
|
||||
#define WINIX_VER_MINOR 6
|
||||
#define WINIX_VER_REVISION 2
|
||||
#define WINIX_VER_REVISION 3
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* This file is a part of Winix
|
||||
* and is distributed under the 2-Clause BSD licence.
|
||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2014, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_core_winix_const
|
||||
#define headerfile_winix_core_winix_const
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* some constants used throughout winix
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* a size of an UTF-8 buffer when converting a file system path from a wide string
|
||||
* to UTF-8 string
|
||||
*
|
||||
* don't set it too long as it is used in local arrays: char[WINIX_OS_PATH_SIZE]
|
||||
*/
|
||||
#define WINIX_OS_PATH_SIZE 4096
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* a size of an UTF-8 buffer when converting a user's name from a wide string
|
||||
* to UTF-8 string
|
||||
* it can be applied to a user, group etc.
|
||||
*
|
||||
* don't set it too long as it is used in local arrays: char[WINIX_OS_USERNAME_SIZE]
|
||||
*
|
||||
*/
|
||||
#define WINIX_OS_USERNAME_SIZE 128
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* maximum size of a URL
|
||||
*
|
||||
* URLs longer than this value will be rejected (permission denied)
|
||||
* don't set it too long as it is used in local arrays: char[WINIX_URL_MAX_SIZE]
|
||||
*/
|
||||
#define WINIX_URL_MAX_SIZE 4096
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -8,9 +8,10 @@ db.o: ../../pikotools/textstream/textstream.h
|
|||
db.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
db.o: ../../pikotools/membuffer/membuffer.h
|
||||
db.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
db.o: ../../winix/core/error.h ../../pikotools/space/spaceparser.h
|
||||
db.o: ../../pikotools/space/space.h dbitemquery.h ../../winix/core/item.h
|
||||
db.o: dbitemcolumns.h ../../winix/core/user.h ../../winix/core/group.h
|
||||
db.o: ../../winix/core/winix_const.h ../../winix/core/error.h
|
||||
db.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
db.o: dbitemquery.h ../../winix/core/item.h dbitemcolumns.h
|
||||
db.o: ../../winix/core/user.h ../../winix/core/group.h
|
||||
db.o: ../../winix/core/dircontainer.h ../../winix/core/ugcontainer.h
|
||||
db.o: ../../winix/core/log.h ../../winix/core/textstream.h
|
||||
db.o: ../../winix/core/logmanipulators.h ../../winix/core/slog.h
|
||||
|
@ -31,9 +32,9 @@ dbbase.o: ../../pikotools/convert/convert.h
|
|||
dbbase.o: ../../pikotools/convert/inttostr.h
|
||||
dbbase.o: ../../pikotools/membuffer/membuffer.h
|
||||
dbbase.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
dbbase.o: ../../winix/core/error.h ../../pikotools/space/spaceparser.h
|
||||
dbbase.o: ../../pikotools/space/space.h ../../winix/core/log.h
|
||||
dbbase.o: ../../winix/core/misc.h
|
||||
dbbase.o: ../../winix/core/winix_const.h ../../winix/core/error.h
|
||||
dbbase.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
dbbase.o: ../../winix/core/log.h ../../winix/core/misc.h
|
||||
dbconn.o: dbconn.h dbtextstream.h ../../winix/core/textstream.h
|
||||
dbconn.o: ../../winix/core/misc.h ../../winix/core/item.h
|
||||
dbconn.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
|
@ -43,7 +44,8 @@ dbconn.o: ../../pikotools/convert/convert.h
|
|||
dbconn.o: ../../pikotools/convert/inttostr.h
|
||||
dbconn.o: ../../pikotools/membuffer/membuffer.h
|
||||
dbconn.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
dbconn.o: ../../winix/core/log.h ../../winix/core/error.h
|
||||
dbconn.o: ../../winix/core/winix_const.h ../../winix/core/log.h
|
||||
dbconn.o: ../../winix/core/error.h
|
||||
dbitemcolumns.o: dbitemcolumns.h ../../winix/core/item.h dbbase.h dbconn.h
|
||||
dbitemcolumns.o: dbtextstream.h ../../winix/core/textstream.h
|
||||
dbitemcolumns.o: ../../winix/core/misc.h ../../winix/core/item.h
|
||||
|
@ -55,8 +57,8 @@ dbitemcolumns.o: ../../pikotools/convert/convert.h
|
|||
dbitemcolumns.o: ../../pikotools/convert/inttostr.h
|
||||
dbitemcolumns.o: ../../pikotools/membuffer/membuffer.h
|
||||
dbitemcolumns.o: ../../pikotools/textstream/types.h
|
||||
dbitemcolumns.o: ../../pikotools/utf8/utf8.h ../../winix/core/error.h
|
||||
dbitemcolumns.o: ../../pikotools/space/spaceparser.h
|
||||
dbitemcolumns.o: ../../pikotools/utf8/utf8.h ../../winix/core/winix_const.h
|
||||
dbitemcolumns.o: ../../winix/core/error.h ../../pikotools/space/spaceparser.h
|
||||
dbitemcolumns.o: ../../pikotools/space/space.h ../../winix/core/log.h
|
||||
dbitemquery.o: dbitemquery.h ../../winix/core/item.h
|
||||
dbtextstream.o: dbtextstream.h ../../winix/core/textstream.h
|
||||
|
@ -69,4 +71,4 @@ dbtextstream.o: ../../pikotools/convert/convert.h
|
|||
dbtextstream.o: ../../pikotools/convert/inttostr.h
|
||||
dbtextstream.o: ../../pikotools/membuffer/membuffer.h
|
||||
dbtextstream.o: ../../pikotools/textstream/types.h
|
||||
dbtextstream.o: ../../pikotools/utf8/utf8.h
|
||||
dbtextstream.o: ../../pikotools/utf8/utf8.h ../../winix/core/winix_const.h
|
||||
|
|
|
@ -259,7 +259,6 @@ bool DbBase::AssertValueSpace(PGresult * r, int row, int col, PT::Space & space,
|
|||
{
|
||||
const char * res = AssertValue(r, row, col);
|
||||
|
||||
conf_parser.UTF8(true);
|
||||
conf_parser.SplitSingle(split_single);
|
||||
conf_parser.SetSpace(space);
|
||||
space.Clear();
|
||||
|
|
|
@ -65,7 +65,7 @@ PGconn * DbConn::GetPgConn()
|
|||
|
||||
|
||||
|
||||
void DbConn::SetConnParam(const std::string & d, const std::string & u, const std::string & p)
|
||||
void DbConn::SetConnParam(const std::wstring & d, const std::wstring & u, const std::wstring & p)
|
||||
{
|
||||
db_database = d;
|
||||
db_user = u;
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
DbConn();
|
||||
~DbConn();
|
||||
|
||||
void SetConnParam(const std::string & database, const std::string & user, const std::string & pass);
|
||||
void SetConnParam(const std::wstring & database, const std::wstring & user, const std::wstring & pass);
|
||||
void Connect();
|
||||
void WaitForConnection();
|
||||
void Close();
|
||||
|
@ -65,7 +65,7 @@ private:
|
|||
void LogConnectionSocket();
|
||||
|
||||
PGconn * pg_conn;
|
||||
std::string db_database, db_user, db_pass;
|
||||
std::wstring db_database, db_user, db_pass;
|
||||
DbTextStream conn_info;
|
||||
|
||||
// a helper method for escaping strings
|
||||
|
|
|
@ -63,7 +63,7 @@ void DbTextStream::SetExtented(bool ext)
|
|||
|
||||
DbTextStream & DbTextStream::PutText(const char * str)
|
||||
{
|
||||
buffer += str;
|
||||
TextStream<std::string>::operator<<(str);
|
||||
was_param = false;
|
||||
|
||||
return *this;
|
||||
|
@ -85,7 +85,7 @@ DbTextStream & DbTextStream::PutText(const std::string & str)
|
|||
|
||||
DbTextStream & DbTextStream::PutText(const wchar_t * str)
|
||||
{
|
||||
PT::WideToUTF8(str, buffer, false);
|
||||
TextStream<std::string>::operator<<(str);
|
||||
was_param = false;
|
||||
|
||||
return *this;
|
||||
|
@ -229,7 +229,7 @@ DbTextStream & DbTextStream::operator<<(RawText<PT::Date> date)
|
|||
{
|
||||
tmp_stream.Clear();
|
||||
date.par.Serialize(tmp_stream);
|
||||
AssignString(tmp_stream.CStr(), buffer, false);
|
||||
PT::WideToUTF8(tmp_stream.CStr(), buffer, false);
|
||||
tmp_stream.Clear();
|
||||
|
||||
was_param = false;
|
||||
|
@ -246,30 +246,6 @@ return *this;
|
|||
*/
|
||||
|
||||
|
||||
/*
|
||||
old PostgreSQL Escape Format
|
||||
*/
|
||||
/*
|
||||
DbTextStream & DbTextStream::EBinPutChar(char c_)
|
||||
{
|
||||
char buf[20];
|
||||
|
||||
int c = (unsigned char)c_;
|
||||
|
||||
if( (c>=0 && c<=31) || c>=127 || c=='\'' || c=='\\' )
|
||||
{
|
||||
sprintf(buf, "\\\\%03o", c);
|
||||
buffer += buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer += c;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
*/
|
||||
|
||||
// get hex digit for c_ between <0, 15>
|
||||
char DbTextStream::EBinGetHex(char c)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -76,7 +76,6 @@ bool Env::Parse(const std::wstring & env_str)
|
|||
{
|
||||
space.Clear();
|
||||
conf_parser.SetSpace(space);
|
||||
conf_parser.UTF8(config->utf8);
|
||||
conf_parser.SplitSingle(true);
|
||||
|
||||
return (conf_parser.ParseString(env_str) == PT::SpaceParser::ok);
|
||||
|
|
|
@ -48,15 +48,9 @@ namespace Winix
|
|||
|
||||
FunctionParser::FunctionParser()
|
||||
{
|
||||
utf8 = false;
|
||||
}
|
||||
|
||||
|
||||
void FunctionParser::UTF8(bool use_utf8)
|
||||
{
|
||||
utf8 = use_utf8;
|
||||
}
|
||||
|
||||
|
||||
bool FunctionParser::Parse(Cur * pcur, Db * pdb, Functions * pfunctions, System * psystem)
|
||||
{
|
||||
|
@ -65,11 +59,7 @@ bool FunctionParser::Parse(Cur * pcur, Db * pdb, Functions * pfunctions, System
|
|||
system = psystem;
|
||||
functions = pfunctions;
|
||||
last_dir = 0;
|
||||
path = cur->request->env_request_uri;
|
||||
|
||||
//!! mozna dodac sprawdzanie dlugosci path
|
||||
// jesli wieksza niz np 2048 to zglosic incorrect url
|
||||
// i nie parsowac
|
||||
path = cur->request->env_request_uri.c_str();
|
||||
|
||||
ParseDirsItemFunction();
|
||||
ParseParams();
|
||||
|
@ -297,7 +287,7 @@ void FunctionParser::ParseAnchor()
|
|||
while( *path )
|
||||
name_ascii += GetChar();
|
||||
|
||||
ToWide(name_ascii, cur->request->anchor);
|
||||
PT::UTF8ToWide(name_ascii, cur->request->anchor);
|
||||
|
||||
if( !cur->request->anchor.empty() )
|
||||
log << log3 << "FP: anchor: " << cur->request->anchor << logend;
|
||||
|
@ -354,17 +344,6 @@ return c;
|
|||
}
|
||||
|
||||
|
||||
void FunctionParser::ToWide(const std::string & src, std::wstring & dst)
|
||||
{
|
||||
dst.clear();
|
||||
|
||||
if( utf8 )
|
||||
PT::UTF8ToWide(src, dst, false);
|
||||
else
|
||||
AssignString(src, dst, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void FunctionParser::ReadName()
|
||||
{
|
||||
|
@ -374,7 +353,7 @@ void FunctionParser::ReadName()
|
|||
while( *path && *path!='/' && *path!='?' && *path!='#' )
|
||||
name_ascii += GetChar();
|
||||
|
||||
ToWide(name_ascii, name);
|
||||
PT::UTF8ToWide(name_ascii, name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -385,7 +364,7 @@ void FunctionParser::ReadOrdinaryParName()
|
|||
while( *path && *path!='=' && *path!='&' && *path!='#' )
|
||||
name_ascii += GetChar();
|
||||
|
||||
ToWide(name_ascii, name);
|
||||
PT::UTF8ToWide(name_ascii, name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -399,7 +378,7 @@ void FunctionParser::ReadOrdinaryParValue()
|
|||
while( *path && *path!='&' && *path!='#' )
|
||||
value_ascii += GetChar();
|
||||
|
||||
ToWide(value_ascii, value);
|
||||
PT::UTF8ToWide(value_ascii, value);
|
||||
}
|
||||
|
||||
|
||||
|
@ -410,7 +389,7 @@ void FunctionParser::ReadWinixParName()
|
|||
while( *path && *path!='/' && *path!=':' && *path!='#' )
|
||||
name_ascii += GetChar();
|
||||
|
||||
ToWide(name_ascii, name);
|
||||
PT::UTF8ToWide(name_ascii, name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -424,7 +403,7 @@ void FunctionParser::ReadWinixParValue()
|
|||
while( *path && *path!='/' && *path!='#' )
|
||||
value_ascii += GetChar();
|
||||
|
||||
ToWide(value_ascii, value);
|
||||
PT::UTF8ToWide(value_ascii, value);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ public:
|
|||
|
||||
FunctionParser();
|
||||
bool Parse(Cur * pcur, Db * pdb, Functions * pfunctions, System * psystem);
|
||||
void UTF8(bool use_utf8);
|
||||
|
||||
private:
|
||||
|
||||
|
@ -62,12 +61,11 @@ private:
|
|||
System * system;
|
||||
Functions * functions;
|
||||
|
||||
const char * path;
|
||||
std::string name_ascii, value_ascii;
|
||||
const wchar_t * path;
|
||||
std::wstring name, value;
|
||||
std::string name_ascii, value_ascii;
|
||||
Item * last_dir;
|
||||
Param param;
|
||||
bool utf8;
|
||||
|
||||
void SkipSlashes();
|
||||
|
||||
|
@ -84,8 +82,6 @@ private:
|
|||
void ParseOrdinaryParams();
|
||||
void ParseWinixParams();
|
||||
|
||||
void ToWide(const std::string & src, std::wstring & dst);
|
||||
|
||||
int FromHex(int c);
|
||||
int GetChar();
|
||||
void ReadName();
|
||||
|
|
|
@ -280,7 +280,6 @@ void Functions::Init()
|
|||
|
||||
void Functions::Parse()
|
||||
{
|
||||
function_parser.UTF8(config->utf8);
|
||||
function_parser.Parse(cur, db, this, system);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,9 @@ void IPBanFun::MakePost()
|
|||
|
||||
void IPBanFun::MakeGet()
|
||||
{
|
||||
char tmp_ip_str[100];
|
||||
size_t tmp_ip_len = sizeof(tmp_ip_str) / sizeof(char);
|
||||
|
||||
if( cur->request->IsParam(L"removeip") )
|
||||
{
|
||||
if( cur->request->ParamValue(L"removeip") == L"all" )
|
||||
|
@ -86,13 +89,15 @@ void IPBanFun::MakeGet()
|
|||
if( cur->session->ip_ban )
|
||||
cur_ip = cur->session->ip_ban->ip;
|
||||
|
||||
AssignString(cur->request->ParamValue(L"removeip"), tmp_ip_str);
|
||||
int ip = (int)inet_addr(tmp_ip_str.c_str());
|
||||
if( WideToUTF8(cur->request->ParamValue(L"removeip"), tmp_ip_str, tmp_ip_len) )
|
||||
{
|
||||
int ip = (int)inet_addr(tmp_ip_str);
|
||||
session_manager->RemoveIPBan(ip);
|
||||
|
||||
if( cur->session->ip_ban && cur_ip == ip )
|
||||
cur->session->ip_ban = 0;
|
||||
}
|
||||
}
|
||||
|
||||
system->RedirectToLastFunction();
|
||||
}
|
||||
|
|
|
@ -57,7 +57,6 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
std::string tmp_ip_str;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ bool Meta::Parse(const std::wstring & meta_str)
|
|||
{
|
||||
space.Clear();
|
||||
conf_parser.SetSpace(space);
|
||||
conf_parser.UTF8(config->utf8);
|
||||
conf_parser.SplitSingle(true);
|
||||
|
||||
return (conf_parser.ParseString(meta_str) == PT::SpaceParser::ok);
|
||||
|
|
|
@ -109,9 +109,7 @@ bool Upload::UploadSaveStaticFile(const Item & item, const std::wstring & tmp_fi
|
|||
|
||||
if( RenameFile(tmp_filename, path) )
|
||||
{
|
||||
PT::WideToUTF8(path, patha);
|
||||
|
||||
if( !SetPriv(patha, config->upload_files_chmod, config->upload_group_int) )
|
||||
if( !SetPriv(path, config->upload_files_chmod, config->upload_group_int) )
|
||||
{
|
||||
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return false;
|
||||
|
|
|
@ -59,7 +59,6 @@ public:
|
|||
private:
|
||||
|
||||
std::wstring path;
|
||||
std::string patha, path_thumba;
|
||||
DbItemQuery query;
|
||||
bool is_jquery_upload;
|
||||
|
||||
|
|
|
@ -8,21 +8,21 @@ main.o: ../../pikotools/textstream/textstream.h
|
|||
main.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
|
||||
main.o: ../../pikotools/membuffer/membuffer.h
|
||||
main.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
|
||||
main.o: ../../winix/core/logmanipulators.h ../../winix/core/slog.h
|
||||
main.o: ../../winix/core/cur.h ../../winix/core/request.h
|
||||
main.o: ../../winix/core/error.h ../../winix/core/config.h
|
||||
main.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
|
||||
main.o: ../../winix/core/htmlfilter.h ../../winix/templates/htmltextstream.h
|
||||
main.o: ../../winix/core/textstream.h ../../pikotools/space/spacetojson.h
|
||||
main.o: ../../winix/core/session.h ../../winix/core/user.h
|
||||
main.o: ../../winix/core/plugindata.h ../../winix/core/rebus.h
|
||||
main.o: ../../winix/core/ipban.h ../../winix/core/mount.h
|
||||
main.o: ../../winix/templates/locale.h ../../winix/core/slog.h
|
||||
main.o: ../../winix/core/app.h ../../winix/core/system.h
|
||||
main.o: ../../winix/core/job.h ../../winix/core/basethread.h
|
||||
main.o: ../../winix/core/synchro.h ../../winix/core/dirs.h
|
||||
main.o: ../../winix/core/dircontainer.h ../../winix/db/db.h
|
||||
main.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
main.o: ../../winix/core/winix_const.h ../../winix/core/logmanipulators.h
|
||||
main.o: ../../winix/core/slog.h ../../winix/core/cur.h
|
||||
main.o: ../../winix/core/request.h ../../winix/core/error.h
|
||||
main.o: ../../winix/core/config.h ../../pikotools/space/spaceparser.h
|
||||
main.o: ../../pikotools/space/space.h ../../winix/core/htmlfilter.h
|
||||
main.o: ../../winix/templates/htmltextstream.h ../../winix/core/textstream.h
|
||||
main.o: ../../pikotools/space/spacetojson.h ../../winix/core/session.h
|
||||
main.o: ../../winix/core/user.h ../../winix/core/plugindata.h
|
||||
main.o: ../../winix/core/rebus.h ../../winix/core/ipban.h
|
||||
main.o: ../../winix/core/mount.h ../../winix/templates/locale.h
|
||||
main.o: ../../winix/core/slog.h ../../winix/core/app.h
|
||||
main.o: ../../winix/core/system.h ../../winix/core/job.h
|
||||
main.o: ../../winix/core/basethread.h ../../winix/core/synchro.h
|
||||
main.o: ../../winix/core/dirs.h ../../winix/core/dircontainer.h
|
||||
main.o: ../../winix/db/db.h ../../winix/db/dbbase.h ../../winix/db/dbconn.h
|
||||
main.o: ../../winix/db/dbtextstream.h ../../winix/core/error.h
|
||||
main.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
|
||||
main.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
|
||||
|
|
|
@ -172,7 +172,12 @@ using Winix::app;
|
|||
}
|
||||
|
||||
app.system.system_start = time(0);
|
||||
app.config.config_file = argc[1];
|
||||
|
||||
if( !PT::UTF8ToWide(argc[1], app.config.config_file) )
|
||||
{
|
||||
std::wcout << "An incorrect UTF-8 path of the config file" << std::endl;
|
||||
return 6;
|
||||
}
|
||||
|
||||
if( !app.config.ReadConfig(true, false) ) /* errors to stdout, stdout in not closed */
|
||||
return 2;
|
||||
|
|
|
@ -222,3 +222,4 @@ templatesnotify.o: ../../winix/core/sessionmanager.h
|
|||
templatesnotify.o: ../../winix/core/sessioncontainer.h
|
||||
templatesnotify.o: ../../winix/core/ipbancontainer.h
|
||||
templatesnotify.o: ../../winix/core/lastcontainer.h ../../winix/core/misc.h
|
||||
templatesnotify.o: ../../winix/core/winix_const.h
|
||||
|
|
|
@ -85,7 +85,6 @@ void Notify::Init()
|
|||
notify_thread.SetPatterns(&patterns);
|
||||
thread_manager->Add(¬ify_thread, L"notifications");
|
||||
|
||||
patterns.SetUTF8(config->utf8);
|
||||
patterns.SetDirectories(config->txt_templates_dir, config->txt_templates_dir_default);
|
||||
patterns.SetLocale(&TemplatesFunctions::locale);
|
||||
patterns.SetLocaleFilter(&TemplatesFunctions::locale_filter);
|
||||
|
|
|
@ -10,7 +10,8 @@ edb.o: ../../../pikotools/convert/convert.h
|
|||
edb.o: ../../../pikotools/convert/inttostr.h
|
||||
edb.o: ../../../pikotools/membuffer/membuffer.h
|
||||
edb.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
|
||||
edb.o: ../../../winix/core/error.h ../../../pikotools/space/spaceparser.h
|
||||
edb.o: ../../../winix/core/winix_const.h ../../../winix/core/error.h
|
||||
edb.o: ../../../pikotools/space/spaceparser.h
|
||||
edb.o: ../../../pikotools/space/space.h export.h ../../../winix/core/dirs.h
|
||||
edb.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
|
||||
edb.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
|
||||
|
@ -67,6 +68,7 @@ exportinfo.o: ../../../winix/core/htmlfilter.h
|
|||
exportinfo.o: ../../../winix/templates/htmltextstream.h
|
||||
exportinfo.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
exportinfo.o: ../../../pikotools/utf8/utf8.h
|
||||
exportinfo.o: ../../../winix/core/winix_const.h
|
||||
exportinfo.o: ../../../pikotools/space/spacetojson.h
|
||||
exportinfo.o: ../../../winix/core/session.h ../../../winix/core/user.h
|
||||
exportinfo.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
|
||||
|
@ -109,6 +111,7 @@ exportthread.o: ../../../pikotools/convert/inttostr.h
|
|||
exportthread.o: ../../../pikotools/membuffer/membuffer.h
|
||||
exportthread.o: ../../../pikotools/textstream/types.h
|
||||
exportthread.o: ../../../pikotools/utf8/utf8.h
|
||||
exportthread.o: ../../../winix/core/winix_const.h
|
||||
funexport.o: funexport.h ../../../winix/functions/functionbase.h
|
||||
funexport.o: ../../../winix/core/item.h ../../../winix/db/db.h
|
||||
funexport.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
|
||||
|
@ -133,7 +136,7 @@ funexport.o: ../../../pikotools/space/space.h
|
|||
funexport.o: ../../../winix/core/htmlfilter.h
|
||||
funexport.o: ../../../winix/templates/htmltextstream.h
|
||||
funexport.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
funexport.o: ../../../pikotools/utf8/utf8.h
|
||||
funexport.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
funexport.o: ../../../pikotools/space/spacetojson.h
|
||||
funexport.o: ../../../winix/core/session.h ../../../winix/core/user.h
|
||||
funexport.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
|
||||
|
@ -184,19 +187,20 @@ init.o: ../../../pikotools/space/spaceparser.h
|
|||
init.o: ../../../pikotools/space/space.h ../../../winix/core/htmlfilter.h
|
||||
init.o: ../../../winix/templates/htmltextstream.h
|
||||
init.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../pikotools/space/spacetojson.h
|
||||
init.o: ../../../winix/core/session.h ../../../winix/core/user.h
|
||||
init.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
|
||||
init.o: ../../../winix/core/ipban.h ../../../winix/core/mount.h
|
||||
init.o: ../../../winix/templates/locale.h ../../../winix/core/system.h
|
||||
init.o: ../../../winix/core/job.h ../../../winix/core/basethread.h
|
||||
init.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
|
||||
init.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
|
||||
init.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
|
||||
init.o: ../../../winix/core/item.h ../../../winix/db/dbitemcolumns.h
|
||||
init.o: ../../../winix/core/user.h ../../../winix/core/group.h
|
||||
init.o: ../../../winix/core/dircontainer.h ../../../winix/core/ugcontainer.h
|
||||
init.o: ../../../winix/notify/notify.h ../../../winix/notify/notifypool.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
init.o: ../../../pikotools/space/spacetojson.h ../../../winix/core/session.h
|
||||
init.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
|
||||
init.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
|
||||
init.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
|
||||
init.o: ../../../winix/core/system.h ../../../winix/core/job.h
|
||||
init.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
|
||||
init.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
|
||||
init.o: ../../../winix/db/db.h ../../../winix/db/dbbase.h
|
||||
init.o: ../../../winix/db/dbitemquery.h ../../../winix/core/item.h
|
||||
init.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
init.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
||||
init.o: ../../../winix/core/ugcontainer.h ../../../winix/notify/notify.h
|
||||
init.o: ../../../winix/notify/notifypool.h
|
||||
init.o: ../../../winix/templates/patterns.h ../../../winix/templates/locale.h
|
||||
init.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
|
||||
init.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
|
|
|
@ -54,7 +54,6 @@ ExportThread * ExportThread::exp_thread;
|
|||
ExportThread::ExportThread()
|
||||
{
|
||||
exp_thread = 0;
|
||||
utf8 = false;
|
||||
browser_name = "Winix Export";
|
||||
conn_timeout = 5;
|
||||
conn_max_errors = 3;
|
||||
|
@ -62,17 +61,12 @@ ExportThread::ExportThread()
|
|||
|
||||
|
||||
|
||||
void ExportThread::SetUTF8(bool use_utf8)
|
||||
{
|
||||
utf8 = use_utf8;
|
||||
}
|
||||
|
||||
|
||||
void ExportThread::SetBaseUrl(const std::wstring & url)
|
||||
{
|
||||
// SetBaseUrl() is called before the this thread
|
||||
// SetBaseUrl() is called before this thread
|
||||
// is started so we can use 'base_url' later without locking
|
||||
// the same is for 'utf8'
|
||||
base_url = url;
|
||||
}
|
||||
|
||||
|
@ -277,12 +271,7 @@ return len;
|
|||
void ExportThread::Convert(const std::wstring & in, std::string & out, bool clear)
|
||||
{
|
||||
Lock();
|
||||
|
||||
if( utf8 )
|
||||
PT::WideToUTF8(in, out, clear);
|
||||
else
|
||||
AssignString(in, out, clear);
|
||||
|
||||
Unlock();
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ public:
|
|||
|
||||
ExportThread();
|
||||
|
||||
void SetUTF8(bool use_utf8);
|
||||
void SetBaseUrl(const std::wstring & url);
|
||||
|
||||
void AddMessage(const Message & message);
|
||||
|
@ -72,7 +71,6 @@ private:
|
|||
std::string url_a;
|
||||
std::string buffer;
|
||||
size_t buffer_read_index;
|
||||
bool utf8;
|
||||
std::wstring base_url;
|
||||
|
||||
std::string browser_name;
|
||||
|
|
|
@ -86,7 +86,6 @@ void FstabChanged(PluginInfo & info)
|
|||
|
||||
void InitPlugin(PluginInfo & info)
|
||||
{
|
||||
export_thread.SetUTF8(info.config->utf8);
|
||||
export_thread.SetBaseUrl(info.config->base_url);
|
||||
|
||||
info.system->thread_manager.Add(&export_thread, L"export");
|
||||
|
|
|
@ -13,8 +13,8 @@ gallery.o: ../../../pikotools/convert/convert.h
|
|||
gallery.o: ../../../pikotools/convert/inttostr.h
|
||||
gallery.o: ../../../pikotools/membuffer/membuffer.h
|
||||
gallery.o: ../../../pikotools/textstream/types.h
|
||||
gallery.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/error.h
|
||||
gallery.o: ../../../pikotools/space/spaceparser.h
|
||||
gallery.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
gallery.o: ../../../winix/core/error.h ../../../pikotools/space/spaceparser.h
|
||||
gallery.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
|
||||
gallery.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
gallery.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
||||
|
@ -68,7 +68,8 @@ init.o: ../../../pikotools/convert/convert.h
|
|||
init.o: ../../../pikotools/convert/inttostr.h
|
||||
init.o: ../../../pikotools/membuffer/membuffer.h
|
||||
init.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
|
||||
init.o: ../../../winix/core/error.h ../../../pikotools/space/spaceparser.h
|
||||
init.o: ../../../winix/core/winix_const.h ../../../winix/core/error.h
|
||||
init.o: ../../../pikotools/space/spaceparser.h
|
||||
init.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
|
||||
init.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
init.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
||||
|
@ -152,7 +153,8 @@ templates.o: ../../../pikotools/convert/convert.h
|
|||
templates.o: ../../../pikotools/convert/inttostr.h
|
||||
templates.o: ../../../pikotools/membuffer/membuffer.h
|
||||
templates.o: ../../../pikotools/textstream/types.h
|
||||
templates.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/error.h
|
||||
templates.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
templates.o: ../../../winix/core/error.h
|
||||
templates.o: ../../../pikotools/space/spaceparser.h
|
||||
templates.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
|
||||
templates.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
|
|
|
@ -17,8 +17,8 @@ groupinfo.o: ../../../pikotools/convert/convert.h
|
|||
groupinfo.o: ../../../pikotools/convert/inttostr.h
|
||||
groupinfo.o: ../../../pikotools/membuffer/membuffer.h
|
||||
groupinfo.o: ../../../pikotools/textstream/types.h
|
||||
groupinfo.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/error.h
|
||||
groupinfo.o: ../../../winix/db/dbitemquery.h
|
||||
groupinfo.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
groupinfo.o: ../../../winix/core/error.h ../../../winix/db/dbitemquery.h
|
||||
groupinfo.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
groupinfo.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
||||
groupinfo.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
|
||||
|
@ -74,21 +74,21 @@ init.o: ../../../pikotools/textstream/types.h
|
|||
init.o: ../../../winix/core/htmlfilter.h
|
||||
init.o: ../../../winix/templates/htmltextstream.h
|
||||
init.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../pikotools/space/spacetojson.h
|
||||
init.o: ../../../winix/core/session.h ../../../winix/core/user.h
|
||||
init.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
|
||||
init.o: ../../../winix/core/ipban.h ../../../winix/core/mount.h
|
||||
init.o: ../../../winix/templates/locale.h ../../../winix/core/system.h
|
||||
init.o: ../../../winix/core/job.h ../../../winix/core/basethread.h
|
||||
init.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
|
||||
init.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
|
||||
init.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
|
||||
init.o: ../../../winix/db/dbtextstream.h ../../../winix/core/error.h
|
||||
init.o: ../../../winix/db/dbitemquery.h ../../../winix/core/item.h
|
||||
init.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
init.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
||||
init.o: ../../../winix/core/ugcontainer.h ../../../winix/notify/notify.h
|
||||
init.o: ../../../winix/notify/notifypool.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
init.o: ../../../pikotools/space/spacetojson.h ../../../winix/core/session.h
|
||||
init.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
|
||||
init.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
|
||||
init.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
|
||||
init.o: ../../../winix/core/system.h ../../../winix/core/job.h
|
||||
init.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
|
||||
init.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
|
||||
init.o: ../../../winix/db/db.h ../../../winix/db/dbbase.h
|
||||
init.o: ../../../winix/db/dbconn.h ../../../winix/db/dbtextstream.h
|
||||
init.o: ../../../winix/core/error.h ../../../winix/db/dbitemquery.h
|
||||
init.o: ../../../winix/core/item.h ../../../winix/db/dbitemcolumns.h
|
||||
init.o: ../../../winix/core/user.h ../../../winix/core/group.h
|
||||
init.o: ../../../winix/core/dircontainer.h ../../../winix/core/ugcontainer.h
|
||||
init.o: ../../../winix/notify/notify.h ../../../winix/notify/notifypool.h
|
||||
init.o: ../../../winix/templates/patterns.h ../../../winix/templates/locale.h
|
||||
init.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
|
||||
init.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
|
@ -150,6 +150,7 @@ templates.o: ../../../pikotools/convert/convert.h
|
|||
templates.o: ../../../pikotools/convert/inttostr.h
|
||||
templates.o: ../../../pikotools/membuffer/membuffer.h
|
||||
templates.o: ../../../pikotools/textstream/types.h
|
||||
templates.o: ../../../winix/core/winix_const.h
|
||||
templates.o: ../../../winix/templates/patterncacher.h
|
||||
templates.o: ../../../winix/core/item.h
|
||||
templates.o: ../../../winix/templates/indexpatterns.h
|
||||
|
|
|
@ -79,7 +79,6 @@ bool GroupInfo::ParseGroups(const std::wstring & str, Groups & groups)
|
|||
groups.Clear();
|
||||
PT::Space & space = *groups.GetSpace();
|
||||
conf_parser.SetSpace(space);
|
||||
conf_parser.UTF8(config->utf8);
|
||||
|
||||
if( conf_parser.ParseString(str) == PT::SpaceParser::ok )
|
||||
{
|
||||
|
|
|
@ -12,7 +12,8 @@ cache.o: ../../../pikotools/convert/convert.h
|
|||
cache.o: ../../../pikotools/convert/inttostr.h
|
||||
cache.o: ../../../pikotools/membuffer/membuffer.h
|
||||
cache.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
|
||||
cache.o: ../../../winix/core/error.h ../../../pikotools/space/spaceparser.h
|
||||
cache.o: ../../../winix/core/winix_const.h ../../../winix/core/error.h
|
||||
cache.o: ../../../pikotools/space/spaceparser.h
|
||||
cache.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
|
||||
cache.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
cache.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
||||
|
@ -54,22 +55,23 @@ init.o: ../../../pikotools/space/spaceparser.h
|
|||
init.o: ../../../pikotools/space/space.h ../../../winix/core/htmlfilter.h
|
||||
init.o: ../../../winix/templates/htmltextstream.h
|
||||
init.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../pikotools/space/spacetojson.h
|
||||
init.o: ../../../winix/core/session.h ../../../winix/core/user.h
|
||||
init.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
|
||||
init.o: ../../../winix/core/ipban.h ../../../winix/core/mount.h
|
||||
init.o: ../../../winix/templates/locale.h ../../../winix/core/plugin.h
|
||||
init.o: ../../../winix/core/pluginmsg.h ../../../winix/core/log.h
|
||||
init.o: ../../../winix/core/system.h ../../../winix/core/job.h
|
||||
init.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
|
||||
init.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
|
||||
init.o: ../../../winix/db/db.h ../../../winix/db/dbbase.h
|
||||
init.o: ../../../winix/db/dbconn.h ../../../winix/db/dbtextstream.h
|
||||
init.o: ../../../winix/core/error.h ../../../winix/db/dbitemquery.h
|
||||
init.o: ../../../winix/core/item.h ../../../winix/db/dbitemcolumns.h
|
||||
init.o: ../../../winix/core/user.h ../../../winix/core/group.h
|
||||
init.o: ../../../winix/core/dircontainer.h ../../../winix/core/ugcontainer.h
|
||||
init.o: ../../../winix/notify/notify.h ../../../winix/notify/notifypool.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
init.o: ../../../pikotools/space/spacetojson.h ../../../winix/core/session.h
|
||||
init.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
|
||||
init.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
|
||||
init.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
|
||||
init.o: ../../../winix/core/plugin.h ../../../winix/core/pluginmsg.h
|
||||
init.o: ../../../winix/core/log.h ../../../winix/core/system.h
|
||||
init.o: ../../../winix/core/job.h ../../../winix/core/basethread.h
|
||||
init.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
|
||||
init.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
|
||||
init.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
|
||||
init.o: ../../../winix/db/dbtextstream.h ../../../winix/core/error.h
|
||||
init.o: ../../../winix/db/dbitemquery.h ../../../winix/core/item.h
|
||||
init.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
init.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
||||
init.o: ../../../winix/core/ugcontainer.h ../../../winix/notify/notify.h
|
||||
init.o: ../../../winix/notify/notifypool.h
|
||||
init.o: ../../../winix/templates/patterns.h ../../../winix/templates/locale.h
|
||||
init.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
|
||||
init.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
|
@ -135,6 +137,7 @@ templates.o: ../../../pikotools/convert/convert.h
|
|||
templates.o: ../../../pikotools/convert/inttostr.h
|
||||
templates.o: ../../../pikotools/membuffer/membuffer.h
|
||||
templates.o: ../../../pikotools/textstream/types.h
|
||||
templates.o: ../../../winix/core/winix_const.h
|
||||
templates.o: ../../../winix/templates/patterncacher.h
|
||||
templates.o: ../../../winix/core/item.h
|
||||
templates.o: ../../../winix/templates/indexpatterns.h
|
||||
|
|
|
@ -11,6 +11,7 @@ init.o: ../../../pikotools/convert/convert.h
|
|||
init.o: ../../../pikotools/convert/inttostr.h
|
||||
init.o: ../../../pikotools/membuffer/membuffer.h
|
||||
init.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
|
||||
init.o: ../../../winix/core/winix_const.h
|
||||
init.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
|
||||
init.o: ../../../winix/core/cur.h ../../../winix/core/request.h
|
||||
init.o: ../../../winix/core/error.h ../../../winix/core/config.h
|
||||
|
@ -96,6 +97,7 @@ stats.o: ../../../pikotools/convert/convert.h
|
|||
stats.o: ../../../pikotools/convert/inttostr.h
|
||||
stats.o: ../../../pikotools/membuffer/membuffer.h
|
||||
stats.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
|
||||
stats.o: ../../../winix/core/winix_const.h
|
||||
stats.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
|
||||
stats.o: ../../../winix/core/cur.h ../../../winix/core/request.h
|
||||
stats.o: ../../../winix/core/error.h ../../../winix/core/config.h
|
||||
|
@ -124,6 +126,7 @@ templates.o: ../../../pikotools/membuffer/membuffer.h
|
|||
templates.o: ../../../pikotools/textstream/types.h ../../../winix/core/item.h
|
||||
templates.o: ../../../winix/core/error.h ../../../winix/core/textstream.h
|
||||
templates.o: ../../../winix/core/misc.h ../../../pikotools/utf8/utf8.h
|
||||
templates.o: ../../../winix/core/winix_const.h
|
||||
templates.o: ../../../winix/templates/htmltextstream.h
|
||||
templates.o: ../../../winix/core/textstream.h
|
||||
templates.o: ../../../pikotools/space/spacetojson.h
|
||||
|
|
|
@ -44,39 +44,38 @@ namespace Stats
|
|||
|
||||
|
||||
|
||||
void Bot::SetBrowserName(const char * name)
|
||||
void Bot::SetBrowserName(const std::wstring & name)
|
||||
{
|
||||
browser_name = name;
|
||||
browser_name = &name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Bot::BrowserNameHas(const char * name)
|
||||
bool Bot::BrowserNameHas(const wchar_t * name)
|
||||
{
|
||||
return strstr(browser_name, name) != 0;
|
||||
return (browser_name->find(name) != std::wstring::npos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Bot::IsGoogle()
|
||||
{
|
||||
return BrowserNameHas("Googlebot") && BrowserNameHas("+http://www.google.com/bot.html");
|
||||
return BrowserNameHas(L"Googlebot") && BrowserNameHas(L"+http://www.google.com/bot.html");
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Bot::IsYahoo()
|
||||
{
|
||||
return BrowserNameHas("Yahoo!") && BrowserNameHas("yahoo.com");
|
||||
return BrowserNameHas(L"Yahoo!") && BrowserNameHas(L"yahoo.com");
|
||||
}
|
||||
|
||||
|
||||
bool Bot::IsBing()
|
||||
{
|
||||
if( BrowserNameHas("msnbot") && BrowserNameHas("+http://search.msn.com/msnbot.htm") )
|
||||
if( BrowserNameHas(L"msnbot") && BrowserNameHas(L"+http://search.msn.com/msnbot.htm") )
|
||||
return true;
|
||||
|
||||
return BrowserNameHas("bingbot") && BrowserNameHas("+http://www.bing.com/bingbot.htm");
|
||||
return BrowserNameHas(L"bingbot") && BrowserNameHas(L"+http://www.bing.com/bingbot.htm");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,10 @@
|
|||
#ifndef headerfile_winix_plugins_stats_bot
|
||||
#define headerfile_winix_plugins_stats_bot
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
namespace Winix
|
||||
{
|
||||
|
||||
|
@ -45,7 +49,7 @@ namespace Stats
|
|||
|
||||
struct Bot
|
||||
{
|
||||
void SetBrowserName(const char * name);
|
||||
void SetBrowserName(const std::wstring & name);
|
||||
|
||||
bool IsGoogle();
|
||||
bool IsYahoo();
|
||||
|
@ -54,9 +58,9 @@ struct Bot
|
|||
|
||||
private:
|
||||
|
||||
const char * browser_name;
|
||||
const std::wstring * browser_name;
|
||||
|
||||
bool BrowserNameHas(const char * name);
|
||||
bool BrowserNameHas(const wchar_t * name);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@ createthread.o: ../../../pikotools/convert/convert.h
|
|||
createthread.o: ../../../pikotools/convert/inttostr.h
|
||||
createthread.o: ../../../pikotools/membuffer/membuffer.h
|
||||
createthread.o: ../../../pikotools/textstream/types.h
|
||||
createthread.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/error.h
|
||||
createthread.o: ../../../pikotools/utf8/utf8.h
|
||||
createthread.o: ../../../winix/core/winix_const.h ../../../winix/core/error.h
|
||||
createthread.o: ../../../pikotools/space/spaceparser.h
|
||||
createthread.o: ../../../pikotools/space/space.h
|
||||
createthread.o: ../../../winix/db/dbitemquery.h
|
||||
|
@ -111,8 +112,8 @@ funthread.o: ../../../pikotools/convert/convert.h
|
|||
funthread.o: ../../../pikotools/convert/inttostr.h
|
||||
funthread.o: ../../../pikotools/membuffer/membuffer.h
|
||||
funthread.o: ../../../pikotools/textstream/types.h
|
||||
funthread.o: ../../../pikotools/utf8/utf8.h funthread.h
|
||||
funthread.o: ../../../winix/functions/functionbase.h
|
||||
funthread.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
funthread.o: funthread.h ../../../winix/functions/functionbase.h
|
||||
funthread.o: ../../../winix/core/item.h ../../../winix/db/db.h
|
||||
funthread.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
|
||||
funthread.o: ../../../winix/db/dbtextstream.h
|
||||
|
@ -173,6 +174,7 @@ init.o: ../../../pikotools/convert/convert.h
|
|||
init.o: ../../../pikotools/convert/inttostr.h
|
||||
init.o: ../../../pikotools/membuffer/membuffer.h
|
||||
init.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
|
||||
init.o: ../../../winix/core/winix_const.h
|
||||
init.o: ../../../pikotools/space/spaceparser.h
|
||||
init.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
|
||||
init.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
|
@ -262,7 +264,7 @@ reply.o: ../../../pikotools/space/spaceparser.h
|
|||
reply.o: ../../../pikotools/space/space.h ../../../winix/core/htmlfilter.h
|
||||
reply.o: ../../../winix/templates/htmltextstream.h
|
||||
reply.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
reply.o: ../../../pikotools/utf8/utf8.h
|
||||
reply.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
reply.o: ../../../pikotools/space/spacetojson.h ../../../winix/core/session.h
|
||||
reply.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
|
||||
reply.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
|
||||
|
@ -346,7 +348,8 @@ showthreads.o: ../../../pikotools/convert/convert.h
|
|||
showthreads.o: ../../../pikotools/convert/inttostr.h
|
||||
showthreads.o: ../../../pikotools/membuffer/membuffer.h
|
||||
showthreads.o: ../../../pikotools/textstream/types.h
|
||||
showthreads.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/error.h
|
||||
showthreads.o: ../../../pikotools/utf8/utf8.h
|
||||
showthreads.o: ../../../winix/core/winix_const.h ../../../winix/core/error.h
|
||||
showthreads.o: ../../../pikotools/space/spaceparser.h
|
||||
showthreads.o: ../../../pikotools/space/space.h
|
||||
showthreads.o: ../../../winix/db/dbitemquery.h
|
||||
|
@ -409,7 +412,8 @@ templates.o: ../../../pikotools/convert/convert.h
|
|||
templates.o: ../../../pikotools/convert/inttostr.h
|
||||
templates.o: ../../../pikotools/membuffer/membuffer.h
|
||||
templates.o: ../../../pikotools/textstream/types.h
|
||||
templates.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/error.h
|
||||
templates.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
templates.o: ../../../winix/core/error.h
|
||||
templates.o: ../../../pikotools/space/spaceparser.h
|
||||
templates.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
|
||||
templates.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
|
@ -510,7 +514,8 @@ threadinfo.o: ../../../pikotools/convert/convert.h
|
|||
threadinfo.o: ../../../pikotools/convert/inttostr.h
|
||||
threadinfo.o: ../../../pikotools/membuffer/membuffer.h
|
||||
threadinfo.o: ../../../pikotools/textstream/types.h
|
||||
threadinfo.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/error.h
|
||||
threadinfo.o: ../../../pikotools/utf8/utf8.h
|
||||
threadinfo.o: ../../../winix/core/winix_const.h ../../../winix/core/error.h
|
||||
threadinfo.o: ../../../pikotools/space/spaceparser.h
|
||||
threadinfo.o: ../../../pikotools/space/space.h
|
||||
threadinfo.o: ../../../winix/db/dbitemquery.h
|
||||
|
|
|
@ -13,6 +13,7 @@ createticket.o: ../../../pikotools/convert/inttostr.h
|
|||
createticket.o: ../../../pikotools/membuffer/membuffer.h
|
||||
createticket.o: ../../../pikotools/textstream/types.h
|
||||
createticket.o: ../../../pikotools/utf8/utf8.h
|
||||
createticket.o: ../../../winix/core/winix_const.h
|
||||
createticket.o: ../../../winix/core/logmanipulators.h
|
||||
createticket.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
|
||||
createticket.o: ../../../winix/core/request.h ../../../winix/core/error.h
|
||||
|
@ -143,6 +144,7 @@ editticket.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
|
|||
editticket.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
editticket.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
|
||||
editticket.o: ../../../pikotools/utf8/utf8.h
|
||||
editticket.o: ../../../winix/core/winix_const.h
|
||||
editticket.o: ../../../winix/core/logmanipulators.h
|
||||
editticket.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
|
||||
editticket.o: ../../../winix/core/request.h ../../../winix/core/error.h
|
||||
|
@ -248,7 +250,7 @@ funticket.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
|||
funticket.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
|
||||
funticket.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
funticket.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
|
||||
funticket.o: ../../../pikotools/utf8/utf8.h
|
||||
funticket.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
funticket.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
|
||||
funticket.o: ../../../winix/core/cur.h ../../../winix/core/request.h
|
||||
funticket.o: ../../../winix/core/error.h ../../../winix/core/config.h
|
||||
|
@ -347,10 +349,11 @@ init.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
|||
init.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
|
||||
init.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
init.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/logmanipulators.h
|
||||
init.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
|
||||
init.o: ../../../winix/core/request.h ../../../winix/core/error.h
|
||||
init.o: ../../../winix/core/config.h ../../../winix/core/htmlfilter.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
init.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
|
||||
init.o: ../../../winix/core/cur.h ../../../winix/core/request.h
|
||||
init.o: ../../../winix/core/error.h ../../../winix/core/config.h
|
||||
init.o: ../../../winix/core/htmlfilter.h
|
||||
init.o: ../../../winix/templates/htmltextstream.h
|
||||
init.o: ../../../pikotools/space/spacetojson.h ../../../winix/core/session.h
|
||||
init.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
|
||||
|
@ -445,6 +448,7 @@ showtickets.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
|
|||
showtickets.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
showtickets.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
|
||||
showtickets.o: ../../../pikotools/utf8/utf8.h
|
||||
showtickets.o: ../../../winix/core/winix_const.h
|
||||
showtickets.o: ../../../winix/core/logmanipulators.h
|
||||
showtickets.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
|
||||
showtickets.o: ../../../winix/core/request.h ../../../winix/core/error.h
|
||||
|
@ -558,6 +562,7 @@ templates.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
|||
templates.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
|
||||
templates.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
templates.o: ../../../winix/core/requesttypes.h
|
||||
templates.o: ../../../winix/core/winix_const.h
|
||||
templates.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
|
||||
templates.o: ../../../winix/core/cur.h ../../../winix/core/request.h
|
||||
templates.o: ../../../winix/core/error.h ../../../winix/core/config.h
|
||||
|
@ -662,6 +667,7 @@ ticketinfo.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
|
|||
ticketinfo.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
ticketinfo.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
|
||||
ticketinfo.o: ../../../pikotools/utf8/utf8.h
|
||||
ticketinfo.o: ../../../winix/core/winix_const.h
|
||||
ticketinfo.o: ../../../winix/core/logmanipulators.h
|
||||
ticketinfo.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
|
||||
ticketinfo.o: ../../../winix/core/request.h ../../../winix/core/error.h
|
||||
|
|
|
@ -165,7 +165,6 @@ bool TicketInfo::ParseTicketConf(long mount_dir_id, const std::wstring & path)
|
|||
log << log3 << "Ticket: parsing conf file: " << path << logend;
|
||||
|
||||
conf_tab[mount_dir_id].file_name = path;
|
||||
conf_parser.UTF8(true);
|
||||
conf_parser.SetSpace(conf_tab[mount_dir_id].conf);
|
||||
conf_parser.SplitSingle(true);
|
||||
conf_tab[mount_dir_id].conf.Clear();
|
||||
|
|
|
@ -157,29 +157,30 @@ dir.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
dir.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
dir.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
dir.o: ../../winix/core/htmlfilter.h ../../winix/core/misc.h
|
||||
dir.o: ../../winix/functions/functions.h ../../winix/functions/functionbase.h
|
||||
dir.o: ../../winix/core/request.h ../../winix/core/synchro.h
|
||||
dir.o: ../../winix/functions/functionparser.h ../../winix/functions/account.h
|
||||
dir.o: ../../winix/functions/adduser.h ../../winix/functions/cat.h
|
||||
dir.o: ../../winix/functions/chmod.h ../../winix/functions/privchanger.h
|
||||
dir.o: ../../winix/functions/chown.h ../../winix/functions/ckeditor.h
|
||||
dir.o: ../../winix/functions/cp.h ../../winix/functions/default.h
|
||||
dir.o: ../../winix/functions/download.h ../../winix/functions/emacs.h
|
||||
dir.o: ../../winix/functions/env.h ../../winix/functions/imgcrop.h
|
||||
dir.o: ../../winix/functions/last.h ../../winix/functions/login.h
|
||||
dir.o: ../../winix/functions/logout.h ../../winix/functions/ln.h
|
||||
dir.o: ../../winix/functions/ls.h ../../winix/functions/man.h
|
||||
dir.o: ../../winix/functions/meta.h ../../winix/functions/mkdir.h
|
||||
dir.o: ../../winix/functions/mv.h ../../winix/functions/nicedit.h
|
||||
dir.o: ../../winix/functions/node.h ../../winix/functions/passwd.h
|
||||
dir.o: ../../winix/functions/priv.h ../../winix/functions/pw.h
|
||||
dir.o: ../../winix/functions/reload.h ../../winix/functions/rm.h
|
||||
dir.o: ../../winix/functions/rmuser.h ../../winix/functions/sort.h
|
||||
dir.o: ../../winix/functions/specialdefault.h ../../winix/functions/stat.h
|
||||
dir.o: ../../winix/functions/subject.h ../../winix/functions/template.h
|
||||
dir.o: ../../winix/functions/tinymce.h ../../winix/functions/uname.h
|
||||
dir.o: ../../winix/functions/upload.h ../../winix/functions/uptime.h
|
||||
dir.o: ../../winix/functions/who.h ../../winix/functions/vim.h miscspace.h
|
||||
dir.o: ../../winix/core/winix_const.h ../../winix/functions/functions.h
|
||||
dir.o: ../../winix/functions/functionbase.h ../../winix/core/request.h
|
||||
dir.o: ../../winix/core/synchro.h ../../winix/functions/functionparser.h
|
||||
dir.o: ../../winix/functions/account.h ../../winix/functions/adduser.h
|
||||
dir.o: ../../winix/functions/cat.h ../../winix/functions/chmod.h
|
||||
dir.o: ../../winix/functions/privchanger.h ../../winix/functions/chown.h
|
||||
dir.o: ../../winix/functions/ckeditor.h ../../winix/functions/cp.h
|
||||
dir.o: ../../winix/functions/default.h ../../winix/functions/download.h
|
||||
dir.o: ../../winix/functions/emacs.h ../../winix/functions/env.h
|
||||
dir.o: ../../winix/functions/imgcrop.h ../../winix/functions/last.h
|
||||
dir.o: ../../winix/functions/login.h ../../winix/functions/logout.h
|
||||
dir.o: ../../winix/functions/ln.h ../../winix/functions/ls.h
|
||||
dir.o: ../../winix/functions/man.h ../../winix/functions/meta.h
|
||||
dir.o: ../../winix/functions/mkdir.h ../../winix/functions/mv.h
|
||||
dir.o: ../../winix/functions/nicedit.h ../../winix/functions/node.h
|
||||
dir.o: ../../winix/functions/passwd.h ../../winix/functions/priv.h
|
||||
dir.o: ../../winix/functions/pw.h ../../winix/functions/reload.h
|
||||
dir.o: ../../winix/functions/rm.h ../../winix/functions/rmuser.h
|
||||
dir.o: ../../winix/functions/sort.h ../../winix/functions/specialdefault.h
|
||||
dir.o: ../../winix/functions/stat.h ../../winix/functions/subject.h
|
||||
dir.o: ../../winix/functions/template.h ../../winix/functions/tinymce.h
|
||||
dir.o: ../../winix/functions/uname.h ../../winix/functions/upload.h
|
||||
dir.o: ../../winix/functions/uptime.h ../../winix/functions/who.h
|
||||
dir.o: ../../winix/functions/vim.h miscspace.h
|
||||
doc.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
doc.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
doc.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
|
@ -225,7 +226,7 @@ doc.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
doc.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
doc.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
doc.o: ../../winix/core/htmlfilter.h ../../winix/core/request.h
|
||||
doc.o: ../../winix/core/misc.h
|
||||
doc.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
env.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
env.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
env.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
|
@ -271,29 +272,30 @@ env.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
env.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
env.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
env.o: ../../winix/core/htmlfilter.h ../../winix/core/misc.h
|
||||
env.o: ../../winix/functions/functions.h ../../winix/functions/functionbase.h
|
||||
env.o: ../../winix/core/request.h ../../winix/core/synchro.h
|
||||
env.o: ../../winix/functions/functionparser.h ../../winix/functions/account.h
|
||||
env.o: ../../winix/functions/adduser.h ../../winix/functions/cat.h
|
||||
env.o: ../../winix/functions/chmod.h ../../winix/functions/privchanger.h
|
||||
env.o: ../../winix/functions/chown.h ../../winix/functions/ckeditor.h
|
||||
env.o: ../../winix/functions/cp.h ../../winix/functions/default.h
|
||||
env.o: ../../winix/functions/download.h ../../winix/functions/emacs.h
|
||||
env.o: ../../winix/functions/env.h ../../winix/functions/imgcrop.h
|
||||
env.o: ../../winix/functions/last.h ../../winix/functions/login.h
|
||||
env.o: ../../winix/functions/logout.h ../../winix/functions/ln.h
|
||||
env.o: ../../winix/functions/ls.h ../../winix/functions/man.h
|
||||
env.o: ../../winix/functions/meta.h ../../winix/functions/mkdir.h
|
||||
env.o: ../../winix/functions/mv.h ../../winix/functions/nicedit.h
|
||||
env.o: ../../winix/functions/node.h ../../winix/functions/passwd.h
|
||||
env.o: ../../winix/functions/priv.h ../../winix/functions/pw.h
|
||||
env.o: ../../winix/functions/reload.h ../../winix/functions/rm.h
|
||||
env.o: ../../winix/functions/rmuser.h ../../winix/functions/sort.h
|
||||
env.o: ../../winix/functions/specialdefault.h ../../winix/functions/stat.h
|
||||
env.o: ../../winix/functions/subject.h ../../winix/functions/template.h
|
||||
env.o: ../../winix/functions/tinymce.h ../../winix/functions/uname.h
|
||||
env.o: ../../winix/functions/upload.h ../../winix/functions/uptime.h
|
||||
env.o: ../../winix/functions/who.h ../../winix/functions/vim.h
|
||||
env.o: ../../winix/core/winix_const.h ../../winix/functions/functions.h
|
||||
env.o: ../../winix/functions/functionbase.h ../../winix/core/request.h
|
||||
env.o: ../../winix/core/synchro.h ../../winix/functions/functionparser.h
|
||||
env.o: ../../winix/functions/account.h ../../winix/functions/adduser.h
|
||||
env.o: ../../winix/functions/cat.h ../../winix/functions/chmod.h
|
||||
env.o: ../../winix/functions/privchanger.h ../../winix/functions/chown.h
|
||||
env.o: ../../winix/functions/ckeditor.h ../../winix/functions/cp.h
|
||||
env.o: ../../winix/functions/default.h ../../winix/functions/download.h
|
||||
env.o: ../../winix/functions/emacs.h ../../winix/functions/env.h
|
||||
env.o: ../../winix/functions/imgcrop.h ../../winix/functions/last.h
|
||||
env.o: ../../winix/functions/login.h ../../winix/functions/logout.h
|
||||
env.o: ../../winix/functions/ln.h ../../winix/functions/ls.h
|
||||
env.o: ../../winix/functions/man.h ../../winix/functions/meta.h
|
||||
env.o: ../../winix/functions/mkdir.h ../../winix/functions/mv.h
|
||||
env.o: ../../winix/functions/nicedit.h ../../winix/functions/node.h
|
||||
env.o: ../../winix/functions/passwd.h ../../winix/functions/priv.h
|
||||
env.o: ../../winix/functions/pw.h ../../winix/functions/reload.h
|
||||
env.o: ../../winix/functions/rm.h ../../winix/functions/rmuser.h
|
||||
env.o: ../../winix/functions/sort.h ../../winix/functions/specialdefault.h
|
||||
env.o: ../../winix/functions/stat.h ../../winix/functions/subject.h
|
||||
env.o: ../../winix/functions/template.h ../../winix/functions/tinymce.h
|
||||
env.o: ../../winix/functions/uname.h ../../winix/functions/upload.h
|
||||
env.o: ../../winix/functions/uptime.h ../../winix/functions/who.h
|
||||
env.o: ../../winix/functions/vim.h
|
||||
filters.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
filters.o: ../../ezc/src/pattern.h ../../ezc/src/item.h
|
||||
filters.o: ../../ezc/src/funinfo.h ../../ezc/src/functions.h
|
||||
|
@ -343,6 +345,7 @@ filters.o: ../../winix/core/sessionmanager.h
|
|||
filters.o: ../../winix/core/sessioncontainer.h
|
||||
filters.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
filters.o: ../../winix/core/htmlfilter.h ../../winix/core/misc.h
|
||||
filters.o: ../../winix/core/winix_const.h
|
||||
htmltextstream.o: htmltextstream.h ../../winix/core/textstream.h misc.h
|
||||
htmltextstream.o: localefilter.h locale.h ../../pikotools/space/spaceparser.h
|
||||
htmltextstream.o: ../../pikotools/space/space.h
|
||||
|
@ -423,7 +426,7 @@ insert.o: ../../winix/core/sessionmanager.h
|
|||
insert.o: ../../winix/core/sessioncontainer.h
|
||||
insert.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
insert.o: ../../winix/core/htmlfilter.h ../../winix/core/request.h
|
||||
insert.o: ../../winix/core/misc.h
|
||||
insert.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
ipban.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
ipban.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
ipban.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
|
@ -471,7 +474,8 @@ ipban.o: ../../winix/core/sessionmanager.h
|
|||
ipban.o: ../../winix/core/sessioncontainer.h
|
||||
ipban.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
ipban.o: ../../winix/core/htmlfilter.h ../../winix/core/request.h
|
||||
ipban.o: ../../winix/core/misc.h ../../winix/functions/functions.h
|
||||
ipban.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
ipban.o: ../../winix/functions/functions.h
|
||||
ipban.o: ../../winix/functions/functionbase.h ../../winix/core/synchro.h
|
||||
ipban.o: ../../winix/functions/functionparser.h
|
||||
ipban.o: ../../winix/functions/account.h ../../winix/functions/adduser.h
|
||||
|
@ -540,7 +544,8 @@ item.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
item.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
item.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
item.o: ../../winix/core/htmlfilter.h ../../winix/core/request.h
|
||||
item.o: ../../winix/core/misc.h ../../winix/core/bbcodeparser.h miscspace.h
|
||||
item.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
item.o: ../../winix/core/bbcodeparser.h miscspace.h
|
||||
last.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
last.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
last.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
|
@ -586,7 +591,7 @@ last.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
last.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
last.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
last.o: ../../winix/core/htmlfilter.h ../core/lastcontainer.h
|
||||
last.o: ../core/request.h ../core/misc.h
|
||||
last.o: ../core/request.h ../core/misc.h ../../winix/core/winix_const.h
|
||||
locale.o: locale.h ../../pikotools/space/spaceparser.h
|
||||
locale.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
|
||||
locale.o: ../../pikotools/textstream/textstream.h
|
||||
|
@ -600,6 +605,7 @@ locale.o: ../../winix/core/slog.h ../../winix/core/cur.h
|
|||
locale.o: ../../winix/templates/locale.h ../../winix/core/misc.h
|
||||
locale.o: ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
locale.o: ../../winix/core/requesttypes.h ../../pikotools/utf8/utf8.h
|
||||
locale.o: ../../winix/core/winix_const.h
|
||||
localefilter.o: localefilter.h locale.h ../../pikotools/space/spaceparser.h
|
||||
localefilter.o: ../../pikotools/space/space.h
|
||||
localefilter.o: ../../pikotools/textstream/types.h
|
||||
|
@ -614,6 +620,7 @@ localefilter.o: ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
|||
localefilter.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
localefilter.o: ../../pikotools/utf8/utf8.h ../core/misc.h
|
||||
localefilter.o: ../../winix/core/requesttypes.h
|
||||
localefilter.o: ../../winix/core/winix_const.h
|
||||
login.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
login.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
login.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
|
@ -774,29 +781,30 @@ man.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
man.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
man.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
man.o: ../../winix/core/htmlfilter.h ../../winix/core/request.h
|
||||
man.o: ../../winix/core/misc.h ../../winix/functions/functions.h
|
||||
man.o: ../../winix/functions/functionbase.h ../../winix/core/synchro.h
|
||||
man.o: ../../winix/functions/functionparser.h ../../winix/functions/account.h
|
||||
man.o: ../../winix/functions/adduser.h ../../winix/functions/cat.h
|
||||
man.o: ../../winix/functions/chmod.h ../../winix/functions/privchanger.h
|
||||
man.o: ../../winix/functions/chown.h ../../winix/functions/ckeditor.h
|
||||
man.o: ../../winix/functions/cp.h ../../winix/functions/default.h
|
||||
man.o: ../../winix/functions/download.h ../../winix/functions/emacs.h
|
||||
man.o: ../../winix/functions/env.h ../../winix/functions/imgcrop.h
|
||||
man.o: ../../winix/functions/last.h ../../winix/functions/login.h
|
||||
man.o: ../../winix/functions/logout.h ../../winix/functions/ln.h
|
||||
man.o: ../../winix/functions/ls.h ../../winix/functions/man.h
|
||||
man.o: ../../winix/functions/meta.h ../../winix/functions/mkdir.h
|
||||
man.o: ../../winix/functions/mv.h ../../winix/functions/nicedit.h
|
||||
man.o: ../../winix/functions/node.h ../../winix/functions/passwd.h
|
||||
man.o: ../../winix/functions/priv.h ../../winix/functions/pw.h
|
||||
man.o: ../../winix/functions/reload.h ../../winix/functions/rm.h
|
||||
man.o: ../../winix/functions/rmuser.h ../../winix/functions/sort.h
|
||||
man.o: ../../winix/functions/specialdefault.h ../../winix/functions/stat.h
|
||||
man.o: ../../winix/functions/subject.h ../../winix/functions/template.h
|
||||
man.o: ../../winix/functions/tinymce.h ../../winix/functions/uname.h
|
||||
man.o: ../../winix/functions/upload.h ../../winix/functions/uptime.h
|
||||
man.o: ../../winix/functions/who.h ../../winix/functions/vim.h
|
||||
man.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
man.o: ../../winix/functions/functions.h ../../winix/functions/functionbase.h
|
||||
man.o: ../../winix/core/synchro.h ../../winix/functions/functionparser.h
|
||||
man.o: ../../winix/functions/account.h ../../winix/functions/adduser.h
|
||||
man.o: ../../winix/functions/cat.h ../../winix/functions/chmod.h
|
||||
man.o: ../../winix/functions/privchanger.h ../../winix/functions/chown.h
|
||||
man.o: ../../winix/functions/ckeditor.h ../../winix/functions/cp.h
|
||||
man.o: ../../winix/functions/default.h ../../winix/functions/download.h
|
||||
man.o: ../../winix/functions/emacs.h ../../winix/functions/env.h
|
||||
man.o: ../../winix/functions/imgcrop.h ../../winix/functions/last.h
|
||||
man.o: ../../winix/functions/login.h ../../winix/functions/logout.h
|
||||
man.o: ../../winix/functions/ln.h ../../winix/functions/ls.h
|
||||
man.o: ../../winix/functions/man.h ../../winix/functions/meta.h
|
||||
man.o: ../../winix/functions/mkdir.h ../../winix/functions/mv.h
|
||||
man.o: ../../winix/functions/nicedit.h ../../winix/functions/node.h
|
||||
man.o: ../../winix/functions/passwd.h ../../winix/functions/priv.h
|
||||
man.o: ../../winix/functions/pw.h ../../winix/functions/reload.h
|
||||
man.o: ../../winix/functions/rm.h ../../winix/functions/rmuser.h
|
||||
man.o: ../../winix/functions/sort.h ../../winix/functions/specialdefault.h
|
||||
man.o: ../../winix/functions/stat.h ../../winix/functions/subject.h
|
||||
man.o: ../../winix/functions/template.h ../../winix/functions/tinymce.h
|
||||
man.o: ../../winix/functions/uname.h ../../winix/functions/upload.h
|
||||
man.o: ../../winix/functions/uptime.h ../../winix/functions/who.h
|
||||
man.o: ../../winix/functions/vim.h
|
||||
misc.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
misc.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
misc.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
|
@ -842,7 +850,7 @@ misc.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
misc.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
misc.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
misc.o: ../../winix/core/htmlfilter.h ../../winix/core/misc.h
|
||||
misc.o: ../../winix/core/request.h
|
||||
misc.o: ../../winix/core/winix_const.h ../../winix/core/request.h
|
||||
miscspace.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
miscspace.o: ../../ezc/src/pattern.h ../../ezc/src/item.h
|
||||
miscspace.o: ../../ezc/src/funinfo.h ../../ezc/src/functions.h
|
||||
|
@ -939,7 +947,7 @@ mount.o: ../../winix/core/sessionmanager.h
|
|||
mount.o: ../../winix/core/sessioncontainer.h
|
||||
mount.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
mount.o: ../../winix/core/htmlfilter.h ../../winix/core/misc.h
|
||||
mount.o: ../../winix/core/mounts.h
|
||||
mount.o: ../../winix/core/winix_const.h ../../winix/core/mounts.h
|
||||
passwd.o: ../../winix/core/request.h templates.h ../../ezc/src/ezc.h
|
||||
passwd.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
passwd.o: ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
|
@ -1069,7 +1077,8 @@ priv.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
priv.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
priv.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
priv.o: ../../winix/core/htmlfilter.h ../../winix/core/request.h
|
||||
priv.o: ../../winix/core/misc.h ../../winix/functions/functions.h
|
||||
priv.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
priv.o: ../../winix/functions/functions.h
|
||||
priv.o: ../../winix/functions/functionbase.h ../../winix/core/synchro.h
|
||||
priv.o: ../../winix/functions/functionparser.h
|
||||
priv.o: ../../winix/functions/account.h ../../winix/functions/adduser.h
|
||||
|
@ -1231,7 +1240,7 @@ stat.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
stat.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
stat.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
stat.o: ../../winix/core/htmlfilter.h ../../winix/core/request.h
|
||||
stat.o: ../../winix/core/misc.h
|
||||
stat.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
sys.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
sys.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
sys.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
|
@ -1351,6 +1360,7 @@ template.o: ../../winix/core/sessionmanager.h
|
|||
template.o: ../../winix/core/sessioncontainer.h
|
||||
template.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
template.o: ../../winix/core/htmlfilter.h ../../winix/core/misc.h
|
||||
template.o: ../../winix/core/winix_const.h
|
||||
templates.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
templates.o: ../../ezc/src/pattern.h ../../ezc/src/item.h
|
||||
templates.o: ../../ezc/src/funinfo.h ../../ezc/src/functions.h
|
||||
|
@ -1400,8 +1410,8 @@ templates.o: ../../winix/core/sessionmanager.h
|
|||
templates.o: ../../winix/core/sessioncontainer.h
|
||||
templates.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
templates.o: ../../winix/core/htmlfilter.h ../../winix/core/misc.h
|
||||
templates.o: ../../winix/core/plugin.h ../../winix/core/pluginmsg.h
|
||||
templates.o: ../../winix/core/sessionmanager.h
|
||||
templates.o: ../../winix/core/winix_const.h ../../winix/core/plugin.h
|
||||
templates.o: ../../winix/core/pluginmsg.h ../../winix/core/sessionmanager.h
|
||||
templates.o: ../../winix/functions/functions.h
|
||||
templates.o: ../../winix/functions/functionbase.h ../../winix/core/request.h
|
||||
templates.o: ../../winix/core/synchro.h
|
||||
|
@ -1584,7 +1594,7 @@ user.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
user.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
user.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
user.o: ../../winix/core/htmlfilter.h ../../winix/core/request.h
|
||||
user.o: ../../winix/core/misc.h
|
||||
user.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
who.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
who.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
who.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
|
@ -1630,7 +1640,7 @@ who.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
|
|||
who.o: ../../winix/core/sessionmanager.h ../../winix/core/sessioncontainer.h
|
||||
who.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
|
||||
who.o: ../../winix/core/htmlfilter.h ../../winix/core/request.h
|
||||
who.o: ../../winix/core/misc.h
|
||||
who.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
winix.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
winix.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
winix.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
|
@ -1703,4 +1713,4 @@ winix.o: ../../winix/functions/template.h ../../winix/functions/tinymce.h
|
|||
winix.o: ../../winix/functions/uname.h ../../winix/functions/upload.h
|
||||
winix.o: ../../winix/functions/uptime.h ../../winix/functions/who.h
|
||||
winix.o: ../../winix/functions/vim.h ../../winix/templates/templates.h
|
||||
winix.o: ../../winix/core/misc.h
|
||||
winix.o: ../../winix/core/misc.h ../../winix/core/winix_const.h
|
||||
|
|
|
@ -77,7 +77,7 @@ return *this;
|
|||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const char * str, size_t len)
|
||||
{
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
TextStream<std::wstring>::Write(str, len);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -85,13 +85,17 @@ return *this;
|
|||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const std::string * str)
|
||||
{
|
||||
return PutText(str->c_str());
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const std::string & str)
|
||||
{
|
||||
return PutText(str.c_str());
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
@ -106,13 +110,17 @@ return *this;
|
|||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const std::wstring * str)
|
||||
{
|
||||
return PutText(str->c_str());
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const std::wstring & str)
|
||||
{
|
||||
return PutText(str.c_str());
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
@ -294,8 +302,12 @@ return *this;
|
|||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const char * str)
|
||||
{
|
||||
for( ; *str ; ++str )
|
||||
ETextPutChar(*str);
|
||||
PT::UTF8ToWide(str, tmp_string);
|
||||
|
||||
for(size_t i=0 ; i<tmp_string.size() ; ++i)
|
||||
ETextPutChar(tmp_string[i]);
|
||||
|
||||
tmp_string.clear();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -304,8 +316,12 @@ return *this;
|
|||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const char * str, size_t len)
|
||||
{
|
||||
for(size_t i=0 ; i<len ; ++i)
|
||||
ETextPutChar(str[i]);
|
||||
PT::UTF8ToWide(str, len, tmp_string);
|
||||
|
||||
for(size_t i=0 ; i<tmp_string.size() ; ++i)
|
||||
ETextPutChar(tmp_string[i]);
|
||||
|
||||
tmp_string.clear();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -313,13 +329,20 @@ return *this;
|
|||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const std::string * str)
|
||||
{
|
||||
return EPutText(str->c_str(), str->size());
|
||||
return EPutText(*str);
|
||||
}
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const std::string & str)
|
||||
{
|
||||
return EPutText(str.c_str(), str.size());
|
||||
PT::UTF8ToWide(str, tmp_string);
|
||||
|
||||
for(size_t i=0 ; i<tmp_string.size() ; ++i)
|
||||
ETextPutChar(tmp_string[i]);
|
||||
|
||||
tmp_string.clear();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -193,6 +193,7 @@ public:
|
|||
private:
|
||||
|
||||
TextStream<std::wstring> tmp_stream;
|
||||
std::wstring tmp_string;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ Locale::Locale()
|
|||
{
|
||||
default_lang = 0;
|
||||
current_lang = 0;
|
||||
input_as_utf8 = false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -114,7 +113,6 @@ bool read = false;
|
|||
file_name += file;
|
||||
|
||||
loc_parser.SplitSingle(true);
|
||||
loc_parser.UTF8(input_as_utf8);
|
||||
loc_parser.SetSpace(temp_space);
|
||||
|
||||
PT::SpaceParser::Status status = loc_parser.Parse(file_name);
|
||||
|
@ -189,7 +187,6 @@ bool read = false;
|
|||
file_name += "substitute";
|
||||
|
||||
loc_parser.SplitSingle(true);
|
||||
loc_parser.UTF8(input_as_utf8);
|
||||
loc_parser.SetSpace(temp_space);
|
||||
|
||||
if( loc_parser.Parse(file_name) == PT::SpaceParser::ok )
|
||||
|
@ -663,11 +660,6 @@ return empty_list;
|
|||
|
||||
|
||||
|
||||
void Locale::UTF8(bool utf)
|
||||
{
|
||||
input_as_utf8 = utf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -150,10 +150,6 @@ public:
|
|||
bool try_default_too = true) const;
|
||||
|
||||
|
||||
// it sets whether we should parse locale files as utf-8 files
|
||||
// default: false
|
||||
void UTF8(bool utf);
|
||||
|
||||
// url substitution characters
|
||||
wchar_t UrlSubst(wchar_t c);
|
||||
void UrlSubst(std::wstring & str);
|
||||
|
@ -230,7 +226,6 @@ private:
|
|||
const std::wstring empty; // used when returning a non existing key from loc_tab (or in LangToFileName)
|
||||
const std::vector<std::wstring> empty_list; // the same as above
|
||||
std::string adir1, adir2;
|
||||
bool input_as_utf8;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ namespace Winix
|
|||
|
||||
Patterns::Patterns()
|
||||
{
|
||||
utf8 = false;
|
||||
del_white_items = false;
|
||||
ezc_fun = 0;
|
||||
locale = 0;
|
||||
|
@ -51,11 +50,6 @@ Patterns::Patterns()
|
|||
|
||||
|
||||
|
||||
void Patterns::SetUTF8(bool _utf8)
|
||||
{
|
||||
utf8 = _utf8;
|
||||
}
|
||||
|
||||
|
||||
void Patterns::SetDeleteWhiteItems(bool del_white)
|
||||
{
|
||||
|
@ -128,7 +122,6 @@ void Patterns::ReadPatterns(Template & templ)
|
|||
|
||||
for(size_t i=0 ; i<len ; ++i)
|
||||
{
|
||||
templ.patterns[i].UTF8(utf8);
|
||||
templ.patterns[i].DeleteWhiteTextItems(del_white_items);
|
||||
templ.patterns[i].Directory(templates_dir, templates_dir_def);
|
||||
templ.patterns[i].ParseFile(templ.file_name);
|
||||
|
|
|
@ -50,7 +50,6 @@ public:
|
|||
|
||||
Patterns();
|
||||
|
||||
void SetUTF8(bool _utf8);
|
||||
void SetDeleteWhiteItems(bool del_white);
|
||||
void SetDirectories(const std::wstring & tmpl_dir, const std::wstring & tmpl_dir_def);
|
||||
|
||||
|
@ -123,7 +122,6 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
bool utf8;
|
||||
bool del_white_items;
|
||||
std::wstring templates_dir, templates_dir_def;
|
||||
Locale * locale;
|
||||
|
|
|
@ -697,7 +697,6 @@ void Templates::ReadLocale()
|
|||
{
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
locale.UTF8(config->utf8);
|
||||
locale.SetLocaleFiles(config->locale_files);
|
||||
locale.SetLocaleMaxId(config->locale_max_id);
|
||||
locale.SetDefLang(config->locale_default_id);
|
||||
|
@ -875,7 +874,6 @@ void Templates::Init()
|
|||
{
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
patterns.SetUTF8(config->utf8);
|
||||
patterns.SetDirectories(config->templates_dir, config->templates_dir_default);
|
||||
|
||||
pattern_cacher.SetWhenDelete(config->pattern_cacher_when_delete, config->pattern_cacher_how_many_delete);
|
||||
|
|
Loading…
Reference in New Issue