OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
argpar-help.c File Reference
#include "argpar.h"
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for argpar-help.c:

Go to the source code of this file.

Classes

struct  item_counts
 
struct  group_limits
 

Macros

#define OPT_COL   2 /* column in which long options start */
 
#define DOC_OPT_COL   2 /* column in which doc options start */
 
#define OPT_DOC_COL   29 /* column in which option text starts */
 
#define DOC_COL   2 /* column in which group documents are printed */
 
#define ENUM_COL   8 /* column in which enum documents are printed */
 
#define ALIAS_COL   4 /* column in which alias documents are printed */
 
#define HEADER_COL   1 /* column in which group headers are printed */
 
#define WRAP_INDENT   12 /* indentation of wrapped lines */
 
#define RMARGIN   79 /* right margin used for wrapping */
 

Enumerations

enum  option_type {
  HEADER = 1, OPTION = 2, DOC = 3, HEADER = 1,
  OPTION = 2, DOC = 3
}
 
enum  child_type { MERGED = 0, NOT_MERGED = 1, MERGED = 0, NOT_MERGED = 1 }
 

Functions

int argpar_usage (argpar_state *state)
 
int argpar_usage_default (argpar *argpar)
 
int argpar_help (argpar *argpar, FILE *stream, unsigned flags, char *name)
 

Macro Definition Documentation

◆ ALIAS_COL

#define ALIAS_COL   4 /* column in which alias documents are printed */

Definition at line 15 of file argpar-help.c.

◆ DOC_COL

#define DOC_COL   2 /* column in which group documents are printed */

Definition at line 13 of file argpar-help.c.

◆ DOC_OPT_COL

#define DOC_OPT_COL   2 /* column in which doc options start */

Definition at line 11 of file argpar-help.c.

◆ ENUM_COL

#define ENUM_COL   8 /* column in which enum documents are printed */

Definition at line 14 of file argpar-help.c.

◆ HEADER_COL

#define HEADER_COL   1 /* column in which group headers are printed */

Definition at line 16 of file argpar-help.c.

◆ OPT_COL

#define OPT_COL   2 /* column in which long options start */

Definition at line 10 of file argpar-help.c.

◆ OPT_DOC_COL

#define OPT_DOC_COL   29 /* column in which option text starts */

Definition at line 12 of file argpar-help.c.

◆ RMARGIN

#define RMARGIN   79 /* right margin used for wrapping */

Definition at line 18 of file argpar-help.c.

◆ WRAP_INDENT

#define WRAP_INDENT   12 /* indentation of wrapped lines */

Definition at line 17 of file argpar-help.c.

Enumeration Type Documentation

◆ child_type

enum child_type
Enumerator
MERGED 
NOT_MERGED 
MERGED 
NOT_MERGED 

Definition at line 136 of file argpar-help.c.

◆ option_type

Enumerator
HEADER 
OPTION 
DOC 
HEADER 
OPTION 
DOC 

Definition at line 133 of file argpar-help.c.

Function Documentation

◆ argpar_help()

int argpar_help ( argpar argpar,
FILE *  stream,
unsigned  flags,
char *  name 
)

Print the default usage summary with all available sections.

Parameters
[in]argparargpar object from which to generate the usage summary.
[in]streamStream to which the help gets printed.
[in]flagsFlags controlling which sections to print. Currently unused.
[in]nameProgram name to use.
Returns
0 on success, non-0 on error.

Definition at line 512 of file argpar-help.c.

◆ argpar_usage()

int argpar_usage ( argpar_state state)

Print usage summary, called within a argpar_parser.

Parameters
[in]stateargpar_state from which to generate usage summary.
Returns
0 on success, non-0 on error.

Definition at line 506 of file argpar-help.c.

◆ argpar_usage_default()

int argpar_usage_default ( argpar argpar)

Print the default usage summary with all available sections.

Parameters
[in]argparargpar object from which to generate the usage summary.
Returns
0 on success, non-0 on error.

Definition at line 509 of file argpar-help.c.