1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 19:52:20 +00:00

typeset: print_value(): save/restore last_table

This fix comes via an OpenSUSE patch but also exists in 93v- beta.
https://build.opensuse.org/package/view_file/shells/ksh/ksh93-typedef.dif
(only the printvalue() diff was still applicable to 93u+m;
the setall() fix was done differently and better in a2f13c19)
This commit is contained in:
Martijn Dekker 2021-02-02 14:31:35 +00:00
parent 4645e6ad33
commit b12be093d7

View file

@ -500,6 +500,7 @@ static void print_value(Sfio_t *iop, Namval_t *np, struct tdata *tp)
{
char *name;
int aflag=tp->aflag;
Namval_t *table;
if(nv_isnull(np))
{
if(!np->nvflag)
@ -543,7 +544,9 @@ static void print_value(Sfio_t *iop, Namval_t *np, struct tdata *tp)
sfwrite(iop,"}\n",2);
return;
}
table = tp->sh->last_table;
sfputr(iop,nv_name(np),aflag=='+'?'\n':'=');
tp->sh->last_table = table;
if(aflag=='+')
return;
if(nv_isarray(np) && nv_arrayptr(np))