mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-27 15:43:18 +02:00
bash-3.1 more stray file cleanup
This commit is contained in:
@@ -1,82 +0,0 @@
|
||||
Starting bash with the `--posix' command-line option or executing
|
||||
`set -o posix' while bash is running will cause bash to conform more
|
||||
closely to the Posix.2 standard by changing the behavior to match that
|
||||
specified by Posix.2 in areas where the bash default differs.
|
||||
|
||||
The following list is what's changed when `posix mode' is in effect:
|
||||
|
||||
1. When a command in the hash table no longer exists, bash will re-search
|
||||
$PATH to find the new location. This is also available with
|
||||
`shopt -s checkhash'.
|
||||
|
||||
2. The >& redirection does not redirect stdout and stderr.
|
||||
|
||||
3. The message printed by the job control code and builtins when a job
|
||||
exits with a non-zero status is `Done(status)'.
|
||||
|
||||
4. Reserved words may not be aliased.
|
||||
|
||||
5. The Posix.2 PS1 and PS2 expansions of `!' -> history number and
|
||||
`!!' -> `!' are enabled, and parameter expansion is performed on
|
||||
the value regardless of the setting of the `promptvars' option.
|
||||
|
||||
6. Interactive comments are enabled by default. (Note that bash has
|
||||
them on by default anyway.)
|
||||
|
||||
7. The Posix.2 startup files are executed ($ENV) rather than the normal
|
||||
bash files.
|
||||
|
||||
8. Tilde expansion is only performed on assignments preceding a command
|
||||
name, rather than on all assignment statements on the line.
|
||||
|
||||
9. The default history file is ~/.sh_history (default value of $HISTFILE).
|
||||
|
||||
10. The output of `kill -l' prints all the signal names on a single line,
|
||||
separated by spaces.
|
||||
|
||||
11. Non-interactive shells exit if `file' in `. file' is not found.
|
||||
|
||||
12. Redirection operators do not perform pathname expansion on the word
|
||||
in the redirection unless the shell is interactive
|
||||
|
||||
13. Function names must be valid shell identifiers. That is, they may not
|
||||
contain characters other than letters, digits, and underscores, and
|
||||
may not start with a digit. Declaring a function with an illegal name
|
||||
causes a fatal syntax error in non-interactive shells.
|
||||
|
||||
14. Posix.2 `special' builtins are found before shell functions during command
|
||||
lookup.
|
||||
|
||||
15. If a Posix.2 special builtin returns an error status, a non-interactive
|
||||
shell exits. The fatal errors are those listed in the POSIX.2 standard,
|
||||
and include things like passing incorrect options, redirection errors,
|
||||
variable assignment errors for assignments preceding the command name,
|
||||
and so on.
|
||||
|
||||
16. The environment passed to executed commands is not sorted. Neither is
|
||||
the output of `set'. This is not strictly Posix.2 behavior, but sh
|
||||
does it this way. Ksh does not. It's not necessary to sort the
|
||||
environment; no program should rely on it being sorted.
|
||||
|
||||
17. If the `cd' builtin finds a directory to change to using $CDPATH, the
|
||||
value it assigns to $PWD does not contain any symbolic links, as if
|
||||
`cd -P' had been executed.
|
||||
|
||||
18. A non-interactive shell exits with an error status if a variable
|
||||
assignment error occurs when no command name follows the assignment
|
||||
statements. A variable assignment error occurs, for example, when
|
||||
trying to assign a value to a read-only variable.
|
||||
|
||||
19. A non-interactive shell exits with an error status if the iteration
|
||||
variable in a for statement or the selection variable in a select
|
||||
statement is a read-only variable.
|
||||
|
||||
20. Process substitution is not available.
|
||||
|
||||
21. Assignment statements preceding POSIX.2 `special' builtins persist in
|
||||
the shell environment after the builtin completes.
|
||||
|
||||
There is other Posix.2 behavior that bash does not implement. Specifically:
|
||||
|
||||
1. Assignment statements affect the execution environment of all builtins,
|
||||
not just special ones.
|
||||
-125
@@ -1,125 +0,0 @@
|
||||
*** ../bash-3.0/array.c Thu May 6 08:24:13 2004
|
||||
--- array.c Wed Aug 25 15:50:42 2004
|
||||
***************
|
||||
*** 108,112 ****
|
||||
ARRAY_ELEMENT *ae, *new;
|
||||
|
||||
! if (!a)
|
||||
return((ARRAY *) NULL);
|
||||
a1 = array_create();
|
||||
--- 108,112 ----
|
||||
ARRAY_ELEMENT *ae, *new;
|
||||
|
||||
! if (a == 0)
|
||||
return((ARRAY *) NULL);
|
||||
a1 = array_create();
|
||||
***************
|
||||
*** 244,250 ****
|
||||
register ARRAY_ELEMENT *ae, *new;
|
||||
|
||||
! if (a == 0)
|
||||
return 0;
|
||||
! if (n <= 0)
|
||||
return (a->num_elements);
|
||||
|
||||
--- 244,250 ----
|
||||
register ARRAY_ELEMENT *ae, *new;
|
||||
|
||||
! if (a == 0 || (array_empty(a) && s == 0))
|
||||
return 0;
|
||||
! else if (n <= 0)
|
||||
return (a->num_elements);
|
||||
|
||||
***************
|
||||
*** 254,257 ****
|
||||
--- 254,259 ----
|
||||
ADD_BEFORE(ae, new);
|
||||
a->num_elements++;
|
||||
+ if (array_num_elements(a) == 1) /* array was empty */
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
***************
|
||||
*** 289,293 ****
|
||||
char *t;
|
||||
|
||||
! if (array == 0 || array->head == 0 || array_empty (array))
|
||||
return (ARRAY *)NULL;
|
||||
for (a = element_forw(array->head); a != array->head; a = element_forw(a)) {
|
||||
--- 291,295 ----
|
||||
char *t;
|
||||
|
||||
! if (array == 0 || array_head(array) == 0 || array_empty(array))
|
||||
return (ARRAY *)NULL;
|
||||
for (a = element_forw(array->head); a != array->head; a = element_forw(a)) {
|
||||
***************
|
||||
*** 314,318 ****
|
||||
char *ifs, sep[2];
|
||||
|
||||
! p = array_head (a);
|
||||
if (p == 0 || array_empty (a) || start > array_max_index(a))
|
||||
return ((char *)NULL);
|
||||
--- 316,320 ----
|
||||
char *ifs, sep[2];
|
||||
|
||||
! p = a ? array_head (a) : 0;
|
||||
if (p == 0 || array_empty (a) || start > array_max_index(a))
|
||||
return ((char *)NULL);
|
||||
***************
|
||||
*** 355,362 ****
|
||||
char *t, *ifs, sifs[2];
|
||||
|
||||
! if (array_head (a) == 0 || array_empty (a))
|
||||
return ((char *)NULL);
|
||||
|
||||
! a2 = array_copy (a);
|
||||
for (e = element_forw(a2->head); e != a2->head; e = element_forw(e)) {
|
||||
t = pat_subst(element_value(e), pat, rep, mflags);
|
||||
--- 357,364 ----
|
||||
char *t, *ifs, sifs[2];
|
||||
|
||||
! if (a == 0 || array_head(a) == 0 || array_empty(a))
|
||||
return ((char *)NULL);
|
||||
|
||||
! a2 = array_copy(a);
|
||||
for (e = element_forw(a2->head); e != a2->head; e = element_forw(e)) {
|
||||
t = pat_subst(element_value(e), pat, rep, mflags);
|
||||
***************
|
||||
*** 428,432 ****
|
||||
register ARRAY_ELEMENT *new, *ae;
|
||||
|
||||
! if (!a)
|
||||
return(-1);
|
||||
new = array_create_element(i, v);
|
||||
--- 430,434 ----
|
||||
register ARRAY_ELEMENT *new, *ae;
|
||||
|
||||
! if (a == 0)
|
||||
return(-1);
|
||||
new = array_create_element(i, v);
|
||||
***************
|
||||
*** 452,456 ****
|
||||
array_dispose_element(new);
|
||||
free(element_value(ae));
|
||||
! ae->value = savestring(v);
|
||||
return(0);
|
||||
} else if (element_index(ae) > i) {
|
||||
--- 454,458 ----
|
||||
array_dispose_element(new);
|
||||
free(element_value(ae));
|
||||
! ae->value = v ? savestring(v) : (char *)NULL;
|
||||
return(0);
|
||||
} else if (element_index(ae) > i) {
|
||||
***************
|
||||
*** 474,478 ****
|
||||
register ARRAY_ELEMENT *ae;
|
||||
|
||||
! if (!a || array_empty(a))
|
||||
return((ARRAY_ELEMENT *) NULL);
|
||||
for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae))
|
||||
--- 476,480 ----
|
||||
register ARRAY_ELEMENT *ae;
|
||||
|
||||
! if (a == 0 || array_empty(a))
|
||||
return((ARRAY_ELEMENT *) NULL);
|
||||
for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae))
|
||||
@@ -1,287 +0,0 @@
|
||||
*** ../bash-2.05b-patched/builtins/common.c Fri Jun 28 12:24:31 2002
|
||||
--- builtins/common.c Thu Sep 30 22:25:20 2004
|
||||
***************
|
||||
*** 455,464 ****
|
||||
{
|
||||
char *directory;
|
||||
|
||||
if (no_symbolic_links)
|
||||
{
|
||||
! if (the_current_working_directory)
|
||||
! free (the_current_working_directory);
|
||||
!
|
||||
the_current_working_directory = (char *)NULL;
|
||||
}
|
||||
--- 469,477 ----
|
||||
{
|
||||
char *directory;
|
||||
+ size_t dsize;
|
||||
|
||||
if (no_symbolic_links)
|
||||
{
|
||||
! FREE (the_current_working_directory);
|
||||
the_current_working_directory = (char *)NULL;
|
||||
}
|
||||
***************
|
||||
*** 466,480 ****
|
||||
if (the_current_working_directory == 0)
|
||||
{
|
||||
! the_current_working_directory = (char *)xmalloc (PATH_MAX);
|
||||
! the_current_working_directory[0] = '\0';
|
||||
! directory = getcwd (the_current_working_directory, PATH_MAX);
|
||||
! if (directory == 0)
|
||||
{
|
||||
! fprintf (stderr, "%s: could not get current directory: %s: %s\n",
|
||||
(for_whom && *for_whom) ? for_whom : get_name_for_error (),
|
||||
! bash_getcwd_errstr, strerror (errno));
|
||||
!
|
||||
! free (the_current_working_directory);
|
||||
! the_current_working_directory = (char *)NULL;
|
||||
return (char *)NULL;
|
||||
}
|
||||
--- 479,488 ----
|
||||
if (the_current_working_directory == 0)
|
||||
{
|
||||
! the_current_working_directory = getcwd (0, 0);
|
||||
! if (the_current_working_directory == 0)
|
||||
{
|
||||
! fprintf (stderr, _("%s: error retrieving current directory: %s: %s\n"),
|
||||
(for_whom && *for_whom) ? for_whom : get_name_for_error (),
|
||||
! _(bash_getcwd_errstr), strerror (errno));
|
||||
return (char *)NULL;
|
||||
}
|
||||
*** ../bash-2.05b-patched/builtins/cd.def Mon Jul 15 14:51:39 2002
|
||||
--- builtins/cd.def Sun Nov 7 15:13:42 2004
|
||||
***************
|
||||
*** 122,126 ****
|
||||
the_current_working_directory () */
|
||||
static char *
|
||||
! resetpwd ()
|
||||
{
|
||||
char *tdir;
|
||||
--- 124,129 ----
|
||||
the_current_working_directory () */
|
||||
static char *
|
||||
! resetpwd (caller)
|
||||
! char *caller;
|
||||
{
|
||||
char *tdir;
|
||||
***************
|
||||
*** 128,132 ****
|
||||
FREE (the_current_working_directory);
|
||||
the_current_working_directory = (char *)NULL;
|
||||
! tdir = get_working_directory ("cd");
|
||||
return (tdir);
|
||||
}
|
||||
--- 131,135 ----
|
||||
FREE (the_current_working_directory);
|
||||
the_current_working_directory = (char *)NULL;
|
||||
! tdir = get_working_directory (caller);
|
||||
return (tdir);
|
||||
}
|
||||
***************
|
||||
*** 333,336 ****
|
||||
--- 340,349 ----
|
||||
directory = tcwd ? (verbatim_pwd ? sh_physpath (tcwd, 0) : tcwd)
|
||||
: get_working_directory ("pwd");
|
||||
+
|
||||
+ /* Try again using getcwd() if canonicalization fails (for instance, if
|
||||
+ the file system has changed state underneath bash). */
|
||||
+ if (tcwd && directory == 0)
|
||||
+ directory = resetpwd ("pwd");
|
||||
+
|
||||
#undef tcwd
|
||||
|
||||
***************
|
||||
*** 364,368 ****
|
||||
{
|
||||
char *t, *tdir;
|
||||
! int err, canon_failed;
|
||||
|
||||
tdir = (char *)NULL;
|
||||
--- 379,383 ----
|
||||
{
|
||||
char *t, *tdir;
|
||||
! int err, canon_failed, r;
|
||||
|
||||
tdir = (char *)NULL;
|
||||
***************
|
||||
*** 399,403 ****
|
||||
if (posixly_correct && nolinks == 0 && canon_failed)
|
||||
{
|
||||
! errno = ENOENT;
|
||||
return (0);
|
||||
}
|
||||
--- 414,423 ----
|
||||
if (posixly_correct && nolinks == 0 && canon_failed)
|
||||
{
|
||||
! #if defined ENAMETOOLONG
|
||||
! if (errno != ENOENT && errno != ENAMETOOLONG)
|
||||
! #else
|
||||
! if (errno != ENOENT)
|
||||
! #endif
|
||||
! errno = ENOTDIR;
|
||||
return (0);
|
||||
}
|
||||
***************
|
||||
*** 409,418 ****
|
||||
shell's idea of the_current_working_directory. */
|
||||
if (canon_failed)
|
||||
- resetpwd ();
|
||||
- else
|
||||
{
|
||||
! FREE (the_current_working_directory);
|
||||
! the_current_working_directory = tdir;
|
||||
}
|
||||
|
||||
return (1);
|
||||
--- 429,439 ----
|
||||
shell's idea of the_current_working_directory. */
|
||||
if (canon_failed)
|
||||
{
|
||||
! t = resetpwd ("cd");
|
||||
! if (t == 0)
|
||||
! set_working_directory (tdir);
|
||||
}
|
||||
+ else
|
||||
+ set_working_directory (tdir);
|
||||
|
||||
return (1);
|
||||
***************
|
||||
*** 425,429 ****
|
||||
|
||||
err = errno;
|
||||
- free (tdir);
|
||||
|
||||
/* We're not in physical mode (nolinks == 0), but we failed to change to
|
||||
--- 446,449 ----
|
||||
***************
|
||||
*** 432,445 ****
|
||||
if (chdir (newdir) == 0)
|
||||
{
|
||||
! tdir = resetpwd ();
|
||||
! FREE (tdir);
|
||||
|
||||
! return (1);
|
||||
}
|
||||
else
|
||||
{
|
||||
errno = err;
|
||||
! return (0);
|
||||
}
|
||||
}
|
||||
|
||||
--- 452,471 ----
|
||||
if (chdir (newdir) == 0)
|
||||
{
|
||||
! t = resetpwd ("cd");
|
||||
! if (t == 0)
|
||||
! set_working_directory (tdir);
|
||||
! else
|
||||
! free (t);
|
||||
|
||||
! r = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
errno = err;
|
||||
! r = 0;
|
||||
}
|
||||
+
|
||||
+ free (tdir);
|
||||
+ return r;
|
||||
}
|
||||
|
||||
|
||||
|
||||
*** ../bash-2.05b-patched/aclocal.m4 Tue Jun 25 09:45:43 2002
|
||||
--- aclocal.m4 Sat Oct 9 15:03:28 2004
|
||||
***************
|
||||
*** 686,691 ****
|
||||
|
||||
AC_DEFUN(BASH_FUNC_GETCWD,
|
||||
! [AC_MSG_CHECKING([if getcwd() calls popen()])
|
||||
! AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
|
||||
[AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
--- 686,691 ----
|
||||
|
||||
AC_DEFUN(BASH_FUNC_GETCWD,
|
||||
! [AC_MSG_CHECKING([if getcwd() will dynamically allocate memory])
|
||||
! AC_CACHE_VAL(bash_cv_getcwd_malloc,
|
||||
[AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
***************
|
||||
*** 694,748 ****
|
||||
#endif
|
||||
|
||||
- #ifndef __STDC__
|
||||
- #ifndef const
|
||||
- #define const
|
||||
- #endif
|
||||
- #endif
|
||||
-
|
||||
- int popen_called;
|
||||
-
|
||||
- FILE *
|
||||
- popen(command, type)
|
||||
- const char *command;
|
||||
- const char *type;
|
||||
- {
|
||||
- popen_called = 1;
|
||||
- return (FILE *)NULL;
|
||||
- }
|
||||
-
|
||||
- FILE *_popen(command, type)
|
||||
- const char *command;
|
||||
- const char *type;
|
||||
- {
|
||||
- return (popen (command, type));
|
||||
- }
|
||||
-
|
||||
- int
|
||||
- pclose(stream)
|
||||
- FILE *stream;
|
||||
- {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- int
|
||||
- _pclose(stream)
|
||||
- FILE *stream;
|
||||
- {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
main()
|
||||
{
|
||||
! char lbuf[32];
|
||||
! popen_called = 0;
|
||||
! getcwd(lbuf, 32);
|
||||
! exit (popen_called);
|
||||
}
|
||||
! ], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
|
||||
! [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
|
||||
! bash_cv_getcwd_calls_popen=no]
|
||||
)])
|
||||
! AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
|
||||
! if test $bash_cv_getcwd_calls_popen = yes; then
|
||||
AC_DEFINE(GETCWD_BROKEN)
|
||||
AC_LIBOBJ(getcwd)
|
||||
--- 694,709 ----
|
||||
#endif
|
||||
|
||||
main()
|
||||
{
|
||||
! char *xpwd;
|
||||
! xpwd = getcwd(0, 0);
|
||||
! exit (xpwd == 0);
|
||||
}
|
||||
! ], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no,
|
||||
! [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no)
|
||||
! bash_cv_getcwd_malloc=no]
|
||||
)])
|
||||
! AC_MSG_RESULT($bash_cv_getcwd_malloc)
|
||||
! if test $bash_cv_getcwd_malloc = no; then
|
||||
AC_DEFINE(GETCWD_BROKEN)
|
||||
AC_LIBOBJ(getcwd)
|
||||
-130
@@ -1,130 +0,0 @@
|
||||
*** ../bash-3.0/bashline.c Mon Jul 5 23:22:12 2004
|
||||
--- bashline.c Thu Sep 2 16:00:12 2004
|
||||
***************
|
||||
*** 101,104 ****
|
||||
--- 101,105 ----
|
||||
|
||||
/* Helper functions for Readline. */
|
||||
+ static int bash_directory_expansion __P((char **));
|
||||
static int bash_directory_completion_hook __P((char **));
|
||||
static int filename_completion_ignore __P((char **));
|
||||
***************
|
||||
*** 293,297 ****
|
||||
at = strchr (rl_completer_word_break_characters, '@');
|
||||
if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
|
||||
! return;
|
||||
|
||||
/* We have something to do. Do it. */
|
||||
--- 294,298 ----
|
||||
at = strchr (rl_completer_word_break_characters, '@');
|
||||
if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
|
||||
! return old_value;
|
||||
|
||||
/* We have something to do. Do it. */
|
||||
***************
|
||||
*** 1407,1414 ****
|
||||
if (*hint_text == '~')
|
||||
{
|
||||
! int l, tl, vl;
|
||||
vl = strlen (val);
|
||||
tl = strlen (hint_text);
|
||||
l = vl - hint_len; /* # of chars added */
|
||||
temp = (char *)xmalloc (l + 2 + tl);
|
||||
strcpy (temp, hint_text);
|
||||
--- 1408,1424 ----
|
||||
if (*hint_text == '~')
|
||||
{
|
||||
! int l, tl, vl, dl;
|
||||
! char *rd;
|
||||
vl = strlen (val);
|
||||
tl = strlen (hint_text);
|
||||
+ #if 0
|
||||
l = vl - hint_len; /* # of chars added */
|
||||
+ #else
|
||||
+ rd = savestring (filename_hint);
|
||||
+ bash_directory_expansion (&rd);
|
||||
+ dl = strlen (rd);
|
||||
+ l = vl - dl; /* # of chars added */
|
||||
+ free (rd);
|
||||
+ #endif
|
||||
temp = (char *)xmalloc (l + 2 + tl);
|
||||
strcpy (temp, hint_text);
|
||||
***************
|
||||
*** 2188,2191 ****
|
||||
--- 2198,2222 ----
|
||||
}
|
||||
|
||||
+ /* Simulate the expansions that will be performed by
|
||||
+ rl_filename_completion_function. This must be called with the address of
|
||||
+ a pointer to malloc'd memory. */
|
||||
+ static int
|
||||
+ bash_directory_expansion (dirname)
|
||||
+ char **dirname;
|
||||
+ {
|
||||
+ char *d;
|
||||
+
|
||||
+ d = savestring (*dirname);
|
||||
+
|
||||
+ if (rl_directory_rewrite_hook)
|
||||
+ (*rl_directory_rewrite_hook) (&d);
|
||||
+
|
||||
+ if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d))
|
||||
+ {
|
||||
+ free (*dirname);
|
||||
+ *dirname = d;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Handle symbolic link references and other directory name
|
||||
expansions while hacking completion. */
|
||||
***************
|
||||
*** 2514,2518 ****
|
||||
static int ind;
|
||||
int glen;
|
||||
! char *ret;
|
||||
|
||||
if (state == 0)
|
||||
--- 2545,2549 ----
|
||||
static int ind;
|
||||
int glen;
|
||||
! char *ret, *ttext;
|
||||
|
||||
if (state == 0)
|
||||
***************
|
||||
*** 2524,2538 ****
|
||||
FREE (globtext);
|
||||
|
||||
if (rl_explicit_arg)
|
||||
{
|
||||
! globorig = savestring (text);
|
||||
! glen = strlen (text);
|
||||
globtext = (char *)xmalloc (glen + 2);
|
||||
! strcpy (globtext, text);
|
||||
globtext[glen] = '*';
|
||||
globtext[glen+1] = '\0';
|
||||
}
|
||||
else
|
||||
! globtext = globorig = savestring (text);
|
||||
|
||||
matches = shell_glob_filename (globtext);
|
||||
--- 2555,2574 ----
|
||||
FREE (globtext);
|
||||
|
||||
+ ttext = bash_tilde_expand (text, 0);
|
||||
+
|
||||
if (rl_explicit_arg)
|
||||
{
|
||||
! globorig = savestring (ttext);
|
||||
! glen = strlen (ttext);
|
||||
globtext = (char *)xmalloc (glen + 2);
|
||||
! strcpy (globtext, ttext);
|
||||
globtext[glen] = '*';
|
||||
globtext[glen+1] = '\0';
|
||||
}
|
||||
else
|
||||
! globtext = globorig = savestring (ttext);
|
||||
!
|
||||
! if (ttext != text)
|
||||
! free (ttext);
|
||||
|
||||
matches = shell_glob_filename (globtext);
|
||||
@@ -1,120 +0,0 @@
|
||||
*** ../bash-3.0/doc/bashref.texi Sat Jun 26 14:26:07 2004
|
||||
--- doc/bashref.texi Fri Aug 27 12:33:46 2004
|
||||
***************
|
||||
*** 1257,1260 ****
|
||||
--- 1257,1264 ----
|
||||
separate word. That is, @code{"$@@"} is equivalent to
|
||||
@code{"$1" "$2" @dots{}}.
|
||||
+ If the double-quoted expansion occurs within a word, the expansion of
|
||||
+ the first parameter is joined with the beginning part of the original
|
||||
+ word, and the expansion of the last parameter is joined with the last
|
||||
+ part of the original word.
|
||||
When there are no positional parameters, @code{"$@@"} and
|
||||
@code{$@@}
|
||||
***************
|
||||
*** 5202,5205 ****
|
||||
--- 5206,5212 ----
|
||||
descriptor 0, 1, or 2, respectively, is checked.
|
||||
|
||||
+ Unless otherwise specified, primaries that operate on files follow symbolic
|
||||
+ links and operate on the target of the link, rather than the link itself.
|
||||
+
|
||||
@table @code
|
||||
@item -a @var{file}
|
||||
***************
|
||||
*** 5535,5544 ****
|
||||
@var{subscript} is @samp{@@} or @samp{*}, the word expands to all members
|
||||
of the array @var{name}. These subscripts differ only when the word
|
||||
! appears within double quotes. If the word is double-quoted,
|
||||
@code{$@{name[*]@}} expands to a single word with
|
||||
the value of each array member separated by the first character of the
|
||||
@env{IFS} variable, and @code{$@{name[@@]@}} expands each element of
|
||||
@var{name} to a separate word. When there are no array members,
|
||||
! @code{$@{name[@@]@}} expands to nothing. This is analogous to the
|
||||
expansion of the special parameters @samp{@@} and @samp{*}.
|
||||
@code{$@{#name[}@var{subscript}@code{]@}} expands to the length of
|
||||
--- 5542,5557 ----
|
||||
@var{subscript} is @samp{@@} or @samp{*}, the word expands to all members
|
||||
of the array @var{name}. These subscripts differ only when the word
|
||||
! appears within double quotes.
|
||||
! If the word is double-quoted,
|
||||
@code{$@{name[*]@}} expands to a single word with
|
||||
the value of each array member separated by the first character of the
|
||||
@env{IFS} variable, and @code{$@{name[@@]@}} expands each element of
|
||||
@var{name} to a separate word. When there are no array members,
|
||||
! @code{$@{name[@@]@}} expands to nothing.
|
||||
! If the double-quoted expansion occurs within a word, the expansion of
|
||||
! the first parameter is joined with the beginning part of the original
|
||||
! word, and the expansion of the last parameter is joined with the last
|
||||
! part of the original word.
|
||||
! This is analogous to the
|
||||
expansion of the special parameters @samp{@@} and @samp{*}.
|
||||
@code{$@{#name[}@var{subscript}@code{]@}} expands to the length of
|
||||
***************
|
||||
*** 5954,5958 ****
|
||||
The @code{trap} builtin doesn't check the first argument for a possible
|
||||
signal specification and revert the signal handling to the original
|
||||
! disposition if it is. If users want to reset the handler for a given
|
||||
signal to the original disposition, they should use @samp{-} as the
|
||||
first argument.
|
||||
--- 5967,5972 ----
|
||||
The @code{trap} builtin doesn't check the first argument for a possible
|
||||
signal specification and revert the signal handling to the original
|
||||
! disposition if it is, unless that argument consists solely of digits and
|
||||
! is a valid signal number. If users want to reset the handler for a given
|
||||
signal to the original disposition, they should use @samp{-} as the
|
||||
first argument.
|
||||
***************
|
||||
*** 5989,5992 ****
|
||||
--- 6003,6024 ----
|
||||
does not refer to an existing directory, @code{cd} will fail instead of
|
||||
falling back to @var{physical} mode.
|
||||
+
|
||||
+ @item
|
||||
+ When listing the history, the @code{fc} builtin does not include an
|
||||
+ indication of whether or not a history entry has been modified.
|
||||
+
|
||||
+ @item
|
||||
+ The default editor used by @code{fc} is @code{ed}.
|
||||
+
|
||||
+ @item
|
||||
+ The @code{type} and @code{command} builtins will not report a non-executable
|
||||
+ file as having been found, though the shell will attempt to execute such a
|
||||
+ file if it is the only so-named file found in @code{$PATH}.
|
||||
+
|
||||
+ @item
|
||||
+ When the @code{xpg_echo} option is enabled, Bash does not attempt to interpret
|
||||
+ any arguments to @code{echo} as options. Each argument is displayed, after
|
||||
+ escape characters are converted.
|
||||
+
|
||||
@end enumerate
|
||||
|
||||
***************
|
||||
*** 6132,6144 ****
|
||||
@btindex bg
|
||||
@example
|
||||
! bg [@var{jobspec}]
|
||||
@end example
|
||||
! Resume the suspended job @var{jobspec} in the background, as if it
|
||||
had been started with @samp{&}.
|
||||
If @var{jobspec} is not supplied, the current job is used.
|
||||
The return status is zero unless it is run when job control is not
|
||||
! enabled, or, when run with job control enabled, if @var{jobspec} was
|
||||
! not found or @var{jobspec} specifies a job that was started without
|
||||
! job control.
|
||||
|
||||
@item fg
|
||||
--- 6164,6176 ----
|
||||
@btindex bg
|
||||
@example
|
||||
! bg [@var{jobspec} @dots{}]
|
||||
@end example
|
||||
! Resume each suspended job @var{jobspec} in the background, as if it
|
||||
had been started with @samp{&}.
|
||||
If @var{jobspec} is not supplied, the current job is used.
|
||||
The return status is zero unless it is run when job control is not
|
||||
! enabled, or, when run with job control enabled, if the last
|
||||
! @var{jobspec} was not found or the last @var{jobspec} specifies a job
|
||||
! that was started without job control.
|
||||
|
||||
@item fg
|
||||
@@ -1,25 +0,0 @@
|
||||
*** ../bash-3.0/braces.c Thu Dec 4 11:09:52 2003
|
||||
--- braces.c Wed Aug 4 14:34:33 2004
|
||||
***************
|
||||
*** 341,346 ****
|
||||
if (lhs_t == ST_CHAR)
|
||||
{
|
||||
! lhs_v = lhs[0];
|
||||
! rhs_v = rhs[0];
|
||||
}
|
||||
else
|
||||
--- 341,346 ----
|
||||
if (lhs_t == ST_CHAR)
|
||||
{
|
||||
! lhs_v = (unsigned char)lhs[0];
|
||||
! rhs_v = (unsigned char)rhs[0];
|
||||
}
|
||||
else
|
||||
***************
|
||||
*** 403,406 ****
|
||||
--- 403,407 ----
|
||||
pass_next = 1;
|
||||
i++;
|
||||
+ level++;
|
||||
continue;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
*** ../bash-3.0-patched/braces.c Wed Sep 8 11:07:53 2004
|
||||
--- braces.c Fri Sep 17 18:42:36 2004
|
||||
***************
|
||||
*** 403,407 ****
|
||||
pass_next = 1;
|
||||
i++;
|
||||
! level++;
|
||||
continue;
|
||||
}
|
||||
--- 403,408 ----
|
||||
pass_next = 1;
|
||||
i++;
|
||||
! if (quoted == 0)
|
||||
! level++;
|
||||
continue;
|
||||
}
|
||||
-28094
File diff suppressed because it is too large
Load Diff
@@ -1,42 +0,0 @@
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests for CYGWIN32 so they don't need to be done when cross-compiling.
|
||||
|
||||
# AC_FUNC_GETPGRP should also define GETPGRP_VOID
|
||||
ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void='yes'}
|
||||
# AC_FUNC_SETVBUF_REVERSED should not define anything else
|
||||
ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed='no'}
|
||||
# on CYGWIN32, system calls do not restart
|
||||
ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'}
|
||||
bash_cv_sys_restartable_syscalls=${bash_cv_sys_restartable_syscalls='no'}
|
||||
|
||||
# these may be necessary, but they are currently commented out
|
||||
#ac_cv_c_bigendian=${ac_cv_c_bigendian='no'}
|
||||
ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p='4'}
|
||||
ac_cv_sizeof_int=${ac_cv_sizeof_int='4'}
|
||||
ac_cv_sizeof_long=${ac_cv_sizeof_long='4'}
|
||||
ac_cv_sizeof_double=${ac_cv_sizeof_double='8'}
|
||||
|
||||
bash_cv_dup2_broken=${bash_cv_dup2_broken='no'}
|
||||
bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe='no'}
|
||||
bash_cv_type_rlimit=${bash_cv_type_rlimit='long'}
|
||||
bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist='no'}
|
||||
bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist='no'}
|
||||
bash_cv_sys_siglist=${bash_cv_sys_siglist='no'}
|
||||
bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust='no'}
|
||||
bash_cv_getenv_redef=${bash_cv_getenv_redef='yes'}
|
||||
bash_cv_printf_declared=${bash_cv_printf_declared='yes'}
|
||||
bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds='no'}
|
||||
bash_cv_getcwd_calls_popen=${bash_cv_getcwd_calls_popen='no'}
|
||||
bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers='no'}
|
||||
bash_cv_job_control_missing=${bash_cv_job_control_missing='present'}
|
||||
bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes='missing'}
|
||||
bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp='missing'}
|
||||
bash_cv_mail_dir=${bash_cv_mail_dir='unknown'}
|
||||
bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken='no'}
|
||||
|
||||
bash_cv_type_int32_t=${bash_cv_type_int32_t='int'}
|
||||
bash_cv_type_u_int32_t=${bash_cv_type_u_int32_t='int'}
|
||||
|
||||
ac_cv_type_bits64_t=${ac_cv_type_bits64_t='no'}
|
||||
|
||||
# end of cross-build/cygwin32.cache
|
||||
@@ -1,15 +0,0 @@
|
||||
*** ../bash-3.0/arrayfunc.c Fri Dec 19 00:03:09 2003
|
||||
--- arrayfunc.c Sun Aug 1 20:43:00 2004
|
||||
***************
|
||||
*** 612,616 ****
|
||||
|
||||
free (t);
|
||||
! return var;
|
||||
}
|
||||
|
||||
--- 612,616 ----
|
||||
|
||||
free (t);
|
||||
! return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var;
|
||||
}
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
*** ../bash-3.0-patched/lib/readline/display.c Wed Sep 8 11:07:51 2004
|
||||
--- lib/readline/display.c Sat Jan 8 21:51:40 2005
|
||||
***************
|
||||
*** 181,184 ****
|
||||
--- 186,201 ----
|
||||
static int prompt_physical_chars;
|
||||
|
||||
+ /* Variables to save and restore prompt and display information. */
|
||||
+
|
||||
+ /* These are getting numerous enough that it's time to create a struct. */
|
||||
+
|
||||
+ static char *saved_local_prompt;
|
||||
+ static char *saved_local_prefix;
|
||||
+ static int saved_last_invisible;
|
||||
+ static int saved_visible_length;
|
||||
+ static int saved_prefix_length;
|
||||
+ static int saved_invis_chars_first_line;
|
||||
+ static int saved_physical_chars;
|
||||
+
|
||||
/* Expand the prompt string S and return the number of visible
|
||||
characters in *LP, if LP is not null. This is currently more-or-less
|
||||
***************
|
||||
*** 1797,1803 ****
|
||||
return ((ISPRINT (uc)) ? 1 : 2);
|
||||
}
|
||||
-
|
||||
/* How to print things in the "echo-area". The prompt is treated as a
|
||||
mini-modeline. */
|
||||
|
||||
#if defined (USE_VARARGS)
|
||||
--- 1825,1831 ----
|
||||
return ((ISPRINT (uc)) ? 1 : 2);
|
||||
}
|
||||
/* How to print things in the "echo-area". The prompt is treated as a
|
||||
mini-modeline. */
|
||||
+ static int msg_saved_prompt = 0;
|
||||
|
||||
#if defined (USE_VARARGS)
|
||||
***************
|
||||
*** 1830,1835 ****
|
||||
--- 1858,1874 ----
|
||||
va_end (args);
|
||||
|
||||
+ if (saved_local_prompt == 0)
|
||||
+ {
|
||||
+ rl_save_prompt ();
|
||||
+ msg_saved_prompt = 1;
|
||||
+ }
|
||||
rl_display_prompt = msg_buf;
|
||||
+ local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
|
||||
+ &prompt_last_invisible,
|
||||
+ &prompt_invis_chars_first_line,
|
||||
+ &prompt_physical_chars);
|
||||
+ local_prompt_prefix = (char *)NULL;
|
||||
(*rl_redisplay_function) ();
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
***************
|
||||
*** 1841,1846 ****
|
||||
--- 1880,1897 ----
|
||||
sprintf (msg_buf, format, arg1, arg2);
|
||||
msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */
|
||||
+
|
||||
rl_display_prompt = msg_buf;
|
||||
+ if (saved_local_prompt == 0)
|
||||
+ {
|
||||
+ rl_save_prompt ();
|
||||
+ msg_saved_prompt = 1;
|
||||
+ }
|
||||
+ local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
|
||||
+ &prompt_last_invisible,
|
||||
+ &prompt_invis_chars_first_line,
|
||||
+ &prompt_physical_chars);
|
||||
+ local_prompt_prefix = (char *)NULL;
|
||||
(*rl_redisplay_function) ();
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
***************
|
||||
*** 1852,1855 ****
|
||||
--- 1903,1911 ----
|
||||
{
|
||||
rl_display_prompt = rl_prompt;
|
||||
+ if (msg_saved_prompt)
|
||||
+ {
|
||||
+ rl_restore_prompt ();
|
||||
+ msg_saved_prompt = 0;
|
||||
+ }
|
||||
(*rl_redisplay_function) ();
|
||||
return 0;
|
||||
***************
|
||||
*** 1866,1878 ****
|
||||
}
|
||||
|
||||
- /* These are getting numerous enough that it's time to create a struct. */
|
||||
-
|
||||
- static char *saved_local_prompt;
|
||||
- static char *saved_local_prefix;
|
||||
- static int saved_last_invisible;
|
||||
- static int saved_visible_length;
|
||||
- static int saved_invis_chars_first_line;
|
||||
- static int saved_physical_chars;
|
||||
-
|
||||
void
|
||||
rl_save_prompt ()
|
||||
--- 1922,1925 ----
|
||||
***************
|
||||
*** 1880,1883 ****
|
||||
--- 1927,1931 ----
|
||||
saved_local_prompt = local_prompt;
|
||||
saved_local_prefix = local_prompt_prefix;
|
||||
+ saved_prefix_length = prompt_prefix_length;
|
||||
saved_last_invisible = prompt_last_invisible;
|
||||
saved_visible_length = prompt_visible_length;
|
||||
***************
|
||||
*** 1886,1890 ****
|
||||
|
||||
local_prompt = local_prompt_prefix = (char *)0;
|
||||
! prompt_last_invisible = prompt_visible_length = 0;
|
||||
prompt_invis_chars_first_line = prompt_physical_chars = 0;
|
||||
}
|
||||
--- 1934,1938 ----
|
||||
|
||||
local_prompt = local_prompt_prefix = (char *)0;
|
||||
! prompt_last_invisible = prompt_visible_length = prompt_prefix_length = 0;
|
||||
prompt_invis_chars_first_line = prompt_physical_chars = 0;
|
||||
}
|
||||
***************
|
||||
*** 1898,1905 ****
|
||||
--- 1946,1959 ----
|
||||
local_prompt = saved_local_prompt;
|
||||
local_prompt_prefix = saved_local_prefix;
|
||||
+ prompt_prefix_length = saved_prefix_length;
|
||||
prompt_last_invisible = saved_last_invisible;
|
||||
prompt_visible_length = saved_visible_length;
|
||||
prompt_invis_chars_first_line = saved_invis_chars_first_line;
|
||||
prompt_physical_chars = saved_physical_chars;
|
||||
+
|
||||
+ /* can test saved_local_prompt to see if prompt info has been saved. */
|
||||
+ saved_local_prompt = saved_local_prefix = (char *)0;
|
||||
+ saved_last_invisible = saved_visible_length = saved_prefix_length = 0;
|
||||
+ saved_invis_chars_first_line = saved_physical_chars = 0;
|
||||
}
|
||||
|
||||
@@ -1,553 +0,0 @@
|
||||
*** ../bash-3.0-patched/execute_cmd.c Sun Jul 4 14:12:58 2004
|
||||
--- execute_cmd.c Wed Dec 1 16:50:48 2004
|
||||
***************
|
||||
*** 1,5 ****
|
||||
/* execute_command.c -- Execute a COMMAND structure. */
|
||||
|
||||
! /* Copyright (C) 1987-2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
--- 1,5 ----
|
||||
/* execute_command.c -- Execute a COMMAND structure. */
|
||||
|
||||
! /* Copyright (C) 1987-2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
***************
|
||||
*** 161,165 ****
|
||||
static int execute_while_or_until __P((WHILE_COM *, int));
|
||||
static int execute_if_command __P((IF_COM *));
|
||||
! static int execute_null_command __P((REDIRECT *, int, int, int, pid_t));
|
||||
static void fix_assignment_words __P((WORD_LIST *));
|
||||
static int execute_simple_command __P((SIMPLE_COM *, int, int, int, struct fd_bitmap *));
|
||||
--- 161,165 ----
|
||||
static int execute_while_or_until __P((WHILE_COM *, int));
|
||||
static int execute_if_command __P((IF_COM *));
|
||||
! static int execute_null_command __P((REDIRECT *, int, int, int));
|
||||
static void fix_assignment_words __P((WORD_LIST *));
|
||||
static int execute_simple_command __P((SIMPLE_COM *, int, int, int, struct fd_bitmap *));
|
||||
***************
|
||||
*** 492,496 ****
|
||||
int exec_result, invert, ignore_return, was_error_trap;
|
||||
REDIRECT *my_undo_list, *exec_undo_list;
|
||||
- volatile pid_t last_pid;
|
||||
volatile int save_line_number;
|
||||
|
||||
--- 492,495 ----
|
||||
***************
|
||||
*** 649,653 ****
|
||||
call to execute_simple_command if a longjmp occurs as the
|
||||
result of a `return' builtin. This is true for sure with gcc. */
|
||||
! last_pid = last_made_pid;
|
||||
was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
|
||||
|
||||
--- 648,652 ----
|
||||
call to execute_simple_command if a longjmp occurs as the
|
||||
result of a `return' builtin. This is true for sure with gcc. */
|
||||
! last_made_pid = NO_PID;
|
||||
was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
|
||||
|
||||
***************
|
||||
*** 679,683 ****
|
||||
when the shell is compiled without job control. */
|
||||
if (already_making_children && pipe_out == NO_PIPE &&
|
||||
! last_pid != last_made_pid)
|
||||
{
|
||||
stop_pipeline (asynchronous, (COMMAND *)NULL);
|
||||
--- 678,682 ----
|
||||
when the shell is compiled without job control. */
|
||||
if (already_making_children && pipe_out == NO_PIPE &&
|
||||
! last_made_pid != NO_PID)
|
||||
{
|
||||
stop_pipeline (asynchronous, (COMMAND *)NULL);
|
||||
***************
|
||||
*** 699,710 ****
|
||||
pipelines) to be waited for twice. */
|
||||
exec_result = wait_for (last_made_pid);
|
||||
- #if defined (RECYCLES_PIDS)
|
||||
- /* LynxOS, for one, recycles pids very quickly -- so quickly
|
||||
- that a new process may have the same pid as the last one
|
||||
- created. This has been reported to fix the problem on that
|
||||
- OS, and a similar problem on Cygwin. */
|
||||
- if (exec_result == 0)
|
||||
- last_made_pid = NO_PID;
|
||||
- #endif
|
||||
}
|
||||
}
|
||||
--- 698,701 ----
|
||||
***************
|
||||
*** 1275,1278 ****
|
||||
--- 1266,1274 ----
|
||||
tcom = (command->type == cm_subshell) ? command->value.Subshell->command : command;
|
||||
|
||||
+ if (command->flags & CMD_TIME_PIPELINE)
|
||||
+ tcom->flags |= CMD_TIME_PIPELINE;
|
||||
+ if (command->flags & CMD_TIME_POSIX)
|
||||
+ tcom->flags |= CMD_TIME_POSIX;
|
||||
+
|
||||
/* Make sure the subshell inherits any CMD_IGNORE_RETURN flag. */
|
||||
if ((command->flags & CMD_IGNORE_RETURN) && tcom != command)
|
||||
***************
|
||||
*** 1356,1359 ****
|
||||
--- 1352,1356 ----
|
||||
terminate_current_pipeline ();
|
||||
kill_current_pipeline ();
|
||||
+ UNBLOCK_CHILD (oset);
|
||||
#endif /* JOB_CONTROL */
|
||||
last_command_exit_value = EXECUTION_FAILURE;
|
||||
***************
|
||||
*** 1623,1628 ****
|
||||
xtrace_print_for_command_head (for_command);
|
||||
|
||||
! /* Save this command unless it's a trap command. */
|
||||
! if (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))
|
||||
{
|
||||
FREE (the_printed_command_except_trap);
|
||||
--- 1620,1626 ----
|
||||
xtrace_print_for_command_head (for_command);
|
||||
|
||||
! /* Save this command unless it's a trap command and we're not running
|
||||
! a debug trap. */
|
||||
! if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
|
||||
{
|
||||
FREE (the_printed_command_except_trap);
|
||||
***************
|
||||
*** 1639,1643 ****
|
||||
|
||||
this_command_name = (char *)NULL;
|
||||
! v = bind_variable (identifier, list->word->word);
|
||||
if (readonly_p (v) || noassign_p (v))
|
||||
{
|
||||
--- 1637,1641 ----
|
||||
|
||||
this_command_name = (char *)NULL;
|
||||
! v = bind_variable (identifier, list->word->word, 0);
|
||||
if (readonly_p (v) || noassign_p (v))
|
||||
{
|
||||
***************
|
||||
*** 1686,1690 ****
|
||||
SHELL_VAR *new_value;
|
||||
|
||||
! new_value = bind_variable (identifier, value_cell(old_value));
|
||||
new_value->attributes = old_value->attributes;
|
||||
dispose_variable (old_value);
|
||||
--- 1684,1688 ----
|
||||
SHELL_VAR *new_value;
|
||||
|
||||
! new_value = bind_variable (identifier, value_cell(old_value), 0);
|
||||
new_value->attributes = old_value->attributes;
|
||||
dispose_variable (old_value);
|
||||
***************
|
||||
*** 1732,1737 ****
|
||||
command_string_index = 0;
|
||||
print_arith_command (new);
|
||||
! FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = savestring (the_printed_command);
|
||||
|
||||
r = run_debug_trap ();
|
||||
--- 1730,1738 ----
|
||||
command_string_index = 0;
|
||||
print_arith_command (new);
|
||||
! if (signal_in_progress (DEBUG_TRAP) == 0)
|
||||
! {
|
||||
! FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = savestring (the_printed_command);
|
||||
! }
|
||||
|
||||
r = run_debug_trap ();
|
||||
***************
|
||||
*** 2040,2045 ****
|
||||
xtrace_print_select_command_head (select_command);
|
||||
|
||||
! FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = savestring (the_printed_command);
|
||||
|
||||
retval = run_debug_trap ();
|
||||
--- 2041,2049 ----
|
||||
xtrace_print_select_command_head (select_command);
|
||||
|
||||
! if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
|
||||
! {
|
||||
! FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = savestring (the_printed_command);
|
||||
! }
|
||||
|
||||
retval = run_debug_trap ();
|
||||
***************
|
||||
*** 2093,2097 ****
|
||||
}
|
||||
|
||||
! v = bind_variable (identifier, selection);
|
||||
if (readonly_p (v) || noassign_p (v))
|
||||
{
|
||||
--- 2097,2101 ----
|
||||
}
|
||||
|
||||
! v = bind_variable (identifier, selection, 0);
|
||||
if (readonly_p (v) || noassign_p (v))
|
||||
{
|
||||
***************
|
||||
*** 2169,2173 ****
|
||||
xtrace_print_case_command_head (case_command);
|
||||
|
||||
! if (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))
|
||||
{
|
||||
FREE (the_printed_command_except_trap);
|
||||
--- 2173,2177 ----
|
||||
xtrace_print_case_command_head (case_command);
|
||||
|
||||
! if (signal_in_progress (DEBUG_TRAP == 0) && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
|
||||
{
|
||||
FREE (the_printed_command_except_trap);
|
||||
***************
|
||||
*** 2186,2197 ****
|
||||
#endif
|
||||
|
||||
- /* Posix.2 specifies that the WORD is tilde expanded. */
|
||||
- if (member ('~', case_command->word->word))
|
||||
- {
|
||||
- word = bash_tilde_expand (case_command->word->word, 0);
|
||||
- free (case_command->word->word);
|
||||
- case_command->word->word = word;
|
||||
- }
|
||||
-
|
||||
wlist = expand_word_unsplit (case_command->word, 0);
|
||||
word = wlist ? string_list (wlist) : savestring ("");
|
||||
--- 2190,2193 ----
|
||||
***************
|
||||
*** 2211,2223 ****
|
||||
for (list = clauses->patterns; list; list = list->next)
|
||||
{
|
||||
- /* Posix.2 specifies to tilde expand each member of the pattern
|
||||
- list. */
|
||||
- if (member ('~', list->word->word))
|
||||
- {
|
||||
- pattern = bash_tilde_expand (list->word->word, 0);
|
||||
- free (list->word->word);
|
||||
- list->word->word = pattern;
|
||||
- }
|
||||
-
|
||||
es = expand_word_leave_quoted (list->word, 0);
|
||||
|
||||
--- 2207,2210 ----
|
||||
***************
|
||||
*** 2396,2401 ****
|
||||
command_string_index = 0;
|
||||
print_arith_command (arith_command->exp);
|
||||
! FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = savestring (the_printed_command);
|
||||
|
||||
/* Run the debug trap before each arithmetic command, but do it after we
|
||||
--- 2383,2392 ----
|
||||
command_string_index = 0;
|
||||
print_arith_command (arith_command->exp);
|
||||
!
|
||||
! if (signal_in_progress (DEBUG_TRAP) == 0)
|
||||
! {
|
||||
! FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = savestring (the_printed_command);
|
||||
! }
|
||||
|
||||
/* Run the debug trap before each arithmetic command, but do it after we
|
||||
***************
|
||||
*** 2509,2515 ****
|
||||
else
|
||||
#endif /* COND_REGEXP */
|
||||
! result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP)
|
||||
! ? EXECUTION_SUCCESS
|
||||
! : EXECUTION_FAILURE;
|
||||
if (arg1 != nullstr)
|
||||
free (arg1);
|
||||
--- 2500,2512 ----
|
||||
else
|
||||
#endif /* COND_REGEXP */
|
||||
! {
|
||||
! int oe;
|
||||
! oe = extended_glob;
|
||||
! extended_glob = 1;
|
||||
! result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP)
|
||||
! ? EXECUTION_SUCCESS
|
||||
! : EXECUTION_FAILURE;
|
||||
! extended_glob = oe;
|
||||
! }
|
||||
if (arg1 != nullstr)
|
||||
free (arg1);
|
||||
***************
|
||||
*** 2547,2552 ****
|
||||
command_string_index = 0;
|
||||
print_cond_command (cond_command);
|
||||
! FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = savestring (the_printed_command);
|
||||
|
||||
/* Run the debug trap before each conditional command, but do it after we
|
||||
--- 2544,2553 ----
|
||||
command_string_index = 0;
|
||||
print_cond_command (cond_command);
|
||||
!
|
||||
! if (signal_in_progress (DEBUG_TRAP) == 0)
|
||||
! {
|
||||
! FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = savestring (the_printed_command);
|
||||
! }
|
||||
|
||||
/* Run the debug trap before each conditional command, but do it after we
|
||||
***************
|
||||
*** 2581,2585 ****
|
||||
if (arg == 0)
|
||||
arg = "";
|
||||
! var = bind_variable ("_", arg);
|
||||
VUNSETATTR (var, att_exported);
|
||||
}
|
||||
--- 2582,2586 ----
|
||||
if (arg == 0)
|
||||
arg = "";
|
||||
! var = bind_variable ("_", arg, 0);
|
||||
VUNSETATTR (var, att_exported);
|
||||
}
|
||||
***************
|
||||
*** 2589,2596 ****
|
||||
supposed to take place. */
|
||||
static int
|
||||
! execute_null_command (redirects, pipe_in, pipe_out, async, old_last_command_subst_pid)
|
||||
REDIRECT *redirects;
|
||||
int pipe_in, pipe_out, async;
|
||||
- pid_t old_last_command_subst_pid;
|
||||
{
|
||||
int r;
|
||||
--- 2590,2596 ----
|
||||
supposed to take place. */
|
||||
static int
|
||||
! execute_null_command (redirects, pipe_in, pipe_out, async)
|
||||
REDIRECT *redirects;
|
||||
int pipe_in, pipe_out, async;
|
||||
{
|
||||
int r;
|
||||
***************
|
||||
*** 2638,2642 ****
|
||||
if (r != 0)
|
||||
return (EXECUTION_FAILURE);
|
||||
! else if (old_last_command_subst_pid != last_command_subst_pid)
|
||||
return (last_command_exit_value);
|
||||
else
|
||||
--- 2638,2642 ----
|
||||
if (r != 0)
|
||||
return (EXECUTION_FAILURE);
|
||||
! else if (last_command_subst_pid != NO_PID)
|
||||
return (last_command_exit_value);
|
||||
else
|
||||
***************
|
||||
*** 2667,2672 ****
|
||||
if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0)
|
||||
return;
|
||||
}
|
||||
! w->word->flags |= (W_NOSPLIT|W_NOGLOB|W_TILDEEXP);
|
||||
}
|
||||
}
|
||||
--- 2667,2674 ----
|
||||
if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0)
|
||||
return;
|
||||
+ else if (b && (b->flags & ASSIGNMENT_BUILTIN))
|
||||
+ words->word->flags |= W_ASSNBLTIN;
|
||||
}
|
||||
! w->word->flags |= (W_NOSPLIT|W_NOGLOB|W_TILDEEXP|W_ASSIGNARG);
|
||||
}
|
||||
}
|
||||
***************
|
||||
*** 2684,2688 ****
|
||||
char *command_line, *lastarg, *temp;
|
||||
int first_word_quoted, result, builtin_is_special, already_forked, dofork;
|
||||
! pid_t old_last_command_subst_pid, old_last_async_pid;
|
||||
sh_builtin_func_t *builtin;
|
||||
SHELL_VAR *func;
|
||||
--- 2686,2690 ----
|
||||
char *command_line, *lastarg, *temp;
|
||||
int first_word_quoted, result, builtin_is_special, already_forked, dofork;
|
||||
! pid_t old_last_async_pid;
|
||||
sh_builtin_func_t *builtin;
|
||||
SHELL_VAR *func;
|
||||
***************
|
||||
*** 2700,2707 ****
|
||||
print_simple_command (simple_command);
|
||||
|
||||
! if (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))
|
||||
{
|
||||
FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = savestring (the_printed_command);
|
||||
}
|
||||
|
||||
--- 2702,2709 ----
|
||||
print_simple_command (simple_command);
|
||||
|
||||
! if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
|
||||
{
|
||||
FREE (the_printed_command_except_trap);
|
||||
! the_printed_command_except_trap = the_printed_command ? savestring (the_printed_command) : (char *)0;
|
||||
}
|
||||
|
||||
***************
|
||||
*** 2719,2723 ****
|
||||
simple_command->words ? (simple_command->words->word->flags & W_QUOTED): 0;
|
||||
|
||||
! old_last_command_subst_pid = last_command_subst_pid;
|
||||
old_last_async_pid = last_asynchronous_pid;
|
||||
|
||||
--- 2721,2725 ----
|
||||
simple_command->words ? (simple_command->words->word->flags & W_QUOTED): 0;
|
||||
|
||||
! last_command_subst_pid = NO_PID;
|
||||
old_last_async_pid = last_asynchronous_pid;
|
||||
|
||||
***************
|
||||
*** 2740,2764 ****
|
||||
if (dofork)
|
||||
{
|
||||
- #if 0
|
||||
- /* XXX memory leak if expand_words() error causes a jump_to_top_level */
|
||||
- command_line = savestring (the_printed_command);
|
||||
- #endif
|
||||
-
|
||||
/* Do this now, because execute_disk_command will do it anyway in the
|
||||
vast majority of cases. */
|
||||
maybe_make_export_env ();
|
||||
|
||||
- #if 0
|
||||
- if (make_child (command_line, async) == 0)
|
||||
- #else
|
||||
if (make_child (savestring (the_printed_command), async) == 0)
|
||||
- #endif
|
||||
{
|
||||
already_forked = 1;
|
||||
simple_command->flags |= CMD_NO_FORK;
|
||||
|
||||
! subshell_environment = (pipe_in != NO_PIPE || pipe_out != NO_PIPE)
|
||||
! ? (SUBSHELL_PIPE|SUBSHELL_FORK)
|
||||
! : (SUBSHELL_ASYNC|SUBSHELL_FORK);
|
||||
|
||||
/* We need to do this before piping to handle some really
|
||||
--- 2742,2759 ----
|
||||
if (dofork)
|
||||
{
|
||||
/* Do this now, because execute_disk_command will do it anyway in the
|
||||
vast majority of cases. */
|
||||
maybe_make_export_env ();
|
||||
|
||||
if (make_child (savestring (the_printed_command), async) == 0)
|
||||
{
|
||||
already_forked = 1;
|
||||
simple_command->flags |= CMD_NO_FORK;
|
||||
|
||||
! subshell_environment = SUBSHELL_FORK;
|
||||
! if (pipe_in != NO_PIPE || pipe_out != NO_PIPE)
|
||||
! subshell_environment |= SUBSHELL_PIPE;
|
||||
! if (async)
|
||||
! subshell_environment |= SUBSHELL_ASYNC;
|
||||
|
||||
/* We need to do this before piping to handle some really
|
||||
***************
|
||||
*** 2805,2810 ****
|
||||
result = execute_null_command (simple_command->redirects,
|
||||
pipe_in, pipe_out,
|
||||
! already_forked ? 0 : async,
|
||||
! old_last_command_subst_pid);
|
||||
if (already_forked)
|
||||
exit (result);
|
||||
--- 2800,2804 ----
|
||||
result = execute_null_command (simple_command->redirects,
|
||||
pipe_in, pipe_out,
|
||||
! already_forked ? 0 : async);
|
||||
if (already_forked)
|
||||
exit (result);
|
||||
***************
|
||||
*** 3060,3064 ****
|
||||
push_scope (VC_BLTNENV, temporary_env);
|
||||
if (subshell == 0)
|
||||
! add_unwind_protect (pop_scope, "1");
|
||||
temporary_env = (HASH_TABLE *)NULL;
|
||||
}
|
||||
--- 3054,3058 ----
|
||||
push_scope (VC_BLTNENV, temporary_env);
|
||||
if (subshell == 0)
|
||||
! add_unwind_protect (pop_scope, (flags & CMD_COMMAND_BUILTIN) ? 0 : "1");
|
||||
temporary_env = (HASH_TABLE *)NULL;
|
||||
}
|
||||
***************
|
||||
*** 3106,3110 ****
|
||||
char *debug_trap, *error_trap, *return_trap;
|
||||
#if defined (ARRAY_VARS)
|
||||
! SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v;
|
||||
ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
|
||||
#endif
|
||||
--- 3100,3104 ----
|
||||
char *debug_trap, *error_trap, *return_trap;
|
||||
#if defined (ARRAY_VARS)
|
||||
! SHELL_VAR *funcname_v, *nfv, *bash_source_v, *bash_lineno_v;
|
||||
ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
|
||||
#endif
|
||||
***************
|
||||
*** 3179,3183 ****
|
||||
--- 3173,3183 ----
|
||||
}
|
||||
|
||||
+ /* Shell functions inherit the RETURN trap if function tracing is on
|
||||
+ globally or on individually for this function. */
|
||||
+ #if 0
|
||||
if (return_trap && ((trace_p (var) == 0) && function_trace_mode == 0))
|
||||
+ #else
|
||||
+ if (return_trap && (signal_in_progress (DEBUG_TRAP) || ((trace_p (var) == 0) && function_trace_mode == 0)))
|
||||
+ #endif
|
||||
{
|
||||
if (subshell == 0)
|
||||
***************
|
||||
*** 3232,3236 ****
|
||||
|
||||
if (return_val)
|
||||
! result = return_catch_value;
|
||||
else
|
||||
{
|
||||
--- 3232,3242 ----
|
||||
|
||||
if (return_val)
|
||||
! {
|
||||
! result = return_catch_value;
|
||||
! /* Run the RETURN trap in the function's context. */
|
||||
! save_current = currently_executing_command;
|
||||
! run_return_trap ();
|
||||
! currently_executing_command = save_current;
|
||||
! }
|
||||
else
|
||||
{
|
||||
***************
|
||||
*** 3256,3259 ****
|
||||
--- 3262,3269 ----
|
||||
#else
|
||||
result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close);
|
||||
+
|
||||
+ save_current = currently_executing_command;
|
||||
+ run_return_trap ();
|
||||
+ currently_executing_command = save_current;
|
||||
#endif
|
||||
showing_function_line = 0;
|
||||
***************
|
||||
*** 3269,3275 ****
|
||||
funcnest--;
|
||||
#if defined (ARRAY_VARS)
|
||||
array_pop (bash_source_a);
|
||||
- array_pop (funcname_a);
|
||||
array_pop (bash_lineno_a);
|
||||
#endif
|
||||
|
||||
--- 3279,3292 ----
|
||||
funcnest--;
|
||||
#if defined (ARRAY_VARS)
|
||||
+ /* These two variables cannot be unset, and cannot be affected by the
|
||||
+ function. */
|
||||
array_pop (bash_source_a);
|
||||
array_pop (bash_lineno_a);
|
||||
+
|
||||
+ /* FUNCNAME can be unset, and so can potentially be changed by the
|
||||
+ function. */
|
||||
+ GET_ARRAY_FROM_VAR ("FUNCNAME", nfv, funcname_a);
|
||||
+ if (nfv == funcname_v)
|
||||
+ array_pop (funcname_a);
|
||||
#endif
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
*** ../bash-2.05b-patched/aclocal.m4 Tue Jun 25 09:45:43 2002
|
||||
--- aclocal.m4 Sat Oct 9 15:03:28 2004
|
||||
***************
|
||||
*** 686,691 ****
|
||||
|
||||
AC_DEFUN(BASH_FUNC_GETCWD,
|
||||
! [AC_MSG_CHECKING([if getcwd() calls popen()])
|
||||
! AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
|
||||
[AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
--- 686,691 ----
|
||||
|
||||
AC_DEFUN(BASH_FUNC_GETCWD,
|
||||
! [AC_MSG_CHECKING([if getcwd() will dynamically allocate memory])
|
||||
! AC_CACHE_VAL(bash_cv_getcwd_malloc,
|
||||
[AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
***************
|
||||
*** 694,748 ****
|
||||
#endif
|
||||
|
||||
- #ifndef __STDC__
|
||||
- #ifndef const
|
||||
- #define const
|
||||
- #endif
|
||||
- #endif
|
||||
-
|
||||
- int popen_called;
|
||||
-
|
||||
- FILE *
|
||||
- popen(command, type)
|
||||
- const char *command;
|
||||
- const char *type;
|
||||
- {
|
||||
- popen_called = 1;
|
||||
- return (FILE *)NULL;
|
||||
- }
|
||||
-
|
||||
- FILE *_popen(command, type)
|
||||
- const char *command;
|
||||
- const char *type;
|
||||
- {
|
||||
- return (popen (command, type));
|
||||
- }
|
||||
-
|
||||
- int
|
||||
- pclose(stream)
|
||||
- FILE *stream;
|
||||
- {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- int
|
||||
- _pclose(stream)
|
||||
- FILE *stream;
|
||||
- {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
main()
|
||||
{
|
||||
! char lbuf[32];
|
||||
! popen_called = 0;
|
||||
! getcwd(lbuf, 32);
|
||||
! exit (popen_called);
|
||||
}
|
||||
! ], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
|
||||
! [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
|
||||
! bash_cv_getcwd_calls_popen=no]
|
||||
)])
|
||||
! AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
|
||||
! if test $bash_cv_getcwd_calls_popen = yes; then
|
||||
AC_DEFINE(GETCWD_BROKEN)
|
||||
AC_LIBOBJ(getcwd)
|
||||
--- 694,709 ----
|
||||
#endif
|
||||
|
||||
main()
|
||||
{
|
||||
! char *xpwd;
|
||||
! xpwd = getcwd(0, 0);
|
||||
! exit (xpwd == 0);
|
||||
}
|
||||
! ], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no,
|
||||
! [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no)
|
||||
! bash_cv_getcwd_malloc=no]
|
||||
)])
|
||||
! AC_MSG_RESULT($bash_cv_getcwd_malloc)
|
||||
! if test $bash_cv_getcwd_malloc = no; then
|
||||
AC_DEFINE(GETCWD_BROKEN)
|
||||
AC_LIBOBJ(getcwd)
|
||||
-155
@@ -1,155 +0,0 @@
|
||||
*** ../bash-3.0/lib/readline/display.c Thu May 27 22:57:51 2004
|
||||
--- lib/readline/display.c Mon Aug 30 11:55:02 2004
|
||||
***************
|
||||
*** 202,206 ****
|
||||
{
|
||||
char *r, *ret, *p;
|
||||
! int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars;
|
||||
|
||||
/* Short-circuit if we can. */
|
||||
--- 202,206 ----
|
||||
{
|
||||
char *r, *ret, *p;
|
||||
! int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
|
||||
|
||||
/* Short-circuit if we can. */
|
||||
***************
|
||||
*** 223,226 ****
|
||||
--- 223,227 ----
|
||||
|
||||
invfl = 0; /* invisible chars in first line of prompt */
|
||||
+ invflset = 0; /* we only want to set invfl once */
|
||||
|
||||
for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
|
||||
***************
|
||||
*** 250,254 ****
|
||||
*r++ = *p++;
|
||||
if (!ignoring)
|
||||
! rl += ind - pind;
|
||||
else
|
||||
ninvis += ind - pind;
|
||||
--- 251,258 ----
|
||||
*r++ = *p++;
|
||||
if (!ignoring)
|
||||
! {
|
||||
! rl += ind - pind;
|
||||
! physchars += _rl_col_width (pmt, pind, ind);
|
||||
! }
|
||||
else
|
||||
ninvis += ind - pind;
|
||||
***************
|
||||
*** 260,273 ****
|
||||
*r++ = *p;
|
||||
if (!ignoring)
|
||||
! rl++; /* visible length byte counter */
|
||||
else
|
||||
ninvis++; /* invisible chars byte counter */
|
||||
}
|
||||
|
||||
! if (rl >= _rl_screenwidth)
|
||||
! invfl = ninvis;
|
||||
!
|
||||
! if (ignoring == 0)
|
||||
! physchars++;
|
||||
}
|
||||
}
|
||||
--- 264,280 ----
|
||||
*r++ = *p;
|
||||
if (!ignoring)
|
||||
! {
|
||||
! rl++; /* visible length byte counter */
|
||||
! physchars++;
|
||||
! }
|
||||
else
|
||||
ninvis++; /* invisible chars byte counter */
|
||||
}
|
||||
|
||||
! if (invflset == 0 && rl >= _rl_screenwidth)
|
||||
! {
|
||||
! invfl = ninvis;
|
||||
! invflset = 1;
|
||||
! }
|
||||
}
|
||||
}
|
||||
***************
|
||||
*** 352,356 ****
|
||||
&prompt_last_invisible,
|
||||
(int *)NULL,
|
||||
! (int *)NULL);
|
||||
c = *t; *t = '\0';
|
||||
/* The portion of the prompt string up to and including the
|
||||
--- 359,363 ----
|
||||
&prompt_last_invisible,
|
||||
(int *)NULL,
|
||||
! &prompt_physical_chars);
|
||||
c = *t; *t = '\0';
|
||||
/* The portion of the prompt string up to and including the
|
||||
***************
|
||||
*** 359,363 ****
|
||||
(int *)NULL,
|
||||
&prompt_invis_chars_first_line,
|
||||
! &prompt_physical_chars);
|
||||
*t = c;
|
||||
return (prompt_prefix_length);
|
||||
--- 366,370 ----
|
||||
(int *)NULL,
|
||||
&prompt_invis_chars_first_line,
|
||||
! (int *)NULL);
|
||||
*t = c;
|
||||
return (prompt_prefix_length);
|
||||
***************
|
||||
*** 418,422 ****
|
||||
register char *line;
|
||||
int c_pos, inv_botlin, lb_botlin, lb_linenum;
|
||||
! int newlines, lpos, temp, modmark;
|
||||
char *prompt_this_line;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
--- 425,429 ----
|
||||
register char *line;
|
||||
int c_pos, inv_botlin, lb_botlin, lb_linenum;
|
||||
! int newlines, lpos, temp, modmark, n0, num;
|
||||
char *prompt_this_line;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
***************
|
||||
*** 574,577 ****
|
||||
--- 581,585 ----
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
memset (_rl_wrapped_line, 0, vis_lbsize);
|
||||
+ num = 0;
|
||||
#endif
|
||||
|
||||
***************
|
||||
*** 592,596 ****
|
||||
--- 600,619 ----
|
||||
prompts that exceed two physical lines?
|
||||
Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ n0 = num;
|
||||
+ temp = local_prompt ? strlen (local_prompt) : 0;
|
||||
+ while (num < temp)
|
||||
+ {
|
||||
+ if (_rl_col_width (local_prompt, n0, num) > _rl_screenwidth)
|
||||
+ {
|
||||
+ num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
|
||||
+ break;
|
||||
+ }
|
||||
+ num++;
|
||||
+ }
|
||||
+ temp = num +
|
||||
+ #else
|
||||
temp = ((newlines + 1) * _rl_screenwidth) +
|
||||
+ #endif /* !HANDLE_MULTIBYTE */
|
||||
((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
|
||||
: ((newlines == 1) ? wrap_offset : 0))
|
||||
***************
|
||||
*** 598,602 ****
|
||||
--- 621,629 ----
|
||||
|
||||
inv_lbreaks[++newlines] = temp;
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ lpos -= _rl_col_width (local_prompt, n0, num);
|
||||
+ #else
|
||||
lpos -= _rl_screenwidth;
|
||||
+ #endif
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
*** ../bash-3.0-patched/general.c Wed Apr 14 23:20:13 2004
|
||||
--- general.c Wed Oct 20 16:59:59 2004
|
||||
***************
|
||||
*** 268,272 ****
|
||||
|
||||
#if defined (ARRAY_VARS)
|
||||
! if ((legal_variable_starter (c) == 0) && (flags && c != '[')) /* ] */
|
||||
#else
|
||||
if (legal_variable_starter (c) == 0)
|
||||
--- 268,272 ----
|
||||
|
||||
#if defined (ARRAY_VARS)
|
||||
! if ((legal_variable_starter (c) == 0) && (flags == 0 || c != '[')) /* ] */
|
||||
#else
|
||||
if (legal_variable_starter (c) == 0)
|
||||
-81
@@ -1,81 +0,0 @@
|
||||
*** ../bash-3.0/jobs.c Fri Apr 23 16:28:25 2004
|
||||
--- jobs.c Wed Aug 18 11:15:07 2004
|
||||
***************
|
||||
*** 998,1002 ****
|
||||
|
||||
if (job != NO_JOB)
|
||||
! printf ("[%d] %ld\n", job + 1, (long)pid);
|
||||
else
|
||||
programming_error (_("describe_pid: %ld: no such pid"), (long)pid);
|
||||
--- 998,1002 ----
|
||||
|
||||
if (job != NO_JOB)
|
||||
! fprintf (stderr, "[%d] %ld\n", job + 1, (long)pid);
|
||||
else
|
||||
programming_error (_("describe_pid: %ld: no such pid"), (long)pid);
|
||||
***************
|
||||
*** 1779,1784 ****
|
||||
{
|
||||
fail = 0;
|
||||
! for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next)
|
||||
! if (p->status != EXECUTION_SUCCESS) fail = p->status;
|
||||
return fail;
|
||||
}
|
||||
--- 1779,1789 ----
|
||||
{
|
||||
fail = 0;
|
||||
! p = jobs[job]->pipe;
|
||||
! do
|
||||
! {
|
||||
! if (p->status != EXECUTION_SUCCESS) fail = p->status;
|
||||
! p = p->next;
|
||||
! }
|
||||
! while (p != jobs[job]->pipe);
|
||||
return fail;
|
||||
}
|
||||
***************
|
||||
*** 2312,2321 ****
|
||||
|
||||
if (foreground == 0)
|
||||
! fprintf (stderr, "[%d]%c ", job + 1,
|
||||
(job == current_job) ? '+': ((job == previous_job) ? '-' : ' '));
|
||||
|
||||
do
|
||||
{
|
||||
! fprintf (stderr, "%s%s",
|
||||
p->command ? p->command : "",
|
||||
p->next != jobs[job]->pipe? " | " : "");
|
||||
--- 2317,2326 ----
|
||||
|
||||
if (foreground == 0)
|
||||
! printf ("[%d]%c ", job + 1,
|
||||
(job == current_job) ? '+': ((job == previous_job) ? '-' : ' '));
|
||||
|
||||
do
|
||||
{
|
||||
! printf ("%s%s",
|
||||
p->command ? p->command : "",
|
||||
p->next != jobs[job]->pipe? " | " : "");
|
||||
***************
|
||||
*** 2325,2334 ****
|
||||
|
||||
if (foreground == 0)
|
||||
! fprintf (stderr, " &");
|
||||
|
||||
if (strcmp (wd, jobs[job]->wd) != 0)
|
||||
! fprintf (stderr, " (wd: %s)", polite_directory_format (jobs[job]->wd));
|
||||
|
||||
! fprintf (stderr, "\n");
|
||||
|
||||
/* Run the job. */
|
||||
--- 2330,2339 ----
|
||||
|
||||
if (foreground == 0)
|
||||
! printf (" &");
|
||||
|
||||
if (strcmp (wd, jobs[job]->wd) != 0)
|
||||
! printf (" (wd: %s)", polite_directory_format (jobs[job]->wd));
|
||||
|
||||
! printf ("\n");
|
||||
|
||||
/* Run the job. */
|
||||
-3699
File diff suppressed because it is too large
Load Diff
-4028
File diff suppressed because it is too large
Load Diff
-270
@@ -1,270 +0,0 @@
|
||||
*** display.c.orig Thu May 27 22:57:51 2004
|
||||
--- display.c Tue Nov 2 23:59:42 2004
|
||||
***************
|
||||
*** 125,129 ****
|
||||
--- 125,134 ----
|
||||
|
||||
/* Pseudo-global variables declared here. */
|
||||
+
|
||||
/* The visible cursor position. If you print some text, adjust this. */
|
||||
+ /* NOTE: _rl_last_c_pos is used as a buffer index when not in a locale
|
||||
+ supporting multibyte characters, and an absolute cursor position when
|
||||
+ in such a locale. This is an artifact of the donated multibyte support.
|
||||
+ Care must be taken when modifying its value. */
|
||||
int _rl_last_c_pos = 0;
|
||||
int _rl_last_v_pos = 0;
|
||||
***************
|
||||
*** 202,206 ****
|
||||
{
|
||||
char *r, *ret, *p;
|
||||
! int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars;
|
||||
|
||||
/* Short-circuit if we can. */
|
||||
--- 207,211 ----
|
||||
{
|
||||
char *r, *ret, *p;
|
||||
! int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
|
||||
|
||||
/* Short-circuit if we can. */
|
||||
***************
|
||||
*** 223,226 ****
|
||||
--- 228,232 ----
|
||||
|
||||
invfl = 0; /* invisible chars in first line of prompt */
|
||||
+ invflset = 0; /* we only want to set invfl once */
|
||||
|
||||
for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
|
||||
***************
|
||||
*** 250,254 ****
|
||||
*r++ = *p++;
|
||||
if (!ignoring)
|
||||
! rl += ind - pind;
|
||||
else
|
||||
ninvis += ind - pind;
|
||||
--- 256,263 ----
|
||||
*r++ = *p++;
|
||||
if (!ignoring)
|
||||
! {
|
||||
! rl += ind - pind;
|
||||
! physchars += _rl_col_width (pmt, pind, ind);
|
||||
! }
|
||||
else
|
||||
ninvis += ind - pind;
|
||||
***************
|
||||
*** 260,273 ****
|
||||
*r++ = *p;
|
||||
if (!ignoring)
|
||||
! rl++; /* visible length byte counter */
|
||||
else
|
||||
ninvis++; /* invisible chars byte counter */
|
||||
}
|
||||
|
||||
! if (rl >= _rl_screenwidth)
|
||||
! invfl = ninvis;
|
||||
!
|
||||
! if (ignoring == 0)
|
||||
! physchars++;
|
||||
}
|
||||
}
|
||||
--- 269,285 ----
|
||||
*r++ = *p;
|
||||
if (!ignoring)
|
||||
! {
|
||||
! rl++; /* visible length byte counter */
|
||||
! physchars++;
|
||||
! }
|
||||
else
|
||||
ninvis++; /* invisible chars byte counter */
|
||||
}
|
||||
|
||||
! if (invflset == 0 && rl >= _rl_screenwidth)
|
||||
! {
|
||||
! invfl = ninvis;
|
||||
! invflset = 1;
|
||||
! }
|
||||
}
|
||||
}
|
||||
***************
|
||||
*** 352,356 ****
|
||||
&prompt_last_invisible,
|
||||
(int *)NULL,
|
||||
! (int *)NULL);
|
||||
c = *t; *t = '\0';
|
||||
/* The portion of the prompt string up to and including the
|
||||
--- 364,368 ----
|
||||
&prompt_last_invisible,
|
||||
(int *)NULL,
|
||||
! &prompt_physical_chars);
|
||||
c = *t; *t = '\0';
|
||||
/* The portion of the prompt string up to and including the
|
||||
***************
|
||||
*** 359,363 ****
|
||||
(int *)NULL,
|
||||
&prompt_invis_chars_first_line,
|
||||
! &prompt_physical_chars);
|
||||
*t = c;
|
||||
return (prompt_prefix_length);
|
||||
--- 371,375 ----
|
||||
(int *)NULL,
|
||||
&prompt_invis_chars_first_line,
|
||||
! (int *)NULL);
|
||||
*t = c;
|
||||
return (prompt_prefix_length);
|
||||
***************
|
||||
*** 418,422 ****
|
||||
register char *line;
|
||||
int c_pos, inv_botlin, lb_botlin, lb_linenum;
|
||||
! int newlines, lpos, temp, modmark;
|
||||
char *prompt_this_line;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
--- 430,434 ----
|
||||
register char *line;
|
||||
int c_pos, inv_botlin, lb_botlin, lb_linenum;
|
||||
! int newlines, lpos, temp, modmark, n0, num;
|
||||
char *prompt_this_line;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
***************
|
||||
*** 574,577 ****
|
||||
--- 586,590 ----
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
memset (_rl_wrapped_line, 0, vis_lbsize);
|
||||
+ num = 0;
|
||||
#endif
|
||||
|
||||
***************
|
||||
*** 592,596 ****
|
||||
--- 605,624 ----
|
||||
prompts that exceed two physical lines?
|
||||
Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ n0 = num;
|
||||
+ temp = local_prompt ? strlen (local_prompt) : 0;
|
||||
+ while (num < temp)
|
||||
+ {
|
||||
+ if (_rl_col_width (local_prompt, n0, num) > _rl_screenwidth)
|
||||
+ {
|
||||
+ num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
|
||||
+ break;
|
||||
+ }
|
||||
+ num++;
|
||||
+ }
|
||||
+ temp = num +
|
||||
+ #else
|
||||
temp = ((newlines + 1) * _rl_screenwidth) +
|
||||
+ #endif /* !HANDLE_MULTIBYTE */
|
||||
((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
|
||||
: ((newlines == 1) ? wrap_offset : 0))
|
||||
***************
|
||||
*** 598,602 ****
|
||||
--- 626,634 ----
|
||||
|
||||
inv_lbreaks[++newlines] = temp;
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ lpos -= _rl_col_width (local_prompt, n0, num);
|
||||
+ #else
|
||||
lpos -= _rl_screenwidth;
|
||||
+ #endif
|
||||
}
|
||||
|
||||
***************
|
||||
*** 807,811 ****
|
||||
if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up)
|
||||
{
|
||||
! int nleft, pos, changed_screen_line;
|
||||
|
||||
if (!rl_display_fixed || forced_display)
|
||||
--- 839,843 ----
|
||||
if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up)
|
||||
{
|
||||
! int nleft, pos, changed_screen_line, tx;
|
||||
|
||||
if (!rl_display_fixed || forced_display)
|
||||
***************
|
||||
*** 852,855 ****
|
||||
--- 884,892 ----
|
||||
(_rl_last_c_pos < visible_first_line_len))
|
||||
{
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
+ nleft = _rl_screenwidth - _rl_last_c_pos;
|
||||
+ else
|
||||
+ #endif
|
||||
nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos;
|
||||
if (nleft)
|
||||
***************
|
||||
*** 888,892 ****
|
||||
but the buffer position needs to be adjusted to account
|
||||
for invisible characters. */
|
||||
! if (cursor_linenum == 0 && wrap_offset)
|
||||
_rl_last_c_pos += wrap_offset;
|
||||
}
|
||||
--- 925,929 ----
|
||||
but the buffer position needs to be adjusted to account
|
||||
for invisible characters. */
|
||||
! if ((MB_CUR_MAX == 1 || rl_byte_oriented) && cursor_linenum == 0 && wrap_offset)
|
||||
_rl_last_c_pos += wrap_offset;
|
||||
}
|
||||
***************
|
||||
*** 926,934 ****
|
||||
if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos)
|
||||
{
|
||||
- _rl_backspace (_rl_last_c_pos - nleft);
|
||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
! _rl_last_c_pos = _rl_col_width (&visible_line[pos], 0, nleft);
|
||||
else
|
||||
! _rl_last_c_pos = nleft;
|
||||
}
|
||||
|
||||
--- 963,972 ----
|
||||
if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos)
|
||||
{
|
||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
! tx = _rl_col_width (&visible_line[pos], 0, nleft);
|
||||
else
|
||||
! tx = nleft;
|
||||
! _rl_backspace (_rl_last_c_pos - tx); /* XXX */
|
||||
! _rl_last_c_pos = tx;
|
||||
}
|
||||
|
||||
***************
|
||||
*** 1091,1095 ****
|
||||
emulators. In this calculation, TEMP is the physical screen
|
||||
position of the cursor. */
|
||||
! temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
|
||||
if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode
|
||||
&& _rl_last_v_pos == current_line - 1)
|
||||
--- 1129,1136 ----
|
||||
emulators. In this calculation, TEMP is the physical screen
|
||||
position of the cursor. */
|
||||
! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
! temp = _rl_last_c_pos;
|
||||
! else
|
||||
! temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset);
|
||||
if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode
|
||||
&& _rl_last_v_pos == current_line - 1)
|
||||
***************
|
||||
*** 1297,1301 ****
|
||||
{
|
||||
_rl_move_vert (current_line);
|
||||
! if (current_line == 0 && visible_wrap_offset)
|
||||
_rl_last_c_pos += visible_wrap_offset;
|
||||
}
|
||||
--- 1338,1342 ----
|
||||
{
|
||||
_rl_move_vert (current_line);
|
||||
! if ((MB_CUR_MAX == 1 || rl_byte_oriented) && current_line == 0 && visible_wrap_offset)
|
||||
_rl_last_c_pos += visible_wrap_offset;
|
||||
}
|
||||
***************
|
||||
*** 1388,1392 ****
|
||||
_rl_last_c_pos += col_lendiff;
|
||||
}
|
||||
! else if (*ols == 0 && lendiff > 0)
|
||||
{
|
||||
/* At the end of a line the characters do not have to
|
||||
--- 1429,1433 ----
|
||||
_rl_last_c_pos += col_lendiff;
|
||||
}
|
||||
! else if ((MB_CUR_MAX == 1 || rl_byte_oriented != 0) && *ols == 0 && lendiff > 0)
|
||||
{
|
||||
/* At the end of a line the characters do not have to
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,76 +0,0 @@
|
||||
# This makefile for Readline library documentation is in -*- text -*- mode.
|
||||
# Emacs likes it that way.
|
||||
RM = rm -f
|
||||
|
||||
MAKEINFO = makeinfo
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXI2HTML = texi2html
|
||||
QUIETPS = #set this to -q to shut up dvips
|
||||
DVIPS = dvips -D 300 $(QUIETPS) -o $@ # tricky
|
||||
|
||||
INSTALL_DATA = cp
|
||||
infodir = /usr/local/info
|
||||
|
||||
RLSRC = rlman.texinfo rluser.texinfo rltech.texinfo
|
||||
HISTSRC = hist.texinfo hsuser.texinfo hstech.texinfo
|
||||
|
||||
DVIOBJ = readline.dvi history.dvi
|
||||
INFOOBJ = readline.info history.info
|
||||
PSOBJ = readline.ps history.ps
|
||||
HTMLOBJ = readline.html history.html
|
||||
|
||||
all: info dvi html ps
|
||||
nodvi: info html
|
||||
|
||||
readline.dvi: $(RLSRC)
|
||||
$(TEXI2DVI) rlman.texinfo
|
||||
mv rlman.dvi readline.dvi
|
||||
|
||||
readline.info: $(RLSRC)
|
||||
$(MAKEINFO) --no-split -o $@ rlman.texinfo
|
||||
|
||||
history.dvi: ${HISTSRC}
|
||||
$(TEXI2DVI) hist.texinfo
|
||||
mv hist.dvi history.dvi
|
||||
|
||||
history.info: ${HISTSRC}
|
||||
$(MAKEINFO) --no-split -o $@ hist.texinfo
|
||||
|
||||
readline.ps: readline.dvi
|
||||
$(RM) $@
|
||||
$(DVIPS) readline.dvi
|
||||
|
||||
history.ps: history.dvi
|
||||
$(RM) $@
|
||||
$(DVIPS) history.dvi
|
||||
|
||||
readline.html: ${RLSRC}
|
||||
$(TEXI2HTML) rlman.texinfo
|
||||
sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman.html > readline.html
|
||||
sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman_toc.html > readline_toc.html
|
||||
$(RM) rlman.html rlman_toc.html
|
||||
|
||||
history.html: ${HISTSRC}
|
||||
$(TEXI2HTML) hist.texinfo
|
||||
sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist.html > history.html
|
||||
sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist_toc.html > history_toc.html
|
||||
$(RM) hist.html hist_toc.html
|
||||
|
||||
info: $(INFOOBJ)
|
||||
dvi: $(DVIOBJ)
|
||||
ps: $(PSOBJ)
|
||||
html: $(HTMLOBJ)
|
||||
|
||||
clean:
|
||||
$(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
|
||||
*.fns *.kys *.tps *.vrs *.o core
|
||||
|
||||
distclean: clean
|
||||
mostlyclean: clean
|
||||
|
||||
maintainer-clean: clean
|
||||
$(RM) *.dvi *.info *.info-* *.ps *.html
|
||||
|
||||
install: info
|
||||
${INSTALL_DATA} readline.info $(infodir)/readline.info
|
||||
${INSTALL_DATA} history.info $(infodir)/history.info
|
||||
@@ -1,23 +0,0 @@
|
||||
*** ../bash-3.0/lib/readline/mbutil.c Wed Jan 14 09:44:52 2004
|
||||
--- lib/readline/mbutil.c Wed Aug 18 22:25:57 2004
|
||||
***************
|
||||
*** 127,135 ****
|
||||
{
|
||||
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
|
||||
! while (wcwidth (wc) == 0)
|
||||
{
|
||||
point += tmp;
|
||||
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
|
||||
! if (tmp == (size_t)(0) || tmp == (size_t)(-1) || tmp == (size_t)(-2))
|
||||
break;
|
||||
}
|
||||
--- 127,135 ----
|
||||
{
|
||||
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
|
||||
! while (tmp > 0 && wcwidth (wc) == 0)
|
||||
{
|
||||
point += tmp;
|
||||
tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
|
||||
! if (MB_NULLWCH (tmp) || MB_INVALIDCH (tmp))
|
||||
break;
|
||||
}
|
||||
-4891
File diff suppressed because it is too large
Load Diff
@@ -1,20 +0,0 @@
|
||||
*** ../bash-3.0/pcomplete.c Thu Jan 8 10:36:17 2004
|
||||
--- pcomplete.c Tue Aug 3 23:15:41 2004
|
||||
***************
|
||||
*** 864,867 ****
|
||||
--- 864,869 ----
|
||||
v = convert_var_to_array (v);
|
||||
v = assign_array_var_from_word_list (v, lwords);
|
||||
+
|
||||
+ VUNSETATTR (v, att_invisible);
|
||||
return v;
|
||||
}
|
||||
***************
|
||||
*** 1022,1025 ****
|
||||
--- 1024,1029 ----
|
||||
if (array_p (v) == 0)
|
||||
v = convert_var_to_array (v);
|
||||
+
|
||||
+ VUNSETATTR (v, att_invisible);
|
||||
|
||||
a = array_cell (v);
|
||||
@@ -1,2 +0,0 @@
|
||||
# Set of available languages.
|
||||
en@quot en@boldquot
|
||||
@@ -1,357 +0,0 @@
|
||||
# Makefile for PO directory in any package using GNU gettext.
|
||||
# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
|
||||
PACKAGE = @PACKAGE_NAME@
|
||||
VERSION = @PACKAGE_VERSION@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
topdir = @top_srcdir@
|
||||
BUILD_DIR = @BUILD_DIR@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = @datadir@
|
||||
localedir = $(datadir)/locale
|
||||
gettextsrcdir = $(datadir)/gettext/po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
|
||||
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
MSGMERGE = msgmerge
|
||||
MSGMERGE_UPDATE = @MSGMERGE@ --update
|
||||
MSGINIT = msginit
|
||||
MSGCONV = msgconv
|
||||
MSGFILTER = msgfilter
|
||||
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
UPDATEPOFILES = @UPDATEPOFILES@
|
||||
DUMMYPOFILES = @DUMMYPOFILES@
|
||||
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
|
||||
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
|
||||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
|
||||
$(POFILES) $(GMOFILES) \
|
||||
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
|
||||
# Makevars gets inserted here. (Don't remove this line!)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
|
||||
|
||||
.po.mo:
|
||||
@echo "$(MSGFMT) -c -o $@ $<"; \
|
||||
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
|
||||
|
||||
.po.gmo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
|
||||
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
|
||||
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' $< > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: stamp-po
|
||||
all-no:
|
||||
|
||||
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
|
||||
# been loosely updated. Its purpose is that when a developer or translator
|
||||
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
|
||||
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
|
||||
# invocations of "make" will do nothing. This timestamp would not be necessary
|
||||
# if updating the $(CATALOGS) would always touch them; however, the rule for
|
||||
# $(POFILES) has been designed to not touch files that don't need to be
|
||||
# changed.
|
||||
stamp-po: $(srcdir)/$(DOMAIN).pot
|
||||
test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS)
|
||||
@echo "touch stamp-po"
|
||||
@echo timestamp > stamp-poT
|
||||
@mv stamp-poT stamp-po
|
||||
|
||||
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
|
||||
# otherwise packages like GCC can not be built if only parts of the source
|
||||
# have been downloaded.
|
||||
|
||||
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
|
||||
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
|
||||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
||||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
||||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||
--msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
|
||||
$(MAKE) $(MFLAGS) builtins.pot-update
|
||||
test ! -f $(DOMAIN).po || { \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
|
||||
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
|
||||
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
|
||||
else \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
else \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
}
|
||||
|
||||
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
|
||||
# every "make" invocation, only create it when it is missing.
|
||||
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
|
||||
$(srcdir)/$(DOMAIN).pot:
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
|
||||
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
|
||||
# Note that a PO file is not touched if it doesn't need to be changed.
|
||||
$(POFILES): $(srcdir)/$(DOMAIN).pot
|
||||
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
|
||||
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
for file in Makevars; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
|
||||
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
install-strip: install
|
||||
|
||||
installdirs: installdirs-exec installdirs-data
|
||||
installdirs-exec:
|
||||
installdirs-data: installdirs-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
installdirs-data-no:
|
||||
installdirs-data-yes:
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall: uninstall-exec uninstall-data
|
||||
uninstall-exec:
|
||||
uninstall-data: uninstall-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
uninstall-data-no:
|
||||
uninstall-data-yes:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
done; \
|
||||
done
|
||||
|
||||
check: all
|
||||
|
||||
info dvi ps pdf html tags TAGS ctags CTAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f remove-potcdate.sed
|
||||
rm -f stamp-poT
|
||||
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f stamp-po $(GMOFILES)
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir:
|
||||
$(MAKE) update-po
|
||||
@$(MAKE) dist2
|
||||
# This is a separate target because 'update-po' must be executed before.
|
||||
dist2: $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
dists="$$dists Makevars.template"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/ChangeLog; then \
|
||||
dists="$$dists ChangeLog"; \
|
||||
fi; \
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do \
|
||||
if test -f $(srcdir)/ChangeLog.$$i; then \
|
||||
dists="$$dists ChangeLog.$$i"; \
|
||||
fi; \
|
||||
done; \
|
||||
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
|
||||
for file in $$dists; do \
|
||||
if test -f $$file; then \
|
||||
cp -p $$file $(distdir); \
|
||||
else \
|
||||
cp -p $(srcdir)/$$file $(distdir); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
|
||||
$(MAKE) update-gmo
|
||||
|
||||
# General rule for updating PO files.
|
||||
|
||||
.nop.po-update:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
|
||||
cd $(srcdir); \
|
||||
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed!" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi
|
||||
|
||||
$(DUMMYPOFILES):
|
||||
|
||||
update-gmo: Makefile $(GMOFILES)
|
||||
@:
|
||||
|
||||
Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ $(srcdir)/Rules-builtins
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
force:
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -1,41 +0,0 @@
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = $(BUILD_DIR)
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ -C
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||
# - Strings which use unclear terms or require additional context to be
|
||||
# understood.
|
||||
# - Strings which make invalid assumptions about notation of date, time or
|
||||
# money.
|
||||
# - Pluralisation problems.
|
||||
# - Incorrect English spelling.
|
||||
# - Incorrect formatting.
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS = bug-bash@gnu.org
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
||||
@@ -1,41 +0,0 @@
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||
# - Strings which use unclear terms or require additional context to be
|
||||
# understood.
|
||||
# - Strings which make invalid assumptions about notation of date, time or
|
||||
# money.
|
||||
# - Pluralisation problems.
|
||||
# - Incorrect English spelling.
|
||||
# - Incorrect formatting.
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS =
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
||||
@@ -1,76 +0,0 @@
|
||||
# List of source files containing translatable strings.
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
|
||||
arrayfunc.c
|
||||
bashhist.c
|
||||
bashline.c
|
||||
braces.c
|
||||
builtins/bind.def
|
||||
builtins/break.def
|
||||
builtins/caller.def
|
||||
builtins/cd.def
|
||||
builtins/common.c
|
||||
builtins/complete.def
|
||||
builtins/declare.def
|
||||
builtins/enable.def
|
||||
builtins/evalfile.c
|
||||
builtins/exec.def
|
||||
builtins/exit.def
|
||||
builtins/fc.def
|
||||
builtins/fg_bg.def
|
||||
builtins/getopt.c
|
||||
builtins/hash.def
|
||||
builtins/help.def
|
||||
builtins/history.def
|
||||
builtins/inlib.def
|
||||
builtins/jobs.def
|
||||
builtins/kill.def
|
||||
builtins/let.def
|
||||
builtins/mkbuiltins.c
|
||||
builtins/printf.def
|
||||
builtins/pushd.def
|
||||
builtins/read.def
|
||||
builtins/return.def
|
||||
builtins/set.def
|
||||
builtins/setattr.def
|
||||
builtins/shift.def
|
||||
builtins/shopt.def
|
||||
builtins/source.def
|
||||
builtins/suspend.def
|
||||
builtins/type.def
|
||||
builtins/ulimit.def
|
||||
builtins/umask.def
|
||||
error.c
|
||||
eval.c
|
||||
execute_cmd.c
|
||||
expr.c
|
||||
general.c
|
||||
input.c
|
||||
jobs.c
|
||||
lib/malloc/malloc.c
|
||||
lib/malloc/stats.c
|
||||
lib/malloc/table.c
|
||||
lib/malloc/watch.c
|
||||
lib/sh/fmtulong.c
|
||||
lib/sh/netopen.c
|
||||
mailcheck.c
|
||||
make_cmd.c
|
||||
nojobs.c
|
||||
parse.y
|
||||
pcomplete.c
|
||||
pcomplib.c
|
||||
print_cmd.c
|
||||
redir.c
|
||||
shell.c
|
||||
sig.c
|
||||
siglist.c
|
||||
subst.c
|
||||
test.c
|
||||
trap.c
|
||||
variables.c
|
||||
version.c
|
||||
xmalloc.c
|
||||
|
||||
# Apparently gettext's defaults cannot handle files that exist outside of the
|
||||
# source directory, like in the build directory
|
||||
#../builtins/builtins.c
|
||||
@@ -1 +0,0 @@
|
||||
This apparently requires GNU sed
|
||||
@@ -1,19 +0,0 @@
|
||||
#
|
||||
# Update the strings from the builtins' long docs. Must be called when
|
||||
# bash.pot exists, in the middle of the bash.pot-update recipe
|
||||
#
|
||||
builtins.pot-update: $(top_builddir)/builtins/builtins.c
|
||||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_builddir)/builtins \
|
||||
$(XGETTEXT_OPTIONS) --omit-header \
|
||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||
--join-existing \
|
||||
builtins.c
|
||||
|
||||
# This rule has no dependencies: we don't need to update builtins.pot at
|
||||
# every "make" invocation, only create it when it is missing.
|
||||
# Only "make builtins.pot-update" or "make dist" will force an update.
|
||||
$(srcdir)/builtins.pot:
|
||||
$(MAKE) builtins.pot-update
|
||||
|
||||
xdist:
|
||||
$(MAKE) update-po
|
||||
@@ -1,42 +0,0 @@
|
||||
# Special Makefile rules for English message catalogs with quotation marks.
|
||||
|
||||
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
|
||||
|
||||
.SUFFIXES: .insert-header .po-update-en
|
||||
|
||||
en@quot.po-update: en@quot.po-update-en
|
||||
en@boldquot.po-update: en@boldquot.po-update-en
|
||||
|
||||
.insert-header.po-update-en:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
ll=`echo $$lang | sed -e 's/@.*//'`; \
|
||||
LC_ALL=C; export LC_ALL; \
|
||||
cd $(srcdir); \
|
||||
if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "creation of $$lang.po failed!" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi
|
||||
|
||||
en@quot.insert-header: insert-header.sin
|
||||
sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
|
||||
|
||||
en@boldquot.insert-header: insert-header.sin
|
||||
sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
|
||||
|
||||
mostlyclean: mostlyclean-quot
|
||||
mostlyclean-quot:
|
||||
rm -f *.insert-header
|
||||
-4174
File diff suppressed because it is too large
Load Diff
@@ -1,10 +0,0 @@
|
||||
s/"\([^"]*\)"/“\1”/g
|
||||
s/`\([^`']*\)'/‘\1’/g
|
||||
s/ '\([^`']*\)' / ‘\1’ /g
|
||||
s/ '\([^`']*\)'$/ ‘\1’/g
|
||||
s/^'\([^`']*\)' /‘\1’ /g
|
||||
s/“”/""/g
|
||||
s/“/“[1m/g
|
||||
s/”/[0m”/g
|
||||
s/‘/‘[1m/g
|
||||
s/’/[0m’/g
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,25 +0,0 @@
|
||||
# All this catalog "translates" are quotation characters.
|
||||
# The msgids must be ASCII and therefore cannot contain real quotation
|
||||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
|
||||
# and double quote (0x22). These substitutes look strange; see
|
||||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
|
||||
#
|
||||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
|
||||
# It also translates pairs of apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
|
||||
# and pairs of quotation mark (0x22) to
|
||||
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
|
||||
#
|
||||
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
|
||||
# When output to an ISO-8859-1 terminal, the single quotation marks are
|
||||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
|
||||
# grave/acute accent (by libiconv), and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
# When output to an ASCII terminal, the single quotation marks are
|
||||
# transliterated to apostrophes, and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
#
|
||||
# This catalog furthermore displays the text between the quotation marks in
|
||||
# bold face, assuming the VT100/XTerm escape sequences.
|
||||
#
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,22 +0,0 @@
|
||||
# All this catalog "translates" are quotation characters.
|
||||
# The msgids must be ASCII and therefore cannot contain real quotation
|
||||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
|
||||
# and double quote (0x22). These substitutes look strange; see
|
||||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
|
||||
#
|
||||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
|
||||
# It also translates pairs of apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
|
||||
# and pairs of quotation mark (0x22) to
|
||||
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
|
||||
#
|
||||
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
|
||||
# When output to an ISO-8859-1 terminal, the single quotation marks are
|
||||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
|
||||
# grave/acute accent (by libiconv), and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
# When output to an ASCII terminal, the single quotation marks are
|
||||
# transliterated to apostrophes, and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
#
|
||||
-4283
File diff suppressed because it is too large
Load Diff
@@ -1,23 +0,0 @@
|
||||
# Sed script that inserts the file called HEADER before the header entry.
|
||||
#
|
||||
# At each occurrence of a line starting with "msgid ", we execute the following
|
||||
# commands. At the first occurrence, insert the file. At the following
|
||||
# occurrences, do nothing. The distinction between the first and the following
|
||||
# occurrences is achieved by looking at the hold space.
|
||||
/^msgid /{
|
||||
x
|
||||
# Test if the hold space is empty.
|
||||
s/m/m/
|
||||
ta
|
||||
# Yes it was empty. First occurrence. Read the file.
|
||||
r HEADER
|
||||
# Output the file's contents by reading the next line. But don't lose the
|
||||
# current line while doing this.
|
||||
g
|
||||
N
|
||||
bb
|
||||
:a
|
||||
# The hold space was nonempty. Following occurrences. Do nothing.
|
||||
x
|
||||
:b
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
s/"\([^"]*\)"/“\1”/g
|
||||
s/`\([^`']*\)'/‘\1’/g
|
||||
s/ '\([^`']*\)' / ‘\1’ /g
|
||||
s/ '\([^`']*\)'$/ ‘\1’/g
|
||||
s/^'\([^`']*\)' /‘\1’ /g
|
||||
s/“”/""/g
|
||||
@@ -1,133 +0,0 @@
|
||||
#: lib/readline/bind.c:878
|
||||
#, c-format
|
||||
msgid "readline: %s: line %d: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:881
|
||||
#, c-format
|
||||
msgid "readline: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:994
|
||||
msgid "$else found without matching $if"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:1024
|
||||
msgid "$endif without matching $if"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:1101
|
||||
msgid "unknown parser directive"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:1162
|
||||
msgid "no closing `\"' in key binding"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:1977
|
||||
#, c-format
|
||||
msgid "# %s (not bound)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:1995
|
||||
#, c-format
|
||||
msgid "%s is not bound to any keys\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:2001
|
||||
#, c-format
|
||||
msgid "%s can be found on "
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:2128
|
||||
#, c-format
|
||||
msgid "%s is set to `%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:2146
|
||||
#, c-format
|
||||
msgid "bell-style is set to `%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:2152
|
||||
#, c-format
|
||||
msgid "comment-begin is set to `%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:2158
|
||||
#, c-format
|
||||
msgid "completion-query-items is set to `%d'\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:2164
|
||||
#, c-format
|
||||
msgid "editing-mode is set to `%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:2176
|
||||
#, c-format
|
||||
msgid "isearch-terminators is set to \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/bind.c:2188
|
||||
#, c-format
|
||||
msgid "keymap is set to `%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/callback.c:105
|
||||
msgid "readline: readline_callback_read_char() called with no handler!\r\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/complete.c:1342
|
||||
#, c-format
|
||||
msgid "Display all %d possibilities? (y or n)"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/complete.c:1681
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\r\n"
|
||||
"readline: bad value %d for what_to_do in rl_complete\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/display.c:1924
|
||||
#, c-format
|
||||
msgid "readline: debug: insert_some_chars: count (%d) != col (%d)\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/histexpand.c:377
|
||||
msgid "event not found"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/histexpand.c:381
|
||||
msgid "bad word specifier"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/histexpand.c:385
|
||||
msgid "substitution failed"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/histexpand.c:389
|
||||
msgid "unrecognized history modifier"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/histexpand.c:393
|
||||
msgid "no previous substitution"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/histexpand.c:397
|
||||
msgid "unknown expansion error"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/rltty.c:464
|
||||
#, c-format
|
||||
msgid "readline: warning: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/rltty.c:475
|
||||
msgid "turning on OPOST for terminal\r"
|
||||
msgstr ""
|
||||
|
||||
#: lib/readline/rltty.c:501
|
||||
msgid "turning off output flushing"
|
||||
msgstr ""
|
||||
@@ -1,19 +0,0 @@
|
||||
# Sed script that remove the POT-Creation-Date line in the header entry
|
||||
# from a POT file.
|
||||
#
|
||||
# The distinction between the first and the following occurrences of the
|
||||
# pattern is achieved by looking at the hold space.
|
||||
/^"POT-Creation-Date: .*"$/{
|
||||
x
|
||||
# Test if the hold space is empty.
|
||||
s/P/P/
|
||||
ta
|
||||
# Yes it was empty. First occurrence. Remove the line.
|
||||
g
|
||||
d
|
||||
bb
|
||||
:a
|
||||
# The hold space was nonempty. Following occurrences. Do nothing.
|
||||
x
|
||||
:b
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
*** ../bash-3.0/include/shmbutil.h Mon Apr 19 09:59:42 2004
|
||||
--- include/shmbutil.h Thu Sep 2 15:20:47 2004
|
||||
***************
|
||||
*** 32,35 ****
|
||||
--- 32,37 ----
|
||||
extern size_t xdupmbstowcs __P((wchar_t **, char ***, const char *));
|
||||
|
||||
+ extern size_t mbstrlen __P((const char *));
|
||||
+
|
||||
extern char *xstrchr __P((const char *, int));
|
||||
|
||||
***************
|
||||
*** 39,42 ****
|
||||
--- 41,47 ----
|
||||
#endif
|
||||
|
||||
+ #define MBSLEN(s) (((s) && (s)[0]) ? ((s)[1] ? mbstrlen (s) : 1) : 0)
|
||||
+ #define MB_STRLEN(s) ((MB_CUR_MAX > 1) ? MBSLEN (s) : STRLEN (s))
|
||||
+
|
||||
#else /* !HANDLE_MULTIBYTE */
|
||||
|
||||
***************
|
||||
*** 54,57 ****
|
||||
--- 59,64 ----
|
||||
#define MB_NULLWCH(x) (0)
|
||||
#endif
|
||||
+
|
||||
+ #define MB_STRLEN(s) (STRLEN(s))
|
||||
|
||||
#endif /* !HANDLE_MULTIBYTE */
|
||||
-108
@@ -1,108 +0,0 @@
|
||||
*** ../bash-3.0/subst.c Sun Jul 4 13:56:13 2004
|
||||
--- subst.c Thu Aug 12 13:36:17 2004
|
||||
***************
|
||||
*** 4692,4695 ****
|
||||
--- 4692,4715 ----
|
||||
}
|
||||
|
||||
+ #if defined (HANDLE_MULTIBYTE)
|
||||
+ size_t
|
||||
+ mbstrlen (s)
|
||||
+ const char *s;
|
||||
+ {
|
||||
+ size_t clen, nc;
|
||||
+ mbstate_t mbs;
|
||||
+
|
||||
+ nc = 0;
|
||||
+ memset (&mbs, 0, sizeof (mbs));
|
||||
+ while ((clen = mbrlen(s, MB_CUR_MAX, &mbs)) != 0 && (MB_INVALIDCH(clen) == 0))
|
||||
+ {
|
||||
+ s += clen;
|
||||
+ nc++;
|
||||
+ }
|
||||
+ return nc;
|
||||
+ }
|
||||
+ #endif
|
||||
+
|
||||
+
|
||||
/* Handle the parameter brace expansion that requires us to return the
|
||||
length of a parameter. */
|
||||
***************
|
||||
*** 4747,4758 ****
|
||||
{
|
||||
t = get_dollar_var_value (arg_index);
|
||||
! number = STRLEN (t);
|
||||
FREE (t);
|
||||
}
|
||||
#if defined (ARRAY_VARS)
|
||||
! else if ((var = find_variable (name + 1)) && array_p (var))
|
||||
{
|
||||
t = array_reference (array_cell (var), 0);
|
||||
! number = STRLEN (t);
|
||||
}
|
||||
#endif
|
||||
--- 4767,4778 ----
|
||||
{
|
||||
t = get_dollar_var_value (arg_index);
|
||||
! number = MB_STRLEN (t);
|
||||
FREE (t);
|
||||
}
|
||||
#if defined (ARRAY_VARS)
|
||||
! else if ((var = find_variable (name + 1)) && (invisible_p (var) == 0) && array_p (var))
|
||||
{
|
||||
t = array_reference (array_cell (var), 0);
|
||||
! number = MB_STRLEN (t);
|
||||
}
|
||||
#endif
|
||||
***************
|
||||
*** 4767,4771 ****
|
||||
dispose_words (list);
|
||||
|
||||
! number = STRLEN (t);
|
||||
FREE (t);
|
||||
}
|
||||
--- 4787,4791 ----
|
||||
dispose_words (list);
|
||||
|
||||
! number = MB_STRLEN (t);
|
||||
FREE (t);
|
||||
}
|
||||
***************
|
||||
*** 4872,4876 ****
|
||||
case VT_VARIABLE:
|
||||
case VT_ARRAYMEMBER:
|
||||
! len = strlen (value);
|
||||
break;
|
||||
case VT_POSPARMS:
|
||||
--- 4892,4896 ----
|
||||
case VT_VARIABLE:
|
||||
case VT_ARRAYMEMBER:
|
||||
! len = MB_STRLEN (value);
|
||||
break;
|
||||
case VT_POSPARMS:
|
||||
***************
|
||||
*** 4892,4896 ****
|
||||
*e1p += len;
|
||||
|
||||
! if (*e1p >= len || *e1p < 0)
|
||||
return (-1);
|
||||
|
||||
--- 4912,4916 ----
|
||||
*e1p += len;
|
||||
|
||||
! if (*e1p > len || *e1p < 0)
|
||||
return (-1);
|
||||
|
||||
***************
|
||||
*** 4983,4987 ****
|
||||
return -1;
|
||||
}
|
||||
! else if ((v = find_variable (varname)) && array_p (v))
|
||||
{
|
||||
vtype = VT_ARRAYMEMBER;
|
||||
--- 5003,5007 ----
|
||||
return -1;
|
||||
}
|
||||
! else if ((v = find_variable (varname)) && (invisible_p (v) == 0) && array_p (v))
|
||||
{
|
||||
vtype = VT_ARRAYMEMBER;
|
||||
@@ -1,68 +0,0 @@
|
||||
*** ../bash-3.0/variables.c Sun Jul 4 13:57:26 2004
|
||||
--- variables.c Wed Aug 4 15:28:04 2004
|
||||
***************
|
||||
*** 1420,1428 ****
|
||||
|
||||
# if defined (DEBUGGER)
|
||||
! v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, (att_invisible|att_noassign));
|
||||
! v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, (att_invisible|att_noassign));
|
||||
# endif /* DEBUGGER */
|
||||
! v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, (att_invisible|att_noassign));
|
||||
! v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, (att_invisible|att_noassign));
|
||||
#endif
|
||||
|
||||
--- 1420,1428 ----
|
||||
|
||||
# if defined (DEBUGGER)
|
||||
! v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign);
|
||||
! v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign);
|
||||
# endif /* DEBUGGER */
|
||||
! v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign);
|
||||
! v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign);
|
||||
#endif
|
||||
|
||||
***************
|
||||
*** 1600,1604 ****
|
||||
old_var = find_variable (name);
|
||||
if (old_var && local_p (old_var) && old_var->context == variable_context)
|
||||
! return (old_var);
|
||||
|
||||
was_tmpvar = old_var && tempvar_p (old_var);
|
||||
--- 1600,1607 ----
|
||||
old_var = find_variable (name);
|
||||
if (old_var && local_p (old_var) && old_var->context == variable_context)
|
||||
! {
|
||||
! VUNSETATTR (old_var, att_invisible);
|
||||
! return (old_var);
|
||||
! }
|
||||
|
||||
was_tmpvar = old_var && tempvar_p (old_var);
|
||||
***************
|
||||
*** 2303,2306 ****
|
||||
--- 2306,2315 ----
|
||||
if (old_var && local_p (old_var) && variable_context == old_var->context)
|
||||
{
|
||||
+ #if defined (ARRAY_VARS)
|
||||
+ if (array_p (old_var))
|
||||
+ array_dispose (array_cell (old_var));
|
||||
+ else
|
||||
+ #endif
|
||||
+ FREE (value_cell (old_var));
|
||||
/* Reset the attributes. Preserve the export attribute if the variable
|
||||
came from a temporary environment. Make sure it stays local, and
|
||||
***************
|
||||
*** 2309,2313 ****
|
||||
VSETATTR (old_var, att_local);
|
||||
VSETATTR (old_var, att_invisible);
|
||||
- FREE (value_cell (old_var));
|
||||
var_setvalue (old_var, (char *)NULL);
|
||||
INVALIDATE_EXPORTSTR (old_var);
|
||||
--- 2318,2321 ----
|
||||
***************
|
||||
*** 3647,3650 ****
|
||||
--- 3655,3659 ----
|
||||
{ "LC_MESSAGES", sv_locale },
|
||||
{ "LC_NUMERIC", sv_locale },
|
||||
+ { "LC_TIME", sv_locale },
|
||||
|
||||
{ "MAIL", sv_mail },
|
||||
@@ -1,53 +0,0 @@
|
||||
*** ../bash-3.0/bashline.c Mon Jul 5 23:22:12 2004
|
||||
--- bashline.c Thu Sep 2 16:00:12 2004
|
||||
***************
|
||||
*** 2514,2518 ****
|
||||
static int ind;
|
||||
int glen;
|
||||
! char *ret;
|
||||
|
||||
if (state == 0)
|
||||
--- 2545,2549 ----
|
||||
static int ind;
|
||||
int glen;
|
||||
! char *ret, *ttext;
|
||||
|
||||
if (state == 0)
|
||||
***************
|
||||
*** 2524,2538 ****
|
||||
FREE (globtext);
|
||||
|
||||
if (rl_explicit_arg)
|
||||
{
|
||||
! globorig = savestring (text);
|
||||
! glen = strlen (text);
|
||||
globtext = (char *)xmalloc (glen + 2);
|
||||
! strcpy (globtext, text);
|
||||
globtext[glen] = '*';
|
||||
globtext[glen+1] = '\0';
|
||||
}
|
||||
else
|
||||
! globtext = globorig = savestring (text);
|
||||
|
||||
matches = shell_glob_filename (globtext);
|
||||
--- 2555,2574 ----
|
||||
FREE (globtext);
|
||||
|
||||
+ ttext = bash_tilde_expand (text, 0);
|
||||
+
|
||||
if (rl_explicit_arg)
|
||||
{
|
||||
! globorig = savestring (ttext);
|
||||
! glen = strlen (ttext);
|
||||
globtext = (char *)xmalloc (glen + 2);
|
||||
! strcpy (globtext, ttext);
|
||||
globtext[glen] = '*';
|
||||
globtext[glen+1] = '\0';
|
||||
}
|
||||
else
|
||||
! globtext = globorig = savestring (ttext);
|
||||
!
|
||||
! if (ttext != text)
|
||||
! free (ttext);
|
||||
|
||||
matches = shell_glob_filename (globtext);
|
||||
@@ -1,79 +0,0 @@
|
||||
*** ../bash-3.0/lib/readline/vi_mode.c Tue Jul 13 14:08:27 2004
|
||||
--- lib/readline/vi_mode.c Tue Aug 17 00:12:09 2004
|
||||
***************
|
||||
*** 273,280 ****
|
||||
--- 273,282 ----
|
||||
{
|
||||
case '?':
|
||||
+ _rl_free_saved_history_line ();
|
||||
rl_noninc_forward_search (count, key);
|
||||
break;
|
||||
|
||||
case '/':
|
||||
+ _rl_free_saved_history_line ();
|
||||
rl_noninc_reverse_search (count, key);
|
||||
break;
|
||||
***************
|
||||
*** 691,695 ****
|
||||
wchar_t wc;
|
||||
char mb[MB_LEN_MAX+1];
|
||||
! int mblen;
|
||||
mbstate_t ps;
|
||||
|
||||
--- 693,697 ----
|
||||
wchar_t wc;
|
||||
char mb[MB_LEN_MAX+1];
|
||||
! int mblen, p;
|
||||
mbstate_t ps;
|
||||
|
||||
***************
|
||||
*** 714,722 ****
|
||||
if (wc)
|
||||
{
|
||||
mblen = wcrtomb (mb, wc, &ps);
|
||||
if (mblen >= 0)
|
||||
mb[mblen] = '\0';
|
||||
rl_begin_undo_group ();
|
||||
! rl_delete (1, 0);
|
||||
rl_insert_text (mb);
|
||||
rl_end_undo_group ();
|
||||
--- 716,727 ----
|
||||
if (wc)
|
||||
{
|
||||
+ p = rl_point;
|
||||
mblen = wcrtomb (mb, wc, &ps);
|
||||
if (mblen >= 0)
|
||||
mb[mblen] = '\0';
|
||||
rl_begin_undo_group ();
|
||||
! rl_vi_delete (1, 0);
|
||||
! if (rl_point < p) /* Did we retreat at EOL? */
|
||||
! rl_point++; /* XXX - should we advance more than 1 for mbchar? */
|
||||
rl_insert_text (mb);
|
||||
rl_end_undo_group ();
|
||||
***************
|
||||
*** 1311,1320 ****
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
! while (_rl_insert_char (1, c))
|
||||
! {
|
||||
! RL_SETSTATE (RL_STATE_MOREINPUT);
|
||||
! c = rl_read_key ();
|
||||
! RL_UNSETSTATE (RL_STATE_MOREINPUT);
|
||||
! }
|
||||
else
|
||||
#endif
|
||||
--- 1316,1329 ----
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
! {
|
||||
! if (rl_point < p) /* Did we retreat at EOL? */
|
||||
! rl_point++;
|
||||
! while (_rl_insert_char (1, c))
|
||||
! {
|
||||
! RL_SETSTATE (RL_STATE_MOREINPUT);
|
||||
! c = rl_read_key ();
|
||||
! RL_UNSETSTATE (RL_STATE_MOREINPUT);
|
||||
! }
|
||||
! }
|
||||
else
|
||||
#endif
|
||||
@@ -1,18 +0,0 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
main()
|
||||
{
|
||||
int x;
|
||||
|
||||
x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
|
||||
if (x == -1 && errno == ECHILD)
|
||||
exit (0);
|
||||
else
|
||||
exit (1);
|
||||
}
|
||||
Reference in New Issue
Block a user