Postfix3.3.1
データ構造 | マクロ定義 | 型定義 | 関数 | 変数
dict.h ファイル
#include <fcntl.h>
#include <setjmp.h>
#include <vstream.h>
#include <argv.h>
#include <vstring.h>
#include <myflock.h>

[ソースコード]

データ構造

struct  DICT_OWNER
 
struct  DICT
 
struct  DICT_UTF8_BACKUP
 

マクロ定義

#define DICT_JMP_BUF   sigjmp_buf
 
#define DICT_OWNER_UNKNOWN   (-1) /* ex: unauthenticated tcp, proxy */
 
#define DICT_OWNER_TRUSTED   (!1) /* ex: root-owned config file */
 
#define DICT_OWNER_UNTRUSTED   (!0) /* ex: non-root config file */
 
#define DICT_OWNER_AGGREGATE_INIT(dst)
 
#define DICT_OWNER_AGGREGATE_UPDATE(dst, src)
 
#define DICT_DEBUG(d)   ((d)->flags & DICT_FLAG_DEBUG ? dict_debug(d) : (d))
 
#define DICT_FLAG_NONE   (0)
 
#define DICT_FLAG_DUP_WARN   (1<<0) /* warn about dups if not supported */
 
#define DICT_FLAG_DUP_IGNORE   (1<<1) /* ignore dups if not supported */
 
#define DICT_FLAG_TRY0NULL   (1<<2) /* do not append 0 to key/value */
 
#define DICT_FLAG_TRY1NULL   (1<<3) /* append 0 to key/value */
 
#define DICT_FLAG_FIXED   (1<<4) /* fixed key map */
 
#define DICT_FLAG_PATTERN   (1<<5) /* keys are patterns */
 
#define DICT_FLAG_LOCK   (1<<6) /* use temp lock before access */
 
#define DICT_FLAG_DUP_REPLACE   (1<<7) /* replace dups if supported */
 
#define DICT_FLAG_SYNC_UPDATE   (1<<8) /* sync updates if supported */
 
#define DICT_FLAG_DEBUG   (1<<9) /* log access */
 
#define DICT_FLAG_NO_REGSUB   (1<<11) /* disallow regexp substitution */
 
#define DICT_FLAG_NO_PROXY   (1<<12) /* disallow proxy mapping */
 
#define DICT_FLAG_NO_UNAUTH   (1<<13) /* disallow unauthenticated data */
 
#define DICT_FLAG_FOLD_FIX   (1<<14) /* case-fold key with fixed-case map */
 
#define DICT_FLAG_FOLD_MUL   (1<<15) /* case-fold key with multi-case map */
 
#define DICT_FLAG_FOLD_ANY   (DICT_FLAG_FOLD_FIX | DICT_FLAG_FOLD_MUL)
 
#define DICT_FLAG_OPEN_LOCK   (1<<16) /* perm lock if not multi-writer safe */
 
#define DICT_FLAG_BULK_UPDATE   (1<<17) /* optimize for bulk updates */
 
#define DICT_FLAG_MULTI_WRITER   (1<<18) /* multi-writer safe map */
 
#define DICT_FLAG_UTF8_REQUEST   (1<<19) /* activate UTF-8 if possible */
 
#define DICT_FLAG_UTF8_ACTIVE   (1<<20) /* UTF-8 proxy layer is present */
 
#define DICT_FLAG_UTF8_MASK   (DICT_FLAG_UTF8_REQUEST)
 
#define DICT_FLAG_PARANOID   (DICT_FLAG_NO_REGSUB | DICT_FLAG_NO_PROXY | DICT_FLAG_NO_UNAUTH)
 
#define DICT_FLAG_IMPL_MASK
 
#define DICT_FLAG_RQST_MASK
 
#define DICT_FLAG_INST_MASK   ~(DICT_FLAG_IMPL_MASK | DICT_FLAG_RQST_MASK)
 
#define DICT_NEED_UTF8_ACTIVATION(enable, flags)   ((enable) && ((flags) & DICT_FLAG_UTF8_MASK))
 
#define DICT_ERR_NONE   0 /* no error */
 
#define DICT_ERR_RETRY   (-1) /* soft error */
 
#define DICT_ERR_CONFIG   (-2) /* configuration error */
 
#define DICT_STAT_FAIL   1 /* any value > 0: notfound, conflict */
 
#define DICT_STAT_SUCCESS   0 /* request satisfied */
 
#define DICT_STAT_ERROR   (-1) /* any value < 0: database error */
 
#define DICT_ERR_VAL_RETURN(dict, err, val)
 
#define DICT_SEQ_FUN_FIRST   0 /* set cursor to first record */
 
#define DICT_SEQ_FUN_NEXT   1 /* set cursor to next record */
 
#define dict_get(dp, key)   ((const char *) (dp)->lookup((dp), (key)))
 
#define dict_put(dp, key, val)   (dp)->update((dp), (key), (val))
 
#define dict_del(dp, key)   (dp)->delete((dp), (key))
 
#define dict_seq(dp, f, key, val)   (dp)->sequence((dp), (f), (key), (val))
 
#define dict_close(dp)   (dp)->close(dp)
 
#define DICT_TYPE_NOFILE   "non-existent"
 
#define DICT_TYPE_NOUTF8   "non-UTF-8"
 
#define dict_setjmp(dict)   sigsetjmp((dict)->jbuf[0], 1)
 
#define dict_longjmp(dict, val)   siglongjmp((dict)->jbuf[0], (val))
 
#define dict_isjmp(dict)   ((dict)->jbuf != 0)
 

型定義

typedef struct DICT_OWNER DICT_OWNER
 
typedef struct DICT DICT
 
typedef void(* DICT_MAPNAMES_EXTEND_FN) (ARGV *)
 
typedef DICT *(* DICT_OPEN_FN) (const char *, int, int)
 
typedef DICT_OPEN_FN(* DICT_OPEN_EXTEND_FN) (const char *)
 
typedef void(* DICT_WALK_ACTION) (const char *, DICT *, void *)
 
typedef struct DICT_UTF8_BACKUP DICT_UTF8_BACKUP
 

関数

DICTdict_alloc (const char *, const char *, ssize_t)
 
void dict_free (DICT *)
 
DICTdict_debug (DICT *)
 
ARGVdict_mapnames (void)
 
DICT_MAPNAMES_EXTEND_FN dict_mapnames_extend (DICT_MAPNAMES_EXTEND_FN)
 
void dict_register (const char *, DICT *)
 
DICTdict_handle (const char *)
 
void dict_unregister (const char *)
 
int dict_update (const char *, const char *, const char *)
 
const char * dict_lookup (const char *, const char *)
 
int dict_delete (const char *, const char *)
 
int dict_sequence (const char *, const int, const char **, const char **)
 
int dict_load_file_xt (const char *, const char *)
 
void dict_load_fp (const char *, VSTREAM *)
 
const char * dict_eval (const char *, const char *, int)
 
int dict_error (const char *)
 
DICTdict_open (const char *, int, int)
 
DICTdict_open3 (const char *, const char *, int, int)
 
void dict_open_register (const char *, DICT_OPEN_FN)
 
DICT_OPEN_EXTEND_FN dict_open_extend (DICT_OPEN_EXTEND_FN)
 
void dict_walk (DICT_WALK_ACTION, void *)
 
int dict_changed (void)
 
const char * dict_changed_name (void)
 
const char * dict_flags_str (int)
 
int dict_flags_mask (const char *)
 
void dict_type_override (DICT *, const char *)
 
DICTdict_utf8_activate (DICT *)
 
void dict_test (int, char **)
 
DICTPRINTFLIKE (5, 6) dict_surrogate(const char *
 
void dict_jmp_alloc (DICT *)
 

変数

int dict_allow_surrogate
 
DICT const char int
 

マクロ定義詳解

#define dict_close (   dp)    (dp)->close(dp)

dict.h240 行目に定義があります。

#define DICT_DEBUG (   d)    ((d)->flags & DICT_FLAG_DEBUG ? dict_debug(d) : (d))

dict.h104 行目に定義があります。

#define dict_del (   dp,
  key 
)    (dp)->delete((dp), (key))

dict.h238 行目に定義があります。

#define DICT_ERR_CONFIG   (-2) /* configuration error */

dict.h179 行目に定義があります。

#define DICT_ERR_NONE   0 /* no error */

dict.h177 行目に定義があります。

#define DICT_ERR_RETRY   (-1) /* soft error */

dict.h178 行目に定義があります。

#define DICT_ERR_VAL_RETURN (   dict,
  err,
  val 
)
値:
do { \
(dict)->error = (err); \
return (val); \
} while (0)

dict.h192 行目に定義があります。

#define DICT_FLAG_BULK_UPDATE   (1<<17) /* optimize for bulk updates */

dict.h128 行目に定義があります。

#define DICT_FLAG_DEBUG   (1<<9) /* log access */

dict.h119 行目に定義があります。

#define DICT_FLAG_DUP_IGNORE   (1<<1) /* ignore dups if not supported */

dict.h111 行目に定義があります。

#define DICT_FLAG_DUP_REPLACE   (1<<7) /* replace dups if supported */

dict.h117 行目に定義があります。

#define DICT_FLAG_DUP_WARN   (1<<0) /* warn about dups if not supported */

dict.h110 行目に定義があります。

#define DICT_FLAG_FIXED   (1<<4) /* fixed key map */

dict.h114 行目に定義があります。

#define DICT_FLAG_FOLD_ANY   (DICT_FLAG_FOLD_FIX | DICT_FLAG_FOLD_MUL)

dict.h126 行目に定義があります。

#define DICT_FLAG_FOLD_FIX   (1<<14) /* case-fold key with fixed-case map */

dict.h124 行目に定義があります。

#define DICT_FLAG_FOLD_MUL   (1<<15) /* case-fold key with multi-case map */

dict.h125 行目に定義があります。

#define DICT_FLAG_IMPL_MASK
値:
#define DICT_FLAG_FIXED
Definition: dict.h:114
#define DICT_FLAG_MULTI_WRITER
Definition: dict.h:129
#define DICT_FLAG_PATTERN
Definition: dict.h:115

dict.h160 行目に定義があります。

#define DICT_FLAG_INST_MASK   ~(DICT_FLAG_IMPL_MASK | DICT_FLAG_RQST_MASK)

dict.h166 行目に定義があります。

#define DICT_FLAG_LOCK   (1<<6) /* use temp lock before access */

dict.h116 行目に定義があります。

#define DICT_FLAG_MULTI_WRITER   (1<<18) /* multi-writer safe map */

dict.h129 行目に定義があります。

#define DICT_FLAG_NO_PROXY   (1<<12) /* disallow proxy mapping */

dict.h122 行目に定義があります。

#define DICT_FLAG_NO_REGSUB   (1<<11) /* disallow regexp substitution */

dict.h121 行目に定義があります。

#define DICT_FLAG_NO_UNAUTH   (1<<13) /* disallow unauthenticated data */

dict.h123 行目に定義があります。

#define DICT_FLAG_NONE   (0)

dict.h109 行目に定義があります。

#define DICT_FLAG_OPEN_LOCK   (1<<16) /* perm lock if not multi-writer safe */

dict.h127 行目に定義があります。

#define DICT_FLAG_PARANOID   (DICT_FLAG_NO_REGSUB | DICT_FLAG_NO_PROXY | DICT_FLAG_NO_UNAUTH)

dict.h158 行目に定義があります。

#define DICT_FLAG_PATTERN   (1<<5) /* keys are patterns */

dict.h115 行目に定義があります。

#define DICT_FLAG_RQST_MASK
値:
#define DICT_FLAG_DUP_IGNORE
Definition: dict.h:111
#define DICT_FLAG_FOLD_ANY
Definition: dict.h:126
#define DICT_FLAG_DUP_REPLACE
Definition: dict.h:117
#define DICT_FLAG_LOCK
Definition: dict.h:116
#define DICT_FLAG_PARANOID
Definition: dict.h:158
#define DICT_FLAG_DUP_WARN
Definition: dict.h:110
#define DICT_FLAG_SYNC_UPDATE
Definition: dict.h:118
#define DICT_FLAG_UTF8_MASK
Definition: dict.h:133

dict.h162 行目に定義があります。

#define DICT_FLAG_SYNC_UPDATE   (1<<8) /* sync updates if supported */

dict.h118 行目に定義があります。

#define DICT_FLAG_TRY0NULL   (1<<2) /* do not append 0 to key/value */

dict.h112 行目に定義があります。

#define DICT_FLAG_TRY1NULL   (1<<3) /* append 0 to key/value */

dict.h113 行目に定義があります。

#define DICT_FLAG_UTF8_ACTIVE   (1<<20) /* UTF-8 proxy layer is present */

dict.h131 行目に定義があります。

#define DICT_FLAG_UTF8_MASK   (DICT_FLAG_UTF8_REQUEST)

dict.h133 行目に定義があります。

#define DICT_FLAG_UTF8_REQUEST   (1<<19) /* activate UTF-8 if possible */

dict.h130 行目に定義があります。

#define dict_get (   dp,
  key 
)    ((const char *) (dp)->lookup((dp), (key)))

dict.h236 行目に定義があります。

#define dict_isjmp (   dict)    ((dict)->jbuf != 0)

dict.h295 行目に定義があります。

#define DICT_JMP_BUF   sigjmp_buf

dict.h23 行目に定義があります。

#define dict_longjmp (   dict,
  val 
)    siglongjmp((dict)->jbuf[0], (val))

dict.h293 行目に定義があります。

#define DICT_NEED_UTF8_ACTIVATION (   enable,
  flags 
)    ((enable) && ((flags) & DICT_FLAG_UTF8_MASK))

dict.h171 行目に定義があります。

#define DICT_OWNER_AGGREGATE_INIT (   dst)
値:
{ \
(dst).status = DICT_OWNER_TRUSTED; \
(dst).uid = 0; \
} while (0)
#define DICT_OWNER_TRUSTED
Definition: dict.h:46

dict.h55 行目に定義があります。

#define DICT_OWNER_AGGREGATE_UPDATE (   dst,
  src 
)
値:
do { \
if ((dst).status == DICT_OWNER_TRUSTED \
|| (src).status == DICT_OWNER_UNKNOWN) { \
(dst) = (src); \
} else if ((dst).status == (src).status \
&& (dst).uid != (src).uid) { \
(dst).status = DICT_OWNER_UNKNOWN; \
(dst).uid = ~0; \
} \
} while (0)
#define DICT_OWNER_TRUSTED
Definition: dict.h:46
#define DICT_OWNER_UNKNOWN
Definition: dict.h:45

dict.h63 行目に定義があります。

#define DICT_OWNER_TRUSTED   (!1) /* ex: root-owned config file */

dict.h46 行目に定義があります。

#define DICT_OWNER_UNKNOWN   (-1) /* ex: unauthenticated tcp, proxy */

dict.h45 行目に定義があります。

#define DICT_OWNER_UNTRUSTED   (!0) /* ex: non-root config file */

dict.h47 行目に定義があります。

#define dict_put (   dp,
  key,
  val 
)    (dp)->update((dp), (key), (val))

dict.h237 行目に定義があります。

#define dict_seq (   dp,
  f,
  key,
  val 
)    (dp)->sequence((dp), (f), (key), (val))

dict.h239 行目に定義があります。

#define DICT_SEQ_FUN_FIRST   0 /* set cursor to first record */

dict.h200 行目に定義があります。

#define DICT_SEQ_FUN_NEXT   1 /* set cursor to next record */

dict.h201 行目に定義があります。

#define dict_setjmp (   dict)    sigsetjmp((dict)->jbuf[0], 1)

dict.h292 行目に定義があります。

#define DICT_STAT_ERROR   (-1) /* any value < 0: database error */

dict.h187 行目に定義があります。

#define DICT_STAT_FAIL   1 /* any value > 0: notfound, conflict */

dict.h185 行目に定義があります。

#define DICT_STAT_SUCCESS   0 /* request satisfied */

dict.h186 行目に定義があります。

#define DICT_TYPE_NOFILE   "non-existent"

dict.h275 行目に定義があります。

#define DICT_TYPE_NOUTF8   "non-UTF-8"

dict.h276 行目に定義があります。

型定義詳解

typedef struct DICT DICT
typedef void(* DICT_MAPNAMES_EXTEND_FN) (ARGV *)

dict.h207 行目に定義があります。

typedef DICT_OPEN_FN(* DICT_OPEN_EXTEND_FN) (const char *)

dict.h230 行目に定義があります。

typedef DICT*(* DICT_OPEN_FN) (const char *, int, int)

dict.h229 行目に定義があります。

typedef struct DICT_OWNER DICT_OWNER
typedef void(* DICT_WALK_ACTION) (const char *, DICT *, void *)

dict.h241 行目に定義があります。

関数詳解

DICT* dict_alloc ( const char *  ,
const char *  ,
ssize_t   
)

dict_alloc.c135 行目に定義があります。

int dict_changed ( void  )

dict.c613 行目に定義があります。

const char* dict_changed_name ( void  )

dict.c583 行目に定義があります。

DICT* dict_debug ( DICT )

dict_debug.c136 行目に定義があります。

int dict_delete ( const char *  ,
const char *   
)

dict.c404 行目に定義があります。

int dict_error ( const char *  )

dict.c431 行目に定義があります。

const char* dict_eval ( const char *  ,
const char *  ,
int   
)

dict.c536 行目に定義があります。

int dict_flags_mask ( const char *  )

dict.c660 行目に定義があります。

const char* dict_flags_str ( int  )

dict.c647 行目に定義があります。

void dict_free ( DICT )

dict_alloc.c163 行目に定義があります。

DICT* dict_handle ( const char *  )

dict.c333 行目に定義があります。

void dict_jmp_alloc ( DICT )

dict_alloc.c181 行目に定義があります。

int dict_load_file_xt ( const char *  ,
const char *   
)

dict.c441 行目に定義があります。

void dict_load_fp ( const char *  ,
VSTREAM  
)

dict.c472 行目に定義があります。

const char* dict_lookup ( const char *  ,
const char *   
)

dict.c382 行目に定義があります。

ARGV* dict_mapnames ( void  )

dict_open.c527 行目に定義があります。

dict_open.c552 行目に定義があります。

DICT* dict_open ( const char *  ,
int  ,
int   
)

dict_open.c421 行目に定義があります。

DICT* dict_open3 ( const char *  ,
const char *  ,
int  ,
int   
)

dict_open.c439 行目に定義があります。

DICT_OPEN_EXTEND_FN dict_open_extend ( DICT_OPEN_EXTEND_FN  )

dict_open.c509 行目に定義があります。

void dict_open_register ( const char *  ,
DICT_OPEN_FN   
)

dict_open.c491 行目に定義があります。

void dict_register ( const char *  ,
DICT  
)

dict.c312 行目に定義があります。

int dict_sequence ( const char *  ,
const int  ,
const char **  ,
const char **   
)

dict.c417 行目に定義があります。

void dict_test ( int  ,
char **   
)

dict_test.c36 行目に定義があります。

void dict_type_override ( DICT ,
const char *   
)

dict_open.c563 行目に定義があります。

void dict_unregister ( const char *  )

dict.c354 行目に定義があります。

int dict_update ( const char *  ,
const char *  ,
const char *   
)

dict.c369 行目に定義があります。

DICT* dict_utf8_activate ( DICT )

dict_utf8.c248 行目に定義があります。

void dict_walk ( DICT_WALK_ACTION  ,
void *   
)

dict.c569 行目に定義があります。

DICT* PRINTFLIKE ( ,
 
) const

変数詳解

int dict_allow_surrogate

dict_surrogate.c130 行目に定義があります。

DICT const char int

dict.h270 行目に定義があります。