MACSio  0.9
Multi-purpose, Application-Centric, Scalable I/O Proxy App
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
macsio_clargs.c File Reference
#include <ctype.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <mpi.h>
#include <json-c/json.h>
#include <macsio_clargs.h>
#include <macsio_log.h>
#include <macsio_utils.h>

Go to the source code of this file.

Data Structures

struct  _knownArgInfo


#define PARAM_ASSIGNED   0x01


typedef struct _knownArgInfo MACSIO_KnownArgInfo_t


static double GetSizeFromModifierChar (char c)
static void add_param_to_json_retobj (json_object *retobj, char const *key, json_object *addobj)
int MACSIO_CLARGS_ProcessCmdline (void **retobj, MACSIO_CLARGS_ArgvFlags_t flags, int argi, int argc, char **argv,...)

Data Structure Documentation

struct _knownArgInfo

Definition at line 48 of file macsio_clargs.c.

Data Fields
char * helpStr

the help string for this command line argument

char * fmtStr

format string for this command line argument

char * defStr

Strong holding default values for arg params

char * argName

To get populated with the argument's name without leading dashes

int argNameLength

number of characters in this command line argument name

int paramCount

number of parameters associated with this argument

char * paramTypes

the string of parameter conversion specification characters

void ** paramPtrs

an array of pointers to caller-supplied scalar variables to be assigned

char * paramFlags

Flags for each param to indicate things such as if the param was actually assigned a value

struct _knownArgInfo * next

pointer to the next comand line argument

Macro Definition Documentation

#define PARAM_ASSIGNED   0x01

Definition at line 46 of file macsio_clargs.c.

Typedef Documentation

Function Documentation

static double GetSizeFromModifierChar ( char  c)

Definition at line 62 of file macsio_clargs.c.

static void add_param_to_json_retobj ( json_object retobj,
char const *  key,
json_object addobj 

Definition at line 96 of file macsio_clargs.c.

int MACSIO_CLARGS_ProcessCmdline ( void **  retobj,
MACSIO_CLARGS_ArgvFlags_t  flags,
int  argi,
int  argc,
char **  argv,

Definition at line 166 of file macsio_clargs.c.