/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* exec [arg...]
* eval [arg...]
* jobs [-lnp] [job...]
* login [arg...]
* let expr...
* . file [arg...]
* :, true, false
* vpath [top] [base]
* vmap [top] [base]
* wait [job...]
* shift [n]
*
* David Korn
* AT&T Labs
*
*/
#include "defs.h"
#include "variables.h"
#include "shnodes.h"
#include "path.h"
#include "io.h"
#include "name.h"
#include "history.h"
#include "builtins.h"
#include "jobs.h"
struct login
{
int clear;
char *arg0;
};
{
register int n;
{
case 'a':
argc = 0;
break;
case 'c':
break;
case ':':
break;
case '?':
return(2);
}
if(error_info.errors)
if(*argv)
return(0);
}
{
}
{
const char *pname;
if(argc)
else
{
}
if(sh_isoption(SH_RESTRICTED))
else
{
register char *cp;
sh_subfork();
{
#ifdef _ENV_H
#else
#endif
}
while(arg)
{
{
}
if(cp)
*cp = '=';
}
#ifdef JOBS
return(1);
#endif /* JOBS */
/* force bad exec to terminate shell */
sh_sigreset(2);
}
return(1);
}
{
register int r;
register char *arg;
{
case ':':
break;
case '?':
break;
}
return(r);
}
{
register int r;
{
case ':':
break;
case '?':
return(2);
}
if(error_info.errors)
{
}
}
{
register char *script;
register int jmpval;
int fd;
short level;
{
case ':':
break;
case '?':
return(2);
}
{
/* check for KornShell style function first */
{
{
{
np = 0;
}
else
}
}
else
np = 0;
if(!np)
{
}
}
if(filename)
{
}
if(np)
if(jmpval == 0)
{
if(np)
else
{
}
}
if(buffer)
if(!np)
else
{
}
/* only restore the top Shscope_t portion for posix functions */
}
/*
* null, true command
*/
{
return(0);
}
/*
* false command
*/
{
return(1);
}
{
register char *arg;
{
case ':':
break;
case '?':
return(2);
}
if(error_info.errors)
else
{
}
return(0);
}
{
{
case ':':
break;
case '?':
break;
}
if(error_info.errors)
}
#ifdef JOBS
# if 0
/* for the dictionary generator */
# endif
{
if(*argv[0]=='f')
else if(*argv[0]=='d')
{
case ':':
break;
case '?':
break;
}
if(error_info.errors)
{
if(sh_isstate(SH_INTERACTIVE))
return(1);
}
argv = (char**)0;
}
{
register int flag = 0;
{
case 'l':
break;
case 'n':
break;
case 'p':
break;
case ':':
break;
case '?':
break;
}
if(error_info.errors)
if(*argv==0)
argv = (char**)0;
}
#endif
#ifdef _cmd_universe
/*
* There are several universe styles that are masked by the getuniv(),
* setuniv() calls.
*/
{
register char *arg;
register int n;
{
case ':':
break;
case '?':
break;
}
{
}
else
{
else
}
return(0);
}
#endif /* cmd_universe */
#if SHOPT_FS_3D
#if _UWIN
#endif
# if 0
/* for the dictionary generator */
# endif
{
register int flag, n;
register const char *optstr;
register char *vend;
{
}
else
{
optstr = sh_optvmap;
flag = FS3D_VERSION;
}
{
case ':':
break;
case '?':
break;
}
if(error_info.errors)
#ifdef MS_3D
#else
goto failed;
#endif
switch(argc)
{
case 0:
case 1:
{
}
if(n < 0)
goto failed;
if(argc==1)
{
break;
}
n = 0;
{
if(flag==' ')
{
n = !n;
}
}
if(n)
break;
default:
if((argc&1))
/*FALLTHROUGH*/
case 2:
sh_subfork();
for(n=0;n<argc;n+=2)
goto failed;
}
return(0);
return(1);
}
#endif /* SHOPT_FS_3D */