mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Remove vestigial 3DFS support code (re: f88f302c
)
Support for the long-dead 3DFS userland versioning file system was already removed from ksh93 (although I'd overlooked some minor things), but libast still supported it. This removes that too. src/lib/libast/include/fs3d.h, src/lib/libast/man/fs3d.3, src/lib/libast/misc/fs3d.c: - Removed. bin/package, src/cmd/INIT/package.sh: - Remove attempted use of removed vpath builtin. src/cmd/ksh93/*: - Remove minor 3dfs vestiges. src/lib/lib{ast,cmd,coshell}/*: - Remove code supporting 3dfs.
This commit is contained in:
parent
2db9953ae0
commit
fbc6cd4286
32 changed files with 83 additions and 683 deletions
73
bin/package
73
bin/package
|
@ -1448,10 +1448,6 @@ use) case $1 in
|
|||
32) case $HOSTTYPE in
|
||||
*-64) HOSTTYPE=${HOSTTYPE%-64} ;;
|
||||
esac
|
||||
case $wow in
|
||||
*/32) ;;
|
||||
*) vpath / /$bit ;;
|
||||
esac
|
||||
;;
|
||||
64) case $HOSTTYPE in
|
||||
*-64) ;;
|
||||
|
@ -1459,7 +1455,6 @@ use) case $1 in
|
|||
esac
|
||||
case $wow in
|
||||
*/32) echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;;
|
||||
*) vpath / /$bit ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
@ -3242,32 +3237,28 @@ esac
|
|||
# set up the view state
|
||||
|
||||
VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT"
|
||||
if (vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN) >/dev/null 2>&1 &&
|
||||
vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN
|
||||
then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN
|
||||
else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
$show export VPATH
|
||||
export VPATH
|
||||
IFS=':'
|
||||
set '' $VPATH
|
||||
shift
|
||||
IFS=$ifs
|
||||
for i
|
||||
do case $i in
|
||||
*/arch/*/*)
|
||||
VIEW_src="$VIEW_src $i"
|
||||
;;
|
||||
*/arch/*)
|
||||
VIEW_bin="$VIEW_bin $i"
|
||||
;;
|
||||
*)
|
||||
VIEW_src="$VIEW_src $i"
|
||||
;;
|
||||
esac
|
||||
VIEW_all="$VIEW_all $i"
|
||||
done
|
||||
fi
|
||||
VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
$show export VPATH
|
||||
export VPATH
|
||||
IFS=':'
|
||||
set '' $VPATH
|
||||
shift
|
||||
IFS=$ifs
|
||||
for i
|
||||
do case $i in
|
||||
*/arch/*/*)
|
||||
VIEW_src="$VIEW_src $i"
|
||||
;;
|
||||
*/arch/*)
|
||||
VIEW_bin="$VIEW_bin $i"
|
||||
;;
|
||||
*)
|
||||
VIEW_src="$VIEW_src $i"
|
||||
;;
|
||||
esac
|
||||
VIEW_all="$VIEW_all $i"
|
||||
done
|
||||
|
||||
# return 0 if arg in src|bin|all view
|
||||
|
||||
|
@ -3523,13 +3514,9 @@ int main(int argc, char** argv) { return argc || argv; }
|
|||
esac
|
||||
$exec touch $PROTOROOT/UPDATE
|
||||
)
|
||||
if (vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT) >/dev/null 2>&1 &&
|
||||
vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT
|
||||
then $show vpath $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT $USER_VPATH_CHAIN
|
||||
else VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
export VPATH
|
||||
fi
|
||||
VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
export VPATH
|
||||
}
|
||||
}
|
||||
for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin
|
||||
|
@ -5857,13 +5844,9 @@ cat $j $k
|
|||
;;
|
||||
esac
|
||||
if test '' != "$PROTOROOT"
|
||||
then if (vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT) >/dev/null 2>&1 &&
|
||||
vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT
|
||||
then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN
|
||||
else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
export VPATH
|
||||
fi
|
||||
then VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
export VPATH
|
||||
fi
|
||||
note believe generated files for $accept
|
||||
eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign
|
||||
|
|
|
@ -1447,10 +1447,6 @@ use) case $1 in
|
|||
32) case $HOSTTYPE in
|
||||
*-64) HOSTTYPE=${HOSTTYPE%-64} ;;
|
||||
esac
|
||||
case $wow in
|
||||
*/32) ;;
|
||||
*) vpath / /$bit ;;
|
||||
esac
|
||||
;;
|
||||
64) case $HOSTTYPE in
|
||||
*-64) ;;
|
||||
|
@ -1458,7 +1454,6 @@ use) case $1 in
|
|||
esac
|
||||
case $wow in
|
||||
*/32) echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;;
|
||||
*) vpath / /$bit ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
@ -3241,32 +3236,28 @@ esac
|
|||
# set up the view state
|
||||
|
||||
VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT"
|
||||
if (vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN) >/dev/null 2>&1 &&
|
||||
vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN
|
||||
then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN
|
||||
else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
$show export VPATH
|
||||
export VPATH
|
||||
IFS=':'
|
||||
set '' $VPATH
|
||||
shift
|
||||
IFS=$ifs
|
||||
for i
|
||||
do case $i in
|
||||
*/arch/*/*)
|
||||
VIEW_src="$VIEW_src $i"
|
||||
;;
|
||||
*/arch/*)
|
||||
VIEW_bin="$VIEW_bin $i"
|
||||
;;
|
||||
*)
|
||||
VIEW_src="$VIEW_src $i"
|
||||
;;
|
||||
esac
|
||||
VIEW_all="$VIEW_all $i"
|
||||
done
|
||||
fi
|
||||
VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
$show export VPATH
|
||||
export VPATH
|
||||
IFS=':'
|
||||
set '' $VPATH
|
||||
shift
|
||||
IFS=$ifs
|
||||
for i
|
||||
do case $i in
|
||||
*/arch/*/*)
|
||||
VIEW_src="$VIEW_src $i"
|
||||
;;
|
||||
*/arch/*)
|
||||
VIEW_bin="$VIEW_bin $i"
|
||||
;;
|
||||
*)
|
||||
VIEW_src="$VIEW_src $i"
|
||||
;;
|
||||
esac
|
||||
VIEW_all="$VIEW_all $i"
|
||||
done
|
||||
|
||||
# return 0 if arg in src|bin|all view
|
||||
|
||||
|
@ -3522,13 +3513,9 @@ int main(int argc, char** argv) { return argc || argv; }
|
|||
esac
|
||||
$exec touch $PROTOROOT/UPDATE
|
||||
)
|
||||
if (vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT) >/dev/null 2>&1 &&
|
||||
vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT
|
||||
then $show vpath $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT $USER_VPATH_CHAIN
|
||||
else VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
export VPATH
|
||||
fi
|
||||
VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
export VPATH
|
||||
}
|
||||
}
|
||||
for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin
|
||||
|
@ -5856,13 +5843,9 @@ cat $j $k
|
|||
;;
|
||||
esac
|
||||
if test '' != "$PROTOROOT"
|
||||
then if (vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT) >/dev/null 2>&1 &&
|
||||
vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT
|
||||
then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN
|
||||
else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
export VPATH
|
||||
fi
|
||||
then VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
|
||||
$show VPATH=$VPATH
|
||||
export VPATH
|
||||
fi
|
||||
note believe generated files for $accept
|
||||
eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign
|
||||
|
|
|
@ -232,10 +232,6 @@ meta FEATURE/dynamic features/%>FEATURE/% features/dynamic dynamic
|
|||
make features/dynamic
|
||||
done features/dynamic
|
||||
exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/dynamic
|
||||
make ${PACKAGE_ast_INCLUDE}/fs3d.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
|
||||
done ${PACKAGE_ast_INCLUDE}/fs3d.h dontcare
|
||||
prev ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit
|
||||
done FEATURE/dynamic dontcare generated
|
||||
make FEATURE/options implicit
|
||||
|
|
|
@ -52,8 +52,6 @@ The options have the following defaults and meanings:
|
|||
FILESCAN on Experimental option that allows fast reading of files
|
||||
using while < file;do ...; done and allowing fields in
|
||||
each line to be accessed as positional parameters.
|
||||
FS_3D off For use with 3-D file system. Enabled automatically for
|
||||
systems with dynamic linking.
|
||||
KIA off Allow generation of shell cross reference database with -I.
|
||||
MULTIBYTE on Multibyte character handling. Requires mblen() and
|
||||
mbctowc().
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
* let expr...
|
||||
* . file [arg...]
|
||||
* :, true, false
|
||||
* vpath [top] [base]
|
||||
* vmap [top] [base]
|
||||
* wait [job...]
|
||||
* shift [n]
|
||||
*
|
||||
|
|
|
@ -2030,11 +2030,6 @@ _JOB_
|
|||
"[+SEE ALSO?\bjobs\b(1), \bps\b(1)]"
|
||||
;
|
||||
|
||||
#if SHOPT_FS_3D
|
||||
const char sh_optvpath[] = " [top] [base]";
|
||||
const char sh_optvmap[] = " [dir] [list]";
|
||||
#endif /* SHOPT_FS_3D */
|
||||
|
||||
const char sh_optwhence[] =
|
||||
"[-1c?\n@(#)$Id: whence (AT&T Research) 2007-04-24 $\n]"
|
||||
USAGE_LICENSE
|
||||
|
|
|
@ -68,7 +68,6 @@ tst pipe_socketpair note{ use socketpair() for peekable pipe() }end execute{
|
|||
}end
|
||||
tst socketpair_devfd note{ /dev/fd/N handles socketpair() }end execute{
|
||||
#include <ast.h>
|
||||
#include <fs3d.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
int main()
|
||||
|
@ -76,7 +75,6 @@ tst socketpair_devfd note{ /dev/fd/N handles socketpair() }end execute{
|
|||
int devfd;
|
||||
int n;
|
||||
int sfd[2];
|
||||
fs3d(FS3D_OFF);
|
||||
close(0);
|
||||
open("/dev/null", O_RDONLY);
|
||||
if ((n = open("/dev/fd/0", O_RDONLY)) < 0)
|
||||
|
|
|
@ -106,7 +106,6 @@ struct limits
|
|||
int ngroups_max; /* maximum number of process groups */
|
||||
unsigned char posix_version; /* posix version number */
|
||||
unsigned char posix_jobcontrol;/* non-zero for job control systems */
|
||||
unsigned char fs3d; /* non-zero for 3-d file system */
|
||||
};
|
||||
|
||||
#ifndef SH_wait_f_defined
|
||||
|
|
|
@ -30,7 +30,7 @@ __OBSOLETE__ == $("6 months ago":@F=%(%Y0101)T)
|
|||
HEADERSRC = ast.h ast_dir.h ast_getopt.h ast_std.h \
|
||||
ast_namval.h ast_windows.h \
|
||||
ccode.h cdt.h cdtlib.h cmdarg.h debug.h dt.h error.h find.h ftw.h \
|
||||
ftwalk.h fts.h fs3d.h getopt.h glob.h hash.h hashkey.h hashpart.h \
|
||||
ftwalk.h fts.h getopt.h glob.h hash.h hashkey.h hashpart.h \
|
||||
ip6.h lc.h ls.h magic.h mc.h mime.h mnt.h modecanon.h modex.h \
|
||||
namval.h option.h proc.h re_comp.h recfmt.h regex.h regexp.h \
|
||||
sfio.h sfio_s.h sfio_t.h sfdisc.h shcmd.h \
|
||||
|
@ -54,7 +54,7 @@ HEADERSTD = dirent.h iconv.h nl_types.h stdio.h wchar.h wctype.h
|
|||
|
||||
$(ID) 5.4 :LIBRARY: README RELEASE \
|
||||
LIBAST.3 aso.3 ast.3 astsa.3 cdt.3 chr.3 compat.3 error.3 \
|
||||
find.3 fmt.3 fmtls.3 fs3d.3 ftwalk.3 getcwd.3 hash.3 iblocks.3 \
|
||||
find.3 fmt.3 fmtls.3 ftwalk.3 getcwd.3 hash.3 iblocks.3 \
|
||||
int.3 ip6.3 magic.3 mem.3 mime.3 modecanon.3 optget.3 path.3 \
|
||||
preroot.3 proc.3 re.3 regex.3 setenviron.3 sfdisc.3 sfio.3 \
|
||||
sig.3 spawnveg.3 stak.3 stk.3 strcopy.3 strdup.3 strelapsed.3 \
|
||||
|
@ -80,7 +80,7 @@ $(ID) 5.4 :LIBRARY: README RELEASE \
|
|||
pathnative.c pathposix.c pathtemp.c pathtmp.c pathstat.c \
|
||||
pathgetlink.c pathsetlink.c pathbin.c pathshell.c pathcd.c \
|
||||
pathprog.c \
|
||||
fs3d.c ftwalk.c ftwflags.c fts.c \
|
||||
ftwalk.c ftwflags.c fts.c \
|
||||
astintercept.c conformance.c getenv.c setenviron.c \
|
||||
optget.c optjoin.c optesc.c optctx.c strsort.c struniq.c \
|
||||
magic.c mime.c mimetype.c signal.c sigflag.c systrace.c \
|
||||
|
|
|
@ -490,9 +490,6 @@ exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACK
|
|||
done telldir.o generated
|
||||
make getcwd.o
|
||||
make misc/getcwd.c
|
||||
make include/fs3d.h implicit
|
||||
prev ast_fs.h implicit
|
||||
done include/fs3d.h dontcare
|
||||
make include/ast_dir.h implicit
|
||||
prev std/dirent.h implicit
|
||||
prev dir/dirlib.h implicit
|
||||
|
@ -954,7 +951,6 @@ make pathcanon.o
|
|||
make path/pathcanon.c
|
||||
prev ast_api.h implicit
|
||||
prev include/error.h implicit
|
||||
prev include/fs3d.h implicit
|
||||
prev include/ls.h implicit
|
||||
prev include/ast.h implicit
|
||||
done path/pathcanon.c
|
||||
|
@ -1058,7 +1054,6 @@ exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} '
|
|||
done FEATURE/preroot generated
|
||||
exec - cmp 2>/dev/null -s FEATURE/preroot preroot.h || { rm -f preroot.h; silent test -d . || mkdir .; ${STDCP} FEATURE/preroot preroot.h; }
|
||||
done preroot.h generated
|
||||
prev include/fs3d.h implicit
|
||||
prev include/ast.h implicit
|
||||
done path/pathkey.c
|
||||
meta pathkey.o %.c>%.o path/pathkey.c pathkey
|
||||
|
@ -1214,15 +1209,6 @@ meta pathprog.o %.c>%.o path/pathprog.c pathprog
|
|||
prev path/pathprog.c
|
||||
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathprog.c
|
||||
done pathprog.o generated
|
||||
make fs3d.o
|
||||
make misc/fs3d.c
|
||||
prev include/fs3d.h implicit
|
||||
prev include/ast.h implicit
|
||||
done misc/fs3d.c
|
||||
meta fs3d.o %.c>%.o misc/fs3d.c fs3d
|
||||
prev misc/fs3d.c
|
||||
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/fs3d.c
|
||||
done fs3d.o generated
|
||||
make ftwalk.o
|
||||
make misc/ftwalk.c
|
||||
make include/ftwalk.h implicit
|
||||
|
@ -1251,7 +1237,6 @@ make fts.o
|
|||
make misc/fts.c
|
||||
prev include/fts.h implicit
|
||||
prev include/ls.h implicit
|
||||
prev include/fs3d.h implicit
|
||||
prev include/error.h implicit
|
||||
prev include/ast_dir.h implicit
|
||||
prev include/ast.h implicit
|
||||
|
@ -1291,7 +1276,6 @@ exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PAC
|
|||
done getenv.o generated
|
||||
make setenviron.o
|
||||
make misc/setenviron.c
|
||||
prev include/fs3d.h implicit
|
||||
prev misc/intercepts.h implicit
|
||||
done misc/setenviron.c
|
||||
meta setenviron.o %.c>%.o misc/setenviron.c setenviron
|
||||
|
@ -5532,7 +5516,6 @@ done conftab.h
|
|||
prev include/ls.h implicit
|
||||
prev include/proc.h implicit
|
||||
prev include/regex.h implicit
|
||||
prev include/fs3d.h implicit
|
||||
prev include/error.h implicit
|
||||
prev include/ast.h implicit
|
||||
prev misc/univlib.h implicit
|
||||
|
@ -6098,7 +6081,7 @@ prev obsolete/spawn.c
|
|||
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c obsolete/spawn.c
|
||||
done spawn.o generated
|
||||
exec - ${AR} rc libast.a state.o transition.o opendir.o readdir.o rewinddir.o seekdir.o telldir.o getcwd.o fastfind.o hashalloc.o hashdump.o hashfree.o hashlast.o hashlook.o hashscan.o hashsize.o hashview.o hashwalk.o memhash.o memsum.o strhash.o strkey.o strsum.o stracmp.o strnacmp.o ccmap.o ccmapid.o ccnative.o chresc.o chrtoi.o
|
||||
exec - ${AR} rc libast.a streval.o strexpr.o strmatch.o strcopy.o modei.o modex.o strmode.o strlcat.o strlcpy.o strlook.o strncopy.o strsearch.o strpsearch.o stresc.o stropt.o strtape.o strpcmp.o strnpcmp.o strvcmp.o strnvcmp.o tok.o tokline.o tokscan.o pathaccess.o pathcat.o pathcanon.o pathcheck.o pathpath.o pathexists.o pathfind.o pathkey.o pathprobe.o pathrepl.o pathnative.o pathposix.o pathtemp.o pathtmp.o pathstat.o pathgetlink.o pathsetlink.o pathbin.o pathshell.o pathcd.o pathprog.o fs3d.o ftwalk.o ftwflags.o fts.o astintercept.o conformance.o getenv.o setenviron.o optget.o optjoin.o optesc.o optctx.o strsort.o struniq.o magic.o mime.o mimetype.o signal.o sigflag.o systrace.o error.o errorf.o errormsg.o errorx.o localeconv.o setlocale.o translate.o catopen.o iconv.o lc.o lctab.o mc.o base64.o recfmt.o recstr.o reclen.o fmtrec.o fmtbase.o fmtbuf.o fmtclock.o fmtdev.o fmtelapsed.o fmterror.o fmtesc.o fmtfmt.o fmtfs.o fmtident.o fmtint.o fmtip4.o fmtip6.o fmtls.o fmtmatch.o fmtmode.o fmtnum.o fmtperm.o fmtre.o fmttime.o
|
||||
exec - ${AR} rc libast.a streval.o strexpr.o strmatch.o strcopy.o modei.o modex.o strmode.o strlcat.o strlcpy.o strlook.o strncopy.o strsearch.o strpsearch.o stresc.o stropt.o strtape.o strpcmp.o strnpcmp.o strvcmp.o strnvcmp.o tok.o tokline.o tokscan.o pathaccess.o pathcat.o pathcanon.o pathcheck.o pathpath.o pathexists.o pathfind.o pathkey.o pathprobe.o pathrepl.o pathnative.o pathposix.o pathtemp.o pathtmp.o pathstat.o pathgetlink.o pathsetlink.o pathbin.o pathshell.o pathcd.o pathprog.o ftwalk.o ftwflags.o fts.o astintercept.o conformance.o getenv.o setenviron.o optget.o optjoin.o optesc.o optctx.o strsort.o struniq.o magic.o mime.o mimetype.o signal.o sigflag.o systrace.o error.o errorf.o errormsg.o errorx.o localeconv.o setlocale.o translate.o catopen.o iconv.o lc.o lctab.o mc.o base64.o recfmt.o recstr.o reclen.o fmtrec.o fmtbase.o fmtbuf.o fmtclock.o fmtdev.o fmtelapsed.o fmterror.o fmtesc.o fmtfmt.o fmtfs.o fmtident.o fmtint.o fmtip4.o fmtip6.o fmtls.o fmtmatch.o fmtmode.o fmtnum.o fmtperm.o fmtre.o fmttime.o
|
||||
exec - ${AR} rc libast.a fmtuid.o fmtgid.o fmtsignal.o fmtscale.o fmttmx.o fmttv.o fmtversion.o strelapsed.o strperm.o struid.o strgid.o strtoip4.o strtoip6.o stack.o stk.o swapget.o swapmem.o swapop.o swapput.o sigdata.o sigcrit.o sigunblock.o procopen.o procclose.o procrun.o procfree.o tmdate.o tmequiv.o tmfix.o tmfmt.o tmform.o tmgoff.o tminit.o tmleap.o tmlex.o tmlocale.o tmmake.o tmpoff.o tmscan.o tmsleep.o tmtime.o tmtype.o tmweek.o tmword.o tmzone.o tmxdate.o tmxduration.o tmxfmt.o tmxgettime.o tmxleap.o tmxmake.o tmxscan.o tmxsettime.o tmxsleep.o tmxtime.o tmxtouch.o tvcmp.o tvgettime.o tvsettime.o tvsleep.o tvtouch.o cmdarg.o vecargs.o vecfile.o vecfree.o vecload.o vecstring.o univdata.o touch.o mnt.o debug.o memccpy.o memchr.o memcmp.o memcpy.o memdup.o memmove.o memset.o mkdir.o mkfifo.o mknod.o rmdir.o remove.o rename.o link.o unlink.o strdup.o strchr.o strrchr.o strstr.o strtod.o strtold.o strtol.o strtoll.o strtoul.o strtoull.o strton.o strtonll.o strntod.o strntold.o strnton.o
|
||||
exec - ${AR} rc libast.a strntonll.o strntol.o strntoll.o strntoul.o strntoull.o strcasecmp.o strncasecmp.o strerror.o mktemp.o tmpnam.o fsync.o execlp.o execve.o execvp.o execvpe.o spawnveg.o vfork.o killpg.o hsearch.o tsearch.o getlogin.o putenv.o setenv.o unsetenv.o lstat.o statvfs.o eaccess.o gross.o omitted.o readlink.o symlink.o getpgrp.o setpgid.o setsid.o waitpid.o creat64.o fcntl.o open.o atexit.o getdents.o getwd.o dup2.o errno.o getpreroot.o ispreroot.o realopen.o setpreroot.o getgroups.o mount.o system.o iblocks.o modedata.o tmdata.o memfatal.o sfkeyprintf.o sfdcdio.o sfdcdos.o sfdcfilter.o sfdcseekable.o sfdcslow.o sfdcsubstr.o sfdctee.o sfdcunion.o sfdcmore.o sfdcprefix.o wc.o wc2utf8.o basename.o closelog.o dirname.o fmtmsglib.o fnmatch.o ftw.o getdate.o getsubopt.o glob.o nftw.o openlog.o re_comp.o resolvepath.o realpath.o regcmp.o regexp.o setlogmask.o strftime.o strptime.o swab.o syslog.o tempnam.o wordexp.o mktime.o regalloc.o regclass.o regcoll.o regcomp.o regcache.o regdecomp.o regerror.o regexec.o regfatal.o reginit.o
|
||||
exec - ${AR} rc libast.a regnexec.o regsubcomp.o regsubexec.o regsub.o regrecord.o regrexec.o regstat.o dtclose.o dtdisc.o dthash.o dtlist.o dtmethod.o dtopen.o dtstrhash.o dttree.o dtview.o dtwalk.o dtnew.o dtcomp.o sfclose.o sfclrlock.o sfdisc.o sfdlen.o sfexcept.o sfgetl.o sfgetu.o sfcvt.o sfecvt.o sffcvt.o sfextern.o sffilbuf.o sfflsbuf.o sfprints.o sfgetd.o sfgetr.o sfllen.o sfmode.o sfmove.o sfnew.o sfpkrd.o sfnotify.o sfnputc.o sfopen.o sfpeek.o sfpoll.o sfpool.o sfpopen.o sfprintf.o sfputd.o sfputl.o sfputr.o sfputu.o sfrd.o sfread.o sfreserve.o sfscanf.o sfseek.o sfset.o sfsetbuf.o sfsetfd.o sfsize.o sfsk.o sfstack.o sfstrtod.o sfsync.o sfswap.o sftable.o sftell.o sftmp.o sfungetc.o sfvprintf.o sfvscanf.o sfwr.o sfwrite.o sfpurge.o sfraise.o sfwalk.o sfgetm.o sfmutex.o sfputm.o sfresize.o _sfclrerr.o _sfeof.o _sferror.o _sffileno.o _sfopen.o _sfstacked.o _sfvalue.o _sfgetc.o _sfgetl.o _sfgetl2.o _sfgetu.o _sfgetu2.o _sfdlen.o _sfllen.o _sfslen.o _sfulen.o _sfputc.o _sfputd.o _sfputl.o _sfputm.o
|
||||
|
@ -6180,11 +6163,6 @@ make man/fmtls.3
|
|||
done man/fmtls.3
|
||||
exec - test '' = 'man/fmtls.3' || ${STDCMP} 2>/dev/null -s man/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3 || { ${STDMV} ${INSTALLROOT}/man/man3/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3.old 2>/dev/null || true; ${STDCP} man/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3 ;}
|
||||
done ${INSTALLROOT}/man/man3/fmtls.3 generated
|
||||
make ${INSTALLROOT}/man/man3/fs3d.3
|
||||
make man/fs3d.3
|
||||
done man/fs3d.3
|
||||
exec - test '' = 'man/fs3d.3' || ${STDCMP} 2>/dev/null -s man/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3 || { ${STDMV} ${INSTALLROOT}/man/man3/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3.old 2>/dev/null || true; ${STDCP} man/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3 ;}
|
||||
done ${INSTALLROOT}/man/man3/fs3d.3 generated
|
||||
make ${INSTALLROOT}/man/man3/ftwalk.3
|
||||
make man/ftwalk.3
|
||||
done man/ftwalk.3
|
||||
|
@ -6580,14 +6558,6 @@ exec - then rm -f 1.${COTEMP}.x
|
|||
exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fts.h
|
||||
exec - fi
|
||||
done ${INSTALLROOT}/include/ast/fts.h generated
|
||||
make ${INSTALLROOT}/include/ast/fs3d.h
|
||||
prev include/fs3d.h
|
||||
exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/fs3d.h > 1.${COTEMP}.x
|
||||
exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fs3d.h 1.${COTEMP}.x
|
||||
exec - then rm -f 1.${COTEMP}.x
|
||||
exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fs3d.h
|
||||
exec - fi
|
||||
done ${INSTALLROOT}/include/ast/fs3d.h generated
|
||||
make ${INSTALLROOT}/include/ast/getopt.h
|
||||
prev comp/getopt.h
|
||||
exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/getopt.h > 1.${COTEMP}.x
|
||||
|
|
|
@ -523,7 +523,7 @@ do flags=F
|
|||
done
|
||||
case $name in
|
||||
'') ;;
|
||||
CONFORMANCE|FS_3D|HOSTTYPE|LIBPATH|LIBPREFIX|LIBSUFFIX|PATH_ATTRIBUTES|PATH_RESOLVE|UNIVERSE)
|
||||
CONFORMANCE|HOSTTYPE|LIBPATH|LIBPREFIX|LIBSUFFIX|PATH_ATTRIBUTES|PATH_RESOLVE|UNIVERSE)
|
||||
;;
|
||||
*) values=
|
||||
script=
|
||||
|
|
|
@ -132,17 +132,11 @@ __STDPP__directive pragma pp:nohide DIR closedir opendir readdir seekdir telldir
|
|||
int dd_size; /* valid data in block */ \
|
||||
char* dd_buf; /* directory block */
|
||||
|
||||
#ifdef _BLD_3d
|
||||
#define DIR DIRDIR
|
||||
#endif
|
||||
#undef _DIRENT_H
|
||||
#include "dirstd.h"
|
||||
#ifndef _DIRENT_H
|
||||
#define _DIRENT_H 1
|
||||
#endif
|
||||
#ifdef _BLD_3d
|
||||
#undef DIR
|
||||
#endif
|
||||
|
||||
#ifndef DIRBLKSIZ
|
||||
#ifdef DIRBLK
|
||||
|
|
|
@ -45,8 +45,6 @@ struct dirent
|
|||
char d_name[1]; /* entry name */
|
||||
};
|
||||
|
||||
#ifndef _BLD_3d
|
||||
|
||||
#ifdef rewinddir
|
||||
#undef rewinddir
|
||||
#define rewinddir(p) seekdir(p,0L)
|
||||
|
@ -59,5 +57,3 @@ extern void seekdir(DIR*, long);
|
|||
extern long telldir(DIR*);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
/***********************************************************************
|
||||
* *
|
||||
* This software is part of the ast package *
|
||||
* Copyright (c) 1985-2011 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 *
|
||||
* http://www.eclipse.org/org/documents/epl-v10.html *
|
||||
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
|
||||
* *
|
||||
* Information and Software Systems Research *
|
||||
* AT&T Research *
|
||||
* Florham Park NJ *
|
||||
* *
|
||||
* Glenn Fowler <gsf@research.att.com> *
|
||||
* David Korn <dgk@research.att.com> *
|
||||
* Phong Vo <kpv@research.att.com> *
|
||||
* *
|
||||
***********************************************************************/
|
||||
#pragma prototyped
|
||||
/*
|
||||
* Glenn Fowler
|
||||
* AT&T Research
|
||||
*
|
||||
* 3d fs interface definitions
|
||||
*/
|
||||
|
||||
#ifndef _FS3D_H
|
||||
#define _FS3D_H
|
||||
|
||||
#include <ast_fs.h>
|
||||
|
||||
#if _int_st_spare1
|
||||
#define iview(p) ((p)->st_spare1)
|
||||
#define IVIEW(p,v) ((p)->st_spare1=(v))
|
||||
#else
|
||||
#if _ary_st_spare4
|
||||
#define iview(p) ((p)->st_spare4[0])
|
||||
#define IVIEW(p,v) ((p)->st_spare4[0]=(v))
|
||||
#else
|
||||
#if _ary_st_extra
|
||||
#define iview(p) ((p)->st_extra[0])
|
||||
#define IVIEW(p,v) ((p)->st_extra[0]=(v))
|
||||
#else
|
||||
#if _ary_st_pad4
|
||||
#define iview(p) ((p)->st_pad4[0])
|
||||
#define IVIEW(p,v) ((p)->st_pad4[0]=(v))
|
||||
#else
|
||||
#if _mem_st_rdev_stat
|
||||
#define iview(p) ((S_ISBLK((p)->st_mode)||S_ISCHR((p)->st_mode))?0:(p)->st_rdev)
|
||||
#define IVIEW(p,v) do{if(!S_ISBLK((p)->st_mode)&&!S_ISCHR((p)->st_mode))(p)->st_rdev=(v);}while(0)
|
||||
#else
|
||||
#define iview(p) 0
|
||||
#define IVIEW(p,v)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* special options
|
||||
*/
|
||||
|
||||
#define FS3D_init "/#option/init"
|
||||
#define FS3D_on "/#option/3d"
|
||||
#define FS3D_off "/#option/2d"
|
||||
|
||||
/*
|
||||
* fs3d(3) ops
|
||||
*/
|
||||
|
||||
#define FS3D_OP(o,a) (((a)<<3)|(o))
|
||||
|
||||
#define FS3D_INIT FS3D_OP_INIT /* re-initialize tables */
|
||||
#define FS3D_OFF FS3D_OP_OFF
|
||||
#define FS3D_ON FS3D_OP_ON
|
||||
#define FS3D_TEST FS3D_OP_TEST
|
||||
#define FS3D_LIMIT(n) FS3D_OP(FS3D_OP_LIMIT,n)
|
||||
|
||||
#define FS3D_op(x) ((x)&07)
|
||||
#define FS3D_arg(x) (((x)>>3)&07777)
|
||||
|
||||
#define FS3D_OP_OFF 0
|
||||
#define FS3D_OP_ON 1
|
||||
#define FS3D_OP_TEST 2
|
||||
#define FS3D_OP_LIMIT 3
|
||||
#define FS3D_OP_INIT 7
|
||||
|
||||
/*
|
||||
* mount(2) ops
|
||||
*/
|
||||
|
||||
#define FS3D_ALL (FS3D_VIEW|FS3D_VERSION)
|
||||
#define FS3D_VIEW 002
|
||||
#define FS3D_VERSION 004
|
||||
#define FS3D_GET 010
|
||||
#define FS3D_SIZE(n) ((n)<<4)
|
||||
#define FS3D_SIZEOF(n) ((n)>>4)
|
||||
|
||||
#if !_BLD_3d
|
||||
#define mount(s,t,f,d) fs3d_mount(s,t,f,d)
|
||||
#endif
|
||||
|
||||
#if _BLD_ast && defined(__EXPORT__)
|
||||
#define extern __EXPORT__
|
||||
#endif
|
||||
|
||||
extern int fs3d(int);
|
||||
extern int fs3d_mount(const char*, char*, int, void*);
|
||||
extern char* pathnext(char*, char*, long*);
|
||||
|
||||
#undef extern
|
||||
|
||||
#endif
|
|
@ -119,17 +119,6 @@ astconf("UNIVERSE", 0, universe);
|
|||
.EE
|
||||
The settable configuration names are:
|
||||
.TP
|
||||
.L FS_3D
|
||||
.L 1
|
||||
if
|
||||
.IR 3d (1)
|
||||
viewpathing is enabled,
|
||||
.L 0
|
||||
otherwise.
|
||||
This is an alternative to the
|
||||
.IR fs3d (3)
|
||||
interface.
|
||||
.TP
|
||||
.L PATH_RESOLVE
|
||||
.L logical
|
||||
if symbolic links are followed during file tree traversal,
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
.fp 5 CW
|
||||
.de Af
|
||||
.ds ;G \\*(;G\\f\\$1\\$3\\f\\$2
|
||||
.if !\\$4 .Af \\$2 \\$1 "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
|
||||
..
|
||||
.de aF
|
||||
.ie \\$3 .ft \\$1
|
||||
.el \{\
|
||||
.ds ;G \&
|
||||
.nr ;G \\n(.f
|
||||
.Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
|
||||
\\*(;G
|
||||
.ft \\n(;G \}
|
||||
..
|
||||
.de L
|
||||
.aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
|
||||
..
|
||||
.de LR
|
||||
.aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
|
||||
..
|
||||
.de RL
|
||||
.aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
|
||||
..
|
||||
.de EX \" start example
|
||||
.ta 1i 2i 3i 4i 5i 6i
|
||||
.PP
|
||||
.RS
|
||||
.PD 0
|
||||
.ft 5
|
||||
.nf
|
||||
..
|
||||
.de EE \" end example
|
||||
.fi
|
||||
.ft
|
||||
.PD
|
||||
.RE
|
||||
.PP
|
||||
..
|
||||
.TH FS3D 3
|
||||
.SH NAME
|
||||
fs3d \- 3D (nDFS) on/off switch
|
||||
.SH SYNOPSIS
|
||||
.EX
|
||||
#include <fs3d.h>
|
||||
|
||||
int fs3d(int \fIop\fP);
|
||||
.EE
|
||||
.SH DESCRIPTION
|
||||
.L fs3d
|
||||
controls and queries the
|
||||
.B 3D
|
||||
file system
|
||||
.RB (aka nDFS )
|
||||
enable state.
|
||||
.L 0
|
||||
is returned if the current process cannot mount
|
||||
.B 3D
|
||||
files.
|
||||
.I op
|
||||
may be one of:
|
||||
.TP
|
||||
.B FS3D_TEST
|
||||
Returns
|
||||
.L "FS3D_ON [1]"
|
||||
if
|
||||
.B 3D
|
||||
is enabled,
|
||||
.L "FS3D_OFF [0]"
|
||||
otherwise.
|
||||
.TP
|
||||
.B FS3D_ON
|
||||
Enables
|
||||
.B 3D
|
||||
and returns the previous
|
||||
.L 3D
|
||||
state (either
|
||||
.B FS3D_ON
|
||||
or
|
||||
.BR FS3D_OFF ).
|
||||
.TP
|
||||
\fBFS3D_LIMIT(\fIlimit\fB)\fR
|
||||
Sets the viewpath level limit to
|
||||
.IR limit .
|
||||
The previous limit is returned.
|
||||
.TP
|
||||
.B FS3D_INIT
|
||||
Re-initialize the
|
||||
.B 3D
|
||||
tables.
|
||||
Used for debugging.
|
||||
.SH "SEE ALSO"
|
||||
3D(1)
|
|
@ -138,11 +138,7 @@ removed;
|
|||
.L ..
|
||||
moved to the front;
|
||||
.L /..
|
||||
preserved for super root hacks;
|
||||
.L ...
|
||||
resolved if
|
||||
.IR fs3d (3)
|
||||
is enabled.
|
||||
preserved for super root hacks.
|
||||
.I flags is the inclusive-or of:
|
||||
.TP
|
||||
.L PATH_DOTDOT
|
||||
|
@ -388,4 +384,4 @@ may be
|
|||
is used to avoid file conflicts but the generated path name is not created,
|
||||
so you could lose in a race.
|
||||
.SH "SEE ALSO"
|
||||
3d(1), access(2), confstr(3), fs3d(3), lstat(2), stat(2)
|
||||
access(2), confstr(3), lstat(2), stat(2)
|
||||
|
|
|
@ -145,7 +145,3 @@ The
|
|||
.I ast
|
||||
.IR directory (3)
|
||||
routines do this.
|
||||
.IR 3d (1)
|
||||
viewpathing does
|
||||
.I preroot
|
||||
the right way.
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
/***********************************************************************
|
||||
* *
|
||||
* This software is part of the ast package *
|
||||
* Copyright (c) 1985-2011 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 *
|
||||
* http://www.eclipse.org/org/documents/epl-v10.html *
|
||||
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
|
||||
* *
|
||||
* Information and Software Systems Research *
|
||||
* AT&T Research *
|
||||
* Florham Park NJ *
|
||||
* *
|
||||
* Glenn Fowler <gsf@research.att.com> *
|
||||
* David Korn <dgk@research.att.com> *
|
||||
* Phong Vo <kpv@research.att.com> *
|
||||
* *
|
||||
***********************************************************************/
|
||||
#pragma prototyped
|
||||
/*
|
||||
* Glenn Fowler
|
||||
* AT&T Bell Laboratories
|
||||
*
|
||||
* 3d fs operations
|
||||
* only active for non-shared 3d library
|
||||
*/
|
||||
|
||||
#define mount ______mount
|
||||
|
||||
#include <ast.h>
|
||||
|
||||
#undef mount
|
||||
|
||||
#include <fs3d.h>
|
||||
|
||||
int
|
||||
fs3d(register int op)
|
||||
{
|
||||
register int cur;
|
||||
register char* v;
|
||||
char val[sizeof(FS3D_off) + 8];
|
||||
|
||||
static int fsview;
|
||||
static char on[] = FS3D_on;
|
||||
static char off[] = FS3D_off;
|
||||
|
||||
if (fsview < 0)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* get the current setting
|
||||
*/
|
||||
|
||||
if (!fsview && (!getenv("LD_PRELOAD") || mount("", "", 0, NiL)))
|
||||
goto nope;
|
||||
if (FS3D_op(op) == FS3D_OP_INIT && mount(FS3D_init, NiL, FS3D_VIEW, NiL))
|
||||
goto nope;
|
||||
if (mount(on, val, FS3D_VIEW|FS3D_GET|FS3D_SIZE(sizeof(val)), NiL))
|
||||
goto nope;
|
||||
if (v = strchr(val, ' '))
|
||||
v++;
|
||||
else
|
||||
v = val;
|
||||
if (!strcmp(v, on))
|
||||
cur = FS3D_ON;
|
||||
else if (!strncmp(v, off, sizeof(off) - 1) && v[sizeof(off)] == '=')
|
||||
cur = FS3D_LIMIT((int)strtol(v + sizeof(off) + 1, NiL, 0));
|
||||
else
|
||||
cur = FS3D_OFF;
|
||||
if (cur != op)
|
||||
{
|
||||
switch (FS3D_op(op))
|
||||
{
|
||||
case FS3D_OP_OFF:
|
||||
v = off;
|
||||
break;
|
||||
case FS3D_OP_ON:
|
||||
v = on;
|
||||
break;
|
||||
case FS3D_OP_LIMIT:
|
||||
sfsprintf(val, sizeof(val), "%s=%d", off, FS3D_arg(op));
|
||||
v = val;
|
||||
break;
|
||||
default:
|
||||
v = 0;
|
||||
break;
|
||||
}
|
||||
if (v && mount(v, NiL, FS3D_VIEW, NiL))
|
||||
goto nope;
|
||||
}
|
||||
fsview = 1;
|
||||
return cur;
|
||||
nope:
|
||||
fsview = -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* user code that includes <fs3d.h> will have mount() mapped to fs3d_mount()
|
||||
* this restricts the various "standard" mount prototype conflicts to this spot
|
||||
* this means that code that includes <fs3d.h> cannot access the real mount
|
||||
* (at least without some additional macro hackery
|
||||
*/
|
||||
|
||||
#undef mount
|
||||
|
||||
extern int mount(const char*, char*, int, void*);
|
||||
|
||||
int
|
||||
fs3d_mount(const char* source, char* target, int flags, void* data)
|
||||
{
|
||||
return mount(source, target, flags, data);
|
||||
}
|
|
@ -31,7 +31,6 @@
|
|||
#include <ast.h>
|
||||
#include <ast_dir.h>
|
||||
#include <error.h>
|
||||
#include <fs3d.h>
|
||||
#include <ls.h>
|
||||
|
||||
struct Ftsent;
|
||||
|
@ -65,7 +64,6 @@ typedef int (*Stat_f)(const char*, struct stat*);
|
|||
int flags; /* fts_open() flags */ \
|
||||
int nd; \
|
||||
unsigned char children; \
|
||||
unsigned char fs3d; \
|
||||
unsigned char nostat; \
|
||||
unsigned char state; /* fts_read() state */ \
|
||||
char* base; /* basename in path */ \
|
||||
|
@ -521,7 +519,7 @@ info(FTS* fts, register FTSENT* f, const char* path, struct stat* sp, int flags)
|
|||
#endif
|
||||
if (S_ISDIR(sp->st_mode))
|
||||
{
|
||||
if ((flags & FTS_NOSTAT) && !fts->fs3d)
|
||||
if ((flags & FTS_NOSTAT))
|
||||
{
|
||||
f->fts_parent->nlink--;
|
||||
#ifdef D_TYPE
|
||||
|
@ -752,7 +750,6 @@ fts_open(char* const* pathnames, int flags, int (*comparf)(FTSENT* const*, FTSEN
|
|||
fts->flags = flags;
|
||||
fts->cd = (flags & FTS_NOCHDIR) ? 1 : -1;
|
||||
fts->comparf = comparf;
|
||||
fts->fs3d = fs3d(FS3D_TEST);
|
||||
|
||||
/*
|
||||
* set up the path work buffer
|
||||
|
|
|
@ -79,7 +79,6 @@ getcwd(char* buf, size_t len)
|
|||
|
||||
#include <ast_dir.h>
|
||||
#include <error.h>
|
||||
#include <fs3d.h>
|
||||
|
||||
#ifndef ERANGE
|
||||
#define ERANGE E2BIG
|
||||
|
@ -184,18 +183,6 @@ getcwd(char* buf, size_t len)
|
|||
};
|
||||
|
||||
if (buf && !len) ERROR(EINVAL);
|
||||
if (fs3d(FS3D_TEST) && (namlen = mount(".", dots, FS3D_GET|FS3D_VIEW|FS3D_SIZE(sizeof(dots)), NiL)) > 1 && namlen < sizeof(dots))
|
||||
{
|
||||
p = dots;
|
||||
easy:
|
||||
namlen++;
|
||||
if (buf)
|
||||
{
|
||||
if (len < namlen) ERROR(ERANGE);
|
||||
}
|
||||
else if (!(buf = newof(0, char, namlen, len))) ERROR(ENOMEM);
|
||||
return (char*)memcpy(buf, p, namlen);
|
||||
}
|
||||
cur = &curst;
|
||||
par = &parst;
|
||||
if (stat(".", par)) ERROR(errno);
|
||||
|
@ -209,7 +196,13 @@ getcwd(char* buf, size_t len)
|
|||
if (cur->st_ino == par->st_ino && cur->st_dev == par->st_dev)
|
||||
{
|
||||
namlen = strlen(p);
|
||||
goto easy;
|
||||
namlen++;
|
||||
if (buf)
|
||||
{
|
||||
if (len < namlen) ERROR(ERANGE);
|
||||
}
|
||||
else if (!(buf = newof(0, char, namlen, len))) ERROR(ENOMEM);
|
||||
return (char*)memcpy(buf, p, namlen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,11 +39,7 @@ __STDPP__directive pragma pp:nohide getenv
|
|||
*/
|
||||
|
||||
Intercepts_t intercepts
|
||||
#if _BLD_3d
|
||||
;
|
||||
#else
|
||||
= { 0 };
|
||||
#endif
|
||||
|
||||
#if _UWIN && !defined(getenv)
|
||||
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#include "intercepts.h"
|
||||
|
||||
#include <fs3d.h>
|
||||
|
||||
/*
|
||||
* put name=value in the environment
|
||||
* pointer to value returned
|
||||
|
@ -75,15 +73,6 @@ setenviron(const char* akey)
|
|||
n = INCREMENT;
|
||||
if (!p || (last - p + 1) < n)
|
||||
{
|
||||
if (!p && fs3d(FS3D_TEST))
|
||||
{
|
||||
/*
|
||||
* kick 3d initialization
|
||||
*/
|
||||
|
||||
close(open(".", O_RDONLY|O_cloexec));
|
||||
v = environ;
|
||||
}
|
||||
if (!(p = newof(p, char*, n, 0)))
|
||||
return 0;
|
||||
last = p + n - 1;
|
||||
|
|
|
@ -30,13 +30,8 @@
|
|||
* remove redundant .'s and /'s
|
||||
* move ..'s to the front
|
||||
* /.. preserved (for pdu and newcastle hacks)
|
||||
* FS_3D handles ...
|
||||
* if (flags&PATH_PHYSICAL) then symlinks resolved at each component
|
||||
* if (flags&PATH_DOTDOT) then each .. checked for access
|
||||
* if (flags&PATH_EXISTS) then path must exist at each component
|
||||
* if (flags&PATH_VERIFIED(n)) then first n chars of path exist
|
||||
*
|
||||
* longer pathname possible if (flags&PATH_PHYSICAL) or FS_3D ... involved
|
||||
* longer pathname possible if (flags&PATH_PHYSICAL) involved
|
||||
* 0 returned on error and if (flags&(PATH_DOTDOT|PATH_EXISTS)) then path
|
||||
* will contain the components following the failure point
|
||||
*/
|
||||
|
@ -45,7 +40,6 @@
|
|||
|
||||
#include <ast.h>
|
||||
#include <ls.h>
|
||||
#include <fs3d.h>
|
||||
#include <error.h>
|
||||
|
||||
char*
|
||||
|
@ -70,9 +64,6 @@ pathcanon_20100601(char* path, size_t size, int flags)
|
|||
char* v;
|
||||
int loop;
|
||||
int oerrno;
|
||||
#if defined(FS_3D)
|
||||
long visits = 0;
|
||||
#endif
|
||||
|
||||
oerrno = errno;
|
||||
dots = loop = 0;
|
||||
|
@ -129,31 +120,7 @@ pathcanon_20100601(char* path, size_t size, int flags)
|
|||
else for (t -= 5; t > r && *(t - 1) != '/'; t--);
|
||||
break;
|
||||
case 3:
|
||||
#if defined(FS_3D)
|
||||
{
|
||||
char* x;
|
||||
char* o;
|
||||
int c;
|
||||
|
||||
o = t;
|
||||
if ((t -= 5) <= path) t = path + 1;
|
||||
c = *t;
|
||||
*t = 0;
|
||||
if (x = pathnext(phys, s - (*s != 0), &visits))
|
||||
{
|
||||
r = path;
|
||||
if (t == r + 1) x = r;
|
||||
v = s = t = x;
|
||||
}
|
||||
else
|
||||
{
|
||||
*t = c;
|
||||
t = o;
|
||||
}
|
||||
}
|
||||
#else
|
||||
r = t;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
if ((flags & PATH_PHYSICAL) && loop < 32 && (t - 1) > path)
|
||||
|
|
|
@ -31,25 +31,12 @@
|
|||
|
||||
#include <ast.h>
|
||||
|
||||
/*
|
||||
* building 3d flirts with the dark side
|
||||
*/
|
||||
|
||||
#if _BLD_3d
|
||||
|
||||
#undef pathcat
|
||||
#define pathcat_20100601 _3d_pathcat
|
||||
|
||||
#else
|
||||
|
||||
char*
|
||||
pathcat(char* path, const char* dirs, int sep, const char* a, const char* b)
|
||||
{
|
||||
return pathcat_20100601(dirs, sep, a, b, path, PATH_MAX);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#undef _AST_API
|
||||
|
||||
#include <ast_api.h>
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
#include <ast.h>
|
||||
#include <ctype.h>
|
||||
#include <fs3d.h>
|
||||
#include <preroot.h>
|
||||
#include <ls.h>
|
||||
|
||||
|
@ -105,13 +104,6 @@ pathkey_20100601(const char* lang, const char* tool, const char* apath, char* ke
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 3D
|
||||
*/
|
||||
|
||||
if (!flags && fs3d(FS3D_TEST) && (c = mount(path, tmp, FS3D_GET|FS3D_ALL|FS3D_SIZE(PATH_MAX), NiL)) > 1 && c < PATH_MAX)
|
||||
path = tmp;
|
||||
|
||||
/*
|
||||
* preroot
|
||||
*/
|
||||
|
|
|
@ -32,7 +32,6 @@ static const char id[] = "\n@(#)$Id: getconf (AT&T Research) 2012-05-01 $\0\n";
|
|||
|
||||
#include <ast.h>
|
||||
#include <error.h>
|
||||
#include <fs3d.h>
|
||||
#include <ctype.h>
|
||||
#include <regex.h>
|
||||
#include <proc.h>
|
||||
|
@ -142,19 +141,7 @@ static Feature_t dynamic[] =
|
|||
0,
|
||||
OP_conformance
|
||||
},
|
||||
#define OP_fs_3d 2
|
||||
{
|
||||
&dynamic[OP_fs_3d+1],
|
||||
"FS_3D",
|
||||
&null[0],
|
||||
"0",
|
||||
0,
|
||||
5,
|
||||
CONF_AST,
|
||||
0,
|
||||
OP_fs_3d
|
||||
},
|
||||
#define OP_getconf 3
|
||||
#define OP_getconf 2
|
||||
{
|
||||
&dynamic[OP_getconf+1],
|
||||
"GETCONF",
|
||||
|
@ -170,7 +157,7 @@ static Feature_t dynamic[] =
|
|||
CONF_READONLY,
|
||||
OP_getconf
|
||||
},
|
||||
#define OP_hosttype 4
|
||||
#define OP_hosttype 3
|
||||
{
|
||||
&dynamic[OP_hosttype+1],
|
||||
"HOSTTYPE",
|
||||
|
@ -182,7 +169,7 @@ static Feature_t dynamic[] =
|
|||
CONF_READONLY,
|
||||
OP_hosttype
|
||||
},
|
||||
#define OP_libpath 5
|
||||
#define OP_libpath 4
|
||||
{
|
||||
&dynamic[OP_libpath+1],
|
||||
"LIBPATH",
|
||||
|
@ -198,7 +185,7 @@ static Feature_t dynamic[] =
|
|||
0,
|
||||
OP_libpath
|
||||
},
|
||||
#define OP_libprefix 6
|
||||
#define OP_libprefix 5
|
||||
{
|
||||
&dynamic[OP_libprefix+1],
|
||||
"LIBPREFIX",
|
||||
|
@ -214,7 +201,7 @@ static Feature_t dynamic[] =
|
|||
0,
|
||||
OP_libprefix
|
||||
},
|
||||
#define OP_libsuffix 7
|
||||
#define OP_libsuffix 6
|
||||
{
|
||||
&dynamic[OP_libsuffix+1],
|
||||
"LIBSUFFIX",
|
||||
|
@ -230,7 +217,7 @@ static Feature_t dynamic[] =
|
|||
0,
|
||||
OP_libsuffix
|
||||
},
|
||||
#define OP_path_attributes 8
|
||||
#define OP_path_attributes 7
|
||||
{
|
||||
&dynamic[OP_path_attributes+1],
|
||||
"PATH_ATTRIBUTES",
|
||||
|
@ -246,7 +233,7 @@ static Feature_t dynamic[] =
|
|||
CONF_READONLY,
|
||||
OP_path_attributes
|
||||
},
|
||||
#define OP_path_resolve 9
|
||||
#define OP_path_resolve 8
|
||||
{
|
||||
&dynamic[OP_path_resolve+1],
|
||||
"PATH_RESOLVE",
|
||||
|
@ -258,7 +245,7 @@ static Feature_t dynamic[] =
|
|||
0,
|
||||
OP_path_resolve
|
||||
},
|
||||
#define OP_universe 10
|
||||
#define OP_universe 9
|
||||
{
|
||||
0,
|
||||
"UNIVERSE",
|
||||
|
@ -522,7 +509,7 @@ initialize(register Feature_t* fp, const char* path, const char* command, const
|
|||
ok = 1;
|
||||
break;
|
||||
case OP_path_resolve:
|
||||
ok = fs3d(FS3D_TEST);
|
||||
ok = 0;
|
||||
break;
|
||||
case OP_universe:
|
||||
ok = streq(_UNIV_DEFAULT, DEFAULT(OP_universe));
|
||||
|
@ -692,10 +679,6 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int
|
|||
#endif
|
||||
break;
|
||||
|
||||
case OP_fs_3d:
|
||||
fp->value = fs3d(value ? value[0] ? FS3D_ON : FS3D_OFF : FS3D_TEST) ? "1" : null;
|
||||
break;
|
||||
|
||||
case OP_hosttype:
|
||||
break;
|
||||
|
||||
|
|
|
@ -262,10 +262,6 @@ done ${PACKAGE_ast_INCLUDE}/stk.h
|
|||
make ${PACKAGE_ast_INCLUDE}/hashkey.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
|
||||
done ${PACKAGE_ast_INCLUDE}/hashkey.h
|
||||
make ${PACKAGE_ast_INCLUDE}/fs3d.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
|
||||
done ${PACKAGE_ast_INCLUDE}/fs3d.h
|
||||
prev fts_fix.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/times.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
|
||||
|
@ -381,7 +377,6 @@ done rev.h
|
|||
prev cmd.h implicit
|
||||
done rev.c
|
||||
make rm.c
|
||||
prev ${PACKAGE_ast_INCLUDE}/fs3d.h implicit
|
||||
prev fts_fix.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
|
||||
prev cmd.h implicit
|
||||
|
|
|
@ -134,7 +134,6 @@ static const char usage_tail[] =
|
|||
#include <ls.h>
|
||||
#include <times.h>
|
||||
#include <fts_fix.h>
|
||||
#include <fs3d.h>
|
||||
#include <hashkey.h>
|
||||
#include <stk.h>
|
||||
#include <tmx.h>
|
||||
|
@ -161,11 +160,9 @@ typedef struct State_s /* program state */
|
|||
int directory; /* destination is directory */
|
||||
int flags; /* FTS_* flags */
|
||||
int force; /* force approval */
|
||||
int fs3d; /* 3d fs enabled */
|
||||
int hierarchy; /* preserve hierarchy */
|
||||
int interactive; /* prompt for approval */
|
||||
int missmode; /* default missing dir mode */
|
||||
int official; /* move to next view */
|
||||
int op; /* {CP,LN,MV} */
|
||||
int perm; /* permissions to preserve */
|
||||
int postsiz; /* state.path post index */
|
||||
|
@ -418,12 +415,8 @@ visit(State_t* state, register FTSENT* ent)
|
|||
fts_set(NiL, ent, FTS_SKIP);
|
||||
return 0;
|
||||
}
|
||||
else if (!state->fs3d || !iview(&st))
|
||||
else
|
||||
{
|
||||
/*
|
||||
* target is in top 3d view
|
||||
*/
|
||||
|
||||
if (state->op != LN && st.st_dev == ent->fts_statp->st_dev && st.st_ino == ent->fts_statp->st_ino)
|
||||
{
|
||||
if (state->op == MV)
|
||||
|
@ -436,8 +429,7 @@ visit(State_t* state, register FTSENT* ent)
|
|||
sfputr(sfstdout, state->path, '\n');
|
||||
goto operate;
|
||||
}
|
||||
if (!state->official)
|
||||
error(2, "%s: identical to %s", state->path, ent->fts_path);
|
||||
error(2, "%s: identical to %s", state->path, ent->fts_path);
|
||||
return 0;
|
||||
}
|
||||
if (S_ISDIR(st.st_mode))
|
||||
|
@ -966,8 +958,6 @@ b_cp(int argc, register char** argv, Shbltin_t* context)
|
|||
error(ERROR_USAGE|4, "%s", optusage(NiL));
|
||||
if (s && !state->directory)
|
||||
error(3, "%s: not a directory", file);
|
||||
if ((state->fs3d = fs3d(FS3D_TEST)) && strmatch(file, "...|*/...|.../*"))
|
||||
state->official = 1;
|
||||
state->postsiz = strlen(file);
|
||||
if (state->pathsiz < roundof(state->postsiz + 2, PATH_CHUNK) && !(state->path = newof(state->path, char, state->pathsiz = roundof(state->postsiz + 2, PATH_CHUNK), 0)))
|
||||
error(ERROR_SYSTEM|3, "out of space");
|
||||
|
|
|
@ -70,7 +70,6 @@ USAGE_LICENSE
|
|||
#include <cmd.h>
|
||||
#include <ls.h>
|
||||
#include <fts_fix.h>
|
||||
#include <fs3d.h>
|
||||
|
||||
#define RM_ENTRY 1
|
||||
|
||||
|
@ -86,7 +85,6 @@ typedef struct State_s /* program state */
|
|||
int clobber; /* clear out file data first */
|
||||
int directory; /* remove(dir) not rmdir(dir) */
|
||||
int force; /* force actions */
|
||||
int fs3d; /* 3d enabled */
|
||||
int interactive; /* prompt for approval */
|
||||
int recursive; /* remove subtrees too */
|
||||
int terminal; /* attached to terminal */
|
||||
|
@ -115,8 +113,6 @@ rm(State_t* state, register FTSENT* ent)
|
|||
if (!state->force)
|
||||
error(2, "%s: not found", ent->fts_path);
|
||||
}
|
||||
else if (state->fs3d && iview(ent->fts_statp))
|
||||
fts_set(NiL, ent, FTS_SKIP);
|
||||
else switch (ent->fts_info)
|
||||
{
|
||||
case FTS_DNR:
|
||||
|
@ -332,12 +328,10 @@ b_rm(int argc, register char** argv, Shbltin_t* context)
|
|||
State_t state;
|
||||
FTS* fts;
|
||||
FTSENT* ent;
|
||||
int set3d;
|
||||
|
||||
cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_NOTIFY);
|
||||
memset(&state, 0, sizeof(state));
|
||||
state.context = context;
|
||||
state.fs3d = fs3d(FS3D_TEST);
|
||||
state.terminal = isatty(0);
|
||||
for (;;)
|
||||
{
|
||||
|
@ -396,14 +390,6 @@ b_rm(int argc, register char** argv, Shbltin_t* context)
|
|||
state.verbose = 0;
|
||||
state.uid = geteuid();
|
||||
state.unconditional = state.unconditional && state.recursive && state.force;
|
||||
if (state.recursive && state.fs3d)
|
||||
{
|
||||
set3d = state.fs3d;
|
||||
state.fs3d = 0;
|
||||
fs3d(0);
|
||||
}
|
||||
else
|
||||
set3d = 0;
|
||||
if (fts = fts_open(argv, FTS_PHYSICAL, NiL))
|
||||
{
|
||||
while (!sh_checksig(context) && (ent = fts_read(fts)) && !rm(&state, ent));
|
||||
|
@ -411,7 +397,5 @@ b_rm(int argc, register char** argv, Shbltin_t* context)
|
|||
}
|
||||
else if (!state.force)
|
||||
error(ERROR_SYSTEM|2, "%s: cannot remove", argv[0]);
|
||||
if (set3d)
|
||||
fs3d(set3d);
|
||||
return error_info.errors != 0;
|
||||
}
|
||||
|
|
|
@ -216,10 +216,6 @@ prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
|
|||
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
|
||||
done ${PACKAGE_ast_INCLUDE}/ls.h
|
||||
make ${PACKAGE_ast_INCLUDE}/fs3d.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
|
||||
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
|
||||
done ${PACKAGE_ast_INCLUDE}/fs3d.h
|
||||
prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
|
||||
prev colib.h implicit
|
||||
done coinit.c
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "colib.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fs3d.h>
|
||||
#include <ls.h>
|
||||
|
||||
static void
|
||||
|
@ -346,40 +345,6 @@ coinitialize(Coshell_t* co, int flags)
|
|||
if (old)
|
||||
sfprintf(sp, "\nexport PATH");
|
||||
sfputc(sp, '\n');
|
||||
if (sync)
|
||||
{
|
||||
/*
|
||||
* VPATH
|
||||
*/
|
||||
|
||||
p = (int)sfstrtell(sp);
|
||||
sfprintf(sp, "vpath ");
|
||||
n = PATH_MAX;
|
||||
if (fs3d(FS3D_TEST))
|
||||
for (;;)
|
||||
{
|
||||
if (!(t = sfstrrsrv(sp, n)))
|
||||
goto bad;
|
||||
if ((m = mount(NiL, t, FS3D_GET|FS3D_ALL|FS3D_SIZE(n), NiL)) > 0)
|
||||
m = n;
|
||||
else
|
||||
{
|
||||
if (!m)
|
||||
sfstrseek(sp, strlen(t), SEEK_CUR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m = 0;
|
||||
sfprintf(sp, "- /#option/2d");
|
||||
}
|
||||
if (m)
|
||||
sfstrseek(sp, p, SEEK_SET);
|
||||
else
|
||||
sfprintf(sp, " 2>/dev/null || :\n");
|
||||
sfprintf(sp, "umask 0%o\ncd '%s'\n", co->init.mask, state.pwd);
|
||||
}
|
||||
done:
|
||||
if (!(flags & CO_SERVER))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue