|
CUBRID Engine
latest
|
#include <assert.h>#include "config.h"#include <errno.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "cubrid_getopt.h"
Go to the source code of this file.
Macros | |
| #define | REPLACE_GETOPT |
| #define | _DIAGASSERT(e) |
| #define | IGNORE_FIRST (*options == '-' || *options == '+') |
| #define | PRINT_ERROR |
| #define | IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) |
| #define | PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) |
| #define | IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-') |
| #define | BADCH (int)'?' |
| #define | BADARG (int)':' |
| #define | INORDER (int)1 |
| #define | EMSG "" |
Functions | |
| static int | getopt_internal (int, char *const *, const char *) |
| static int | gcd (int, int) |
| static void | permute_args (int, int, int, char *const *) |
| static void | xwarnx (const char *,...) |
| int | getopt (int nargc, char *const *nargv, const char *options) |
| int | getopt_long (int nargc, char *const *nargv, const char *options, const struct option *long_options, int *idx) |
Variables | |
| int | opterr = 1 |
| int | optind = 1 |
| int | optopt = '?' |
| int | optreset |
| char * | optarg = NULL |
| static char * | place = EMSG |
| static int | nonopt_start = -1 |
| static int | nonopt_end = -1 |
| static const char | recargchar [] = "option requires an argument -- %c" |
| static const char | recargstring [] = "option requires an argument -- %s" |
| static const char | ambig [] = "ambiguous option -- %.*s" |
| static const char | noarg [] = "option doesn't take an argument -- %.*s" |
| static const char | illoptchar [] = "illegal option -- %c" |
| static const char | illoptstring [] = "illegal option -- %s" |
| static const char * | progname |
| #define _DIAGASSERT | ( | e | ) |
Definition at line 44 of file cubrid_getopt_long.c.
Referenced by getopt_internal(), and getopt_long().
| #define BADARG (int)':' |
Definition at line 70 of file cubrid_getopt_long.c.
Referenced by getopt_internal(), and getopt_long().
| #define BADCH (int)'?' |
Definition at line 69 of file cubrid_getopt_long.c.
Referenced by getopt_internal(), and getopt_long().
| #define EMSG "" |
Definition at line 72 of file cubrid_getopt_long.c.
Referenced by getopt_internal(), and getopt_long().
| #define IGNORE_FIRST (*options == '-' || *options == '+') |
Definition at line 61 of file cubrid_getopt_long.c.
Referenced by getopt_internal().
| #define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-') |
Definition at line 67 of file cubrid_getopt_long.c.
Referenced by getopt_internal().
| #define INORDER (int)1 |
Definition at line 71 of file cubrid_getopt_long.c.
Referenced by getopt_internal().
| #define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) |
Definition at line 64 of file cubrid_getopt_long.c.
| #define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) |
Definition at line 65 of file cubrid_getopt_long.c.
Referenced by getopt_internal().
| #define PRINT_ERROR |
Definition at line 62 of file cubrid_getopt_long.c.
Referenced by getopt_internal(), and getopt_long().
| #define REPLACE_GETOPT |
Definition at line 41 of file cubrid_getopt_long.c.
|
static |
Definition at line 113 of file cubrid_getopt_long.c.
Referenced by permute_args().

Definition at line 331 of file cubrid_getopt_long.c.
References getopt_internal(), nonopt_start, optind, and permute_args().
Referenced by admin_getid_cmd(), get_args(), and main().

Definition at line 172 of file cubrid_getopt_long.c.
References _DIAGASSERT, BADARG, BADCH, EMSG, IGNORE_FIRST, IN_ORDER, INORDER, nonopt_start, NULL, optind, PERMUTE, permute_args(), place, PRINT_ERROR, and xwarnx().
Referenced by getopt(), and getopt_long().

| int getopt_long | ( | int | nargc, |
| char *const * | nargv, | ||
| const char * | options, | ||
| const struct option * | long_options, | ||
| int * | idx | ||
| ) |
Definition at line 361 of file cubrid_getopt_long.c.
References _DIAGASSERT, BADARG, BADCH, EMSG, option::flag, getopt_internal(), option::has_arg, i, option::name, no_argument, nonopt_start, NULL, optind, optional_argument, permute_args(), place, PRINT_ERROR, required_argument, strlen, option::val, and xwarnx().
Referenced by main(), us_hb_status_get_options(), us_hb_stop_get_options(), us_hb_util_get_options(), and util_parse_argument().

|
static |
Definition at line 134 of file cubrid_getopt_long.c.
References gcd(), i, nonopt_end, and nonopt_start.
Referenced by getopt(), getopt_internal(), and getopt_long().

|
static |
Definition at line 96 of file cubrid_getopt_long.c.
Referenced by getopt_internal(), and getopt_long().

Definition at line 87 of file cubrid_getopt_long.c.
Definition at line 89 of file cubrid_getopt_long.c.
Definition at line 90 of file cubrid_getopt_long.c.
|
static |
Definition at line 88 of file cubrid_getopt_long.c.
|
static |
Definition at line 82 of file cubrid_getopt_long.c.
Referenced by permute_args().
|
static |
Definition at line 81 of file cubrid_getopt_long.c.
Referenced by getopt(), getopt_internal(), getopt_long(), and permute_args().
| char* optarg = NULL |
Definition at line 55 of file cubrid_getopt_long.c.
Referenced by admin_getid_cmd(), get_args(), main(), us_hb_status_get_options(), us_hb_stop_get_options(), us_hb_util_get_options(), and util_parse_argument().
| int opterr = 1 |
Definition at line 51 of file cubrid_getopt_long.c.
| int optind = 1 |
Definition at line 52 of file cubrid_getopt_long.c.
Referenced by get_args(), getopt(), getopt_internal(), getopt_long(), main(), us_hb_status_get_options(), us_hb_stop_get_options(), us_hb_util_get_options(), and util_parse_argument().
| int optopt = '?' |
Definition at line 53 of file cubrid_getopt_long.c.
| int optreset |
Definition at line 54 of file cubrid_getopt_long.c.
|
static |
Definition at line 78 of file cubrid_getopt_long.c.
Referenced by getopt_internal(), and getopt_long().
|
static |
Definition at line 92 of file cubrid_getopt_long.c.
|
static |
Definition at line 85 of file cubrid_getopt_long.c.
|
static |
Definition at line 86 of file cubrid_getopt_long.c.