save
[protos/libecoli.git] / lib / ecoli_node_re.c
index 63e2d3e..7444aa7 100644 (file)
@@ -40,6 +40,8 @@
 #include <ecoli_completed.h>
 #include <ecoli_node_re.h>
 
+EC_LOG_TYPE_REGISTER(node_re);
+
 struct ec_node_re {
        struct ec_node gen;
        char *re_str;
@@ -69,6 +71,12 @@ ec_node_re_parse(const struct ec_node *gen_node,
        return 1;
 }
 
+static size_t ec_node_re_get_max_parse_len(const struct ec_node *gen_node)
+{
+       (void)gen_node;
+       return 1;
+}
+
 static void ec_node_re_free_priv(struct ec_node *gen_node)
 {
        struct ec_node_re *node = (struct ec_node_re *)gen_node;
@@ -81,6 +89,7 @@ static struct ec_node_type ec_node_re_type = {
        .name = "re",
        .parse = ec_node_re_parse,
        .complete = ec_node_default_complete,
+       .get_max_parse_len = ec_node_re_get_max_parse_len,
        .size = sizeof(struct ec_node_re),
        .free_priv = ec_node_re_free_priv,
 };
@@ -131,6 +140,7 @@ fail:
        return NULL;
 }
 
+/* LCOV_EXCL_START */
 static int ec_node_re_testcase(void)
 {
        struct ec_node *node;
@@ -138,7 +148,7 @@ static int ec_node_re_testcase(void)
 
        node = ec_node_re(NULL, "fo+|bar");
        if (node == NULL) {
-               ec_log(EC_LOG_ERR, "cannot create node\n");
+               EC_LOG(EC_LOG_ERR, "cannot create node\n");
                return -1;
        }
        ret |= EC_TEST_CHECK_PARSE(node, 1, "foo");
@@ -151,6 +161,7 @@ static int ec_node_re_testcase(void)
 
        return ret;
 }
+/* LCOV_EXCL_STOP */
 
 static struct ec_test ec_node_re_test = {
        .name = "node_re",