# args.h File Reference

`#include <gwenhywfar/gwenhywfarapi.h>`
`#include <gwenhywfar/types.h>`
`#include <gwenhywfar/buffer.h>`
`#include <gwenhywfar/db.h>`

Go to the source code of this file.

## Data Structures

struct | GWEN_ARGS

## Defines

#define | GWEN_ARGS_FLAGS_HAS_ARGUMENT 0x00000001
#define | GWEN_ARGS_FLAGS_HELP 0x00000004
#define | GWEN_ARGS_FLAGS_LAST 0x00000002
#define | GWEN_ARGS_MODE_ALLOW_FREEPARAM 0x00000001
#define | GWEN_ARGS_MODE_STOP_AT_FREEPARAM 0x00000002
#define | GWEN_ARGS_RESULT_ERROR (-1)
#define | GWEN_ARGS_RESULT_HELP (-2)

## Typedefs

typedef GWEN_ARGS | GWEN_ARGS

## Enumerations

enum | GWEN_ARGS_OUTTYPE { GWEN_ArgsOutTypeTXT = 0, GWEN_ArgsOutTypeHTML }
enum | GWEN_ARGS_TYPE { GWEN_ArgsTypeChar = 0, GWEN_ArgsTypeInt }

## Functions

GWENHYWFAR_API int | GWEN_Args_Check (int argc, char **argv, int startAt, GWEN_TYPE_UINT32 mode, const GWEN_ARGS *args, GWEN_DB_NODE *db)
GWENHYWFAR_API int | GWEN_Args_ShortUsage (const GWEN_ARGS *args, GWEN_BUFFER *ubuf, GWEN_ARGS_OUTTYPE ot)
GWENHYWFAR_API int | GWEN_Args_Usage (const GWEN_ARGS *args, GWEN_BUFFER *ubuf, GWEN_ARGS_OUTTYPE ot)

## Define Documentation

#define GWEN_ARGS_FLAGS_HAS_ARGUMENT 0x00000001

#define GWEN_ARGS_FLAGS_HELP 0x00000004

#define GWEN_ARGS_FLAGS_LAST 0x00000002

#define GWEN_ARGS_MODE_ALLOW_FREEPARAM 0x00000001

#define GWEN_ARGS_MODE_STOP_AT_FREEPARAM 0x00000002

#define GWEN_ARGS_RESULT_ERROR (-1)

#define GWEN_ARGS_RESULT_HELP (-2)

## Typedef Documentation

typedef struct GWEN_ARGS GWEN_ARGS

## Enumeration Type Documentation

enum GWEN_ARGS_OUTTYPE

Enumerator:

  GWEN_ArgsOutTypeTXT |
  GWEN_ArgsOutTypeHTML |

enum GWEN_ARGS_TYPE

Enumerator:

  GWEN_ArgsTypeChar |
  GWEN_ArgsTypeInt |

## Function Documentation

GWENHYWFAR_API int GWEN_Args_Check | ( | int | argc,
|  | char ** | argv,
|  | int | startAt,
|  | GWEN_TYPE_UINT32 | mode,
|  | const GWEN_ARGS * | args,
|  | GWEN_DB_NODE * | db
| ) |

| This function parses the given argument list. Known options are stored within the given DB under their respective name. Free parameters (which are arguments without leading "-"'s) are stored in the variable "params" of the given db.

GWENHYWFAR_API int GWEN_Args_ShortUsage | ( | const GWEN_ARGS * | args,
|  | GWEN_BUFFER * | ubuf,
|  | GWEN_ARGS_OUTTYPE | ot
| ) |

GWENHYWFAR_API int GWEN_Args_Usage | ( | const GWEN_ARGS * | args,
|  | GWEN_BUFFER * | ubuf,
|  | GWEN_ARGS_OUTTYPE | ot
| ) |