aboutsummaryrefslogtreecommitdiffstats
path: root/braces.c
diff options
context:
space:
mode:
authorSebastian Schmidt <yath@yath.de>2012-04-17 11:23:35 +0200
committerSebastian Schmidt <yath@yath.de>2012-04-17 11:24:20 +0200
commitf4b417c62a4f272c4cf9a074d0f7a3a97201f9db (patch)
treee2196f3b6361e2377c43ab47a3abf17d8f6afd77 /braces.c
parent791237e44695d2ee123c8a6f665ef074f5fadfbb (diff)
downloadexternal_bash-f4b417c62a4f272c4cf9a074d0f7a3a97201f9db.zip
external_bash-f4b417c62a4f272c4cf9a074d0f7a3a97201f9db.tar.gz
external_bash-f4b417c62a4f272c4cf9a074d0f7a3a97201f9db.tar.bz2
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
Diffstat (limited to 'braces.c')
-rw-r--r--braces.c20
1 files changed, 12 insertions, 8 deletions
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;