cdk_params - Cdk command-line parsing
Contents
Available Functions
CDKparamNumber
Retrieves an integer (or boolean) option value from the parsed command-line.
CDKparamNumber2
Retrieves an optional integer (or boolean) value from the parsed command-line. If the command line
option is not present, the missing value is used.
CDKparamString
Retrieves a string option value from the parsed command-line.
CDKparamString2
Retrieve an optional string option value from the parsed command-line.
CDKparamValue
Retrieve an integer (or boolean) option value from the parsed command-line.
CDKparseParams
Parse the given argc/argv command-line, with the options passed to getopt()'s 3rd parameter.
CDKparsePosition
Parse the string as one of CDK's positioning keywords, or an actual position.
Description
These are a set of functions used to implement the command-line utilities and demonstration programs for
Cdk. Rather than set the programs' options at initialization, they construct a simple database which
holds the common parameters using CDKparseParams().
Name
cdk_params - Cdk command-line parsing
See Also
cdk_position(3), getopt(3) 2024-03-28 cdk_params(3)
Synopsis
cc [ flag ... ] file ... -lcdk [ library ... ]
#include <cdk.h>
intCDKparamNumber(CDK_PARAMS*params,intoption);intCDKparamNumber2(CDK_PARAMS*params,intoption,intmissing);char*CDKparamString(CDK_PARAMS*params,intoption);char*CDKparamString2(CDK_PARAMS*params,intoption,constchar*missing);voidCDKparseParams(intargc,char**argv,CDK_PARAMS*params,constchar*options);intCDKparsePosition(char*string);intCDKparamValue(CDK_PARAMS*params,intoption,intmissing);