zpmod  b19981f
High-performance Zsh module for script optimization and filesystem helpers
zpmod_builtin.c File Reference
#include "zpmod.mdh"
#include "zpmod.pro"
#include "zpmod_vendor_shims.h"
#include "zpmod_bundle.h"
#include "zpmod_compaudit.h"
#include "zpmod_emoji.h"
#include "zpmod_fs.h"
#include "zpmod_rehash.h"
#include "zpmod_source.h"
#include "zpmod_utils.h"
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for zpmod_builtin.c:

Go to the source code of this file.

Functions

static int parse_delim (const char *a)
 
static int zp_append_report (const char *nam, const char *target, const char *body, int body_len)
 
void zpmod_usage (void)
 Print usage for the zpmod builtin. More...
 
static int cmd_report_append (char *nam, char **argv)
 
int bin_zpmod (char *nam, char **argv, Options ops, int func)
 
int cmd_source_study (char *nam, char **argv)
 
int cmd_dirlist (char *nam, char **argv)
 
int cmd_pathstat (char *nam, char **argv)
 
int cmd_readfile (char *nam, char **argv)
 
struct builtin * zp_get_self_builtins (size_t *count)
 

Variables

static struct builtin self_builtins []
 

Function Documentation

◆ bin_zpmod()

int bin_zpmod ( char *  nam,
char **  argv,
Options  ops,
int  func 
)

Definition at line 162 of file zpmod_builtin.c.

References cmd_dirlist(), cmd_fpath_index(), cmd_pathstat(), cmd_readfile(), cmd_report_append(), cmd_source_hot(), cmd_source_study(), zp_bundle_build_core(), zp_compaudit_cache_core(), zp_icon(), zp_path_warmup_core(), zp_rehash_diff_core(), zpmod_usage(), and zwarnnam().

Here is the call graph for this function:

◆ cmd_dirlist()

int cmd_dirlist ( char *  nam,
char **  argv 
)

Definition at line 348 of file zpmod_builtin.c.

References zp_dirlist_core(), and zwarnnam().

Referenced by bin_zpmod().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmd_pathstat()

int cmd_pathstat ( char *  nam,
char **  argv 
)

Definition at line 381 of file zpmod_builtin.c.

References zp_icon(), zp_pathstat_core(), zp_take_opt_with_arg(), and zwarnnam().

Referenced by bin_zpmod().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmd_readfile()

int cmd_readfile ( char *  nam,
char **  argv 
)

Definition at line 418 of file zpmod_builtin.c.

References zp_readfile_core(), and zwarnnam().

Referenced by bin_zpmod().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmd_report_append()

static int cmd_report_append ( char *  nam,
char **  argv 
)
static

Definition at line 131 of file zpmod_builtin.c.

References zfree(), zp_append_report(), zp_unmetafy_zalloc(), and zwarnnam().

Referenced by bin_zpmod().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmd_source_study()

int cmd_source_study ( char *  nam,
char **  argv 
)

Definition at line 313 of file zpmod_builtin.c.

References zp_source_study_core(), and zwarnnam().

Referenced by bin_zpmod().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_delim()

static int parse_delim ( const char *  a)
static

Definition at line 20 of file zpmod_builtin.c.

◆ zp_append_report()

static int zp_append_report ( const char *  nam,
const char *  target,
const char *  body,
int  body_len 
)
static

Definition at line 48 of file zpmod_builtin.c.

References gethashnode2(), paramtab, zalloc(), zp_icon(), zsfree(), and zwarnnam().

Referenced by cmd_report_append().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zp_get_self_builtins()

struct builtin* zp_get_self_builtins ( size_t *  count)

Definition at line 517 of file zpmod_builtin.c.

References self_builtins.

◆ zpmod_usage()

void zpmod_usage ( void  )

Print usage for the zpmod builtin.

Definition at line 96 of file zpmod_builtin.c.

References zp_icon().

Referenced by bin_zpmod().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ self_builtins

struct builtin self_builtins[]
static
Initial value:
= {
BUILTIN("zpmod", 0, bin_zpmod, 0, -1, 0, "hV", NULL),
}
int bin_zpmod(char *nam, char **argv, Options ops, int func)

Definition at line 418 of file zpmod_builtin.c.

Referenced by zp_get_self_builtins().