COOPY » Guide  version 0.6.5
Defines | Enumerations | Functions | Variables
/home/paulfitz/cvs/coopy_scm/coopy/src/libcoopy_full/gnulib_getopt/getopt.c File Reference
#include "gnulib_getopt/getopt.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "gnulib_getopt/gettext.h"
#include "gnulib_getopt/getopt_int.h"

Go to the source code of this file.

Defines

#define SWAP_FLAGS(ch1, ch2)
#define _(x)   x
#define NONOPTION_P   (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')

Enumerations

enum  { POSIXLY_CORRECT = 1 }

Functions

static void exchange (char **argv, struct _getopt_data *d)
static const char * _getopt_initialize (int argc, char **argv, const char *optstring, struct _getopt_data *d, int posixly_correct)
int _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct)
int gnulib_getopt_internal (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct)
int getopt (int argc, char *const *argv, const char *optstring)

Variables

char * optarg
int optind = 1
int opterr = 1
int optopt = '?'
static struct _getopt_data getopt_data

Define Documentation

#define _ (   x)    x
#define NONOPTION_P   (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')

Referenced by _getopt_internal_r().

#define SWAP_FLAGS (   ch1,
  ch2 
)

Definition at line 128 of file getopt.c.

Referenced by exchange().


Enumeration Type Documentation

anonymous enum
Enumerator:
POSIXLY_CORRECT 

Definition at line 1152 of file getopt.c.


Function Documentation

static const char* _getopt_initialize ( int  argc,
char **  argv,
const char *  optstring,
struct _getopt_data d,
int  posixly_correct 
) [static]
int _getopt_internal_r ( int  argc,
char **  argv,
const char *  optstring,
const struct option longopts,
int *  longind,
int  long_only,
struct _getopt_data d,
int  posixly_correct 
)
static void exchange ( char **  argv,
struct _getopt_data d 
) [static]
int getopt ( int  argc,
char *const *  argv,
const char *  optstring 
)

Definition at line 1156 of file getopt.c.

References gnulib_getopt_internal(), and POSIXLY_CORRECT.

int gnulib_getopt_internal ( int  argc,
char **  argv,
const char *  optstring,
const struct option longopts,
int *  longind,
int  long_only,
int  posixly_correct 
)

Variable Documentation

struct _getopt_data getopt_data [static]

Definition at line 94 of file getopt.c.

Referenced by gnulib_getopt_internal().

char* optarg

Definition at line 64 of file getopt.c.

Referenced by coopy::app::Options::apply(), gnulib_getopt_internal(), and main().

int opterr = 1

Definition at line 84 of file getopt.c.

Referenced by gnulib_getopt_internal().

int optind = 1

Definition at line 79 of file getopt.c.

Referenced by coopy::app::Options::apply(), gnulib_getopt_internal(), and main().

int optopt = '?'

Definition at line 90 of file getopt.c.

Referenced by gnulib_getopt_internal().

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines