- {added_by}: [item_user], [item_date_creation_nice][if-no item_dates_equal],
+ {added_by}: [item_user], [item_date_creation_nice][if not item_dates_equal],
{last_modified}[if item_users_different] {by}: [item_modification_user],[else]:[end]
[item_date_modification_nice][end]
diff --git a/html/item_options.html b/html/item_options.html
index 049bd87..bce4d34 100644
--- a/html/item_options.html
+++ b/html/item_options.html
@@ -1,8 +1,8 @@
-[if-no winix_function_param_is "fullscreen"]
-[if-one dir_can_write item_can_write]
+[if not [winix_function_param_is "fullscreen"]]
+[if dir_can_write item_can_write]
- {added_by}: [item_tab_user], [item_tab_date_creation_nice][if-no item_tab_dates_equal],
- {last_modified}[if-one item_tab_users_different] {by}: [item_tab_modification_user],[else]:[end]
+ {added_by}: [item_tab_user], [item_tab_date_creation_nice][if not item_tab_dates_equal],
+ {last_modified}[if item_tab_users_different] {by}: [item_tab_modification_user],[else]:[end]
[item_tab_date_modification_nice]
[end]
diff --git a/html/slog.html b/html/slog.html
index e03fd2f..b9e5de8 100644
--- a/html/slog.html
+++ b/html/slog.html
@@ -1,4 +1,3 @@
-
[if slog_tab]
diff --git a/html/thread_sort_tab_info.html b/html/thread_sort_tab_info.html
index 2ed34ea..fb13f76 100644
--- a/html/thread_sort_tab_info.html
+++ b/html/thread_sort_tab_info.html
@@ -1,6 +1,6 @@
- {added_by}: [thread_sort_tab_user], [thread_sort_tab_date_creation_nice][if-no thread_sort_tab_dates_equal],
+ {added_by}: [thread_sort_tab_user], [thread_sort_tab_date_creation_nice][if not thread_sort_tab_dates_equal],
{last_modified}[if thread_sort_tab_users_different] {by}: [thread_sort_tab_modification_user],[else]:[end]
[thread_sort_tab_date_modification_nice]
[end]
diff --git a/templates/generic.cpp b/templates/generic.cpp
index c86dd54..b774e1a 100644
--- a/templates/generic.cpp
+++ b/templates/generic.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2014, Tomasz Sowa
+ * Copyright (c) 2014-2015, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -102,6 +102,53 @@ void ezc_one(Info & i)
}
+void ezc_and_not(Info & i)
+{
+ if( !i.params.empty() )
+ {
+ i.res = true;
+
+ for(size_t a=0 ; a < i.params.size() ; ++a)
+ {
+ if( i.params[a].res )
+ {
+ i.res = false;
+ break;
+ }
+ }
+ }
+}
+
+
+void ezc_any_not(Info & i)
+{
+ ezc_and_not(i);
+}
+
+
+
+void ezc_or_not(Info & i)
+{
+ i.res = false;
+
+ for(size_t a=0 ; a < i.params.size() ; ++a)
+ {
+ if( !i.params[a].res )
+ {
+ i.res = true;
+ break;
+ }
+ }
+}
+
+
+void ezc_one_not(Info & i)
+{
+ ezc_or_not(i);
+}
+
+
+
void ezc_not(Info & i)
{
if( !i.params.empty() )
@@ -110,6 +157,7 @@ void ezc_not(Info & i)
+
/*
* compare strings
*/
@@ -132,6 +180,44 @@ void cmp(Info & i)
+void is(Info & i)
+{
+ cmp(i);
+}
+
+
+
+void is_not(Info & i)
+{
+ cmp(i);
+ i.res = !i.res;
+}
+
+
+
+void is_empty(Info & i)
+{
+ i.res = true;
+
+ for(size_t a=0 ; a < i.params.size() ; ++a)
+ {
+ if( !i.params[a].str.empty() )
+ {
+ i.res = false;
+ break;
+ }
+ }
+}
+
+
+
+void is_not_empty(Info & i)
+{
+ is_empty(i);
+ i.res = !i.res;
+}
+
+
// IMPROVE ME !! may we need such a filter too?
diff --git a/templates/templates.cpp b/templates/templates.cpp
index eabc294..ea3fa94 100644
--- a/templates/templates.cpp
+++ b/templates/templates.cpp
@@ -329,19 +329,27 @@ void Templates::CreateFunctions()
/*
generic functions
*/
- ezc_functions.Insert("false", ezc_false);
- ezc_functions.Insert("true", ezc_true);
- ezc_functions.Insert("and", ezc_and);
- ezc_functions.Insert("any", ezc_any);
- ezc_functions.Insert("or", ezc_or);
- ezc_functions.Insert("one", ezc_one);
- ezc_functions.Insert("not", ezc_not);
- ezc_functions.Insert("cmp", cmp);
- ezc_functions.Insert("trim", trim);
- ezc_functions.Insert("to_lower", to_lower);
- ezc_functions.Insert("to_upper", to_upper);
- ezc_functions.Insert("index", index);
- ezc_functions.Insert("str", str);
+ ezc_functions.Insert("false", ezc_false);
+ ezc_functions.Insert("true", ezc_true);
+ ezc_functions.Insert("and", ezc_and);
+ ezc_functions.Insert("any", ezc_any);
+ ezc_functions.Insert("or", ezc_or);
+ ezc_functions.Insert("one", ezc_one);
+ ezc_functions.Insert("and_not", ezc_and_not);
+ ezc_functions.Insert("any_not", ezc_any_not);
+ ezc_functions.Insert("or_not", ezc_or_not);
+ ezc_functions.Insert("one_not", ezc_one_not);
+ ezc_functions.Insert("not", ezc_not);
+ ezc_functions.Insert("cmp", cmp);
+ ezc_functions.Insert("is", is);
+ ezc_functions.Insert("is_not", is_not);
+ ezc_functions.Insert("is_empty", is_empty);
+ ezc_functions.Insert("is_not_empty", is_not_empty);
+ ezc_functions.Insert("trim", trim);
+ ezc_functions.Insert("to_lower", to_lower);
+ ezc_functions.Insert("to_upper", to_upper);
+ ezc_functions.Insert("index", index);
+ ezc_functions.Insert("str", str);
/*
diff --git a/templates/templates.h b/templates/templates.h
index 065fdb1..0533c6f 100644
--- a/templates/templates.h
+++ b/templates/templates.h
@@ -248,8 +248,16 @@ namespace TemplatesFunctions
void ezc_any(Info & i);
void ezc_or(Info & i);
void ezc_one(Info & i);
+ void ezc_and_not(Info & i);
+ void ezc_any_not(Info & i);
+ void ezc_or_not(Info & i);
+ void ezc_one_not(Info & i);
void ezc_not(Info & i);
void cmp(Info & i);
+ void is(Info & i);
+ void is_not(Info & i);
+ void is_empty(Info & i);
+ void is_not_empty(Info & i);
void trim(Info & i);
void to_lower(Info & i);
void to_upper(Info & i);