osprey/cygnus/libiberty/getopt.c File Reference

#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 ()
static char * my_index (char *str, int chr) const
static void exchange (char **argv)
static const char * _getopt_initialize (int argc, char *const *argv, 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 89 of file getopt.c.

#define GETOPT_INTERFACE_VERSION   2

Definition at line 55 of file getopt.c.

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

Referenced by _getopt_internal().

#define SWAP_FLAGS ( ch1,
ch2   ) 

Definition at line 293 of file getopt.c.

Referenced by exchange().


Enumeration Type Documentation

anonymous enum

Enumerator:
REQUIRE_ORDER 
PERMUTE 
RETURN_IN_ORDER 

Definition at line 187 of file getopt.c.


Function Documentation

static const char* _getopt_initialize ( int argc  ,
char *const *  argv,
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 310 of file getopt.c.

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

Referenced by _getopt_internal().

char* getenv (  ) 

Referenced by $auxinit(), __ompc_environment_variables(), _f_opn(), _Get_environment_variable(), _getopt_initialize(), _initialize_e_fortran_io(), _lwrite_setup(), _mcleanup(), _nl_init_domain_conv(), _PXFGETENV(), _PXFLOCALTIME(), _PXFREAD(), _PXFSETENV(), _wf_setup(), add_file_args(), add_final_ld_args(), aout_adobe_object_p(), append_default_options(), append_open64_env_flags(), ar_clear_sim_state(), bfd_find_target(), catmsgfmt(), chain_open(), change_phase_path(), check_size_and_freq(), choose_tmpdir(), cif_convert_to_cifconv(), cif_convert_to_lines(), create_go32_stub(), create_temp_file(), IPA_LNO_WRITE_FILE::Create_Temp_File(), create_tmpdir(), cwh_stmt_init_pu(), DaVinci::DaVinci(), do_compile(), Du_Sanity_Check_Matching_Du(), Du_Sanity_Check_r(), dV_view_fb_cfg(), dV_view_fb_opt_cfg(), dV_view_whirl(), emit_lkcord(), DaVinci::enabled(), f77_map_datapool_(), f77_map_datapool_pad_(), f77fatal(), f_init(), find_executable(), find_shell(), finish_repo(), fstat(), get_base_filename(), get_buffer_size(), get_command_line(), Get_Current_Working_Directory(), get_cwd(), get_debug_alloc_state(), get_emulation(), get_executable_dir_from_path(), get_key_value(), get_machine_chars(), GetPUSizeFromEnv(), getpwd(), init_cmd_line(), Init_Crash_Report(), init_crash_reporting(), init_dependency_output(), init_msg_processing(), init_phase_info(), init_release_level(), init_temp_files(), WB_BROWSER::Initialize_Keymap(), Initialize_Keymap(), CG_BROWSER::Initialize_Keymap(), ipa_compile_init(), ipacom_doit(), ipacom_process_symtab(), IPC_merge_global_tab(), ldemul_default_target(), locale_charset(), main(), make_relative_prefix(), MEM_Initialize(), mpw_start_progress(), mpwify_filename(), open_arith_file(), open_intrinsics_file(), print_buffered_messages(), PURIFY_OPT_Initialize(), read_repo_file(), run_phase(), s_abort(), save_cpp_output(), KEY_SCH::Schedule_DDG(), segv_handler(), set_defaults(), set_system_module_path(), should_display_repeats(), tlink_init(), translate_name(), unwind_init(), vho_lower_icall(), WFE_Omp_Init(), WGEN_Omp_Init(), and WN_verifier().

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

Definition at line 973 of file getopt.c.

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

Definition at line 220 of file getopt.c.

Referenced by _getopt_internal().


Variable Documentation

Definition at line 136 of file getopt.c.

Referenced by _getopt_internal().

int first_nonopt [static]

Definition at line 253 of file getopt.c.

Referenced by _getopt_initialize(), _getopt_internal(), and exchange().

int last_nonopt [static]

Definition at line 254 of file getopt.c.

Referenced by _getopt_initialize(), _getopt_internal(), and exchange().

char* nextchar [static]

char* optarg = NULL

Definition at line 115 of file getopt.c.

int opterr = 1

Definition at line 150 of file getopt.c.

int optind = 1

Definition at line 130 of file getopt.c.

int optopt = '?'

Definition at line 156 of file getopt.c.

enum { ... } ordering [static]

char* posixly_correct [static]

Definition at line 193 of file getopt.c.

Referenced by _getopt_initialize(), and _getopt_internal().


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