mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 11:42:21 +00:00
Remove code related to long-dead 3DFS research project
This commit gets rid of dead weight related to an obscure early 1990s Bell Labs versioning file system research project called 3DFS, which has not existed for decades and for which I have not managed to find any evidence that it was ever used outside the lab. This removes: - the SHOPT_FS_3D compile option (which was forced on even when 0) - the obnoxious default alias 2d='set -f;_2d' that turned off your globbing and then tried to run a nonexistent _2d command - undocumented builtins 'vmap' and 'vpath' that only errored out - a non-functional -V unary operator for the test and [[ commands - some specific code for Apollo workstations (last made in 1997), which was inseparably intertwined with the 3DFS code (cherry picked from commit 20cdf3709f4fb4e468057b534dcee819b1961fb6)
This commit is contained in:
parent
5f8b0512f0
commit
f88f302c38
19 changed files with 9 additions and 279 deletions
7
NEWS
7
NEWS
|
@ -13,6 +13,13 @@ Any uppercase BUG_* names are modernish shell bug IDs.
|
|||
- If 'set -u'/'set -o nounset' is active, then the shell now errors out if $!
|
||||
is accessed before the shell has launched any background process.
|
||||
|
||||
- Removed support for an obscure early 1990s Bell Labs file system research
|
||||
project called 3DFS, which has not existed for decades. This removes:
|
||||
- an obnoxious default alias 2d='set -f;_2d' that turned off your file name
|
||||
wildcard expansion and then tried to run a nonexistent '_2d' command
|
||||
- undocumented builtins 'vmap' and 'vpath' that only printed error messages
|
||||
- a non-functional -V unary operator for the test and [[ commands
|
||||
|
||||
2020-06-06:
|
||||
|
||||
- The 'times' command is now a builtin command that conforms to POSIX
|
||||
|
|
|
@ -33,7 +33,6 @@ SHOPT_EDPREDICT == 1 /* predictive editing */
|
|||
SHOPT_ESH == 1 /* emacs/gmacs edit mode */
|
||||
SHOPT_FILESCAN == 1 /* fast file scan */
|
||||
SHOPT_FIXEDARRAY == 1 /* fixed dimension indexed array */
|
||||
SHOPT_FS_3D == /* 3d file system */
|
||||
SHOPT_HISTEXPAND == 1 /* csh-style history file expansions */
|
||||
SHOPT_KIA == 1 /* shell information database generation */
|
||||
SHOPT_MULTIBYTE == 1 /* multibyte character handling */
|
||||
|
|
|
@ -654,7 +654,7 @@ prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
|
|||
done sh/main.c
|
||||
meta main.o %.c>%.o sh/main.c main
|
||||
prev sh/main.c
|
||||
exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} ${SHOPT_TIMEOUT+-DSHOPT_TIMEOUT=${SHOPT_TIMEOUT}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SH_DICT+-DSH_DICT=${SH_DICT}} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_BASH+-DSHOPT_BASH=${SHOPT_BASH}} ${SHOPT_REMOTE+-DSHOPT_REMOTE=${SHOPT_REMOTE}} ${SHOPT_OLDTERMIO+-DSHOPT_OLDTERMIO=${SHOPT_OLDTERMIO}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${SHOPT_FS_3D+-DSHOPT_FS_3D=${SHOPT_FS_3D}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BRACEPAT -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_ESH -D_BLD_shell -DSHOPT_KIA -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DSHOPT_BGX -DSHOPT_COSHELL -DKSHELL -DSHOPT_SUID_EXEC -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_DYNAMIC -c sh/main.c
|
||||
exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} ${SHOPT_TIMEOUT+-DSHOPT_TIMEOUT=${SHOPT_TIMEOUT}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SH_DICT+-DSH_DICT=${SH_DICT}} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_BASH+-DSHOPT_BASH=${SHOPT_BASH}} ${SHOPT_REMOTE+-DSHOPT_REMOTE=${SHOPT_REMOTE}} ${SHOPT_OLDTERMIO+-DSHOPT_OLDTERMIO=${SHOPT_OLDTERMIO}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BRACEPAT -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_ESH -D_BLD_shell -DSHOPT_KIA -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DSHOPT_BGX -DSHOPT_COSHELL -DKSHELL -DSHOPT_SUID_EXEC -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_DYNAMIC -c sh/main.c
|
||||
done main.o generated
|
||||
make nvdisc.o
|
||||
make sh/nvdisc.c
|
||||
|
|
|
@ -167,17 +167,9 @@ int b_cd(int argc, char *argv[],Shbltin_t *context)
|
|||
{
|
||||
register char *cp;
|
||||
stakseek(PATH_MAX+PATH_OFFSET);
|
||||
#if SHOPT_FS_3D
|
||||
if(!(cp = pathcanon(stakptr(PATH_OFFSET),PATH_DOTDOT)))
|
||||
continue;
|
||||
/* eliminate trailing '/' */
|
||||
while(*--cp == '/' && cp>stakptr(PATH_OFFSET))
|
||||
*cp = 0;
|
||||
#else
|
||||
if(*(cp=stakptr(PATH_OFFSET))=='/')
|
||||
if(!pathcanon(cp,PATH_DOTDOT))
|
||||
continue;
|
||||
#endif /* SHOPT_FS_3D */
|
||||
}
|
||||
if((rval=chdir(path_relative(shp,stakptr(PATH_OFFSET)))) >= 0)
|
||||
goto success;
|
||||
|
@ -255,15 +247,7 @@ int b_pwd(int argc, char *argv[],Shbltin_t *context)
|
|||
errormsg(SH_DICT,ERROR_system(1), e_pwd);
|
||||
if(flag)
|
||||
{
|
||||
#if SHOPT_FS_3D
|
||||
if(shp->gd->lim.fs3d && (flag = mount(e_dot,NIL(char*),FS3D_GET|FS3D_VIEW,0))>=0)
|
||||
{
|
||||
cp = (char*)stakseek(++flag+PATH_MAX);
|
||||
mount(e_dot,cp,FS3D_GET|FS3D_VIEW|FS3D_SIZE(flag),0);
|
||||
}
|
||||
else
|
||||
#endif /* SHOPT_FS_3D */
|
||||
cp = strcpy(stakseek(strlen(cp)+PATH_MAX),cp);
|
||||
cp = strcpy(stakseek(strlen(cp)+PATH_MAX),cp);
|
||||
pathcanon(cp,PATH_PHYSICAL);
|
||||
}
|
||||
sfputr(sfstdout,cp,'\n');
|
||||
|
|
|
@ -220,25 +220,6 @@ int b_hist(int argc,char *argv[], Shbltin_t *context)
|
|||
if(*arg!='/')
|
||||
errormsg(SH_DICT,ERROR_exit(1),"ed not found set FCEDIT");
|
||||
}
|
||||
#ifdef apollo
|
||||
/*
|
||||
* Code to support the FC using the pad editor.
|
||||
* Exampled of how to use: HISTEDIT=pad
|
||||
*/
|
||||
if (strcmp (arg, "pad") == 0)
|
||||
{
|
||||
extern int pad_create(char*);
|
||||
sh_close(fdo);
|
||||
fdo = pad_create(fname);
|
||||
pad_wait(fdo);
|
||||
unlink(fname);
|
||||
strcat(fname, ".bak");
|
||||
unlink(fname);
|
||||
lseek(fdo,(off_t)0,SEEK_SET);
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif /* apollo */
|
||||
if(*arg != '-')
|
||||
{
|
||||
char *com[3];
|
||||
|
@ -250,9 +231,6 @@ int b_hist(int argc,char *argv[], Shbltin_t *context)
|
|||
fdo = sh_chkopen(fname);
|
||||
unlink(fname);
|
||||
free((void*)fname);
|
||||
#ifdef apollo
|
||||
}
|
||||
#endif /* apollo */
|
||||
/* don't history fc itself unless forked */
|
||||
error_info.flags |= ERROR_SILENT;
|
||||
if(!sh_isstate(SH_FORKED))
|
||||
|
|
|
@ -558,94 +558,3 @@ int b_universe(int argc, char *argv[],Shbltin_t *context)
|
|||
}
|
||||
#endif /* cmd_universe */
|
||||
|
||||
#if SHOPT_FS_3D
|
||||
#if _UWIN
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
# if 0
|
||||
/* for the dictionary generator */
|
||||
int b_vmap(int argc,char *argv[], Shbltin_t *context){}
|
||||
# endif
|
||||
int b_vpath(register int argc,char *argv[], Shbltin_t *context)
|
||||
{
|
||||
register int flag, n;
|
||||
register const char *optstr;
|
||||
register char *vend;
|
||||
register Shell_t *shp = context->shp;
|
||||
if(argv[0][1]=='p')
|
||||
{
|
||||
optstr = sh_optvpath;
|
||||
flag = FS3D_VIEW;
|
||||
}
|
||||
else
|
||||
{
|
||||
optstr = sh_optvmap;
|
||||
flag = FS3D_VERSION;
|
||||
}
|
||||
while(n = optget(argv, optstr)) switch(n)
|
||||
{
|
||||
case ':':
|
||||
errormsg(SH_DICT,2, "%s", opt_info.arg);
|
||||
break;
|
||||
case '?':
|
||||
errormsg(SH_DICT,ERROR_usage(2), "%s",opt_info.arg);
|
||||
break;
|
||||
}
|
||||
if(error_info.errors)
|
||||
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
|
||||
#ifdef MS_3D
|
||||
flag |= MS_3D;
|
||||
#else
|
||||
if(!shp->gd->lim.fs3d)
|
||||
goto failed;
|
||||
#endif
|
||||
argv += opt_info.index;
|
||||
argc -= opt_info.index;
|
||||
switch(argc)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
flag |= FS3D_GET;
|
||||
if((n = mount(*argv,(char*)0,flag,0)) >= 0)
|
||||
{
|
||||
vend = stkalloc(shp->stk,++n);
|
||||
n = mount(*argv,vend,flag|FS3D_SIZE(n),0);
|
||||
}
|
||||
if(n < 0)
|
||||
goto failed;
|
||||
if(argc==1)
|
||||
{
|
||||
sfprintf(sfstdout,"%s\n",vend);
|
||||
break;
|
||||
}
|
||||
n = 0;
|
||||
while(flag = *vend++)
|
||||
{
|
||||
if(flag==' ')
|
||||
{
|
||||
flag = e_sptbnl[n+1];
|
||||
n = !n;
|
||||
}
|
||||
sfputc(sfstdout,flag);
|
||||
}
|
||||
if(n)
|
||||
sfputc(sfstdout,'\n');
|
||||
break;
|
||||
default:
|
||||
if((argc&1))
|
||||
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
|
||||
/*FALLTHROUGH*/
|
||||
case 2:
|
||||
if(shp->subshell && !shp->subshare)
|
||||
sh_subfork();
|
||||
for(n=0;n<argc;n+=2)
|
||||
if(mount(argv[n+1],argv[n],flag,0)<0)
|
||||
goto failed;
|
||||
}
|
||||
return(0);
|
||||
failed:
|
||||
errormsg(SH_DICT,ERROR_exit(1),(argc>1)?e_cantset:e_cantget,(flag&FS3D_VIEW)?e_mapping:e_versions);
|
||||
return(1);
|
||||
}
|
||||
#endif /* SHOPT_FS_3D */
|
||||
|
||||
|
|
|
@ -363,23 +363,6 @@ int test_unop(Shell_t *shp,register int op,register const char *arg)
|
|||
return(permission(arg, W_OK));
|
||||
case 'x':
|
||||
return(permission(arg, X_OK));
|
||||
case 'V':
|
||||
#if SHOPT_FS_3D
|
||||
{
|
||||
register int offset = staktell();
|
||||
if(stat(arg,&statb)<0 || !S_ISREG(statb.st_mode))
|
||||
return(0);
|
||||
/* add trailing / */
|
||||
stakputs(arg);
|
||||
stakputc('/');
|
||||
stakputc(0);
|
||||
arg = (const char*)stakptr(offset);
|
||||
stakseek(offset);
|
||||
/* FALL THRU */
|
||||
}
|
||||
#else
|
||||
return(0);
|
||||
#endif /* SHOPT_FS_3D */
|
||||
case 'd':
|
||||
return(test_stat(arg,&statb)>=0 && S_ISDIR(statb.st_mode));
|
||||
case 'c':
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
|
||||
const struct shtable2 shtab_aliases[] =
|
||||
{
|
||||
#if SHOPT_FS_3D
|
||||
"2d", NV_NOFREE, "set -f;_2d",
|
||||
#endif /* SHOPT_FS_3D */
|
||||
"autoload", NV_NOFREE, "typeset -fu",
|
||||
"compound", NV_NOFREE|BLT_DCL, "typeset -C",
|
||||
"float", NV_NOFREE|BLT_DCL, "typeset -lE",
|
||||
|
|
|
@ -121,10 +121,6 @@ const struct shtable3 shtab_builtins[] =
|
|||
#ifdef _cmd_universe
|
||||
"universe", NV_BLTIN|BLT_ENV, bltin(universe),
|
||||
#endif /* _cmd_universe */
|
||||
#if SHOPT_FS_3D
|
||||
"vpath", NV_BLTIN|BLT_ENV, bltin(vpath),
|
||||
"vmap", NV_BLTIN|BLT_ENV, bltin(vpath),
|
||||
#endif /* SHOPT_FS_3D */
|
||||
"wait", NV_BLTIN|BLT_ENV|BLT_EXIT, bltin(wait),
|
||||
"type", NV_BLTIN|BLT_ENV, bltin(whence),
|
||||
"whence", NV_BLTIN|BLT_ENV, bltin(whence),
|
||||
|
|
|
@ -169,12 +169,6 @@ const char e_alphanum[] = "[_[:alpha:]]*([_[:alnum:]])";
|
|||
const char e_devfdNN[] = "/dev/fd/+([0-9])";
|
||||
const char e_devfdstd[] = "/dev/@(fd/+([0-9])|std@(in|out|err))";
|
||||
const char e_signo[] = "Signal %d";
|
||||
#if SHOPT_FS_3D
|
||||
const char e_cantget[] = "cannot get %s";
|
||||
const char e_cantset[] = "cannot set %s";
|
||||
const char e_mapping[] = "mapping";
|
||||
const char e_versions[] = "versions";
|
||||
#endif /* SHOPT_FS_3D */
|
||||
|
||||
/* string constants */
|
||||
const char e_heading[] = "Current option settings";
|
||||
|
|
|
@ -118,10 +118,6 @@ USAGE_LICENSE
|
|||
"user id of the current process.]"
|
||||
"[+-R \avarname\a?True if \avarname\a is a name reference.]"
|
||||
"[+-S \afile\a?True if \afile\a exists and is a socket.]"
|
||||
#if SHOPT_FS_3D
|
||||
"[+-V \afile\a?True if \afile\a exists and is a version "
|
||||
"directory.]"
|
||||
#endif /* SHOPT_FS_3D */
|
||||
"}"
|
||||
"[+?Binary expressions can be one of the following:]{"
|
||||
"[+\astring1\a = \astring2\a?True if \astring1\a is equal to "
|
||||
|
|
|
@ -100,15 +100,9 @@ const struct shtable2 shtab_variables[] =
|
|||
".sh.math", 0, (char*)0,
|
||||
".sh.pool", 0, (char*)0,
|
||||
"SHLVL", NV_INTEGER|NV_NOFREE|NV_EXPORT, (char*)0,
|
||||
#if SHOPT_FS_3D
|
||||
"VPATH", 0, (char*)0,
|
||||
#endif /* SHOPT_FS_3D */
|
||||
#if SHOPT_MULTIBYTE
|
||||
"CSWIDTH", 0, (char*)0,
|
||||
#endif /* SHOPT_MULTIBYTE */
|
||||
#ifdef apollo
|
||||
"SYSTYPE", 0, (char*)0,
|
||||
#endif /* apollo */
|
||||
"", 0, (char*)0
|
||||
};
|
||||
|
||||
|
|
|
@ -2,11 +2,4 @@ cat{
|
|||
#if SHOPT_DYNAMIC
|
||||
#include <dlldefs.h>
|
||||
#endif
|
||||
#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC
|
||||
# define SHOPT_FS_3D 1
|
||||
#endif /* !SHOPT_FS_3D */
|
||||
#if SHOPT_FS_3D
|
||||
# undef mount
|
||||
# include <fs3d.h>
|
||||
#endif /* SHOPT_FS_3D */
|
||||
}end
|
||||
|
|
|
@ -93,9 +93,6 @@ extern int b_umask(int, char*[],Shbltin_t*);
|
|||
#ifdef _cmd_universe
|
||||
extern int b_universe(int, char*[],Shbltin_t*);
|
||||
#endif /* _cmd_universe */
|
||||
#if SHOPT_FS_3D
|
||||
extern int b_vpath(int, char*[],Shbltin_t*);
|
||||
#endif /* SHOPT_FS_3D */
|
||||
extern int b_wait(int, char*[],Shbltin_t*);
|
||||
extern int b_whence(int, char*[],Shbltin_t*);
|
||||
|
||||
|
@ -140,12 +137,6 @@ extern const char e_direct[];
|
|||
extern const char e_defedit[];
|
||||
extern const char e_cneedsarg[];
|
||||
extern const char e_defined[];
|
||||
#if SHOPT_FS_3D
|
||||
extern const char e_cantset[];
|
||||
extern const char e_cantget[];
|
||||
extern const char e_mapping[];
|
||||
extern const char e_versions[];
|
||||
#endif /* SHOPT_FS_3D */
|
||||
|
||||
/* for option parsing */
|
||||
extern const char sh_set[];
|
||||
|
@ -192,10 +183,6 @@ extern const char sh_optwait[];
|
|||
extern const char sh_optuniverse[];
|
||||
#endif /* _cmd_universe */
|
||||
extern const char sh_optunset[];
|
||||
#if SHOPT_FS_3D
|
||||
extern const char sh_optvpath[];
|
||||
extern const char sh_optvmap[];
|
||||
#endif /* SHOPT_FS_3D */
|
||||
extern const char sh_optwhence[];
|
||||
#endif /* SYSDECLARE */
|
||||
extern const char sh_opttimes[];
|
||||
|
|
|
@ -91,21 +91,5 @@
|
|||
#define SH_MATHNOD (shgd->bltin_nodes+61)
|
||||
#define SH_JOBPOOL (shgd->bltin_nodes+62)
|
||||
#define SHLVL (shgd->bltin_nodes+63)
|
||||
#if SHOPT_FS_3D
|
||||
# define VPATHNOD (shgd->bltin_nodes+64)
|
||||
# define NFS_3D 1
|
||||
#else
|
||||
# define NFS_3D 0
|
||||
#endif /* SHOPT_FS_3D */
|
||||
#if SHOPT_VPIX
|
||||
# define DOSPATHNOD (shgd->bltin_nodes+64+NFS_3D)
|
||||
# define VPIXNOD (shgd->bltin_nodes+65+NFS_3D)
|
||||
# define NVPIX (NFS_3D+2)
|
||||
#else
|
||||
# define NVPIX NFS_3D
|
||||
#endif /* SHOPT_VPIX */
|
||||
#ifdef apollo
|
||||
# define SYSTYPENOD (shgd->bltin_nodes+63+NVPIX)
|
||||
#endif /* apollo */
|
||||
|
||||
#endif /* SH_VALNOD */
|
||||
|
|
|
@ -181,9 +181,6 @@ struct match
|
|||
typedef struct _init_
|
||||
{
|
||||
Shell_t *sh;
|
||||
#if SHOPT_FS_3D
|
||||
Namfun_t VPATH_init;
|
||||
#endif /* SHOPT_FS_3D */
|
||||
struct ifs IFS_init;
|
||||
Namfun_t PATH_init;
|
||||
Namfun_t FPATH_init;
|
||||
|
@ -923,41 +920,6 @@ static Sfdouble_t nget_version(register Namval_t* np, Namfun_t *fp)
|
|||
|
||||
static const Namdisc_t SH_VERSION_disc = { 0, 0, get_version, nget_version };
|
||||
|
||||
#if SHOPT_FS_3D
|
||||
/*
|
||||
* set or unset the mappings given a colon separated list of directories
|
||||
*/
|
||||
static void vpath_set(char *str, int mode)
|
||||
{
|
||||
register char *lastp, *oldp=str, *newp=strchr(oldp,':');
|
||||
if(!shgd->lim.fs3d)
|
||||
return;
|
||||
while(newp)
|
||||
{
|
||||
*newp++ = 0;
|
||||
if(lastp=strchr(newp,':'))
|
||||
*lastp = 0;
|
||||
mount((mode?newp:""),oldp,FS3D_VIEW,0);
|
||||
newp[-1] = ':';
|
||||
oldp = newp;
|
||||
newp=lastp;
|
||||
}
|
||||
}
|
||||
|
||||
/* catch vpath assignments */
|
||||
static void put_vpath(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
|
||||
{
|
||||
register char *cp;
|
||||
if(cp = nv_getval(np))
|
||||
vpath_set(cp,0);
|
||||
if(val)
|
||||
vpath_set((char*)val,1);
|
||||
nv_putv(np,val,flags,fp);
|
||||
}
|
||||
static const Namdisc_t VPATH_disc = { 0, put_vpath };
|
||||
static Namfun_t VPATH_init = { &VPATH_disc, 1 };
|
||||
#endif /* SHOPT_FS_3D */
|
||||
|
||||
|
||||
static const Namdisc_t IFS_disc = { sizeof(struct ifs), put_ifs, get_ifs };
|
||||
const Namdisc_t RESTRICTED_disc = { sizeof(Namfun_t), put_restricted };
|
||||
|
@ -1296,10 +1258,6 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
|
|||
shgd->lim.child_max = CHILD_MAX;
|
||||
if(shgd->lim.clk_tck <=0)
|
||||
shgd->lim.clk_tck = CLK_TCK;
|
||||
#if SHOPT_FS_3D
|
||||
if(fs3d(FS3D_TEST))
|
||||
shgd->lim.fs3d = 1;
|
||||
#endif /* SHOPT_FS_3D */
|
||||
shgd->ed_context = (void*)ed_open(shp);
|
||||
error_info.exit = sh_exit;
|
||||
error_info.id = path_basename(argv[0]);
|
||||
|
@ -1423,9 +1381,6 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
|
|||
}
|
||||
#endif
|
||||
nv_putval(IFSNOD,(char*)e_sptbnl,NV_RDONLY);
|
||||
#if SHOPT_FS_3D
|
||||
nv_stack(VPATHNOD, &VPATH_init);
|
||||
#endif /* SHOPT_FS_3D */
|
||||
astconfdisc(newconf);
|
||||
#if SHOPT_TIMEOUT
|
||||
shp->st.tmout = SHOPT_TIMEOUT;
|
||||
|
|
|
@ -1352,12 +1352,7 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
|
|||
struct stat sb;
|
||||
if(stat(fname,&sb)>=0)
|
||||
{
|
||||
#if SHOPT_FS_3D
|
||||
if(S_ISREG(sb.st_mode)&&
|
||||
(!shp->gd->lim.fs3d || iview(&sb)==0))
|
||||
#else
|
||||
if(S_ISREG(sb.st_mode))
|
||||
#endif /* SHOPT_FS_3D */
|
||||
{
|
||||
errno = EEXIST;
|
||||
errormsg(SH_DICT,ERROR_system(1),e_exists,fname);
|
||||
|
|
|
@ -1905,16 +1905,6 @@ static void job_free(register int n)
|
|||
static char *job_sigmsg(int sig)
|
||||
{
|
||||
static char signo[40];
|
||||
#ifdef apollo
|
||||
/*
|
||||
* This code handles the formatting for the apollo specific signal
|
||||
* SIGAPOLLO.
|
||||
*/
|
||||
extern char *apollo_error(void);
|
||||
|
||||
if ( sig == SIGAPOLLO )
|
||||
return( apollo_error() );
|
||||
#endif /* apollo */
|
||||
if(sig<=shgd->sigmax && shgd->sigmsg[sig])
|
||||
return(shgd->sigmsg[sig]);
|
||||
#if defined(SIGRTMIN) && defined(SIGRTMAX)
|
||||
|
|
|
@ -1181,15 +1181,6 @@ pid_t path_spawn(Shell_t *shp,const char *opath,register char **argv, char **env
|
|||
retry:
|
||||
switch(shp->path_err = errno)
|
||||
{
|
||||
#ifdef apollo
|
||||
/*
|
||||
* On apollo's execve will fail with eacces when
|
||||
* file has execute but not read permissions. So,
|
||||
* for now we will pretend that EACCES and ENOEXEC
|
||||
* mean the same thing.
|
||||
*/
|
||||
case EACCES:
|
||||
#endif /* apollo */
|
||||
case ENOEXEC:
|
||||
#if SHOPT_SUID_EXEC
|
||||
case EPERM:
|
||||
|
@ -1213,7 +1204,6 @@ retry:
|
|||
#endif
|
||||
}
|
||||
exscript(shp,path,argv,envp);
|
||||
#ifndef apollo
|
||||
case EACCES:
|
||||
{
|
||||
struct stat statb;
|
||||
|
@ -1228,7 +1218,6 @@ retry:
|
|||
}
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
#endif /* !apollo */
|
||||
#ifdef ENAMETOOLONG
|
||||
case ENAMETOOLONG:
|
||||
#endif /* ENAMETOOLONG */
|
||||
|
|
Loading…
Reference in a new issue