added Ezc::SplitUnixDirectory(...)
it's possible to give the path into the working directory in the Pattern::ParseFile(...) without using the Pattern::Directory(...) added [#] (commentary) [include] now can open a file only in a specific directory git-svn-id: svn://ttmath.org/publicrep/cgi/ezc/trunk@9 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
1 parent
e42117714a
commit
69bd57f428
3 files changed
+99
-25
No files matched your search
@@ -35,6 +35,12 @@
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* version 0.9.0
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef headerfileezc
|
||||
#define headerfileezc
|
||||
|
||||
@@ -51,12 +57,14 @@ namespace Ezc
|
||||
{
|
||||
|
||||
std::string CreateMsg(const char * type, const char * arg = 0);
|
||||
void SplitUnixDirectory(const char * name, std::string & dir, std::string & file);
|
||||
void SplitUnixDirectory(const std::string & name, std::string & dir, std::string & file);
|
||||
|
||||
|
||||
class Pattern
|
||||
{
|
||||
public:
|
||||
void ParseFile(std::string file_name);
|
||||
void ParseFile(const std::string & file_name);
|
||||
void ParseFile(const char * file_name);
|
||||
void Directory(const char * d);
|
||||
void Directory(const std::string & d);
|
||||
@@ -65,8 +73,9 @@ public:
|
||||
{
|
||||
enum ItemType
|
||||
{
|
||||
item_none, item_container, item_text, item_ifany, item_for, item_else,
|
||||
item_end, item_err, item_normal, item_ifindex, item_include, item_is, item_ifone
|
||||
item_none, item_container, item_text, item_ifany, item_for,
|
||||
item_else, item_end, item_err, item_normal, item_ifindex,
|
||||
item_include, item_is, item_ifone, item_comment
|
||||
};
|
||||
|
||||
ItemType type;
|
||||
@@ -112,7 +121,9 @@ private:
|
||||
void ReadDirectiveIs(Item & item);
|
||||
void ReadDirectiveIfindex(Item & item);
|
||||
void ReadDirectiveFor(Item & item);
|
||||
void ReadDirectiveComment(Item & item);
|
||||
void ReadDirectiveInclude(Item & item);
|
||||
|
||||
void CreateTreeReadItemDirective(Item & item);
|
||||
|
||||
void CreateTreeReadItemText(Item & item);
|
||||
@@ -163,7 +174,6 @@ private:
|
||||
UserInfoTable user_info_table;
|
||||
std::string otext;
|
||||
|
||||
|
||||
bool Find(const std::string & key, UserInfo ** user_info);
|
||||
void MakeTextIf_go(Pattern::Item & item, bool result);
|
||||
bool MakeTextIfindexnumber(Pattern::Item & item, UserInfo * user_info, bool & result);
|
||||
|
||||
Reference in new issue
Block a user