Logo Search packages:      
Sourcecode: nginx version File versions  Download package

ndk_array.h

/* 
 * 2010 (C) Marcus Clyne 
 *
 * DO NOT EDIT THIS FILE MANUALLY
 * ------------------------------
 * This file has been generated automatically from scripts in the $base/auto dir and
 * data in the $base/auto/data dir. If you wish to edit the output of this file, then
 * you should edit these files instead.
 *
*/


// Non-generated macros

#define     ndk_array_count(a)                  ((a)->nelts)
#define     ndk_array_get_first(a)              ((a)->elts)
#define     ndk_array_get_index(a,n)            ((void*) ((char*) (a)->elts + (a)->size * n))
#define     ndk_array_get_last(a)               ((void*) ((char*) (a)->elts + (a)->size * ((a)->nelts - 1)))
#define     ndk_array_get_reverse_index(a,n)    ((void*) ((char*) (a)->elts + (a)->size * ((a)->nelts - 1 - n)))
#define     ndk_array_push_clean(p,a)           {p = ngx_array_push (a); ndk_zerop (p);}


// base action macro macros

#define     ndk_array_create_ac(a,pl,n,sz,ac)   {a = ngx_array_create (pl,n,sz); if (a == NULL) ac;}
#define     ndk_array_init_ac(a,pl,n,sz,ac)     {if (ngx_array_init (a,pl,n,sz) == NGX_ERROR) ac;}
#define     ndk_array_push_ac(p,a,ac)           {p = ngx_array_push (a);     if (p == NULL) ac;}
#define     ndk_array_push_clean_ac(p,a,ac)     {p = ngx_array_push (a);     if (p == NULL) ac; ndk_zerop (p);}
#define     ndk_array_push_n_ac(p,a,n,ac)       {p = ngx_array_push_n (a,n); if (p == NULL) ac;}
#define     ndk_array_push_n_clean_ac(p,a,n,ac) {p = ngx_array_push_n (a,n); if (p == NULL) ac; ndk_zeropn (p,n);}


// generated action macros

#define     ndk_array_create_r0(a,pl,n,sz)      ndk_array_create_ac        (a,pl,n,sz,return 0)
#define     ndk_array_create_r1(a,pl,n,sz)      ndk_array_create_ac        (a,pl,n,sz,return 1)
#define     ndk_array_create_r_1(a,pl,n,sz)     ndk_array_create_ac        (a,pl,n,sz,return -1)
#define     ndk_array_create_rok(a,pl,n,sz)     ndk_array_create_ac        (a,pl,n,sz,return NGX_OK)
#define     ndk_array_create_rce(a,pl,n,sz)     ndk_array_create_ac        (a,pl,n,sz,return NGX_CONF_ERROR)
#define     ndk_array_create_rcok(a,pl,n,sz)    ndk_array_create_ac        (a,pl,n,sz,return NGX_CONF_OK)
#define     ndk_array_create_re(a,pl,n,sz)      ndk_array_create_ac        (a,pl,n,sz,return NGX_ERROR)
#define     ndk_array_create_rn(a,pl,n,sz)      ndk_array_create_ac        (a,pl,n,sz,return NULL)
#define     ndk_array_create_g(_lb)(a,pl,n,sz,_lb) ndk_array_create_ac     (a,pl,n,sz,goto _lb)

#define     ndk_array_init_r0(a,pl,n,sz)        ndk_array_init_ac          (a,pl,n,sz,return 0)
#define     ndk_array_init_r1(a,pl,n,sz)        ndk_array_init_ac          (a,pl,n,sz,return 1)
#define     ndk_array_init_r_1(a,pl,n,sz)       ndk_array_init_ac          (a,pl,n,sz,return -1)
#define     ndk_array_init_rok(a,pl,n,sz)       ndk_array_init_ac          (a,pl,n,sz,return NGX_OK)
#define     ndk_array_init_rce(a,pl,n,sz)       ndk_array_init_ac          (a,pl,n,sz,return NGX_CONF_ERROR)
#define     ndk_array_init_rcok(a,pl,n,sz)      ndk_array_init_ac          (a,pl,n,sz,return NGX_CONF_OK)
#define     ndk_array_init_re(a,pl,n,sz)        ndk_array_init_ac          (a,pl,n,sz,return NGX_ERROR)
#define     ndk_array_init_rn(a,pl,n,sz)        ndk_array_init_ac          (a,pl,n,sz,return NULL)
#define     ndk_array_init_g(_lb)(a,pl,n,sz,_lb) ndk_array_init_ac         (a,pl,n,sz,goto _lb)

#define     ndk_array_push_r0(p,a)              ndk_array_push_ac          (p,a,return 0)
#define     ndk_array_push_r1(p,a)              ndk_array_push_ac          (p,a,return 1)
#define     ndk_array_push_r_1(p,a)             ndk_array_push_ac          (p,a,return -1)
#define     ndk_array_push_rok(p,a)             ndk_array_push_ac          (p,a,return NGX_OK)
#define     ndk_array_push_rce(p,a)             ndk_array_push_ac          (p,a,return NGX_CONF_ERROR)
#define     ndk_array_push_rcok(p,a)            ndk_array_push_ac          (p,a,return NGX_CONF_OK)
#define     ndk_array_push_re(p,a)              ndk_array_push_ac          (p,a,return NGX_ERROR)
#define     ndk_array_push_rn(p,a)              ndk_array_push_ac          (p,a,return NULL)
#define     ndk_array_push_g(_lb)(p,a,_lb)      ndk_array_push_ac          (p,a,goto _lb)

#define     ndk_array_push_clean_r0(p,a)        ndk_array_push_clean_ac    (p,a,return 0)
#define     ndk_array_push_clean_r1(p,a)        ndk_array_push_clean_ac    (p,a,return 1)
#define     ndk_array_push_clean_r_1(p,a)       ndk_array_push_clean_ac    (p,a,return -1)
#define     ndk_array_push_clean_rok(p,a)       ndk_array_push_clean_ac    (p,a,return NGX_OK)
#define     ndk_array_push_clean_rce(p,a)       ndk_array_push_clean_ac    (p,a,return NGX_CONF_ERROR)
#define     ndk_array_push_clean_rcok(p,a)      ndk_array_push_clean_ac    (p,a,return NGX_CONF_OK)
#define     ndk_array_push_clean_re(p,a)        ndk_array_push_clean_ac    (p,a,return NGX_ERROR)
#define     ndk_array_push_clean_rn(p,a)        ndk_array_push_clean_ac    (p,a,return NULL)
#define     ndk_array_push_clean_g(_lb)(p,a,_lb) ndk_array_push_clean_ac   (p,a,goto _lb)

#define     ndk_array_push_n_r0(p,a,n)          ndk_array_push_n_ac        (p,a,n,return 0)
#define     ndk_array_push_n_r1(p,a,n)          ndk_array_push_n_ac        (p,a,n,return 1)
#define     ndk_array_push_n_r_1(p,a,n)         ndk_array_push_n_ac        (p,a,n,return -1)
#define     ndk_array_push_n_rok(p,a,n)         ndk_array_push_n_ac        (p,a,n,return NGX_OK)
#define     ndk_array_push_n_rce(p,a,n)         ndk_array_push_n_ac        (p,a,n,return NGX_CONF_ERROR)
#define     ndk_array_push_n_rcok(p,a,n)        ndk_array_push_n_ac        (p,a,n,return NGX_CONF_OK)
#define     ndk_array_push_n_re(p,a,n)          ndk_array_push_n_ac        (p,a,n,return NGX_ERROR)
#define     ndk_array_push_n_rn(p,a,n)          ndk_array_push_n_ac        (p,a,n,return NULL)
#define     ndk_array_push_n_g(_lb)(p,a,n,_lb)  ndk_array_push_n_ac        (p,a,n,goto _lb)

#define     ndk_array_push_n_clean_r0(p,a,n)    ndk_array_push_n_clean_ac  (p,a,n,return 0)
#define     ndk_array_push_n_clean_r1(p,a,n)    ndk_array_push_n_clean_ac  (p,a,n,return 1)
#define     ndk_array_push_n_clean_r_1(p,a,n)   ndk_array_push_n_clean_ac  (p,a,n,return -1)
#define     ndk_array_push_n_clean_rok(p,a,n)   ndk_array_push_n_clean_ac  (p,a,n,return NGX_OK)
#define     ndk_array_push_n_clean_rce(p,a,n)   ndk_array_push_n_clean_ac  (p,a,n,return NGX_CONF_ERROR)
#define     ndk_array_push_n_clean_rcok(p,a,n)  ndk_array_push_n_clean_ac  (p,a,n,return NGX_CONF_OK)
#define     ndk_array_push_n_clean_re(p,a,n)    ndk_array_push_n_clean_ac  (p,a,n,return NGX_ERROR)
#define     ndk_array_push_n_clean_rn(p,a,n)    ndk_array_push_n_clean_ac  (p,a,n,return NULL)
#define     ndk_array_push_n_clean_g(_lb)(p,a,n,_lb) ndk_array_push_n_clean_ac (p,a,n,goto _lb)


Generated by  Doxygen 1.6.0   Back to index