invisible. Pointed out by Mart Frauenlab <mart.frauenlob@chello.at>
- change array_value_internal to return NULL for variable which has
not been set
+
+ 1/30
+ ----
+bashline.c
+ - in command_word_completion_function, don't call glob_pattern_p
+ on hint -- use the already-computed `globpat'. At this point,
+ hint might contain an already-dequoted globbing character, but
+ glob_matches will be NULL. Fixes bug reported by
+ coyote@wariat.org.pl
arrayfunc.c
- fix array_keys to return NULL if the variable is not set or
invisible. Pointed out by Mart Frauenlab <mart.frauenlob@chello.at>
+ - change array_value_internal to return NULL for variable which has
+ not been set
tests/arith.right f
tests/arith1.sub f
tests/arith2.sub f
+tests/arith3.sub f
tests/array.tests f
tests/array.right f
tests/array1.sub f
mailcheck.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
make_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
nojobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
-parse.y: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+y.tab.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
pcomplete.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
pcomplib.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
print_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
'configure.in'
],
{
- '_LT_AC_TAGCONFIG' => 1,
'AM_PROG_F77_C_O' => 1,
- 'AC_INIT' => 1,
+ '_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1,
- '_AM_COND_IF' => 1,
+ 'AC_INIT' => 1,
'AC_CANONICAL_TARGET' => 1,
- 'AC_SUBST' => 1,
+ '_AM_COND_IF' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
- 'AC_FC_SRCEXT' => 1,
+ 'AC_SUBST' => 1,
'AC_CANONICAL_HOST' => 1,
+ 'AC_FC_SRCEXT' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
- 'AC_REQUIRE_AUX_FILE' => 1,
'AC_CONFIG_LINKS' => 1,
- 'm4_sinclude' => 1,
+ 'AC_REQUIRE_AUX_FILE' => 1,
'LT_SUPPORTED_TAG' => 1,
+ 'm4_sinclude' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'_m4_warn' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_FC_FREEFORM' => 1,
'AH_OUTPUT' => 1,
- '_AM_SUBST_NOTMAKE' => 1,
'AC_CONFIG_AUX_DIR' => 1,
- 'sinclude' => 1,
- 'm4_pattern_allow' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
'AM_PROG_CC_C_O' => 1,
- 'AC_CANONICAL_SYSTEM' => 1,
+ 'm4_pattern_allow' => 1,
+ 'sinclude' => 1,
'AM_CONDITIONAL' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'm4_include' => 1,
a single match (multiple matches that end up reducing the number of
characters in the common prefix are bad) will ever be returned on
regular completion. */
- if (glob_pattern_p (hint))
+ if (globpat)
{
if (state == 0)
{
a single match (multiple matches that end up reducing the number of
characters in the common prefix are bad) will ever be returned on
regular completion. */
+#if 1
+ if (globpat)
+#else
if (glob_pattern_p (hint))
+#endif
{
if (state == 0)
{
putx(c)
int c;
{
- return (putc (c, rl_outstream));
+ int x;
+
+ x = putc (c, rl_outstream);
+ return (x);
}
static int
char *ret, *nestret, *ttrans, *heredelim;
int retind, retsize, rflags, hdlen;
+#if 0 /* XXX - bash-4.2 -- jwm@horde.net */
+ /* Assume $(( introduces arithmetic command and parse accordingly. */
+ peekc = shell_getc (0);
+ shell_ungetc (peekc);
+ if (peekc == '(')
+ return (parse_matched_pair (qc, open, close, lenp, 0));
+#endif
+
/*itrace("parse_comsub: qc = `%c' open = %c close = %c", qc, open, close);*/
count = 1;
tflags = LEX_RESWDOK;
-BUILD_DIR=/usr/local/build/bash/bash-current
+BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
-7
7
7
+1
+1
+4
+5
+-3
+2
+4
+10000
+10000
8 12
-./arith.tests: line 274: ((: x=9 y=41 : syntax error in expression (error token is "y=41 ")
-./arith.tests: line 278: a b: syntax error in expression (error token is "b")
-./arith.tests: line 279: ((: a b: syntax error in expression (error token is "b")
+./arith.tests: line 275: ((: x=9 y=41 : syntax error in expression (error token is "y=41 ")
+./arith.tests: line 279: a b: syntax error in expression (error token is "b")
+./arith.tests: line 280: ((: a b: syntax error in expression (error token is "b")
42
42
42
42
42
42
-./arith.tests: line 290: b[c]d: syntax error in expression (error token is "d")
+./arith.tests: line 291: b[c]d: syntax error in expression (error token is "d")
${THIS_SH} ./arith1.sub
${THIS_SH} ./arith2.sub
+${THIS_SH} ./arith3.sub
x=4
y=7
--- /dev/null
+RANDOM=42
+(( dice[RANDOM%6+1 + RANDOM%6+1]++ ))
+echo ${dice[5]}
+
+(( ++dice[RANDOM%6+1 + RANDOM%6+1] ))
+echo ${dice[6]}
+
+v=4
+DIND=20
+
+(( dice[DIND%6 + 1]=v ))
+echo ${dice[3]}
+
+RANDOM=42
+
+(( dice[RANDOM%6+1 + RANDOM%6+1]+=v ))
+echo ${dice[5]}
+
+(( dice[RANDOM%6+1 + RANDOM%6+1]-=v ))
+echo ${dice[6]}
+
+(( dice[RANDOM%6+1 + RANDOM%6+1]+=2 ))
+echo ${dice[11]}
+
+(( dice[RANDOM%6+1 + RANDOM%6+1]*=2 ))
+echo ${dice[11]}
+
+unset dice1 dice2
+RANDOM=42
+
+for i in {1..10000}; do ((dice1[$RANDOM%6+1 + $RANDOM%6+1]++)); done;
+unset t; for i in ${dice1[@]}; do ((t+=i)); done; echo $t
+
+foo="${dice1[@]}"
+
+RANDOM=42
+
+for i in {1..10000}; do ((dice2[RANDOM%6+1 + RANDOM%6+1]++)); done;
+unset t; for i in ${dice2[@]}; do ((t+=i)); done; echo $t
+
+bar="${dice2[@]}"
+
+if [ "$foo" != "$bar" ]; then
+ echo "random sequences differ"
+fi