zpmod  b19981f
High-performance Zsh module for script optimization and filesystem helpers
zpmod_internals.h File Reference
#include <stddef.h>
#include <stdio.h>
Include dependency graph for zpmod_internals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ZPMOD_INTERNALS_FALLBACK_H
 

Typedefs

typedef struct eprog * Eprog
 
typedef struct patprog * Patprog
 
typedef struct hashtable * HashTable
 
typedef struct hashnode * HashNode
 
typedef struct builtin * Builtin
 
typedef struct funcstackFuncstack
 
typedef struct features * Features
 
typedef struct module * Module
 

Functions

char ** zarrdup (char **)
 
char * ztrdup (const char *)
 
char * unmeta (char *)
 
void pushheap (void)
 
void popheap (void)
 
char * zhtricat (const char *, const char *, const char *)
 
void freearray (char **)
 
void zerrnam (const char *, const char *,...)
 
void zwarnnam (const char *, const char *,...)
 
void zwarn (const char *,...)
 
void * zhalloc (size_t)
 
void * zshcalloc (size_t)
 
int movefd (int)
 
int strsfx (const char *, const char *)
 
void queue_signals (void)
 
void unqueue_signals (void)
 
HashTable newhashtable (int, char *, PrintTableStats)
 
unsigned int hasher (const char *)
 
void emptyhashtable (HashTable)
 
void addhashnode (HashTable, char *, void *)
 
HashNode removehashnode (HashTable, const char *)
 
void deletehashtable (HashTable)
 
HashNode gethashnode2 (HashTable, const char *)
 
int loop (int, int)
 
void freeeprog (Eprog)
 
int bin_zcompile (char *, char **, void *, int)
 
void incrdumpcount (void *)
 
void shinbufsave (void)
 
void shinbufrestore (void)
 
int dosetopt (int, int, int, unsigned char *)
 
int arrlen (char **)
 
void printprompt4 (void)
 
void execode (Eprog, int, int, char *)
 
char * dyncat (const char *, const char *)
 

Variables

volatile long lastval
 
volatile int retflag
 
volatile int errflag
 
volatile int exit_pending
 
volatile int trap_state
 
char opts []
 
char ** pparams
 
char * argzero
 
char ** path
 
char * scriptname
 
char * scriptfilename
 
int trap_return
 
int SHIN
 
int subsh
 
int thisjob
 
int loops
 
void * cmdstack
 
int cmdsp
 
int sourcelevel
 
Funcstack funcstack
 
short * fdtable
 
HashTable shfunctab
 
HashTable builtintab
 
struct eprog dummy_eprog
 
char * pwd
 
FILE * xtrerr
 
zlong lineno
 

Macro Definition Documentation

◆ ZPMOD_INTERNALS_FALLBACK_H

#define ZPMOD_INTERNALS_FALLBACK_H

Definition at line 15 of file zpmod_internals.h.

Typedef Documentation

◆ Builtin

typedef struct builtin* Builtin

Definition at line 33 of file zpmod_internals.h.

◆ Eprog

typedef struct eprog* Eprog

Definition at line 25 of file zpmod_internals.h.

◆ Features

typedef struct features* Features

Definition at line 35 of file zpmod_internals.h.

◆ Funcstack

typedef struct funcstack* Funcstack

Definition at line 34 of file zpmod_internals.h.

◆ HashNode

typedef struct hashnode* HashNode

Definition at line 31 of file zpmod_internals.h.

◆ HashTable

typedef struct hashtable* HashTable

Definition at line 29 of file zpmod_internals.h.

◆ Module

typedef struct module* Module

Definition at line 36 of file zpmod_internals.h.

◆ Patprog

typedef struct patprog* Patprog

Definition at line 27 of file zpmod_internals.h.

Function Documentation

◆ addhashnode()

void addhashnode ( HashTable  ,
char *  ,
void *   
)

Referenced by cmd_fpath_index(), custom_source(), and zp_source_setup_overrides().

Here is the caller graph for this function:

◆ arrlen()

int arrlen ( char **  )

Referenced by cmd_source_hot(), and zp_path_warmup_core().

Here is the caller graph for this function:

◆ bin_zcompile()

int bin_zcompile ( char *  ,
char **  ,
void *  ,
int   
)

Referenced by custom_try_source_file().

Here is the caller graph for this function:

◆ deletehashtable()

void deletehashtable ( HashTable  )

Referenced by zp_source_restore_overrides().

Here is the caller graph for this function:

◆ dosetopt()

int dosetopt ( int  ,
int  ,
int  ,
unsigned char *   
)

Referenced by custom_source().

Here is the caller graph for this function:

◆ dyncat()

char* dyncat ( const char *  ,
const char *   
)

Referenced by custom_try_source_file().

Here is the caller graph for this function:

◆ emptyhashtable()

void emptyhashtable ( HashTable  )

Referenced by zp_source_setup_overrides().

Here is the caller graph for this function:

◆ execode()

void execode ( Eprog  ,
int  ,
int  ,
char *   
)

Referenced by custom_source().

Here is the caller graph for this function:

◆ freearray()

void freearray ( char **  )

Referenced by bin_custom_dot().

Here is the caller graph for this function:

◆ freeeprog()

void freeeprog ( Eprog  )

Referenced by custom_source().

Here is the caller graph for this function:

◆ gethashnode2()

HashNode gethashnode2 ( HashTable  ,
const char *   
)

Referenced by cmd_fpath_index(), zp_append_report(), zp_build_source_report(), and zp_source_setup_overrides().

Here is the caller graph for this function:

◆ hasher()

unsigned int hasher ( const char *  )

Referenced by zp_source_setup_overrides().

Here is the caller graph for this function:

◆ incrdumpcount()

void incrdumpcount ( void *  )

Referenced by custom_check_dump_file().

Here is the caller graph for this function:

◆ loop()

int loop ( int  ,
int   
)

Referenced by custom_source().

Here is the caller graph for this function:

◆ movefd()

int movefd ( int  )

Referenced by custom_source().

Here is the caller graph for this function:

◆ newhashtable()

HashTable newhashtable ( int  ,
char *  ,
PrintTableStats   
)

Referenced by zp_source_setup_overrides().

Here is the caller graph for this function:

◆ popheap()

void popheap ( void  )

Referenced by bin_custom_dot(), and custom_source().

Here is the caller graph for this function:

◆ printprompt4()

void printprompt4 ( void  )

Referenced by custom_source().

Here is the caller graph for this function:

◆ pushheap()

void pushheap ( void  )

Referenced by bin_custom_dot(), and custom_source().

Here is the caller graph for this function:

◆ queue_signals()

void queue_signals ( void  )

Referenced by custom_try_source_file().

Here is the caller graph for this function:

◆ removehashnode()

HashNode removehashnode ( HashTable  ,
const char *   
)

Referenced by zp_source_setup_overrides().

Here is the caller graph for this function:

◆ shinbufrestore()

void shinbufrestore ( void  )

Referenced by custom_source().

Here is the caller graph for this function:

◆ shinbufsave()

void shinbufsave ( void  )

Referenced by custom_source().

Here is the caller graph for this function:

◆ strsfx()

int strsfx ( const char *  ,
const char *   
)

Referenced by custom_try_source_file().

Here is the caller graph for this function:

◆ unmeta()

char* unmeta ( char *  )

Referenced by bin_custom_dot(), and custom_source().

Here is the caller graph for this function:

◆ unqueue_signals()

void unqueue_signals ( void  )

Referenced by custom_try_source_file().

Here is the caller graph for this function:

◆ zarrdup()

char** zarrdup ( char **  )

Referenced by bin_custom_dot().

Here is the caller graph for this function:

◆ zerrnam()

void zerrnam ( const char *  ,
const char *  ,
  ... 
)

Referenced by bin_custom_dot().

Here is the caller graph for this function:

◆ zhalloc()

void* zhalloc ( size_t  )

Referenced by custom_load_dump_header().

Here is the caller graph for this function:

◆ zhtricat()

char* zhtricat ( const char *  ,
const char *  ,
const char *   
)

Referenced by bin_custom_dot().

Here is the caller graph for this function:

◆ zshcalloc()

void* zshcalloc ( size_t  )

Referenced by custom_source().

Here is the caller graph for this function:

◆ ztrdup()

char* ztrdup ( const char *  )

Referenced by bin_custom_dot(), bin_readarray(), cmd_fpath_index(), cmd_source_hot(), custom_source(), custom_try_source_file(), zp_build_source_report(), zp_cc_base_cache_dir(), zp_cc_load_cache(), zp_path_warmup_core(), and zp_rh_base_cache_dir().

Here is the caller graph for this function:

◆ zwarn()

void zwarn ( const char *  ,
  ... 
)

Referenced by zp_source_setup_overrides().

Here is the caller graph for this function:

◆ zwarnnam()

void zwarnnam ( const char *  ,
const char *  ,
  ... 
)

Variable Documentation

◆ argzero

char* argzero
extern

Referenced by bin_custom_dot().

◆ builtintab

◆ cmdsp

int cmdsp
extern

Referenced by custom_source().

◆ cmdstack

void* cmdstack
extern

Referenced by custom_source().

◆ dummy_eprog

struct eprog dummy_eprog
extern

Referenced by custom_check_dump_file().

◆ errflag

volatile int errflag
extern

Referenced by custom_source().

◆ exit_pending

volatile int exit_pending
extern

Referenced by custom_source().

◆ fdtable

short* fdtable
extern

Referenced by custom_source().

◆ funcstack

Funcstack funcstack
extern

Referenced by custom_source().

◆ lastval

volatile long lastval
extern

Referenced by bin_custom_dot(), and custom_source().

◆ lineno

zlong lineno
extern

Referenced by custom_source().

◆ loops

int loops
extern

Referenced by custom_source().

◆ opts

char opts[]
extern

Referenced by custom_source().

◆ path

◆ pparams

char** pparams
extern

Referenced by bin_custom_dot().

◆ pwd

char* pwd
extern

Referenced by custom_source().

◆ retflag

volatile int retflag
extern

Referenced by custom_source().

◆ scriptfilename

char* scriptfilename
extern

Referenced by custom_source().

◆ scriptname

char* scriptname
extern

Referenced by custom_source().

◆ shfunctab

HashTable shfunctab
extern

Referenced by cmd_fpath_index().

◆ SHIN

int SHIN
extern

Referenced by custom_source().

◆ sourcelevel

int sourcelevel
extern

Referenced by custom_source().

◆ subsh

int subsh
extern

Referenced by custom_source().

◆ thisjob

int thisjob
extern

Referenced by custom_source().

◆ trap_return

int trap_return
extern

Referenced by custom_source().

◆ trap_state

volatile int trap_state
extern

Referenced by custom_source().

◆ xtrerr

FILE* xtrerr
extern

Referenced by custom_source().