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)  

sh4.c File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <limits.h>
#include <signal.h>
#include <errno.h>
#include <setjmp.h>
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <fcntl.h>
#include "sh.h"
Include dependency graph for sh4.c:

Go to the source code of this file.

Classes

struct  Expand
 
struct  SubType
 

Macros

#define XBASE   0 /* scanning original */
 
#define XSUB   1 /* expanding ${} string */
 
#define XARGSEP   2 /* ifs0 between "$@" */
 
#define XARG   3 /* expanding $*, $@ */
 
#define XCOM   4 /* expanding $() */
 
#define QUOTE_NONE   0 /* None */
 
#define QUOTE_INSIDE   1 /* Inside quotes */
 
#define QUOTE_TEMP   2 /* Mark a temporary quote */
 

Typedefs

typedef struct Expand Expand
 
typedef struct SubType SubType
 

Functions

static void near ExpandAWord (char *, Word_B **, int)
 
static int near VariableSubstitute (Expand *, char *, int, int)
 
static int near CommandSubstitute (Expand *, char *)
 
static char *near TrimSubstitute (SubType *, char *)
 
static int near MathsSubstitute (Expand *, char *)
 
static void near ExpandGlobCharacters (char *, Word_B **)
 
static void near GlobAWord (char *, char *, char *, Word_B **, bool)
 
static char *near RemoveMagicMarkers (unsigned char *)
 
static char *near TildeSubstitution (unsigned char *)
 
static unsigned char *near CheckForMultipleDrives (unsigned char *)
 
static bool near ProcessCommandTree (C_Op *, int)
 
static char *near WordScan (char *, int)
 
static int near HandleArrayValue (char *, char **, int)
 
static void near CheckForUnset (char *, int)
 
static void near AlternationExpand (char *, Word_B **, int)
 
static int near AlternationScan (char **, char **, char, int)
 
static void BuildVariableEntryList (const void *, VISIT, int)
 
static int near GetNumberofFloppyDrives (void)
 
char * substitute (char *cp, int ExpandMode)
 
char ** ExpandWordList (char **ap, int ExpandMode, ExeMode *PMode)
 
char * ExpandAString (char *cp, int ExpandMode)
 
char * ExpandOneStringFirstComponent (char *cp, int ExpandMode)
 
int SortCompare (const void *a1, const void *a2)
 

Variables

static char * PNullNSet = "%s: parameter null or not set"
 
static char * GVAV_Name
 
static Word_BGVAV_WordList
 

Macro Definition Documentation

◆ QUOTE_INSIDE

#define QUOTE_INSIDE   1 /* Inside quotes */

Definition at line 114 of file sh4.c.

◆ QUOTE_NONE

#define QUOTE_NONE   0 /* None */

Definition at line 113 of file sh4.c.

◆ QUOTE_TEMP

#define QUOTE_TEMP   2 /* Mark a temporary quote */

Definition at line 115 of file sh4.c.

◆ XARG

#define XARG   3 /* expanding $*, $@ */

Definition at line 106 of file sh4.c.

◆ XARGSEP

#define XARGSEP   2 /* ifs0 between "$@" */

Definition at line 105 of file sh4.c.

◆ XBASE

#define XBASE   0 /* scanning original */

Definition at line 103 of file sh4.c.

◆ XCOM

#define XCOM   4 /* expanding $() */

Definition at line 107 of file sh4.c.

◆ XSUB

#define XSUB   1 /* expanding ${} string */

Definition at line 104 of file sh4.c.

Typedef Documentation

◆ Expand

typedef struct Expand Expand

◆ SubType

typedef struct SubType SubType

Function Documentation

◆ AlternationExpand()

static void near AlternationExpand ( char *  cp,
Word_B **  WordList,
int  ExpandMode 
)
static

◆ AlternationScan()

◆ BuildVariableEntryList()

static void BuildVariableEntryList ( const void key,
VISIT  visit,
int  level 
)
static

◆ CheckForMultipleDrives()

static unsigned char *near CheckForMultipleDrives ( unsigned char *  prefix)
static

◆ CheckForUnset()

static void near CheckForUnset ( char *  name,
int  Index 
)
static

Definition at line 1700 of file sh4.c.

References FALSE, FL_TEST, FLAG_UNSET_ERROR, GetVariableArrayAsString(), name, and ShellErrorMessage().

Referenced by ExpandAWord().

◆ CommandSubstitute()

◆ ExpandAString()

char* ExpandAString ( char *  cp,
int  ExpandMode 
)

◆ ExpandAWord()

◆ ExpandGlobCharacters()

◆ ExpandOneStringFirstComponent()

char* ExpandOneStringFirstComponent ( char *  cp,
int  ExpandMode 
)

Definition at line 258 of file sh4.c.

References cp, EXPAND_GLOBBING, ExpandAString(), ExpandAWord(), NULL, w, and WordBlockSize().

Referenced by SetUpIOHandlers().

◆ ExpandWordList()

◆ GetNumberofFloppyDrives()

static int near GetNumberofFloppyDrives ( void  )
static

Definition at line 1746 of file sh4.c.

References r, and SystemInterrupt.

Referenced by ExpandGlobCharacters().

◆ GlobAWord()

◆ HandleArrayValue()

static int near HandleArrayValue ( char *  name,
char **  InputString,
int  ExpandMode 
)
static

◆ MathsSubstitute()

static int near MathsSubstitute ( Expand xp,
char *  sp 
)
static

Definition at line 1309 of file sh4.c.

References EvaluateMathsExpression(), sp, sprintf, StringCopy(), substitute(), xp, and XSUB.

Referenced by ExpandAWord().

◆ ProcessCommandTree()

◆ RemoveMagicMarkers()

static char *near RemoveMagicMarkers ( unsigned char *  Word)
static

Definition at line 1141 of file sh4.c.

References CHAR_MAGIC, dp, and sp.

Referenced by ExpandGlobCharacters().

◆ SortCompare()

int SortCompare ( const void a1,
const void a2 
)

Definition at line 1234 of file sh4.c.

References a1, a2, and strcmp().

Referenced by CompleteFileName(), EMACS_ListSavedFileNames(), and ExpandGlobCharacters().

◆ substitute()

char* substitute ( char *  cp,
int  ExpandMode 
)

◆ TildeSubstitution()

static char *near TildeSubstitution ( unsigned char *  acp)
static

◆ TrimSubstitute()

static char *near TrimSubstitute ( SubType st,
char *  pat 
)
static

◆ VariableSubstitute()

◆ WordScan()

Variable Documentation

◆ GVAV_Name

char* GVAV_Name
static

Definition at line 148 of file sh4.c.

Referenced by BuildVariableEntryList(), and VariableSubstitute().

◆ GVAV_WordList

Word_B* GVAV_WordList
static

Definition at line 151 of file sh4.c.

Referenced by BuildVariableEntryList(), and VariableSubstitute().

◆ PNullNSet

char* PNullNSet = "%s: parameter null or not set"
static

Definition at line 147 of file sh4.c.

Referenced by ExpandAWord().