camel-arg
3
CAMEL Library

# camel-arg

## Synopsis

                        CamelArg;
                        CamelArgV;
                        CamelArgGet;
                        CamelArgGetV;
    #define             camel_argv_start                    (tv, last)
    #define             camel_argv_end                      (tv)
    int                 camel_argv_build                    (CamelArgV *tv);
    int                 camel_arggetv_build                 (CamelArgGetV *tv);
    #define             camel_argv_ignore                   (tv, i)
                        CamelProperty;

## Description

## Details

### CamelArg

    typedef struct {
    	guint32 tag;
    	union {
    		void *ca_object;
    		int ca_int;
    		double ca_double;
    		char *ca_str;
    		void *ca_ptr;
    	} u;
    };
    struct _CamelArgGet {
    	guint32 tag;
    	union {
    		void **ca_object;
    		int *ca_int;
    		double *ca_double;
    		char **ca_str;
    		void **ca_ptr;
    	} u;
    };
    #define ca_object u.ca_object
    #define ca_int u.ca_int
    #define ca_double u.ca_double
    #define ca_str u.ca_str
    #define ca_ptr u.ca_ptr

    /* maximum no of args processed at any one time, not the max of all args */
    #define CAMEL_ARGV_MAX (20)

    struct _CamelArgV {
    	va_list ap;
    	int argc;
    	CamelArg argv[CAMEL_ARGV_MAX];
    } CamelArg;

### CamelArgV

    typedef struct _CamelArgV CamelArgV;

### CamelArgGet

    typedef struct _CamelArgGet CamelArgGet;

### CamelArgGetV

    typedef struct {
    	va_list ap;
    	int argc;
    	CamelArgGet argv[CAMEL_ARGV_MAX];
    } CamelArgGetV;

### camel_argv_start()

    #define camel_argv_start(tv, last) va_start((tv)->ap, last)

`tv` :

`last` :

### camel_argv_end()

    #define camel_argv_end(tv) va_end((tv)->ap)

`tv` :

### camel_argv_build ()

    int                 camel_argv_build                    (CamelArgV *tv);

`tv` :

Returns :

### camel_arggetv_build ()

    int                 camel_arggetv_build                 (CamelArgGetV *tv);

`tv` :

Returns :

### camel_argv_ignore()

    #define camel_argv_ignore(tv, i) ((tv)->argv[i].tag = ((tv)->argv[i].tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE)

`tv` :

`i` :

### CamelProperty

    typedef struct {
    	guint32 tag;
    	char *name;
    	char *description;
    } CamelProperty;