NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h File Reference

Parse Expando string. More...

#include "definition.h"
#include "domain.h"
#include "expando.h"
#include "filter.h"
#include "format.h"
#include "helpers.h"
#include "node.h"
#include "node_condbool.h"
#include "node_conddate.h"
#include "node_condition.h"
#include "node_container.h"
#include "node_expando.h"
#include "node_padding.h"
#include "node_text.h"
#include "parse.h"
#include "render.h"
#include "uid.h"
+ Include dependency graph for lib.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const struct Expandocs_subset_expando (const struct ConfigSubset *sub, const char *name)
 Get an Expando config item by name.
 

Detailed Description

Parse Expando string.

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 lib.h.

Function Documentation

◆ cs_subset_expando()

const struct Expando * cs_subset_expando ( const struct ConfigSubset sub,
const char *  name 
)

Get an Expando config item by name.

Parameters
subConfig Subset
nameName of config item
Return values
ptrExpando
NULLEmpty Expando

Definition at line 357 of file config_type.c.

358{
359 ASSERT(sub && name);
360
361 struct HashElem *he = cs_subset_create_inheritance(sub, name);
362 ASSERT(he);
363
364#ifndef NDEBUG
365 struct HashElem *he_base = cs_get_base(he);
366 ASSERT(DTYPE(he_base->type) == DT_EXPANDO);
367#endif
368
369 intptr_t value = cs_subset_he_native_get(sub, he, NULL);
370 ASSERT(value != INT_MIN);
371
372 return (const struct Expando *) value;
373}
struct HashElem * cs_get_base(struct HashElem *he)
Find the root Config Item.
Definition: set.c:160
#define ASSERT(COND)
Definition: signal2.h:58
Parsed Expando trees.
Definition: expando.h:41
The item stored in a Hash Table.
Definition: hash.h:43
int type
Type of data stored in Hash Table, e.g. DT_STRING.
Definition: hash.h:44
intptr_t cs_subset_he_native_get(const struct ConfigSubset *sub, struct HashElem *he, struct Buffer *err)
Natively get the value of a HashElem config item.
Definition: subset.c:258
struct HashElem * cs_subset_create_inheritance(const struct ConfigSubset *sub, const char *name)
Create a Subset config item (inherited)
Definition: subset.c:208
#define DTYPE(t)
Definition: types.h:50
@ DT_EXPANDO
an expando
Definition: types.h:34