Bash-5.3-alpha release

This commit is contained in:
Chet Ramey
2024-04-22 10:33:38 -04:00
parent f3b6bd1945
commit 622d318652
700 changed files with 136534 additions and 96420 deletions
+1 -1
View File
@@ -45,7 +45,7 @@
#include <pwd.h>
#if !defined (HAVE_GETPW_DECLS)
extern struct passwd *getpwuid ();
extern struct passwd *getpwuid (uid_t);
#endif /* !HAVE_GETPW_DECLS */
char *
+7 -14
View File
@@ -1,6 +1,6 @@
/* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */
/* Copyright (C) 1988-2020 Free Software Foundation, Inc.
/* Copyright (C) 1988-2020,2023 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.
@@ -68,14 +68,6 @@ extern struct passwd *getpwnam (const char *);
#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x))
#endif /* !savestring */
#if !defined (NULL)
# if defined (__STDC__)
# define NULL ((void *) 0)
# else
# define NULL 0x0
# endif /* !__STDC__ */
#endif /* !NULL */
/* 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. */
@@ -160,8 +152,9 @@ tilde_find_prefix (const char *string, int *len)
static int
tilde_find_suffix (const char *string)
{
register int i, j, string_len;
register char **suffixes;
int i, j;
size_t string_len;
char **suffixes;
suffixes = tilde_additional_suffixes;
string_len = strlen (string);
@@ -189,7 +182,7 @@ char *
tilde_expand (const char *string)
{
char *result;
int result_size, result_index;
size_t result_size, result_index;
result_index = result_size = 0;
if (result = strchr (string, '~'))
@@ -200,7 +193,7 @@ tilde_expand (const char *string)
/* Scan through STRING expanding tildes as we come to them. */
while (1)
{
register int start, end;
int start, end;
char *tilde_word, *expansion;
int len;
@@ -318,7 +311,7 @@ static char *
glue_prefix_and_suffix (char *prefix, const char *suffix, int suffind)
{
char *ret;
int plen, slen;
size_t plen, slen;
plen = (prefix && *prefix) ? strlen (prefix) : 0;
slen = strlen (suffix + suffind);