plist.h File Reference
This graph shows which files directly or indirectly include this file:

## Data Structures

struct | MPlist
| Type of property list objects. More...

## Macros

#define | MPLIST_KEY(plist) ((plist)->key)
#define | MPLIST_VAL(plist) ((plist)->val.pointer)
#define | MPLIST_FUNC(plist) ((plist)->val.func)
#define | MPLIST_NEXT(plist) ((plist)->next)
#define | MPLIST_TAIL_P(plist) ((plist)->key == Mnil)
#define | MPLIST_SYMBOL_P(plist) (MPLIST_KEY (plist) == Msymbol)
#define | MPLIST_STRING_P(plist) (MPLIST_KEY (plist) == Mstring)
#define | MPLIST_MTEXT_P(plist) (MPLIST_KEY (plist) == Mtext)
#define | MPLIST_INTEGER_P(plist) (MPLIST_KEY (plist) == Minteger)
#define | MPLIST_PLIST_P(plist) (MPLIST_KEY (plist) == Mplist)
#define | MPLIST_NESTED_P(plist) ((plist)->control.flag & 1)
#define | MPLIST_SET_NESTED_P(plist) ((plist)->control.flag |= 1)
#define | MPLIST_VAL_FUNC_P(plist) ((plist)->control.flag & 2)
#define | MPLIST_SET_VAL_FUNC_P(plist) ((plist)->control.flag |= 2)
#define | MPLIST_SYMBOL(plist) ((MSymbol) MPLIST_VAL (plist))
#define | MPLIST_STRING(plist) ((char *) MPLIST_VAL (plist))
#define | MPLIST_MTEXT(plist) ((MText *) MPLIST_VAL (plist))
#define | MPLIST_INTEGER(plist) ((int) MPLIST_VAL (plist))
#define | MPLIST_PLIST(plist) ((MPlist *) MPLIST_VAL (plist))
#define | MPLIST_FIND(plist, key)
#define | MPLIST_DO(elt, plist) for ((elt) = (plist); ! MPLIST_TAIL_P (elt); (elt) = MPLIST_NEXT (elt))
#define | MPLIST_LENGTH(plist)
#define | MPLIST_ADD_PLIST(PLIST, KEY, VAL) MPLIST_SET_NESTED_P (mplist_add ((PLIST), (KEY), (VAL)))
#define | MPLIST_PUSH_PLIST(PLIST, KEY, VAL) MPLIST_SET_NESTED_P (mplist_push ((PLIST), (KEY), (VAL)))
#define | MPLIST_PUT_PLIST(PLIST, KEY, VAL) MPLIST_SET_NESTED_P (mplist_put ((PLIST), (KEY), (VAL)))

## Functions

MPlist * | mplist__from_file (FILE *fp, MPlist *keys)
MPlist * | mplist__from_plist (MPlist *plist)
MPlist * | mplist__from_alist (MPlist *plist)
MPlist * | mplist__from_string (unsigned char *str, int n)
int | mplist__serialize (MText *mt, MPlist *plist, int pretty)
MPlist * | mplist__conc (MPlist *plist, MPlist *tail)
void | mplist__pop_unref (MPlist *plist)
MPlist * | mplist__assq (MPlist *plist, MSymbol key)

## Variables

unsigned char | hex_mnemonic [256]
unsigned char | escape_mnemonic [256]

## Macro Definition Documentation

## MPLIST_KEY

#define MPLIST_KEY | ( |  | plist | ) | ((plist)->key)

## MPLIST_VAL

#define MPLIST_VAL | ( |  | plist | ) | ((plist)->val.pointer)

## MPLIST_FUNC

#define MPLIST_FUNC | ( |  | plist | ) | ((plist)->val.func)

## MPLIST_NEXT

#define MPLIST_NEXT | ( |  | plist | ) | ((plist)->next)

## MPLIST_TAIL_P

#define MPLIST_TAIL_P | ( |  | plist | ) | ((plist)->key == Mnil)

## MPLIST_SYMBOL_P

#define MPLIST_SYMBOL_P | ( |  | plist | ) | (MPLIST_KEY (plist) == Msymbol)

## MPLIST_STRING_P

#define MPLIST_STRING_P | ( |  | plist | ) | (MPLIST_KEY (plist) == Mstring)

## MPLIST_MTEXT_P

#define MPLIST_MTEXT_P | ( |  | plist | ) | (MPLIST_KEY (plist) == Mtext)

## MPLIST_INTEGER_P

#define MPLIST_INTEGER_P | ( |  | plist | ) | (MPLIST_KEY (plist) == Minteger)

## MPLIST_PLIST_P

#define MPLIST_PLIST_P | ( |  | plist | ) | (MPLIST_KEY (plist) == Mplist)

## MPLIST_NESTED_P

#define MPLIST_NESTED_P | ( |  | plist | ) | ((plist)->control.flag & 1)

## MPLIST_SET_NESTED_P

#define MPLIST_SET_NESTED_P | ( |  | plist | ) | ((plist)->control.flag |= 1)

## MPLIST_VAL_FUNC_P

#define MPLIST_VAL_FUNC_P | ( |  | plist | ) | ((plist)->control.flag & 2)

## MPLIST_SET_VAL_FUNC_P

#define MPLIST_SET_VAL_FUNC_P | ( |  | plist | ) | ((plist)->control.flag |= 2)

## MPLIST_SYMBOL

#define MPLIST_SYMBOL | ( |  | plist | ) | ((MSymbol) MPLIST_VAL (plist))

## MPLIST_STRING

#define MPLIST_STRING | ( |  | plist | ) | ((char *) MPLIST_VAL (plist))

## MPLIST_MTEXT

#define MPLIST_MTEXT | ( |  | plist | ) | ((MText *) MPLIST_VAL (plist))

## MPLIST_INTEGER

#define MPLIST_INTEGER | ( |  | plist | ) | ((int) MPLIST_VAL (plist))

## MPLIST_PLIST

#define MPLIST_PLIST | ( |  | plist | ) | ((MPlist *) MPLIST_VAL (plist))

## MPLIST_FIND

#define MPLIST_FIND | ( |  | plist,
|  |  | key
| ) |  |

Value:
do { \
while (! MPLIST_TAIL_P (plist) && MPLIST_KEY (plist) != (key)) \
(plist) = (plist)->next; \
} while (0)
MPLIST_TAIL_P
#define MPLIST_TAIL_P(plist)
Definition: plist.h:17
MPLIST_KEY
#define MPLIST_KEY(plist)
Definition: plist.h:13

## MPLIST_DO

#define MPLIST_DO | ( |  | elt,
|  |  | plist
| ) |  | for ((elt) = (plist); ! MPLIST_TAIL_P (elt); (elt) = MPLIST_NEXT (elt))

## MPLIST_LENGTH

#define MPLIST_LENGTH | ( |  | plist | ) |

Value:
(MPLIST_TAIL_P (plist) ? 0 \
: MPLIST_TAIL_P ((plist)->next) ? 1 \
: MPLIST_TAIL_P ((plist)->next->next) ? 2 \
: mplist_length (plist))
mplist_length
int mplist_length(MPlist *plist)
Return the length of a property list.
Definition: plist.c:1061

## MPLIST_ADD_PLIST

#define MPLIST_ADD_PLIST | ( |  | PLIST,
|  |  | KEY,
|  |  | VAL
| ) |  | MPLIST_SET_NESTED_P (mplist_add ((PLIST), (KEY), (VAL)))

## MPLIST_PUSH_PLIST

#define MPLIST_PUSH_PLIST | ( |  | PLIST,
|  |  | KEY,
|  |  | VAL
| ) |  | MPLIST_SET_NESTED_P (mplist_push ((PLIST), (KEY), (VAL)))

## MPLIST_PUT_PLIST

#define MPLIST_PUT_PLIST | ( |  | PLIST,
|  |  | KEY,
|  |  | VAL
| ) |  | MPLIST_SET_NESTED_P (mplist_put ((PLIST), (KEY), (VAL)))

## Function Documentation

## mplist__from_file()

MPlist* mplist__from_file | ( | FILE * | fp,
|  | MPlist * | keys
| ) |  |

## mplist__from_plist()

MPlist* mplist__from_plist | ( | MPlist * | plist | ) |

## mplist__from_alist()

MPlist* mplist__from_alist | ( | MPlist * | plist | ) |

## mplist__from_string()

MPlist* mplist__from_string | ( | unsigned char * | str,
|  | int | n
| ) |  |

## mplist__serialize()

int mplist__serialize | ( | MText * | mt,
|  | MPlist * | plist,
|  | int | pretty
| ) |  |

## mplist__conc()

MPlist* mplist__conc | ( | MPlist * | plist,
|  | MPlist * | tail
| ) |  |

## mplist__pop_unref()

void mplist__pop_unref | ( | MPlist * | plist | ) |

## mplist__assq()

MPlist* mplist__assq | ( | MPlist * | plist,
|  | MSymbol | key
| ) |  |

## Variable Documentation

## hex_mnemonic

unsigned char hex_mnemonic[256]

extern

## escape_mnemonic

unsigned char escape_mnemonic[256]

extern