m17n ライブラリ 1.8.4
読み取り中…
検索中…
一致する文字列を見つけられません
データ構造 | マクロ定義 | 関数 | 変数
plist.h ファイル

データ構造

struct  MPlist
 プロパティリスト・オブジェクトの型宣言. [詳解]
 

マクロ定義

#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)))
 

関数

MPlistmplist__from_file (FILE *fp, MPlist *keys)
 
MPlistmplist__from_plist (MPlist *plist)
 
MPlistmplist__from_alist (MPlist *plist)
 
MPlistmplist__from_string (unsigned char *str, int n)
 
int mplist__serialize (MText *mt, MPlist *plist, int pretty)
 
MPlistmplist__conc (MPlist *plist, MPlist *tail)
 
void mplist__pop_unref (MPlist *plist)
 
MPlistmplist__assq (MPlist *plist, MSymbol key)
 

変数

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

マクロ定義詳解

◆ 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 
)
値:
do { \
while (! MPLIST_TAIL_P (plist) && MPLIST_KEY (plist) != (key)) \
(plist) = (plist)->next; \
} while (0)
#define MPLIST_TAIL_P(plist)
Definition: plist.h:17
#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)
値:
(MPLIST_TAIL_P (plist) ? 0 \
: MPLIST_TAIL_P ((plist)->next) ? 1 \
: MPLIST_TAIL_P ((plist)->next->next) ? 2 \
: mplist_length (plist))
int mplist_length(MPlist *plist)
プロパティリストの長さを返す.
Definition: plist.c:1029

◆ 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)))

関数詳解

◆ 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 
)

変数詳解

◆ hex_mnemonic

unsigned char hex_mnemonic[256]
extern

◆ escape_mnemonic

unsigned char escape_mnemonic[256]
extern

m17n-lib Home