AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
options_popt.cpp File Reference
#include "ajabase/system/file_io.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "options_popt.h"
#include <float.h>
#include <math.h>
#include <sys/stat.h>
#include <stdarg.h>
Include dependency graph for options_popt.cpp:

Go to the source code of this file.

Classes

struct  pbm_set
 
union  poptArg_u
 
struct  optionStackEntry
 
struct  poptContext_s
 
struct  columns_s
 
struct  poptDone_s
 
union  _dbswap
 

Macros

#define _isspaceptr(_chp)   isspace((int)(*(unsigned char *)(_chp)))
 
#define xmalloc(_size)   malloc(_size)
 
#define xcalloc(_nmemb, _size)   calloc((_nmemb), (_size))
 
#define xrealloc(_ptr, _size)   realloc((_ptr), (_size))
 
#define xstrdup(_str)   strdup(_str)
 
#define __PBM_NBITS   (8 * sizeof (__pbm_bits))
 
#define __PBM_IX(d)   ((d) / __PBM_NBITS)
 
#define __PBM_MASK(d)   ((__pbm_bits) 1 << (((unsigned)(d)) % __PBM_NBITS))
 
#define __PBM_BITS(set)   ((set)->bits)
 
#define PBM_ALLOC(d)   calloc(__PBM_IX (d) + 1, sizeof(__pbm_bits))
 
#define PBM_FREE(s)   _free(s);
 
#define PBM_SET(d, s)   (__PBM_BITS (s)[__PBM_IX (d)] |= __PBM_MASK (d))
 
#define PBM_CLR(d, s)   (__PBM_BITS (s)[__PBM_IX (d)] &= ~__PBM_MASK (d))
 
#define PBM_ISSET(d, s)   ((__PBM_BITS (s)[__PBM_IX (d)] & __PBM_MASK (d)) != 0)
 
#define poptArgType(_opt)   ((_opt)->argInfo & _poptArgMask)
 
#define poptGroup(_opt)   ((_opt)->argInfo & _poptGroupMask)
 
#define F_ISSET(_opt, _FLAG)   ((_opt)->argInfo & POPT_ARGFLAG_##_FLAG)
 
#define LF_ISSET(_FLAG)   (argInfo & POPT_ARGFLAG_##_FLAG)
 
#define CBF_ISSET(_opt, _FLAG)   ((_opt)->argInfo & POPT_CBFLAG_##_FLAG)
 
#define _POPTHELP_MAXLINE   ((size_t)79)
 
#define poptSubstituteHelpI18N(opt)
 
#define _(foo)   foo
 
#define D_(dom, str)   str
 
#define POPT_(foo)   foo
 
#define POPT_WCHAR_HACK
 
#define prtlong   (opt->longName != NULL) /* XXX splint needs a clue */
 
#define prtlong   (opt->longName != NULL) /* XXX splint needs a clue */
 
#define _JLU3_jlu32lpair   1
 
#define jlu32lpair   poptJlu32lpair
 
#define HASH_LITTLE_ENDIAN   (endian.uc[0] == (unsigned char) 0x44)
 
#define HASH_BIG_ENDIAN   (endian.uc[0] == (unsigned char) 0x11)
 
#define ROTL32(x, s)   (((x) << (s)) | ((x) >> (32 - (s))))
 
#define _JLU3_INIT(_h, _size)   (0xdeadbeef + ((uint32_t)(_size)) + (_h))
 
#define _JLU3_MIX(a, b, c)
 
#define _JLU3_FINAL(a, b, c)
 
#define POPT_ARGV_ARRAY_GROW_DELTA   5
 
#define POPT_ABS(a)   ((((a) - 0.0) < DBL_EPSILON) ? -(a) : (a))
 

Typedefs

typedef unsigned int __pbm_bits
 
typedef poptStringpoptArgv
 
typedef union poptArg_u poptArg
 
typedef struct columns_scolumns_t
 
typedef struct poptDone_spoptDone
 

Functions

void * xmalloc (size_t size)
 
void * xcalloc (size_t nmemb, size_t size)
 
void * xrealloc (void *ptr, size_t size)
 
char * xstrdup (const char *str)
 
static void * _free (const void *p)
 
void poptJlu32lpair (const void *key, size_t size, uint32_t *pc, uint32_t *pb)
 
int POPT_fprintf (FILE *stream, const char *format,...)
 
const char * POPT_prev_char (const char *str)
 
const char * POPT_next_char (const char *str)
 
static int poptGlob (poptContext con __attribute__((__unused__)), const char *pattern, int *acp, const char ***avp)
 
int poptSaneFile (const char *fn)
 
int poptReadFile (const char *fn, char **bp, size_t *nbp, int flags)
 
static int configAppMatch (poptContext con, const char *s)
 
static int poptConfigLine (poptContext con, char *line)
 
int poptReadConfigFile (poptContext con, const char *fn)
 
int poptReadConfigFiles (poptContext con, const char *paths)
 
int poptReadDefaultConfig (poptContext con, int useEnv __attribute__((__unused__)))
 
poptContext poptFini (poptContext con)
 
poptContext poptInit (int argc, const char **argv, const struct poptOption *options, const char *configPaths)
 
void displayArgs (poptContext con, enum poptCallbackReason foo __attribute__((__unused__)), struct poptOption *key, const char *arg __attribute__((__unused__)), void *data __attribute__((__unused__)))
 
static size_t maxColumnWidth (FILE *fp)
 
static size_t stringDisplayWidth (const char *s)
 
static const char * getTableTranslationDomain (const struct poptOption *opt)
 
static const char * getArgDescrip (const struct poptOption *opt, const char *translation_domain)
 
static char * singleOptionDefaultValue (size_t lineLength, const struct poptOption *opt, const char *translation_domain)
 
static void singleOptionHelp (FILE *fp, columns_t columns, const struct poptOption *opt, const char *translation_domain)
 
static size_t maxArgWidth (const struct poptOption *opt, const char *translation_domain)
 
static void itemHelp (FILE *fp, poptItem items, int nitems, columns_t columns, const char *translation_domain)
 
static void singleTableHelp (poptContext con, FILE *fp, const struct poptOption *table, columns_t columns, const char *translation_domain)
 
static size_t showHelpIntro (poptContext con, FILE *fp)
 
void poptPrintHelp (poptContext con, FILE *fp, int flags __attribute__((__unused__)))
 
static size_t singleOptionUsage (FILE *fp, columns_t columns, const struct poptOption *opt, const char *translation_domain)
 
static size_t itemUsage (FILE *fp, columns_t columns, poptItem item, int nitems, const char *translation_domain)
 
static size_t singleTableUsage (poptContext con, FILE *fp, columns_t columns, const struct poptOption *opt, const char *translation_domain, poptDone done)
 
static size_t showShortOptions (const struct poptOption *opt, FILE *fp, char *str)
 
void poptPrintUsage (poptContext con, FILE *fp, int flags __attribute__((__unused__)))
 
void poptSetOtherOptionHelp (poptContext con, const char *text)
 
int poptDupArgv (int argc, const char **argv, int *argcPtr, const char ***argvPtr)
 
int poptParseArgvString (const char *s, int *argcPtr, const char ***argvPtr)
 
int poptConfigFileToString (FILE *fp, char **argstrp, int flags __attribute__((__unused__)))
 
void poptSetExecPath (poptContext con, const char *path, int allowAbsolute)
 
static void invokeCallbacksPRE (poptContext con, const struct poptOption *opt)
 
static void invokeCallbacksPOST (poptContext con, const struct poptOption *opt)
 
static void invokeCallbacksOPTION (poptContext con, const struct poptOption *opt, const struct poptOption *myOpt, const void *myData, int shorty)
 
poptContext poptGetContext (const char *name, int argc, const char **argv, const struct poptOption *options, unsigned int flags)
 
static void cleanOSE (struct optionStackEntry *os)
 
void poptResetContext (poptContext con)
 
static int handleExec (poptContext con, const char *longName, char shortName)
 
static int longOptionStrcmp (const struct poptOption *opt, const char *longName, size_t longNameLen)
 
static int handleAlias (poptContext con, const char *longName, size_t longNameLen, char shortName, const char *nextArg)
 
static const char * findProgramPath (const char *argv0)
 
static int execCommand (poptContext con)
 
static const struct poptOptionfindOption (const struct poptOption *opt, const char *longName, size_t longNameLen, char shortName, poptCallbackType *callback, const void **callbackData, unsigned int argInfo)
 
static const char * findNextArg (poptContext con, unsigned argx, int delete_arg)
 
static const char * expandNextArg (poptContext con, const char *s)
 
static void poptStripArg (poptContext con, int which)
 
static int _poptBitsNew (poptBits *bitsp)
 
int poptBitsAdd (poptBits bits, const char *s)
 
int poptBitsChk (poptBits bits, const char *s)
 
int poptBitsClr (poptBits bits)
 
int poptBitsDel (poptBits bits, const char *s)
 
int poptBitsIntersect (poptBits *ap, const poptBits b)
 
int poptBitsUnion (poptBits *ap, const poptBits b)
 
int poptBitsArgs (poptContext con, poptBits *ap)
 
int poptSaveBits (poptBits *bitsp, unsigned int argInfo __attribute__((__unused__)), const char *s)
 
int poptSaveString (const char ***argvp, unsigned int argInfo __attribute__((__unused__)), const char *val)
 
int poptSaveLongLong (long long *arg, unsigned int argInfo, long long aLongLong)
 
int poptSaveLong (long *arg, unsigned int argInfo, long aLong)
 
int poptSaveInt (int *arg, unsigned int argInfo, long aLong)
 
int poptSaveShort (short *arg, unsigned int argInfo, long aLong)
 
static unsigned int poptArgInfo (poptContext con, const struct poptOption *opt)
 
static int poptParseInteger (long long *llp, unsigned int argInfo __attribute__((__unused__)), const char *val)
 
static int poptSaveArg (poptContext con, const struct poptOption *opt)
 
int poptGetNextOpt (poptContext con)
 
char * poptGetOptArg (poptContext con)
 
const char * poptGetArg (poptContext con)
 
const char * poptPeekArg (poptContext con)
 
const char ** poptGetArgs (poptContext con)
 
static poptItem poptFreeItems (poptItem items, int nitems)
 
poptContext poptFreeContext (poptContext con)
 
int poptAddAlias (poptContext con, struct poptAlias alias, int flags __attribute__((__unused__)))
 
int poptAddItem (poptContext con, poptItem newItem, int flags)
 
const char * poptBadOption (poptContext con, unsigned int flags)
 
const char * poptStrerror (const int error)
 
int poptStuffArgs (poptContext con, const char **argv)
 
const char * poptGetInvocationName (poptContext con)
 
int poptStrippedArgv (poptContext con, int argc, char **argv)
 

Variables

const typedef char * poptString
 
unsigned int _poptArgMask = 0x000000FFU
 
unsigned int _poptGroupMask = 0x0000FF00U
 
static struct poptOption poptHelpOptions []
 
struct poptOptionpoptHelpOptionsAutoHelp = poptHelpOptions
 
static struct poptOption poptHelpOptions2 []
 
struct poptOptionpoptHelpOptionsI18N = poptHelpOptions2
 
struct poptOption poptAliasOptions []
 
static const union _dbswap endian = { 0x11223344 }
 
static const unsigned char utf8_skip_data [256]
 
unsigned int _poptBitsN = 1024U
 
unsigned int _poptBitsM = ((3U * 1024U ) / 2U)
 
unsigned int _poptBitsK = 16U
 

Macro Definition Documentation

◆ _

#define _ (   foo)    foo

Definition at line 320 of file options_popt.cpp.

◆ __PBM_BITS

#define __PBM_BITS (   set)    ((set)->bits)

Definition at line 204 of file options_popt.cpp.

◆ __PBM_IX

#define __PBM_IX (   d)    ((d) / __PBM_NBITS)

Definition at line 199 of file options_popt.cpp.

◆ __PBM_MASK

#define __PBM_MASK (   d)    ((__pbm_bits) 1 << (((unsigned)(d)) % __PBM_NBITS))

Definition at line 200 of file options_popt.cpp.

◆ __PBM_NBITS

#define __PBM_NBITS   (8 * sizeof (__pbm_bits))

Definition at line 198 of file options_popt.cpp.

◆ _isspaceptr

#define _isspaceptr (   _chp)    isspace((int)(*(unsigned char *)(_chp)))

Definition at line 149 of file options_popt.cpp.

◆ _JLU3_FINAL

#define _JLU3_FINAL (   a,
  b,
 
)
Value:
{ \
c ^= b; c -= ROTL32(b,14); \
a ^= c; a -= ROTL32(c,11); \
b ^= a; b -= ROTL32(a,25); \
c ^= b; c -= ROTL32(b,16); \
a ^= c; a -= ROTL32(c,4); \
b ^= a; b -= ROTL32(a,14); \
c ^= b; c -= ROTL32(b,24); \
}

_JLU3_FINAL – final mixing of 3 32-bit values (a,b,c) into c

Pairs of (a,b,c) values differing in only a few bits will usually produce values of c that look totally different. This was tested for

  • pairs that differed by one bit, by two bits, in any combination of top bits of (a,b,c), or in any combination of bottom bits of (a,b,c).
  • "differ" is defined as +, -, ^, or ~^. For + and -, I transformed the output delta to a Gray code (a^(a>>1)) so a string of 1's (as is commonly produced by subtraction) look like a single 1-bit difference.
  • the base values were pseudorandom, all zero but one bit set, or all zero plus a counter that starts at zero.

These constants passed: 14 11 25 16 4 14 24 12 14 25 16 4 14 24 and these came close: 4 8 15 26 3 22 24 10 8 15 26 3 22 24 11 8 15 26 3 22 24

Definition at line 1665 of file options_popt.cpp.

◆ _JLU3_INIT

#define _JLU3_INIT (   _h,
  _size 
)    (0xdeadbeef + ((uint32_t)(_size)) + (_h))

Definition at line 1584 of file options_popt.cpp.

◆ _JLU3_jlu32lpair

#define _JLU3_jlu32lpair   1

Definition at line 1530 of file options_popt.cpp.

◆ _JLU3_MIX

#define _JLU3_MIX (   a,
  b,
 
)
Value:
{ \
a -= c; a ^= ROTL32(c, 4); c += b; \
b -= a; b ^= ROTL32(a, 6); a += c; \
c -= b; c ^= ROTL32(b, 8); b += a; \
a -= c; a ^= ROTL32(c,16); c += b; \
b -= a; b ^= ROTL32(a,19); a += c; \
c -= b; c ^= ROTL32(b, 4); b += a; \
}

Definition at line 1630 of file options_popt.cpp.

◆ _POPTHELP_MAXLINE

#define _POPTHELP_MAXLINE   ((size_t)79)

Auto help table options.

Definition at line 250 of file options_popt.cpp.

◆ CBF_ISSET

#define CBF_ISSET (   _opt,
  _FLAG 
)    ((_opt)->argInfo & POPT_CBFLAG_##_FLAG)

Definition at line 245 of file options_popt.cpp.

◆ D_

#define D_ (   dom,
  str 
)    str

Definition at line 322 of file options_popt.cpp.

◆ F_ISSET

#define F_ISSET (   _opt,
  _FLAG 
)    ((_opt)->argInfo & POPT_ARGFLAG_##_FLAG)

Definition at line 243 of file options_popt.cpp.

◆ HASH_BIG_ENDIAN

#define HASH_BIG_ENDIAN   (endian.uc[0] == (unsigned char) 0x11)

Definition at line 1577 of file options_popt.cpp.

◆ HASH_LITTLE_ENDIAN

#define HASH_LITTLE_ENDIAN   (endian.uc[0] == (unsigned char) 0x44)

Definition at line 1576 of file options_popt.cpp.

◆ jlu32lpair

#define jlu32lpair   poptJlu32lpair

Definition at line 1531 of file options_popt.cpp.

◆ LF_ISSET

#define LF_ISSET (   _FLAG)    (argInfo & POPT_ARGFLAG_##_FLAG)

Definition at line 244 of file options_popt.cpp.

◆ PBM_ALLOC

#define PBM_ALLOC (   d)    calloc(__PBM_IX (d) + 1, sizeof(__pbm_bits))

Definition at line 206 of file options_popt.cpp.

◆ PBM_CLR

#define PBM_CLR (   d,
 
)    (__PBM_BITS (s)[__PBM_IX (d)] &= ~__PBM_MASK (d))

Definition at line 209 of file options_popt.cpp.

◆ PBM_FREE

#define PBM_FREE (   s)    _free(s);

Definition at line 207 of file options_popt.cpp.

◆ PBM_ISSET

#define PBM_ISSET (   d,
 
)    ((__PBM_BITS (s)[__PBM_IX (d)] & __PBM_MASK (d)) != 0)

Definition at line 210 of file options_popt.cpp.

◆ PBM_SET

#define PBM_SET (   d,
 
)    (__PBM_BITS (s)[__PBM_IX (d)] |= __PBM_MASK (d))

Definition at line 208 of file options_popt.cpp.

◆ POPT_

#define POPT_ (   foo)    foo

Definition at line 323 of file options_popt.cpp.

◆ POPT_ABS

#define POPT_ABS (   a)    ((((a) - 0.0) < DBL_EPSILON) ? -(a) : (a))

◆ POPT_ARGV_ARRAY_GROW_DELTA

#define POPT_ARGV_ARRAY_GROW_DELTA   5

Definition at line 1937 of file options_popt.cpp.

◆ POPT_WCHAR_HACK

#define POPT_WCHAR_HACK

Definition at line 745 of file options_popt.cpp.

◆ poptArgType

#define poptArgType (   _opt)    ((_opt)->argInfo & _poptArgMask)

Definition at line 240 of file options_popt.cpp.

◆ poptGroup

#define poptGroup (   _opt)    ((_opt)->argInfo & _poptGroupMask)

Definition at line 241 of file options_popt.cpp.

◆ poptSubstituteHelpI18N

#define poptSubstituteHelpI18N (   opt)
Value:
{ \
if ((&opt) == poptHelpOptions) (opt) = *poptHelpOptionsI18N; \
}

Definition at line 272 of file options_popt.cpp.

◆ prtlong [1/2]

#define prtlong   (opt->longName != NULL) /* XXX splint needs a clue */

◆ prtlong [2/2]

#define prtlong   (opt->longName != NULL) /* XXX splint needs a clue */

◆ ROTL32

#define ROTL32 (   x,
 
)    (((x) << (s)) | ((x) >> (32 - (s))))

Definition at line 1580 of file options_popt.cpp.

◆ xcalloc

#define xcalloc (   _nmemb,
  _size 
)    calloc((_nmemb), (_size))

Definition at line 169 of file options_popt.cpp.

◆ xmalloc

#define xmalloc (   _size)    malloc(_size)

Definition at line 168 of file options_popt.cpp.

◆ xrealloc

#define xrealloc (   _ptr,
  _size 
)    realloc((_ptr), (_size))

Definition at line 170 of file options_popt.cpp.

◆ xstrdup

#define xstrdup (   _str)    strdup(_str)

Definition at line 171 of file options_popt.cpp.

Typedef Documentation

◆ __pbm_bits

typedef unsigned int __pbm_bits

Definition at line 197 of file options_popt.cpp.

◆ columns_t

typedef struct columns_s * columns_t

◆ poptArg

typedef union poptArg_u poptArg

A union to simplify opt->arg access without casting.

◆ poptArgv

typedef poptString* poptArgv

Definition at line 219 of file options_popt.cpp.

◆ poptDone

typedef struct poptDone_s * poptDone

Keep track of option tables already processed.

Function Documentation

◆ _free()

static void* _free ( const void *  p)
inlinestatic

Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.

Parameters
pmemory to free
Return values
NULLalways

Definition at line 190 of file options_popt.cpp.

◆ _poptBitsNew()

static int _poptBitsNew ( poptBits bitsp)
static

< opt->arg should not be NULL

Definition at line 2767 of file options_popt.cpp.

◆ cleanOSE()

static void cleanOSE ( struct optionStackEntry os)
static

Definition at line 2303 of file options_popt.cpp.

◆ configAppMatch()

static int configAppMatch ( poptContext  con,
const char *  s 
)
static

Check for application match.

Parameters
concontext
sconfig application name return 0 if config application matches

Definition at line 448 of file options_popt.cpp.

◆ displayArgs()

void displayArgs ( poptContext  con,
enum poptCallbackReason foo   __attribute__(__unused__),
struct poptOption key,
const char *arg   __attribute__(__unused__),
void *data   __attribute__(__unused__) 
)

Display arguments.

Parameters
concontext
foo(unused)
keyoption(s)
arg(unused)
data(unused)

Definition at line 760 of file options_popt.cpp.

◆ execCommand()

static int execCommand ( poptContext  con)
static

< errno set, use strerror(errno)

< missing argument

< missing argument

< memory allocation failed

< missing argument

Definition at line 2549 of file options_popt.cpp.

◆ expandNextArg()

static const char* expandNextArg ( poptContext  con,
const char *  s 
)
static

Definition at line 2709 of file options_popt.cpp.

◆ findNextArg()

static const char* findNextArg ( poptContext  con,
unsigned  argx,
int  delete_arg 
)
static

Definition at line 2676 of file options_popt.cpp.

◆ findOption()

static const struct poptOption* findOption ( const struct poptOption opt,
const char *  longName,
size_t  longNameLen,
char  shortName,
poptCallbackType callback,
const void **  callbackData,
unsigned int  argInfo 
)
static

< allow -longoption

< arg points to table

< table-wide callback... must be set first in table; arg points to callback, descrip points to callback data to pass

< allow -longoption

< allow -longoption

< use data from the include line, not the subtable

Definition at line 2610 of file options_popt.cpp.

◆ findProgramPath()

static const char* findProgramPath ( const char *  argv0)
static

Return absolute path to executable by searching PATH.

Parameters
argv0name of executable
Returns
(malloc'd) absolute path to executable (or NULL)

Definition at line 2510 of file options_popt.cpp.

◆ getArgDescrip()

static const char* getArgDescrip ( const struct poptOption opt,
const char *  translation_domain 
)
static
Parameters
optoption(s)
translation_domaintranslation domain

< EXPERIMENTAL: return (*arg) (argc, argv)

< dupe'd arg appended to realloc'd argv array.

< no arg

< arg should take value val

< arg ==> int

< arg ==> short

< arg ==> long

< arg ==> long long

< arg will be saved as string

< arg ==> float

< arg ==> double

< EXPERIMENTAL: return (*arg) (argc, argv)

< dupe'd arg appended to realloc'd argv array.

Definition at line 834 of file options_popt.cpp.

◆ getTableTranslationDomain()

static const char* getTableTranslationDomain ( const struct poptOption opt)
static
Parameters
optoption(s)

< set the translation domain for this table and any included tables; arg points to the domain string

Definition at line 819 of file options_popt.cpp.

◆ handleAlias()

static int handleAlias ( poptContext  con,
const char *  longName,
size_t  longNameLen,
char  shortName,
const char *  nextArg 
)
static

< aliases nested too deeply

Definition at line 2434 of file options_popt.cpp.

◆ handleExec()

static int handleExec ( poptContext  con,
const char *  longName,
char  shortName 
)
static

< ignore exec expansions

Definition at line 2340 of file options_popt.cpp.

◆ invokeCallbacksOPTION()

static void invokeCallbacksOPTION ( poptContext  con,
const struct poptOption opt,
const struct poptOption myOpt,
const void *  myData,
int  shorty 
)
static

< arg points to table

< table-wide callback... must be set first in table; arg points to callback, descrip points to callback data to pass

< don't callback with option

< continue callbacks with option

Definition at line 2220 of file options_popt.cpp.

◆ invokeCallbacksPOST()

static void invokeCallbacksPOST ( poptContext  con,
const struct poptOption opt 
)
static

< arg points to table

< table-wide callback... must be set first in table; arg points to callback, descrip points to callback data to pass

< call the callback after parse

Definition at line 2199 of file options_popt.cpp.

◆ invokeCallbacksPRE()

static void invokeCallbacksPRE ( poptContext  con,
const struct poptOption opt 
)
static

< arg points to table

< table-wide callback... must be set first in table; arg points to callback, descrip points to callback data to pass

< call the callback before parse

Definition at line 2178 of file options_popt.cpp.

◆ itemHelp()

static void itemHelp ( FILE *  fp,
poptItem  items,
int  nitems,
columns_t  columns,
const char *  translation_domain 
)
static

Display popt alias and exec help.

Parameters
fpoutput file handle
itemsalias/exec array
nitemsno. of alias/exec entries
columnsoutput display width control
translation_domaintranslation domain

< don't show in help/usage

Definition at line 1187 of file options_popt.cpp.

◆ itemUsage()

static size_t itemUsage ( FILE *  fp,
columns_t  columns,
poptItem  item,
int  nitems,
const char *  translation_domain 
)
static

Display popt alias and exec usage.

Parameters
fpoutput file handle
columnsoutput display width control
itemalias/exec array
nitemsno. of ara/exec entries
translation_domaintranslation domain

< set the translation domain for this table and any included tables; arg points to the domain string

< don't show in help/usage

Definition at line 1361 of file options_popt.cpp.

◆ longOptionStrcmp()

static int longOptionStrcmp ( const struct poptOption opt,
const char *  longName,
size_t  longNameLen 
)
static

Compare long option for equality, adjusting for POPT_ARGFLAG_TOGGLE.

Parameters
optoption
longNamearg option
longNameLenarg option length
Returns
does long option match?

< permit –[no]opt prefix toggle

Definition at line 2403 of file options_popt.cpp.

◆ maxArgWidth()

static size_t maxArgWidth ( const struct poptOption opt,
const char *  translation_domain 
)
static

Find display width for longest argument string.

Parameters
optoption(s)
translation_domaintranslation domain
Returns
display width

< arg points to table

< don't show in help/usage

< allow -longoption

< arg may be missing

Definition at line 1137 of file options_popt.cpp.

◆ maxColumnWidth()

static size_t maxColumnWidth ( FILE *  fp)
static

Return no. of columns in output window.

Parameters
fpFILE
Returns
no. of columns

Definition at line 791 of file options_popt.cpp.

◆ POPT_fprintf()

int POPT_fprintf ( FILE *  stream,
const char *  format,
  ... 
)

Definition at line 1895 of file options_popt.cpp.

◆ POPT_next_char()

const char * POPT_next_char ( const char *  str)

Definition at line 1880 of file options_popt.cpp.

◆ POPT_prev_char()

const char * POPT_prev_char ( const char *  str)

Definition at line 1868 of file options_popt.cpp.

◆ poptAddAlias()

int poptAddAlias ( poptContext  con,
struct poptAlias  alias,
int flags   __attribute__(__unused__) 
)

< don't show in help/usage

Definition at line 3562 of file options_popt.cpp.

◆ poptAddItem()

int poptAddItem ( poptContext  con,
poptItem  newItem,
int  flags 
)

Add alias/exec item to context.

Parameters
concontext
newItemalias/exec item to add
flags0 for alias, 1 for exec
Returns
0 on success

Definition at line 3580 of file options_popt.cpp.

◆ poptArgInfo()

static unsigned int poptArgInfo ( poptContext  con,
const struct poptOption opt 
)
static

Return argInfo field, handling POPT_ARGFLAG_TOGGLE overrides.

Parameters
concontext
optoption
Returns
argInfo

< permit –[no]opt prefix toggle

< arg will be xor'ed

< arg will be or'ed

< arg will be and'ed

< arg will be xor'ed

< arg will be or'ed

< arg will be and'ed

< arg will be negated

Definition at line 3082 of file options_popt.cpp.

◆ poptBadOption()

const char* poptBadOption ( poptContext  con,
unsigned int  flags 
)

Return the option which caused the most recent error.

Parameters
concontext
flagsoption flags
Returns
offending option

< don't go into an alias

Definition at line 3623 of file options_popt.cpp.

◆ poptBitsAdd()

int poptBitsAdd ( poptBits  bits,
const char *  s 
)

< opt->arg should not be NULL

Definition at line 2785 of file options_popt.cpp.

◆ poptBitsArgs()

int poptBitsArgs ( poptContext  con,
poptBits ap 
)

< opt->arg should not be NULL

Definition at line 2897 of file options_popt.cpp.

◆ poptBitsChk()

int poptBitsChk ( poptBits  bits,
const char *  s 
)

< opt->arg should not be NULL

Definition at line 2804 of file options_popt.cpp.

◆ poptBitsClr()

int poptBitsClr ( poptBits  bits)

< opt->arg should not be NULL

Definition at line 2827 of file options_popt.cpp.

◆ poptBitsDel()

int poptBitsDel ( poptBits  bits,
const char *  s 
)

< opt->arg should not be NULL

Definition at line 2838 of file options_popt.cpp.

◆ poptBitsIntersect()

int poptBitsIntersect ( poptBits ap,
const poptBits  b 
)

< opt->arg should not be NULL

Definition at line 2857 of file options_popt.cpp.

◆ poptBitsUnion()

int poptBitsUnion ( poptBits ap,
const poptBits  b 
)

< opt->arg should not be NULL

Definition at line 2877 of file options_popt.cpp.

◆ poptConfigFileToString()

int poptConfigFileToString ( FILE *  fp,
char **  argstrp,
int flags   __attribute__(__unused__) 
)

< opt->arg should not be NULL

< memory allocation failed

< number too large or too small

< memory allocation failed

< memory allocation failed

Definition at line 2056 of file options_popt.cpp.

◆ poptConfigLine()

static int poptConfigLine ( poptContext  con,
char *  line 
)
static

< config file failed sanity test

< don't show in help/usage

< don't show in help/usage

< don't show in help/usage

< arg will be saved as string

Definition at line 459 of file options_popt.cpp.

◆ poptDupArgv()

int poptDupArgv ( int  argc,
const char **  argv,
int *  argcPtr,
const char ***  argvPtr 
)

Duplicate an argument array.

Note
: The argument array is malloc'd as a single area, so only argv must be free'd.
Parameters
argcno. of arguments
argvargument array
Return values
argcPtraddress of returned no. of arguments
argvPtraddress of returned argument array
Returns
0 on success, POPT_ERROR_NOARG on failure

< missing argument

< missing argument

< memory allocation failed

Definition at line 1939 of file options_popt.cpp.

◆ poptFini()

poptContext poptFini ( poptContext  con)

Destroy context (alternative implementation).

Parameters
concontext
Returns
NULL always

Definition at line 714 of file options_popt.cpp.

◆ poptFreeContext()

poptContext poptFreeContext ( poptContext  con)

Destroy context.

Parameters
concontext
Returns
NULL always

Definition at line 3539 of file options_popt.cpp.

◆ poptFreeItems()

static poptItem poptFreeItems ( poptItem  items,
int  nitems 
)
static

Definition at line 3523 of file options_popt.cpp.

◆ poptGetArg()

const char* poptGetArg ( poptContext  con)

Return next argument.

Parameters
concontext
Returns
next argument, NULL if no argument is available

Definition at line 3494 of file options_popt.cpp.

◆ poptGetArgs()

const char** poptGetArgs ( poptContext  con)

Return remaining arguments.

Parameters
concontext
Returns
argument array, NULL terminated

Definition at line 3510 of file options_popt.cpp.

◆ poptGetContext()

poptContext poptGetContext ( const char *  name,
int  argc,
const char **  argv,
const struct poptOption options,
unsigned int  flags 
)

Initialize popt context.

Parameters
namecontext name (usually argv[0] program name)
argcno. of arguments
argvargument array
optionsaddress of popt option table
flagsor'd POPT_CONTEXT_* bits
Returns
initialized popt context

< pay attention to argv[0]

< options can't follow args

Definition at line 2264 of file options_popt.cpp.

◆ poptGetInvocationName()

const char* poptGetInvocationName ( poptContext  con)

Return argv[0] from context.

Parameters
concontext
Returns
argv[0]

Definition at line 3686 of file options_popt.cpp.

◆ poptGetNextOpt()

int poptGetNextOpt ( poptContext  con)

Return value of next option found.

Parameters
concontext
Returns
next option val, -1 on last item, POPT_ERROR_* on error

< unknown option

< options can't follow args

< return args as options with value 0

< unknown option

< allow -longoption

< allow -longoption

< unknown option

< strip this arg from argv(only applies to long args)

< unknown option

< unknown option

< no arg

< mutually exclusive logical operations requested

< arg should take value val

< mutually exclusive logical operations requested

< no arg

< arg may be missing

< missing argument

< strip this arg from argv(only applies to long args)

< arg may be missing

< arg should take value val

< allow -longoption

< no arg

< arg should take value val

< no arg

Definition at line 3236 of file options_popt.cpp.

◆ poptGetOptArg()

char* poptGetOptArg ( poptContext  con)

Return next option argument (if any).

Parameters
concontext
Returns
option argument, NULL if no argument is available

Definition at line 3484 of file options_popt.cpp.

◆ poptGlob()

static int poptGlob ( poptContext con   __attribute__(__unused__),
const char *  pattern,
int *  acp,
const char ***  avp 
)
static

Return path(s) from a glob pattern.

Parameters
concontext
patternglob pattern
Return values
*acpno. of paths
*avparray of paths
Returns
0 on success

Definition at line 341 of file options_popt.cpp.

◆ poptInit()

poptContext poptInit ( int  argc,
const char **  argv,
const struct poptOption options,
const char *  configPaths 
)

Initialize popt context (alternative implementation). This routine does poptGetContext() and then poptReadConfigFiles().

Parameters
argcno. of arguments
argvargument array
optionsaddress of popt option table
configPathscolon separated file path(s) to read.
Returns
initialized popt context (NULL on error).

Definition at line 720 of file options_popt.cpp.

◆ poptJlu32lpair()

void poptJlu32lpair ( const void *  key,
size_t  size,
uint32_t *  pc,
uint32_t *  pb 
)

jlu32lpair: return 2 32-bit hash values.

This is identical to jlu32l(), except it returns two 32-bit hash values instead of just one. This is good enough for hash table lookup with 2^^64 buckets, or if you want a second hash if you're not happy with the first, or if you want a probably-unique 64-bit ID for the key. *pc is better mixed than *pb, so use *pc first. If you want a 64-bit value do something like "*pc + (((uint64_t)*pb)<<32)".

Parameters
hthe previous hash, or an arbitrary value
*keythe key, an array of uint8_t values
sizethe size of the key in bytes
Return values
*pc,INprimary initval, OUT: primary hash *retval *pb IN: secondary initval, OUT: secondary hash

Definition at line 1693 of file options_popt.cpp.

◆ poptParseArgvString()

int poptParseArgvString ( const char *  s,
int *  argcPtr,
const char ***  argvPtr 
)

Parse a string into an argument array. The parse allows ', ", and \ quoting, but ' is treated the same as " and both may include \ quotes.

Note
: The argument array is malloc'd as a single area, so only argv must be free'd.
Parameters
sstring to parse
Return values
argcPtraddress of returned no. of arguments
argvPtraddress of returned argument array

< memory allocation failed

< error in paramter quoting

< error in paramter quoting

Definition at line 1980 of file options_popt.cpp.

◆ poptParseInteger()

static int poptParseInteger ( long long *  llp,
unsigned int argInfo   __attribute__(__unused__),
const char *  val 
)
static

Parse an integer expression.

Return values
*llpinteger expression value
Parameters
argInfointeger expression type
valinteger expression string
Returns
0 on success, otherwise POPT_* error.

< invalid numeric value

Definition at line 3111 of file options_popt.cpp.

◆ poptPeekArg()

const char* poptPeekArg ( poptContext  con)

Peek at current argument.

Parameters
concontext
Returns
current argument, NULL if no argument is available

Definition at line 3502 of file options_popt.cpp.

◆ poptPrintHelp()

void poptPrintHelp ( poptContext  con,
FILE *  fp,
int flags   __attribute__(__unused__) 
)

Definition at line 1272 of file options_popt.cpp.

◆ poptPrintUsage()

void poptPrintUsage ( poptContext  con,
FILE *  fp,
int flags   __attribute__(__unused__) 
)

Definition at line 1480 of file options_popt.cpp.

◆ poptReadConfigFile()

int poptReadConfigFile ( poptContext  con,
const char *  fn 
)

Read configuration file.

Parameters
concontext
fnfile name to read
Returns
0 on success, POPT_ERROR_ERRNO on failure

< config file failed sanity test

Definition at line 579 of file options_popt.cpp.

◆ poptReadConfigFiles()

int poptReadConfigFiles ( poptContext  con,
const char *  paths 
)

Read configuration file(s). Colon separated files to read, looping over poptReadConfigFile(). Note that an '@' character preceeding a path in the list will also perform additional sanity checks on the file before reading.

Parameters
concontext
pathscolon separated file name(s) to read
Returns
0 on success, POPT_ERROR_BADCONFIG on failure

< config file failed sanity test

Definition at line 629 of file options_popt.cpp.

◆ poptReadDefaultConfig()

int poptReadDefaultConfig ( poptContext  con,
int useEnv   __attribute__(__unused__) 
)

< errno set, use strerror(errno)

Definition at line 681 of file options_popt.cpp.

◆ poptReadFile()

int poptReadFile ( const char *  fn,
char **  bp,
size_t *  nbp,
int  flags 
)

Read a file into a buffer.

Parameters
fnfile name
Return values
*bpbuffer (malloc'd) (or NULL)
*nbpno. of bytes in buffer (including final NUL) (or NULL)
Parameters
flags1 to trim escaped newlines return 0 on success

< errno set, use strerror(errno)

< memory allocation failed

Definition at line 377 of file options_popt.cpp.

◆ poptResetContext()

void poptResetContext ( poptContext  con)

Reinitialize popt context.

Parameters
concontext

Definition at line 2310 of file options_popt.cpp.

◆ poptSaneFile()

int poptSaneFile ( const char *  fn)

Perform sanity checks on a file path.

Parameters
fnfile name
Returns
0 on OK, 1 on NOTOK.

Definition at line 361 of file options_popt.cpp.

◆ poptSaveArg()

static int poptSaveArg ( poptContext  con,
const struct poptOption opt 
)
static

Save the option argument through the (*opt->arg) pointer.

Parameters
concontext
optoption
Returns
0 on success, otherwise POPT_* error.

< arg ==> bit set

< dupe'd arg appended to realloc'd argv array.

< arg will be saved as string

< arg ==> int

< arg ==> short

< arg ==> long

< arg ==> long long

< arg ==> long long

< number too large or too small

< arg ==> long

< number too large or too small

< arg ==> int

< number too large or too small

< arg ==> short

< number too large or too small

< arg ==> float

< arg ==> double

< number too large or too small

< invalid numeric value

< arg ==> double

< arg ==> float

< number too large or too small

< EXPERIMENTAL: return (*arg) (argc, argv)

Definition at line 3134 of file options_popt.cpp.

◆ poptSaveBits()

int poptSaveBits ( poptBits bitsp,
unsigned int argInfo   __attribute__(__unused__),
const char *  s 
)

< opt->arg should not be NULL

Definition at line 2916 of file options_popt.cpp.

◆ poptSaveInt()

int poptSaveInt ( int *  arg,
unsigned int  argInfo,
long  aLong 
)

Save an integer, performing logical operation with value.

Warning
Alignment check may be too strict on certain platorms.
Parameters
arginteger pointer, aligned on int boundary.
argInfological operation (see POPT_ARGFLAG_*)
aLongvalue to use
Returns
0 on success, POPT_ERROR_NULLARG/POPT_ERROR_BADOPERATION

< opt->arg should not be NULL

< random value in [1,arg]

< mutually exclusive logical operations requested

< arg will be negated

< arg will be or'ed

< arg will be and'ed

< arg will be xor'ed

< arg will be or'ed

< arg will be and'ed

< arg will be xor'ed

< mutually exclusive logical operations requested

Definition at line 3025 of file options_popt.cpp.

◆ poptSaveLong()

int poptSaveLong ( long *  arg,
unsigned int  argInfo,
long  aLong 
)

Save a long, performing logical operation with value.

Warning
Alignment check may be too strict on certain platorms.
Parameters
arginteger pointer, aligned on int boundary.
argInfological operation (see POPT_ARGFLAG_*)
aLongvalue to use
Returns
0 on success, POPT_ERROR_NULLARG/POPT_ERROR_BADOPERATION

< opt->arg should not be NULL

< random value in [1,arg]

< mutually exclusive logical operations requested

< arg will be negated

< arg will be or'ed

< arg will be and'ed

< arg will be xor'ed

< arg will be or'ed

< arg will be and'ed

< arg will be xor'ed

< mutually exclusive logical operations requested

Definition at line 3001 of file options_popt.cpp.

◆ poptSaveLongLong()

int poptSaveLongLong ( long long *  arg,
unsigned int  argInfo,
long long  aLongLong 
)

Save a long long, performing logical operation with value.

Warning
Alignment check may be too strict on certain platorms.
Parameters
arginteger pointer, aligned on int boundary.
argInfological operation (see POPT_ARGFLAG_*)
aLongLongvalue to use
Returns
0 on success, POPT_ERROR_NULLARG/POPT_ERROR_BADOPERATION

< opt->arg should not be NULL

< random value in [1,arg]

< mutually exclusive logical operations requested

< arg will be negated

< arg will be or'ed

< arg will be and'ed

< arg will be xor'ed

< arg will be or'ed

< arg will be and'ed

< arg will be xor'ed

< mutually exclusive logical operations requested

Definition at line 2970 of file options_popt.cpp.

◆ poptSaveShort()

int poptSaveShort ( short *  arg,
unsigned int  argInfo,
long  aLong 
)

Save a short integer, performing logical operation with value.

Warning
Alignment check may be too strict on certain platorms.
Parameters
argshort pointer, aligned on short boundary.
argInfological operation (see POPT_ARGFLAG_*)
aLongvalue to use
Returns
0 on success, POPT_ERROR_NULLARG/POPT_ERROR_BADOPERATION

< opt->arg should not be NULL

< random value in [1,arg]

< mutually exclusive logical operations requested

< arg will be negated

< arg will be or'ed

< arg will be and'ed

< arg will be xor'ed

< arg will be or'ed

< arg will be and'ed

< arg will be xor'ed

< mutually exclusive logical operations requested

Definition at line 3049 of file options_popt.cpp.

◆ poptSaveString()

int poptSaveString ( const char ***  argvp,
unsigned int argInfo   __attribute__(__unused__),
const char *  val 
)

< opt->arg should not be NULL

Definition at line 2950 of file options_popt.cpp.

◆ poptSetExecPath()

void poptSetExecPath ( poptContext  con,
const char *  path,
int  allowAbsolute 
)

Limit search for executables.

Parameters
concontext
pathsingle path to search for executables
allowAbsoluteabsolute paths only?

Definition at line 2170 of file options_popt.cpp.

◆ poptSetOtherOptionHelp()

void poptSetOtherOptionHelp ( poptContext  con,
const char *  text 
)

Provide text to replace default "[OPTION...]" in help/usage output.

Parameters
concontext
textreplacement text

Definition at line 1515 of file options_popt.cpp.

◆ poptStrerror()

const char* poptStrerror ( const int  error)

Return formatted error string for popt failure.

Parameters
errorpopt error
Returns
error string

< missing argument

< unknown option

< mutually exclusive logical operations requested

< opt->arg should not be NULL

< aliases nested too deeply

< error in paramter quoting

< invalid numeric value

< number too large or too small

< memory allocation failed

< config file failed sanity test

< errno set, use strerror(errno)

Definition at line 3633 of file options_popt.cpp.

◆ poptStripArg()

static void poptStripArg ( poptContext  con,
int  which 
)
static

Definition at line 2754 of file options_popt.cpp.

◆ poptStrippedArgv()

int poptStrippedArgv ( poptContext  con,
int  argc,
char **  argv 
)

Shuffle argv pointers to remove stripped args, returns new argc.

Parameters
concontext
argcno. of args
argvarg vector
Returns
new argc

Definition at line 3691 of file options_popt.cpp.

◆ poptStuffArgs()

int poptStuffArgs ( poptContext  con,
const char **  argv 
)

Add arguments to context.

Parameters
concontext
argvargument array, NULL terminated
Returns
0 on success, POPT_ERROR_OPTSTOODEEP on failure

< aliases nested too deeply

Definition at line 3663 of file options_popt.cpp.

◆ showHelpIntro()

static size_t showHelpIntro ( poptContext  con,
FILE *  fp 
)
static
Parameters
concontext
fpoutput file handle

< pay attention to argv[0]

Definition at line 1254 of file options_popt.cpp.

◆ showShortOptions()

static size_t showShortOptions ( const struct poptOption opt,
FILE *  fp,
char *  str 
)
static

Return concatenated short options for display.

Todo:
Sub-tables should be recursed.
Parameters
optoption(s)
fpoutput file handle
Return values
strconcatenation of short options
Returns
length of display string

< don't show in help/usage

< arg points to table

Definition at line 1446 of file options_popt.cpp.

◆ singleOptionDefaultValue()

static char* singleOptionDefaultValue ( size_t  lineLength,
const struct poptOption opt,
const char *  translation_domain 
)
static

Display default value for an option.

Parameters
lineLengthdisplay positions remaining
optoption(s)
translation_domaintranslation domain
Returns
a pointer to the display string.

< arg should take value val

< arg ==> int

< arg ==> short

< arg ==> long

< arg ==> long long

< arg ==> float

< arg ==> double

< EXPERIMENTAL: return (*arg) (argc, argv)

< dupe'd arg appended to realloc'd argv array.

< arg will be saved as string

< no arg

Definition at line 884 of file options_popt.cpp.

◆ singleOptionHelp()

static void singleOptionHelp ( FILE *  fp,
columns_t  columns,
const struct poptOption opt,
const char *  translation_domain 
)
static

Display help text for an option.

Parameters
fpoutput file handle
columnsoutput display width control
optoption(s)
translation_domaintranslation domain

< permit –[no]opt prefix toggle

< allow -longoption

< EXPERIMENTAL: return (*arg) (argc, argv)

< allow -longoption

< permit –[no]opt prefix toggle

< arg may be missing

< show default value in –help

< no arg

< arg should take value val

< arg ==> int

< arg ==> short

< arg ==> long

< arg ==> long long

< arg ==> float

< arg ==> double

< arg will be saved as string

< EXPERIMENTAL: return (*arg) (argc, argv)

< dupe'd arg appended to realloc'd argv array.

< arg may be missing

Definition at line 962 of file options_popt.cpp.

◆ singleOptionUsage()

static size_t singleOptionUsage ( FILE *  fp,
columns_t  columns,
const struct poptOption opt,
const char *  translation_domain 
)
static

Display usage text for an option.

Parameters
fpoutput file handle
columnsoutput display width control
optoption(s)
translation_domaintranslation domain

< allow -longoption

< allow -longoption

Definition at line 1297 of file options_popt.cpp.

◆ singleTableHelp()

static void singleTableHelp ( poptContext  con,
FILE *  fp,
const struct poptOption table,
columns_t  columns,
const char *  translation_domain 
)
static

Display help text for a table of options.

Parameters
concontext
fpoutput file handle
tableoption(s)
columnsoutput display width control
translation_domaintranslation domain

< don't show in help/usage

< arg points to table

Definition at line 1212 of file options_popt.cpp.

◆ singleTableUsage()

static size_t singleTableUsage ( poptContext  con,
FILE *  fp,
columns_t  columns,
const struct poptOption opt,
const char *  translation_domain,
poptDone  done 
)
static

Display usage text for a table of options.

Parameters
concontext
fpoutput file handle
columnsoutput display width control
optoption(s)
translation_domaintranslation domain
donetables already processed
Returns
the size of the current column

< set the translation domain for this table and any included tables; arg points to the domain string

< arg points to table

< don't show in help/usage

Definition at line 1401 of file options_popt.cpp.

◆ stringDisplayWidth()

static size_t stringDisplayWidth ( const char *  s)
inlinestatic

Determine number of display characters in a string.

Parameters
sstring
Returns
no. of display characters.

Definition at line 802 of file options_popt.cpp.

◆ xcalloc()

void* xcalloc ( size_t  nmemb,
size_t  size 
)

◆ xmalloc()

void* xmalloc ( size_t  size)

◆ xrealloc()

void* xrealloc ( void *  ptr,
size_t  size 
)

◆ xstrdup()

char* xstrdup ( const char *  str)

Variable Documentation

◆ _poptArgMask

unsigned int _poptArgMask = 0x000000FFU

Definition at line 2167 of file options_popt.cpp.

◆ _poptBitsK

unsigned int _poptBitsK = 16U

Definition at line 2765 of file options_popt.cpp.

◆ _poptBitsM

unsigned int _poptBitsM = ((3U * 1024U ) / 2U)

Definition at line 2764 of file options_popt.cpp.

◆ _poptBitsN

unsigned int _poptBitsN = 1024U

Definition at line 2763 of file options_popt.cpp.

◆ _poptGroupMask

unsigned int _poptGroupMask = 0x0000FF00U

Definition at line 2168 of file options_popt.cpp.

◆ endian

const union _dbswap endian = { 0x11223344 }
static

◆ poptAliasOptions

struct poptOption poptAliasOptions[]
Initial value:
= {
{ NULL, '\0', 0, NULL, 0, NULL, NULL }
}

Empty table marker to enable displaying popt alias/exec options.

Definition at line 777 of file options_popt.cpp.

◆ poptHelpOptions

struct poptOption poptHelpOptions[]
static
Initial value:
= {
{ NULL, '\0', 5U , (void *)displayArgs, 0, NULL, NULL },
{ "help", '?', 0, NULL, (int)'?', "Show this help message" , NULL },
{ "usage", '\0', 0, NULL, (int)'u', "Display brief usage message" , NULL },
{ NULL, '\0', 0, NULL, 0, NULL, NULL }
}

Definition at line 252 of file options_popt.cpp.

◆ poptHelpOptions2

struct poptOption poptHelpOptions2[]
static
Initial value:
= {
{ NULL, '\0', 6U , (void*)"PACKAGE", 0, NULL, NULL},
{ NULL, '\0', 5U , (void *)displayArgs, 0, NULL, NULL },
{ "help", '?', 0, NULL, (int)'?', "Show this help message" , NULL },
{ "usage", '\0', 0, NULL, (int)'u', "Display brief usage message" , NULL },
{ "", '\0', 0, NULL, 0, "Terminate options" , NULL },
{ NULL, '\0', 0, NULL, 0, NULL, NULL }
}

Definition at line 261 of file options_popt.cpp.

◆ poptHelpOptionsAutoHelp

struct poptOption* poptHelpOptionsAutoHelp = poptHelpOptions

Definition at line 258 of file options_popt.cpp.

◆ poptHelpOptionsI18N

struct poptOption* poptHelpOptionsI18N = poptHelpOptions2

Definition at line 270 of file options_popt.cpp.

◆ poptString

const typedef char* poptString

Typedef's for string and array of strings.

Definition at line 218 of file options_popt.cpp.

◆ utf8_skip_data

const unsigned char utf8_skip_data[256]
static
Initial value:
= {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1
}

Definition at line 1856 of file options_popt.cpp.

NULL
#define NULL
Definition: ntv2caption608types.h:19
ROTL32
#define ROTL32(x, s)
Definition: options_popt.cpp:1580
poptHelpOptions
static struct poptOption poptHelpOptions[]
Definition: options_popt.cpp:252
displayArgs
void displayArgs(poptContext con, enum poptCallbackReason foo __attribute__((__unused__)), struct poptOption *key, const char *arg __attribute__((__unused__)), void *data __attribute__((__unused__)))
Definition: options_popt.cpp:760
poptHelpOptionsI18N
struct poptOption * poptHelpOptionsI18N
Definition: options_popt.cpp:270