About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

getopt.c File Reference
#include <stdio.h>
#include "getopt.h"
#include <strings.h>
Include dependency graph for getopt.c:

Go to the source code of this file.


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




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


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

Macro Definition Documentation

◆ _

#define _ (   msgid)    (msgid)

Definition at line 87 of file getopt.c.


#define _NO_PROTO

Definition at line 27 of file getopt.c.

◆ const

#define const

Definition at line 38 of file getopt.c.



Definition at line 52 of file getopt.c.


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


#define SWAP_FLAGS (   ch1,

Definition at line 282 of file getopt.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 185 of file getopt.c.

Function Documentation

◆ _getopt_initialize()

static char* _getopt_initialize ( int  argc,
char * *  argv,
char *  optstring 

◆ _getopt_internal()

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

◆ exchange()

static void exchange ( char **  argv)

Definition at line 299 of file getopt.c.

References __mempcpy, argv, bottom, first_nonopt, i, last_nonopt, len, malloc, memset(), middle, new_str(), NULL, optind, SWAP_FLAGS, and top.

Referenced by _getopt_internal().

◆ getenv()

char* getenv ( )

Referenced by _cairo_drm_gallium_device_create(), _cairo_drm_i915_device_create(), _cairo_gl_get_vbo_size(), _cairo_gl_msaa_compositor_enabled(), _cairo_pdf_surface_create_for_stream_internal(), _cairo_xlib_device_create(), _Ex_ConvertEnvVariables(), _getopt_initialize(), _GFile_find_program_dir(), _hb_options_init(), _pixman_disabled(), _render_restrict_env(), addFlagsFromEnvVar(), aptex_utils_get_creation_date(), aptex_utils_init_start_time(), bmeps_configure(), cairo_drm_device_get(), calledit(), checkenv(), Clp_NewParser(), ConnectToSocket(), construct_command_argv(), hb_shapers_lazy_loader_t::create(), dataDirectoryInitFn(), DecodeArgs(), Decompress(), defaultPIoptions(), define_variable_in_set(), DetectKanjiCode(), DoSpecial(), dpx_get_tmpdir(), dpx_util_get_unique_time_if_given(), drvPCB1::drvPCB1(), emtex_dir_setup(), JapaneseCalendar::enableTentativeEra(), envargv(), exec_command(), expand(), FcCacheIsMmapSafe(), FcConfigCreate(), FcConfigGetFilename(), FcConfigGetPath(), FcConfigHome(), FcConfigXdgCacheHome(), FcConfigXdgConfigHome(), FcConfigXdgDataHome(), FcDirChecksum(), FcDirChecksumNano(), FcFontSetMatchInternal(), FcGetDefaultLangs(), FcInitDebug(), FcInitLoadOwnConfig(), FileErrorHandler::FileErrorHandler(), find_file(), find_filename(), find_gs(), fsearch(), FuzzRB(), get_date_and_time(), get_default_enc(), get_line(), get_terminal_enc(), get_unique_time_if_given(), getargs(), getDefaultFirefoxCertDB_Linux(), GetEnv(), getenv_(), getenvup(), getHomeDir(), getini(), getlname(), getodir(), getopt(), getpmxmod(), getRegistryValue(), GetRemoteFrame(), getTmpPath(), gp_open_scratch_file(), guess_name(), handle_luainit(), Message::init(), init_default_kanji(), init_dfa(), init_path(), init_settings(), init_start_time(), Initialise(), initkanji(), jinit_memory_mgr(), k_popen(), kpathsea_expand_kpse_dot(), kpathsea_get_home_directory(), kpathsea_init_fallback_resolutions(), kpathsea_init_prog(), kpathsea_init_user_info(), kpathsea_selfdir(), kpathsea_set_program_name(), kpathsea_tilde_expand(), kpathsea_var_value(), kpathsea_xputenv(), lj_cf_os_getenv(), lookup_variable(), luatex_calledit(), MacLangFromLocale(), main(), maketex(), mrb_file__gethome(), MSLanguageFromLocale(), my_tmpnam(), open_cfg(), open_colorname_file(), open_sty(), Files::open_tmpnam(), openTempFile(), os_getenv(), P_GetPathToMyself(), pkg_generateLibraryFile(), pm_init(), print_usage(), PrintStartStats(), pstoedit(), RBBIRuleBuilder::RBBIRuleBuilder(), read_all_cnf(), remapShortTimeZone(), runexternalocp(), select_file_name(), set_cache_dir(), set_debug_flag(), set_libgs(), set_maketex_mag(), SignatureHandler::setNSSDir(), setpath(), setup_bound_variable(), SetupTerm(), SetupVars(), start_remote_job_p(), StartMasterServer(), synctex_edit(), synctex_test_file(), synctex_update(), synctex_view(), systempapername(), temporary_file(), texlive_gs_init(), tilde_expand(), TimeZoneDataDirInitFn(), FileSystem::tmpdir(), tzset(), uprv_getDefaultLocaleID_68(), uprv_getPOSIXIDForCategory(), uprv_tzname_68(), usearch_search_68(), usearch_searchBackwards_68(), FileSystem::userdir(), and whichPI().

◆ getopt()

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

Definition at line 972 of file getopt.c.

References _getopt_internal(), argc, and argv.

◆ my_index()

static char* my_index ( char *  str,
int  chr 

Definition at line 216 of file getopt.c.

References chr, and str.

Referenced by _getopt_internal(), and Efont::PsresDatabaseSection::add_section().

Variable Documentation

◆ __getopt_initialized

int __getopt_initialized

Definition at line 134 of file getopt.c.

Referenced by _getopt_internal().

◆ first_nonopt

int first_nonopt

Definition at line 249 of file getopt.c.

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

◆ last_nonopt

int last_nonopt

Definition at line 250 of file getopt.c.

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

◆ nextchar

char* nextchar

Definition at line 143 of file getopt.c.

Referenced by _getopt_initialize(), and _getopt_internal().

◆ optarg

char* optarg

Definition at line 113 of file getopt.c.

◆ opterr

int opterr = 1

Definition at line 148 of file getopt.c.

◆ optind

int optind = 1

Definition at line 128 of file getopt.c.

◆ optopt

int optopt = '?'

Definition at line 154 of file getopt.c.


ordering { ... } enum

◆ posixly_correct

char* posixly_correct

Definition at line 191 of file getopt.c.

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