Expando Node for a Condition. More...
#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "node_condition.h"
#include "definition.h"
#include "format.h"
#include "helpers.h"
#include "node.h"
#include "node_condbool.h"
#include "node_container.h"
#include "node_expando.h"
#include "node_text.h"
#include "parse.h"
#include "render.h"
Go to the source code of this file.
Functions | |
static int | node_condition_render (const struct ExpandoNode *node, const struct ExpandoRenderCallback *erc, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags) |
Render a Conditional Node - Implements ExpandoNode::render() -. | |
struct ExpandoNode * | node_condition_new (struct ExpandoNode *node_cond, struct ExpandoNode *node_true, struct ExpandoNode *node_false, struct ExpandoFormat *fmt) |
Create a new Condition Expando Node. | |
struct ExpandoNode * | node_condition_parse (const char *str, NodeTextTermFlags term_chars, const struct ExpandoDefinition *defs, const char **parsed_until, struct ExpandoParseError *err) |
Parse a conditional Expando. | |
Expando Node for a Condition.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file node_condition.c.
struct ExpandoNode * node_condition_new | ( | struct ExpandoNode * | node_cond, |
struct ExpandoNode * | node_true, | ||
struct ExpandoNode * | node_false, | ||
struct ExpandoFormat * | fmt | ||
) |
Create a new Condition Expando Node.
node_cond | Expando Node that will be tested |
node_true | Node tree for the 'true' case |
node_false | Node tree for the 'false' case |
fmt | Formatting info |
ptr | New Condition Expando Node |
Definition at line 110 of file node_condition.c.
struct ExpandoNode * node_condition_parse | ( | const char * | str, |
NodeTextTermFlags | term_chars, | ||
const struct ExpandoDefinition * | defs, | ||
const char ** | parsed_until, | ||
struct ExpandoParseError * | err | ||
) |
Parse a conditional Expando.
[in] | str | String to parse |
[in] | term_chars | Terminator characters, e.g. NTE_GREATER |
[in] | defs | Expando definitions |
[out] | parsed_until | First character after parsed string |
[out] | err | Buffer for errors |
ptr | Expando Node |
Definition at line 140 of file node_condition.c.