GnuCOBOL
2.0
A free COBOL compiler
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <ctype.h>
#include "libcob.h"
#include "cobgetopt.h"
Go to the source code of this file.
Macros | |
#define | _(msgid) msgid |
#define | N_(msgid) msgid |
#define | COB_LIB_EXPIMP |
#define | NONOPTION_P (argv[cob_optind][0] != '-' || argv[cob_optind][1] == '\0') |
Enumerations | |
enum | { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } |
Functions | |
static void | exchange (char **argv) |
static const char * | _getopt_initialize (const char *optstring) |
int | cob_getopt_long_long (const int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, const int long_only) |
Variables | |
char * | cob_optarg = ((void*)0) |
int | cob_optind = 1 |
static int | cob_getopt_initialized = 0 |
static char * | nextchar = ((void*)0) |
int | cob_opterr = 1 |
int | cob_optopt = '?' |
static enum { ... } | ordering |
static int | first_nonopt |
static int | last_nonopt |
static int | seen_short = 0 |
#define _ | ( | msgid | ) | msgid |
Definition at line 44 of file cobgetopt.c.
Referenced by cob_getopt_long_long().
#define COB_LIB_EXPIMP |
Definition at line 49 of file cobgetopt.c.
#define N_ | ( | msgid | ) | msgid |
Definition at line 45 of file cobgetopt.c.
#define NONOPTION_P (argv[cob_optind][0] != '-' || argv[cob_optind][1] == '\0') |
Definition at line 52 of file cobgetopt.c.
Referenced by cob_getopt_long_long().
anonymous enum |
Enumerator | |
---|---|
REQUIRE_ORDER | |
PERMUTE | |
RETURN_IN_ORDER |
Definition at line 149 of file cobgetopt.c.
|
static |
Definition at line 236 of file cobgetopt.c.
References cob_optind, first_nonopt, last_nonopt, nextchar, NULL, ordering, PERMUTE, REQUIRE_ORDER, and RETURN_IN_ORDER.
Referenced by cob_getopt_long_long().
int cob_getopt_long_long | ( | const int | argc, |
char *const * | argv, | ||
const char * | optstring, | ||
const struct option * | longopts, | ||
int * | longind, | ||
const int | long_only | ||
) |
Definition at line 321 of file cobgetopt.c.
References _, _getopt_initialize(), cob_fast_malloc(), cob_free(), cob_getopt_initialized, cob_optarg, cob_opterr, cob_optind, cob_optopt, exchange(), first_nonopt, option::flag, option::has_arg, last_nonopt, option::name, nextchar, NONOPTION_P, NULL, ordering, PERMUTE, REQUIRE_ORDER, seen_short, and option::val.
Referenced by cob_sys_getopt_long_long(), and process_command_line().
|
static |
Definition at line 174 of file cobgetopt.c.
References cob_optind, first_nonopt, and last_nonopt.
Referenced by cob_getopt_long_long().
|
static |
Definition at line 98 of file cobgetopt.c.
Referenced by cob_getopt_long_long().
char* cob_optarg = ((void*)0) |
Definition at line 77 of file cobgetopt.c.
Referenced by cob_getopt_long_long(), cob_sys_getopt_long_long(), cobcrun_setenv(), and process_command_line().
int cob_opterr = 1 |
Definition at line 112 of file cobgetopt.c.
Referenced by cob_getopt_long_long().
int cob_optind = 1 |
Definition at line 92 of file cobgetopt.c.
Referenced by _getopt_initialize(), cob_getopt_long_long(), exchange(), and process_command_line().
int cob_optopt = '?' |
Definition at line 118 of file cobgetopt.c.
Referenced by cob_getopt_long_long().
|
static |
Definition at line 159 of file cobgetopt.c.
Referenced by _getopt_initialize(), cob_getopt_long_long(), and exchange().
|
static |
Definition at line 160 of file cobgetopt.c.
Referenced by _getopt_initialize(), cob_getopt_long_long(), and exchange().
|
static |
Definition at line 107 of file cobgetopt.c.
Referenced by _getopt_initialize(), and cob_getopt_long_long().
enum { ... } ordering |
Referenced by _getopt_initialize(), and cob_getopt_long_long().
|
static |
Definition at line 162 of file cobgetopt.c.
Referenced by cob_getopt_long_long().