mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-03 02:10:50 +02:00
commit bash-20200605 snapshot
This commit is contained in:
+18
-18
@@ -1,6 +1,6 @@
|
||||
/* glob.c -- file-name wildcard pattern matching for Bash.
|
||||
|
||||
Copyright (C) 1985-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1985-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne-Again SHell.
|
||||
|
||||
@@ -84,11 +84,11 @@ struct globval
|
||||
char *name;
|
||||
};
|
||||
|
||||
extern void throw_to_top_level __P((void));
|
||||
extern int sh_eaccess __P((const char *, int));
|
||||
extern char *sh_makepath __P((const char *, const char *, int));
|
||||
extern int signal_is_pending __P((int));
|
||||
extern void run_pending_traps __P((void));
|
||||
extern void throw_to_top_level PARAMS((void));
|
||||
extern int sh_eaccess PARAMS((const char *, int));
|
||||
extern char *sh_makepath PARAMS((const char *, const char *, int));
|
||||
extern int signal_is_pending PARAMS((int));
|
||||
extern void run_pending_traps PARAMS((void));
|
||||
|
||||
extern int extended_glob;
|
||||
|
||||
@@ -111,29 +111,29 @@ char *glob_error_return;
|
||||
static struct globval finddirs_error_return;
|
||||
|
||||
/* Some forward declarations. */
|
||||
static int skipname __P((char *, char *, int));
|
||||
static int skipname PARAMS((char *, char *, int));
|
||||
#if HANDLE_MULTIBYTE
|
||||
static int mbskipname __P((char *, char *, int));
|
||||
static int mbskipname PARAMS((char *, char *, int));
|
||||
#endif
|
||||
void udequote_pathname __P((char *));
|
||||
void udequote_pathname PARAMS((char *));
|
||||
#if HANDLE_MULTIBYTE
|
||||
void wcdequote_pathname __P((wchar_t *));
|
||||
static void wdequote_pathname __P((char *));
|
||||
void wcdequote_pathname PARAMS((wchar_t *));
|
||||
static void wdequote_pathname PARAMS((char *));
|
||||
#else
|
||||
# define dequote_pathname udequote_pathname
|
||||
#endif
|
||||
static void dequote_pathname __P((char *));
|
||||
static int glob_testdir __P((char *, int));
|
||||
static char **glob_dir_to_array __P((char *, char **, int));
|
||||
static void dequote_pathname PARAMS((char *));
|
||||
static int glob_testdir PARAMS((char *, int));
|
||||
static char **glob_dir_to_array PARAMS((char *, char **, int));
|
||||
|
||||
/* Make sure these names continue to agree with what's in smatch.c */
|
||||
extern char *glob_patscan __P((char *, char *, int));
|
||||
extern wchar_t *glob_patscan_wc __P((wchar_t *, wchar_t *, int));
|
||||
extern char *glob_patscan PARAMS((char *, char *, int));
|
||||
extern wchar_t *glob_patscan_wc PARAMS((wchar_t *, wchar_t *, int));
|
||||
|
||||
/* And this from gmisc.c/gm_loop.c */
|
||||
extern int wextglob_pattern_p __P((wchar_t *));
|
||||
extern int wextglob_pattern_p PARAMS((wchar_t *));
|
||||
|
||||
extern char *glob_dirscan __P((char *, int));
|
||||
extern char *glob_dirscan PARAMS((char *, int));
|
||||
|
||||
/* Compile `glob_loop.c' for single-byte characters. */
|
||||
#define GCHAR unsigned char
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/* File-name wildcard pattern matching for GNU.
|
||||
Copyright (C) 1985, 1988, 1989, 2008,2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1985-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne-Again SHell.
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
#define GX_RECURSE 0x800 /* internal -- glob_filename called recursively */
|
||||
#define GX_SYMLINK 0x1000 /* internal -- symlink to a directory */
|
||||
|
||||
extern int glob_pattern_p __P((const char *));
|
||||
extern char **glob_vector __P((char *, char *, int));
|
||||
extern char **glob_filename __P((char *, int));
|
||||
extern int glob_pattern_p PARAMS((const char *));
|
||||
extern char **glob_vector PARAMS((char *, char *, int));
|
||||
extern char **glob_filename PARAMS((char *, int));
|
||||
|
||||
extern int extglob_pattern_p __P((const char *));
|
||||
extern int extglob_pattern_p PARAMS((const char *));
|
||||
|
||||
extern char *glob_error_return;
|
||||
extern int noglob_dot_filenames;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
static int INTERNAL_GLOB_PATTERN_P __P((const GCHAR *));
|
||||
static int INTERNAL_GLOB_PATTERN_P PARAMS((const GCHAR *));
|
||||
|
||||
/* Return nonzero if PATTERN has any special globbing chars in it.
|
||||
Compiled twice, once each for single-byte and multibyte characters. */
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* gmisc.c -- miscellaneous pattern matching utility functions for Bash.
|
||||
|
||||
Copyright (C) 2010-2017 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne-Again SHell.
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "glob.h"
|
||||
|
||||
/* Make sure these names continue to agree with what's in smatch.c */
|
||||
extern char *glob_patscan __P((char *, char *, int));
|
||||
extern char *glob_patscan PARAMS((char *, char *, int));
|
||||
|
||||
/* Compile `gm_loop.c' for single-byte characters. */
|
||||
#define CHAR char
|
||||
|
||||
+8
-8
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -22,16 +22,16 @@ struct STRUCT
|
||||
CHAR *string;
|
||||
};
|
||||
|
||||
int FCT __P((CHAR *, CHAR *, int));
|
||||
int FCT PARAMS((CHAR *, CHAR *, int));
|
||||
|
||||
static int GMATCH __P((CHAR *, CHAR *, CHAR *, CHAR *, struct STRUCT *, int));
|
||||
static CHAR *PARSE_COLLSYM __P((CHAR *, INT *));
|
||||
static CHAR *BRACKMATCH __P((CHAR *, U_CHAR, int));
|
||||
static int EXTMATCH __P((INT, CHAR *, CHAR *, CHAR *, CHAR *, int));
|
||||
static int GMATCH PARAMS((CHAR *, CHAR *, CHAR *, CHAR *, struct STRUCT *, int));
|
||||
static CHAR *PARSE_COLLSYM PARAMS((CHAR *, INT *));
|
||||
static CHAR *BRACKMATCH PARAMS((CHAR *, U_CHAR, int));
|
||||
static int EXTMATCH PARAMS((INT, CHAR *, CHAR *, CHAR *, CHAR *, int));
|
||||
|
||||
extern void DEQUOTE_PATHNAME __P((CHAR *));
|
||||
extern void DEQUOTE_PATHNAME PARAMS((CHAR *));
|
||||
|
||||
/*static*/ CHAR *PATSCAN __P((CHAR *, CHAR *, INT));
|
||||
/*static*/ CHAR *PATSCAN PARAMS((CHAR *, CHAR *, INT));
|
||||
|
||||
int
|
||||
FCT (pattern, string, flags)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
/* strmatch.c -- ksh-like extended pattern matching for the shell and filename
|
||||
globbing. */
|
||||
|
||||
/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -287,7 +287,7 @@ is_cclass (c, name)
|
||||
# define STREQ(s1, s2) ((wcscmp (s1, s2) == 0))
|
||||
# define STREQN(a, b, n) ((a)[0] == (b)[0] && wcsncmp(a, b, n) == 0)
|
||||
|
||||
extern char *mbsmbchar __P((const char *));
|
||||
extern char *mbsmbchar PARAMS((const char *));
|
||||
|
||||
#if FNMATCH_EQUIV_FALLBACK
|
||||
/* We don't include <fnmatch.h> in order to avoid namespace collisions; the
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/* strmatch.c -- ksh-like extended pattern matching for the shell and filename
|
||||
globbing. */
|
||||
|
||||
/* Copyright (C) 1991-2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
#include "stdc.h"
|
||||
#include "strmatch.h"
|
||||
|
||||
extern int xstrmatch __P((char *, char *, int));
|
||||
extern int xstrmatch PARAMS((char *, char *, int));
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int));
|
||||
extern int internal_wstrmatch PARAMS((wchar_t *, wchar_t *, int));
|
||||
#endif
|
||||
|
||||
int
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991-2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne-Again SHell.
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
|
||||
/* Match STRING against the filename pattern PATTERN,
|
||||
returning zero if it matches, FNM_NOMATCH if not. */
|
||||
extern int strmatch __P((char *, char *, int));
|
||||
extern int strmatch PARAMS((char *, char *, int));
|
||||
|
||||
#if HANDLE_MULTIBYTE
|
||||
extern int wcsmatch __P((wchar_t *, wchar_t *, int));
|
||||
extern int wcsmatch PARAMS((wchar_t *, wchar_t *, int));
|
||||
#endif
|
||||
|
||||
#endif /* _STRMATCH_H */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* xmbsrtowcs.c -- replacement function for mbsrtowcs */
|
||||
|
||||
/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -47,7 +47,7 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
#if ! HAVE_STRCHRNUL
|
||||
extern char *strchrnul __P((const char *, int));
|
||||
extern char *strchrnul PARAMS((const char *, int));
|
||||
#endif
|
||||
|
||||
/* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to U<0x5c>.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* imalloc.h -- internal malloc definitions shared by source files. */
|
||||
|
||||
/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -67,11 +67,11 @@
|
||||
# endif /* HAVE_BCOPY */
|
||||
#endif /* !__GNUC__ */
|
||||
|
||||
#if !defined (__P)
|
||||
#if !defined (PARAMS)
|
||||
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES)
|
||||
# define __P(protos) protos
|
||||
# define PARAMS(protos) protos
|
||||
# else
|
||||
# define __P(protos) ()
|
||||
# define PARAMS(protos) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -167,7 +167,7 @@ do { \
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
extern void _malloc_block_signals __P((sigset_t *, sigset_t *));
|
||||
extern void _malloc_unblock_signals __P((sigset_t *, sigset_t *));
|
||||
extern void _malloc_block_signals PARAMS((sigset_t *, sigset_t *));
|
||||
extern void _malloc_unblock_signals PARAMS((sigset_t *, sigset_t *));
|
||||
|
||||
#endif /* _IMALLOC_H */
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
/* mstats.h - definitions for malloc statistics */
|
||||
|
||||
/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne-Again SHell.
|
||||
|
||||
@@ -104,10 +104,10 @@ struct bucket_stats {
|
||||
int nmmap; /* currently unused */
|
||||
};
|
||||
|
||||
extern struct bucket_stats malloc_bucket_stats __P((int));
|
||||
extern struct _malstats malloc_stats __P((void));
|
||||
extern void print_malloc_stats __P((char *));
|
||||
extern void trace_malloc_stats __P((char *, char *));
|
||||
extern struct bucket_stats malloc_bucket_stats PARAMS((int));
|
||||
extern struct _malstats malloc_stats PARAMS((void));
|
||||
extern void print_malloc_stats PARAMS((char *));
|
||||
extern void trace_malloc_stats PARAMS((char *, char *));
|
||||
|
||||
#endif /* MALLOC_STATS */
|
||||
|
||||
|
||||
+18
-18
@@ -1,6 +1,6 @@
|
||||
/* Functions (currently) for use by the shell to do malloc debugging and
|
||||
tracking. */
|
||||
/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne-Again SHell.
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
#ifndef _SH_MALLOC_H
|
||||
#define _SH_MALLOC_H
|
||||
|
||||
#ifndef __P
|
||||
#ifndef PARAMS
|
||||
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
|
||||
# define __P(protos) protos
|
||||
# define PARAMS(protos) protos
|
||||
# else
|
||||
# define __P(protos) ()
|
||||
# define PARAMS(protos) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -41,30 +41,30 @@
|
||||
#endif /* PTR_T */
|
||||
|
||||
|
||||
extern PTR_T sh_malloc __P((size_t, const char *, int));
|
||||
extern PTR_T sh_realloc __P((PTR_T, size_t, const char *, int));
|
||||
extern void sh_free __P((PTR_T, const char *, int));
|
||||
extern PTR_T sh_malloc PARAMS((size_t, const char *, int));
|
||||
extern PTR_T sh_realloc PARAMS((PTR_T, size_t, const char *, int));
|
||||
extern void sh_free PARAMS((PTR_T, const char *, int));
|
||||
|
||||
extern PTR_T sh_memalign __P((size_t, size_t, const char *, int));
|
||||
extern PTR_T sh_memalign PARAMS((size_t, size_t, const char *, int));
|
||||
|
||||
extern PTR_T sh_calloc __P((size_t, size_t, const char *, int));
|
||||
extern void sh_cfree __P((PTR_T, const char *, int));
|
||||
extern PTR_T sh_calloc PARAMS((size_t, size_t, const char *, int));
|
||||
extern void sh_cfree PARAMS((PTR_T, const char *, int));
|
||||
|
||||
extern PTR_T sh_valloc __P((size_t, const char *, int));
|
||||
extern PTR_T sh_valloc PARAMS((size_t, const char *, int));
|
||||
|
||||
/* trace.c */
|
||||
extern int malloc_set_trace __P((int));
|
||||
extern int malloc_set_trace PARAMS((int));
|
||||
extern void malloc_set_tracefp (); /* full prototype requires stdio.h */
|
||||
extern void malloc_set_tracefn __P((char *, char *));
|
||||
extern void malloc_set_tracefn PARAMS((char *, char *));
|
||||
|
||||
/* table.c */
|
||||
extern void mregister_dump_table __P((void));
|
||||
extern void mregister_table_init __P((void));
|
||||
extern int malloc_set_register __P((int));
|
||||
extern void mregister_dump_table PARAMS((void));
|
||||
extern void mregister_table_init PARAMS((void));
|
||||
extern int malloc_set_register PARAMS((int));
|
||||
|
||||
/* stats.c */
|
||||
extern void print_malloc_stats __P((char *));
|
||||
extern void print_malloc_stats PARAMS((char *));
|
||||
extern void fprint_malloc_stats (); /* full prototype requires stdio.h */
|
||||
extern void trace_malloc_stats __P((char *, char *));
|
||||
extern void trace_malloc_stats PARAMS((char *, char *));
|
||||
|
||||
#endif
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/* stats.c - malloc statistics */
|
||||
|
||||
/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne-Again SHell.
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
|
||||
#include "mstats.h"
|
||||
|
||||
extern int malloc_free_blocks __P((int));
|
||||
extern int malloc_free_blocks PARAMS((int));
|
||||
|
||||
extern int malloc_mmap_threshold;
|
||||
|
||||
extern struct _malstats _mstats;
|
||||
|
||||
extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t));
|
||||
extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t));
|
||||
|
||||
struct bucket_stats
|
||||
malloc_bucket_stats (size)
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/* table.c - bookkeeping functions for allocated memory */
|
||||
|
||||
/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
|
||||
#ifdef SHELL
|
||||
extern int interrupt_immediately, running_trap;
|
||||
extern int signal_is_trapped __P((int));
|
||||
extern int signal_is_trapped PARAMS((int));
|
||||
#endif
|
||||
|
||||
extern int malloc_register;
|
||||
|
||||
#ifdef MALLOC_REGISTER
|
||||
|
||||
extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t));
|
||||
extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t));
|
||||
|
||||
#define FIND_ALLOC 0x01 /* find slot for new allocation */
|
||||
#define FIND_EXIST 0x02 /* find slot for existing entry for free() or search */
|
||||
|
||||
+10
-10
@@ -1,6 +1,6 @@
|
||||
/* table.h - definitions for tables for keeping track of allocated memory */
|
||||
|
||||
/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne-Again SHell.
|
||||
|
||||
@@ -57,12 +57,12 @@ typedef struct mr_table {
|
||||
|
||||
#define REG_TABLE_SIZE 8192
|
||||
|
||||
extern mr_table_t *mr_table_entry __P((PTR_T));
|
||||
extern void mregister_alloc __P((const char *, PTR_T, size_t, const char *, int));
|
||||
extern void mregister_free __P((PTR_T, int, const char *, int));
|
||||
extern mr_table_t *mr_table_entry PARAMS((PTR_T));
|
||||
extern void mregister_alloc PARAMS((const char *, PTR_T, size_t, const char *, int));
|
||||
extern void mregister_free PARAMS((PTR_T, int, const char *, int));
|
||||
extern void mregister_describe_mem ();
|
||||
extern void mregister_dump_table __P((void));
|
||||
extern void mregister_table_init __P((void));
|
||||
extern void mregister_dump_table PARAMS((void));
|
||||
extern void mregister_table_init PARAMS((void));
|
||||
|
||||
typedef struct ma_table {
|
||||
const char *file;
|
||||
@@ -70,10 +70,10 @@ typedef struct ma_table {
|
||||
int nalloc;
|
||||
} ma_table_t;
|
||||
|
||||
extern void mlocation_register_alloc __P((const char *, int));
|
||||
extern void mlocation_table_init __P((void));
|
||||
extern void mlocation_dump_table __P((void));
|
||||
extern void mlocation_write_table __P((void));
|
||||
extern void mlocation_register_alloc PARAMS((const char *, int));
|
||||
extern void mlocation_table_init PARAMS((void));
|
||||
extern void mlocation_dump_table PARAMS((void));
|
||||
extern void mlocation_write_table PARAMS((void));
|
||||
|
||||
/* NOTE: HASH_MIX taken from dmalloc (http://dmalloc.com) */
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* trace.c - tracing functions for malloc */
|
||||
|
||||
/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -35,7 +35,7 @@ static int _mtrace_verbose = 0;
|
||||
|
||||
#ifdef MALLOC_TRACE
|
||||
|
||||
extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t));
|
||||
extern FILE *_imalloc_fopen PARAMS((char *, char *, char *, char *, size_t));
|
||||
|
||||
FILE *_mtrace_fp = NULL;
|
||||
extern char _malloc_trace_buckets[];
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* watch.h - definitions for tables for keeping track of allocated memory */
|
||||
|
||||
/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne-Again SHell.
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
extern int _malloc_nwatch;
|
||||
|
||||
extern void _malloc_ckwatch __P((PTR_T, const char *, int, int, unsigned long));
|
||||
extern void _malloc_ckwatch PARAMS((PTR_T, const char *, int, int, unsigned long));
|
||||
|
||||
#endif /* MALLOC_WATCH */
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* casemod.c -- functions to change case of strings */
|
||||
|
||||
/* Copyright (C) 2008,2009,2015 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
#define CASE_USEWORDS 0x1000 /* modify behavior to act on words in passed string */
|
||||
|
||||
extern char *substring __P((char *, int, int));
|
||||
extern char *substring PARAMS((char *, int, int));
|
||||
|
||||
#ifndef UCHAR_MAX
|
||||
# define UCHAR_MAX TYPE_MAXIMUM(unsigned char)
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
/* eaccess.c - eaccess replacement for the shell, plus other access functions. */
|
||||
|
||||
/* Copyright (C) 2006-2010 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -52,10 +52,10 @@ extern int errno;
|
||||
#define F_OK 0
|
||||
#endif /* R_OK */
|
||||
|
||||
static int path_is_devfd __P((const char *));
|
||||
static int sh_stataccess __P((const char *, int));
|
||||
static int path_is_devfd PARAMS((const char *));
|
||||
static int sh_stataccess PARAMS((const char *, int));
|
||||
#if HAVE_DECL_SETREGID
|
||||
static int sh_euidaccess __P((const char *, int));
|
||||
static int sh_euidaccess PARAMS((const char *, int));
|
||||
#endif
|
||||
|
||||
static int
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
/* fnxform - use iconv(3) to transform strings to and from "filename" format */
|
||||
|
||||
/* Copyright (C) 2009-2010 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_LOCALE_CHARSET)
|
||||
extern const char *locale_charset __P((void));
|
||||
extern const char *locale_charset PARAMS((void));
|
||||
#else
|
||||
extern char *get_locale_var __P((char *));
|
||||
extern char *get_locale_var PARAMS((char *));
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_ICONV)
|
||||
@@ -49,9 +49,9 @@ static iconv_t conv_tofs = (iconv_t)-1;
|
||||
static char *outbuf = 0;
|
||||
static size_t outlen = 0;
|
||||
|
||||
static char *curencoding __P((void));
|
||||
static void init_tofs __P((void));
|
||||
static void init_fromfs __P((void));
|
||||
static char *curencoding PARAMS((void));
|
||||
static void init_tofs PARAMS((void));
|
||||
static void init_fromfs PARAMS((void));
|
||||
|
||||
static char *
|
||||
curencoding ()
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* fpurge - Flushing buffers of a FILE stream. */
|
||||
|
||||
/* Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#if HAVE_FPURGE
|
||||
# define fpurge _bash_fpurge
|
||||
#endif
|
||||
extern int fpurge __P((FILE *stream));
|
||||
extern int fpurge PARAMS((FILE *stream));
|
||||
|
||||
#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */
|
||||
# include <stdio_ext.h>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* makepath.c - glue PATH and DIR together into a full pathname. */
|
||||
|
||||
/* Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
# define MP_IGNDOT 0x08
|
||||
#endif
|
||||
|
||||
extern char *get_working_directory __P((char *));
|
||||
extern char *get_working_directory PARAMS((char *));
|
||||
|
||||
static char *nullpath = "";
|
||||
|
||||
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
/* mktime - convert struct tm to a time_t value */
|
||||
|
||||
/* Copyright (C) 1993-2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
Contributed by Paul Eggert (eggert@twinsun.com).
|
||||
@@ -56,13 +56,13 @@
|
||||
#define mktime my_mktime
|
||||
#endif /* DEBUG_MKTIME */
|
||||
|
||||
#ifndef __P
|
||||
#ifndef PARAMS
|
||||
#if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
|
||||
#define __P(args) args
|
||||
#define PARAMS(args) args
|
||||
#else
|
||||
#define __P(args) ()
|
||||
#define PARAMS(args) ()
|
||||
#endif /* GCC. */
|
||||
#endif /* Not __P. */
|
||||
#endif /* Not PARAMS. */
|
||||
|
||||
#ifndef CHAR_BIT
|
||||
#define CHAR_BIT 8
|
||||
@@ -117,13 +117,13 @@ const unsigned short int __mon_yday[2][13] =
|
||||
{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
|
||||
};
|
||||
|
||||
static time_t ydhms_tm_diff __P ((int, int, int, int, int, const struct tm *));
|
||||
time_t __mktime_internal __P ((struct tm *,
|
||||
static time_t ydhms_tm_diff PARAMS ((int, int, int, int, int, const struct tm *));
|
||||
time_t __mktime_internal PARAMS ((struct tm *,
|
||||
struct tm *(*) (const time_t *, struct tm *),
|
||||
time_t *));
|
||||
|
||||
|
||||
static struct tm *my_localtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *my_localtime_r PARAMS ((const time_t *, struct tm *));
|
||||
static struct tm *
|
||||
my_localtime_r (t, tp)
|
||||
const time_t *t;
|
||||
@@ -193,7 +193,7 @@ mktime (tp)
|
||||
time_t
|
||||
__mktime_internal (tp, convert, offset)
|
||||
struct tm *tp;
|
||||
struct tm *(*convert) __P ((const time_t *, struct tm *));
|
||||
struct tm *(*convert) PARAMS ((const time_t *, struct tm *));
|
||||
time_t *offset;
|
||||
{
|
||||
time_t t, dt, t0;
|
||||
|
||||
+7
-7
@@ -5,7 +5,7 @@
|
||||
* chet@ins.CWRU.Edu
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1987-2016 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -63,18 +63,18 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
#if !defined (HAVE_INET_ATON)
|
||||
extern int inet_aton __P((const char *, struct in_addr *));
|
||||
extern int inet_aton PARAMS((const char *, struct in_addr *));
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETADDRINFO
|
||||
static int _getaddr __P((char *, struct in_addr *));
|
||||
static int _getserv __P((char *, int, unsigned short *));
|
||||
static int _netopen4 __P((char *, char *, int));
|
||||
static int _getaddr PARAMS((char *, struct in_addr *));
|
||||
static int _getserv PARAMS((char *, int, unsigned short *));
|
||||
static int _netopen4 PARAMS((char *, char *, int));
|
||||
#else /* HAVE_GETADDRINFO */
|
||||
static int _netopen6 __P((char *, char *, int));
|
||||
static int _netopen6 PARAMS((char *, char *, int));
|
||||
#endif
|
||||
|
||||
static int _netopen __P((char *, char *, int));
|
||||
static int _netopen PARAMS((char *, char *, int));
|
||||
|
||||
#ifndef HAVE_GETADDRINFO
|
||||
/* Stuff the internet address corresponding to HOST into AP, in network
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* pathphys.c -- return pathname with all symlinks expanded. */
|
||||
|
||||
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
extern int errno;
|
||||
#endif /* !errno */
|
||||
|
||||
extern char *get_working_directory __P((char *));
|
||||
extern char *get_working_directory PARAMS((char *));
|
||||
|
||||
static int
|
||||
_path_readlink (path, buf, bufsiz)
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/* shquote - functions to quote and dequote strings */
|
||||
|
||||
/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#include "shmbchar.h"
|
||||
#include "shmbutil.h"
|
||||
|
||||
extern char *ansic_quote __P((char *, int, int *));
|
||||
extern int ansic_shouldquote __P((const char *));
|
||||
extern char *ansic_quote PARAMS((char *, int, int *));
|
||||
extern int ansic_shouldquote PARAMS((const char *));
|
||||
|
||||
/* Default set of characters that should be backslash-quoted in strings */
|
||||
static const char bstab[256] =
|
||||
|
||||
+21
-21
@@ -9,7 +9,7 @@
|
||||
Unix snprintf implementation.
|
||||
derived from inetutils/libinetutils/snprintf.c Version 1.1
|
||||
|
||||
Copyright (C) 2001,2006,2010,2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -129,8 +129,8 @@
|
||||
# define FL_ADDBASE 0x02 /* add base# prefix to converted value */
|
||||
# define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */
|
||||
# define FL_UNSIGNED 0x08 /* don't add any sign */
|
||||
extern char *fmtulong __P((unsigned long int, int, char *, size_t, int));
|
||||
extern char *fmtullong __P((unsigned long long int, int, char *, size_t, int));
|
||||
extern char *fmtulong PARAMS((unsigned long int, int, char *, size_t, int));
|
||||
extern char *fmtullong PARAMS((unsigned long long int, int, char *, size_t, int));
|
||||
#endif
|
||||
|
||||
#ifndef FREE
|
||||
@@ -271,38 +271,38 @@ struct DATA
|
||||
|
||||
/* the floating point stuff */
|
||||
#ifdef FLOATING_POINT
|
||||
static double pow_10 __P((int));
|
||||
static int log_10 __P((double));
|
||||
static double integral __P((double, double *));
|
||||
static char *numtoa __P((double, int, int, char **));
|
||||
static double pow_10 PARAMS((int));
|
||||
static int log_10 PARAMS((double));
|
||||
static double integral PARAMS((double, double *));
|
||||
static char *numtoa PARAMS((double, int, int, char **));
|
||||
#endif
|
||||
|
||||
static void init_data __P((struct DATA *, char *, size_t, const char *, int));
|
||||
static void init_conv_flag __P((struct DATA *));
|
||||
static void init_data PARAMS((struct DATA *, char *, size_t, const char *, int));
|
||||
static void init_conv_flag PARAMS((struct DATA *));
|
||||
|
||||
/* for the format */
|
||||
#ifdef FLOATING_POINT
|
||||
static void floating __P((struct DATA *, double));
|
||||
static void exponent __P((struct DATA *, double));
|
||||
static void floating PARAMS((struct DATA *, double));
|
||||
static void exponent PARAMS((struct DATA *, double));
|
||||
#endif
|
||||
static void number __P((struct DATA *, unsigned long, int));
|
||||
static void number PARAMS((struct DATA *, unsigned long, int));
|
||||
#ifdef HAVE_LONG_LONG
|
||||
static void lnumber __P((struct DATA *, unsigned long long, int));
|
||||
static void lnumber PARAMS((struct DATA *, unsigned long long, int));
|
||||
#endif
|
||||
static void pointer __P((struct DATA *, unsigned long));
|
||||
static void strings __P((struct DATA *, char *));
|
||||
static void pointer PARAMS((struct DATA *, unsigned long));
|
||||
static void strings PARAMS((struct DATA *, char *));
|
||||
|
||||
#ifdef FLOATING_POINT
|
||||
# define FALLBACK_FMTSIZE 32
|
||||
# define FALLBACK_BASE 4096
|
||||
# define LFALLBACK_BASE 5120
|
||||
# ifdef HAVE_LONG_DOUBLE
|
||||
static void ldfallback __P((struct DATA *, const char *, const char *, long double));
|
||||
static void ldfallback PARAMS((struct DATA *, const char *, const char *, long double));
|
||||
# endif
|
||||
static void dfallback __P((struct DATA *, const char *, const char *, double));
|
||||
static void dfallback PARAMS((struct DATA *, const char *, const char *, double));
|
||||
#endif
|
||||
|
||||
static char *groupnum __P((char *));
|
||||
static char *groupnum PARAMS((char *));
|
||||
|
||||
#if defined (HAVE_LONG_DOUBLE)
|
||||
# define LONGDOUBLE long double
|
||||
@@ -332,9 +332,9 @@ static char *groupnum __P((char *));
|
||||
|
||||
#ifdef DRIVER
|
||||
static void memory_error_and_abort ();
|
||||
static void *xmalloc __P((size_t));
|
||||
static void *xrealloc __P((void *, size_t));
|
||||
static void xfree __P((void *));
|
||||
static void *xmalloc PARAMS((size_t));
|
||||
static void *xrealloc PARAMS((void *, size_t));
|
||||
static void xfree PARAMS((void *));
|
||||
#else
|
||||
# include <xmalloc.h>
|
||||
#endif
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/* spell.c -- spelling correction for pathnames. */
|
||||
|
||||
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
#include <maxpath.h>
|
||||
#include <stdc.h>
|
||||
|
||||
static int mindist __P((char *, char *, char *));
|
||||
static int spdist __P((char *, char *));
|
||||
static int mindist PARAMS((char *, char *, char *));
|
||||
static int spdist PARAMS((char *, char *));
|
||||
|
||||
/*
|
||||
* `spname' and its helpers are inspired by the code in "The UNIX
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/* strtoimax - convert string representation of a number into an intmax_t value. */
|
||||
|
||||
/* Copyright 1999-2009 Free Software Foundation, Inc.
|
||||
/* Copyright 1999-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -45,14 +45,14 @@
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRTOL
|
||||
extern long strtol __P((const char *, char **, int));
|
||||
extern long strtol PARAMS((const char *, char **, int));
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_STRTOLL
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRTOLL && HAVE_LONG_LONG
|
||||
extern long long strtoll __P((const char *, char **, int));
|
||||
extern long long strtoll PARAMS((const char *, char **, int));
|
||||
#endif
|
||||
|
||||
#ifdef strtoimax
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/* strtoumax - convert string representation of a number into an uintmax_t value. */
|
||||
|
||||
/* Copyright 1999-2009 Free Software Foundation, Inc.
|
||||
/* Copyright 1999-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -45,14 +45,14 @@
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRTOUL
|
||||
extern unsigned long strtoul __P((const char *, char **, int));
|
||||
extern unsigned long strtoul PARAMS((const char *, char **, int));
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DECL_STRTOULL
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG
|
||||
extern unsigned long long strtoull __P((const char *, char **, int));
|
||||
extern unsigned long long strtoull PARAMS((const char *, char **, int));
|
||||
#endif
|
||||
|
||||
#ifdef strtoumax
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* times.c - times(3) library function */
|
||||
|
||||
/* Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# include <sys/resource.h>
|
||||
#endif /* HAVE_SYS_RESOURCE_H && HAVE_GETRUSAGE */
|
||||
|
||||
extern long get_clk_tck __P((void));
|
||||
extern long get_clk_tck PARAMS((void));
|
||||
|
||||
#define CONVTCK(r) (r.tv_sec * clk_tck + r.tv_usec / (1000000 / clk_tck))
|
||||
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
* tmpfile.c - functions to create and safely open temp files for the shell.
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -54,8 +54,8 @@ extern int errno;
|
||||
|
||||
extern pid_t dollar_dollar_pid;
|
||||
|
||||
static char *get_sys_tmpdir __P((void));
|
||||
static char *get_tmpdir __P((int));
|
||||
static char *get_sys_tmpdir PARAMS((void));
|
||||
static char *get_tmpdir PARAMS((int));
|
||||
|
||||
static char *sys_tmpdir = (char *)NULL;
|
||||
static int ntmpfiles;
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/* unicode.c - functions to convert unicode characters */
|
||||
|
||||
/* Copyright (C) 2010-2019 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2010-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -50,9 +50,9 @@
|
||||
#endif /* !STREQ */
|
||||
|
||||
#if defined (HAVE_LOCALE_CHARSET)
|
||||
extern const char *locale_charset __P((void));
|
||||
extern const char *locale_charset PARAMS((void));
|
||||
#else
|
||||
extern char *get_locale_var __P((char *));
|
||||
extern char *get_locale_var PARAMS((char *));
|
||||
#endif
|
||||
|
||||
extern int locale_utf8locale;
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/* winsize.c - handle window size changes and information. */
|
||||
|
||||
/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -68,9 +68,9 @@ extern int errno;
|
||||
extern int shell_tty;
|
||||
|
||||
#if defined (READLINE)
|
||||
extern void rl_set_screen_size __P((int, int));
|
||||
extern void rl_set_screen_size PARAMS((int, int));
|
||||
#endif
|
||||
extern void sh_set_lines_and_columns __P((int, int));
|
||||
extern void sh_set_lines_and_columns PARAMS((int, int));
|
||||
|
||||
void
|
||||
get_new_window_size (from_sig, rp, cp)
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/* zcatfd - copy contents of file descriptor to another */
|
||||
|
||||
/* Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
extern ssize_t zread __P((int, char *, size_t));
|
||||
extern int zwrite __P((int, char *, ssize_t));
|
||||
extern ssize_t zread PARAMS((int, char *, size_t));
|
||||
extern int zwrite PARAMS((int, char *, ssize_t));
|
||||
|
||||
/* Dump contents of file descriptor FD to OFD. FN is the filename for
|
||||
error messages (not used right now). */
|
||||
|
||||
+7
-7
@@ -1,7 +1,7 @@
|
||||
/* zgetline - read a line of input from a specified file descriptor and return
|
||||
a pointer to a newly-allocated buffer containing the data. */
|
||||
|
||||
/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
extern ssize_t zread __P((int, char *, size_t));
|
||||
extern ssize_t zreadc __P((int, char *));
|
||||
extern ssize_t zreadintr __P((int, char *, size_t));
|
||||
extern ssize_t zreadcintr __P((int, char *));
|
||||
extern ssize_t zread PARAMS((int, char *, size_t));
|
||||
extern ssize_t zreadc PARAMS((int, char *));
|
||||
extern ssize_t zreadintr PARAMS((int, char *, size_t));
|
||||
extern ssize_t zreadcintr PARAMS((int, char *));
|
||||
|
||||
typedef ssize_t breadfunc_t __P((int, char *, size_t));
|
||||
typedef ssize_t creadfunc_t __P((int, char *));
|
||||
typedef ssize_t breadfunc_t PARAMS((int, char *, size_t));
|
||||
typedef ssize_t creadfunc_t PARAMS((int, char *));
|
||||
|
||||
/* Initial memory allocation for automatic growing buffer in zreadlinec */
|
||||
#define GET_LINE_INITIAL_ALLOCATION 16
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* zmapfd - read contents of file descriptor into a newly-allocated buffer */
|
||||
|
||||
/* Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
extern ssize_t zread __P((int, char *, size_t));
|
||||
extern ssize_t zread PARAMS((int, char *, size_t));
|
||||
|
||||
/* Dump contents of file descriptor FD to *OSTR. FN is the filename for
|
||||
error messages (not used right now). */
|
||||
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
/* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */
|
||||
|
||||
/* Copyright (C) 1988-2017 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library (Readline), a library
|
||||
for reading lines of text with interactive input and history editing.
|
||||
@@ -57,10 +57,10 @@ static void *xmalloc (), *xrealloc ();
|
||||
|
||||
#if !defined (HAVE_GETPW_DECLS)
|
||||
# if defined (HAVE_GETPWUID)
|
||||
extern struct passwd *getpwuid PARAMS((uid_t));
|
||||
extern struct passwd *getpwuid (uid_t);
|
||||
# endif
|
||||
# if defined (HAVE_GETPWNAM)
|
||||
extern struct passwd *getpwnam PARAMS((const char *));
|
||||
extern struct passwd *getpwnam (const char *);
|
||||
# endif
|
||||
#endif /* !HAVE_GETPW_DECLS */
|
||||
|
||||
@@ -79,8 +79,8 @@ extern struct passwd *getpwnam PARAMS((const char *));
|
||||
/* If being compiled as part of bash, these will be satisfied from
|
||||
variables.o. If being compiled as part of readline, they will
|
||||
be satisfied from shell.o. */
|
||||
extern char *sh_get_home_dir PARAMS((void));
|
||||
extern char *sh_get_env_value PARAMS((const char *));
|
||||
extern char *sh_get_home_dir (void);
|
||||
extern char *sh_get_env_value (const char *);
|
||||
|
||||
/* The default value of tilde_additional_prefixes. This is set to
|
||||
whitespace preceding a tilde so that simple programs which do not
|
||||
@@ -116,10 +116,10 @@ char **tilde_additional_prefixes = (char **)default_prefixes;
|
||||
`:' and `=~'. */
|
||||
char **tilde_additional_suffixes = (char **)default_suffixes;
|
||||
|
||||
static int tilde_find_prefix PARAMS((const char *, int *));
|
||||
static int tilde_find_suffix PARAMS((const char *));
|
||||
static char *isolate_tilde_prefix PARAMS((const char *, int *));
|
||||
static char *glue_prefix_and_suffix PARAMS((char *, const char *, int));
|
||||
static int tilde_find_prefix (const char *, int *);
|
||||
static int tilde_find_suffix (const char *);
|
||||
static char *isolate_tilde_prefix (const char *, int *);
|
||||
static char *glue_prefix_and_suffix (char *, const char *, int);
|
||||
|
||||
/* Find the start of a tilde expansion in STRING, and return the index of
|
||||
the tilde which starts the expansion. Place the length of the text
|
||||
|
||||
Reference in New Issue
Block a user