w32tex
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 dependency graph for getopt.c:

Go to the source code of this file.

Macros

#define _NO_PROTO
 
#define const
 
#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

char * getenv ()
 
int strncmp ()
 
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)
 

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
 

Macro Definition Documentation

◆ _

#define _ (   msgid)    (msgid)

Definition at line 89 of file getopt.c.

◆ _NO_PROTO

#define _NO_PROTO

Definition at line 30 of file getopt.c.

◆ const

#define const

Definition at line 41 of file getopt.c.

◆ GETOPT_INTERFACE_VERSION

#define GETOPT_INTERFACE_VERSION   2

Definition at line 55 of file getopt.c.

◆ NONOPTION_P

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

◆ SWAP_FLAGS

#define SWAP_FLAGS (   ch1,
  ch2 
)

Definition at line 288 of file getopt.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
REQUIRE_ORDER 
PERMUTE 
RETURN_IN_ORDER 

Definition at line 187 of file getopt.c.

Function Documentation

◆ _getopt_initialize()

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

◆ _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)
static

Definition at line 305 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 ( )

◆ getopt()

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

Definition at line 966 of file getopt.c.

References _getopt_internal(), argc, and argv.

◆ my_index()

static char* my_index ( char *  str,
int  chr 
)
static

Definition at line 215 of file getopt.c.

References chr, and str.

Referenced by _getopt_internal().

◆ strncmp()

int strncmp ( )

Referenced by _cairo_dtostr(), _cairo_ps_surface_emit_header(), _cairo_ps_surface_set_bounding_box(), _cairo_toy_font_face_create_impl_face(), _getopt_internal(), _getopt_internal_r(), _hb_print_func(), _pixman_disabled(), _synctex_match_string(), _synctex_scanner_get_tag(), _TIFFSetupFieldInfo(), addinfo(), AddValue(), agl_name_is_unicode(), GString::appendfv(), GooString::appendfv(), appendToPath(), bbdospecial(), EPSFile::bbox(), build_vms_cmd(), cairo_type1_font_for_each_subr(), ccbaReadStream(), check_cmd_pattern(), check_for_mp(), check_for_pdf(), check_for_ps(), check_keyword(), check_next_obj(), check_type_by_header(), CheckDash(), PDFDoc::checkFooter(), CheckForFD(), PDFDoc::checkHeader(), checkhmem(), checkIfHint(), checkjfont(), checkligkern(), CheckRest(), checktypebyheader(), chkcontinue(), chkpageattr(), CIDFont_base_open(), CIDFromName(), Clp_SetOptions(), CMap_parse_check_sig(), LangTag::cmp(), OT::cff1::accelerator_t::gname_t::cmp(), color_special(), compare_options(), Compiler::Compiler(), comptype_access(), construct_command_argv_internal(), XRef::constructObjectEntry(), XRef::constructXRef(), ContextualMatch(), ContinueValue(), convert(), convert1(), copyfile_general(), copyFontDict(), hb_shapers_lazy_loader_t::create(), CurrentCyrillicFontFamily(), DecodeArgs(), decomptype_access(), deleteParen(), DetectKanjiCode(), dev_dospecial(), dev_predospecial(), dev_wl_initfontdict(), DGifOpenFILE(), dictform(), do_args(), do_pos_special(), dolink(), dopage(), dospecial(), dpx_clear_cache_filter(), dpx_find_dfont_file(), drvplot::drvplot(), dumparabicdata(), eexec_line(), EMACS_FileCompletion(), EMACS_PatternMatch(), emit_asm_label(), emit_fold(), emit_lib(), EncFromUni(), evenodd(), f_open(), FcConfigGetFilename(), FcConfigPathStartsWith(), FcElementMap(), FcFileScanConfig(), FcFileScanFontConfig(), FcStrCanonAbsoluteFilename(), fea_classesSplit(), feature_merger_activate(), fgetboundingbox(), FigureAlternates(), file_base_name(), fillrealarray(), find_field(), find_table_index(), find_xref(), FindDictValue(), findGraphiteFeatureNamed(), findGraphiteFeatureSettingNamed(), Package::findItem(), findnativefont(), fnmetrics(), fontdef(), FontDef(), gdImageCreateFromGifCtx(), get_cidsysinfo(), get_enc_password(), get_line(), get_next(), get_usertable(), XFAScanner::getDatasetsValue(), getdefaults(), getenc(), getEncoding(), getfigFontnumber(), getFontNumber(), getjsubfont(), getLiteralName(), getMissingLimit(), graphite2::Locale2Lang::getMsId(), getName(), getopt(), getOption(), GetPhysicalPath(), getservername(), XRef::getStartXref(), PDFDoc::getStartXRef(), getSubStringFontNumber(), hb_font_t::glyph_from_string(), glyphnameIsComponent(), handle_header(), hb_ot_tags_from_complex_language(), headerFields(), identNode(), idxread(), PDFToSVG::imageIsValid(), in_ps_checker(), initArgs(), Initialise(), is_code_block_open(), is_htex_special(), is_pdf_special(), japanese(), jit_cpudetect(), jitopt_flag(), jitopt_param(), keyWordMatch(), kpathsea_get_command_line_args_utf8(), kpathsea_xputenv(), lang_matches(), libdef_name(), libdef_push(), lines_dont_match(), load_enc(), load_enc_file(), loadAATfont(), LoadColornameFile(), loadjitmodule(), LoadKerningDataFromAfm(), LoadNamelist(), loadOTfont(), lookup_reference(), luaopen_zlib(), MacLangFromLocale(), main(), Efont::Type1Definition::make(), make_xbb_filename(), makecomposites(), makeextent(), makekern(), maketrailer(), ZxDoc::match(), maybeDefinition(), maybeEnvironment(), mime_putc(), mp_parse_headers(), mps_scan_bbox(), mrb_file_basename(), MSLanguageFromLocale(), name_lookup(), names_match(), NamesStartWith(), nexttoken(), notpre_access(), om_special(), open_output(), optMatch(), optParseOptions(), PageHistoryRecord(), FoFiType1::parse(), parse(), parse_args(), parse_charstring(), parse_command(), parse_filename(), parse_pdf_boolean(), parse_pdf_null(), parse_pdf_stream(), parse_pdfmark(), parse_string(), parse_trailer(), parse_xref(), parse_xref_table(), ZxDoc::parseAttr(), ZxDoc::parseCDSect(), ZxDoc::parseCharData(), parseCharName(), ZxDoc::parseComment(), parsedimen(), parseFile(), GlobalParams::parseKey(), parseline(), ZxDoc::parsePI(), parser_yylex(), pbm_loadfont(), pcomp(), pdf_open_document(), pdf_read_object(), PerformBigCmd(), ppm_parsecolor(), pre_access(), predospecial(), print_composefont(), printheader(), printprologue(), printscript(), printsetup(), process_begin(), process_pfa(), processOptions(), ps_parse_special(), PSCodeInit(), pscopyuntil(), pushglobalfuncname(), putenv(), Efont::Type1Font::read(), read_config_file(), Efont::Type1Font::read_encoding(), read_file(), read_fits_header(), Efont::Type1Font::read_synthetic_font(), read_type1_file(), DCTStream::readAdobeMarker(), readCommonFeatures(), readdvifile(), ReadFrame(), ReadGIF(), readin(), ReadInputFileNames(), ReadMachineNames(), readmetrics(), Package::readPackage(), ReadParamFile(), ReadPPM(), ReadPSFontMap(), ReadReply(), ReadSubfont(), ReadXPMFile(), readzoneinfo(), refPdfDocument(), reset_input(), retrieve_coding_scheme(), rsearch(), scan(), scan_dimen_part(), scan_font(), scanfile(), scanfontcomments(), scanfontusage(), ScanHistory(), scanifont(), SCScriptFromUnicode(), search_flifile(), SearchDictName(), searchfile(), SearchHistory(), SeparateLine(), set_coding_scheme(), set_default_pdf_filename(), DataDict::setTransform(), SFD_GetFont(), SFDGetTtInstrs(), SFDGetTtTable(), SFDParseMathItem(), SFDParseMMSubroutine(), drvFIG::show_text(), drvMMA::show_text(), skipdocument(), SlurpDollarEquation(), spc_dvips_setup_handler(), spc_handler_pdfm_literal(), spc_handler_ps_literal(), spc_handler_xtx_clipoverlay(), spc_misc_check_special(), spc_misc_setup_handler(), splitup_read_line(), src_special(), sstrncmp(), str_eq_cstr(), strafter(), stringrgb(), strip_options(), strncmp_nullcheck(), strpos2(), t1_check_unique_id(), t1_subset_ascii_part(), t1mac_output_ascii(), TabbingGetRow(), test1(), Efont::Type1Reader::test_charstring(), tex_enableprimitives(), TIFFClose(), TIFFNoEncode(), trans2dvi(), trytoparseenc(), ttf_copy_font(), ttf_name_lookup(), UniFromName(), FormWidgetSignature::updateOffsets(), usage(), value_after(), vmsify(), vq_compareRegion(), FoFiType1::writeEncoded(), WriteFontHeader(), writeOTLScriptAndLanguages(), writepagesetup(), writevf(), and writevfu().

Variable Documentation

◆ __getopt_initialized

int __getopt_initialized = 0

Definition at line 136 of file getopt.c.

◆ first_nonopt

int first_nonopt
static

Definition at line 248 of file getopt.c.

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

◆ last_nonopt

int last_nonopt
static

Definition at line 249 of file getopt.c.

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

◆ nextchar

char* nextchar
static

Definition at line 145 of file getopt.c.

Referenced by _getopt_initialize(), and _getopt_internal().

◆ optarg

char* optarg = NULL

Definition at line 115 of file getopt.c.

◆ opterr

int opterr = 1

Definition at line 150 of file getopt.c.

◆ optind

int optind = 1

Definition at line 130 of file getopt.c.

◆ optopt

int optopt = '?'

Definition at line 156 of file getopt.c.

◆ 

ordering { ... } enum

◆ posixly_correct

char* posixly_correct
static

Definition at line 193 of file getopt.c.

Referenced by _getopt_initialize(), and _getopt_internal().