On Sun, Jan 14 2018, Anton Lindqvist <[email protected]> wrote:
> On Thu, Jan 11, 2018 at 03:25:15PM +0800, Michael W. Bombardieri wrote:
>> Hello,
>> 
>> Revision 1.9 of tree.c (from 1999) added the disabled code and it
>> is still disabled. Would it be better to remove it?
>
> Fine with me. Anyone else willing OK?

I'd rather understand exactly what this code does and what the comment
actually means.  The TEXEC case can definitely be reached.

>> - Michael
>> 
>> 
>> Index: tree.c
>> ===================================================================
>> RCS file: /cvs/src/bin/ksh/tree.c,v
>> retrieving revision 1.30
>> diff -u -p -u -r1.30 tree.c
>> --- tree.c   6 Jan 2018 16:28:58 -0000       1.30
>> +++ tree.c   11 Jan 2018 07:16:55 -0000
>> @@ -47,25 +47,8 @@ ptree(struct op *t, int indent, struct s
>>                      fptreef(shf, indent, "#no-args# ");
>>              break;
>>      case TEXEC:
>> -#if 0 /* ?not useful - can't be called? */
>> -            /* Print original vars */
>> -            if (t->left->vars)
>> -                    for (w = t->left->vars; *w != NULL; )
>> -                            fptreef(shf, indent, "%S ", *w++);
>> -            else
>> -                    fptreef(shf, indent, "#no-vars# ");
>> -            /* Print expanded vars */
>> -            if (t->args)
>> -                    for (w = t->args; *w != NULL; )
>> -                            fptreef(shf, indent, "%s ", *w++);
>> -            else
>> -                    fptreef(shf, indent, "#no-args# ");
>> -            /* Print original io */
>> -            t = t->left;
>> -#else
>>              t = t->left;
>>              goto Chain;
>> -#endif
>>      case TPAREN:
>>              fptreef(shf, indent + 2, "( %T) ", t->left);
>>              break;
>> 
>

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to