From f4b417c62a4f272c4cf9a074d0f7a3a97201f9db Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Tue, 17 Apr 2012 11:23:35 +0200 Subject: Update to upstream bash 4.2 This upgrades bash to from 4.1-rc to 4.2-release. See CWRU/changelog for changes. Change-Id: I926269c300cf44fa25964b5b375a148fcf11c4b7 --- braces.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'braces.c') diff --git a/braces.c b/braces.c index 45abe45..2febed7 100644 --- a/braces.c +++ b/braces.c @@ -63,7 +63,7 @@ static const int brace_arg_separator = ','; static int brace_gobbler __P((char *, size_t, int *, int)); static char **expand_amble __P((char *, size_t, int)); static char **expand_seqterm __P((char *, size_t)); -static char **mkseq __P((int, int, int, int, int)); +static char **mkseq __P((intmax_t, intmax_t, int, int, int)); static char **array_concat __P((char **, char **)); #else static int brace_gobbler (); @@ -307,13 +307,15 @@ expand_amble (text, tlen, flags) static char ** mkseq (start, end, incr, type, width) - int start, end, incr, type, width; + intmax_t start, end; + int incr, type, width; { - int n, i; + intmax_t n; + int i; char **result, *t; - n = abs (end - start) + 1; - result = strvec_create (n + 1); + i = abs (end - start) + 1; + result = strvec_create (i + 1); if (incr == 0) incr = 1; @@ -335,8 +337,9 @@ mkseq (start, end, incr, type, width) result[i++] = itos (n); else if (type == ST_ZINT) { - int len; - len = asprintf (&t, "%0*d", width, n); + int len, arg; + arg = n; + len = asprintf (&t, "%0*d", width, arg); result[i++] = t; } else @@ -362,7 +365,8 @@ expand_seqterm (text, tlen) size_t tlen; { char *t, *lhs, *rhs; - int i, lhs_t, rhs_t, lhs_v, rhs_v, incr, lhs_l, rhs_l, width; + int i, lhs_t, rhs_t, incr, lhs_l, rhs_l, width; + intmax_t lhs_v, rhs_v; intmax_t tl, tr; char **result, *ep, *oep; -- cgit v1.1