diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-04-18 10:23:54 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-04-18 10:23:54 +0300 |
commit | bcb8bd6d6671a3400c4bfe3e34eb4d5d66050f32 (patch) | |
tree | 41cf2343944c2836150422b1bafabdaa73ff32bb /awkgram.c | |
parent | 98eb78c2d05870952fe25bbe37b86df2017f42fc (diff) | |
download | egawk-bcb8bd6d6671a3400c4bfe3e34eb4d5d66050f32.tar.gz egawk-bcb8bd6d6671a3400c4bfe3e34eb4d5d66050f32.tar.bz2 egawk-bcb8bd6d6671a3400c4bfe3e34eb4d5d66050f32.zip |
More array sorting changes from John.
Diffstat (limited to 'awkgram.c')
-rw-r--r-- | awkgram.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -4475,8 +4475,8 @@ static const struct token tokentab[] = { {"adump", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump}, #endif {"and", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_and}, -{"asort", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asort}, -{"asorti", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asorti}, +{"asort", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asort}, +{"asorti", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asorti}, {"atan2", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2}, {"bindtextdomain", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_bindtextdomain}, {"break", Op_K_break, LEX_BREAK, 0, 0}, @@ -6443,12 +6443,12 @@ snode(INSTRUCTION *subn, INSTRUCTION *r) } else if (r->builtin == do_asort || r->builtin == do_asorti) { arg = subn->nexti; /* 1st arg list */ ip = arg->lasti; - if (/* ip == arg->nexti && */ ip->opcode == Op_push) + if (ip->opcode == Op_push) ip->opcode = Op_push_array; - if (nexp == 2) { + if (nexp >= 2) { arg = ip->nexti; ip = arg->lasti; - if (/* ip == arg->nexti && */ ip->opcode == Op_push) + if (ip->opcode == Op_push) ip->opcode = Op_push_array; } } |