NeoMutt  2024-04-25-1-g3de005
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
node_condbool.c File Reference

Expando Node for a Conditional Boolean. More...

#include "config.h"
#include <assert.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "node_condbool.h"
#include "definition.h"
#include "helpers.h"
#include "node.h"
#include "node_expando.h"
#include "parse.h"
#include "render.h"
+ Include dependency graph for node_condbool.c:

Go to the source code of this file.

Functions

struct ExpandoNodenode_condbool_new (const char *start, const char *end, int did, int uid)
 Create a new CondBool ExpandoNode.
 
struct ExpandoNodenode_condbool_parse (const char *s, const char **parsed_until, const struct ExpandoDefinition *defs, ExpandoParserFlags flags, struct ExpandoParseError *error)
 Parse a CondBool format string - Implements ExpandoDefinition::parse() -.
 
int node_condbool_render (const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
 Callback for every bool node - Implements ExpandoNode::render() -.
 

Detailed Description

Expando Node for a Conditional Boolean.

Authors
  • Tóth János
  • Richard Russon

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_condbool.c.

Function Documentation

◆ node_condbool_new()

struct ExpandoNode * node_condbool_new ( const char *  start,
const char *  end,
int  did,
int  uid 
)

Create a new CondBool ExpandoNode.

Parameters
startStart of string to store
endEnd of string to store
didDomain ID
uidUnique ID
Return values
ptrNew CondBool ExpandoNode

Definition at line 50 of file node_condbool.c.

51{
52 struct ExpandoNode *node = node_new();
53
54 node->type = ENT_CONDBOOL;
55 node->start = start;
56 node->end = end;
57
58 node->did = did;
59 node->uid = uid;
61
62 return node;
63}
int node_condbool_render(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Callback for every bool node - Implements ExpandoNode::render() -.
struct ExpandoNode * node_new(void)
Create a new empty ExpandoNode.
Definition: node.c:39
@ ENT_CONDBOOL
True/False boolean condition.
Definition: node.h:42
Basic Expando Node.
Definition: node.h:69
int uid
Unique ID, e.g. ED_EMA_SIZE.
Definition: node.h:73
int(* render)(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Definition: node.h:96
const char * end
End of string data.
Definition: node.h:80
int did
Domain ID, e.g. ED_EMAIL.
Definition: node.h:72
enum ExpandoNodeType type
Type of Node, e.g. ENT_EXPANDO.
Definition: node.h:70
const char * start
Start of string data.
Definition: node.h:79
+ Here is the call graph for this function:
+ Here is the caller graph for this function: