osprey-gcc-4.2.0/libiberty/getopt.c File Reference

#include "ansidecl.h"
#include <stdio.h>
#include "getopt.h"

Include dependency graph for getopt.c:

Go to the source code of this file.

Defines

#define GETOPT_INTERFACE_VERSION   2
#define _(msgid)   (msgid)
#define SWAP_FLAGS(ch1, ch2)
#define NONOPTION_P   (argv[optind][0] != '-' || argv[optind][1] == '\0')

Enumerations

enum  { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }

Functions/Subroutines

char * getenv (const char *)
static char * my_index (const char *str, int chr)
static void exchange (char **argv)
static const char * _getopt_initialize (int argc ATTRIBUTE_UNUSED, char *const *argv ATTRIBUTE_UNUSED, const char *optstring)
int _getopt_internal (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only)
int getopt (int argc, char *const *argv, const char *optstring)

Variables

char * optarg = NULL
int optind = 1
int __getopt_initialized = 0
static char * nextchar
int opterr = 1
int optopt = '?'
static enum { ... }  ordering
static char * posixly_correct
static int first_nonopt
static int last_nonopt


Define Documentation

#define _ ( msgid   )     (msgid)

Definition at line 90 of file getopt.c.

#define GETOPT_INTERFACE_VERSION   2

Definition at line 56 of file getopt.c.

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

#define SWAP_FLAGS ( ch1,
ch2   ) 

Definition at line 300 of file getopt.c.


Enumeration Type Documentation

anonymous enum

Enumerator:
REQUIRE_ORDER 
PERMUTE 
RETURN_IN_ORDER 

Definition at line 188 of file getopt.c.


Function Documentation

static const char* _getopt_initialize ( int argc  ATTRIBUTE_UNUSED,
char *const *argv  ATTRIBUTE_UNUSED,
const char *  optstring 
) [static]

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

static void exchange ( char **  argv  )  [static]

Definition at line 317 of file getopt.c.

References first_nonopt, i, last_nonopt, len, malloc, mempcpy(), memset, NULL, optind, SWAP_FLAGS, and top.

char* getenv ( const char *   ) 

int getopt ( int  argc,
char *const *  argv,
const char *  optstring 
)

Definition at line 974 of file getopt.c.

References _getopt_internal().

static char* my_index ( const char *  str,
int  chr 
) [static]

Definition at line 229 of file getopt.c.


Variable Documentation

Definition at line 137 of file getopt.c.

int first_nonopt [static]

Definition at line 260 of file getopt.c.

int last_nonopt [static]

Definition at line 261 of file getopt.c.

char* nextchar [static]

Definition at line 146 of file getopt.c.

char* optarg = NULL

int opterr = 1

Definition at line 151 of file getopt.c.

Referenced by _getopt_internal(), parse_args(), and process_cmd_line().

int optind = 1

int optopt = '?'

Definition at line 157 of file getopt.c.

Referenced by _getopt_internal(), and process_cmd_line().

enum { ... } ordering [static]

char* posixly_correct [static]

Definition at line 194 of file getopt.c.


Generated on Wed Apr 8 15:02:51 2009 for Open64 by  doxygen 1.5.6