summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2013-08-12 19:18:42 -0400
committerChet Ramey <chet.ramey@case.edu>2013-08-12 19:18:42 -0400
commit1442f67c408e60769ff344f9e4c05104e2cef7d0 (patch)
tree6c093574f9b9342f172a8d8367aa9a5849cd4d85
parent25eee30b53c60c43b155880820d29c84928847ca (diff)
downloadbash-1442f67c408e60769ff344f9e4c05104e2cef7d0.tar.gz
bash-4.3-beta overlaybash-4.3-beta
-rw-r--r--CHANGES104
-rw-r--r--CWRU/CWRU.chlog345
-rw-r--r--CWRU/changelog345
-rw-r--r--MANIFEST5
-rw-r--r--NEWS2
-rw-r--r--arrayfunc.c4
-rw-r--r--builtins/common.h1
-rw-r--r--builtins/declare.def8
-rw-r--r--builtins/read.def12
-rw-r--r--builtins/set.def2
-rw-r--r--builtins/setattr.def18
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure337
-rw-r--r--configure.ac19
-rw-r--r--doc/bash.152
-rw-r--r--doc/bashref.texi39
-rw-r--r--doc/version.texi6
-rw-r--r--examples/loadables/Makefile.in9
-rw-r--r--execute_cmd.c17
-rw-r--r--expr.c17
-rw-r--r--general.c2
-rw-r--r--input.c2
-rw-r--r--jobs.c10
-rw-r--r--lib/glob/smatch.c6
-rw-r--r--lib/readline/bind.c1
-rw-r--r--lib/readline/colors.c7
-rw-r--r--lib/readline/complete.c6
-rw-r--r--lib/readline/doc/rltech.texi105
-rw-r--r--lib/readline/doc/version.texi12
-rw-r--r--lib/readline/examples/rl-callbacktest.c81
-rw-r--r--lib/readline/histfile.c9
-rw-r--r--lib/readline/history.c2
-rw-r--r--lib/readline/readline.c13
-rw-r--r--lib/readline/signals.c11
-rw-r--r--lib/sh/casemod.c17
-rw-r--r--lib/sh/pathphys.c2
-rw-r--r--lib/sh/shquote.c9
-rw-r--r--parse.y26
-rw-r--r--parser.h3
-rw-r--r--po/._hr.pobin0 -> 4096 bytes
-rw-r--r--po/hr.po1266
-rw-r--r--redir.c15
-rw-r--r--subst.c153
-rw-r--r--subst.h1
-rwxr-xr-x[-rw-r--r--]support/config.guess487
-rwxr-xr-x[-rw-r--r--]support/config.sub264
-rw-r--r--tests/appendop.right9
-rw-r--r--tests/appendop.tests4
-rw-r--r--tests/appendop2.sub18
-rw-r--r--tests/case.right11
-rw-r--r--tests/case.tests3
-rw-r--r--tests/case1.sub64
-rw-r--r--tests/nquote.right18
-rw-r--r--tests/nquote.tests1
-rw-r--r--tests/nquote2.sub29
-rw-r--r--tests/posix2.tests2
-rw-r--r--tests/trap.right18
-rw-r--r--tests/trap.tests2
-rw-r--r--tests/trap4.sub25
-rw-r--r--tests/trap5.sub18
-rw-r--r--trap.c15
-rw-r--r--variables.c52
-rw-r--r--y.tab.c348
-rw-r--r--y.tab.h2
64 files changed, 2993 insertions, 1501 deletions
diff --git a/CHANGES b/CHANGES
index 03eecd2d..3aaa8177 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,91 @@
+This document details the changes between this version, bash-4.3-beta, and the
+previous version, bash-4.3-alpha.
+
+1. Changes to Bash
+
+a. Fixed a bug in the prompt directory name "trimming" code that caused
+ memory corruption and garbled the results.
+
+b. Fixed a bug that caused single quotes that resulted from $'...' quoting
+ in the replacement portion of a double-quoted ${word/pat/rep} expansion
+ to be treated as quote characters.
+
+c. Fixed a bug that caused assignment statements preceding a command word to
+ result in assignment statements following a declaration command to not be
+ expanded like assignment statements.
+
+d. Fixed a bug with variable search order in the presence of local variables
+ with the same name as variables in the temporary environment supplied to
+ a shell function.
+
+e. Fixed a bug that caused constructs like 1<(2) to be interpreted as process
+ substitutions even in an arithmetic context.
+
+f. Fixed several cases where `invisible' variables (variables with attributes
+ but no values, which are technically unset) were treated incorrectly.
+
+g. Fixed a bug that caused group commands in pipelines that were not the
+ last element to not run the EXIT trap.
+
+h. Fixed a bug that caused `unset -n' to not unset a nameref variable in
+ certain cases.
+
+i. Fixed the nameref circular reference checking to be less strict and only
+ disallow a nameref variable with the same value as its name at the global
+ scope.
+
+j. Fixed a bug that caused trap handlers to be executed recursively,
+ corrupting internal data structures.
+
+k. Fixed a bug that could result in bash not compiling if certain options were
+ not enabled.
+
+l. Fixed a bug that caused the arithmetic expansion code to attempt variable
+ assignments when operator precedence prohibited them.
+
+m. Word expansions like ${foo##bar} now understand indirect variable references.
+
+n. Fixed a bug that caused `declare -fp name' to not display a function
+ definition.
+
+o. Fixed a bug that caused asynchronous child processes to modify the stdin
+ file pointer when bash was using it to read a script, which modified the
+ parent's value as well.
+
+2. Changes to Readline
+
+a. Fixed a bug in vi mode that caused the arrow keys to set the saved last
+ vi-mode command to the wrong value.
+
+b. Fixed a bug that caused double-quoted strings to be scanned incorrectly
+ when being used as the value of a readline variable assignment.
+
+c. Fixed a bug with vi mode that prevented `.' from repeating a command
+ entered on a previous line (command).
+
+d. Fixed a bug that could cause completion to core dump if it was interrupted
+ by a signal.
+
+e. Readline now sends the meta-key enable string to the terminal if the
+ terminal has been successfully initialized.
+
+f. Readline now calls the signal hook after resizing the terminal when it
+ receives a SIGWINCH.
+
+g. Fixed a bug that could cause the history list code to perform an out-of-
+ bounds array reference if the history list is empty.
+
+3. New Features in Bash
+
+a. Shells started to run process substitutions now run any trap set on EXIT.
+
+b. There is now a configure-time option to enable the globasciiranges option
+ by default.
+
+c. The read builtin now checks its first variable argument for validity before
+ trying to read any input.
+
+------------------------------------------------------------------------------
This document details the changes between this version, bash-4.3-alpha,
and the previous version, bash-4.2-release.
@@ -334,6 +422,10 @@ bbbbb. Fixed a bug that caused redirections like <&n- to leave file descriptor
ccccc. Fixed a bug that caused incorrect completion quoting when completing a
word containing a globbing character with `show-all-if-ambiguous' set.
+ddddd. Fixed a bug that caused printf's %q format specifier not to quote a
+ tilde even if it appeared in a location where it would be subject to
+ tilde expansion.
+
2. Changes to Readline
a. Fixed a bug that did not allow the `dd', `cc', or `yy' vi editing mode
@@ -543,18 +635,14 @@ k. New application-settable variable: rl_input_available_hook; function to be
called when readline detects there is data available on its input file
descriptor.
-l. Readline calls an application-set event hook (rl_event_hook) after it gets
- a signal while reading input (read returns -1/EINTR but readline does not
- handle the signal immediately) to allow the application to handle or
- otherwise note it.
+l. Readline calls an application-set event hook (rl_signal_event_hook) after
+ it gets a signal while reading input (read returns -1/EINTR but readline
+ does not handle the signal immediately) to allow the application to handle
+ or otherwise note it. Not currently called for SIGHUP or SIGTERM.
m. If the user-settable variable `history-size' is set to a value less than
0, the history list size is unlimited.
-n. New application-settable variable: rl_signal_event_hook; function that is
- called when readline is reading terminal input and read(2) is interrupted
- by a signal. Currently not called for SIGHUP or SIGTERM.
-
------------------------------------------------------------------------------
This document details the changes between this version, bash-4.2-release,
and the previous version, bash-4.2-rc2.
diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog
index fef5b38d..4986e4e6 100644
--- a/CWRU/CWRU.chlog
+++ b/CWRU/CWRU.chlog
@@ -4406,7 +4406,7 @@ execute_cmd.c
- execute_command_internal: make sure any subshell forked to run a
group command or user subshell at the end of a pipeline runs any
EXIT trap it sets. Fixes debian bash bug 698411
- http://bugs.debian.org/cgi-big/bugreport.cgi?bug=698411
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698411
subst.c
- shell_expand_word_list: fix code that creates args for and calls
@@ -4725,8 +4725,6 @@ builtins/setattr.def
functions aren't changed or displayed unless the -f option is given.
Report from <gotmynick@gmail.com>
-[bash-4.3-alpha frozen]
-
3/9
---
include/typemax.h
@@ -4748,3 +4746,344 @@ bashline.c
get inserted by `quoting' the completion. We can't kill all the
matches because show-all-if-ambiguous needs them. Bug report from
Marcel (Felix) Giannelia <info@skeena.net>
+
+[bash-4.3-alpha frozen]
+
+ 3/14
+ ----
+general.c
+ - trim_pathname: use memmove instead of memcpy since the source and
+ destination pathnames may overlap. Report and fix from Matthew
+ Riley <mattdr@google.com>
+
+ 3/18
+ ----
+configure.ac
+ - socklen_t is defined as `unsigned int' if configure can't find it
+
+ 3/20
+ ----
+lib/readline/complete.c
+ - S_ISVTX: since it's not defined on all platforms (Minix), make sure
+ its use is protected with #ifdef
+
+ 3/21
+ ----
+doc/{bash.1,bashref.texi}
+ - Added mention of ${!name[@]} and ${!name[*]} expansions to get all
+ indices of an array. Suggested by Jonathan Leffler
+ <jonathan.leffler@gmail.com>
+
+ 3/24
+ ----
+subst.h
+ - SD_IGNOREQUOTE: new define for skip_to_delim; if set, means that
+ single quotes (for now) will be treated as ordinary characters
+
+subst.c
+ - skip_to_delim: handle SD_IGNOREQUOTE. no callers use it for now
+
+ 3/25
+ ----
+support/config.{guess,sub}
+ - updated to versions from autoconf-2.69
+
+ 3/31
+ ----
+lib/sh/shquote.c
+ - sh_single_quote: short-circuit quoting a single "'" instead of
+ creating a long string with empty single-quoted strings
+
+parser.h
+ - DOLBRACE_QUOTE2: new define, like DOLBRACE_QUOTE, but need to single-
+ quote results of $'...' expansion because quote removal will be
+ done later. Right now this is only done for ${word/pat/rep}
+
+parse.y
+ - parse_matched_pair: set state to DOLBRACE_QUOTE2 for pattern
+ substitution word expansion so we don't treat single quote specially
+ in the pattern or replacement string
+ - parse_matched_pair: if we're parsing a dollar-brace word expansion
+ (${...}) and we're not treating single quote specially within
+ double quotes, single-quote the translation of $'...' ansi-c
+ escaped strings. Original report and fix from Eduardo A.
+ Bustamante López <dualbus@gmail.com>
+
+subst.c
+ - extract_dollar_brace_string: ${word/pat/rep} scanning now sets the
+ DOLBRACE_QUOTE2 flag instead of DOLBRACE_QUOTE so we don't treat
+ single quotes specially within a double-quoted string
+
+execute_cmd.c
+ - fix_assignment_words: skip over assignment statements preceding a
+ command word before trying to figure out whether or not assignment
+ statements following a possible declaration command should be
+ treated specially. Fixes bug reported by Dan Douglas
+ <ormaaj@gmail.com>
+
+ 4/4
+ ---
+lib/readline/readline.c
+ - _rl_dispatch_subseq: only call _rl_vi_set_last (and check whether
+ the key is a text modification command) if the key sequence length
+ is 1. That keeps the arrow keys from setting the last command
+ when called in vi command mode. Fixes bug reported by Ian A.
+ Watson <watson_ian_a@lilly.com>
+
+ 4/6
+ ---
+lib/readline/bind.c
+ - rl_parse_and_bind: when parsing a double-quoted string as the value
+ of a variable, make sure we skip past the leading double quote.
+ Fix from Andreas Schwab <schwab@linux-m68k.org>
+
+variables.c
+ - hash_lookup: set new local variable last_table_searched to the table
+ a successful lookup appears in; tested in make_local_variable to
+ solve the problem below
+ - make_local_variable: if we find a variable with the tempenv flag
+ set at the same `level' as variable_context', but not found in the
+ temporary_env (temp environment preceding the builtin), return it.
+ The temp environment preceding the function call has already been
+ merged (in execute_function) into the list of variable contexts the
+ function sees as shell_variables by the time this is called. Fixes
+ inconsistency pointed out by Dan Douglas <ormaaj@gmail.com>
+
+subst.c
+ - expand_arith_string: expanded out contents of expand_string,
+ expand_string_internal, expand_string_if_necessary to create a
+ WORD_DESC and call call_expand_word_internal() on it directly.
+ We don't want process substitution to be performed ( 1<(2) ) should
+ mean something different in an arithmetic expression context.
+ It doesn't work to just turn on the DQUOTE flag, since that means
+ that things like ${x["expression"]} are not expanded correctly.
+ Fixes problem pointed out by Dan Douglas <ormaaj@gmail.com>
+
+ 4/13
+ ----
+subst.c
+ - process_substitute: run the EXIT trap before exiting, as other
+ shells seem to. Fixes problem pointed out by Dan Douglas
+ <ormaaj@gmail.com>
+
+lib/readline/readline.c
+ - readline_internal_setup: call rl_vi_insertion_mode to enter vi
+ mode instead of rl_vi_insert_mode to avoid resetting the saved last
+ command information. Posix says that `.' can repeat a command
+ that was entered on a previous line so we need to save the info.
+ Fixes bug reported by Ian A. Watson <watson_ian_a@lilly.com>
+
+ 4/14
+ ----
+lib/readline/complete.c
+ - rl_completion_matches: make sure xrealloc returns something non-null
+ (can happen when interrupted by a signal) before trying to add
+ matches to match_list
+
+subst.c
+ - array_remove_pattern: return NULL right away if array_variable_part
+ returns an invisible variable
+ - array_length_reference: handle array_variable_part returning an
+ invisible variable
+ - get_var_and_type: handle array_variable_part returning an invisible
+ variable
+
+ 4/15
+ ----
+execute_cmd.c
+ - execute_command_internal: make sure to run the EXIT trap for group
+ commands anywhere in pipelines, not just at the end. From a point
+ raised by Andreas Schwab <schwab@linux-m68k.org>
+
+variables.c
+ - bind_int_variable: make sure invisible flag is unset. Fixes problems
+ like "declare -ai a; : $(( a[4]=4 ));"
+
+arrayfunc.c
+ - array_variable_part: return variable even if invisible flag set,
+ callers must handle invisible vars
+
+ 4/18
+ ----
+builtins/set.def
+ - unset_builtin: if -n flag given, call unset_nameref instead of
+ unset_variable
+
+variables.c
+ - find_variable_nameref: print warning message if nameref circular
+ reference detected, return NULL and let caller deal with it
+
+builtins/declare.def
+ - declare_builtin: only disallow global references at this point if
+ we are at the global scope
+
+ 5/16
+ ----
+configure.ac
+ - update release status to beta
+
+ 5/23
+ ----
+trap.c
+ - run_pending_traps: save and restore pipeline around calls to
+ evalstring() in case we get a trap while running a trap. Have to
+ figure out the recursive running traps issue elsewhere. Fixes
+ bug reported by Roman Rakus <rrakus@redhat.com>
+ - run_pending_traps: make sure to set running_trap to the appropriate
+ signal value when running a trap command
+ - run_pending_traps: short-circuit immediately if running_trap set
+ when invoked. Could change this later to only skip if it would
+ run the same trap as currently being run (running_trap == sig + 1)
+
+configure.ac
+ - add warning if bison not found
+
+lib/readline/doc/rltech.texi
+ - new section with an example program illustrating the callback
+ interface. Suggested by Peng Yu <pengyu.ut@gmail.com>
+
+examples/loadables/Makefile.in
+ - remove references to `cut' and `getconf', which were removed in
+ early March
+
+ 5/28
+ ----
+lib/sh/pathphys.c
+ - sh_realpath: correct inverted two arguments to call to sh_makepath.
+ Report and fix from Julien Thomas <jthomas@exosec.fr>
+
+ 6/7
+ ---
+execute_cmd.c
+ - executing_line_number: the else clauses that are conditional on
+ various options being defined can simply be if clauses -- they are
+ mutually exclusive and all have `return' in the body. Fixes bug
+ reported by Flavio Medeiros <flaviomotamedeiros@gmail.com>
+
+ 6/25
+ ----
+lib/readline/readline.c
+ - readline_internal_setup: only sent the meta-key enable string to the
+ terminal if we've been told to use one and the terminal has been
+ successfully initialized (RL_ISSTATE (RL_STATE_TERMPREPPED) != 0).
+ Suggested by Dan Mick <dan.mick@inktank.com>
+
+lib/readline/signals.c
+ - _rl_signal_handler: call any defined signal hook after calling
+ rl_resize_terminal when handling a SIGWINCH. We already have called
+ the original SIGWINCH handler but will not be resending the signal
+ to ourselves
+
+ 6/27
+ ----
+lib/readline/doc/history.3, doc/bash.1
+ - fix description of the `$' modifier to note that it expands to the
+ last *word*, which is not always the last argument. Report from
+ ariyetz@gmail.com via gnu.org RT
+
+ 6/29
+ ----
+lib/glob/smatch.c
+ - glob_asciiranges: initialize to value of GLOBASCII_DEFAULT instead
+ of 0 (0 if not defined)
+
+configure.ac,config.h.in
+ - --enable-glob-asciiranges-default: new option, controls the value of
+ GLOBASCII_DEFAULT; use it to turn globasciiranges shopt option on
+ by default
+
+doc/bashref.texi
+ - document new --enable-glob-asciiranges-default configure option
+
+variables.c
+ - assign_in_env: implement += value appending semantics for assignments
+ preceding command names
+
+ 7/4
+ ---
+expr.c
+ - set lasttok = NUM in all of the functions that result in a number,
+ even if it's a boolean, to avoid errors with constructs like
+ 1 * x = 1, which should be an asignment error. Fixes problem
+ pointed out by Dan Douglas <ormaaj@gmail.com>
+
+parse.y
+ - decode_prompt_string: don't bother to call strcpy if
+ polite_directory_format returns its argument unchanged. It's not
+ necessary and Mac OS X 10.9 aborts because of a supposed overlapping
+ string copy. Bug and fix from simon@hitzemann.org
+
+subst.c
+ - parameter_brace_find_indir: new function, code from
+ parameter_brace_expand_indir that looks up the indirectly-referenced
+ variable, but does not expand it
+ - parameter_brace_expand_indir: call parameter_brace_find_indir to
+ look up indirected variable reference
+ - get_var_and_type: call parameter_brace_find_indir if it looks like we
+ are trying to manipulate an indirect variable reference like
+ ${!b%%foo}. This makes a difference if !b references an array
+ variable. Bug report from Dan Douglas <ormaaj@gmail.com>
+
+ 7/6
+ ---
+lib/sh/casemod.c
+ - sh_modcase: make sure argument passed to is_basic is <= UCHAR_MAX,
+ since cval can convert something to a wchar_t greater than UCHAR_MAX.
+ Fixes bug reported by Tomasz Tomasik <scx.mail@gmail.com>
+
+ 7/8
+ ---
+lib/readline/history.c
+ - add_history_time: if history_length == 0, referencing history_length
+ - 1 will result in an array bounds error, so make history_length be
+ at least 1 before going on. Fixes bug reported by Geng Sheng Liu
+ <gsliu.tju@gmail.com>
+
+builtins/setattr.def
+ - show_func_attributes: display definition (if NODEFS argument is 0) and
+ attributes for a particular function; used by `declare -fp name'
+
+builtins/declare.def
+ - declare_internal: call show_func_attributes if -f supplied with -p.
+ Fixes inconsistency observed by Linda Walsh <bash@tlinx.org>
+
+builtins/common.h
+ - new extern declaration for show_func_attributes
+
+builtins/read.def
+ - read_builtin: check the first supplied variable name for validity
+ before attempting to read any input, since we know we will have to
+ at least use that one. Don't check any other names yet. Suggested
+ by jidanni@jidanni.org
+
+ 7/10
+ ----
+redir.c
+ - do_redirection_internal: when closing a file descriptor with
+ r_close_this ([n]<&-) count close errors as redirection errors if
+ errno ends up as EIO or ENOSPC. Originally reported back in April
+ 2012 by Andrey Zaitsev <jstcdr@gmail.com>
+
+ 7/11
+ ----
+redir.c
+ - do_redirection_internal: before calling check_bash_input, make sure
+ that we don't call check_bash_input for an asynchronous process that
+ is replacing stdin with something else. The seek backwards affects
+ the parent process as well, since parents and children share the
+ file pointer. Fixes problem originally reported in March 2013 by
+ Martin Jackson <mjackson220.list@gmail.com>
+
+ 7/13
+ ----
+doc/{bash.1,bashref.texi}
+ - slight change to add a description of `shopt -o' suggested by Bruce
+ Korb <bruce.korb@gmail.com>
+
+ 7/19
+ ----
+lib/readline/histfile.c
+ - history_do_write: if close returns < 0, make sure we restore the
+ backup history file and return a non-zero value
+ - history_truncate_file: if write or close return < 0, make sure we
+ return a non-zero value
diff --git a/CWRU/changelog b/CWRU/changelog
index fef5b38d..4986e4e6 100644
--- a/CWRU/changelog
+++ b/CWRU/changelog
@@ -4406,7 +4406,7 @@ execute_cmd.c
- execute_command_internal: make sure any subshell forked to run a
group command or user subshell at the end of a pipeline runs any
EXIT trap it sets. Fixes debian bash bug 698411
- http://bugs.debian.org/cgi-big/bugreport.cgi?bug=698411
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698411
subst.c
- shell_expand_word_list: fix code that creates args for and calls
@@ -4725,8 +4725,6 @@ builtins/setattr.def
functions aren't changed or displayed unless the -f option is given.
Report from <gotmynick@gmail.com>
-[bash-4.3-alpha frozen]
-
3/9
---
include/typemax.h
@@ -4748,3 +4746,344 @@ bashline.c
get inserted by `quoting' the completion. We can't kill all the
matches because show-all-if-ambiguous needs them. Bug report from
Marcel (Felix) Giannelia <info@skeena.net>
+
+[bash-4.3-alpha frozen]
+
+ 3/14
+ ----
+general.c
+ - trim_pathname: use memmove instead of memcpy since the source and
+ destination pathnames may overlap. Report and fix from Matthew
+ Riley <mattdr@google.com>
+
+ 3/18
+ ----
+configure.ac
+ - socklen_t is defined as `unsigned int' if configure can't find it
+
+ 3/20
+ ----
+lib/readline/complete.c
+ - S_ISVTX: since it's not defined on all platforms (Minix), make sure
+ its use is protected with #ifdef
+
+ 3/21
+ ----
+doc/{bash.1,bashref.texi}
+ - Added mention of ${!name[@]} and ${!name[*]} expansions to get all
+ indices of an array. Suggested by Jonathan Leffler
+ <jonathan.leffler@gmail.com>
+
+ 3/24
+ ----
+subst.h
+ - SD_IGNOREQUOTE: new define for skip_to_delim; if set, means that
+ single quotes (for now) will be treated as ordinary characters
+
+subst.c
+ - skip_to_delim: handle SD_IGNOREQUOTE. no callers use it for now
+
+ 3/25
+ ----
+support/config.{guess,sub}
+ - updated to versions from autoconf-2.69
+
+ 3/31
+ ----
+lib/sh/shquote.c
+ - sh_single_quote: short-circuit quoting a single "'" instead of
+ creating a long string with empty single-quoted strings
+
+parser.h
+ - DOLBRACE_QUOTE2: new define, like DOLBRACE_QUOTE, but need to single-
+ quote results of $'...' expansion because quote removal will be
+ done later. Right now this is only done for ${word/pat/rep}
+
+parse.y
+ - parse_matched_pair: set state to DOLBRACE_QUOTE2 for pattern
+ substitution word expansion so we don't treat single quote specially
+ in the pattern or replacement string
+ - parse_matched_pair: if we're parsing a dollar-brace word expansion
+ (${...}) and we're not treating single quote specially within
+ double quotes, single-quote the translation of $'...' ansi-c
+ escaped strings. Original report and fix from Eduardo A.
+ Bustamante López <dualbus@gmail.com>
+
+subst.c
+ - extract_dollar_brace_string: ${word/pat/rep} scanning now sets the
+ DOLBRACE_QUOTE2 flag instead of DOLBRACE_QUOTE so we don't treat
+ single quotes specially within a double-quoted string
+
+execute_cmd.c
+ - fix_assignment_words: skip over assignment statements preceding a
+ command word before trying to figure out whether or not assignment
+ statements following a possible declaration command should be
+ treated specially. Fixes bug reported by Dan Douglas
+ <ormaaj@gmail.com>
+
+ 4/4
+ ---
+lib/readline/readline.c
+ - _rl_dispatch_subseq: only call _rl_vi_set_last (and check whether
+ the key is a text modification command) if the key sequence length
+ is 1. That keeps the arrow keys from setting the last command
+ when called in vi command mode. Fixes bug reported by Ian A.
+ Watson <watson_ian_a@lilly.com>
+
+ 4/6
+ ---
+lib/readline/bind.c
+ - rl_parse_and_bind: when parsing a double-quoted string as the value
+ of a variable, make sure we skip past the leading double quote.
+ Fix from Andreas Schwab <schwab@linux-m68k.org>
+
+variables.c
+ - hash_lookup: set new local variable last_table_searched to the table
+ a successful lookup appears in; tested in make_local_variable to
+ solve the problem below
+ - make_local_variable: if we find a variable with the tempenv flag
+ set at the same `level' as variable_context', but not found in the
+ temporary_env (temp environment preceding the builtin), return it.
+ The temp environment preceding the function call has already been
+ merged (in execute_function) into the list of variable contexts the
+ function sees as shell_variables by the time this is called. Fixes
+ inconsistency pointed out by Dan Douglas <ormaaj@gmail.com>
+
+subst.c
+ - expand_arith_string: expanded out contents of expand_string,
+ expand_string_internal, expand_string_if_necessary to create a
+ WORD_DESC and call call_expand_word_internal() on it directly.
+ We don't want process substitution to be performed ( 1<(2) ) should
+ mean something different in an arithmetic expression context.
+ It doesn't work to just turn on the DQUOTE flag, since that means
+ that things like ${x["expression"]} are not expanded correctly.
+ Fixes problem pointed out by Dan Douglas <ormaaj@gmail.com>
+
+ 4/13
+ ----
+subst.c
+ - process_substitute: run the EXIT trap before exiting, as other
+ shells seem to. Fixes problem pointed out by Dan Douglas
+ <ormaaj@gmail.com>
+
+lib/readline/readline.c
+ - readline_internal_setup: call rl_vi_insertion_mode to enter vi
+ mode instead of rl_vi_insert_mode to avoid resetting the saved last
+ command information. Posix says that `.' can repeat a command
+ that was entered on a previous line so we need to save the info.
+ Fixes bug reported by Ian A. Watson <watson_ian_a@lilly.com>
+
+ 4/14
+ ----
+lib/readline/complete.c
+ - rl_completion_matches: make sure xrealloc returns something non-null
+ (can happen when interrupted by a signal) before trying to add
+ matches to match_list
+
+subst.c
+ - array_remove_pattern: return NULL right away if array_variable_part
+ returns an invisible variable
+ - array_length_reference: handle array_variable_part returning an
+ invisible variable
+ - get_var_and_type: handle array_variable_part returning an invisible
+ variable
+
+ 4/15
+ ----
+execute_cmd.c
+ - execute_command_internal: make sure to run the EXIT trap for group
+ commands anywhere in pipelines, not just at the end. From a point
+ raised by Andreas Schwab <schwab@linux-m68k.org>
+
+variables.c
+ - bind_int_variable: make sure invisible flag is unset. Fixes problems
+ like "declare -ai a; : $(( a[4]=4 ));"
+
+arrayfunc.c
+ - array_variable_part: return variable even if invisible flag set,
+ callers must handle invisible vars
+
+ 4/18
+ ----
+builtins/set.def
+ - unset_builtin: if -n flag given, call unset_nameref instead of
+ unset_variable
+
+variables.c
+ - find_variable_nameref: print warning message if nameref circular
+ reference detected, return NULL and let caller deal with it
+
+builtins/declare.def
+ - declare_builtin: only disallow global references at this point if
+ we are at the global scope
+
+ 5/16
+ ----
+configure.ac
+ - update release status to beta
+
+ 5/23
+ ----
+trap.c
+ - run_pending_traps: save and restore pipeline around calls to
+ evalstring() in case we get a trap while running a trap. Have to
+ figure out the recursive running traps issue elsewhere. Fixes
+ bug reported by Roman Rakus <rrakus@redhat.com>
+ - run_pending_traps: make sure to set running_trap to the appropriate
+ signal value when running a trap command
+ - run_pending_traps: short-circuit immediately if running_trap set
+ when invoked. Could change this later to only skip if it would
+ run the same trap as currently being run (running_trap == sig + 1)
+
+configure.ac
+ - add warning if bison not found
+
+lib/readline/doc/rltech.texi
+ - new section with an example program illustrating the callback
+ interface. Suggested by Peng Yu <pengyu.ut@gmail.com>
+
+examples/loadables/Makefile.in
+ - remove references to `cut' and `getconf', which were removed in
+ early March
+
+ 5/28
+ ----
+lib/sh/pathphys.c
+ - sh_realpath: correct inverted two arguments to call to sh_makepath.
+ Report and fix from Julien Thomas <jthomas@exosec.fr>
+
+ 6/7
+ ---
+execute_cmd.c
+ - executing_line_number: the else clauses that are conditional on
+ various options being defined can simply be if clauses -- they are
+ mutually exclusive and all have `return' in the body. Fixes bug
+ reported by Flavio Medeiros <flaviomotamedeiros@gmail.com>
+
+ 6/25
+ ----
+lib/readline/readline.c
+ - readline_internal_setup: only sent the meta-key enable string to the
+ terminal if we've been told to use one and the terminal has been
+ successfully initialized (RL_ISSTATE (RL_STATE_TERMPREPPED) != 0).
+ Suggested by Dan Mick <dan.mick@inktank.com>
+
+lib/readline/signals.c
+ - _rl_signal_handler: call any defined signal hook after calling
+ rl_resize_terminal when handling a SIGWINCH. We already have called
+ the original SIGWINCH handler but will not be resending the signal
+ to ourselves
+
+ 6/27
+ ----
+lib/readline/doc/history.3, doc/bash.1
+ - fix description of the `$' modifier to note that it expands to the
+ last *word*, which is not always the last argument. Report from
+ ariyetz@gmail.com via gnu.org RT
+
+ 6/29
+ ----
+lib/glob/smatch.c
+ - glob_asciiranges: initialize to value of GLOBASCII_DEFAULT instead
+ of 0 (0 if not defined)
+
+configure.ac,config.h.in
+ - --enable-glob-asciiranges-default: new option, controls the value of
+ GLOBASCII_DEFAULT; use it to turn globasciiranges shopt option on
+ by default
+
+doc/bashref.texi
+ - document new --enable-glob-asciiranges-default configure option
+
+variables.c
+ - assign_in_env: implement += value appending semantics for assignments
+ preceding command names
+
+ 7/4
+ ---
+expr.c
+ - set lasttok = NUM in all of the functions that result in a number,
+ even if it's a boolean, to avoid errors with constructs like
+ 1 * x = 1, which should be an asignment error. Fixes problem
+ pointed out by Dan Douglas <ormaaj@gmail.com>
+
+parse.y
+ - decode_prompt_string: don't bother to call strcpy if
+ polite_directory_format returns its argument unchanged. It's not
+ necessary and Mac OS X 10.9 aborts because of a supposed overlapping
+ string copy. Bug and fix from simon@hitzemann.org
+
+subst.c
+ - parameter_brace_find_indir: new function, code from
+ parameter_brace_expand_indir that looks up the indirectly-referenced
+ variable, but does not expand it
+ - parameter_brace_expand_indir: call parameter_brace_find_indir to
+ look up indirected variable reference
+ - get_var_and_type: call parameter_brace_find_indir if it looks like we
+ are trying to manipulate an indirect variable reference like
+ ${!b%%foo}. This makes a difference if !b references an array
+ variable. Bug report from Dan Douglas <ormaaj@gmail.com>
+
+ 7/6
+ ---
+lib/sh/casemod.c
+ - sh_modcase: make sure argument passed to is_basic is <= UCHAR_MAX,
+ since cval can convert something to a wchar_t greater than UCHAR_MAX.
+ Fixes bug reported by Tomasz Tomasik <scx.mail@gmail.com>
+
+ 7/8
+ ---
+lib/readline/history.c
+ - add_history_time: if history_length == 0, referencing history_length
+ - 1 will result in an array bounds error, so make history_length be
+ at least 1 before going on. Fixes bug reported by Geng Sheng Liu
+ <gsliu.tju@gmail.com>
+
+builtins/setattr.def
+ - show_func_attributes: display definition (if NODEFS argument is 0) and
+ attributes for a particular function; used by `declare -fp name'
+
+builtins/declare.def
+ - declare_internal: call show_func_attributes if -f supplied with -p.
+ Fixes inconsistency observed by Linda Walsh <bash@tlinx.org>
+
+builtins/common.h
+ - new extern declaration for show_func_attributes
+
+builtins/read.def
+ - read_builtin: check the first supplied variable name for validity
+ before attempting to read any input, since we know we will have to
+ at least use that one. Don't check any other names yet. Suggested
+ by jidanni@jidanni.org
+
+ 7/10
+ ----
+redir.c
+ - do_redirection_internal: when closing a file descriptor with
+ r_close_this ([n]<&-) count close errors as redirection errors if
+ errno ends up as EIO or ENOSPC. Originally reported back in April
+ 2012 by Andrey Zaitsev <jstcdr@gmail.com>
+
+ 7/11
+ ----
+redir.c
+ - do_redirection_internal: before calling check_bash_input, make sure
+ that we don't call check_bash_input for an asynchronous process that
+ is replacing stdin with something else. The seek backwards affects
+ the parent process as well, since parents and children share the
+ file pointer. Fixes problem originally reported in March 2013 by
+ Martin Jackson <mjackson220.list@gmail.com>
+
+ 7/13
+ ----
+doc/{bash.1,bashref.texi}
+ - slight change to add a description of `shopt -o' suggested by Bruce
+ Korb <bruce.korb@gmail.com>
+
+ 7/19
+ ----
+lib/readline/histfile.c
+ - history_do_write: if close returns < 0, make sure we restore the
+ backup history file and return a non-zero value
+ - history_truncate_file: if write or close return < 0, make sure we
+ return a non-zero value
diff --git a/MANIFEST b/MANIFEST
index ab36a715..4eb4d48a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -385,6 +385,7 @@ lib/readline/examples/fileman.c f
lib/readline/examples/manexamp.c f
lib/readline/examples/histexamp.c f
lib/readline/examples/rltest.c f
+lib/readline/examples/rl-callbacktest.c f
lib/readline/examples/rl.c f
lib/readline/examples/rlcat.c f
lib/readline/examples/Inputrc f
@@ -772,6 +773,7 @@ tests/alias1.sub f
tests/alias.right f
tests/appendop.tests f
tests/appendop1.sub f
+tests/appendop2.sub f
tests/appendop.right f
tests/arith-for.tests f
tests/arith-for.right f
@@ -826,6 +828,7 @@ tests/source5.sub f
tests/source6.sub f
tests/case.tests f
tests/case.right f
+tests/case1.sub f
tests/casemod.tests f
tests/casemod.right f
tests/comsub.tests f
@@ -998,6 +1001,7 @@ tests/new-exp.right f
tests/nquote.tests f
tests/nquote.right f
tests/nquote1.sub f
+tests/nquote2.sub f
tests/nquote1.tests f
tests/nquote1.right f
tests/nquote2.tests f
@@ -1163,6 +1167,7 @@ tests/trap2.sub f 755
tests/trap2a.sub f 755
tests/trap3.sub f
tests/trap4.sub f
+tests/trap5.sub f
tests/type.tests f
tests/type.right f
tests/type1.sub f
diff --git a/NEWS b/NEWS
index 28d5f13c..baac7912 100644
--- a/NEWS
+++ b/NEWS
@@ -108,6 +108,8 @@ gg. The brace expansion code now treats a failed sequence expansion as a
simple string and will continue to expand brace terms in the remainder
of the word.
+hh. Shells started to run process substitutions now run any trap set on EXIT.
+
2. New Features in Readline
a. Readline is now more responsive to SIGHUP and other fatal signals when
diff --git a/arrayfunc.c b/arrayfunc.c
index 959ccd71..f59f7bd3 100644
--- a/arrayfunc.c
+++ b/arrayfunc.c
@@ -929,7 +929,11 @@ array_variable_part (s, subp, lenp)
var = find_variable (t);
free (t);
+#if 0
return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var;
+#else
+ return var; /* now return invisible variables; caller must handle */
+#endif
}
#define INDEX_ERROR() \
diff --git a/builtins/common.h b/builtins/common.h
index 28f02008..b0c2f7db 100644
--- a/builtins/common.h
+++ b/builtins/common.h
@@ -155,6 +155,7 @@ extern int set_or_show_attributes __P((WORD_LIST *, int, int));
extern int show_all_var_attributes __P((int, int));
extern int show_var_attributes __P((SHELL_VAR *, int, int));
extern int show_name_attributes __P((char *, int));
+extern int show_func_attributes __P((char *, int));
extern void set_var_attribute __P((char *, int, int));
/* Functions from pushd.def */
diff --git a/builtins/declare.def b/builtins/declare.def
index 86fa728b..580e3fa8 100644
--- a/builtins/declare.def
+++ b/builtins/declare.def
@@ -264,7 +264,10 @@ declare_internal (list, local_var)
{
for (any_failed = 0; list; list = list->next)
{
- pflag = show_name_attributes (list->word->word, nodefs);
+ if (flags_on & att_function)
+ pflag = show_func_attributes (list->word->word, nodefs);
+ else
+ pflag = show_name_attributes (list->word->word, nodefs);
if (pflag)
{
sh_notfound (list->word->word);
@@ -315,7 +318,8 @@ declare_internal (list, local_var)
}
else
#endif
- if (STREQ (name, value))
+ /* disallow self references at global scope */
+ if (STREQ (name, value) && variable_context == 0)
{
builtin_error (_("%s: nameref variable self references not allowed"), name);
assign_error++;
diff --git a/builtins/read.def b/builtins/read.def
index 7a1dff6f..e5c927aa 100644
--- a/builtins/read.def
+++ b/builtins/read.def
@@ -329,6 +329,18 @@ read_builtin (list)
return (input_avail (fd) ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
#endif
+ /* Convenience: check early whether or not the first of possibly several
+ variable names is a valid identifier, and bail early if so. */
+#if defined (ARRAY_VARS)
+ if (list && legal_identifier (list->word->word) == 0 && valid_array_reference (list->word->word) == 0)
+#else
+ if (list && legal_identifier (list->word->word) == 0)
+#endif
+ {
+ sh_invalidid (list->word->word);
+ return (EXECUTION_FAILURE);
+ }
+
/* If we're asked to ignore the delimiter, make sure we do. */
if (ignore_delim)
delim = -1;
diff --git a/builtins/set.def b/builtins/set.def
index 421105be..c4a7001d 100644
--- a/builtins/set.def
+++ b/builtins/set.def
@@ -863,7 +863,7 @@ unset_builtin (list)
}
else
#endif /* ARRAY_VARS */
- tem = unset_function ? unbind_func (name) : unbind_variable (name);
+ tem = unset_function ? unbind_func (name) : (nameref ? unbind_nameref (name) : unbind_variable (name));
/* This is what Posix.2 says: ``If neither -f nor -v
is specified, the name refers to a variable; if a variable by
diff --git a/builtins/setattr.def b/builtins/setattr.def
index faa02a9e..390b3eb1 100644
--- a/builtins/setattr.def
+++ b/builtins/setattr.def
@@ -466,6 +466,24 @@ show_name_attributes (name, nodefs)
return (1);
}
+int
+show_func_attributes (name, nodefs)
+ char *name;
+ int nodefs;
+{
+ SHELL_VAR *var;
+
+ var = find_function (name);
+
+ if (var)
+ {
+ show_var_attributes (var, READONLY_OR_EXPORT, nodefs);
+ return (0);
+ }
+ else
+ return (1);
+}
+
void
set_var_attribute (name, attribute, undo)
char *name;
diff --git a/config.h.in b/config.h.in
index 6a42e166..08af2ba8 100644
--- a/config.h.in
+++ b/config.h.in
@@ -170,6 +170,9 @@
/* Define to make the `direxpand' shopt option enabled by default. */
#undef DIRCOMPLETE_EXPAND_DEFAULT
+/* Define to make the `globasciiranges' shopt option enabled by default. */
+#undef GLOBASCII_DEFAULT
+
/* Define AFS if you are using Transarc's AFS. */
#undef AFS
diff --git a/configure b/configure
index 8b54c367..0c7409dd 100755
--- a/configure
+++ b/configure
@@ -1,14 +1,12 @@
#! /bin/sh
-# From configure.ac for Bash 4.3, version 4.056.
+# From configure.ac for Bash 4.3, version 4.059.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for bash 4.3-alpha.
+# Generated by GNU Autoconf 2.69 for bash 4.3-beta.
#
# Report bugs to <bug-bash@gnu.org>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -137,6 +135,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -170,7 +193,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -215,21 +239,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -332,6 +360,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -453,6 +489,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -487,16 +527,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -508,28 +548,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -561,8 +581,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
-PACKAGE_VERSION='4.3-alpha'
-PACKAGE_STRING='bash 4.3-alpha'
+PACKAGE_VERSION='4.3-beta'
+PACKAGE_STRING='bash 4.3-beta'
PACKAGE_BUGREPORT='bug-bash@gnu.org'
PACKAGE_URL=''
@@ -789,6 +809,7 @@ enable_disabled_builtins
enable_dparen_arithmetic
enable_extended_glob
enable_extended_glob_default
+enable_glob_asciiranges_default
enable_help_builtin
enable_history
enable_job_control
@@ -1287,8 +1308,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1374,7 +1393,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures bash 4.3-alpha to adapt to many kinds of systems.
+\`configure' configures bash 4.3-beta to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1439,7 +1458,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bash 4.3-alpha:";;
+ short | recursive ) echo "Configuration of bash 4.3-beta:";;
esac
cat <<\_ACEOF
@@ -1479,6 +1498,9 @@ Optional Features:
--enable-extended-glob-default
force extended pattern matching to be enabled by
default
+ --enable-glob-asciiranges-default
+ force bracket range expressions in pattern matching
+ to use the C locale by default
--enable-help-builtin include the help builtin
--enable-history turn on command history
--enable-job-control enable job control features
@@ -1628,10 +1650,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bash configure 4.3-alpha
-generated by GNU Autoconf 2.68
+bash configure 4.3-beta
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1707,7 +1729,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2111,7 +2133,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2127,7 +2150,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2153,7 +2177,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2169,7 +2194,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2203,7 +2229,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2332,8 +2359,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bash $as_me 4.3-alpha, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by bash $as_me 4.3-beta, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2726,7 +2753,7 @@ ac_config_headers="$ac_config_headers config.h"
BASHVERS=4.3
-RELSTATUS=alpha
+RELSTATUS=beta
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
@@ -2973,6 +3000,7 @@ opt_casemod_attrs=yes
opt_casemod_expansions=yes
opt_extglob_default=no
opt_dircomplete_expand_default=no
+opt_globascii_default=no
opt_static_link=no
opt_profiling=no
@@ -2993,6 +3021,7 @@ if test $opt_minimal_config = yes; then
opt_net_redirs=no opt_progcomp=no opt_separate_help=no
opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
+ opt_globascii_default=no
fi
# Check whether --enable-alias was given.
@@ -3085,6 +3114,11 @@ if test "${enable_extended_glob_default+set}" = set; then :
enableval=$enable_extended_glob_default; opt_extglob_default=$enableval
fi
+# Check whether --enable-glob-asciiranges-default was given.
+if test "${enable_glob_asciiranges_default+set}" = set; then :
+ enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval
+fi
+
# Check whether --enable-help-builtin was given.
if test "${enable_help_builtin+set}" = set; then :
enableval=$enable_help_builtin; opt_help=$enableval
@@ -3300,6 +3334,13 @@ if test $opt_dircomplete_expand_default = yes; then
$as_echo "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h
fi
+if test $opt_globascii_default = yes; then
+$as_echo "#define GLOBASCII_DEFAULT 1" >>confdefs.h
+
+else
+$as_echo "#define GLOBASCII_DEFAULT 0" >>confdefs.h
+
+fi
if test $opt_memscramble = yes; then
$as_echo "#define MEMSCRAMBLE 1" >>confdefs.h
@@ -3372,7 +3413,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3412,7 +3453,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3465,7 +3506,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3506,7 +3547,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3564,7 +3605,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3608,7 +3649,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4054,8 +4095,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4339,7 +4379,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4405,7 +4445,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4612,8 +4652,8 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# define __EXTENSIONS__ 1
- $ac_includes_default
+# define __EXTENSIONS__ 1
+ $ac_includes_default
int
main ()
{
@@ -4841,6 +4881,8 @@ _ACEOF
esac
rm -rf conftest*
fi
+
+
fi
@@ -5480,7 +5522,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -5553,7 +5595,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5593,7 +5635,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5646,7 +5688,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5686,7 +5728,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5739,7 +5781,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_YACC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5796,6 +5838,12 @@ $as_echo "no" >&6; }
fi
+case "$ac_cv_prog_YACC" in
+*bison*) ;;
+*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5
+$as_echo "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;;
+esac
+
case "$host_os" in
opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
*) MAKE_SHELL=/bin/sh ;;
@@ -5872,11 +5920,11 @@ else
int
main ()
{
-/* FIXME: Include the comments suggested by Paul. */
+
#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
+ /* Ultrix mips cc rejects this sort of thing. */
typedef int charset[2];
- const charset cs;
+ const charset cs = { 0, 0 };
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
@@ -5893,8 +5941,9 @@ main ()
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
@@ -5910,10 +5959,10 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this saying
+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
@@ -6266,7 +6315,8 @@ static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
- (LDBL_MANT_DIG < DBL_MANT_DIG)))
&& (int) LDBL_EPSILON == 0
)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -6322,7 +6372,8 @@ int
main ()
{
static int test_array [1 - 2 * !(((char) -1) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -6540,7 +6591,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6904,23 +6955,20 @@ else
/* end confdefs.h. */
$ac_includes_default
int
-find_stack_direction ()
+find_stack_direction (int *addr, int depth)
{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
+ int dir, dummy = 0;
+ if (! addr)
+ addr = &dummy;
+ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+ return dir + dummy;
}
int
-main ()
+main (int argc, char **argv)
{
- return find_stack_direction () < 0;
+ return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -8278,7 +8326,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_INTLBISON="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -9422,23 +9470,20 @@ else
/* end confdefs.h. */
$ac_includes_default
int
-find_stack_direction ()
+find_stack_direction (int *addr, int depth)
{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
+ int dir, dummy = 0;
+ if (! addr)
+ addr = &dummy;
+ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+ return dir + dummy;
}
int
-main ()
+main (int argc, char **argv)
{
- return find_stack_direction () < 0;
+ return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -13380,7 +13425,7 @@ if test $bash_cv_type_socklen_t = yes; then
fi
if test $bash_cv_type_socklen_t = no; then
cat >>confdefs.h <<_ACEOF
-#define socklen_t int
+#define socklen_t unsigned int
_ACEOF
fi
@@ -16395,16 +16440,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -16464,28 +16509,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -16506,8 +16539,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bash $as_me 4.3-alpha, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by bash $as_me 4.3-beta, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -16572,11 +16605,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-bash config.status 4.3-alpha
-configured by $0, generated by GNU Autoconf 2.68,
+bash config.status 4.3-beta
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -16665,7 +16698,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/configure.ac b/configure.ac
index 0e5a81b8..4ad6f568 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,10 +21,10 @@ dnl Process this file with autoconf to produce a configure script.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_REVISION([for Bash 4.3, version 4.056])dnl
+AC_REVISION([for Bash 4.3, version 4.059])dnl
define(bashvers, 4.3)
-define(relstatus, alpha)
+define(relstatus, beta)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
@@ -191,6 +191,7 @@ opt_casemod_attrs=yes
opt_casemod_expansions=yes
opt_extglob_default=no
opt_dircomplete_expand_default=no
+opt_globascii_default=no
dnl options that affect how bash is compiled and linked
opt_static_link=no
@@ -211,6 +212,7 @@ if test $opt_minimal_config = yes; then
opt_net_redirs=no opt_progcomp=no opt_separate_help=no
opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
+ opt_globascii_default=no
fi
AC_ARG_ENABLE(alias, AC_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval)
@@ -231,6 +233,7 @@ AC_ARG_ENABLE(disabled-builtins, AC_HELP_STRING([--enable-disabled-builtins], [a
AC_ARG_ENABLE(dparen-arithmetic, AC_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval)
AC_ARG_ENABLE(extended-glob, AC_HELP_STRING([--enable-extended-glob], [include ksh-style extended pattern matching]), opt_extended_glob=$enableval)
AC_ARG_ENABLE(extended-glob-default, AC_HELP_STRING([--enable-extended-glob-default], [force extended pattern matching to be enabled by default]), opt_extglob_default=$enableval)
+AC_ARG_ENABLE(glob-asciiranges-default, AC_HELP_STRING([--enable-glob-asciiranges-default], [force bracket range expressions in pattern matching to use the C locale by default]), opt_globascii_default=$enableval)
AC_ARG_ENABLE(help-builtin, AC_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval)
AC_ARG_ENABLE(history, AC_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval)
AC_ARG_ENABLE(job-control, AC_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval)
@@ -348,6 +351,11 @@ fi
if test $opt_dircomplete_expand_default = yes; then
AC_DEFINE(DIRCOMPLETE_EXPAND_DEFAULT)
fi
+if test $opt_globascii_default = yes; then
+AC_DEFINE(GLOBASCII_DEFAULT, 1)
+else
+AC_DEFINE(GLOBASCII_DEFAULT, 0)
+fi
if test $opt_memscramble = yes; then
AC_DEFINE(MEMSCRAMBLE)
@@ -634,6 +642,11 @@ AC_PROG_RANLIB
AC_PROG_YACC
AC_PROG_MAKE_SET
+case "$ac_cv_prog_YACC" in
+*bison*) ;;
+*) AC_MSG_WARN([bison not available; needed to process parse.y]) ;;
+esac
+
case "$host_os" in
opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
*) MAKE_SHELL=/bin/sh ;;
@@ -933,7 +946,7 @@ BASH_CHECK_TYPE(quad_t, , long, HAVE_QUAD_T)
BASH_CHECK_TYPE(intmax_t, , $bash_cv_type_long_long)
BASH_CHECK_TYPE(uintmax_t, , $bash_cv_type_unsigned_long_long)
if test "$ac_cv_header_sys_socket_h" = "yes"; then
-BASH_CHECK_TYPE(socklen_t, [#include <sys/socket.h>], int, HAVE_SOCKLEN_T)
+BASH_CHECK_TYPE(socklen_t, [#include <sys/socket.h>], [unsigned int], HAVE_SOCKLEN_T)
fi
BASH_TYPE_RLIMIT
diff --git a/doc/bash.1 b/doc/bash.1
index 2cd81dcd..f843a247 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
-.\" Last Change: Sun Mar 10 12:10:16 EDT 2013
+.\" Last Change: Sat Jul 13 13:32:19 EDT 2013
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2013 March 10" "GNU Bash 4.3"
+.TH BASH 1 "2013 July 13" "GNU Bash 4.3"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -424,8 +424,8 @@ The
.B \-\-norc
option may be used to inhibit this behavior, and the
.B \-\-rcfile
-option may be used to force another file to be read, but
-\fIrshd\fP does not generally invoke the shell with those options
+option may be used to force another file to be read, but neither
+\fIrshd\fP nor \fIsshd\fP generally invoke the shell with those options
or allow them to be specified.
.PP
If the shell is started with the effective user (group) id not equal to the
@@ -535,11 +535,11 @@ command (see
.SM
.B REDIRECTION
below).
-If \fB|&\fP is used, \fIcommand\fP's standard output and standard error
-are connected to
+If \fB|&\fP is used, \fIcommand\fP's standard error, in addition to its
+standard output, is connected to
\fIcommand2\fP's standard input through the pipe;
it is shorthand for \fB2>&1 |\fP.
-This implicit redirection of the standard error is
+This implicit redirection of the standard error to the standard output is
performed after any redirections specified by the command.
.PP
The return status of a pipeline is the exit status of the last
@@ -1871,8 +1871,9 @@ below.
.TP
.B BASH_COMPAT
The value is used to set the shell's compatibility level.
-See the description of the \fBshopt\fB builtin below under
-\fBSHELL BUILTIN COMMANDS\fP for a description of the various compatibility
+See the description of the \fBshopt\fP builtin below under
+\fBSHELL BUILTIN COMMANDS\fP
+for a description of the various compatibility
levels and their effects.
The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42)
corresponding to the desired compatibility level.
@@ -2536,6 +2537,12 @@ array, and an index of \-1 references the last element.
An array variable is considered set if a subscript has been assigned a
value. The null string is a valid value.
.PP
+It is possible to obtain the keys (indices) of an array as well as the values.
+${\fB!\fP\fIname\fP[\fI@\fP]} and ${\fB!\fP\fIname\fP[\fI*\fP]}
+expand to the indices assigned in array variable \fIname\fP.
+The treatment when in double quotes is similar to the expansion of the
+special parameters \fI@\fP and \fI*\fP within double quotes.
+.PP
The
.B unset
builtin is used to destroy arrays. \fBunset\fP \fIname\fP[\fIsubscript\fP]
@@ -3136,8 +3143,9 @@ The
.I expression
is treated as if it were within double quotes, but a double quote
inside the parentheses is not treated specially.
-All tokens in the expression undergo parameter expansion, string
-expansion, command substitution, and quote removal.
+All tokens in the expression undergo parameter and variable expansion,
+command substitution, and quote removal.
+The result is treated as the arithmetic expression to be evaluated.
Arithmetic expansions may be nested.
.PP
The evaluation is performed according to the rules listed below under
@@ -5729,7 +5737,7 @@ the first call) of each line in turn.
Any numeric argument supplied to these successive calls determines
the direction to move through the history. A negative argument switches
the direction through the history (back or forward).
-The history expansion facilities are used to extract the last argument,
+The history expansion facilities are used to extract the last word,
as if the "!$" history expansion had been specified.
.TP
.B shell\-expand\-line (M\-C\-e)
@@ -6665,7 +6673,8 @@ The \fIn\fRth word.
The first argument. That is, word 1.
.TP
.B $
-The last argument.
+The last word. This is usually the last argument, but will expand to the
+zeroth word if there is only one word in the line.
.TP
.B %
The word matched by the most recent `?\fIstring\fR?' search.
@@ -7393,7 +7402,8 @@ option will display the attributes and values of each
.IR name .
When
.B \-p
-is used with \fIname\fP arguments, additional options are ignored.
+is used with \fIname\fP arguments, additional options,
+other than \fB\-f\fP and \fB\-F\fP, are ignored.
When
.B \-p
is supplied without \fIname\fP arguments, it will display the attributes
@@ -9110,7 +9120,12 @@ is greater than
or less than zero; otherwise 0.
.TP
\fBshopt\fP [\fB\-pqsu\fP] [\fB\-o\fP] [\fIoptname\fP ...]
-Toggle the values of variables controlling optional shell behavior.
+Toggle the values of settings controlling optional shell behavior.
+The settings can be either those listed below, or, if the
+.B \-o
+option is used, those available with the
+.B \-o
+option to the \fBset\fP builtin command.
With no options, or with the
.B \-p
option, a list of all settable options is displayed, with
@@ -9383,7 +9398,7 @@ above for a description of
This option is enabled by default.
.TP 8
.B globasciiranges
-If set, range expressions used in pattern matching (see
+If set, range expressions used in pattern matching bracket expressions (see
.SM
.B Pattern Matching
above) behave as if in the traditional C locale when performing
@@ -10063,7 +10078,7 @@ subsequently reset. The exit status is true unless a
is readonly.
.TP
\fBwait\fP [\fB\--n\fP] [\fIn ...\fP]
-Wait for each specified process and return its termination status.
+Wait for each specified child process and return its termination status.
Each
.I n
may be a process
@@ -10182,7 +10197,8 @@ script.
.TP
\fIThe Gnu History Library\fP, Brian Fox and Chet Ramey
.TP
-\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE
+\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE --
+http://pubs.opengroup.org/onlinepubs/9699919799/
.TP
http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode
.TP
diff --git a/doc/bashref.texi b/doc/bashref.texi
index 05193c5b..e679425b 100644
--- a/doc/bashref.texi
+++ b/doc/bashref.texi
@@ -621,11 +621,11 @@ That is, each command reads the previous command's output. This
connection is performed before any redirections specified by the
command.
-If @samp{|&} is used, @var{command1}'s standard output and standard error
-are connected to
+If @samp{|&} is used, @var{command1}'s standard error, in addition to
+its standard output, is connected to
@var{command2}'s standard input through the pipe;
it is shorthand for @code{2>&1 |}.
-This implicit redirection of the standard error is
+This implicit redirection of the standard error to the standard output is
performed after any redirections specified by the command.
The reserved word @code{time} causes timing statistics
@@ -2216,8 +2216,9 @@ $(( @var{expression} ))
The expression is treated as if it were within double quotes, but
a double quote inside the parentheses is not treated specially.
-All tokens in the expression undergo parameter expansion, command
-substitution, and quote removal.
+All tokens in the expression undergo parameter and variable expansion,
+command substitution, and quote removal.
+The result is treated as the arithmetic expression to be evaluated.
Arithmetic expansions may be nested.
The evaluation is performed according to the rules listed below
@@ -3899,8 +3900,8 @@ are given, then display the values of variables instead.
The @option{-p} option will display the attributes and values of each
@var{name}.
-When @option{-p} is used with @var{name} arguments, additional options
-are ignored.
+When @option{-p} is used with @var{name} arguments, additional options,
+other than @option{-f} and @option{-F}, are ignored.
When @option{-p} is supplied without @var{name} arguments, @code{declare}
will display the attributes and values of all variables having the
@@ -4824,7 +4825,10 @@ This builtin allows you to change additional shell optional behavior.
shopt [-pqsu] [-o] [@var{optname} @dots{}]
@end example
-Toggle the values of variables controlling optional shell behavior.
+Toggle the values of settings controlling optional shell behavior.
+The settings can be either those listed below, or, if the
+@option{-o} option is used, those available with the @option{-o}
+option to the @code{set} builtin command (@pxref{The Set Builtin}).
With no options, or with the @option{-p} option, a list of all settable
options is displayed, with an indication of whether or not each is set.
The @option{-p} option causes output to be displayed in a form that
@@ -5045,7 +5049,8 @@ the ignored words are the only possible completions.
This option is enabled by default.
@item globasciiranges
-If set, range expressions used in pattern matching (@pxref{Pattern Matching})
+If set, range expressions used in pattern matching bracket expressions
+(@pxref{Pattern Matching})
behave as if in the traditional C locale when performing
comparisons. That is, the current locale's collating sequence
is not taken into account, so
@@ -6224,8 +6229,8 @@ file exists and is readable.
It will not do this if invoked as @code{sh}.
The @option{--norc} option may be used to inhibit this behavior, and the
@option{--rcfile} option may be used to force another file to be read, but
-@code{rshd} does not generally invoke the shell with those options or
-allow them to be specified.
+neither @code{rshd} nor @code{sshd} generally invoke the shell with those
+options or allow them to be specified.
@subsubheading Invoked with unequal effective and real @sc{uid/gid}s
@@ -6813,6 +6818,12 @@ and an index of -1 refers to the last element.
An array variable is considered set if a subscript has been assigned a
value. The null string is a valid value.
+It is possible to obtain the keys (indices) of an array as well as the values.
+$@{!@var{name}[@@]@} and $@{!@var{name}[*]@} expand to the indices
+assigned in array variable @var{name}.
+The treatment when in double quotes is similar to the expansion of the
+special parameters @samp{@@} and @samp{*} within double quotes.
+
The @code{unset} builtin is used to destroy arrays.
@code{unset @var{name}[@var{subscript}]}
destroys the array element at index @var{subscript}.
@@ -8069,6 +8080,12 @@ above under @ref{Pattern Matching}.
Set the default value of the @var{extglob} shell option described
above under @ref{The Shopt Builtin} to be enabled.
+@item --enable-glob-asciirange-default
+Set the default value of the @var{globasciiranges} shell option described
+above under @ref{The Shopt Builtin} to be enabled.
+This controls the behavior of character ranges when used in pattern matching
+bracket expressions.
+
@item --enable-help-builtin
Include the @code{help} builtin, which displays help on shell builtins and
variables (@pxref{Bash Builtins}).
diff --git a/doc/version.texi b/doc/version.texi
index feccba92..6b823bc6 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -2,9 +2,9 @@
Copyright (C) 1988-2013 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Sun Mar 10 12:10:36 EDT 2013
+@set LASTCHANGE Sat Jul 13 13:32:05 EDT 2013
@set EDITION 4.3
@set VERSION 4.3
-@set UPDATED 10 March 2013
-@set UPDATED-MONTH March 2013
+@set UPDATED 13 July 2013
+@set UPDATED-MONTH July 2013
diff --git a/examples/loadables/Makefile.in b/examples/loadables/Makefile.in
index 343beb02..99549bf3 100644
--- a/examples/loadables/Makefile.in
+++ b/examples/loadables/Makefile.in
@@ -85,7 +85,7 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
ALLPROG = print truefalse sleep pushd finfo logname basename dirname \
tty pathchk tee head mkdir rmdir printenv id whoami \
- uname sync push ln unlink cut realpath getconf strftime mypid
+ uname sync push ln unlink realpath strftime mypid
OTHERPROG = necho hello cat
all: $(SHOBJ_STATUS)
@@ -110,9 +110,6 @@ print: print.o
necho: necho.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ necho.o $(SHOBJ_LIBS)
-getconf: getconf.o
- $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ getconf.o $(SHOBJ_LIBS)
-
hello: hello.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ hello.o $(SHOBJ_LIBS)
@@ -179,9 +176,6 @@ ln: ln.o
unlink: unlink.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ unlink.o $(SHOBJ_LIBS)
-cut: cut.o
- $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS)
-
realpath: realpath.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS)
@@ -229,7 +223,6 @@ tee.o: tee.c
head.o: head.c
rmdir.o: rmdir.c
necho.o: necho.c
-getconf.o: getconf.c
hello.o: hello.c
cat.o: cat.c
printenv.o: printenv.c
diff --git a/execute_cmd.c b/execute_cmd.c
index f39181a3..f0ef2c6a 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -353,11 +353,11 @@ executing_line_number ()
return currently_executing_command->value.Cond->line;
#endif
#if defined (DPAREN_ARITHMETIC)
- else if (currently_executing_command->type == cm_arith)
+ if (currently_executing_command->type == cm_arith)
return currently_executing_command->value.Arith->line;
#endif
#if defined (ARITH_FOR_COMMAND)
- else if (currently_executing_command->type == cm_arith_for)
+ if (currently_executing_command->type == cm_arith_for)
return currently_executing_command->value.ArithFor->line;
#endif
@@ -607,9 +607,11 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
want to note this before execute_in_subshell modifies the
COMMAND struct. Need to keep in mind that execute_in_subshell
runs the exit trap for () subshells itself. */
+ /* This handles { command; } & */
s = user_subshell == 0 && command->type == cm_group && pipe_in == NO_PIPE && pipe_out == NO_PIPE && asynchronous;
- /* run exit trap for : | { ...; } and : | ( ... ) */
- s += user_subshell == 0 && command->type == cm_group && pipe_in != NO_PIPE && pipe_out == NO_PIPE && asynchronous == 0;
+ /* run exit trap for : | { ...; } and { ...; } | : */
+ /* run exit trap for : | ( ...; ) and ( ...; ) | : */
+ s += user_subshell == 0 && command->type == cm_group && (pipe_in != NO_PIPE || pipe_out != NO_PIPE) && asynchronous == 0;
last_command_exit_value = execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close);
if (s)
@@ -3754,8 +3756,13 @@ fix_assignment_words (words)
b = 0;
assoc = global = array = 0;
+ /* Skip over assignment statements preceding a command name */
wcmd = words;
- for (w = words; w; w = w->next)
+ for (wcmd = words; wcmd; wcmd = wcmd->next)
+ if ((wcmd->word->flags & W_ASSIGNMENT) == 0)
+ break;
+
+ for (w = wcmd; w; w = w->next)
if (w->word->flags & W_ASSIGNMENT)
{
if (b == 0)
diff --git a/expr.c b/expr.c
index ac033018..c3023d46 100644
--- a/expr.c
+++ b/expr.c
@@ -94,11 +94,7 @@
/* Maximum amount of recursion allowed. This prevents a non-integer
variable such as "num=num+2" from infinitely adding to itself when
"let num=num+2" is given. */
-#if 0
#define MAX_EXPR_RECURSION_LEVEL 1024
-#else
-#define MAX_EXPR_RECURSION_LEVEL 16
-#endif
/* The Tokens. Singing "The Lion Sleeps Tonight". */
@@ -685,6 +681,7 @@ expbor ()
readtok ();
val2 = expbxor ();
val1 = val1 | val2;
+ lasttok = NUM;
}
return (val1);
@@ -703,6 +700,7 @@ expbxor ()
readtok ();
val2 = expband ();
val1 = val1 ^ val2;
+ lasttok = NUM;
}
return (val1);
@@ -721,6 +719,7 @@ expband ()
readtok ();
val2 = exp5 ();
val1 = val1 & val2;
+ lasttok = NUM;
}
return (val1);
@@ -743,6 +742,7 @@ exp5 ()
val1 = (val1 == val2);
else if (op == NEQ)
val1 = (val1 != val2);
+ lasttok = NUM;
}
return (val1);
}
@@ -771,6 +771,7 @@ exp4 ()
val1 = val1 < val2;
else /* (op == GT) */
val1 = val1 > val2;
+ lasttok = NUM;
}
return (val1);
}
@@ -794,6 +795,7 @@ expshift ()
val1 = val1 << val2;
else
val1 = val1 >> val2;
+ lasttok = NUM;
}
return (val1);
@@ -817,6 +819,7 @@ exp3 ()
val1 += val2;
else if (op == MINUS)
val1 -= val2;
+ lasttok = NUM;
}
return (val1);
}
@@ -868,6 +871,7 @@ exp2 ()
#else
val1 = (op == DIV) ? val1 / val2 : val1 % val2;
#endif
+ lasttok = NUM;
}
return (val1);
}
@@ -899,6 +903,7 @@ exppower ()
{
readtok ();
val2 = exppower (); /* exponentiation is right-associative */
+ lasttok = NUM;
if (val2 == 0)
return (1);
if (val2 < 0)
@@ -917,21 +922,25 @@ exp1 ()
{
readtok ();
val = !exp1 ();
+ lasttok = NUM;
}
else if (curtok == BNOT)
{
readtok ();
val = ~exp1 ();
+ lasttok = NUM;
}
else if (curtok == MINUS)
{
readtok ();
val = - exp1 ();
+ lasttok = NUM;
}
else if (curtok == PLUS)
{
readtok ();
val = exp1 ();
+ lasttok = NUM;
}
else
val = exp0 ();
diff --git a/general.c b/general.c
index 3948495e..b94b19ef 100644
--- a/general.c
+++ b/general.c
@@ -770,7 +770,7 @@ trim_pathname (name, maxlen)
*nbeg++ = '.';
nlen = nend - ntail;
- memcpy (nbeg, ntail, nlen);
+ memmove (nbeg, ntail, nlen);
nbeg[nlen] = '\0';
return name;
diff --git a/input.c b/input.c
index ad3ee513..e809a38e 100644
--- a/input.c
+++ b/input.c
@@ -308,7 +308,7 @@ save_bash_input (fd, new_fd)
the buffered stream. Make sure the file descriptor used to save bash
input is set close-on-exec. Returns 0 on success, -1 on failure. This
works only if fd is > 0 -- if fd == 0 and bash is reading input from
- fd 0, save_bash_input is used instead, to cooperate with input
+ fd 0, sync_buffered_stream is used instead, to cooperate with input
redirection (look at redir.c:add_undo_redirect()). */
int
check_bash_input (fd)
diff --git a/jobs.c b/jobs.c
index 2f914ffe..0e81940d 100644
--- a/jobs.c
+++ b/jobs.c
@@ -2482,6 +2482,9 @@ wait_for (pid)
waiting_for_child++;
r = waitchld (pid, 1); /* XXX */
waiting_for_child--;
+#if 0
+itrace("wait_for: blocking wait for %d returns %d child = %p", (int)pid, r, child);
+#endif
# if defined (MUST_UNBLOCK_CHLD)
sigaction (SIGCHLD, &oact, (struct sigaction *)NULL);
sigprocmask (SIG_SETMASK, &chldset, (sigset_t *)NULL);
@@ -3218,6 +3221,10 @@ waitchld (wpid, block)
pid = WAITPID (-1, &status, waitpid_flags);
+#if 0
+if (wpid != -1 && block)
+ itrace("waitchld: blocking waitpid returns %d", pid);
+#endif
/* WCONTINUED may be rejected by waitpid as invalid even when defined */
if (wcontinued && pid < 0 && errno == EINVAL)
{
@@ -3240,6 +3247,9 @@ waitchld (wpid, block)
break;
}
+#if 0
+itrace("waitchld: waitpid returns %d block = %d", pid, block);
+#endif
/* If waitpid returns 0, there are running children. If it returns -1,
the only other error POSIX says it can return is EINTR. */
CHECK_TERMSIG;
diff --git a/lib/glob/smatch.c b/lib/glob/smatch.c
index 23b8fb13..848610ab 100644
--- a/lib/glob/smatch.c
+++ b/lib/glob/smatch.c
@@ -43,7 +43,11 @@
#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0)
#define STREQN(a, b, n) ((a)[0] == (b)[0] && strncmp(a, b, n) == 0)
-int glob_asciirange = 0;
+#ifndef GLOBASCII_DEFAULT
+# define GLOBASCII_DEFAULT 0
+#endif
+
+int glob_asciirange = GLOBASCII_DEFAULT;
/* We use strcoll(3) for range comparisons in bracket expressions,
even though it can have unwanted side effects in locales
diff --git a/lib/readline/bind.c b/lib/readline/bind.c
index 10bc7114..8acf4ac4 100644
--- a/lib/readline/bind.c
+++ b/lib/readline/bind.c
@@ -1330,6 +1330,7 @@ remove_trailing:
{
i = _rl_skip_to_delim (value, 1, *value);
value[i] = '\0';
+ value++; /* skip past the quote */
}
else
goto remove_trailing;
diff --git a/lib/readline/colors.c b/lib/readline/colors.c
index a74ca702..89d9035f 100644
--- a/lib/readline/colors.c
+++ b/lib/readline/colors.c
@@ -167,13 +167,18 @@ _rl_print_color_indicator (char *f)
{
colored_filetype = C_DIR;
+#if defined (S_ISVTX)
if ((mode & S_ISVTX) && (mode & S_IWOTH)
&& is_colored (C_STICKY_OTHER_WRITABLE))
colored_filetype = C_STICKY_OTHER_WRITABLE;
- else if ((mode & S_IWOTH) != 0 && is_colored (C_OTHER_WRITABLE))
+ else
+#endif
+ if ((mode & S_IWOTH) != 0 && is_colored (C_OTHER_WRITABLE))
colored_filetype = C_OTHER_WRITABLE;
+#if defined (S_ISVTX)
else if ((mode & S_ISVTX) != 0 && is_colored (C_STICKY))
colored_filetype = C_STICKY;
+#endif
}
else if (S_ISLNK (mode))
colored_filetype = ((linkok == 0
diff --git a/lib/readline/complete.c b/lib/readline/complete.c
index 7e6700a8..31f03f7b 100644
--- a/lib/readline/complete.c
+++ b/lib/readline/complete.c
@@ -2132,13 +2132,17 @@ rl_completion_matches (text, entry_function)
xfree (match_list);
match_list = 0;
match_list_size = 0;
+ matches = 0;
RL_CHECK_SIGNALS ();
}
- if (matches + 1 == match_list_size)
+ if (matches + 1 >= match_list_size)
match_list = (char **)xrealloc
(match_list, ((match_list_size += 10) + 1) * sizeof (char *));
+ if (match_list == 0)
+ return (match_list);
+
match_list[++matches] = string;
match_list[matches + 1] = (char *)NULL;
}
diff --git a/lib/readline/doc/rltech.texi b/lib/readline/doc/rltech.texi
index eb540cd4..8b3e1735 100644
--- a/lib/readline/doc/rltech.texi
+++ b/lib/readline/doc/rltech.texi
@@ -612,6 +612,7 @@ means that vi mode is active.
* Miscellaneous Functions:: Functions that don't fall into any category.
* Alternate Interface:: Using Readline in a `callback' fashion.
* A Readline Example:: An example Readline function.
+* Alternate Interface Example:: An example program using the alternate interface.
@end menu
@node Function Naming
@@ -1293,8 +1294,9 @@ are functions available to make this easy.
@deftypefun void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler)
Set up the terminal for readline I/O and display the initial
expanded value of @var{prompt}. Save the value of @var{lhandler} to
-use as a function to call when a complete line of input has been entered.
-The function takes the text of the line as an argument.
+use as a handler function to call when a complete line of input has been
+entered.
+The handler function receives the text of the line as an argument.
@end deftypefun
@deftypefun void rl_callback_read_char (void)
@@ -1302,14 +1304,15 @@ Whenever an application determines that keyboard input is available, it
should call @code{rl_callback_read_char()}, which will read the next
character from the current input source.
If that character completes the line, @code{rl_callback_read_char} will
-invoke the @var{lhandler} function saved by @code{rl_callback_handler_install}
-to process the line.
+invoke the @var{lhandler} function installed by
+@code{rl_callback_handler_install} to process the line.
Before calling the @var{lhandler} function, the terminal settings are
reset to the values they had before calling
@code{rl_callback_handler_install}.
If the @var{lhandler} function returns,
+and the line handler remains installed,
the terminal settings are modified for Readline's use again.
-@code{EOF} is indicated by calling @var{lhandler} with a
+@code{EOF} is indicated by calling @var{lhandler} with a
@code{NULL} line.
@end deftypefun
@@ -1389,6 +1392,98 @@ invert_case_line (count, key)
@}
@end example
+@node Alternate Interface Example
+@subsection Alternate Interface Example
+
+Here is a complete program that illustrates Readline's alternate interface.
+It reads lines from the terminal and displays them, providing the
+standard history and TAB completion functions.
+It understands the EOF character or "exit" to exit the program.
+
+@example
+/* Standard include files. stdio.h is required. */
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Used for select(2) */
+#include <sys/types.h>
+#include <sys/select.h>
+
+#include <stdio.h>
+
+/* Standard readline include files. */
+#include <readline/readline.h>
+#include <readline/history.h>
+
+static void cb_linehandler (char *);
+
+int running;
+const char *prompt = "rltest$ ";
+
+/* Callback function called for each line when accept-line executed, EOF
+ seen, or EOF character read. This sets a flag and returns; it could
+ also call exit(3). */
+static void
+cb_linehandler (char *line)
+@{
+ /* Can use ^D (stty eof) or `exit' to exit. */
+ if (line == NULL || strcmp (line, "exit") == 0)
+ @{
+ if (line == 0)
+ printf ("\n");
+ printf ("exit\n");
+ /* This function needs to be called to reset the terminal settings,
+ and calling it from the line handler keeps one extra prompt from
+ being displayed. */
+ rl_callback_handler_remove ();
+
+ running = 0;
+ @}
+ else
+ @{
+ if (*line)
+ add_history (line);
+ printf ("input line: %s\n", line);
+ free (line);
+ @}
+@}
+
+int
+main (int c, char **v)
+@{
+ fd_set fds;
+ int r;
+
+ /* Install the line handler. */
+ rl_callback_handler_install (prompt, cb_linehandler);
+
+ /* Enter a simple event loop. This waits until something is available
+ to read on readline's input stream (defaults to standard input) and
+ calls the builtin character read callback to read it. It does not
+ have to modify the user's terminal settings. */
+ running = 1;
+ while (running)
+ @{
+ FD_ZERO (&fds);
+ FD_SET (fileno (rl_instream), &fds);
+
+ r = select (FD_SETSIZE, &fds, NULL, NULL, NULL);
+ if (r < 0)
+ @{
+ perror ("rltest: select");
+ rl_callback_handler_remove ();
+ break;
+ @}
+
+ if (FD_ISSET (fileno (rl_instream), &fds))
+ rl_callback_read_char ();
+ @}
+
+ printf ("rltest: Event loop has exited\n");
+ return 0;
+@}
+@end example
+
@node Readline Signal Handling
@section Readline Signal Handling
diff --git a/lib/readline/doc/version.texi b/lib/readline/doc/version.texi
index ba544652..db450183 100644
--- a/lib/readline/doc/version.texi
+++ b/lib/readline/doc/version.texi
@@ -1,10 +1,10 @@
@ignore
-Copyright (C) 1988-2012 Free Software Foundation, Inc.
+Copyright (C) 1988-2013 Free Software Foundation, Inc.
@end ignore
-@set EDITION 6.2
-@set VERSION 6.2
-@set UPDATED 15 November 2012
-@set UPDATED-MONTH November 2012
+@set EDITION 6.3
+@set VERSION 6.3
+@set UPDATED 26 May 2013
+@set UPDATED-MONTH May 2013
-@set LASTCHANGE Thu Nov 15 21:03:04 EST 2012
+@set LASTCHANGE Sat May 25 17:02:56 EDT 2013
diff --git a/lib/readline/examples/rl-callbacktest.c b/lib/readline/examples/rl-callbacktest.c
new file mode 100644
index 00000000..a7e451c1
--- /dev/null
+++ b/lib/readline/examples/rl-callbacktest.c
@@ -0,0 +1,81 @@
+/* Standard include files. stdio.h is required. */
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Used for select(2) */
+#include <sys/types.h>
+#include <sys/select.h>
+
+#include <stdio.h>
+
+/* Standard readline include files. */
+#include <readline/readline.h>
+#include <readline/history.h>
+
+static void cb_linehandler (char *);
+
+int running;
+const char *prompt = "rltest$ ";
+
+/* Callback function called for each line when accept-line executed, EOF
+ seen, or EOF character read. This sets a flag and returns; it could
+ also call exit(3). */
+static void
+cb_linehandler (char *line)
+{
+ /* Can use ^D (stty eof) or `exit' to exit. */
+ if (line == NULL || strcmp (line, "exit") == 0)
+ {
+ if (line == 0)
+ printf ("\n");
+ printf ("exit\n");
+ /* This function needs to be called to reset the terminal settings,
+ and calling it from the line handler keeps one extra prompt from
+ being displayed. */
+ rl_callback_handler_remove ();
+
+ running = 0;
+ }
+ else
+ {
+ if (*line)
+ add_history (line);
+ printf ("input line: %s\n", line);
+ free (line);
+ }
+}
+
+int
+main (int c, char **v)
+{
+ fd_set fds;
+ int r;
+
+ /* Install the line handler. */
+ rl_callback_handler_install (prompt, cb_linehandler);
+
+ /* Enter a simple event loop. This waits until something is available
+ to read on readline's input stream (defaults to standard input) and
+ calls the builtin character read callback to read it. It does not
+ have to modify the user's terminal settings. */
+ running = 1;
+ while (running)
+ {
+ FD_ZERO (&fds);
+ FD_SET (fileno (rl_instream), &fds);
+
+ r = select (FD_SETSIZE, &fds, NULL, NULL, NULL);
+ if (r < 0)
+ {
+ perror ("rltest: select");
+ rl_callback_handler_remove ();
+ break;
+ }
+
+ if (FD_ISSET (fileno (rl_instream), &fds))
+ rl_callback_read_char ();
+ }
+
+ printf ("rltest: Event loop has exited\n");
+ return 0;
+}
diff --git a/lib/readline/histfile.c b/lib/readline/histfile.c
index 6ab3a1ce..bb743156 100644
--- a/lib/readline/histfile.c
+++ b/lib/readline/histfile.c
@@ -411,14 +411,16 @@ history_truncate_file (fname, lines)
truncate to. */
if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
{
- write (file, bp, chars_read - (bp - buffer));
+ if (write (file, bp, chars_read - (bp - buffer)) < 0)
+ rv = errno;
#if defined (__BEOS__)
/* BeOS ignores O_TRUNC. */
ftruncate (file, chars_read - (bp - buffer));
#endif
- close (file);
+ if (close (file) < 0 && rv == 0)
+ rv = errno;
}
truncate_exit:
@@ -547,7 +549,8 @@ mmap_error:
#endif
}
- close (file);
+ if (close (file) < 0 && rv == 0)
+ rv = errno;
if (rv != 0 && output && bakname)
rename (bakname, output);
diff --git a/lib/readline/history.c b/lib/readline/history.c
index cd3e9392..1181e7cc 100644
--- a/lib/readline/history.c
+++ b/lib/readline/history.c
@@ -318,7 +318,7 @@ add_history_time (string)
{
HIST_ENTRY *hs;
- if (string == 0)
+ if (string == 0 || history_length < 1)
return;
hs = the_history[history_length - 1];
FREE (hs->timestamp);
diff --git a/lib/readline/readline.c b/lib/readline/readline.c
index b331977b..45e5ada5 100644
--- a/lib/readline/readline.c
+++ b/lib/readline/readline.c
@@ -397,8 +397,8 @@ readline_internal_setup ()
_rl_out_stream = rl_outstream;
/* Enable the meta key only for the duration of readline(), if this
- terminal has one. */
- if (_rl_enable_meta)
+ terminal has one and the terminal has been initialized */
+ if (_rl_enable_meta & RL_ISSTATE (RL_STATE_TERMPREPPED))
_rl_enable_meta_key ();
if (rl_startup_hook)
@@ -406,7 +406,7 @@ readline_internal_setup ()
#if defined (VI_MODE)
if (rl_editing_mode == vi_mode)
- rl_vi_insert_mode (1, 'i');
+ rl_vi_insertion_mode (1, 'i'); /* don't want to reset last */
#endif /* VI_MODE */
/* If we're not echoing, we still want to at least print a prompt, because
@@ -469,7 +469,9 @@ readline_internal_teardown (eof)
if (rl_undo_list)
rl_free_undo_list ();
- /* Disable the meta key, if this terminal has one. */
+ /* Disable the meta key, if this terminal has one and we were told to use it.
+ The check whether or not we sent the enable string is in
+ _rl_disable_meta_key(); the flag is set in _rl_enable_meta_key */
_rl_disable_meta_key ();
/* Restore normal cursor, if available. */
@@ -821,7 +823,7 @@ _rl_dispatch_subseq (key, map, got_subseq)
rl_dispatching = 1;
RL_SETSTATE(RL_STATE_DISPATCHING);
- (*func) (rl_numeric_arg * rl_arg_sign, key);
+ r = (*func) (rl_numeric_arg * rl_arg_sign, key);
RL_UNSETSTATE(RL_STATE_DISPATCHING);
rl_dispatching = 0;
@@ -957,6 +959,7 @@ _rl_dispatch_subseq (key, map, got_subseq)
#if defined (VI_MODE)
if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
key != ANYOTHERKEY &&
+ rl_key_sequence_length == 1 && /* XXX */
_rl_vi_textmod_command (key))
_rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
#endif
diff --git a/lib/readline/signals.c b/lib/readline/signals.c
index 25e4f377..d373ba14 100644
--- a/lib/readline/signals.c
+++ b/lib/readline/signals.c
@@ -141,10 +141,19 @@ _rl_signal_handler (sig)
#if defined (SIGWINCH)
if (sig == SIGWINCH)
- rl_resize_terminal ();
+ {
+ rl_resize_terminal ();
+ /* XXX - experimental for now */
+ /* Call a signal hook because though we called the original signal handler
+ in rl_sigwinch_handler below, we will not resend the signal to
+ ourselves. */
+ if (rl_signal_event_hook)
+ (*rl_signal_event_hook) ();
+ }
else
#endif
_rl_handle_signal (sig);
+
SIGHANDLER_RETURN;
}
diff --git a/lib/sh/casemod.c b/lib/sh/casemod.c
index 5edc08aa..bbcffa6f 100644
--- a/lib/sh/casemod.c
+++ b/lib/sh/casemod.c
@@ -39,6 +39,7 @@
#include <shmbchar.h>
#include <shmbutil.h>
#include <chartypes.h>
+#include <typemax.h>
#include <glob/strmatch.h>
@@ -68,6 +69,10 @@
extern char *substring __P((char *, int, int));
+#ifndef UCHAR_MAX
+# define UCHAR_MAX TYPE_MAXIMUM(unsigned char)
+#endif
+
#if defined (HANDLE_MULTIBYTE)
static wchar_t
cval (s, i)
@@ -141,8 +146,10 @@ sh_modcase (string, pat, flags)
if (iswalnum (wc) == 0)
{
inword = 0;
+#if 0
ADVANCE_CHAR (ret, end, start);
continue;
+#endif
}
if (pat)
@@ -203,8 +210,11 @@ sh_modcase (string, pat, flags)
else
nop = flags;
- if (MB_CUR_MAX == 1 || is_basic ((int)wc))
+ /* Need to check UCHAR_MAX since wc may have already been converted to a
+ wide character by cval() */
+ if (MB_CUR_MAX == 1 || (wc <= UCHAR_MAX && is_basic ((int)wc)))
{
+singlebyte:
switch (nop)
{
default:
@@ -221,7 +231,10 @@ sh_modcase (string, pat, flags)
{
m = mbrtowc (&wc, string + start, end - start, &state);
if (MB_INVALIDCH (m))
- wc = (wchar_t)string[start];
+ {
+ wc = (unsigned char)string[start];
+ goto singlebyte;
+ }
else if (MB_NULLWCH (m))
wc = L'\0';
switch (nop)
diff --git a/lib/sh/pathphys.c b/lib/sh/pathphys.c
index cddca483..26016b76 100644
--- a/lib/sh/pathphys.c
+++ b/lib/sh/pathphys.c
@@ -269,7 +269,7 @@ sh_realpath (pathname, resolved)
wd = get_working_directory ("sh_realpath");
if (wd == 0)
return ((char *)NULL);
- tdir = sh_makepath ((char *)pathname, wd, 0);
+ tdir = sh_makepath (wd, (char *)pathname, 0);
free (wd);
}
else
diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c
index c79ba9cd..31cce1c1 100644
--- a/lib/sh/shquote.c
+++ b/lib/sh/shquote.c
@@ -94,6 +94,15 @@ sh_single_quote (string)
result = (char *)xmalloc (3 + (4 * strlen (string)));
r = result;
+
+ if (string[0] == '\'' && string[1] == 0)
+ {
+ *r++ = '\\';
+ *r++ = '\'';
+ *r++ = 0;
+ return result;
+ }
+
*r++ = '\'';
for (s = string; s && (c = *s); s++)
diff --git a/parse.y b/parse.y
index fd3f97f6..58e1fc52 100644
--- a/parse.y
+++ b/parse.y
@@ -3301,6 +3301,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
treat single quotes as special when inside a double-quoted
${...}. This logic must agree with subst.c:extract_dollar_brace_string
since they share the same defines. */
+ /* FLAG POSIX INTERP 221 */
if (flags & P_DOLBRACE)
{
/* ${param%[%]word} */
@@ -3311,7 +3312,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
dolbrace_state = DOLBRACE_QUOTE;
/* ${param/[/]pat/rep} */
else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '/' && retind > 1)
- dolbrace_state = DOLBRACE_QUOTE;
+ dolbrace_state = DOLBRACE_QUOTE2; /* XXX */
/* ${param^[^]pat} */
else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '^' && retind > 1)
dolbrace_state = DOLBRACE_QUOTE;
@@ -3353,7 +3354,18 @@ parse_matched_pair (qc, open, close, lenp, flags)
ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
xfree (nestret);
- if ((rflags & P_DQUOTE) == 0)
+ /* If we're parsing a double-quoted brace expansion and we are
+ not in a place where single quotes are treated specially,
+ make sure we single-quote the results of the ansi
+ expansion because quote removal should remove them later */
+ /* FLAG POSIX INTERP 221 */
+ if ((shell_compatibility_level > 42) && (rflags & P_DQUOTE) && (dolbrace_state == DOLBRACE_QUOTE2) && (flags & P_DOLBRACE))
+ {
+ nestret = sh_single_quote (ttrans);
+ free (ttrans);
+ nestlen = strlen (nestret);
+ }
+ else if ((rflags & P_DQUOTE) == 0)
{
nestret = sh_single_quote (ttrans);
free (ttrans);
@@ -5344,9 +5356,13 @@ decode_prompt_string (string)
#undef ROOT_PATH
#undef DOUBLE_SLASH_ROOT
else
- /* polite_directory_format is guaranteed to return a string
- no longer than PATH_MAX - 1 characters. */
- strcpy (t_string, polite_directory_format (t_string));
+ {
+ /* polite_directory_format is guaranteed to return a string
+ no longer than PATH_MAX - 1 characters. */
+ temp = polite_directory_format (t_string);
+ if (temp != t_string)
+ strcpy (t_string, temp);
+ }
temp = trim_pathname (t_string, PATH_MAX - 1);
/* If we're going to be expanding the prompt string later,
diff --git a/parser.h b/parser.h
index 50784567..5d286923 100644
--- a/parser.h
+++ b/parser.h
@@ -67,6 +67,7 @@ struct dstack {
#define DOLBRACE_OP 0x02
#define DOLBRACE_WORD 0x04
-#define DOLBRACE_QUOTE 0x40
+#define DOLBRACE_QUOTE 0x40 /* single quote is special in double quotes */
+#define DOLBRACE_QUOTE2 0x80 /* single quote is semi-special in double quotes */
#endif /* _PARSER_H_ */
diff --git a/po/._hr.po b/po/._hr.po
new file mode 100644
index 00000000..059ef4ea
--- /dev/null
+++ b/po/._hr.po
Binary files differ
diff --git a/po/hr.po b/po/hr.po
index 8da7c6f0..09b63783 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -1,68 +1,67 @@
# Translation of bash to Croatian.
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright © 2012 Free Software Foundation, Inc.
# This file is distributed under the same license as the bash package.
-# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012.
+# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: bash 4.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-03-08 16:00-0500\n"
-"PO-Revision-Date: 2012-11-01 01:46+0100\n"
+"POT-Creation-Date: 2011-01-28 22:09-0500\n"
+"PO-Revision-Date: 2013-04-18 01:00+0200\n"
"Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
+"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: hr\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Generator: Lokalize 1.4\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Gtranslator 2.91.6\n"
-#: arrayfunc.c:51
+#: arrayfunc.c:50
msgid "bad array subscript"
msgstr "neispravan indeks polja"
-#: arrayfunc.c:356 builtins/declare.def:578
+#: arrayfunc.c:313 builtins/declare.def:487
#, c-format
msgid "%s: cannot convert indexed to associative array"
msgstr "%s: ne mogu pretvoriti indeksirano u asocijativno polje"
-#: arrayfunc.c:539
+#: arrayfunc.c:480
#, c-format
msgid "%s: invalid associative array key"
msgstr "%s: neispravan ključ asocijativnog polja"
-#: arrayfunc.c:541
+#: arrayfunc.c:482
#, c-format
msgid "%s: cannot assign to non-numeric index"
msgstr "%s: ne mogu pridružiti nenumeričkom indeksu"
-#: arrayfunc.c:586
+#: arrayfunc.c:518
#, c-format
msgid "%s: %s: must use subscript when assigning associative array"
msgstr "%s: %s: mora koristiti indeks pri pridruživanju asocijativnog polja"
-#: bashhist.c:388
+#: bashhist.c:387
#, c-format
msgid "%s: cannot create: %s"
msgstr "%s: ne mogu napraviti: %s"
-#: bashline.c:3923
+#: bashline.c:3498
msgid "bash_execute_unix_command: cannot find keymap for command"
msgstr "bash_execute_unix_command: ne mogu pronaći tipkovničku mapu za naredbu"
-#: bashline.c:4010
+#: bashline.c:3584
#, c-format
msgid "%s: first non-whitespace character is not `\"'"
msgstr "%s: prvi znak različit od praznine nije „\"”"
-#: bashline.c:4039
+#: bashline.c:3613
#, c-format
msgid "no closing `%c' in %s"
msgstr "nema zatvorene „%c” u %s"
-#: bashline.c:4073
+#: bashline.c:3647
#, c-format
msgid "%s: missing colon separator"
msgstr "%s: nedostaje dvotočje za razdvajanje"
@@ -72,36 +71,36 @@ msgstr "%s: nedostaje dvotočje za razdvajanje"
msgid "`%s': invalid alias name"
msgstr "„%s”: neispravno drugo ime"
-#: builtins/bind.def:123 builtins/bind.def:126
+#: builtins/bind.def:120 builtins/bind.def:123
msgid "line editing not enabled"
msgstr "uređivanje redaka nije omogućeno"
-#: builtins/bind.def:212
+#: builtins/bind.def:206
#, c-format
msgid "`%s': invalid keymap name"
msgstr "„%s”: neispravno ime tipkovničke mape"
-#: builtins/bind.def:251
+#: builtins/bind.def:245
#, c-format
msgid "%s: cannot read: %s"
msgstr "%s: ne mogu čitati: %s"
-#: builtins/bind.def:266
+#: builtins/bind.def:260
#, c-format
msgid "`%s': cannot unbind"
msgstr "„%s”: ne mogu ukloniti vezu"
-#: builtins/bind.def:304 builtins/bind.def:334
+#: builtins/bind.def:295 builtins/bind.def:325
#, c-format
msgid "`%s': unknown function name"
msgstr "„%s”: nepoznato ime funkcije"
-#: builtins/bind.def:312
+#: builtins/bind.def:303
#, c-format
msgid "%s is not bound to any keys.\n"
msgstr "%s nije pridružen nijednoj tipki.\n"
-#: builtins/bind.def:316
+#: builtins/bind.def:307
#, c-format
msgid "%s can be invoked via "
msgstr "%s se može pozvati pomoću "
@@ -124,15 +123,11 @@ msgstr ""
" \n"
" Bez IZRAZA vraća "
-#: builtins/cd.def:239
+#: builtins/cd.def:235
msgid "HOME not set"
msgstr "HOME nije postavljen"
-#: builtins/cd.def:247 builtins/common.c:166 test.c:855
-msgid "too many arguments"
-msgstr "previše argumenata"
-
-#: builtins/cd.def:258
+#: builtins/cd.def:247
msgid "OLDPWD not set"
msgstr "OLDPWD nije postavljen"
@@ -141,7 +136,7 @@ msgstr "OLDPWD nije postavljen"
msgid "line %d: "
msgstr "redak %d: "
-#: builtins/common.c:139 error.c:265
+#: builtins/common.c:139 error.c:261
#, c-format
msgid "warning: "
msgstr "upozorenje: "
@@ -151,7 +146,11 @@ msgstr "upozorenje: "
msgid "%s: usage: "
msgstr "%s: uporaba: "
-#: builtins/common.c:191 shell.c:506 shell.c:788
+#: builtins/common.c:166 test.c:832
+msgid "too many arguments"
+msgstr "previše argumenata"
+
+#: builtins/common.c:191 shell.c:500 shell.c:782
#, c-format
msgid "%s: option requires an argument"
msgstr "%s: opcija zahtijeva argument"
@@ -166,7 +165,7 @@ msgstr "%s: potreban je numerički argument"
msgid "%s: not found"
msgstr "%s: nije pronađen"
-#: builtins/common.c:214 shell.c:801
+#: builtins/common.c:214 shell.c:795
#, c-format
msgid "%s: invalid option"
msgstr "%s: neispravna opcija"
@@ -176,7 +175,7 @@ msgstr "%s: neispravna opcija"
msgid "%s: invalid option name"
msgstr "%s: neispravno ime opcije"
-#: builtins/common.c:228 general.c:234 general.c:239
+#: builtins/common.c:228 general.c:231 general.c:236
#, c-format
msgid "`%s': not a valid identifier"
msgstr "„%s”: nije ispravan identifikator"
@@ -189,7 +188,7 @@ msgstr "neispravan oktalni broj"
msgid "invalid hex number"
msgstr "neispravan heksadekadski broj"
-#: builtins/common.c:242 expr.c:1451
+#: builtins/common.c:242 expr.c:1362
msgid "invalid number"
msgstr "neispravan broj"
@@ -203,7 +202,7 @@ msgstr "%s: neispravno naveden signal"
msgid "`%s': not a pid or valid job spec"
msgstr "„%s”: nije pid ili ispravno naveden zadatak"
-#: builtins/common.c:264 error.c:458
+#: builtins/common.c:264 error.c:454
#, c-format
msgid "%s: readonly variable"
msgstr "%s: varijabla samo za čitanje"
@@ -275,58 +274,48 @@ msgstr "%s: greška pri otkrivanju trenutnog direktorija: %s: %s\n"
msgid "%s: ambiguous job spec"
msgstr "%s: višeznačan navod zadatka"
-#: builtins/complete.def:277
+#: builtins/complete.def:276
#, c-format
msgid "%s: invalid action name"
msgstr "%s: neispravno ime radnje"
-#: builtins/complete.def:450 builtins/complete.def:645
-#: builtins/complete.def:855
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
#, c-format
msgid "%s: no completion specification"
msgstr "%s: nije navedeno nadopunjavanje"
-#: builtins/complete.def:697
+#: builtins/complete.def:696
msgid "warning: -F option may not work as you expect"
msgstr "upozorenje: opcija -F možda neće raditi kako želite"
-#: builtins/complete.def:699
+#: builtins/complete.def:698
msgid "warning: -C option may not work as you expect"
msgstr "upozorenje: opcija -C možda neće raditi kako želite"
-#: builtins/complete.def:828
+#: builtins/complete.def:826
msgid "not currently executing completion function"
msgstr "trenutno ne izvršavam funkciju nadopunjavanja"
-#: builtins/declare.def:126
+#: builtins/declare.def:124
msgid "can only be used in a function"
msgstr "može se koristiti samo u funkciji"
-#: builtins/declare.def:311 builtins/declare.def:526
-#, c-format
-msgid "%s: reference variable cannot be an array"
-msgstr ""
-
-#: builtins/declare.def:317
-#, c-format
-msgid "%s: nameref variable self references not allowed"
-msgstr ""
-
-#: builtins/declare.def:415
+#: builtins/declare.def:366
msgid "cannot use `-f' to make functions"
msgstr "ne mogu koristiti „-f” za izradu funkcija"
-#: builtins/declare.def:427 execute_cmd.c:5315
+#: builtins/declare.def:378 execute_cmd.c:5105
#, c-format
msgid "%s: readonly function"
msgstr "%s: funkcija samo za čitanje"
-#: builtins/declare.def:565
+#: builtins/declare.def:474
#, c-format
msgid "%s: cannot destroy array variables in this way"
msgstr "%s: ne mogu uništiti varijable polja na ovaj način"
-#: builtins/declare.def:572 builtins/read.def:721
+#: builtins/declare.def:481
#, c-format
msgid "%s: cannot convert associative to indexed array"
msgstr "%s: ne mogu pretvoriti asocijativno u indeksirano polje"
@@ -355,23 +344,24 @@ msgstr "%s: nije dinamički učitan"
msgid "%s: cannot delete: %s"
msgstr "%s: ne mogu ukloniti: %s"
-#: builtins/evalfile.c:140 builtins/hash.def:171 execute_cmd.c:5162
-#: shell.c:1481
+#: builtins/evalfile.c:135 builtins/hash.def:171 execute_cmd.c:4961
+#: shell.c:1457
#, c-format
msgid "%s: is a directory"
msgstr "%s: to je direktorij"
-#: builtins/evalfile.c:146
+#: builtins/evalfile.c:140
#, c-format
msgid "%s: not a regular file"
msgstr "%s: nije obična datoteka"
-#: builtins/evalfile.c:155
+#: builtins/evalfile.c:148
#, c-format
msgid "%s: file is too large"
msgstr "%s: datoteka je prevelika"
-#: builtins/evalfile.c:190 builtins/evalfile.c:208 shell.c:1491
+#: builtins/evalfile.c:182 builtins/evalfile.c:200 execute_cmd.c:5032
+#: shell.c:1467
#, c-format
msgid "%s: cannot execute binary file"
msgstr "%s: ne mogu izvršiti binarnu datoteku"
@@ -406,7 +396,7 @@ msgstr "naredba nije pronađena"
#: builtins/fc.def:312 builtins/fc.def:359
msgid "history specification"
-msgstr ""
+msgstr "specifikacija povijesti"
#: builtins/fc.def:380
#, c-format
@@ -444,28 +434,27 @@ msgstr "%s: tablica raspršivanja prazna\n"
#: builtins/hash.def:245
#, c-format
msgid "hits\tcommand\n"
-msgstr ""
+msgstr "pogoci\tnaredba\n"
#: builtins/help.def:130
#, c-format
msgid "Shell commands matching keyword `"
msgid_plural "Shell commands matching keywords `"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "Naredbe ljuske koje odgovaraju ključnoj riječi „"
+msgstr[1] "Naredbe ljuske koje odgovaraju ključnim riječima „"
+msgstr[2] "Naredbe ljuske koje odgovaraju ključnim riječima „"
#: builtins/help.def:168
#, c-format
-msgid ""
-"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
-msgstr ""
+msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr "nisu pronađene teme pomoći za „%s”. Pokušajte „help help”, „man -k %s” ili „info %s”."
#: builtins/help.def:185
#, c-format
msgid "%s: cannot open: %s"
msgstr "%s: ne mogu otvoriti: %s"
-#: builtins/help.def:471
+#: builtins/help.def:337
#, c-format
msgid ""
"These shell commands are defined internally. Type `help' to see this list.\n"
@@ -476,6 +465,13 @@ msgid ""
"A star (*) next to a name means that the command is disabled.\n"
"\n"
msgstr ""
+"Ove naredbe ljuske su interno definirane. Upišite „help” za prikaz popisa.\n"
+"Upišite „help ime” za više podataka o funkciji „ime”.\n"
+"Koristite „info bash” za više općenitih podataka o ljusci.\n"
+"Koristite „man -k” ili „info” za više podataka o naredbama izvan ovog popisa.\n"
+"\n"
+"Zvjezdica (*) pokraj imena označava onemogućenu naredbu.\n"
+"\n"
#: builtins/history.def:154
msgid "cannot use more than one of -anrw"
@@ -485,7 +481,7 @@ msgstr "ne mogu koristiti više od jedne od opcija -anrw"
msgid "history position"
msgstr "mjesto u povijesti"
-#: builtins/history.def:366
+#: builtins/history.def:365
#, c-format
msgid "%s: history expansion failed"
msgstr "%s: proširenje povijesti nije uspjelo"
@@ -499,16 +495,16 @@ msgstr "%s: inlib nije uspio"
msgid "no other options allowed with `-x'"
msgstr "nisu dozvoljene druge opcije uz „-x”"
-#: builtins/kill.def:200
+#: builtins/kill.def:198
#, c-format
msgid "%s: arguments must be process or job IDs"
msgstr "%s: argumenti moraju biti identifikatori procesa ili zadataka"
-#: builtins/kill.def:263
+#: builtins/kill.def:261
msgid "Unknown error"
msgstr "Nepoznata greška"
-#: builtins/let.def:95 builtins/let.def:120 expr.c:586 expr.c:601
+#: builtins/let.def:95 builtins/let.def:120 expr.c:552 expr.c:567
msgid "expression expected"
msgstr "očekujem izraz"
@@ -517,64 +513,64 @@ msgstr "očekujem izraz"
msgid "%s: not an indexed array"
msgstr "%s: nije indeksirano polje"
-#: builtins/mapfile.def:259 builtins/read.def:302
+#: builtins/mapfile.def:256 builtins/read.def:279
#, c-format
msgid "%s: invalid file descriptor specification"
msgstr "%s: neispravno naveden opisnik datoteke"
-#: builtins/mapfile.def:267 builtins/read.def:309
+#: builtins/mapfile.def:264 builtins/read.def:286
#, c-format
msgid "%d: invalid file descriptor: %s"
msgstr "%d: neispravan opisnik datoteke: %s"
-#: builtins/mapfile.def:276 builtins/mapfile.def:314
+#: builtins/mapfile.def:273 builtins/mapfile.def:311
#, c-format
msgid "%s: invalid line count"
msgstr "%s: neispravan broj redaka"
-#: builtins/mapfile.def:287
+#: builtins/mapfile.def:284
#, c-format
msgid "%s: invalid array origin"
msgstr "%s: neispravan izvor polja"
-#: builtins/mapfile.def:304
+#: builtins/mapfile.def:301
#, c-format
msgid "%s: invalid callback quantum"
msgstr "%s: neispravan element povratnog poziva"
-#: builtins/mapfile.def:336
+#: builtins/mapfile.def:333
msgid "empty array variable name"
msgstr "prazno ime varijable polja"
-#: builtins/mapfile.def:357
+#: builtins/mapfile.def:354
msgid "array variable support required"
msgstr "potrebna je podrška varijable polja"
-#: builtins/printf.def:402
+#: builtins/printf.def:394
#, c-format
msgid "`%s': missing format character"
msgstr "„%s”: nedostaje znak oblika"
-#: builtins/printf.def:456
+#: builtins/printf.def:448
#, c-format
msgid "`%c': invalid time format specification"
msgstr "„%c”: neispravno naveden oblik vremena"
-#: builtins/printf.def:658
+#: builtins/printf.def:635
#, c-format
msgid "`%c': invalid format character"
msgstr "„%c”: neispravan znak oblika"
-#: builtins/printf.def:684
+#: builtins/printf.def:662
#, c-format
msgid "warning: %s: %s"
msgstr "upozorenje: %s: %s"
-#: builtins/printf.def:865
+#: builtins/printf.def:840
msgid "missing hex digit for \\x"
msgstr "nedostaje heksadekadska znamenka za \\x"
-#: builtins/printf.def:880
+#: builtins/printf.def:855
#, c-format
msgid "missing unicode digit for \\%c"
msgstr "nedostaje unicode znamenka za \\%c"
@@ -583,24 +579,19 @@ msgstr "nedostaje unicode znamenka za \\%c"
msgid "no other directory"
msgstr "nema drugog direktorija"
-#: builtins/pushd.def:354
-#, fuzzy, c-format
-msgid "%s: invalid argument"
-msgstr "%s: neispravan argument ograničenja"
-
-#: builtins/pushd.def:468
+#: builtins/pushd.def:462
msgid "<no current directory>"
msgstr "<nema trenutnog direktorija>"
-#: builtins/pushd.def:512
+#: builtins/pushd.def:506
msgid "directory stack empty"
msgstr "stog direktorija je prazan"
-#: builtins/pushd.def:514
+#: builtins/pushd.def:508
msgid "directory stack index"
msgstr "indeks stoga direktorija"
-#: builtins/pushd.def:689
+#: builtins/pushd.def:683
msgid ""
"Display the list of currently remembered directories. Directories\n"
" find their way onto the list with the `pushd' command; you can get\n"
@@ -615,16 +606,32 @@ msgid ""
" \twith its position in the stack\n"
" \n"
" Arguments:\n"
-" +N\tDisplays the Nth entry counting from the left of the list shown "
-"by\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown by\n"
" \tdirs when invoked without options, starting with zero.\n"
" \n"
-" -N\tDisplays the Nth entry counting from the right of the list shown "
-"by\n"
+" -N\tDisplays the Nth entry counting from the right of the list shown by\n"
"\tdirs when invoked without options, starting with zero."
msgstr ""
+"Prikaži popis trenutno zapamćenih direktorija. Direktoriji se dodaju\n"
+" na popis naredbom „pushd”, kroz popis se možete vraćati naredbom\n"
+" „popd”.\n"
+" \n"
+" Opcije:\n"
+" -c\točisti stog direktorija uklanjanjem svih elemenata\n"
+" -l\tne ispisuj tildom prefiksirane inačice direktorija\n"
+" \trelativno u odnosu na početni direktorij\n"
+" -p\tispiši stog direktorija jednu stavku po retku\n"
+" -v\tispiši stog direktorija jednu stavku po retku\n"
+" \tprefiksiranu položajem u stogu\n"
+" \n"
+" Argumenti:\n"
+" +N\tPrikazuje N-tu stavku s lijeve strane popisa koju prikazuje naredba\n"
+" \t„dirs” pozvana bez opcija, počevši od nule.\n"
+" \n"
+" -N\tPrikazuje N-tu stavku s desne strane popisa koju prikazuje naredba\n"
+"\t„dirs” pozvana bez opcija, počevši od nule."
-#: builtins/pushd.def:711
+#: builtins/pushd.def:705
msgid ""
"Adds a directory to the top of the directory stack, or rotates\n"
" the stack, making the new top of the stack the current working\n"
@@ -649,7 +656,7 @@ msgid ""
" The `dirs' builtin displays the directory stack."
msgstr ""
-#: builtins/pushd.def:736
+#: builtins/pushd.def:730
msgid ""
"Removes entries from the directory stack. With no arguments, removes\n"
" the top directory from the stack, and changes to the new top directory.\n"
@@ -670,40 +677,40 @@ msgid ""
" The `dirs' builtin displays the directory stack."
msgstr ""
-#: builtins/read.def:275
+#: builtins/read.def:252
#, c-format
msgid "%s: invalid timeout specification"
msgstr "%s: neispravno navedeno vremensko ograničenje"
-#: builtins/read.def:666
+#: builtins/read.def:588
#, c-format
msgid "read error: %d: %s"
msgstr "greška čitanja: %d: %s"
-#: builtins/return.def:75
+#: builtins/return.def:73
msgid "can only `return' from a function or sourced script"
msgstr "pozivanje „return” je moguće samo iz funkcije ili pokrenute skripte"
-#: builtins/set.def:782
+#: builtins/set.def:771
msgid "cannot simultaneously unset a function and a variable"
msgstr "ne mogu istovremeno poništiti funkciju i varijablu"
-#: builtins/set.def:826
+#: builtins/set.def:808
#, c-format
msgid "%s: cannot unset"
msgstr "%s: ne mogu poništiti"
-#: builtins/set.def:843
+#: builtins/set.def:815
#, c-format
msgid "%s: cannot unset: readonly %s"
msgstr "%s: ne mogu poništiti: %s je samo za čitanje"
-#: builtins/set.def:854
+#: builtins/set.def:826
#, c-format
msgid "%s: not an array variable"
msgstr "%s: nije varijabla polja"
-#: builtins/setattr.def:187
+#: builtins/setattr.def:186
#, c-format
msgid "%s: not a function"
msgstr "%s: nije funkcija"
@@ -712,11 +719,11 @@ msgstr "%s: nije funkcija"
msgid "shift count"
msgstr "broj pomaka"
-#: builtins/shopt.def:279
+#: builtins/shopt.def:264
msgid "cannot set and unset shell options simultaneously"
msgstr "ne mogu istovremeno postaviti i poništiti opcije ljuske"
-#: builtins/shopt.def:346
+#: builtins/shopt.def:329
#, c-format
msgid "%s: invalid shell option name"
msgstr "%s: neispravno ime opcije ljuske"
@@ -741,7 +748,7 @@ msgstr "ne mogu zaustaviti prijavnu ljusku"
#: builtins/type.def:234
#, c-format
msgid "%s is aliased to `%s'\n"
-msgstr ""
+msgstr "%s je drugo ime za „%s”\n"
#: builtins/type.def:255
#, c-format
@@ -758,7 +765,7 @@ msgstr "%s je funkcija\n"
msgid "%s is a shell builtin\n"
msgstr "%s je ugrađen u ljusku\n"
-#: builtins/type.def:317 builtins/type.def:393
+#: builtins/type.def:317 builtins/type.def:391
#, c-format
msgid "%s is %s\n"
msgstr "%s je %s\n"
@@ -768,26 +775,26 @@ msgstr "%s je %s\n"
msgid "%s is hashed (%s)\n"
msgstr "%s je raspršen (%s)\n"
-#: builtins/ulimit.def:379
+#: builtins/ulimit.def:376
#, c-format
msgid "%s: invalid limit argument"
msgstr "%s: neispravan argument ograničenja"
-#: builtins/ulimit.def:405
+#: builtins/ulimit.def:402
#, c-format
msgid "`%c': bad command"
msgstr "„%c”: neispravna naredba"
-#: builtins/ulimit.def:434
+#: builtins/ulimit.def:431
#, c-format
msgid "%s: cannot get limit: %s"
msgstr "%s: ne mogu otkriti ograničenje: %s"
-#: builtins/ulimit.def:460
+#: builtins/ulimit.def:457
msgid "limit"
msgstr "ograničenje"
-#: builtins/ulimit.def:472 builtins/ulimit.def:772
+#: builtins/ulimit.def:469 builtins/ulimit.def:769
#, c-format
msgid "%s: cannot modify limit: %s"
msgstr "%s: ne mogu urediti ograničenje: %s"
@@ -806,7 +813,7 @@ msgstr "„%c”: neispravan operator simboličkog načina"
msgid "`%c': invalid symbolic mode character"
msgstr "„%c”: neispravan znak simboličkog načina"
-#: error.c:90 error.c:325 error.c:327 error.c:329
+#: error.c:90 error.c:321 error.c:323 error.c:325
msgid " line "
msgstr " redak "
@@ -820,313 +827,298 @@ msgstr "posljednja naredba: %s\n"
msgid "Aborting..."
msgstr "Prekidam..."
-#: error.c:410
+#: error.c:406
msgid "unknown command error"
msgstr "nepoznata greška naredbe"
-#: error.c:411
+#: error.c:407
msgid "bad command type"
msgstr "neispravna vrsta naredbe"
-#: error.c:412
+#: error.c:408
msgid "bad connector"
-msgstr ""
+msgstr "neispravno spajanje"
-#: error.c:413
+#: error.c:409
msgid "bad jump"
msgstr "neispravan skok"
-#: error.c:451
+#: error.c:447
#, c-format
msgid "%s: unbound variable"
msgstr "%s: nepovezana varijabla"
-#: eval.c:189
+#: eval.c:181
#, c-format
msgid "\atimed out waiting for input: auto-logout\n"
msgstr "\avrijeme čekanja ulaza je isteklo: automatska-odjava\n"
-#: execute_cmd.c:512
+#: execute_cmd.c:504
#, c-format
msgid "cannot redirect standard input from /dev/null: %s"
msgstr "ne mogu preusmjeriti standardni ulaz iz /dev/null: %s"
-#: execute_cmd.c:1228
+#: execute_cmd.c:1168
#, c-format
msgid "TIMEFORMAT: `%c': invalid format character"
-msgstr ""
+msgstr "TIMEFORMAT: „%c”: neispravan znak oblika"
-#: execute_cmd.c:2282
+#: execute_cmd.c:2121
msgid "pipe error"
msgstr "greška cjevovoda"
-#: execute_cmd.c:4347
-#, c-format
-msgid "%s: maximum function nesting level exceeded (%d)"
-msgstr ""
-
-#: execute_cmd.c:4840
+#: execute_cmd.c:4640
#, c-format
msgid "%s: restricted: cannot specify `/' in command names"
msgstr "%s: ograničeno: ne možete navesti „/” u imenu naredbe"
-#: execute_cmd.c:4929
+#: execute_cmd.c:4735
#, c-format
msgid "%s: command not found"
msgstr "%s: naredba nije pronađena"
-#: execute_cmd.c:5160
+#: execute_cmd.c:4959
#, c-format
msgid "%s: %s"
msgstr "%s: %s"
-#: execute_cmd.c:5197
+#: execute_cmd.c:4995
#, c-format
msgid "%s: %s: bad interpreter"
msgstr "%s: %s: neispravan tumač"
-#: execute_cmd.c:5234
-#, fuzzy, c-format
-msgid "%s: cannot execute binary file: %s"
-msgstr "%s: ne mogu izvršiti binarnu datoteku"
-
-#: execute_cmd.c:5306
-#, fuzzy, c-format
-msgid "`%s': is a special builtin"
-msgstr "%s je ugrađen u ljusku\n"
-
-#: execute_cmd.c:5358
+#: execute_cmd.c:5144
#, c-format
msgid "cannot duplicate fd %d to fd %d"
msgstr "ne mogu udvostručiti opisnik datoteke %d u opisnik datoteke %d"
-#: expr.c:262
+#: expr.c:256
msgid "expression recursion level exceeded"
msgstr "razina rekurzije izraza je prekoračena"
-#: expr.c:286
+#: expr.c:280
msgid "recursion stack underflow"
msgstr "podljev stoga rekurzije"
-#: expr.c:434
+#: expr.c:422
msgid "syntax error in expression"
msgstr "sintaksna greška u izrazu"
-#: expr.c:478
+#: expr.c:463
msgid "attempted assignment to non-variable"
msgstr "pokušaj pridruživanja ne-varijabli"
-#: expr.c:498 expr.c:847
+#: expr.c:486 expr.c:491 expr.c:807
msgid "division by 0"
msgstr "dijeljenje s 0"
-#: expr.c:545
+#: expr.c:517
msgid "bug: bad expassign token"
msgstr "greška: neispravan simbol expassign"
-#: expr.c:598
+#: expr.c:564
msgid "`:' expected for conditional expression"
msgstr "očekujem „:” za uvjetni izraz"
-#: expr.c:904
+#: expr.c:832
msgid "exponent less than 0"
msgstr "eksponent je manji od 0"
-#: expr.c:957
+#: expr.c:887
msgid "identifier expected after pre-increment or pre-decrement"
-msgstr ""
+msgstr "očekujem identifikator nakon pred-povećanja ili pred-smanjenja"
-#: expr.c:983
+#: expr.c:910
msgid "missing `)'"
msgstr "nedostaje „)”"
-#: expr.c:1034 expr.c:1371
+#: expr.c:959 expr.c:1282
msgid "syntax error: operand expected"
msgstr "sintaksna greška: očekujem operand"
-#: expr.c:1373
+#: expr.c:1284
msgid "syntax error: invalid arithmetic operator"
msgstr "sintaksna greška: neispravan aritmetički operator"
-#: expr.c:1397
+#: expr.c:1308
#, c-format
msgid "%s%s%s: %s (error token is \"%s\")"
msgstr "%s%s%s: %s (simbol greške je „%s”)"
-#: expr.c:1455
+#: expr.c:1366
msgid "invalid arithmetic base"
msgstr "neispravna aritmetička baza"
-#: expr.c:1475
+#: expr.c:1386
msgid "value too great for base"
msgstr "vrijednost baze je prevelika"
-#: expr.c:1524
+#: expr.c:1435
#, c-format
msgid "%s: expression error\n"
msgstr "%s: greška izraza\n"
#: general.c:61
msgid "getcwd: cannot access parent directories"
-msgstr ""
+msgstr "getcwd: ne mogu pristupiti nadređenim direktorijima"
-#: input.c:101 subst.c:5067
+#: input.c:94 subst.c:5082
#, c-format
msgid "cannot reset nodelay mode for fd %d"
msgstr ""
-#: input.c:267
+#: input.c:260
#, c-format
msgid "cannot allocate new file descriptor for bash input from fd %d"
-msgstr ""
+msgstr "ne mogu alocirati novi datotečni opisnik za bash ulaz iz fd %d"
-#: input.c:275
+#: input.c:268
#, c-format
msgid "save_bash_input: buffer already exists for new fd %d"
-msgstr ""
+msgstr "save_bash_input: međuspremnik već postoji za novi fd %d"
-#: jobs.c:471
+#: jobs.c:468
msgid "start_pipeline: pgrp pipe"
-msgstr ""
+msgstr "start_pipeline: pgrp pipe"
-#: jobs.c:892
+#: jobs.c:889
#, c-format
msgid "forked pid %d appears in running job %d"
msgstr "razdvojen pid %d se javlja u pokrenutom zadatku %d"
-#: jobs.c:1010
+#: jobs.c:1007
#, c-format
msgid "deleting stopped job %d with process group %ld"
msgstr "uklanjam zaustavljeni zadatak %d s grupom procesa %ld"
-#: jobs.c:1115
+#: jobs.c:1112
#, c-format
msgid "add_process: process %5ld (%s) in the_pipeline"
msgstr "add_process: proces %5ld (%s) u the_pipeline"
-#: jobs.c:1118
+#: jobs.c:1115
#, c-format
msgid "add_process: pid %5ld (%s) marked as still alive"
msgstr "add_process: pid %5ld (%s) označen kao još živ"
-#: jobs.c:1433
+#: jobs.c:1430
#, c-format
msgid "describe_pid: %ld: no such pid"
msgstr "describe_pid: %ld: ne postoji takav pid"
-#: jobs.c:1448
+#: jobs.c:1445
#, c-format
msgid "Signal %d"
msgstr "Signal %d"
-#: jobs.c:1462 jobs.c:1487
+#: jobs.c:1459 jobs.c:1484
msgid "Done"
msgstr "Gotovo"
-#: jobs.c:1467 siglist.c:123
+#: jobs.c:1464 siglist.c:123
msgid "Stopped"
msgstr "Zaustavljen"
-#: jobs.c:1471
+#: jobs.c:1468
#, c-format
msgid "Stopped(%s)"
msgstr "Zaustavljen(%s)"
-#: jobs.c:1475
+#: jobs.c:1472
msgid "Running"
msgstr "Pokrenut"
-#: jobs.c:1489
+#: jobs.c:1486
#, c-format
msgid "Done(%d)"
msgstr "Gotovo(%d)"
-#: jobs.c:1491
+#: jobs.c:1488
#, c-format
msgid "Exit %d"
msgstr "Izlaz %d"
-#: jobs.c:1494
+#: jobs.c:1491
msgid "Unknown status"
msgstr "Nepoznato stanje"
-#: jobs.c:1581
+#: jobs.c:1578
#, c-format
msgid "(core dumped) "
msgstr "(jezgra izbačena) "
-#: jobs.c:1600
+#: jobs.c:1597
#, c-format
msgid " (wd: %s)"
msgstr " (wd: %s)"
-#: jobs.c:1817
+#: jobs.c:1805
#, c-format
msgid "child setpgid (%ld to %ld)"
msgstr ""
-#: jobs.c:2136 nojobs.c:605
+#: jobs.c:2133 nojobs.c:585
#, c-format
msgid "wait: pid %ld is not a child of this shell"
msgstr "wait: pid %ld nije dijete ove ljuske"
-#: jobs.c:2383
+#: jobs.c:2360
#, c-format
msgid "wait_for: No record of process %ld"
msgstr "wait_for: Ne postoji zapis o procesu %ld"
-#: jobs.c:2689
+#: jobs.c:2637
#, c-format
msgid "wait_for_job: job %d is stopped"
msgstr "wait_for_job: zadatak %d je zaustavljen"
-#: jobs.c:2981
+#: jobs.c:2859
#, c-format
msgid "%s: job has terminated"
msgstr "%s: zadatak je dovršen"
-#: jobs.c:2990
+#: jobs.c:2868
#, c-format
msgid "%s: job %d already in background"
msgstr "%s: zadatak %d je već u pozadini"
-#: jobs.c:3215
+#: jobs.c:3089
msgid "waitchld: turning on WNOHANG to avoid indefinite block"
msgstr ""
-#: jobs.c:3699
+#: jobs.c:3538
#, c-format
msgid "%s: line %d: "
msgstr "%s: redak %d: "
-#: jobs.c:3713 nojobs.c:843
+#: jobs.c:3552 nojobs.c:814
#, c-format
msgid " (core dumped)"
msgstr " (jezgra izbačena)"
-#: jobs.c:3725 jobs.c:3738
+#: jobs.c:3564 jobs.c:3577
#, c-format
msgid "(wd now: %s)\n"
msgstr "(sadašnji wd: %s)\n"
-#: jobs.c:3770
+#: jobs.c:3609
msgid "initialize_job_control: getpgrp failed"
msgstr "initialize_job_control: getpgrp nije uspio"
-#: jobs.c:3831
+#: jobs.c:3669
msgid "initialize_job_control: line discipline"
msgstr ""
-#: jobs.c:3841
+#: jobs.c:3679
msgid "initialize_job_control: setpgid"
msgstr "initialize_job_control: setpgid"
-#: jobs.c:3862 jobs.c:3871
+#: jobs.c:3707
#, c-format
msgid "cannot set terminal process group (%d)"
msgstr "ne mogu postaviti grupu procesa terminala (%d)"
-#: jobs.c:3876
+#: jobs.c:3712
msgid "no job control in this shell"
msgstr "nema kontrole zadataka u ovoj ljusci"
@@ -1146,54 +1138,54 @@ msgstr ""
msgid "unknown"
msgstr "nepoznato"
-#: lib/malloc/malloc.c:801
+#: lib/malloc/malloc.c:797
msgid "malloc: block on free list clobbered"
msgstr ""
-#: lib/malloc/malloc.c:878
+#: lib/malloc/malloc.c:874
msgid "free: called with already freed block argument"
msgstr "free: pozvan s argumentom već oslobođenog bloka"
-#: lib/malloc/malloc.c:881
+#: lib/malloc/malloc.c:877
msgid "free: called with unallocated block argument"
msgstr "free: pozvan s argumentom nealociranog bloka"
-#: lib/malloc/malloc.c:900
+#: lib/malloc/malloc.c:896
msgid "free: underflow detected; mh_nbytes out of range"
msgstr "free: otkriven podljev, mh_nbytes izvan granica"
-#: lib/malloc/malloc.c:906
+#: lib/malloc/malloc.c:902
msgid "free: start and end chunk sizes differ"
msgstr ""
-#: lib/malloc/malloc.c:1005
+#: lib/malloc/malloc.c:1001
msgid "realloc: called with unallocated block argument"
msgstr "realloc: pozvan s argumentom nealociranog bloka"
-#: lib/malloc/malloc.c:1020
+#: lib/malloc/malloc.c:1016
msgid "realloc: underflow detected; mh_nbytes out of range"
msgstr "realloc: otkriven podljev, mh_nbytes izvan granica"
-#: lib/malloc/malloc.c:1026
+#: lib/malloc/malloc.c:1022
msgid "realloc: start and end chunk sizes differ"
msgstr ""
-#: lib/malloc/table.c:194
+#: lib/malloc/table.c:177
#, c-format
msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
msgstr ""
-#: lib/malloc/table.c:203
+#: lib/malloc/table.c:184
#, c-format
msgid "register_alloc: %p already in table as allocated?\n"
msgstr ""
-#: lib/malloc/table.c:256
+#: lib/malloc/table.c:220
#, c-format
msgid "register_free: %p already in table as free?\n"
-msgstr ""
+msgstr "register_free: %p već u tablici kao oslobođen?\n"
-#: lib/sh/fmtulong.c:102
+#: lib/sh/fmtulong.c:101
msgid "invalid base"
msgstr "neispravna baza"
@@ -1216,35 +1208,35 @@ msgstr "%s: neispravno navedena mrežna putanja"
msgid "network operations not supported"
msgstr "mrežne operacije nisu podržane"
-#: locale.c:204
+#: locale.c:192
#, c-format
msgid "setlocale: LC_ALL: cannot change locale (%s)"
msgstr "setlocale: LC_ALL: ne mogu promijeniti lokal (%s)"
-#: locale.c:206
+#: locale.c:194
#, c-format
msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
msgstr "setlocale: LC_ALL: ne mogu promijeniti lokal (%s): %s"
-#: locale.c:263
+#: locale.c:247
#, c-format
msgid "setlocale: %s: cannot change locale (%s)"
msgstr "setlocale: %s: ne mogu promijeniti lokal (%s)"
-#: locale.c:265
+#: locale.c:249
#, c-format
msgid "setlocale: %s: cannot change locale (%s): %s"
msgstr "setlocale: %s: ne mogu promijeniti lokal (%s): %s"
-#: mailcheck.c:439
+#: mailcheck.c:433
msgid "You have mail in $_"
msgstr "Imate poštu u $_"
-#: mailcheck.c:464
+#: mailcheck.c:458
msgid "You have new mail in $_"
msgstr "Imate novu poštu u $_"
-#: mailcheck.c:480
+#: mailcheck.c:474
#, c-format
msgid "The mail in %s has been read\n"
msgstr "Pošta u %s je pročitana\n"
@@ -1262,118 +1254,118 @@ msgstr "sintaksna greška: neočekivana „;”"
msgid "syntax error: `((%s))'"
msgstr "sintaksna greška: „((%s))”"
-#: make_cmd.c:578
+#: make_cmd.c:575
#, c-format
msgid "make_here_document: bad instruction type %d"
msgstr "make_here_document: neispravna vrsta instrukcije %d"
-#: make_cmd.c:662
+#: make_cmd.c:659
#, c-format
msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
msgstr ""
-#: make_cmd.c:759
+#: make_cmd.c:756
#, c-format
msgid "make_redirection: redirection instruction `%d' out of range"
msgstr ""
-#: parse.y:3209 parse.y:3480
+#: parse.y:3173 parse.y:3444
#, c-format
msgid "unexpected EOF while looking for matching `%c'"
msgstr "neočekivani EOF pri traženju odgovarajućeg „%c”"
-#: parse.y:4086
+#: parse.y:4025
msgid "unexpected EOF while looking for `]]'"
msgstr "neočekivani EOF pri traženju „]]”"
-#: parse.y:4091
+#: parse.y:4030
#, c-format
msgid "syntax error in conditional expression: unexpected token `%s'"
msgstr "sintaksna greška u uvjetnom izrazu: neočekivani simbol „%s”"
-#: parse.y:4095
+#: parse.y:4034
msgid "syntax error in conditional expression"
msgstr "sintaksna greška u uvjetnom izrazu"
-#: parse.y:4173
+#: parse.y:4112
#, c-format
msgid "unexpected token `%s', expected `)'"
msgstr "neočekivani simbol „%s”, očekujem „)”"
-#: parse.y:4177
+#: parse.y:4116
msgid "expected `)'"
msgstr "očekujem „)”"
-#: parse.y:4205
+#: parse.y:4144
#, c-format
msgid "unexpected argument `%s' to conditional unary operator"
msgstr "neočekivani argument „%s” uvjetnom unarnom operatoru"
-#: parse.y:4209
+#: parse.y:4148
msgid "unexpected argument to conditional unary operator"
msgstr "neočekivani argument uvjetnom unarnom operatoru"
-#: parse.y:4255
+#: parse.y:4194
#, c-format
msgid "unexpected token `%s', conditional binary operator expected"
msgstr "neočekivani simbol „%s”, očekujem uvjetni binarni operator"
-#: parse.y:4259
+#: parse.y:4198
msgid "conditional binary operator expected"
msgstr "očekujem uvjetni binarni operator"
-#: parse.y:4281
+#: parse.y:4220
#, c-format
msgid "unexpected argument `%s' to conditional binary operator"
msgstr "neočekivani argument „%s” uvjetnom binarnom operatoru"
-#: parse.y:4285
+#: parse.y:4224
msgid "unexpected argument to conditional binary operator"
msgstr "neočekivani argument uvjetnom binarnom operatoru"
-#: parse.y:4296
+#: parse.y:4235
#, c-format
msgid "unexpected token `%c' in conditional command"
msgstr "neočekivani simbol „%c” u uvjetnoj naredbi"
-#: parse.y:4299
+#: parse.y:4238
#, c-format
msgid "unexpected token `%s' in conditional command"
msgstr "neočekivani simbol „%s” u uvjetnoj naredbi"
-#: parse.y:4303
+#: parse.y:4242
#, c-format
msgid "unexpected token %d in conditional command"
msgstr "neočekivani simbol %d u uvjetnoj naredbi"
-#: parse.y:5649
+#: parse.y:5566
#, c-format
msgid "syntax error near unexpected token `%s'"
msgstr "sintaksna greška kod neočekivanog simbola „%s”"
-#: parse.y:5667
+#: parse.y:5584
#, c-format
msgid "syntax error near `%s'"
msgstr "sintaksna greška kod „%s”"
-#: parse.y:5677
+#: parse.y:5594
msgid "syntax error: unexpected end of file"
msgstr "sintaksna greška: neočekivani kraj datoteke"
-#: parse.y:5677
+#: parse.y:5594
msgid "syntax error"
msgstr "sintaksna greška"
-#: parse.y:5739
+#: parse.y:5656
#, c-format
msgid "Use \"%s\" to leave the shell.\n"
msgstr "Koristite „%s” za napuštanje ljuske.\n"
-#: parse.y:5901
+#: parse.y:5818
msgid "unexpected EOF while looking for matching `)'"
msgstr "neočekivani EOF pri traženju odgovarajuće „)”"
-#: pcomplete.c:1093
+#: pcomplete.c:1030
#, c-format
msgid "completion: function `%s' not found"
msgstr "completion: funkcija „%s” nije pronađena"
@@ -1383,136 +1375,138 @@ msgstr "completion: funkcija „%s” nije pronađena"
msgid "progcomp_insert: %s: NULL COMPSPEC"
msgstr "progcomp_insert: %s: NULL COMPSPEC"
-#: print_cmd.c:300
+#: print_cmd.c:296
#, c-format
msgid "print_command: bad connector `%d'"
msgstr ""
-#: print_cmd.c:373
+#: print_cmd.c:368
#, c-format
msgid "xtrace_set: %d: invalid file descriptor"
msgstr "xtrace_set: %d: neispravan opisnik datoteke"
-#: print_cmd.c:378
+#: print_cmd.c:373
msgid "xtrace_set: NULL file pointer"
msgstr "xtrace_set: NULL pokazivač na datoteku"
-#: print_cmd.c:382
+#: print_cmd.c:377
#, c-format
msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
msgstr ""
-#: print_cmd.c:1518
+#: print_cmd.c:1478
#, c-format
msgid "cprintf: `%c': invalid format character"
msgstr ""
-#: redir.c:123 redir.c:170
+#: redir.c:122
msgid "file descriptor out of range"
msgstr "opisnik datoteke izvan granica"
-#: redir.c:177
+#: redir.c:178
#, c-format
msgid "%s: ambiguous redirect"
msgstr "%s: višeznačno preusmjeravanje"
-#: redir.c:181
+#: redir.c:182
#, c-format
msgid "%s: cannot overwrite existing file"
msgstr "%s: ne mogu pisati preko postojeće datoteke"
-#: redir.c:186
+#: redir.c:187
#, c-format
msgid "%s: restricted: cannot redirect output"
msgstr "%s: ograničeno: ne mogu preusmjeriti izlaz"
-#: redir.c:191
+#: redir.c:192
#, c-format
msgid "cannot create temp file for here-document: %s"
msgstr "ne mogu napraviti privremenu datoteku za here-document: %s"
-#: redir.c:195
+#: redir.c:196
#, c-format
msgid "%s: cannot assign fd to variable"
msgstr "%s: ne mogu pridružiti opisnik datoteke varijabli"
-#: redir.c:582
+#: redir.c:548
msgid "/dev/(tcp|udp)/host/port not supported without networking"
msgstr "/dev/(tcp|udp)/host/port nije podržan bez umrežavanja"
-#: redir.c:861 redir.c:971 redir.c:1032 redir.c:1194
+#: redir.c:818 redir.c:930 redir.c:993 redir.c:1136
msgid "redirection error: cannot duplicate fd"
msgstr "greška preusmjeravanja: ne mogu udvostručiti opisnik datoteke"
-#: shell.c:339
+#: shell.c:333
msgid "could not find /tmp, please create!"
msgstr "ne mogu pronaći /tmp, molim, napravite ga!"
-#: shell.c:343
+#: shell.c:337
msgid "/tmp must be a valid directory name"
msgstr "/tmp mora biti ispravno ime direktorija"
-#: shell.c:890
+#: shell.c:884
#, c-format
msgid "%c%c: invalid option"
msgstr "%c%c: neispravna opcija"
-#: shell.c:1682
+#: shell.c:1652
msgid "I have no name!"
msgstr "Nemam ime!"
-#: shell.c:1827
+#: shell.c:1795
#, c-format
msgid "GNU bash, version %s-(%s)\n"
msgstr "GNU bash, inačica %s-(%s)\n"
-#: shell.c:1828
+#: shell.c:1796
#, c-format
msgid ""
"Usage:\t%s [GNU long option] [option] ...\n"
"\t%s [GNU long option] [option] script-file ...\n"
msgstr ""
+"Uporaba: %s [GNU dugačka opcija] [opcija] ...\n"
+"\t %s [GNU dugačka opcija] [opcija] skripta ...\n"
-#: shell.c:1830
+#: shell.c:1798
msgid "GNU long options:\n"
-msgstr ""
+msgstr "GNU dugačke opcije:\n"
-#: shell.c:1834
+#: shell.c:1802
msgid "Shell options:\n"
-msgstr ""
+msgstr "Opcije ljuske:\n"
-#: shell.c:1835
-msgid "\t-ilrsD or -c command or -O shopt_option\t\t(invocation only)\n"
+#: shell.c:1803
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
msgstr ""
-#: shell.c:1850
+#: shell.c:1818
#, c-format
msgid "\t-%s or -o option\n"
msgstr ""
-#: shell.c:1856
+#: shell.c:1824
#, c-format
msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
msgstr ""
-#: shell.c:1857
+#: shell.c:1825
#, c-format
msgid "Type `%s -c help' for more information about shell builtin commands.\n"
msgstr ""
-#: shell.c:1858
+#: shell.c:1826
#, c-format
msgid "Use the `bashbug' command to report bugs.\n"
-msgstr ""
+msgstr "Koristite naredbu „bashbug” za prijavljivanje grešaka.\n"
-#: sig.c:679
+#: sig.c:638
#, c-format
msgid "sigprocmask: %d: invalid operation"
msgstr ""
#: siglist.c:48
msgid "Bogus signal"
-msgstr ""
+msgstr "Lažan signal"
#: siglist.c:51
msgid "Hangup"
@@ -1532,11 +1526,11 @@ msgstr "Nedozvoljena instrukcija"
#: siglist.c:67
msgid "BPT trace/trap"
-msgstr ""
+msgstr "BPT praćenje/zamka"
#: siglist.c:75
msgid "ABORT instruction"
-msgstr ""
+msgstr "ABORT instrukcija"
#: siglist.c:79
msgid "EMT instruction"
@@ -1560,7 +1554,7 @@ msgstr "Segmentacijska greška"
#: siglist.c:99
msgid "Bad system call"
-msgstr "Neispravan sustavski poziv"
+msgstr "Neispravan poziv sustava"
#: siglist.c:103
msgid "Broken pipe"
@@ -1572,7 +1566,7 @@ msgstr "Budilica"
#: siglist.c:111
msgid "Terminated"
-msgstr "Dovršen"
+msgstr "Završen"
#: siglist.c:115
msgid "Urgent IO condition"
@@ -1588,7 +1582,7 @@ msgstr "Nastavi"
#: siglist.c:135
msgid "Child death or stop"
-msgstr ""
+msgstr "Dijete je umrlo ili zaustavljeno"
#: siglist.c:139
msgid "Stopped (tty input)"
@@ -1612,7 +1606,7 @@ msgstr "Ograničenje datoteke"
#: siglist.c:159
msgid "Alarm (virtual)"
-msgstr ""
+msgstr "Budilica (virtualna)"
#: siglist.c:163
msgid "Alarm (profile)"
@@ -1679,238 +1673,224 @@ msgstr "Nepoznat signal #"
msgid "Unknown Signal #%d"
msgstr "Nepoznat signal #%d"
-#: subst.c:1352 subst.c:1510
+#: subst.c:1333 subst.c:1502
#, c-format
msgid "bad substitution: no closing `%s' in %s"
msgstr "neispravna zamjena: nema zatvorene „%s” u %s"
-#: subst.c:2823
+#: subst.c:2795
#, c-format
msgid "%s: cannot assign list to array member"
msgstr "%s: ne mogu pridružiti popis elementu polja"
-#: subst.c:4964 subst.c:4980
+#: subst.c:4979 subst.c:4995
msgid "cannot make pipe for process substitution"
msgstr "ne mogu napraviti cjevovod za zamjenu procesa"
-#: subst.c:5012
+#: subst.c:5027
msgid "cannot make child for process substitution"
msgstr "ne mogu napraviti dijete za zamjenu procesa"
-#: subst.c:5057
+#: subst.c:5072
#, c-format
msgid "cannot open named pipe %s for reading"
msgstr "ne mogu otvoriti imenovani cjevovod %s za čitanje"
-#: subst.c:5059
+#: subst.c:5074
#, c-format
msgid "cannot open named pipe %s for writing"
msgstr "ne mogu otvoriti imenovani cjevovod %s za pisanje"
-#: subst.c:5077
+#: subst.c:5092
#, c-format
msgid "cannot duplicate named pipe %s as fd %d"
msgstr "ne mogu udvostručiti imenovani cjevovod %s kao opisnik datoteke %d"
-#: subst.c:5273
+#: subst.c:5284
msgid "cannot make pipe for command substitution"
msgstr "ne mogu napraviti cjevovod za zamjenu naredbi"
-#: subst.c:5311
+#: subst.c:5322
msgid "cannot make child for command substitution"
msgstr "ne mogu napraviti dijete za zamjenu naredbi"
-#: subst.c:5330
+#: subst.c:5339
msgid "command_substitute: cannot duplicate pipe as fd 1"
-msgstr ""
-"command_substitute: ne mogu udvostručiti cjevovod kao opisnik datoteke 1"
-
-#: subst.c:5733 subst.c:7900
-#, c-format
-msgid "%s: invalid variable name for name reference"
-msgstr ""
+msgstr "command_substitute: ne mogu udvostručiti cjevovod kao opisnik datoteke 1"
-#: subst.c:5926
+#: subst.c:5859
#, c-format
msgid "%s: parameter null or not set"
msgstr "%s: parametar prazan ili nije postavljen"
-#: subst.c:6198 subst.c:6213
+#: subst.c:6125 subst.c:6140
#, c-format
msgid "%s: substring expression < 0"
-msgstr ""
+msgstr "%s: izraz podniza < 0"
-#: subst.c:7356
+#: subst.c:7271
#, c-format
msgid "%s: bad substitution"
msgstr "%s: neispravna zamjena"
-#: subst.c:7433
+#: subst.c:7347
#, c-format
msgid "$%s: cannot assign in this way"
msgstr "$%s: ne mogu pridružiti na ovaj način"
-#: subst.c:7767
-msgid ""
-"future versions of the shell will force evaluation as an arithmetic "
-"substitution"
+#: subst.c:7684
+msgid "future versions of the shell will force evaluation as an arithmetic substitution"
msgstr "buduće inačice ljuske će prisiliti procjenu kao aritmetičku zamjenu"
-#: subst.c:8271
+#: subst.c:8149
#, c-format
msgid "bad substitution: no closing \"`\" in %s"
msgstr "neispravna zamjena: nema zatvorenog „`” u %s"
-#: subst.c:9172
+#: subst.c:9036
#, c-format
msgid "no match: %s"
msgstr "nema podudaranja: %s"
-#: test.c:147
+#: test.c:146
msgid "argument expected"
msgstr "očekujem argument"
-#: test.c:156
+#: test.c:155
#, c-format
msgid "%s: integer expression expected"
msgstr "%s: očekujem cjelobrojni izraz"
-#: test.c:264
+#: test.c:263
msgid "`)' expected"
msgstr "očekujem „)”"
-#: test.c:266
+#: test.c:265
#, c-format
msgid "`)' expected, found %s"
msgstr "očekujem „)”, našao %s"
-#: test.c:281 test.c:721 test.c:724
+#: test.c:280 test.c:698 test.c:701
#, c-format
msgid "%s: unary operator expected"
msgstr "%s: očekujem unarni operator"
-#: test.c:468 test.c:764
+#: test.c:449 test.c:741
#, c-format
msgid "%s: binary operator expected"
msgstr "%s: očekujem binarni operator"
-#: test.c:839
+#: test.c:816
msgid "missing `]'"
msgstr "nedostaje „]”"
-#: trap.c:217
+#: trap.c:207
msgid "invalid signal number"
msgstr "neispravan broj signala"
-#: trap.c:348
+#: trap.c:337
#, c-format
msgid "run_pending_traps: bad value in trap_list[%d]: %p"
msgstr ""
-#: trap.c:352
+#: trap.c:341
#, c-format
-msgid ""
-"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
msgstr ""
-#: trap.c:398
+#: trap.c:393
#, c-format
msgid "trap_handler: bad signal %d"
msgstr "trap_handler: neispravan signal %d"
-#: variables.c:380
+#: variables.c:363
#, c-format
msgid "error importing function definition for `%s'"
msgstr "greška pri uvozu definicije funkcije za „%s”"
-#: variables.c:778
+#: variables.c:755
#, c-format
msgid "shell level (%d) too high, resetting to 1"
msgstr "razina ljuske (%d) je previsoka, vraćam na 1"
-#: variables.c:2198
+#: variables.c:1932
msgid "make_local_variable: no function context at current scope"
msgstr ""
-#: variables.c:2217
-#, fuzzy, c-format
-msgid "%s: variable may not be assigned value"
-msgstr "%s: ne mogu pridružiti opisnik datoteke varijabli"
-
-#: variables.c:3554
+#: variables.c:3182
msgid "all_local_variables: no function context at current scope"
msgstr ""
-#: variables.c:3799
+#: variables.c:3427
#, c-format
msgid "%s has null exportstr"
-msgstr ""
+msgstr "%s ima prazan exportstr"
-#: variables.c:3804 variables.c:3813
+#: variables.c:3432 variables.c:3441
#, c-format
msgid "invalid character %d in exportstr for %s"
msgstr ""
-#: variables.c:3819
+#: variables.c:3447
#, c-format
msgid "no `=' in exportstr for %s"
msgstr ""
-#: variables.c:4252
+#: variables.c:3891
msgid "pop_var_context: head of shell_variables not a function context"
msgstr ""
-#: variables.c:4265
+#: variables.c:3904
msgid "pop_var_context: no global_variables context"
msgstr ""
-#: variables.c:4339
+#: variables.c:3978
msgid "pop_scope: head of shell_variables not a temporary environment scope"
msgstr ""
-#: variables.c:5165
+#: variables.c:4786
#, c-format
msgid "%s: %s: cannot open as FILE"
msgstr "%s: %s: ne mogu otvoriti kao DATOTEKU"
-#: variables.c:5170
+#: variables.c:4791
#, c-format
msgid "%s: %s: invalid value for trace file descriptor"
msgstr ""
-#: variables.c:5215
-#, fuzzy, c-format
-msgid "%s: %s: compatibility value out of range"
-msgstr "%s: %s je izvan granica"
+#: version.c:46
+msgid "Copyright (C) 2011 Free Software Foundation, Inc."
+msgstr "Copyright © 2011 Free Software Foundation, Inc."
-#: version.c:46 version2.c:46
-#, fuzzy
-msgid "Copyright (C) 2012 Free Software Foundation, Inc."
-msgstr "Copyright (C) 2011 Free Software Foundation, Inc."
+#: version.c:47
+msgid "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
+msgstr "Licenca GPLv3+: GNU GPL inačica 3 ili novija <http://gnu.org/licenses/gpl.html>\n"
-#: version.c:47 version2.c:47
-msgid ""
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
-"html>\n"
-msgstr ""
-"Licenca GPLv3+: GNU GPL inačica 3 ili novija <http://gnu.org/licenses/gpl."
-"html>\n"
-
-#: version.c:86 version2.c:86
+#: version.c:86 version2.c:83
#, c-format
msgid "GNU bash, version %s (%s)\n"
msgstr "GNU bash, inačica %s (%s)\n"
-#: version.c:91 version2.c:91
-#, fuzzy
-msgid "This is free software; you are free to change and redistribute it."
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
msgstr "Ovo je slobodan softver, slobodno ga smijete mijenjati i dijeliti.\n"
-#: version.c:92 version2.c:92
-#, fuzzy
-msgid "There is NO WARRANTY, to the extent permitted by law."
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
msgstr "NEMA JAMSTAVA, do krajnje mjere dozvoljene zakonom.\n"
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright © 2009 Free Software Foundation, Inc.\n"
+
+#: version2.c:87
+#, c-format
+msgid "License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n"
+msgstr "Licenca GPLv2+: GNU GPL inačica 2 ili novija <http://gnu.org/licenses/gpl.html>\n"
+
#: xmalloc.c:91
#, c-format
msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
@@ -1940,9 +1920,7 @@ msgid "unalias [-a] name [name ...]"
msgstr "unalias [-a] ime [ime ...]"
#: builtins.c:51
-msgid ""
-"bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
-"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgid "bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]"
msgstr ""
#: builtins.c:54
@@ -1986,9 +1964,8 @@ msgid "command [-pVv] command [arg ...]"
msgstr ""
#: builtins.c:76
-#, fuzzy
-msgid "declare [-aAfFgilnrtux] [-p] [name[=value] ...]"
-msgstr "alias [-p] [ime[=vrijednost] ... ]"
+msgid "declare [-aAfFgilrtux] [-p] [name[=value] ...]"
+msgstr ""
#: builtins.c:78
msgid "typeset [-aAfFgilrtux] [-p] name[=value] ..."
@@ -2051,9 +2028,7 @@ msgid "help [-dms] [pattern ...]"
msgstr ""
#: builtins.c:121
-msgid ""
-"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
-"[arg...]"
+msgid "history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]"
msgstr ""
#: builtins.c:125
@@ -2065,9 +2040,7 @@ msgid "disown [-h] [-ar] [jobspec ...]"
msgstr ""
#: builtins.c:132
-msgid ""
-"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
-"[sigspec]"
+msgid "kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]"
msgstr ""
#: builtins.c:134
@@ -2075,9 +2048,7 @@ msgid "let arg [arg ...]"
msgstr ""
#: builtins.c:136
-msgid ""
-"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
-"prompt] [-t timeout] [-u fd] [name ...]"
+msgid "read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]"
msgstr ""
#: builtins.c:138
@@ -2089,9 +2060,8 @@ msgid "set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]"
msgstr ""
#: builtins.c:142
-#, fuzzy
-msgid "unset [-f] [-v] [-n] [name ...]"
-msgstr "unalias [-a] ime [ime ...]"
+msgid "unset [-f] [-v] [name ...]"
+msgstr ""
#: builtins.c:144
msgid "export [-fn] [name[=value] ...] or export -p"
@@ -2138,7 +2108,7 @@ msgid "type [-afptP] name [name ...]"
msgstr ""
#: builtins.c:169
-msgid "ulimit [-SHabcdefilmnpqrstuvxT] [limit]"
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
msgstr ""
#: builtins.c:172
@@ -2146,11 +2116,11 @@ msgid "umask [-p] [-S] [mode]"
msgstr ""
#: builtins.c:175
-msgid "wait [-n] [id ...]"
+msgid "wait [id]"
msgstr ""
#: builtins.c:179
-msgid "wait [pid ...]"
+msgid "wait [pid]"
msgstr ""
#: builtins.c:182
@@ -2174,9 +2144,7 @@ msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
msgstr ""
#: builtins.c:192
-msgid ""
-"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
-"COMMANDS; ] fi"
+msgid "if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi"
msgstr ""
#: builtins.c:194
@@ -2236,16 +2204,11 @@ msgid "printf [-v var] format [arguments]"
msgstr ""
#: builtins.c:229
-msgid ""
-"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
-"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
-"suffix] [name ...]"
+msgid "complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]"
msgstr ""
#: builtins.c:233
-msgid ""
-"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
-"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgid "compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
msgstr ""
#: builtins.c:237
@@ -2253,15 +2216,11 @@ msgid "compopt [-o|+o option] [-DE] [name ...]"
msgstr ""
#: builtins.c:240
-msgid ""
-"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
-"quantum] [array]"
+msgid "mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]"
msgstr ""
#: builtins.c:242
-msgid ""
-"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
-"quantum] [array]"
+msgid "readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]"
msgstr ""
#: builtins.c:254
@@ -2279,8 +2238,7 @@ msgid ""
" -p\tPrint all defined aliases in a reusable format\n"
" \n"
" Exit Status:\n"
-" alias returns true unless a NAME is supplied for which no alias has "
-"been\n"
+" alias returns true unless a NAME is supplied for which no alias has been\n"
" defined."
msgstr ""
@@ -2306,36 +2264,30 @@ msgid ""
" Options:\n"
" -m keymap Use KEYMAP as the keymap for the duration of this\n"
" command. Acceptable keymap names are emacs,\n"
-" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
-"move,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,\n"
" vi-command, and vi-insert.\n"
" -l List names of functions.\n"
" -P List function names and bindings.\n"
" -p List functions and bindings in a form that can be\n"
" reused as input.\n"
-" -S List key sequences that invoke macros and their "
-"values\n"
-" -s List key sequences that invoke macros and their "
-"values\n"
+" -S List key sequences that invoke macros and their values\n"
+" -s List key sequences that invoke macros and their values\n"
" in a form that can be reused as input.\n"
" -V List variable names and values\n"
" -v List variable names and values in a form that can\n"
" be reused as input.\n"
" -q function-name Query about which keys invoke the named function.\n"
-" -u function-name Unbind all keys which are bound to the named "
-"function.\n"
+" -u function-name Unbind all keys which are bound to the named function.\n"
" -r keyseq Remove the binding for KEYSEQ.\n"
" -f filename Read key bindings from FILENAME.\n"
" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
" \t\t\t\tKEYSEQ is entered.\n"
-" -X\t\t List key sequences bound with -x and associated commands\n"
-" in a form that can be reused as input.\n"
" \n"
" Exit Status:\n"
" bind returns 0 unless an unrecognized option is given or an error occurs."
msgstr ""
-#: builtins.c:328
+#: builtins.c:326
msgid ""
"Exit for, while, or until loops.\n"
" \n"
@@ -2346,7 +2298,7 @@ msgid ""
" The exit status is 0 unless N is not greater than or equal to 1."
msgstr ""
-#: builtins.c:340
+#: builtins.c:338
msgid ""
"Resume for, while, or until loops.\n"
" \n"
@@ -2357,21 +2309,20 @@ msgid ""
" The exit status is 0 unless N is not greater than or equal to 1."
msgstr ""
-#: builtins.c:352
+#: builtins.c:350
msgid ""
"Execute shell builtins.\n"
" \n"
" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
" lookup. This is useful when you wish to reimplement a shell builtin\n"
-" as a shell function, but need to execute the builtin within the "
-"function.\n"
+" as a shell function, but need to execute the builtin within the function.\n"
" \n"
" Exit Status:\n"
" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
" not a shell builtin.."
msgstr ""
-#: builtins.c:367
+#: builtins.c:365
msgid ""
"Return the context of the current subroutine call.\n"
" \n"
@@ -2387,49 +2338,37 @@ msgid ""
" is invalid."
msgstr ""
-#: builtins.c:385
+#: builtins.c:383
msgid ""
"Change the shell working directory.\n"
" \n"
-" Change the current directory to DIR. The default DIR is the value of "
-"the\n"
+" Change the current directory to DIR. The default DIR is the value of the\n"
" HOME shell variable.\n"
" \n"
-" The variable CDPATH defines the search path for the directory "
-"containing\n"
-" DIR. Alternative directory names in CDPATH are separated by a colon "
-"(:).\n"
-" A null directory name is the same as the current directory. If DIR "
-"begins\n"
+" The variable CDPATH defines the search path for the directory containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon (:).\n"
+" A null directory name is the same as the current directory. If DIR begins\n"
" with a slash (/), then CDPATH is not used.\n"
" \n"
-" If the directory is not found, and the shell option `cdable_vars' is "
-"set,\n"
-" the word is assumed to be a variable name. If that variable has a "
-"value,\n"
+" If the directory is not found, and the shell option `cdable_vars' is set,\n"
+" the word is assumed to be a variable name. If that variable has a value,\n"
" its value is used for DIR.\n"
" \n"
" Options:\n"
-" -L\tforce symbolic links to be followed: resolve symbolic links in\n"
-" \tDIR after processing instances of `..'\n"
+" -L\tforce symbolic links to be followed\n"
" -P\tuse the physical directory structure without following symbolic\n"
-" \tlinks: resolve symbolic links in DIR before processing instances\n"
-" \tof `..'\n"
+" \tlinks\n"
" -e\tif the -P option is supplied, and the current working directory\n"
" \tcannot be determined successfully, exit with a non-zero status\n"
" \n"
" The default is to follow symbolic links, as if `-L' were specified.\n"
-" `..' is processed by removing the immediately previous pathname "
-"component\n"
-" back to a slash or the beginning of DIR.\n"
" \n"
" Exit Status:\n"
-" Returns 0 if the directory is changed, and if $PWD is set successfully "
-"when\n"
+" Returns 0 if the directory is changed, and if $PWD is set successfully when\n"
" -P is used; non-zero otherwise."
msgstr ""
-#: builtins.c:420
+#: builtins.c:414
msgid ""
"Print the name of the current working directory.\n"
" \n"
@@ -2445,7 +2384,7 @@ msgid ""
" cannot be read."
msgstr ""
-#: builtins.c:437
+#: builtins.c:431
msgid ""
"Null command.\n"
" \n"
@@ -2461,7 +2400,7 @@ msgstr ""
" Izlazno stanje:\n"
" Uvijek uspješno."
-#: builtins.c:448
+#: builtins.c:442
msgid ""
"Return a successful result.\n"
" \n"
@@ -2473,7 +2412,7 @@ msgstr ""
" Izlazno stanje:\n"
" Uvijek uspješno."
-#: builtins.c:457
+#: builtins.c:451
msgid ""
"Return an unsuccessful result.\n"
" \n"
@@ -2485,13 +2424,12 @@ msgstr ""
" Izlazno stanje:\n"
" Uvijek neuspješno."
-#: builtins.c:466
+#: builtins.c:460
msgid ""
"Execute a simple command or display information about commands.\n"
" \n"
" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
-" information about the specified COMMANDs. Can be used to invoke "
-"commands\n"
+" information about the specified COMMANDs. Can be used to invoke commands\n"
" on disk when a function with the same name exists.\n"
" \n"
" Options:\n"
@@ -2504,7 +2442,7 @@ msgid ""
" Returns exit status of COMMAND, or failure if COMMAND is not found."
msgstr ""
-#: builtins.c:485
+#: builtins.c:479
msgid ""
"Set variable values and attributes.\n"
" \n"
@@ -2524,7 +2462,6 @@ msgid ""
" -A\tto make NAMEs associative arrays (if supported)\n"
" -i\tto make NAMEs have the `integer' attribute\n"
" -l\tto convert NAMEs to lower case on assignment\n"
-" -n\tmake NAME a reference to the variable named by its value\n"
" -r\tto make NAMEs readonly\n"
" -t\tto make NAMEs have the `trace' attribute\n"
" -u\tto convert NAMEs to upper case on assignment\n"
@@ -2535,16 +2472,14 @@ msgid ""
" Variables with the integer attribute have arithmetic evaluation (see\n"
" the `let' command) performed when the variable is assigned a value.\n"
" \n"
-" When used in a function, `declare' makes NAMEs local, as with the "
-"`local'\n"
+" When used in a function, `declare' makes NAMEs local, as with the `local'\n"
" command. The `-g' option suppresses this behavior.\n"
" \n"
" Exit Status:\n"
-" Returns success unless an invalid option is supplied or a variable\n"
-" assignment error occurs."
+" Returns success unless an invalid option is supplied or an error occurs."
msgstr ""
-#: builtins.c:525
+#: builtins.c:517
msgid ""
"Set variable values and attributes.\n"
" \n"
@@ -2554,7 +2489,7 @@ msgstr ""
" \n"
" Zastarjelo. Pogledajte „help declare”."
-#: builtins.c:533
+#: builtins.c:525
msgid ""
"Define local variables.\n"
" \n"
@@ -2565,17 +2500,15 @@ msgid ""
" only to the function where they are defined and its children.\n"
" \n"
" Exit Status:\n"
-" Returns success unless an invalid option is supplied, a variable\n"
-" assignment error occurs, or the shell is not executing a function."
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
msgstr ""
-#: builtins.c:550
+#: builtins.c:542
msgid ""
"Write arguments to the standard output.\n"
" \n"
-" Display the ARGs, separated by a single space character and followed by "
-"a\n"
-" newline, on the standard output.\n"
+" Display the ARGs on the standard output followed by a newline.\n"
" \n"
" Options:\n"
" -n\tdo not append a newline\n"
@@ -2587,7 +2520,6 @@ msgid ""
" \\b\tbackspace\n"
" \\c\tsuppress further output\n"
" \\e\tescape character\n"
-" \\E\tescape character\n"
" \\f\tform feed\n"
" \\n\tnew line\n"
" \\r\tcarriage return\n"
@@ -2603,7 +2535,7 @@ msgid ""
" Returns success unless a write error occurs."
msgstr ""
-#: builtins.c:586
+#: builtins.c:576
msgid ""
"Write arguments to the standard output.\n"
" \n"
@@ -2616,7 +2548,7 @@ msgid ""
" Returns success unless a write error occurs."
msgstr ""
-#: builtins.c:601
+#: builtins.c:591
msgid ""
"Enable and disable shell builtins.\n"
" \n"
@@ -2643,19 +2575,18 @@ msgid ""
" Returns success unless NAME is not a shell builtin or an error occurs."
msgstr ""
-#: builtins.c:629
+#: builtins.c:619
msgid ""
"Execute arguments as a shell command.\n"
" \n"
-" Combine ARGs into a single string, use the result as input to the "
-"shell,\n"
+" Combine ARGs into a single string, use the result as input to the shell,\n"
" and execute the resulting commands.\n"
" \n"
" Exit Status:\n"
" Returns exit status of command or success if command is null."
msgstr ""
-#: builtins.c:641
+#: builtins.c:631
msgid ""
"Parse option arguments.\n"
" \n"
@@ -2696,13 +2627,12 @@ msgid ""
" encountered or an error occurs."
msgstr ""
-#: builtins.c:683
+#: builtins.c:673
msgid ""
"Replace the shell with the given command.\n"
" \n"
" Execute COMMAND, replacing this shell with the specified program.\n"
-" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
-"specified,\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not specified,\n"
" any redirections take effect in the current shell.\n"
" \n"
" Options:\n"
@@ -2710,16 +2640,14 @@ msgid ""
" -c\t\texecute COMMAND with an empty environment\n"
" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
" \n"
-" If the command cannot be executed, a non-interactive shell exits, "
-"unless\n"
+" If the command cannot be executed, a non-interactive shell exits, unless\n"
" the shell option `execfail' is set.\n"
" \n"
" Exit Status:\n"
-" Returns success unless COMMAND is not found or a redirection error "
-"occurs."
+" Returns success unless COMMAND is not found or a redirection error occurs."
msgstr ""
-#: builtins.c:704
+#: builtins.c:694
msgid ""
"Exit the shell.\n"
" \n"
@@ -2731,12 +2659,11 @@ msgstr ""
" Izlazi iz ljuske sa stanjem N. Ako N nije naveden, izlazno stanje je\n"
" isto kao i stanje zadnje izvršene naredbe."
-#: builtins.c:713
+#: builtins.c:703
msgid ""
"Exit a login shell.\n"
" \n"
-" Exits a login shell with exit status N. Returns an error if not "
-"executed\n"
+" Exits a login shell with exit status N. Returns an error if not executed\n"
" in a login shell."
msgstr ""
"Izađi iz prijavne ljuske.\n"
@@ -2744,19 +2671,17 @@ msgstr ""
" Izlazi iz prijavne ljuske s izlaznim stanjem N. Vraća grešku ako nije\n"
" izvršeno u prijavnoj ljusci."
-#: builtins.c:723
+#: builtins.c:713
msgid ""
"Display or execute commands from the history list.\n"
" \n"
-" fc is used to list or edit and re-execute commands from the history "
-"list.\n"
+" fc is used to list or edit and re-execute commands from the history list.\n"
" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
" string, which means the most recent command beginning with that\n"
" string.\n"
" \n"
" Options:\n"
-" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
-"EDITOR,\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then EDITOR,\n"
" \t\tthen vi\n"
" -l \tlist lines instead of editing\n"
" -n\tomit line numbers when listing\n"
@@ -2770,11 +2695,10 @@ msgid ""
" the last command.\n"
" \n"
" Exit Status:\n"
-" Returns success or status of executed command; non-zero if an error "
-"occurs."
+" Returns success or status of executed command; non-zero if an error occurs."
msgstr ""
-#: builtins.c:753
+#: builtins.c:743
msgid ""
"Move job to the foreground.\n"
" \n"
@@ -2786,27 +2710,24 @@ msgid ""
" Status of command placed in foreground, or failure if an error occurs."
msgstr ""
-#: builtins.c:768
+#: builtins.c:758
msgid ""
"Move jobs to the background.\n"
" \n"
-" Place the jobs identified by each JOB_SPEC in the background, as if "
-"they\n"
-" had been started with `&'. If JOB_SPEC is not present, the shell's "
-"notion\n"
+" Place the jobs identified by each JOB_SPEC in the background, as if they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's notion\n"
" of the current job is used.\n"
" \n"
" Exit Status:\n"
" Returns success unless job control is not enabled or an error occurs."
msgstr ""
-#: builtins.c:782
+#: builtins.c:772
msgid ""
"Remember or display program locations.\n"
" \n"
" Determine and remember the full pathname of each command NAME. If\n"
-" no arguments are given, information about remembered commands is "
-"displayed.\n"
+" no arguments are given, information about remembered commands is displayed.\n"
" \n"
" Options:\n"
" -d\t\tforget the remembered location of each NAME\n"
@@ -2824,7 +2745,7 @@ msgid ""
" Returns success unless NAME is not found or an invalid option is given."
msgstr ""
-#: builtins.c:807
+#: builtins.c:797
msgid ""
"Display information about builtin commands.\n"
" \n"
@@ -2842,11 +2763,10 @@ msgid ""
" PATTERN\tPattern specifiying a help topic\n"
" \n"
" Exit Status:\n"
-" Returns success unless PATTERN is not found or an invalid option is "
-"given."
+" Returns success unless PATTERN is not found or an invalid option is given."
msgstr ""
-#: builtins.c:831
+#: builtins.c:821
msgid ""
"Display or manipulate the history list.\n"
" \n"
@@ -2873,14 +2793,13 @@ msgid ""
" \n"
" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
" as a format string for strftime(3) to print the time stamp associated\n"
-" with each displayed history entry. No time stamps are printed "
-"otherwise.\n"
+" with each displayed history entry. No time stamps are printed otherwise.\n"
" \n"
" Exit Status:\n"
" Returns success unless an invalid option is given or an error occurs."
msgstr ""
-#: builtins.c:867
+#: builtins.c:857
msgid ""
"Display status of jobs.\n"
" \n"
@@ -2904,7 +2823,7 @@ msgid ""
" If -x is used, returns the exit status of COMMAND."
msgstr ""
-#: builtins.c:894
+#: builtins.c:884
msgid ""
"Remove jobs from current shell.\n"
" \n"
@@ -2921,7 +2840,7 @@ msgid ""
" Returns success unless an invalid option or JOBSPEC is given."
msgstr ""
-#: builtins.c:913
+#: builtins.c:903
msgid ""
"Send a signal to a job.\n"
" \n"
@@ -2943,15 +2862,14 @@ msgid ""
" Returns success unless an invalid option is given or an error occurs."
msgstr ""
-#: builtins.c:936
+#: builtins.c:926
msgid ""
"Evaluate arithmetic expressions.\n"
" \n"
" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
" fixed-width integers with no check for overflow, though division by 0\n"
" is trapped and flagged as an error. The following list of operators is\n"
-" grouped into levels of equal-precedence operators. The levels are "
-"listed\n"
+" grouped into levels of equal-precedence operators. The levels are listed\n"
" in order of decreasing precedence.\n"
" \n"
" \tid++, id--\tvariable post-increment, post-decrement\n"
@@ -2988,21 +2906,18 @@ msgid ""
" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise."
msgstr ""
-#: builtins.c:981
+#: builtins.c:971
msgid ""
"Read a line from the standard input and split it into fields.\n"
" \n"
" Reads a single line from the standard input, or from file descriptor FD\n"
-" if the -u option is supplied. The line is split into fields as with "
-"word\n"
+" if the -u option is supplied. The line is split into fields as with word\n"
" splitting, and the first word is assigned to the first NAME, the second\n"
" word to the second NAME, and so on, with any leftover words assigned to\n"
-" the last NAME. Only the characters found in $IFS are recognized as "
-"word\n"
+" the last NAME. Only the characters found in $IFS are recognized as word\n"
" delimiters.\n"
" \n"
-" If no NAMEs are supplied, the line read is stored in the REPLY "
-"variable.\n"
+" If no NAMEs are supplied, the line read is stored in the REPLY variable.\n"
" \n"
" Options:\n"
" -a array\tassign the words read to sequential indices of the array\n"
@@ -3014,32 +2929,26 @@ msgid ""
" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
" \t\tcharacters are read before the delimiter\n"
-" -N nchars\treturn only after reading exactly NCHARS characters, "
-"unless\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, unless\n"
" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
" -p prompt\toutput the string PROMPT without a trailing newline before\n"
" \t\tattempting to read\n"
" -r\t\tdo not allow backslashes to escape any characters\n"
" -s\t\tdo not echo input coming from a terminal\n"
-" -t timeout\ttime out and return failure if a complete line of input "
-"is\n"
-" \t\tnot read within TIMEOUT seconds. The value of the TMOUT\n"
+" -t timeout\ttime out and return failure if a complete line of input is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
" \t\tvariable is the default timeout. TIMEOUT may be a\n"
-" \t\tfractional number. If TIMEOUT is 0, read returns immediately,\n"
-" \t\twithout trying to read any data, returning success only if\n"
-" \t\tinput is available on the specified file descriptor. The\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
" \t\texit status is greater than 128 if the timeout is exceeded\n"
" -u fd\t\tread from file descriptor FD instead of the standard input\n"
" \n"
" Exit Status:\n"
-" The return code is zero, unless end-of-file is encountered, read times "
-"out\n"
-" (in which case it's greater than 128), a variable assignment error "
-"occurs,\n"
+" The return code is zero, unless end-of-file is encountered, read times out,\n"
" or an invalid file descriptor is supplied as the argument to -u."
msgstr ""
-#: builtins.c:1026
+#: builtins.c:1014
msgid ""
"Return from a shell function.\n"
" \n"
@@ -3051,7 +2960,7 @@ msgid ""
" Returns N, or failure if the shell is not executing a function or script."
msgstr ""
-#: builtins.c:1039
+#: builtins.c:1027
msgid ""
"Set or unset values of shell options and positional parameters.\n"
" \n"
@@ -3094,8 +3003,7 @@ msgid ""
" physical same as -P\n"
" pipefail the return value of a pipeline is the status of\n"
" the last command to exit with a non-zero status,\n"
-" or zero if no command exited with a non-zero "
-"status\n"
+" or zero if no command exited with a non-zero status\n"
" posix change the behavior of bash where the default\n"
" operation differs from the Posix standard to\n"
" match the standard\n"
@@ -3117,7 +3025,7 @@ msgid ""
" -E If set, the ERR trap is inherited by shell functions.\n"
" -H Enable ! style history substitution. This flag is on\n"
" by default when the shell is interactive.\n"
-" -P If set, do not resolve symbolic links when executing commands\n"
+" -P If set, do not follow symbolic links when executing commands\n"
" such as cd which change the current directory.\n"
" -T If set, the DEBUG trap is inherited by shell functions.\n"
" -- Assign any remaining arguments to the positional parameters.\n"
@@ -3136,7 +3044,7 @@ msgid ""
" Returns success unless an invalid option is given."
msgstr ""
-#: builtins.c:1124
+#: builtins.c:1112
msgid ""
"Unset values and attributes of shell variables and functions.\n"
" \n"
@@ -3145,11 +3053,8 @@ msgid ""
" Options:\n"
" -f\ttreat each NAME as a shell function\n"
" -v\ttreat each NAME as a shell variable\n"
-" -n\ttreat each NAME as a name reference and unset the variable itself\n"
-" \trather than the variable it references\n"
" \n"
-" Without options, unset first tries to unset a variable, and if that "
-"fails,\n"
+" Without options, unset first tries to unset a variable, and if that fails,\n"
" tries to unset a function.\n"
" \n"
" Some variables cannot be unset; also see `readonly'.\n"
@@ -3158,13 +3063,12 @@ msgid ""
" Returns success unless an invalid option is given or a NAME is read-only."
msgstr ""
-#: builtins.c:1146
+#: builtins.c:1132
msgid ""
"Set export attribute for shell variables.\n"
" \n"
" Marks each NAME for automatic export to the environment of subsequently\n"
-" executed commands. If VALUE is supplied, assign VALUE before "
-"exporting.\n"
+" executed commands. If VALUE is supplied, assign VALUE before exporting.\n"
" \n"
" Options:\n"
" -f\trefer to shell functions\n"
@@ -3177,7 +3081,7 @@ msgid ""
" Returns success unless an invalid option is given or NAME is invalid."
msgstr ""
-#: builtins.c:1165
+#: builtins.c:1151
msgid ""
"Mark shell variables as unchangeable.\n"
" \n"
@@ -3197,7 +3101,7 @@ msgid ""
" Returns success unless an invalid option is given or NAME is invalid."
msgstr ""
-#: builtins.c:1186
+#: builtins.c:1172
msgid ""
"Shift positional parameters.\n"
" \n"
@@ -3208,7 +3112,7 @@ msgid ""
" Returns success unless N is negative or greater than $#."
msgstr ""
-#: builtins.c:1198 builtins.c:1213
+#: builtins.c:1184 builtins.c:1199
msgid ""
"Execute commands from a file in the current shell.\n"
" \n"
@@ -3222,7 +3126,7 @@ msgid ""
" FILENAME cannot be read."
msgstr ""
-#: builtins.c:1229
+#: builtins.c:1215
msgid ""
"Suspend shell execution.\n"
" \n"
@@ -3236,7 +3140,7 @@ msgid ""
" Returns success unless job control is not enabled or an error occurs."
msgstr ""
-#: builtins.c:1245
+#: builtins.c:1231
msgid ""
"Evaluate conditional expression.\n"
" \n"
@@ -3270,8 +3174,7 @@ msgid ""
" -x FILE True if the file is executable by you.\n"
" -O FILE True if the file is effectively owned by you.\n"
" -G FILE True if the file is effectively owned by your group.\n"
-" -N FILE True if the file has been modified since it was last "
-"read.\n"
+" -N FILE True if the file has been modified since it was last read.\n"
" \n"
" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
" modification date).\n"
@@ -3292,8 +3195,7 @@ msgid ""
" STRING1 != STRING2\n"
" True if the strings are not equal.\n"
" STRING1 < STRING2\n"
-" True if STRING1 sorts before STRING2 "
-"lexicographically.\n"
+" True if STRING1 sorts before STRING2 lexicographically.\n"
" STRING1 > STRING2\n"
" True if STRING1 sorts after STRING2 lexicographically.\n"
" \n"
@@ -3301,8 +3203,6 @@ msgid ""
" \n"
" -o OPTION True if the shell option OPTION is enabled.\n"
" -v VAR\t True if the shell variable VAR is set\n"
-" -R VAR\t True if the shell variable VAR is set and is a name "
-"reference.\n"
" ! EXPR True if expr is false.\n"
" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
@@ -3319,7 +3219,7 @@ msgid ""
" false or an invalid argument is given."
msgstr ""
-#: builtins.c:1326
+#: builtins.c:1311
msgid ""
"Evaluate conditional expression.\n"
" \n"
@@ -3327,24 +3227,22 @@ msgid ""
" be a literal `]', to match the opening `['."
msgstr ""
-#: builtins.c:1335
+#: builtins.c:1320
msgid ""
"Display process times.\n"
" \n"
-" Prints the accumulated user and system times for the shell and all of "
-"its\n"
+" Prints the accumulated user and system times for the shell and all of its\n"
" child processes.\n"
" \n"
" Exit Status:\n"
" Always succeeds."
msgstr ""
-#: builtins.c:1347
+#: builtins.c:1332
msgid ""
"Trap signals and other events.\n"
" \n"
-" Defines and activates handlers to be run when the shell receives "
-"signals\n"
+" Defines and activates handlers to be run when the shell receives signals\n"
" or other conditions.\n"
" \n"
" ARG is a command to be read and executed when the shell receives the\n"
@@ -3353,37 +3251,29 @@ msgid ""
" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
" shell and by the commands it invokes.\n"
" \n"
-" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
-"If\n"
-" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. "
-"If\n"
-" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or "
-"a\n"
-" script run by the . or source builtins finishes executing. A "
-"SIGNAL_SPEC\n"
-" of ERR means to execute ARG each time a command's failure would cause "
-"the\n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command. If\n"
+" a SIGNAL_SPEC is RETURN, ARG is executed each time a shell function or a\n"
+" script run by the . or source builtins finishes executing. A SIGNAL_SPEC\n"
+" of ERR means to execute ARG each time a command's failure would cause the\n"
" shell to exit when the -e option is enabled.\n"
" \n"
-" If no arguments are supplied, trap prints the list of commands "
-"associated\n"
+" If no arguments are supplied, trap prints the list of commands associated\n"
" with each signal.\n"
" \n"
" Options:\n"
" -l\tprint a list of signal names and their corresponding numbers\n"
" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
" \n"
-" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
-"number.\n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal number.\n"
" Signal names are case insensitive and the SIG prefix is optional. A\n"
" signal may be sent to the shell with \"kill -signal $$\".\n"
" \n"
" Exit Status:\n"
-" Returns success unless a SIGSPEC is invalid or an invalid option is "
-"given."
+" Returns success unless a SIGSPEC is invalid or an invalid option is given."
msgstr ""
-#: builtins.c:1383
+#: builtins.c:1368
msgid ""
"Display information about command type.\n"
" \n"
@@ -3409,16 +3299,14 @@ msgid ""
" NAME\tCommand name to be interpreted.\n"
" \n"
" Exit Status:\n"
-" Returns success if all of the NAMEs are found; fails if any are not "
-"found."
+" Returns success if all of the NAMEs are found; fails if any are not found."
msgstr ""
-#: builtins.c:1414
+#: builtins.c:1399
msgid ""
"Modify shell resource limits.\n"
" \n"
-" Provides control over the resources available to the shell and "
-"processes\n"
+" Provides control over the resources available to the shell and processes\n"
" it creates, on systems that allow such control.\n"
" \n"
" Options:\n"
@@ -3442,9 +3330,6 @@ msgid ""
" -u\tthe maximum number of user processes\n"
" -v\tthe size of virtual memory\n"
" -x\tthe maximum number of file locks\n"
-" -T the maximum number of threads\n"
-" \n"
-" Not all options are available on all platforms.\n"
" \n"
" If LIMIT is given, it is the new value of the specified resource; the\n"
" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
@@ -3460,7 +3345,7 @@ msgid ""
" Returns success unless an invalid option is supplied or an error occurs."
msgstr ""
-#: builtins.c:1462
+#: builtins.c:1444
msgid ""
"Display or set file mode mask.\n"
" \n"
@@ -3478,42 +3363,35 @@ msgid ""
" Returns success unless MODE is invalid or an invalid option is given."
msgstr ""
-#: builtins.c:1482
+#: builtins.c:1464
msgid ""
"Wait for job completion and return exit status.\n"
" \n"
-" Waits for each process identified by an ID, which may be a process ID or "
-"a\n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
" job specification, and reports its termination status. If ID is not\n"
" given, waits for all currently active child processes, and the return\n"
-" status is zero. If ID is a a job specification, waits for all "
-"processes\n"
-" in that job's pipeline.\n"
-" \n"
-" If the -n option is supplied, waits for the next job to terminate and\n"
-" returns its exit status.\n"
+" status is zero. If ID is a a job specification, waits for all processes\n"
+" in the job's pipeline.\n"
" \n"
" Exit Status:\n"
-" Returns the status of the last ID; fails if ID is invalid or an invalid\n"
-" option is given."
+" Returns the status of ID; fails if ID is invalid or an invalid option is\n"
+" given."
msgstr ""
-#: builtins.c:1503
+#: builtins.c:1482
msgid ""
"Wait for process completion and return exit status.\n"
" \n"
-" Waits for each process specified by a PID and reports its termination "
-"status.\n"
-" If PID is not given, waits for all currently active child processes,\n"
-" and the return status is zero. PID must be a process ID.\n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
" \n"
" Exit Status:\n"
-" Returns the status of the last PID; fails if PID is invalid or an "
-"invalid\n"
-" option is given."
+" Returns the status of ID; fails if ID is invalid or an invalid option is\n"
+" given."
msgstr ""
-#: builtins.c:1518
+#: builtins.c:1497
msgid ""
"Execute commands for each member in a list.\n"
" \n"
@@ -3526,7 +3404,7 @@ msgid ""
" Returns the status of the last command executed."
msgstr ""
-#: builtins.c:1532
+#: builtins.c:1511
msgid ""
"Arithmetic for loop.\n"
" \n"
@@ -3543,7 +3421,7 @@ msgid ""
" Returns the status of the last command executed."
msgstr ""
-#: builtins.c:1550
+#: builtins.c:1529
msgid ""
"Select words from a list and execute commands.\n"
" \n"
@@ -3563,7 +3441,7 @@ msgid ""
" Returns the status of the last command executed."
msgstr ""
-#: builtins.c:1571
+#: builtins.c:1550
msgid ""
"Report time consumed by pipeline's execution.\n"
" \n"
@@ -3579,7 +3457,7 @@ msgid ""
" The return status is the return status of PIPELINE."
msgstr ""
-#: builtins.c:1588
+#: builtins.c:1567
msgid ""
"Execute commands based on pattern matching.\n"
" \n"
@@ -3590,28 +3468,23 @@ msgid ""
" Returns the status of the last command executed."
msgstr ""
-#: builtins.c:1600
+#: builtins.c:1579
msgid ""
"Execute commands based on conditional.\n"
" \n"
-" The `if COMMANDS' list is executed. If its exit status is zero, then "
-"the\n"
-" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
-"is\n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list is\n"
" executed in turn, and if its exit status is zero, the corresponding\n"
-" `then COMMANDS' list is executed and the if command completes. "
-"Otherwise,\n"
-" the `else COMMANDS' list is executed, if present. The exit status of "
-"the\n"
-" entire construct is the exit status of the last command executed, or "
-"zero\n"
+" `then COMMANDS' list is executed and the if command completes. Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of the\n"
+" entire construct is the exit status of the last command executed, or zero\n"
" if no condition tested true.\n"
" \n"
" Exit Status:\n"
" Returns the status of the last command executed."
msgstr ""
-#: builtins.c:1617
+#: builtins.c:1596
msgid ""
"Execute commands as long as a test succeeds.\n"
" \n"
@@ -3622,7 +3495,7 @@ msgid ""
" Returns the status of the last command executed."
msgstr ""
-#: builtins.c:1629
+#: builtins.c:1608
msgid ""
"Execute commands as long as a test does not succeed.\n"
" \n"
@@ -3633,7 +3506,7 @@ msgid ""
" Returns the status of the last command executed."
msgstr ""
-#: builtins.c:1641
+#: builtins.c:1620
msgid ""
"Create a coprocess named NAME.\n"
" \n"
@@ -3646,13 +3519,12 @@ msgid ""
" Returns the exit status of COMMAND."
msgstr ""
-#: builtins.c:1655
+#: builtins.c:1634
msgid ""
"Define shell function.\n"
" \n"
" Create a shell function named NAME. When invoked as a simple command,\n"
-" NAME runs COMMANDs in the calling shell's context. When NAME is "
-"invoked,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is invoked,\n"
" the arguments are passed to the function as $1...$n, and the function's\n"
" name is in $FUNCNAME.\n"
" \n"
@@ -3660,7 +3532,7 @@ msgid ""
" Returns success unless NAME is readonly."
msgstr ""
-#: builtins.c:1669
+#: builtins.c:1648
msgid ""
"Group commands as a unit.\n"
" \n"
@@ -3671,7 +3543,7 @@ msgid ""
" Returns the status of the last command executed."
msgstr ""
-#: builtins.c:1681
+#: builtins.c:1660
msgid ""
"Resume job in foreground.\n"
" \n"
@@ -3685,7 +3557,7 @@ msgid ""
" Returns the status of the resumed job."
msgstr ""
-#: builtins.c:1696
+#: builtins.c:1675
msgid ""
"Evaluate arithmetic expression.\n"
" \n"
@@ -3696,16 +3568,13 @@ msgid ""
" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
msgstr ""
-#: builtins.c:1708
+#: builtins.c:1687
msgid ""
"Execute conditional command.\n"
" \n"
-" Returns a status of 0 or 1 depending on the evaluation of the "
-"conditional\n"
-" expression EXPRESSION. Expressions are composed of the same primaries "
-"used\n"
-" by the `test' builtin, and may be combined using the following "
-"operators:\n"
+" Returns a status of 0 or 1 depending on the evaluation of the conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries used\n"
+" by the `test' builtin, and may be combined using the following operators:\n"
" \n"
" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
@@ -3724,7 +3593,7 @@ msgid ""
" 0 or 1 depending on value of EXPRESSION."
msgstr ""
-#: builtins.c:1734
+#: builtins.c:1713
msgid ""
"Common shell variable names and usage.\n"
" \n"
@@ -3778,7 +3647,7 @@ msgid ""
" \t\tcommands should be saved on the history list.\n"
msgstr ""
-#: builtins.c:1791
+#: builtins.c:1770
msgid ""
"Add directories to stack.\n"
" \n"
@@ -3809,7 +3678,7 @@ msgid ""
" change fails."
msgstr ""
-#: builtins.c:1825
+#: builtins.c:1804
msgid ""
"Remove directories from stack.\n"
" \n"
@@ -3836,7 +3705,7 @@ msgid ""
" change fails."
msgstr ""
-#: builtins.c:1855
+#: builtins.c:1834
msgid ""
"Display directory stack.\n"
" \n"
@@ -3853,25 +3722,22 @@ msgid ""
" \twith its position in the stack\n"
" \n"
" Arguments:\n"
-" +N\tDisplays the Nth entry counting from the left of the list shown "
-"by\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown by\n"
" \tdirs when invoked without options, starting with zero.\n"
" \n"
-" -N\tDisplays the Nth entry counting from the right of the list shown "
-"by\n"
+" -N\tDisplays the Nth entry counting from the right of the list shown by\n"
" \tdirs when invoked without options, starting with zero.\n"
" \n"
" Exit Status:\n"
" Returns success unless an invalid option is supplied or an error occurs."
msgstr ""
-#: builtins.c:1884
+#: builtins.c:1863
msgid ""
"Set and unset shell options.\n"
" \n"
" Change the setting of each shell option OPTNAME. Without any option\n"
-" arguments, list all shell options with an indication of whether or not "
-"each\n"
+" arguments, list all shell options with an indication of whether or not each\n"
" is set.\n"
" \n"
" Options:\n"
@@ -3886,7 +3752,7 @@ msgid ""
" given or OPTNAME is disabled."
msgstr ""
-#: builtins.c:1905
+#: builtins.c:1884
msgid ""
"Formats and prints ARGUMENTS under control of the FORMAT.\n"
" \n"
@@ -3894,45 +3760,31 @@ msgid ""
" -v var\tassign the output to shell variable VAR rather than\n"
" \t\tdisplay it on the standard output\n"
" \n"
-" FORMAT is a character string which contains three types of objects: "
-"plain\n"
-" characters, which are simply copied to standard output; character "
-"escape\n"
+" FORMAT is a character string which contains three types of objects: plain\n"
+" characters, which are simply copied to standard output; character escape\n"
" sequences, which are converted and copied to the standard output; and\n"
-" format specifications, each of which causes printing of the next "
-"successive\n"
+" format specifications, each of which causes printing of the next successive\n"
" argument.\n"
" \n"
-" In addition to the standard format specifications described in printf"
-"(1),\n"
-" printf interprets:\n"
+" In addition to the standard format specifications described in printf(1)\n"
+" and printf(3), printf interprets:\n"
" \n"
" %b\texpand backslash escape sequences in the corresponding argument\n"
" %q\tquote the argument in a way that can be reused as shell input\n"
-" %(fmt)T output the date-time string resulting from using FMT as a "
-"format\n"
+" %(fmt)T output the date-time string resulting from using FMT as a format\n"
" string for strftime(3)\n"
" \n"
-" The format is re-used as necessary to consume all of the arguments. If\n"
-" there are fewer arguments than the format requires, extra format\n"
-" specifications behave as if a zero value or null string, as "
-"appropriate,\n"
-" had been supplied.\n"
-" \n"
" Exit Status:\n"
-" Returns success unless an invalid option is given or a write or "
-"assignment\n"
+" Returns success unless an invalid option is given or a write or assignment\n"
" error occurs."
msgstr ""
-#: builtins.c:1939
+#: builtins.c:1913
msgid ""
"Specify how arguments are to be completed by Readline.\n"
" \n"
-" For each NAME, specify how arguments are to be completed. If no "
-"options\n"
-" are supplied, existing completion specifications are printed in a way "
-"that\n"
+" For each NAME, specify how arguments are to be completed. If no options\n"
+" are supplied, existing completion specifications are printed in a way that\n"
" allows them to be reused as input.\n"
" \n"
" Options:\n"
@@ -3952,29 +3804,25 @@ msgid ""
" Returns success unless an invalid option is supplied or an error occurs."
msgstr ""
-#: builtins.c:1967
+#: builtins.c:1941
msgid ""
"Display possible completions depending on the options.\n"
" \n"
" Intended to be used from within a shell function generating possible\n"
-" completions. If the optional WORD argument is supplied, matches "
-"against\n"
+" completions. If the optional WORD argument is supplied, matches against\n"
" WORD are generated.\n"
" \n"
" Exit Status:\n"
" Returns success unless an invalid option is supplied or an error occurs."
msgstr ""
-#: builtins.c:1982
+#: builtins.c:1956
msgid ""
"Modify or display completion options.\n"
" \n"
-" Modify the completion options for each NAME, or, if no NAMEs are "
-"supplied,\n"
-" the completion currently being executed. If no OPTIONs are given, "
-"print\n"
-" the completion options for each NAME or the current completion "
-"specification.\n"
+" Modify the completion options for each NAME, or, if no NAMEs are supplied,\n"
+" the completion currently being executed. If no OPTIONs are given, print\n"
+" the completion options for each NAME or the current completion specification.\n"
" \n"
" Options:\n"
" \t-o option\tSet completion option OPTION for each NAME\n"
@@ -3996,28 +3844,22 @@ msgid ""
" have a completion specification defined."
msgstr ""
-#: builtins.c:2012
+#: builtins.c:1986
msgid ""
"Read lines from the standard input into an indexed array variable.\n"
" \n"
-" Read lines from the standard input into the indexed array variable "
-"ARRAY, or\n"
-" from file descriptor FD if the -u option is supplied. The variable "
-"MAPFILE\n"
+" Read lines from the standard input into the indexed array variable ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable MAPFILE\n"
" is the default ARRAY.\n"
" \n"
" Options:\n"
-" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
-"copied.\n"
-" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
-"index is 0.\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default index is 0.\n"
" -s count \tDiscard the first COUNT lines read.\n"
" -t\t\tRemove a trailing newline from each line read.\n"
-" -u fd\t\tRead lines from file descriptor FD instead of the standard "
-"input.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard input.\n"
" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
-" -c quantum\tSpecify the number of lines read between each call to "
-"CALLBACK.\n"
+" -c quantum\tSpecify the number of lines read between each call to CALLBACK.\n"
" \n"
" Arguments:\n"
" ARRAY\t\tArray variable name to use for file data.\n"
@@ -4027,17 +3869,15 @@ msgid ""
" element to be assigned and the line to be assigned to that element\n"
" as additional arguments.\n"
" \n"
-" If not supplied with an explicit origin, mapfile will clear ARRAY "
-"before\n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY before\n"
" assigning to it.\n"
" \n"
" Exit Status:\n"
-" Returns success unless an invalid option is given or ARRAY is readonly "
-"or\n"
+" Returns success unless an invalid option is given or ARRAY is readonly or\n"
" not an indexed array."
msgstr ""
-#: builtins.c:2046
+#: builtins.c:2020
msgid ""
"Read lines from a file into an array variable.\n"
" \n"
@@ -4046,13 +3886,3 @@ msgstr ""
"Učitaj retke iz datoteke u varijablu polja.\n"
" \n"
" Sinonim za „mapfile”."
-
-#~ msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
-#~ msgstr "Copyright (C) 2009 Free Software Foundation, Inc.\n"
-
-#~ msgid ""
-#~ "License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
-#~ "html>\n"
-#~ msgstr ""
-#~ "Licenca GPLv2+: GNU GPL inačica 2 ili novija <http://gnu.org/licenses/gpl."
-#~ "html>\n"
diff --git a/redir.c b/redir.c
index 9e5ca0f0..89387fb4 100644
--- a/redir.c
+++ b/redir.c
@@ -873,7 +873,9 @@ do_redirection_internal (redirect, flags)
}
#if defined (BUFFERED_INPUT)
- check_bash_input (redirector);
+ /* inhibit call to sync_buffered_stream() for async processes */
+ if (redirector != 0 || (subshell_environment & SUBSHELL_ASYNC) == 0)
+ check_bash_input (redirector);
#endif
/* Make sure there is no pending output before we change the state
@@ -1055,7 +1057,9 @@ do_redirection_internal (redirect, flags)
}
}
#if defined (BUFFERED_INPUT)
- check_bash_input (redirector);
+ /* inhibit call to sync_buffered_stream() for async processes */
+ if (redirector != 0 || (subshell_environment & SUBSHELL_ASYNC) == 0)
+ check_bash_input (redirector);
#endif
if (redirect->rflags & REDIR_VARASSIGN)
{
@@ -1138,15 +1142,16 @@ do_redirection_internal (redirect, flags)
xtrace_fdchk (redirector);
#if defined (BUFFERED_INPUT)
- check_bash_input (redirector);
+ /* inhibit call to sync_buffered_stream() for async processes */
+ if (redirector != 0 || (subshell_environment & SUBSHELL_ASYNC) == 0)
+ check_bash_input (redirector);
r = close_buffered_fd (redirector);
#else /* !BUFFERED_INPUT */
r = close (redirector);
#endif /* !BUFFERED_INPUT */
-#if 0 /* bash-4.3 */
+
if (r < 0 && (flags & RX_INTERNAL) && (errno == EIO || errno == ENOSPC))
REDIRECTION_ERROR (r, errno, -1);
-#endif
}
break;
diff --git a/subst.c b/subst.c
index e5f1447a..98947922 100644
--- a/subst.c
+++ b/subst.c
@@ -277,6 +277,7 @@ static int chk_atstar __P((char *, int, int *, int *));
static int chk_arithsub __P((const char *, int));
static WORD_DESC *parameter_brace_expand_word __P((char *, int, int, int, arrayind_t *));
+static char *parameter_brace_find_indir __P((char *, int, int, int));
static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *));
static WORD_DESC *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *));
static void parameter_brace_expand_error __P((char *, char *));
@@ -1470,7 +1471,7 @@ extract_dollar_brace_string (string, sindex, quoted, flags)
if (c == '\'')
{
/*itrace("extract_dollar_brace_string: c == single quote flags = %d quoted = %d dolbrace_state = %d", flags, quoted, dolbrace_state);*/
- if (posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ if (posixly_correct && shell_compatibility_level > 42 && dolbrace_state != DOLBRACE_QUOTE && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
ADVANCE_CHAR (string, slen, i);
else
{
@@ -1491,7 +1492,7 @@ extract_dollar_brace_string (string, sindex, quoted, flags)
else if (dolbrace_state == DOLBRACE_PARAM && c == '#' && (i - *sindex) > 1)
dolbrace_state = DOLBRACE_QUOTE;
else if (dolbrace_state == DOLBRACE_PARAM && c == '/' && (i - *sindex) > 1)
- dolbrace_state = DOLBRACE_QUOTE;
+ dolbrace_state = DOLBRACE_QUOTE2; /* XXX */
else if (dolbrace_state == DOLBRACE_PARAM && c == '^' && (i - *sindex) > 1)
dolbrace_state = DOLBRACE_QUOTE;
else if (dolbrace_state == DOLBRACE_PARAM && c == ',' && (i - *sindex) > 1)
@@ -3129,7 +3130,58 @@ expand_arith_string (string, quoted)
char *string;
int quoted;
{
- return (expand_string_if_necessary (string, quoted, expand_string));
+ WORD_DESC td;
+ WORD_LIST *list, *tlist;
+ size_t slen;
+ int i, saw_quote;
+ char *ret;
+ DECLARE_MBSTATE;
+
+ /* Don't need string length for ADVANCE_CHAR unless multibyte chars possible. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string) : 0;
+ i = saw_quote = 0;
+ while (string[i])
+ {
+ if (EXP_CHAR (string[i]))
+ break;
+ else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
+ saw_quote = 1;
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ if (string[i])
+ {
+ /* This is expanded version of expand_string_internal as it's called by
+ expand_string_leave_quoted */
+ td.flags = W_NOPROCSUB; /* don't want process substitution */
+ td.word = savestring (string);
+ list = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL);
+ /* This takes care of the calls from expand_string_leave_quoted and
+ expand_string */
+ if (list)
+ {
+ tlist = word_list_split (list);
+ dispose_words (list);
+ list = tlist;
+ if (list)
+ dequote_list (list);
+ }
+ /* This comes from expand_string_if_necessary */
+ if (list)
+ {
+ ret = string_list (list);
+ dispose_words (list);
+ }
+ else
+ ret = (char *)NULL;
+ FREE (td.word);
+ }
+ else if (saw_quote && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0))
+ ret = string_quote_removal (string, quoted);
+ else
+ ret = savestring (string);
+
+ return ret;
}
#if defined (COND_COMMAND)
@@ -4460,6 +4512,11 @@ array_remove_pattern (var, pattern, patspec, varname, quoted)
/* compute itype from varname here */
v = array_variable_part (varname, &ret, 0);
+
+ /* XXX */
+ if (v && invisible_p (var))
+ return ((char *)NULL);
+
itype = ret[0];
a = (v && array_p (v)) ? array_cell (v) : 0;
@@ -5109,6 +5166,8 @@ process_substitute (string, open_for_read_in_child)
close (open_for_read_in_child ? 0 : 1);
#endif /* !HAVE_DEV_FD */
+ last_command_exit_value = result;
+ result = run_exit_trap ();
exit (result);
/*NOTREACHED*/
}
@@ -5473,7 +5532,7 @@ array_length_reference (s)
/* If unbound variables should generate an error, report one and return
failure. */
- if ((var == 0 || (assoc_p (var) == 0 && array_p (var) == 0)) && unbound_vars_is_error)
+ if ((var == 0 || invisible_p (var) || (assoc_p (var) == 0 && array_p (var) == 0)) && unbound_vars_is_error)
{
c = *--t;
*t = '\0';
@@ -5482,7 +5541,7 @@ array_length_reference (s)
*t = c;
return (-1);
}
- else if (var == 0)
+ else if (var == 0 || invisible_p (var))
return 0;
/* We support a couple of expansions for variables that are not arrays.
@@ -5749,6 +5808,38 @@ expand_arrayref:
return ret;
}
+static char *
+parameter_brace_find_indir (name, var_is_special, quoted, find_nameref)
+ char *name;
+ int var_is_special, quoted, find_nameref;
+{
+ char *temp, *t;
+ WORD_DESC *w;
+ SHELL_VAR *v;
+
+ if (find_nameref && var_is_special == 0 && (v = find_variable_last_nameref (name)) &&
+ nameref_p (v) && (t = nameref_cell (v)) && *t)
+ return (savestring (t));
+
+ /* If var_is_special == 0, and name is not an array reference, this does
+ more expansion than necessary. It should really look up the variable's
+ value and not try to expand it. */
+ w = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND, 0);
+ t = w->word;
+ /* Have to dequote here if necessary */
+ if (t)
+ {
+ temp = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ ? dequote_string (t)
+ : dequote_escapes (t);
+ free (t);
+ t = temp;
+ }
+ dispose_word_desc (w);
+
+ return t;
+}
+
/* Expand an indirect reference to a variable: ${!NAME} expands to the
value of the variable whose name is the value of NAME. */
static WORD_DESC *
@@ -5777,21 +5868,7 @@ parameter_brace_expand_indir (name, var_is_special, quoted, quoted_dollar_atp, c
}
}
- /* If var_is_special == 0, and name is not an array reference, this does
- more expansion than necessary. It should really look up the variable's
- value and not try to expand it. */
- w = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND, 0);
- t = w->word;
- /* Have to dequote here if necessary */
- if (t)
- {
- temp = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
- ? dequote_string (t)
- : dequote_escapes (t);
- free (t);
- t = temp;
- }
- dispose_word_desc (w);
+ t = parameter_brace_find_indir (name, var_is_special, quoted, 0);
chk_atstar (t, quoted, quoted_dollar_atp, contains_dollar_at);
if (t == 0)
@@ -6245,26 +6322,41 @@ get_var_and_type (varname, value, ind, quoted, flags, varp, valp)
SHELL_VAR **varp;
char **valp;
{
- int vtype;
- char *temp;
+ int vtype, want_indir;
+ char *temp, *vname;
+ WORD_DESC *wd;
#if defined (ARRAY_VARS)
SHELL_VAR *v;
#endif
arrayind_t lind;
+ want_indir = *varname == '!' &&
+ (legal_variable_starter ((unsigned char)varname[1]) || DIGIT (varname[1])
+ || VALID_INDIR_PARAM (varname[1]));
+ if (want_indir)
+ vname = parameter_brace_find_indir (varname+1, SPECIAL_VAR (varname, 1), quoted, 1);
+ else
+ vname = varname;
+
/* This sets vtype to VT_VARIABLE or VT_POSPARMS */
- vtype = (varname[0] == '@' || varname[0] == '*') && varname[1] == '\0';
- if (vtype == VT_POSPARMS && varname[0] == '*')
+ vtype = (vname[0] == '@' || vname[0] == '*') && vname[1] == '\0';
+ if (vtype == VT_POSPARMS && vname[0] == '*')
vtype |= VT_STARSUB;
*varp = (SHELL_VAR *)NULL;
#if defined (ARRAY_VARS)
- if (valid_array_reference (varname))
+ if (valid_array_reference (vname))
{
- v = array_variable_part (varname, &temp, (int *)0);
+ v = array_variable_part (vname, &temp, (int *)0);
/* If we want to signal array_value to use an already-computed index,
set LIND to that index */
lind = (ind != INTMAX_MIN && (flags & AV_USEIND)) ? ind : 0;
+ if (v && invisible_p (v))
+ {
+ vtype = VT_ARRAYMEMBER;
+ *varp = (SHELL_VAR *)NULL;
+ *valp = (char *)NULL;
+ }
if (v && (array_p (v) || assoc_p (v)))
{ /* [ */
if (ALL_ELEMENT_SUB (temp[0]) && temp[1] == ']')
@@ -6278,7 +6370,7 @@ get_var_and_type (varname, value, ind, quoted, flags, varp, valp)
else
{
vtype = VT_ARRAYMEMBER;
- *valp = array_value (varname, Q_DOUBLE_QUOTES, flags, (int *)NULL, &lind);
+ *valp = array_value (vname, Q_DOUBLE_QUOTES, flags, (int *)NULL, &lind);
}
*varp = v;
}
@@ -6295,10 +6387,10 @@ get_var_and_type (varname, value, ind, quoted, flags, varp, valp)
{
vtype = VT_ARRAYMEMBER;
*varp = v;
- *valp = array_value (varname, Q_DOUBLE_QUOTES, flags, (int *)NULL, &lind);
+ *valp = array_value (vname, Q_DOUBLE_QUOTES, flags, (int *)NULL, &lind);
}
}
- else if ((v = find_variable (varname)) && (invisible_p (v) == 0) && (assoc_p (v) || array_p (v)))
+ else if ((v = find_variable (vname)) && (invisible_p (v) == 0) && (assoc_p (v) || array_p (v)))
{
vtype = VT_ARRAYMEMBER;
*varp = v;
@@ -6318,6 +6410,9 @@ get_var_and_type (varname, value, ind, quoted, flags, varp, valp)
*valp = value;
}
+ if (want_indir)
+ free (vname);
+
return vtype;
}
diff --git a/subst.h b/subst.h
index 874e287b..afd3b3dd 100644
--- a/subst.h
+++ b/subst.h
@@ -281,6 +281,7 @@ extern char *cond_expand_word __P((WORD_DESC *, int));
#define SD_NOQUOTEDELIM 0x04 /* don't let single or double quotes act as delimiters */
#define SD_NOSKIPCMD 0x08 /* don't skip over $(, <(, or >( command/process substitution */
#define SD_EXTGLOB 0x10 /* skip over extended globbing patterns if appropriate */
+#define SD_IGNOREQUOTE 0x20 /* single and double quotes are not special */
extern int skip_to_delim __P((char *, int, char *, int));
diff --git a/support/config.guess b/support/config.guess
index 994d98a4..d622a44e 100644..100755
--- a/support/config.guess
+++ b/support/config.guess
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-# Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2008-03-12'
+timestamp='2012-02-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2008-03-12'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -27,16 +25,16 @@ timestamp='2008-03-12'
# the same distribution terms that you use for the rest of that program.
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,8 +54,9 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008,2009 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -144,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -170,7 +169,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
+ | grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -180,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
- os=netbsd
+ os=netbsd
;;
esac
# The OS release
@@ -223,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -269,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@@ -295,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
- echo powerpc-ibm-os400
+ echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
@@ -324,14 +326,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -375,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@@ -461,8 +482,8 @@ EOF
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -475,7 +496,7 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
@@ -532,7 +553,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[456])
+ *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -575,52 +596,52 @@ EOF
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
+ esac ;;
+ esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -640,7 +661,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
+ grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@@ -711,22 +732,22 @@ EOF
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@@ -750,14 +771,14 @@ EOF
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -769,13 +790,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
@@ -784,19 +804,22 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- EM64T | authenticamd)
+ authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
@@ -806,6 +829,9 @@ EOF
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -835,6 +861,27 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -842,20 +889,40 @@ EOF
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -866,74 +933,33 @@ EOF
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
+ mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
- #undef mips64
- #undef mips64el
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
+ CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
+ CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
@@ -943,14 +969,17 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -958,78 +987,18 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@@ -1037,11 +1006,11 @@ EOF
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
+ # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@@ -1058,7 +1027,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1073,7 +1042,7 @@ EOF
fi
exit ;;
i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
@@ -1101,10 +1070,13 @@ EOF
exit ;;
pc:*:*:*)
# Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
- exit ;;
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
@@ -1139,8 +1111,18 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@@ -1153,7 +1135,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1173,10 +1155,10 @@ EOF
echo ns32k-sni-sysv
fi
exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@@ -1202,11 +1184,11 @@ EOF
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@@ -1246,6 +1228,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1261,6 +1253,9 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
@@ -1306,13 +1301,13 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@@ -1327,6 +1322,12 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1349,11 +1350,11 @@ main ()
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
- "4"
+ "4"
#else
- ""
+ ""
#endif
- ); exit (0);
+ ); exit (0);
#endif
#endif
diff --git a/support/config.sub b/support/config.sub
index d07267e1..59bb593f 100644..100755
--- a/support/config.sub
+++ b/support/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20098
-# Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2008-03-26'
+timestamp='2012-04-18'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2008-03-26'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -32,13 +30,16 @@ timestamp='2008-03-26'
# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@@ -72,8 +73,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008,2009 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,12 +122,18 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -148,10 +156,13 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
+ -apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
+ -bluegene*)
+ os=-cnk
+ ;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -166,10 +177,10 @@ case $os in
os=-chorusos
basic_machine=$1
;;
- -chorusrdb)
- os=-chorusrdb
+ -chorusrdb)
+ os=-chorusrdb
basic_machine=$1
- ;;
+ ;;
-hiux*)
os=-hiuxwe2
;;
@@ -214,6 +225,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
@@ -238,17 +255,23 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
+ | epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
@@ -270,29 +293,42 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | moxie \
| mt \
| msp430 \
+ | nds32 | nds32le | nds32be \
| nios | nios2 \
| ns16k | ns32k \
+ | open8 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
+ | rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -302,6 +338,21 @@ case $basic_machine in
basic_machine=mt-unknown
;;
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
@@ -316,24 +367,29 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | be32-* | be64-* \
| bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -355,27 +411,32 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
| tron-* \
- | v850-* | v850e-* | vax-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
- | z8k-*)
+ | z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
@@ -397,7 +458,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
- abacus)
+ abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@@ -443,6 +504,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -459,10 +524,27 @@ case $basic_machine in
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -491,7 +573,7 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16)
+ cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
@@ -530,6 +612,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
@@ -645,7 +731,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@@ -703,6 +788,9 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -739,10 +827,18 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@@ -807,6 +903,9 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
nse-tandem)
basic_machine=nse-tandem
;;
@@ -892,9 +991,10 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
- ppc) basic_machine=powerpc-unknown
+ ppc | ppcbe) basic_machine=powerpc-unknown
;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@@ -988,6 +1088,9 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
sun2)
basic_machine=m68000-sun
;;
@@ -1044,20 +1147,8 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
tile*)
- basic_machine=tile-unknown
+ basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
@@ -1127,6 +1218,9 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
ymp)
basic_machine=ymp-cray
os=-unicos
@@ -1135,6 +1229,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
none)
basic_machine=none-none
os=-none
@@ -1173,7 +1271,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1220,9 +1318,12 @@ esac
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # First match some system type aliases
+ # that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@@ -1243,10 +1344,11 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
+ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1255,9 +1357,10 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1265,7 +1368,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1304,7 +1407,7 @@ case $os in
-opened*)
os=-openedition
;;
- -os400*)
+ -os400*)
os=-os400
;;
-wince*)
@@ -1353,7 +1456,7 @@ case $os in
-sinix*)
os=-sysv4
;;
- -tpf*)
+ -tpf*)
os=-tpf
;;
-triton*)
@@ -1395,6 +1498,11 @@ case $os in
-zvmoe)
os=-zvmoe
;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
-none)
;;
*)
@@ -1417,10 +1525,10 @@ else
# system, and we'll never get to this point.
case $basic_machine in
- score-*)
+ score-*)
os=-elf
;;
- spu-*)
+ spu-*)
os=-elf
;;
*-acorn)
@@ -1432,8 +1540,17 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
@@ -1453,14 +1570,11 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
;;
- mep-*)
+ mep-*)
os=-elf
;;
mips*-cisco)
@@ -1487,7 +1601,7 @@ case $basic_machine in
*-ibm)
os=-aix
;;
- *-knuth)
+ *-knuth)
os=-mmixware
;;
*-wec)
@@ -1592,7 +1706,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
- -aix*)
+ -cnk*|-aix*)
vendor=ibm
;;
-beos*)
diff --git a/tests/appendop.right b/tests/appendop.right
index 5d55b9c2..9c867921 100644
--- a/tests/appendop.right
+++ b/tests/appendop.right
@@ -1,7 +1,7 @@
14
1 2 3 4 5 6
1 2 3 4 51 6
-5
+145
14
7
42
@@ -15,9 +15,14 @@
4
9
16
-./appendop.tests: line 83: x: readonly variable
+./appendop.tests: line 84: x: readonly variable
declare -A foo='([one]="bar" [two]="baz" [three]="quux" )'
declare -A foo='([one]="bar" [two]="baz" [0]="zero" [three]="quux" )'
declare -A foo='([four]="four" [one]="bar" [two]="baz" [0]="zero" [three]="quux" )'
declare -ai iarr='([0]="3" [1]="2" [2]="3")'
declare -ai iarr='([0]="3" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6")'
+25 25
+7 7
+14
+145
+145 145
diff --git a/tests/appendop.tests b/tests/appendop.tests
index be6c9716..e4e52c2f 100644
--- a/tests/appendop.tests
+++ b/tests/appendop.tests
@@ -12,7 +12,8 @@ x[4]+=1
echo ${x[@]}
# trickier cases
-
+# post-bash-4.2: bash understands += in environment assignments preceding
+# command names
a+=5 printenv a
echo $a
@@ -83,3 +84,4 @@ echo $x
x+=5
${THIS_SH} ./appendop1.sub
+${THIS_SH} ./appendop2.sub
diff --git a/tests/appendop2.sub b/tests/appendop2.sub
new file mode 100644
index 00000000..4225ba3f
--- /dev/null
+++ b/tests/appendop2.sub
@@ -0,0 +1,18 @@
+POSIXLY_CORRECT=1
+x=2
+x+=5 eval printf '"$x "'
+echo "$x"
+
+unset x
+typeset -i x=2
+x+=5 eval printf '"$x "'
+echo "$x"
+
+a=1
+a+=4
+echo $a
+
+# idiotically, ksh93 makes these two cases differ (?)
+a+=5 printenv a
+a+=5 eval printf '"$a "'
+echo $a
diff --git a/tests/case.right b/tests/case.right
index 52fb8a14..58ab2a4f 100644
--- a/tests/case.right
+++ b/tests/case.right
@@ -7,3 +7,14 @@ no more clauses
1.0
./case.tests: line 29: xx: readonly variable
1.1
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+ok 9
+mysterious 1
+mysterious 2
diff --git a/tests/case.tests b/tests/case.tests
index 37e7fb92..547e8ccd 100644
--- a/tests/case.tests
+++ b/tests/case.tests
@@ -28,3 +28,6 @@ unset x
readonly xx=1
case 1 in $((xx++)) ) echo hi1 ;; *) echo hi2; esac
echo ${xx}.$?
+
+# tests of quote removal and pattern matching
+${THIS_SH} ./case1.sub
diff --git a/tests/case1.sub b/tests/case1.sub
new file mode 100644
index 00000000..7db09ab2
--- /dev/null
+++ b/tests/case1.sub
@@ -0,0 +1,64 @@
+x='\x'
+
+case x in
+\x) echo ok 1;;
+*) echo bad 1;;
+esac
+
+case x in
+$x) echo ok 2;;
+*) echo bad 2;;
+esac
+
+case $x in
+\x) echo bad 3;;
+\\x) echo ok 3 ;;
+*) echo bad 3.1 ;;
+esac
+
+case $x in
+\\$x) echo ok 4 ;;
+x) echo bad 4;;
+$x) echo bad 4.1 ;;
+*) echo bad 4.2;;
+esac
+
+case x in
+\\x) echo bad 5;;
+\x) echo ok 5;;
+*) echo bad 5.1;;
+esac
+
+case x in
+\\x) echo bad 6;;
+x) echo ok 6;;
+*) echo bad 6.1;;
+esac
+
+case x in
+$x) echo ok 7 ;;
+\\$x) echo bad 7 ;;
+*) echo bad 7.1 ;;
+esac
+
+case x in
+\x) echo ok 8 ;;
+\\x) echo bad 8 ;;
+*) echo bad 8.1 ;;
+esac
+
+case \x in
+\x) echo ok 9 ;;
+\\x) echo bad 9 ;;
+*) echo bad 9.1 ;;
+esac
+
+case $x in
+$x) echo oops 1 ;;
+*) echo mysterious 1 ;;
+esac
+
+case \x in
+\x) echo mysterious 2 ;;
+*) echo oops 2 ;;
+esac
diff --git a/tests/nquote.right b/tests/nquote.right
index 267f0e7f..9d1290ef 100644
--- a/tests/nquote.right
+++ b/tests/nquote.right
@@ -38,3 +38,21 @@ argv[1] = <'A^IB'>
hello' world
hello world!
hello' world!
+' | '
+' | '
+x | x
+x | x
+' | '
+' | '
+' | '
+' | '
+' | '
+' | '
+x | x
+'
+$'\''
+'
+'abcd'
+$'\'abcd\''
+'
+1
diff --git a/tests/nquote.tests b/tests/nquote.tests
index 720c3e15..aa0a9d88 100644
--- a/tests/nquote.tests
+++ b/tests/nquote.tests
@@ -116,3 +116,4 @@ recho "${mytab:-$'\t'}"
recho "$( args $'A\tB' )"
${THIS_SH} ./nquote1.sub
+${THIS_SH} ./nquote2.sub
diff --git a/tests/nquote2.sub b/tests/nquote2.sub
new file mode 100644
index 00000000..d3325f17
--- /dev/null
+++ b/tests/nquote2.sub
@@ -0,0 +1,29 @@
+t() {
+ printf '%s | %s\n' "$1" "$2"
+ }
+ v="'" # v <- '
+
+ #--
+ t "${v/$'\''/$'\''}" "'"
+ t ${v/$'\''/$'\''} "'"
+ t "${v/$'\''/x}" "x"
+ t ${v/$'\''/x} "x"
+ t "${v/x/$'\''}" "'"
+ t ${v/x/$'\''} "'"
+ t "${v/x/$'\x5c\''}" "'"
+ t ${v/x/$'\x5c\''} "'"
+ t "${v/\'/\'}" "'"
+ t ${v/\'/\'} "'"
+ t ${v/\'/x} "x"
+
+echo "'"
+echo "$'\''"
+
+echo $'\''
+
+echo $'\'abcd\''
+echo "$'\'abcd\''"
+
+v=1
+echo ${v/1/\'}
+echo ${v/\'/2}
diff --git a/tests/posix2.tests b/tests/posix2.tests
index a186e781..d0fb46c6 100644
--- a/tests/posix2.tests
+++ b/tests/posix2.tests
@@ -146,7 +146,7 @@ fi
newtest
SQUOTE="'"
val1=$(set | sed -n 's:^SQUOTE=::p')
-if [ "$val1" != "''\\'''" ]; then
+if [ "$val1" != "\'" ]; then
testfail "variable quoting 1"
fi
diff --git a/tests/trap.right b/tests/trap.right
index c04d1726..1da72a52 100644
--- a/tests/trap.right
+++ b/tests/trap.right
@@ -85,6 +85,24 @@ outside 1
outside 2
outside 3
outside 4
+sleep 2
+wait $!
+exit
+in trap EXIT
+sleep 2
+wait $!
+exit
+in trap EXIT
+works
+bar
+bar
+foo
+trap -- '' SIGINT
+trap -- '' SIGUSR2
+foo
+bar
+foo
+bar
caught a child death
caught a child death
caught a child death
diff --git a/tests/trap.tests b/tests/trap.tests
index e9859ec8..0af03ad7 100644
--- a/tests/trap.tests
+++ b/tests/trap.tests
@@ -70,6 +70,8 @@ ${THIS_SH} ./trap3.sub
${THIS_SH} ./trap4.sub
+${THIS_SH} ./trap5.sub
+
#
# show that setting a trap on SIGCHLD is not disastrous.
#
diff --git a/tests/trap4.sub b/tests/trap4.sub
index 6a8abdac..ab5ca3e3 100644
--- a/tests/trap4.sub
+++ b/tests/trap4.sub
@@ -15,3 +15,28 @@ trap 'echo inherited exit trap' EXIT
: | ( exit; ) | : ; echo outside 4
trap - EXIT
+
+# make sure group commands that are not at the beginning or end of pipelines
+# run an EXIT trap, with and without the exit builtin
+echo ignored |
+{
+ trap 'echo "in trap EXIT">&2' EXIT
+ sleep 4 &
+ echo 'sleep 2'>&2
+ sleep 2
+ echo 'wait $!'>&2
+ wait $!
+ echo 'exit'>&2
+ exit
+} | cat
+
+echo ignored |
+{
+ trap 'echo "in trap EXIT">&2' EXIT
+ sleep 4 &
+ echo 'sleep 2'>&2
+ sleep 2
+ echo 'wait $!'>&2
+ wait $!
+ echo 'exit'>&2
+} | cat
diff --git a/tests/trap5.sub b/tests/trap5.sub
new file mode 100644
index 00000000..7f3380b4
--- /dev/null
+++ b/tests/trap5.sub
@@ -0,0 +1,18 @@
+# make sure process substitution runs the exit trap
+[[ -n $(< <(trap "cat /dev/fd/0" EXIT)) ]] <<<works && echo works || echo "fail :("
+
+read foo < <(trap "echo bar" EXIT)
+echo $foo
+
+cat <(trap "echo bar" EXIT)
+
+trap "echo bar" EXIT #should proc subst inherit this?
+cat <(echo foo ; exit 0;)
+
+trap - 0
+trap
+
+cat <(echo foo; trap "echo bar" EXIT)
+
+trap "echo bar" EXIT #should proc subst inherit this?
+cat <(echo foo)
diff --git a/trap.c b/trap.c
index 1e11d1f9..2bca008e 100644
--- a/trap.c
+++ b/trap.c
@@ -286,6 +286,9 @@ run_pending_traps ()
if (catch_flag == 0) /* simple optimization */
return;
+ if (running_trap > 0)
+ return; /* no recursive trap invocations */
+
catch_flag = trapped_signal_received = 0;
/* Preserve $? when running trap. */
@@ -304,6 +307,8 @@ run_pending_traps ()
BLOCK_SIGNAL (sig, set, oset);
+ running_trap = sig + 1;
+
if (sig == SIGINT)
{
run_interrupt_trap ();
@@ -324,6 +329,7 @@ run_pending_traps ()
{
/* This can happen when run_pending_traps is called while
running a SIGCHLD trap handler. */
+ running_trap = 0;
UNBLOCK_SIGNAL (oset);
continue; /* XXX */
}
@@ -355,11 +361,19 @@ run_pending_traps ()
}
else
{
+ /* XXX - should we use save_parser_state/restore_parser_state? */
token_state = save_token_state ();
save_subst_varlist = subst_assign_varlist;
subst_assign_varlist = 0;
+#if defined (JOB_CONTROL)
+ save_pipeline (1); /* XXX only provides one save level */
+#endif
evalstring (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
+#if defined (JOB_CONTROL)
+ restore_pipeline (1);
+#endif
+
restore_token_state (token_state);
free (token_state);
@@ -367,6 +381,7 @@ run_pending_traps ()
}
pending_traps[sig] = 0;
+ running_trap = 0;
UNBLOCK_SIGNAL (oset);
}
diff --git a/variables.c b/variables.c
index d3ed0dac..59638457 100644
--- a/variables.c
+++ b/variables.c
@@ -166,6 +166,8 @@ static int export_env_size;
static int winsize_assignment; /* currently assigning to LINES or COLUMNS */
#endif
+static HASH_TABLE *last_table_searched; /* hash_lookup sets this */
+
/* Some forward declarations. */
static void create_variable_tables __P((void));
@@ -1762,6 +1764,10 @@ hash_lookup (name, hashed_vars)
BUCKET_CONTENTS *bucket;
bucket = hash_search (name, hashed_vars, 0);
+ /* If we find the name in HASHED_VARS, set LAST_TABLE_SEARCHED to that
+ table. */
+ if (bucket)
+ last_table_searched = hashed_vars;
return (bucket ? (SHELL_VAR *)bucket->data : (SHELL_VAR *)NULL);
}
@@ -1840,17 +1846,25 @@ find_variable_nameref (v)
{
int level;
char *newname;
+ SHELL_VAR *orig, *oldv;
level = 0;
+ orig = v;
while (v && nameref_p (v))
{
level++;
if (level > NAMEREF_MAX)
- return ((SHELL_VAR *)0); /* error message here? */
+ return ((SHELL_VAR *)0); /* error message here? */
newname = nameref_cell (v);
if (newname == 0 || *newname == '\0')
return ((SHELL_VAR *)0);
+ oldv = v;
v = find_variable_internal (newname, (expanding_redir == 0 && (assigning_in_environment || executing_builtin)));
+ if (v == orig || v == oldv)
+ {
+ internal_warning (_("%s: circular name reference"), orig->name);
+ return ((SHELL_VAR *)0);
+ }
}
return v;
}
@@ -2066,6 +2080,7 @@ find_variable (name)
{
SHELL_VAR *v;
+ last_table_searched = 0;
v = find_variable_internal (name, (expanding_redir == 0 && (assigning_in_environment || executing_builtin)));
if (v && nameref_p (v))
v = find_variable_nameref (v);
@@ -2186,6 +2201,21 @@ make_local_variable (name)
}
was_tmpvar = old_var && tempvar_p (old_var);
+ /* If we're making a local variable in a shell function, the temporary env
+ has already been merged into the function's variable context stack. We
+ can assume that a temporary var in the same context appears in the same
+ VAR_CONTEXT and can safely be returned without creating a new variable
+ (which results in duplicate names in the same VAR_CONTEXT->table */
+ /* We can't just test tmpvar_p because variables in the temporary env given
+ to a shell function appear in the function's local variable VAR_CONTEXT
+ but retain their tempvar attribute. We want temporary variables that are
+ found in temporary_env, hence the test for last_table_searched, which is
+ set in hash_lookup and only (so far) checked here. */
+ if (was_tmpvar && old_var->context == variable_context && last_table_searched != temporary_env)
+ {
+ VUNSETATTR (old_var, att_invisible);
+ return (old_var);
+ }
if (was_tmpvar)
tmp_value = value_cell (old_var);
@@ -2230,7 +2260,8 @@ make_local_variable (name)
/* If we found this variable in one of the temporary environments,
inherit its value. Watch to see if this causes problems with
- things like `x=4 local x'. */
+ things like `x=4 local x'. XXX - see above for temporary env
+ variables with the same context level as variable_context */
/* XXX - we should only do this if the variable is not an array. */
if (was_tmpvar)
var_setvalue (new_var, savestring (tmp_value));
@@ -2741,6 +2772,8 @@ bind_int_variable (lhs, rhs)
if (v && isint)
VSETATTR (v, att_integer);
+ VUNSETATTR (v, att_invisible);
+
return (v);
}
@@ -2841,13 +2874,14 @@ assign_in_env (word, flags)
WORD_DESC *word;
int flags;
{
- int offset;
+ int offset, aflags;
char *name, *temp, *value;
SHELL_VAR *var;
const char *string;
string = word->word;
+ aflags = 0;
offset = assignment (string, 0);
name = savestring (string);
value = (char *)NULL;
@@ -2858,7 +2892,10 @@ assign_in_env (word, flags)
/* ignore the `+' when assigning temporary environment */
if (name[offset - 1] == '+')
- name[offset - 1] = '\0';
+ {
+ name[offset - 1] = '\0';
+ aflags |= ASS_APPEND;
+ }
var = find_variable (name);
if (var && (readonly_p (var) || noassign_p (var)))
@@ -2871,6 +2908,13 @@ assign_in_env (word, flags)
temp = name + offset + 1;
value = expand_assignment_string_to_string (temp, 0);
+
+ if (var && (aflags & ASS_APPEND))
+ {
+ temp = make_variable_value (var, value, aflags);
+ FREE (value);
+ value = temp;
+ }
}
if (temporary_env == 0)
diff --git a/y.tab.c b/y.tab.c
index ec2020eb..465f54fc 100644
--- a/y.tab.c
+++ b/y.tab.c
@@ -168,7 +168,7 @@
/* Copy the first part of user declarations. */
-#line 21 "/Users/chet/src/bash/src/parse.y"
+#line 21 "/usr/homes/chet/src/bash/src/parse.y"
#include "config.h"
@@ -492,7 +492,7 @@ static REDIRECTEE redir;
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 324 "/Users/chet/src/bash/src/parse.y"
+#line 324 "/usr/homes/chet/src/bash/src/parse.y"
{
WORD_DESC *word; /* the word that we read. */
int number; /* the number that we read. */
@@ -2093,7 +2093,7 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 378 "/Users/chet/src/bash/src/parse.y"
+#line 378 "/usr/homes/chet/src/bash/src/parse.y"
{
/* Case of regular command. Discard the error
safety net,and return the command just parsed. */
@@ -2107,7 +2107,7 @@ yyreduce:
break;
case 3:
-#line 389 "/Users/chet/src/bash/src/parse.y"
+#line 389 "/usr/homes/chet/src/bash/src/parse.y"
{
/* Case of regular command, but not a very
interesting one. Return a NULL command. */
@@ -2119,7 +2119,7 @@ yyreduce:
break;
case 4:
-#line 398 "/Users/chet/src/bash/src/parse.y"
+#line 398 "/usr/homes/chet/src/bash/src/parse.y"
{
/* Error during parsing. Return NULL command. */
global_command = (COMMAND *)NULL;
@@ -2137,7 +2137,7 @@ yyreduce:
break;
case 5:
-#line 413 "/Users/chet/src/bash/src/parse.y"
+#line 413 "/usr/homes/chet/src/bash/src/parse.y"
{
/* Case of EOF seen by itself. Do ignoreeof or
not. */
@@ -2148,17 +2148,17 @@ yyreduce:
break;
case 6:
-#line 423 "/Users/chet/src/bash/src/parse.y"
+#line 423 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
break;
case 7:
-#line 425 "/Users/chet/src/bash/src/parse.y"
+#line 425 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.word_list) = make_word_list ((yyvsp[(2) - (2)].word), (yyvsp[(1) - (2)].word_list)); }
break;
case 8:
-#line 429 "/Users/chet/src/bash/src/parse.y"
+#line 429 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 1;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2167,7 +2167,7 @@ yyreduce:
break;
case 9:
-#line 435 "/Users/chet/src/bash/src/parse.y"
+#line 435 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 0;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2176,7 +2176,7 @@ yyreduce:
break;
case 10:
-#line 441 "/Users/chet/src/bash/src/parse.y"
+#line 441 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2185,7 +2185,7 @@ yyreduce:
break;
case 11:
-#line 447 "/Users/chet/src/bash/src/parse.y"
+#line 447 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2194,7 +2194,7 @@ yyreduce:
break;
case 12:
-#line 453 "/Users/chet/src/bash/src/parse.y"
+#line 453 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2203,7 +2203,7 @@ yyreduce:
break;
case 13:
-#line 459 "/Users/chet/src/bash/src/parse.y"
+#line 459 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2212,7 +2212,7 @@ yyreduce:
break;
case 14:
-#line 465 "/Users/chet/src/bash/src/parse.y"
+#line 465 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 1;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2221,7 +2221,7 @@ yyreduce:
break;
case 15:
-#line 471 "/Users/chet/src/bash/src/parse.y"
+#line 471 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2230,7 +2230,7 @@ yyreduce:
break;
case 16:
-#line 477 "/Users/chet/src/bash/src/parse.y"
+#line 477 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2239,7 +2239,7 @@ yyreduce:
break;
case 17:
-#line 483 "/Users/chet/src/bash/src/parse.y"
+#line 483 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 1;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2248,7 +2248,7 @@ yyreduce:
break;
case 18:
-#line 489 "/Users/chet/src/bash/src/parse.y"
+#line 489 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2257,7 +2257,7 @@ yyreduce:
break;
case 19:
-#line 495 "/Users/chet/src/bash/src/parse.y"
+#line 495 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2266,7 +2266,7 @@ yyreduce:
break;
case 20:
-#line 501 "/Users/chet/src/bash/src/parse.y"
+#line 501 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 0;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2275,7 +2275,7 @@ yyreduce:
break;
case 21:
-#line 507 "/Users/chet/src/bash/src/parse.y"
+#line 507 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2284,7 +2284,7 @@ yyreduce:
break;
case 22:
-#line 513 "/Users/chet/src/bash/src/parse.y"
+#line 513 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2293,7 +2293,7 @@ yyreduce:
break;
case 23:
-#line 519 "/Users/chet/src/bash/src/parse.y"
+#line 519 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 0;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2303,7 +2303,7 @@ yyreduce:
break;
case 24:
-#line 526 "/Users/chet/src/bash/src/parse.y"
+#line 526 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2313,7 +2313,7 @@ yyreduce:
break;
case 25:
-#line 533 "/Users/chet/src/bash/src/parse.y"
+#line 533 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2323,7 +2323,7 @@ yyreduce:
break;
case 26:
-#line 540 "/Users/chet/src/bash/src/parse.y"
+#line 540 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 0;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2333,7 +2333,7 @@ yyreduce:
break;
case 27:
-#line 547 "/Users/chet/src/bash/src/parse.y"
+#line 547 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2343,7 +2343,7 @@ yyreduce:
break;
case 28:
-#line 554 "/Users/chet/src/bash/src/parse.y"
+#line 554 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2353,7 +2353,7 @@ yyreduce:
break;
case 29:
-#line 561 "/Users/chet/src/bash/src/parse.y"
+#line 561 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 0;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2362,7 +2362,7 @@ yyreduce:
break;
case 30:
-#line 567 "/Users/chet/src/bash/src/parse.y"
+#line 567 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2371,7 +2371,7 @@ yyreduce:
break;
case 31:
-#line 573 "/Users/chet/src/bash/src/parse.y"
+#line 573 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2380,7 +2380,7 @@ yyreduce:
break;
case 32:
-#line 579 "/Users/chet/src/bash/src/parse.y"
+#line 579 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 0;
redir.dest = (yyvsp[(2) - (2)].number);
@@ -2389,7 +2389,7 @@ yyreduce:
break;
case 33:
-#line 585 "/Users/chet/src/bash/src/parse.y"
+#line 585 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.dest = (yyvsp[(3) - (3)].number);
@@ -2398,7 +2398,7 @@ yyreduce:
break;
case 34:
-#line 591 "/Users/chet/src/bash/src/parse.y"
+#line 591 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.dest = (yyvsp[(3) - (3)].number);
@@ -2407,7 +2407,7 @@ yyreduce:
break;
case 35:
-#line 597 "/Users/chet/src/bash/src/parse.y"
+#line 597 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 1;
redir.dest = (yyvsp[(2) - (2)].number);
@@ -2416,7 +2416,7 @@ yyreduce:
break;
case 36:
-#line 603 "/Users/chet/src/bash/src/parse.y"
+#line 603 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.dest = (yyvsp[(3) - (3)].number);
@@ -2425,7 +2425,7 @@ yyreduce:
break;
case 37:
-#line 609 "/Users/chet/src/bash/src/parse.y"
+#line 609 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.dest = (yyvsp[(3) - (3)].number);
@@ -2434,7 +2434,7 @@ yyreduce:
break;
case 38:
-#line 615 "/Users/chet/src/bash/src/parse.y"
+#line 615 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 0;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2443,7 +2443,7 @@ yyreduce:
break;
case 39:
-#line 621 "/Users/chet/src/bash/src/parse.y"
+#line 621 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2452,7 +2452,7 @@ yyreduce:
break;
case 40:
-#line 627 "/Users/chet/src/bash/src/parse.y"
+#line 627 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2461,7 +2461,7 @@ yyreduce:
break;
case 41:
-#line 633 "/Users/chet/src/bash/src/parse.y"
+#line 633 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 1;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2470,7 +2470,7 @@ yyreduce:
break;
case 42:
-#line 639 "/Users/chet/src/bash/src/parse.y"
+#line 639 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2479,7 +2479,7 @@ yyreduce:
break;
case 43:
-#line 645 "/Users/chet/src/bash/src/parse.y"
+#line 645 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.filename = (yyvsp[(3) - (3)].word);
@@ -2488,7 +2488,7 @@ yyreduce:
break;
case 44:
-#line 651 "/Users/chet/src/bash/src/parse.y"
+#line 651 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 1;
redir.dest = 0;
@@ -2497,7 +2497,7 @@ yyreduce:
break;
case 45:
-#line 657 "/Users/chet/src/bash/src/parse.y"
+#line 657 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.dest = 0;
@@ -2506,7 +2506,7 @@ yyreduce:
break;
case 46:
-#line 663 "/Users/chet/src/bash/src/parse.y"
+#line 663 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.dest = 0;
@@ -2515,7 +2515,7 @@ yyreduce:
break;
case 47:
-#line 669 "/Users/chet/src/bash/src/parse.y"
+#line 669 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 0;
redir.dest = 0;
@@ -2524,7 +2524,7 @@ yyreduce:
break;
case 48:
-#line 675 "/Users/chet/src/bash/src/parse.y"
+#line 675 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = (yyvsp[(1) - (3)].number);
redir.dest = 0;
@@ -2533,7 +2533,7 @@ yyreduce:
break;
case 49:
-#line 681 "/Users/chet/src/bash/src/parse.y"
+#line 681 "/usr/homes/chet/src/bash/src/parse.y"
{
source.filename = (yyvsp[(1) - (3)].word);
redir.dest = 0;
@@ -2542,7 +2542,7 @@ yyreduce:
break;
case 50:
-#line 687 "/Users/chet/src/bash/src/parse.y"
+#line 687 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 1;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2551,7 +2551,7 @@ yyreduce:
break;
case 51:
-#line 693 "/Users/chet/src/bash/src/parse.y"
+#line 693 "/usr/homes/chet/src/bash/src/parse.y"
{
source.dest = 1;
redir.filename = (yyvsp[(2) - (2)].word);
@@ -2560,29 +2560,29 @@ yyreduce:
break;
case 52:
-#line 701 "/Users/chet/src/bash/src/parse.y"
+#line 701 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
break;
case 53:
-#line 703 "/Users/chet/src/bash/src/parse.y"
+#line 703 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
break;
case 54:
-#line 705 "/Users/chet/src/bash/src/parse.y"
+#line 705 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.element).redirect = (yyvsp[(1) - (1)].redirect); (yyval.element).word = 0; }
break;
case 55:
-#line 709 "/Users/chet/src/bash/src/parse.y"
+#line 709 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.redirect) = (yyvsp[(1) - (1)].redirect);
}
break;
case 56:
-#line 713 "/Users/chet/src/bash/src/parse.y"
+#line 713 "/usr/homes/chet/src/bash/src/parse.y"
{
register REDIRECT *t;
@@ -2594,27 +2594,27 @@ yyreduce:
break;
case 57:
-#line 724 "/Users/chet/src/bash/src/parse.y"
+#line 724 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_simple_command ((yyvsp[(1) - (1)].element), (COMMAND *)NULL); }
break;
case 58:
-#line 726 "/Users/chet/src/bash/src/parse.y"
+#line 726 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_simple_command ((yyvsp[(2) - (2)].element), (yyvsp[(1) - (2)].command)); }
break;
case 59:
-#line 730 "/Users/chet/src/bash/src/parse.y"
+#line 730 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = clean_simple_command ((yyvsp[(1) - (1)].command)); }
break;
case 60:
-#line 732 "/Users/chet/src/bash/src/parse.y"
+#line 732 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 61:
-#line 734 "/Users/chet/src/bash/src/parse.y"
+#line 734 "/usr/homes/chet/src/bash/src/parse.y"
{
COMMAND *tc;
@@ -2633,72 +2633,72 @@ yyreduce:
break;
case 62:
-#line 750 "/Users/chet/src/bash/src/parse.y"
+#line 750 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 63:
-#line 752 "/Users/chet/src/bash/src/parse.y"
+#line 752 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 64:
-#line 756 "/Users/chet/src/bash/src/parse.y"
+#line 756 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 65:
-#line 758 "/Users/chet/src/bash/src/parse.y"
+#line 758 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 66:
-#line 760 "/Users/chet/src/bash/src/parse.y"
+#line 760 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_while_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
break;
case 67:
-#line 762 "/Users/chet/src/bash/src/parse.y"
+#line 762 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_until_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
break;
case 68:
-#line 764 "/Users/chet/src/bash/src/parse.y"
+#line 764 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 69:
-#line 766 "/Users/chet/src/bash/src/parse.y"
+#line 766 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 70:
-#line 768 "/Users/chet/src/bash/src/parse.y"
+#line 768 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 71:
-#line 770 "/Users/chet/src/bash/src/parse.y"
+#line 770 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 72:
-#line 772 "/Users/chet/src/bash/src/parse.y"
+#line 772 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 73:
-#line 774 "/Users/chet/src/bash/src/parse.y"
+#line 774 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 74:
-#line 776 "/Users/chet/src/bash/src/parse.y"
+#line 776 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 75:
-#line 780 "/Users/chet/src/bash/src/parse.y"
+#line 780 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2706,7 +2706,7 @@ yyreduce:
break;
case 76:
-#line 785 "/Users/chet/src/bash/src/parse.y"
+#line 785 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2714,7 +2714,7 @@ yyreduce:
break;
case 77:
-#line 790 "/Users/chet/src/bash/src/parse.y"
+#line 790 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2722,7 +2722,7 @@ yyreduce:
break;
case 78:
-#line 795 "/Users/chet/src/bash/src/parse.y"
+#line 795 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2730,7 +2730,7 @@ yyreduce:
break;
case 79:
-#line 800 "/Users/chet/src/bash/src/parse.y"
+#line 800 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2738,7 +2738,7 @@ yyreduce:
break;
case 80:
-#line 805 "/Users/chet/src/bash/src/parse.y"
+#line 805 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2746,7 +2746,7 @@ yyreduce:
break;
case 81:
-#line 810 "/Users/chet/src/bash/src/parse.y"
+#line 810 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2754,7 +2754,7 @@ yyreduce:
break;
case 82:
-#line 815 "/Users/chet/src/bash/src/parse.y"
+#line 815 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2762,7 +2762,7 @@ yyreduce:
break;
case 83:
-#line 822 "/Users/chet/src/bash/src/parse.y"
+#line 822 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
if (word_top > 0) word_top--;
@@ -2770,7 +2770,7 @@ yyreduce:
break;
case 84:
-#line 827 "/Users/chet/src/bash/src/parse.y"
+#line 827 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
if (word_top > 0) word_top--;
@@ -2778,7 +2778,7 @@ yyreduce:
break;
case 85:
-#line 832 "/Users/chet/src/bash/src/parse.y"
+#line 832 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
if (word_top > 0) word_top--;
@@ -2786,7 +2786,7 @@ yyreduce:
break;
case 86:
-#line 837 "/Users/chet/src/bash/src/parse.y"
+#line 837 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
if (word_top > 0) word_top--;
@@ -2794,7 +2794,7 @@ yyreduce:
break;
case 87:
-#line 844 "/Users/chet/src/bash/src/parse.y"
+#line 844 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2802,7 +2802,7 @@ yyreduce:
break;
case 88:
-#line 849 "/Users/chet/src/bash/src/parse.y"
+#line 849 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2810,7 +2810,7 @@ yyreduce:
break;
case 89:
-#line 854 "/Users/chet/src/bash/src/parse.y"
+#line 854 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2818,7 +2818,7 @@ yyreduce:
break;
case 90:
-#line 859 "/Users/chet/src/bash/src/parse.y"
+#line 859 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2826,7 +2826,7 @@ yyreduce:
break;
case 91:
-#line 864 "/Users/chet/src/bash/src/parse.y"
+#line 864 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2834,7 +2834,7 @@ yyreduce:
break;
case 92:
-#line 869 "/Users/chet/src/bash/src/parse.y"
+#line 869 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2842,7 +2842,7 @@ yyreduce:
break;
case 93:
-#line 876 "/Users/chet/src/bash/src/parse.y"
+#line 876 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (PATTERN_LIST *)NULL, word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2850,7 +2850,7 @@ yyreduce:
break;
case 94:
-#line 881 "/Users/chet/src/bash/src/parse.y"
+#line 881 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_case_command ((yyvsp[(2) - (7)].word), (yyvsp[(5) - (7)].pattern), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2858,7 +2858,7 @@ yyreduce:
break;
case 95:
-#line 886 "/Users/chet/src/bash/src/parse.y"
+#line 886 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (yyvsp[(5) - (6)].pattern), word_lineno[word_top]);
if (word_top > 0) word_top--;
@@ -2866,27 +2866,27 @@ yyreduce:
break;
case 96:
-#line 893 "/Users/chet/src/bash/src/parse.y"
+#line 893 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_function_def ((yyvsp[(1) - (5)].word), (yyvsp[(5) - (5)].command), function_dstart, function_bstart); }
break;
case 97:
-#line 896 "/Users/chet/src/bash/src/parse.y"
+#line 896 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_function_def ((yyvsp[(2) - (6)].word), (yyvsp[(6) - (6)].command), function_dstart, function_bstart); }
break;
case 98:
-#line 899 "/Users/chet/src/bash/src/parse.y"
+#line 899 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_function_def ((yyvsp[(2) - (4)].word), (yyvsp[(4) - (4)].command), function_dstart, function_bstart); }
break;
case 99:
-#line 903 "/Users/chet/src/bash/src/parse.y"
+#line 903 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 100:
-#line 905 "/Users/chet/src/bash/src/parse.y"
+#line 905 "/usr/homes/chet/src/bash/src/parse.y"
{
COMMAND *tc;
@@ -2918,7 +2918,7 @@ yyreduce:
break;
case 101:
-#line 936 "/Users/chet/src/bash/src/parse.y"
+#line 936 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_subshell_command ((yyvsp[(2) - (3)].command));
(yyval.command)->flags |= CMD_WANT_SUBSHELL;
@@ -2926,7 +2926,7 @@ yyreduce:
break;
case 102:
-#line 943 "/Users/chet/src/bash/src/parse.y"
+#line 943 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_coproc_command ("COPROC", (yyvsp[(2) - (2)].command));
(yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
@@ -2934,7 +2934,7 @@ yyreduce:
break;
case 103:
-#line 948 "/Users/chet/src/bash/src/parse.y"
+#line 948 "/usr/homes/chet/src/bash/src/parse.y"
{
COMMAND *tc;
@@ -2954,7 +2954,7 @@ yyreduce:
break;
case 104:
-#line 965 "/Users/chet/src/bash/src/parse.y"
+#line 965 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_coproc_command ((yyvsp[(2) - (3)].word)->word, (yyvsp[(3) - (3)].command));
(yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
@@ -2962,7 +2962,7 @@ yyreduce:
break;
case 105:
-#line 970 "/Users/chet/src/bash/src/parse.y"
+#line 970 "/usr/homes/chet/src/bash/src/parse.y"
{
COMMAND *tc;
@@ -2982,7 +2982,7 @@ yyreduce:
break;
case 106:
-#line 987 "/Users/chet/src/bash/src/parse.y"
+#line 987 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = make_coproc_command ("COPROC", clean_simple_command ((yyvsp[(2) - (2)].command)));
(yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
@@ -2990,117 +2990,117 @@ yyreduce:
break;
case 107:
-#line 994 "/Users/chet/src/bash/src/parse.y"
+#line 994 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (COMMAND *)NULL); }
break;
case 108:
-#line 996 "/Users/chet/src/bash/src/parse.y"
+#line 996 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_if_command ((yyvsp[(2) - (7)].command), (yyvsp[(4) - (7)].command), (yyvsp[(6) - (7)].command)); }
break;
case 109:
-#line 998 "/Users/chet/src/bash/src/parse.y"
+#line 998 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(5) - (6)].command)); }
break;
case 110:
-#line 1003 "/Users/chet/src/bash/src/parse.y"
+#line 1003 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_group_command ((yyvsp[(2) - (3)].command)); }
break;
case 111:
-#line 1007 "/Users/chet/src/bash/src/parse.y"
+#line 1007 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_arith_command ((yyvsp[(1) - (1)].word_list)); }
break;
case 112:
-#line 1011 "/Users/chet/src/bash/src/parse.y"
+#line 1011 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(2) - (3)].command); }
break;
case 113:
-#line 1015 "/Users/chet/src/bash/src/parse.y"
+#line 1015 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_if_command ((yyvsp[(2) - (4)].command), (yyvsp[(4) - (4)].command), (COMMAND *)NULL); }
break;
case 114:
-#line 1017 "/Users/chet/src/bash/src/parse.y"
+#line 1017 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(6) - (6)].command)); }
break;
case 115:
-#line 1019 "/Users/chet/src/bash/src/parse.y"
+#line 1019 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (yyvsp[(5) - (5)].command)); }
break;
case 117:
-#line 1024 "/Users/chet/src/bash/src/parse.y"
+#line 1024 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyvsp[(2) - (2)].pattern)->next = (yyvsp[(1) - (2)].pattern); (yyval.pattern) = (yyvsp[(2) - (2)].pattern); }
break;
case 118:
-#line 1028 "/Users/chet/src/bash/src/parse.y"
+#line 1028 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (yyvsp[(4) - (4)].command)); }
break;
case 119:
-#line 1030 "/Users/chet/src/bash/src/parse.y"
+#line 1030 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (COMMAND *)NULL); }
break;
case 120:
-#line 1032 "/Users/chet/src/bash/src/parse.y"
+#line 1032 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (yyvsp[(5) - (5)].command)); }
break;
case 121:
-#line 1034 "/Users/chet/src/bash/src/parse.y"
+#line 1034 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (COMMAND *)NULL); }
break;
case 122:
-#line 1038 "/Users/chet/src/bash/src/parse.y"
+#line 1038 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
break;
case 123:
-#line 1040 "/Users/chet/src/bash/src/parse.y"
+#line 1040 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
break;
case 124:
-#line 1042 "/Users/chet/src/bash/src/parse.y"
+#line 1042 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
break;
case 125:
-#line 1044 "/Users/chet/src/bash/src/parse.y"
+#line 1044 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
break;
case 126:
-#line 1046 "/Users/chet/src/bash/src/parse.y"
+#line 1046 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_TESTNEXT; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
break;
case 127:
-#line 1048 "/Users/chet/src/bash/src/parse.y"
+#line 1048 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_TESTNEXT; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
break;
case 128:
-#line 1052 "/Users/chet/src/bash/src/parse.y"
+#line 1052 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
break;
case 129:
-#line 1054 "/Users/chet/src/bash/src/parse.y"
+#line 1054 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.word_list) = make_word_list ((yyvsp[(3) - (3)].word), (yyvsp[(1) - (3)].word_list)); }
break;
case 130:
-#line 1063 "/Users/chet/src/bash/src/parse.y"
+#line 1063 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = (yyvsp[(2) - (2)].command);
if (need_here_doc)
@@ -3109,14 +3109,14 @@ yyreduce:
break;
case 132:
-#line 1072 "/Users/chet/src/bash/src/parse.y"
+#line 1072 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = (yyvsp[(2) - (2)].command);
}
break;
case 134:
-#line 1079 "/Users/chet/src/bash/src/parse.y"
+#line 1079 "/usr/homes/chet/src/bash/src/parse.y"
{
if ((yyvsp[(1) - (3)].command)->type == cm_connection)
(yyval.command) = connect_async_list ((yyvsp[(1) - (3)].command), (COMMAND *)NULL, '&');
@@ -3126,17 +3126,17 @@ yyreduce:
break;
case 136:
-#line 1090 "/Users/chet/src/bash/src/parse.y"
+#line 1090 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
break;
case 137:
-#line 1092 "/Users/chet/src/bash/src/parse.y"
+#line 1092 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
break;
case 138:
-#line 1094 "/Users/chet/src/bash/src/parse.y"
+#line 1094 "/usr/homes/chet/src/bash/src/parse.y"
{
if ((yyvsp[(1) - (4)].command)->type == cm_connection)
(yyval.command) = connect_async_list ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '&');
@@ -3146,37 +3146,37 @@ yyreduce:
break;
case 139:
-#line 1101 "/Users/chet/src/bash/src/parse.y"
+#line 1101 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
break;
case 140:
-#line 1103 "/Users/chet/src/bash/src/parse.y"
+#line 1103 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
break;
case 141:
-#line 1105 "/Users/chet/src/bash/src/parse.y"
+#line 1105 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 144:
-#line 1113 "/Users/chet/src/bash/src/parse.y"
+#line 1113 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.number) = '\n'; }
break;
case 145:
-#line 1115 "/Users/chet/src/bash/src/parse.y"
+#line 1115 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.number) = ';'; }
break;
case 146:
-#line 1117 "/Users/chet/src/bash/src/parse.y"
+#line 1117 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.number) = yacc_EOF; }
break;
case 149:
-#line 1131 "/Users/chet/src/bash/src/parse.y"
+#line 1131 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = (yyvsp[(1) - (1)].command);
if (need_here_doc)
@@ -3192,7 +3192,7 @@ yyreduce:
break;
case 150:
-#line 1144 "/Users/chet/src/bash/src/parse.y"
+#line 1144 "/usr/homes/chet/src/bash/src/parse.y"
{
if ((yyvsp[(1) - (2)].command)->type == cm_connection)
(yyval.command) = connect_async_list ((yyvsp[(1) - (2)].command), (COMMAND *)NULL, '&');
@@ -3211,7 +3211,7 @@ yyreduce:
break;
case 151:
-#line 1160 "/Users/chet/src/bash/src/parse.y"
+#line 1160 "/usr/homes/chet/src/bash/src/parse.y"
{
(yyval.command) = (yyvsp[(1) - (2)].command);
if (need_here_doc)
@@ -3227,17 +3227,17 @@ yyreduce:
break;
case 152:
-#line 1175 "/Users/chet/src/bash/src/parse.y"
+#line 1175 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
break;
case 153:
-#line 1177 "/Users/chet/src/bash/src/parse.y"
+#line 1177 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
break;
case 154:
-#line 1179 "/Users/chet/src/bash/src/parse.y"
+#line 1179 "/usr/homes/chet/src/bash/src/parse.y"
{
if ((yyvsp[(1) - (3)].command)->type == cm_connection)
(yyval.command) = connect_async_list ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), '&');
@@ -3247,22 +3247,22 @@ yyreduce:
break;
case 155:
-#line 1186 "/Users/chet/src/bash/src/parse.y"
+#line 1186 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = command_connect ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), ';'); }
break;
case 156:
-#line 1189 "/Users/chet/src/bash/src/parse.y"
+#line 1189 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 157:
-#line 1193 "/Users/chet/src/bash/src/parse.y"
+#line 1193 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 158:
-#line 1195 "/Users/chet/src/bash/src/parse.y"
+#line 1195 "/usr/homes/chet/src/bash/src/parse.y"
{
if ((yyvsp[(2) - (2)].command))
(yyvsp[(2) - (2)].command)->flags ^= CMD_INVERT_RETURN; /* toggle */
@@ -3271,7 +3271,7 @@ yyreduce:
break;
case 159:
-#line 1201 "/Users/chet/src/bash/src/parse.y"
+#line 1201 "/usr/homes/chet/src/bash/src/parse.y"
{
if ((yyvsp[(2) - (2)].command))
(yyvsp[(2) - (2)].command)->flags |= (yyvsp[(1) - (2)].number);
@@ -3280,7 +3280,7 @@ yyreduce:
break;
case 160:
-#line 1207 "/Users/chet/src/bash/src/parse.y"
+#line 1207 "/usr/homes/chet/src/bash/src/parse.y"
{
ELEMENT x;
@@ -3300,7 +3300,7 @@ yyreduce:
break;
case 161:
-#line 1224 "/Users/chet/src/bash/src/parse.y"
+#line 1224 "/usr/homes/chet/src/bash/src/parse.y"
{
ELEMENT x;
@@ -3321,12 +3321,12 @@ yyreduce:
break;
case 162:
-#line 1244 "/Users/chet/src/bash/src/parse.y"
+#line 1244 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '|'); }
break;
case 163:
-#line 1246 "/Users/chet/src/bash/src/parse.y"
+#line 1246 "/usr/homes/chet/src/bash/src/parse.y"
{
/* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
COMMAND *tc;
@@ -3352,22 +3352,22 @@ yyreduce:
break;
case 164:
-#line 1269 "/Users/chet/src/bash/src/parse.y"
+#line 1269 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.command) = (yyvsp[(1) - (1)].command); }
break;
case 165:
-#line 1273 "/Users/chet/src/bash/src/parse.y"
+#line 1273 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.number) = CMD_TIME_PIPELINE; }
break;
case 166:
-#line 1275 "/Users/chet/src/bash/src/parse.y"
+#line 1275 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
break;
case 167:
-#line 1277 "/Users/chet/src/bash/src/parse.y"
+#line 1277 "/usr/homes/chet/src/bash/src/parse.y"
{ (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
break;
@@ -3587,7 +3587,7 @@ yyreturn:
}
-#line 1279 "/Users/chet/src/bash/src/parse.y"
+#line 1279 "/usr/homes/chet/src/bash/src/parse.y"
/* Initial size to allocate for tokens, and the
@@ -5613,6 +5613,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
treat single quotes as special when inside a double-quoted
${...}. This logic must agree with subst.c:extract_dollar_brace_string
since they share the same defines. */
+ /* FLAG POSIX INTERP 221 */
if (flags & P_DOLBRACE)
{
/* ${param%[%]word} */
@@ -5623,7 +5624,7 @@ parse_matched_pair (qc, open, close, lenp, flags)
dolbrace_state = DOLBRACE_QUOTE;
/* ${param/[/]pat/rep} */
else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '/' && retind > 1)
- dolbrace_state = DOLBRACE_QUOTE;
+ dolbrace_state = DOLBRACE_QUOTE2; /* XXX */
/* ${param^[^]pat} */
else if MBTEST(dolbrace_state == DOLBRACE_PARAM && ch == '^' && retind > 1)
dolbrace_state = DOLBRACE_QUOTE;
@@ -5665,7 +5666,18 @@ parse_matched_pair (qc, open, close, lenp, flags)
ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
xfree (nestret);
- if ((rflags & P_DQUOTE) == 0)
+ /* If we're parsing a double-quoted brace expansion and we are
+ not in a place where single quotes are treated specially,
+ make sure we single-quote the results of the ansi
+ expansion because quote removal should remove them later */
+ /* FLAG POSIX INTERP 221 */
+ if ((shell_compatibility_level > 42) && (rflags & P_DQUOTE) && (dolbrace_state == DOLBRACE_QUOTE2) && (flags & P_DOLBRACE))
+ {
+ nestret = sh_single_quote (ttrans);
+ free (ttrans);
+ nestlen = strlen (nestret);
+ }
+ else if ((rflags & P_DQUOTE) == 0)
{
nestret = sh_single_quote (ttrans);
free (ttrans);
@@ -7656,9 +7668,13 @@ decode_prompt_string (string)
#undef ROOT_PATH
#undef DOUBLE_SLASH_ROOT
else
- /* polite_directory_format is guaranteed to return a string
- no longer than PATH_MAX - 1 characters. */
- strcpy (t_string, polite_directory_format (t_string));
+ {
+ /* polite_directory_format is guaranteed to return a string
+ no longer than PATH_MAX - 1 characters. */
+ temp = polite_directory_format (t_string);
+ if (temp != t_string)
+ strcpy (t_string, temp);
+ }
temp = trim_pathname (t_string, PATH_MAX - 1);
/* If we're going to be expanding the prompt string later,
diff --git a/y.tab.h b/y.tab.h
index d79a07c0..b280e409 100644
--- a/y.tab.h
+++ b/y.tab.h
@@ -142,7 +142,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 324 "/Users/chet/src/bash/src/parse.y"
+#line 324 "/usr/homes/chet/src/bash/src/parse.y"
{
WORD_DESC *word; /* the word that we read. */
int number; /* the number that we read. */