/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2006 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"
#include <errno.h>
#include "sym.h"
#include "hash.h"
void
{
switch (type)
{
case SYSSUSP:
break;
case SYSSTOP:
break;
case SYSKILL:
break;
case SYSFGBG:
break;
case SYSJOBS:
break;
case SYSDOT:
if (a1)
{
int f;
else
execexp(0, f);
}
break;
case SYSTIMES:
{
}
break;
case SYSEXIT:
}
break;
case SYSNULL:
t->treio = 0;
break;
case SYSCONT:
if (loopcnt)
{
if (a1)
else
}
break;
case SYSBREAK:
if (loopcnt)
{
if (a1)
}
break;
case SYSTRAP:
break;
case SYSEXEC:
argv++;
ioset = 0;
if (a1 == 0) {
setmode(0);
break;
}
/* FALLTHROUGH */
#ifdef RES /* Research includes login as part of the shell */
case SYSLOGIN:
break;
oldsigs();
done(0);
#else
case SYSNEWGRP:
break;
else
{
oldsigs();
rmtemp(0);
rmfunctmp();
#ifdef ACCT
doacct();
#endif
done(0);
}
#endif
case SYSCD:
{
unsigned char *cdpath;
unsigned char *dir;
int f;
*a1 == '/' ||
do
{
}
cdpath);
if (f) {
switch(errno) {
case EMULTIHOP:
break;
case ENOTDIR:
break;
case ENOENT:
break;
case EACCES:
break;
case ENOLINK:
break;
default:
break;
}
}
else
{
*dir != ':' &&
{
}
}
zapcd();
}
else
{
if (a1)
else
}
break;
case SYSSHFT:
{
int places;
{
dolc = 0;
}
else
}
break;
case SYSWAIT:
break;
case SYSREAD:
if(argc < 2)
rwait = 1;
rwait = 0;
break;
case SYSSET:
if (a1)
{
int cnt;
if (cnt > 1)
}
{
/*
* scan name chain and print
*/
}
break;
case SYSRDONLY:
exitval = 0;
if (a1)
{
while (*++argv)
}
else
break;
case SYSXPORT:
{
struct namnod *n;
exitval = 0;
if (a1)
{
while (*++argv)
{
else
}
}
else
}
break;
case SYSEVAL:
if (a1)
break;
#ifndef RES
case SYSULIMIT:
break;
case SYSUMASK:
if (a1)
{
int c;
mode_t i;
i = 0;
i = (i << 3) + c - '0';
umask(i);
}
else
{
mode_t i;
int j;
prc_buff('0');
for (j = 6; j >= 0; j -= 3)
}
break;
#endif
case SYSTST:
break;
case SYSECHO:
break;
case SYSHASH:
exitval = 0;
if (a1)
{
if (a1[0] == '-')
{
zaphash();
else
}
else
{
while (*++argv)
{
}
}
}
else
hashpr();
break;
case SYSPWD:
{
exitval = 0;
cwdprint();
}
break;
case SYSRETURN:
if (funcnt == 0)
execbrk = 1;
break;
case SYSTYPE:
exitval = 0;
if (a1)
{
/* return success only if all names are found */
while (*++argv)
}
break;
case SYSUNS:
exitval = 0;
if (a1)
{
while (*++argv)
unset_name(*argv);
}
break;
case SYSGETOPT: {
int getoptval;
struct namnod *n;
extern unsigned char numbuf[];
unsigned char c[2];
if(argc < 3) {
break;
}
exitval = 0;
n = lookup("OPTIND");
if(argc > 3) {
}
else
if(getoptval == -1) {
exitval = 1;
break;
}
c[0] = getoptval;
c[1] = 0;
assign(n, c);
n = lookup("OPTARG");
}
break;
default:
}
flushb();
chktrap();
}