zpmod  b19981f
High-performance Zsh module for script optimization and filesystem helpers
zpmod_utils.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
2 #pragma once
3 
24 char *zp_unmetafy_zalloc(const char *to_copy, int *new_len);
25 
34 char *my_ztrdup_glen(const char *s, unsigned *len_ret);
35 
46 int zp_has_option(char **argv, char opt);
47 
61 int zp_take_opt_with_arg(char ***argvp, char opt, char **out_arg);
int zp_take_opt_with_arg(char ***argvp, char opt, char **out_arg)
Consume a short option that requires an argument from argv.
Definition: utils.c:35
char * my_ztrdup_glen(const char *s, unsigned *len_ret)
Duplicate a C string using zalloc and report length.
Definition: utils.c:63
char * zp_unmetafy_zalloc(const char *to_copy, int *new_len)
Duplicate and unmetafy a zsh string using zsh allocators.
Definition: utils.c:76
int zp_has_option(char **argv, char opt)
Lightweight option scanner for argv-style subcommands.
Definition: utils.c:13