func.c revision 965005c81e0f731867d47892b9fb677030b102df
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1996 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* UNIX shell
*/
#include "defs.h"
void
{
}
static void
{
if (t)
{
int type;
{
t->tretyp--;
return;
}
switch (type)
{
case TFND:
break;
case TCOM:
break;
case TFORK:
break;
case TPAR:
break;
case TFIL:
case TLST:
case TAND:
case TORF:
break;
case TFOR:
{
if (f->forlst)
{
}
}
break;
case TWH:
case TUN:
break;
case TIF:
break;
case TSW:
break;
}
free(t);
}
}
static void
{
while (argp)
{
}
}
void
{
while (iop)
{
{
#ifdef DEBUG
prs("unlinking ");
newline();
#endif
else
{
}
}
}
}
static void
{
while (regp)
{
}
}
static int nonl = 0;
void
prbgnlst(void)
{
if (nonl)
else
}
void
prendlst(void)
{
if (nonl) {
prc_buff(';');
}
else
}
void
{
nonl++;
prf(t);
nonl = 0;
}
void
{
sigchk();
if (t)
{
int type;
switch(type)
{
case TFND:
{
prs_buff("(){");
prbgnlst();
prbgnlst();
prs_buff("}");
break;
}
case TCOM:
}
break;
case TFORK:
prs_buff(" &");
break;
case TPAR:
prs_buff("(");
prs_buff(")");
break;
case TFIL:
prs_buff(" | ");
break;
case TLST:
prendlst();
break;
case TAND:
prs_buff(" && ");
break;
case TORF:
prs_buff(" || ");
break;
case TFOR:
{
prs_buff("for ");
if (f->forlst)
{
prs_buff(" in");
{
}
}
prendlst();
prs_buff("do");
prbgnlst();
prendlst();
prs_buff("done");
}
break;
case TWH:
case TUN:
prs_buff("while ");
else
prs_buff("until ");
prendlst();
prs_buff("do");
prbgnlst();
prendlst();
prs_buff("done");
break;
case TIF:
{
prs_buff("if ");
prendlst();
prs_buff("then");
prendlst();
if (f->eltre)
{
prendlst();
prs_buff("else");
prendlst();
}
prendlst();
prs_buff("fi");
break;
}
case TSW:
{
prs_buff("case ");
while(swl)
{
if (arg)
{
}
while(arg)
{
prs_buff(" | ");
}
prs_buff(")");
prs_buff(";;");
}
}
break;
}
}
sigchk();
}
static void
{
while (argp)
{
if (argp)
}
}
static void
{
int iof;
unsigned char *ion;
while (iop)
{
if (*ion)
{
prs_buff("<<");
{
prs_buff(">&");
else
prs_buff("<&");
}
prc_buff('<');
prs_buff(">>");
else
prc_buff('>');
}
}
}