diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cli_new.c | 30 | ||||
-rw-r--r-- | src/cli_val.h | 10 |
2 files changed, 7 insertions, 33 deletions
diff --git a/src/cli_new.c b/src/cli_new.c index c1f5aac..83cc150 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -2074,35 +2074,7 @@ int cli_val_read(char *buf, int max_size) } return len; } -/*==========================================================*/ -/* MEMORY */ -/*==========================================================*/ - -void *my_malloc(size_t size, const char *name) -{ - return malloc(size); -} -void *my_realloc(void *ptr, size_t size, const char *name) -{ - return realloc(ptr, size); -} - -void my_free(void *ptr) -{ - free(ptr); -} - -/************************************************* - my_strdup: - do a strdup, - exit on no memory -**************************************************/ -char *my_strdup(const char *s, const char *name) -{ - return strdup(s); -} - -void done() +void done(void) { free_reuse_list(); free_path(&t_path); diff --git a/src/cli_val.h b/src/cli_val.h index 917f374..5abaaee 100644 --- a/src/cli_val.h +++ b/src/cli_val.h @@ -156,8 +156,6 @@ extern void push_path(vtw_path *path, char *segm); extern void push_path_no_escape(vtw_path *path, char *segm); extern void free_def(vtw_def *defp); extern void free_sorted(vtw_sorted *sortp); -extern void *my_malloc(size_t size, const char *name); -extern void *my_realloc(void *ptr, size_t size, const char *name); extern vtw_path m_path, t_path; @@ -167,7 +165,6 @@ extern vtw_path m_path, t_path; extern void add_val(valstruct *first, valstruct *second); extern int cli_val_read(char *buf, int max_size); extern vtw_node *make_val_node(valstruct *val); -extern char *my_strdup(const char *s, const char *name); extern valstruct str2val(char *cp); extern void dump_tree(vtw_node *node, int lev); extern void dump_def(vtw_def *defp); @@ -188,7 +185,6 @@ extern void print_msg(const char *msg, ...) extern void switch_path(first_seg *seg); extern void vtw_sort(valstruct *valp, vtw_sorted *sortp); extern void free_val(valstruct *val); -extern void my_free(void *ptr); extern void touch(void); extern int mkdir_p(const char *path); @@ -225,6 +221,12 @@ extern FILE *err_stream; extern int initialize_output(void); +/* debug hooks? */ +#define my_malloc(size, name) malloc(size) +#define my_realloc(ptr, size, name) realloc(ptr, size) +#define my_strdup(str, name) strdup(str) +#define my_free(ptr) free(ptr) + /*** debug ***/ #undef CLI_DEBUG #ifdef CLI_DEBUG |