… but since I liked the bonus of having the hval stored so much, merge
it with the array index; var.c says that │ 1244 /* The table entry is always [0] */ so that we can have a special flag and a union which stores hval for the table index, the array index otherwise (coïncidentally *hint hint* they have the same size)
This commit is contained in:
6
funcs.c
6
funcs.c
@ -25,7 +25,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.123 2009/08/28 20:30:56 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.124 2009/08/28 21:01:25 tg Exp $");
|
||||
|
||||
#if HAVE_KILLPG
|
||||
/*
|
||||
@ -1010,7 +1010,9 @@ c_typeset(const char **wp)
|
||||
if ((vp->flag&ARRAY) && any_set)
|
||||
shprintf("%s[%lu]",
|
||||
vp->name,
|
||||
(unsigned long)vp->index);
|
||||
vp->flag & AINDEX ?
|
||||
(unsigned long)vp->ua.index :
|
||||
0);
|
||||
else
|
||||
shf_puts(vp->name, shl_stdout);
|
||||
if (thing == '-' && (vp->flag&ISSET)) {
|
||||
|
Reference in New Issue
Block a user