Postfix3.3.1
マクロ定義 | 関数
dsn_buf.c ファイル
#include <sys_defs.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <msg.h>
#include <mymalloc.h>
#include <vstring.h>
#include <dsn_buf.h>

[ソースコード]

マクロ定義

#define STR(x)   vstring_str(x)
 
#define DSB_TRUNCATE(s)   do { VSTRING_RESET(s); VSTRING_TERMINATE(s); } while (0)
 
#define NULL_OR_EMPTY(s)   ((s) == 0 || *(s) == 0)
 
#define DSB_ACTION(dsb, stat, act)   vstring_strcpy((dsb)->action, !NULL_OR_EMPTY(act) ? (act) : "")
 
#define DSB_MTA(dsb, type, name)
 
#define DSB_DIAG(dsb, type, text)
 

関数

DSN_BUFdsb_create (void)
 
void dsb_free (DSN_BUF *dsb)
 
DSN_BUFdsb_update (DSN_BUF *dsb, const char *status, const char *action, const char *mtype, const char *mname, const char *dtype, const char *dtext, const char *format,...)
 
DSN_BUFvdsb_simple (DSN_BUF *dsb, const char *status, const char *format, va_list ap)
 
DSN_BUFdsb_simple (DSN_BUF *dsb, const char *status, const char *format,...)
 
DSN_BUFdsb_unix (DSN_BUF *dsb, const char *status, const char *dtext, const char *format,...)
 
DSN_BUFdsb_formal (DSN_BUF *dsb, const char *status, const char *action, const char *mtype, const char *mname, const char *dtype, const char *dtext)
 
DSN_BUFdsb_status (DSN_BUF *dsb, const char *status)
 
void dsb_reset (DSN_BUF *dsb)
 

マクロ定義詳解

#define DSB_ACTION (   dsb,
  stat,
  act 
)    vstring_strcpy((dsb)->action, !NULL_OR_EMPTY(act) ? (act) : "")

dsn_buf.c214 行目に定義があります。

#define DSB_DIAG (   dsb,
  type,
  text 
)
値:
do { \
if (NULL_OR_EMPTY(type) || NULL_OR_EMPTY(text)) { \
DSB_TRUNCATE((dsb)->dtype); \
DSB_TRUNCATE((dsb)->dtext); \
} else { \
vstring_strcpy((dsb)->dtype, (type)); \
vstring_strcpy((dsb)->dtext, (text)); \
} \
} while (0)
VSTRING * vstring_strcpy(VSTRING *vp, const char *src)
Definition: vstring.c:431
#define NULL_OR_EMPTY(s)
Definition: dsn_buf.c:212
#define DSB_TRUNCATE(s)
Definition: dsn_buf.c:209

dsn_buf.c227 行目に定義があります。

#define DSB_MTA (   dsb,
  type,
  name 
)
値:
do { \
if (NULL_OR_EMPTY(type) || NULL_OR_EMPTY(name)) { \
DSB_TRUNCATE((dsb)->mtype); \
DSB_TRUNCATE((dsb)->mname); \
} else { \
vstring_strcpy((dsb)->mtype, (type)); \
vstring_strcpy((dsb)->mname, (name)); \
} \
} while (0)
VSTRING * vstring_strcpy(VSTRING *vp, const char *src)
Definition: vstring.c:431
#define NULL_OR_EMPTY(s)
Definition: dsn_buf.c:212
#define DSB_TRUNCATE(s)
Definition: dsn_buf.c:209

dsn_buf.c217 行目に定義があります。

#define DSB_TRUNCATE (   s)    do { VSTRING_RESET(s); VSTRING_TERMINATE(s); } while (0)

dsn_buf.c209 行目に定義があります。

#define NULL_OR_EMPTY (   s)    ((s) == 0 || *(s) == 0)

dsn_buf.c212 行目に定義があります。

#define STR (   x)    vstring_str(x)

dsn_buf.c165 行目に定義があります。

関数詳解

DSN_BUF* dsb_create ( void  )

dsn_buf.c169 行目に定義があります。

DSN_BUF* dsb_formal ( DSN_BUF dsb,
const char *  status,
const char *  action,
const char *  mtype,
const char *  mname,
const char *  dtype,
const char *  dtext 
)

dsn_buf.c307 行目に定義があります。

void dsb_free ( DSN_BUF dsb)

dsn_buf.c190 行目に定義があります。

void dsb_reset ( DSN_BUF dsb)

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

DSN_BUF* dsb_simple ( DSN_BUF dsb,
const char *  status,
const char *  format,
  ... 
)

dsn_buf.c275 行目に定義があります。

DSN_BUF* dsb_status ( DSN_BUF dsb,
const char *  status 
)

dsn_buf.c320 行目に定義があります。

DSN_BUF* dsb_unix ( DSN_BUF dsb,
const char *  status,
const char *  dtext,
const char *  format,
  ... 
)

dsn_buf.c287 行目に定義があります。

DSN_BUF* dsb_update ( DSN_BUF dsb,
const char *  status,
const char *  action,
const char *  mtype,
const char *  mname,
const char *  dtype,
const char *  dtext,
const char *  format,
  ... 
)

dsn_buf.c239 行目に定義があります。

DSN_BUF* vdsb_simple ( DSN_BUF dsb,
const char *  status,
const char *  format,
va_list  ap 
)

dsn_buf.c259 行目に定義があります。