mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +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
|
@ -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…
Add table
Add a link
Reference in a new issue