mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-28 16:09:51 +02:00
commit bash-20200515 snapshot
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* array.h -- definitions for the interface exported by array.c that allows
|
||||
the rest of the shell to manipulate array variables. */
|
||||
|
||||
/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -43,53 +43,53 @@ typedef struct array_element {
|
||||
struct array_element *next, *prev;
|
||||
} ARRAY_ELEMENT;
|
||||
|
||||
typedef int sh_ae_map_func_t __P((ARRAY_ELEMENT *, void *));
|
||||
typedef int sh_ae_map_func_t PARAMS((ARRAY_ELEMENT *, void *));
|
||||
|
||||
/* Basic operations on entire arrays */
|
||||
extern ARRAY *array_create __P((void));
|
||||
extern void array_flush __P((ARRAY *));
|
||||
extern void array_dispose __P((ARRAY *));
|
||||
extern ARRAY *array_copy __P((ARRAY *));
|
||||
extern ARRAY *array_slice __P((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *));
|
||||
extern void array_walk __P((ARRAY *, sh_ae_map_func_t *, void *));
|
||||
extern ARRAY *array_create PARAMS((void));
|
||||
extern void array_flush PARAMS((ARRAY *));
|
||||
extern void array_dispose PARAMS((ARRAY *));
|
||||
extern ARRAY *array_copy PARAMS((ARRAY *));
|
||||
extern ARRAY *array_slice PARAMS((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *));
|
||||
extern void array_walk PARAMS((ARRAY *, sh_ae_map_func_t *, void *));
|
||||
|
||||
extern ARRAY_ELEMENT *array_shift __P((ARRAY *, int, int));
|
||||
extern int array_rshift __P((ARRAY *, int, char *));
|
||||
extern ARRAY_ELEMENT *array_unshift_element __P((ARRAY *));
|
||||
extern int array_shift_element __P((ARRAY *, char *));
|
||||
extern ARRAY_ELEMENT *array_shift PARAMS((ARRAY *, int, int));
|
||||
extern int array_rshift PARAMS((ARRAY *, int, char *));
|
||||
extern ARRAY_ELEMENT *array_unshift_element PARAMS((ARRAY *));
|
||||
extern int array_shift_element PARAMS((ARRAY *, char *));
|
||||
|
||||
extern ARRAY *array_quote __P((ARRAY *));
|
||||
extern ARRAY *array_quote_escapes __P((ARRAY *));
|
||||
extern ARRAY *array_dequote __P((ARRAY *));
|
||||
extern ARRAY *array_dequote_escapes __P((ARRAY *));
|
||||
extern ARRAY *array_remove_quoted_nulls __P((ARRAY *));
|
||||
extern ARRAY *array_quote PARAMS((ARRAY *));
|
||||
extern ARRAY *array_quote_escapes PARAMS((ARRAY *));
|
||||
extern ARRAY *array_dequote PARAMS((ARRAY *));
|
||||
extern ARRAY *array_dequote_escapes PARAMS((ARRAY *));
|
||||
extern ARRAY *array_remove_quoted_nulls PARAMS((ARRAY *));
|
||||
|
||||
extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int, int, int));
|
||||
extern char *array_patsub __P((ARRAY *, char *, char *, int));
|
||||
extern char *array_modcase __P((ARRAY *, char *, int, int));
|
||||
extern char *array_subrange PARAMS((ARRAY *, arrayind_t, arrayind_t, int, int, int));
|
||||
extern char *array_patsub PARAMS((ARRAY *, char *, char *, int));
|
||||
extern char *array_modcase PARAMS((ARRAY *, char *, int, int));
|
||||
|
||||
/* Basic operations on array elements. */
|
||||
extern ARRAY_ELEMENT *array_create_element __P((arrayind_t, char *));
|
||||
extern ARRAY_ELEMENT *array_copy_element __P((ARRAY_ELEMENT *));
|
||||
extern void array_dispose_element __P((ARRAY_ELEMENT *));
|
||||
extern ARRAY_ELEMENT *array_create_element PARAMS((arrayind_t, char *));
|
||||
extern ARRAY_ELEMENT *array_copy_element PARAMS((ARRAY_ELEMENT *));
|
||||
extern void array_dispose_element PARAMS((ARRAY_ELEMENT *));
|
||||
|
||||
extern int array_insert __P((ARRAY *, arrayind_t, char *));
|
||||
extern ARRAY_ELEMENT *array_remove __P((ARRAY *, arrayind_t));
|
||||
extern char *array_reference __P((ARRAY *, arrayind_t));
|
||||
extern int array_insert PARAMS((ARRAY *, arrayind_t, char *));
|
||||
extern ARRAY_ELEMENT *array_remove PARAMS((ARRAY *, arrayind_t));
|
||||
extern char *array_reference PARAMS((ARRAY *, arrayind_t));
|
||||
|
||||
/* Converting to and from arrays */
|
||||
extern WORD_LIST *array_to_word_list __P((ARRAY *));
|
||||
extern ARRAY *array_from_word_list __P((WORD_LIST *));
|
||||
extern WORD_LIST *array_keys_to_word_list __P((ARRAY *));
|
||||
extern WORD_LIST *array_to_word_list PARAMS((ARRAY *));
|
||||
extern ARRAY *array_from_word_list PARAMS((WORD_LIST *));
|
||||
extern WORD_LIST *array_keys_to_word_list PARAMS((ARRAY *));
|
||||
|
||||
extern ARRAY *array_assign_list __P((ARRAY *, WORD_LIST *));
|
||||
extern ARRAY *array_assign_list PARAMS((ARRAY *, WORD_LIST *));
|
||||
|
||||
extern char **array_to_argv __P((ARRAY *));
|
||||
extern char **array_to_argv PARAMS((ARRAY *));
|
||||
|
||||
extern char *array_to_kvpair __P((ARRAY *, int));
|
||||
extern char *array_to_assign __P((ARRAY *, int));
|
||||
extern char *array_to_string __P((ARRAY *, char *, int));
|
||||
extern ARRAY *array_from_string __P((char *, char *));
|
||||
extern char *array_to_kvpair PARAMS((ARRAY *, int));
|
||||
extern char *array_to_assign PARAMS((ARRAY *, int));
|
||||
extern char *array_to_string PARAMS((ARRAY *, char *, int));
|
||||
extern ARRAY *array_from_string PARAMS((char *, char *));
|
||||
|
||||
/* Flags for array_shift */
|
||||
#define AS_DISPOSE 0x01
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* general.h -- defines that everybody likes to use. */
|
||||
|
||||
/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -62,7 +62,7 @@ extern char *strchr (), *strrchr ();
|
||||
#endif
|
||||
|
||||
#if !defined (strcpy) && (defined (HAVE_DECL_STRCPY) && !HAVE_DECL_STRCPY)
|
||||
extern char *strcpy __P((char *, const char *));
|
||||
extern char *strcpy PARAMS((char *, const char *));
|
||||
#endif
|
||||
|
||||
#if !defined (savestring)
|
||||
@@ -205,43 +205,43 @@ typedef char **CPPFunction (); /* no longer used */
|
||||
/* Shell function typedefs with prototypes */
|
||||
/* `Generic' function pointer typedefs */
|
||||
|
||||
typedef int sh_intfunc_t __P((int));
|
||||
typedef int sh_ivoidfunc_t __P((void));
|
||||
typedef int sh_icpfunc_t __P((char *));
|
||||
typedef int sh_icppfunc_t __P((char **));
|
||||
typedef int sh_iptrfunc_t __P((PTR_T));
|
||||
typedef int sh_intfunc_t PARAMS((int));
|
||||
typedef int sh_ivoidfunc_t PARAMS((void));
|
||||
typedef int sh_icpfunc_t PARAMS((char *));
|
||||
typedef int sh_icppfunc_t PARAMS((char **));
|
||||
typedef int sh_iptrfunc_t PARAMS((PTR_T));
|
||||
|
||||
typedef void sh_voidfunc_t __P((void));
|
||||
typedef void sh_vintfunc_t __P((int));
|
||||
typedef void sh_vcpfunc_t __P((char *));
|
||||
typedef void sh_vcppfunc_t __P((char **));
|
||||
typedef void sh_vptrfunc_t __P((PTR_T));
|
||||
typedef void sh_voidfunc_t PARAMS((void));
|
||||
typedef void sh_vintfunc_t PARAMS((int));
|
||||
typedef void sh_vcpfunc_t PARAMS((char *));
|
||||
typedef void sh_vcppfunc_t PARAMS((char **));
|
||||
typedef void sh_vptrfunc_t PARAMS((PTR_T));
|
||||
|
||||
typedef int sh_wdesc_func_t __P((WORD_DESC *));
|
||||
typedef int sh_wlist_func_t __P((WORD_LIST *));
|
||||
typedef int sh_wdesc_func_t PARAMS((WORD_DESC *));
|
||||
typedef int sh_wlist_func_t PARAMS((WORD_LIST *));
|
||||
|
||||
typedef int sh_glist_func_t __P((GENERIC_LIST *));
|
||||
typedef int sh_glist_func_t PARAMS((GENERIC_LIST *));
|
||||
|
||||
typedef char *sh_string_func_t __P((char *)); /* like savestring, et al. */
|
||||
typedef char *sh_string_func_t PARAMS((char *)); /* like savestring, et al. */
|
||||
|
||||
typedef int sh_msg_func_t __P((const char *, ...)); /* printf(3)-like */
|
||||
typedef void sh_vmsg_func_t __P((const char *, ...)); /* printf(3)-like */
|
||||
typedef int sh_msg_func_t PARAMS((const char *, ...)); /* printf(3)-like */
|
||||
typedef void sh_vmsg_func_t PARAMS((const char *, ...)); /* printf(3)-like */
|
||||
|
||||
/* Specific function pointer typedefs. Most of these could be done
|
||||
with #defines. */
|
||||
typedef void sh_sv_func_t __P((char *)); /* sh_vcpfunc_t */
|
||||
typedef void sh_free_func_t __P((PTR_T)); /* sh_vptrfunc_t */
|
||||
typedef void sh_resetsig_func_t __P((int)); /* sh_vintfunc_t */
|
||||
typedef void sh_sv_func_t PARAMS((char *)); /* sh_vcpfunc_t */
|
||||
typedef void sh_free_func_t PARAMS((PTR_T)); /* sh_vptrfunc_t */
|
||||
typedef void sh_resetsig_func_t PARAMS((int)); /* sh_vintfunc_t */
|
||||
|
||||
typedef int sh_ignore_func_t __P((const char *)); /* sh_icpfunc_t */
|
||||
typedef int sh_ignore_func_t PARAMS((const char *)); /* sh_icpfunc_t */
|
||||
|
||||
typedef int sh_assign_func_t __P((const char *));
|
||||
typedef int sh_wassign_func_t __P((WORD_DESC *, int));
|
||||
typedef int sh_assign_func_t PARAMS((const char *));
|
||||
typedef int sh_wassign_func_t PARAMS((WORD_DESC *, int));
|
||||
|
||||
typedef int sh_load_func_t __P((char *));
|
||||
typedef void sh_unload_func_t __P((char *));
|
||||
typedef int sh_load_func_t PARAMS((char *));
|
||||
typedef void sh_unload_func_t PARAMS((char *));
|
||||
|
||||
typedef int sh_builtin_func_t __P((WORD_LIST *)); /* sh_wlist_func_t */
|
||||
typedef int sh_builtin_func_t PARAMS((WORD_LIST *)); /* sh_wlist_func_t */
|
||||
|
||||
#endif /* SH_FUNCTION_TYPEDEF */
|
||||
|
||||
@@ -295,77 +295,77 @@ typedef int QSFUNC ();
|
||||
|
||||
#if 0
|
||||
/* Declarations for functions defined in xmalloc.c */
|
||||
extern PTR_T xmalloc __P((size_t));
|
||||
extern PTR_T xrealloc __P((void *, size_t));
|
||||
extern void xfree __P((void *));
|
||||
extern PTR_T xmalloc PARAMS((size_t));
|
||||
extern PTR_T xrealloc PARAMS((void *, size_t));
|
||||
extern void xfree PARAMS((void *));
|
||||
#endif
|
||||
|
||||
/* Declarations for functions defined in general.c */
|
||||
extern void posix_initialize __P((int));
|
||||
extern void posix_initialize PARAMS((int));
|
||||
|
||||
extern int num_posix_options __P((void));
|
||||
extern char *get_posix_options __P((char *));
|
||||
extern void set_posix_options __P((const char *));
|
||||
extern int num_posix_options PARAMS((void));
|
||||
extern char *get_posix_options PARAMS((char *));
|
||||
extern void set_posix_options PARAMS((const char *));
|
||||
|
||||
extern void save_posix_options __P((void));
|
||||
extern void save_posix_options PARAMS((void));
|
||||
|
||||
#if defined (RLIMTYPE)
|
||||
extern RLIMTYPE string_to_rlimtype __P((char *));
|
||||
extern void print_rlimtype __P((RLIMTYPE, int));
|
||||
extern RLIMTYPE string_to_rlimtype PARAMS((char *));
|
||||
extern void print_rlimtype PARAMS((RLIMTYPE, int));
|
||||
#endif
|
||||
|
||||
extern int all_digits __P((const char *));
|
||||
extern int legal_number __P((const char *, intmax_t *));
|
||||
extern int legal_identifier __P((const char *));
|
||||
extern int importable_function_name __P((const char *, size_t));
|
||||
extern int exportable_function_name __P((const char *));
|
||||
extern int check_identifier __P((WORD_DESC *, int));
|
||||
extern int valid_nameref_value __P((const char *, int));
|
||||
extern int check_selfref __P((const char *, char *, int));
|
||||
extern int legal_alias_name __P((const char *, int));
|
||||
extern int line_isblank __P((const char *));
|
||||
extern int assignment __P((const char *, int));
|
||||
extern int all_digits PARAMS((const char *));
|
||||
extern int legal_number PARAMS((const char *, intmax_t *));
|
||||
extern int legal_identifier PARAMS((const char *));
|
||||
extern int importable_function_name PARAMS((const char *, size_t));
|
||||
extern int exportable_function_name PARAMS((const char *));
|
||||
extern int check_identifier PARAMS((WORD_DESC *, int));
|
||||
extern int valid_nameref_value PARAMS((const char *, int));
|
||||
extern int check_selfref PARAMS((const char *, char *, int));
|
||||
extern int legal_alias_name PARAMS((const char *, int));
|
||||
extern int line_isblank PARAMS((const char *));
|
||||
extern int assignment PARAMS((const char *, int));
|
||||
|
||||
extern int sh_unset_nodelay_mode __P((int));
|
||||
extern int sh_setclexec __P((int));
|
||||
extern int sh_validfd __P((int));
|
||||
extern int fd_ispipe __P((int));
|
||||
extern void check_dev_tty __P((void));
|
||||
extern int move_to_high_fd __P((int, int, int));
|
||||
extern int check_binary_file __P((const char *, int));
|
||||
extern int sh_unset_nodelay_mode PARAMS((int));
|
||||
extern int sh_setclexec PARAMS((int));
|
||||
extern int sh_validfd PARAMS((int));
|
||||
extern int fd_ispipe PARAMS((int));
|
||||
extern void check_dev_tty PARAMS((void));
|
||||
extern int move_to_high_fd PARAMS((int, int, int));
|
||||
extern int check_binary_file PARAMS((const char *, int));
|
||||
|
||||
#ifdef _POSIXSTAT_H_
|
||||
extern int same_file __P((const char *, const char *, struct stat *, struct stat *));
|
||||
extern int same_file PARAMS((const char *, const char *, struct stat *, struct stat *));
|
||||
#endif
|
||||
|
||||
extern int sh_openpipe __P((int *));
|
||||
extern int sh_closepipe __P((int *));
|
||||
extern int sh_openpipe PARAMS((int *));
|
||||
extern int sh_closepipe PARAMS((int *));
|
||||
|
||||
extern int file_exists __P((const char *));
|
||||
extern int file_isdir __P((const char *));
|
||||
extern int file_iswdir __P((const char *));
|
||||
extern int path_dot_or_dotdot __P((const char *));
|
||||
extern int absolute_pathname __P((const char *));
|
||||
extern int absolute_program __P((const char *));
|
||||
extern int file_exists PARAMS((const char *));
|
||||
extern int file_isdir PARAMS((const char *));
|
||||
extern int file_iswdir PARAMS((const char *));
|
||||
extern int path_dot_or_dotdot PARAMS((const char *));
|
||||
extern int absolute_pathname PARAMS((const char *));
|
||||
extern int absolute_program PARAMS((const char *));
|
||||
|
||||
extern char *make_absolute __P((const char *, const char *));
|
||||
extern char *base_pathname __P((char *));
|
||||
extern char *full_pathname __P((char *));
|
||||
extern char *polite_directory_format __P((char *));
|
||||
extern char *trim_pathname __P((char *, int));
|
||||
extern char *printable_filename __P((char *, int));
|
||||
extern char *make_absolute PARAMS((const char *, const char *));
|
||||
extern char *base_pathname PARAMS((char *));
|
||||
extern char *full_pathname PARAMS((char *));
|
||||
extern char *polite_directory_format PARAMS((char *));
|
||||
extern char *trim_pathname PARAMS((char *, int));
|
||||
extern char *printable_filename PARAMS((char *, int));
|
||||
|
||||
extern char *extract_colon_unit __P((char *, int *));
|
||||
extern char *extract_colon_unit PARAMS((char *, int *));
|
||||
|
||||
extern void tilde_initialize __P((void));
|
||||
extern char *bash_tilde_find_word __P((const char *, int, int *));
|
||||
extern char *bash_tilde_expand __P((const char *, int));
|
||||
extern void tilde_initialize PARAMS((void));
|
||||
extern char *bash_tilde_find_word PARAMS((const char *, int, int *));
|
||||
extern char *bash_tilde_expand PARAMS((const char *, int));
|
||||
|
||||
extern int group_member __P((gid_t));
|
||||
extern char **get_group_list __P((int *));
|
||||
extern int *get_group_array __P((int *));
|
||||
extern int group_member PARAMS((gid_t));
|
||||
extern char **get_group_list PARAMS((int *));
|
||||
extern int *get_group_array PARAMS((int *));
|
||||
|
||||
extern char *conf_standard_path __P((void));
|
||||
extern int default_columns __P((void));
|
||||
extern char *conf_standard_path PARAMS((void));
|
||||
extern int default_columns PARAMS((void));
|
||||
|
||||
#endif /* _GENERAL_H_ */
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
BUILD_DIR=/usr/local/build/bash/bash-current
|
||||
BUILD_DIR=/usr/local/build/chet/bash/bash-current
|
||||
THIS_SH=$BUILD_DIR/bash
|
||||
PATH=$PATH:$BUILD_DIR
|
||||
|
||||
|
||||
+10
-10
@@ -3,7 +3,7 @@
|
||||
/* I can't stand it anymore! Please can't we just write the
|
||||
whole Unix system in lisp or something? */
|
||||
|
||||
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -76,15 +76,15 @@ typedef union uwp {
|
||||
} sv;
|
||||
} UNWIND_ELT;
|
||||
|
||||
static void without_interrupts __P((VFunction *, char *, char *));
|
||||
static void unwind_frame_discard_internal __P((char *, char *));
|
||||
static void unwind_frame_run_internal __P((char *, char *));
|
||||
static void add_unwind_protect_internal __P((Function *, char *));
|
||||
static void remove_unwind_protect_internal __P((char *, char *));
|
||||
static void run_unwind_protects_internal __P((char *, char *));
|
||||
static void clear_unwind_protects_internal __P((char *, char *));
|
||||
static inline void restore_variable __P((SAVED_VAR *));
|
||||
static void unwind_protect_mem_internal __P((char *, char *));
|
||||
static void without_interrupts PARAMS((VFunction *, char *, char *));
|
||||
static void unwind_frame_discard_internal PARAMS((char *, char *));
|
||||
static void unwind_frame_run_internal PARAMS((char *, char *));
|
||||
static void add_unwind_protect_internal PARAMS((Function *, char *));
|
||||
static void remove_unwind_protect_internal PARAMS((char *, char *));
|
||||
static void run_unwind_protects_internal PARAMS((char *, char *));
|
||||
static void clear_unwind_protects_internal PARAMS((char *, char *));
|
||||
static inline void restore_variable PARAMS((SAVED_VAR *));
|
||||
static void unwind_protect_mem_internal PARAMS((char *, char *));
|
||||
|
||||
static UNWIND_ELT *unwind_protect_list = (UNWIND_ELT *)NULL;
|
||||
|
||||
|
||||
+12
-12
@@ -1,6 +1,6 @@
|
||||
/* unwind_prot.h - Macros and functions for hacking unwind protection. */
|
||||
|
||||
/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -21,26 +21,26 @@
|
||||
#if !defined (_UNWIND_PROT_H)
|
||||
#define _UNWIND_PROT_H
|
||||
|
||||
extern void uwp_init __P((void));
|
||||
extern void uwp_init PARAMS((void));
|
||||
|
||||
/* Run a function without interrupts. */
|
||||
extern void begin_unwind_frame __P((char *));
|
||||
extern void discard_unwind_frame __P((char *));
|
||||
extern void run_unwind_frame __P((char *));
|
||||
extern void begin_unwind_frame PARAMS((char *));
|
||||
extern void discard_unwind_frame PARAMS((char *));
|
||||
extern void run_unwind_frame PARAMS((char *));
|
||||
extern void add_unwind_protect (); /* Not portable to arbitrary C99 hosts. */
|
||||
extern void remove_unwind_protect __P((void));
|
||||
extern void run_unwind_protects __P((void));
|
||||
extern void clear_unwind_protect_list __P((int));
|
||||
extern int have_unwind_protects __P((void));
|
||||
extern int unwind_protect_tag_on_stack __P((const char *));
|
||||
extern void uwp_init __P((void));
|
||||
extern void remove_unwind_protect PARAMS((void));
|
||||
extern void run_unwind_protects PARAMS((void));
|
||||
extern void clear_unwind_protect_list PARAMS((int));
|
||||
extern int have_unwind_protects PARAMS((void));
|
||||
extern int unwind_protect_tag_on_stack PARAMS((const char *));
|
||||
extern void uwp_init PARAMS((void));
|
||||
|
||||
/* Define for people who like their code to look a certain way. */
|
||||
#define end_unwind_frame()
|
||||
|
||||
/* How to protect a variable. */
|
||||
#define unwind_protect_var(X) unwind_protect_mem ((char *)&(X), sizeof (X))
|
||||
extern void unwind_protect_mem __P((char *, int));
|
||||
extern void unwind_protect_mem PARAMS((char *, int));
|
||||
|
||||
/* Backwards compatibility */
|
||||
#define unwind_protect_int unwind_protect_var
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* xmalloc.h -- defines for the `x' memory allocation functions */
|
||||
|
||||
/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#endif /* PTR_T */
|
||||
|
||||
/* Allocation functions in xmalloc.c */
|
||||
extern PTR_T xmalloc __P((size_t));
|
||||
extern PTR_T xrealloc __P((void *, size_t));
|
||||
extern void xfree __P((void *));
|
||||
extern PTR_T xmalloc PARAMS((size_t));
|
||||
extern PTR_T xrealloc PARAMS((void *, size_t));
|
||||
extern void xfree PARAMS((void *));
|
||||
|
||||
#if defined(USING_BASH_MALLOC) && !defined (DISABLE_MALLOC_WRAPPERS)
|
||||
extern PTR_T sh_xmalloc __P((size_t, const char *, int));
|
||||
extern PTR_T sh_xrealloc __P((void *, size_t, const char *, int));
|
||||
extern void sh_xfree __P((void *, const char *, int));
|
||||
extern PTR_T sh_xmalloc PARAMS((size_t, const char *, int));
|
||||
extern PTR_T sh_xrealloc PARAMS((void *, size_t, const char *, int));
|
||||
extern void sh_xfree PARAMS((void *, const char *, int));
|
||||
|
||||
#define xmalloc(x) sh_xmalloc((x), __FILE__, __LINE__)
|
||||
#define xrealloc(x, n) sh_xrealloc((x), (n), __FILE__, __LINE__)
|
||||
@@ -54,7 +54,7 @@ extern void sh_xfree __P((void *, const char *, int));
|
||||
#endif
|
||||
#define free(x) sh_xfree((x), __FILE__, __LINE__)
|
||||
|
||||
extern PTR_T sh_malloc __P((size_t, const char *, int));
|
||||
extern PTR_T sh_malloc PARAMS((size_t, const char *, int));
|
||||
|
||||
#ifdef malloc
|
||||
#undef malloc
|
||||
|
||||
Reference in New Issue
Block a user