1
0
Fork 0
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:
Martijn Dekker 2020-07-17 04:26:17 +01:00
parent 2db9953ae0
commit fbc6cd4286
32 changed files with 83 additions and 683 deletions

View file

@ -1448,10 +1448,6 @@ use) case $1 in
32) case $HOSTTYPE in 32) case $HOSTTYPE in
*-64) HOSTTYPE=${HOSTTYPE%-64} ;; *-64) HOSTTYPE=${HOSTTYPE%-64} ;;
esac esac
case $wow in
*/32) ;;
*) vpath / /$bit ;;
esac
;; ;;
64) case $HOSTTYPE in 64) case $HOSTTYPE in
*-64) ;; *-64) ;;
@ -1459,7 +1455,6 @@ use) case $1 in
esac esac
case $wow in case $wow in
*/32) echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;; */32) echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;;
*) vpath / /$bit ;;
esac esac
;; ;;
esac esac
@ -3242,32 +3237,28 @@ esac
# set up the view state # set up the view state
VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT" 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
vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN $show VPATH=$VPATH
then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN $show export VPATH
else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH export VPATH
$show VPATH=$VPATH IFS=':'
$show export VPATH set '' $VPATH
export VPATH shift
IFS=':' IFS=$ifs
set '' $VPATH for i
shift do case $i in
IFS=$ifs */arch/*/*)
for i VIEW_src="$VIEW_src $i"
do case $i in ;;
*/arch/*/*) */arch/*)
VIEW_src="$VIEW_src $i" VIEW_bin="$VIEW_bin $i"
;; ;;
*/arch/*) *)
VIEW_bin="$VIEW_bin $i" VIEW_src="$VIEW_src $i"
;; ;;
*) esac
VIEW_src="$VIEW_src $i" VIEW_all="$VIEW_all $i"
;; done
esac
VIEW_all="$VIEW_all $i"
done
fi
# return 0 if arg in src|bin|all view # return 0 if arg in src|bin|all view
@ -3523,13 +3514,9 @@ int main(int argc, char** argv) { return argc || argv; }
esac esac
$exec touch $PROTOROOT/UPDATE $exec touch $PROTOROOT/UPDATE
) )
if (vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT) >/dev/null 2>&1 && VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT $show VPATH=$VPATH
then $show vpath $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT $USER_VPATH_CHAIN export VPATH
else VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
$show VPATH=$VPATH
export VPATH
fi
} }
} }
for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin
@ -5857,13 +5844,9 @@ cat $j $k
;; ;;
esac esac
if test '' != "$PROTOROOT" if test '' != "$PROTOROOT"
then if (vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT) >/dev/null 2>&1 && then VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT $show VPATH=$VPATH
then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN export VPATH
else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
$show VPATH=$VPATH
export VPATH
fi
fi fi
note believe generated files for $accept note believe generated files for $accept
eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign

View file

@ -1447,10 +1447,6 @@ use) case $1 in
32) case $HOSTTYPE in 32) case $HOSTTYPE in
*-64) HOSTTYPE=${HOSTTYPE%-64} ;; *-64) HOSTTYPE=${HOSTTYPE%-64} ;;
esac esac
case $wow in
*/32) ;;
*) vpath / /$bit ;;
esac
;; ;;
64) case $HOSTTYPE in 64) case $HOSTTYPE in
*-64) ;; *-64) ;;
@ -1458,7 +1454,6 @@ use) case $1 in
esac esac
case $wow in case $wow in
*/32) echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;; */32) echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;;
*) vpath / /$bit ;;
esac esac
;; ;;
esac esac
@ -3241,32 +3236,28 @@ esac
# set up the view state # set up the view state
VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT" 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
vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN $show VPATH=$VPATH
then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN $show export VPATH
else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH export VPATH
$show VPATH=$VPATH IFS=':'
$show export VPATH set '' $VPATH
export VPATH shift
IFS=':' IFS=$ifs
set '' $VPATH for i
shift do case $i in
IFS=$ifs */arch/*/*)
for i VIEW_src="$VIEW_src $i"
do case $i in ;;
*/arch/*/*) */arch/*)
VIEW_src="$VIEW_src $i" VIEW_bin="$VIEW_bin $i"
;; ;;
*/arch/*) *)
VIEW_bin="$VIEW_bin $i" VIEW_src="$VIEW_src $i"
;; ;;
*) esac
VIEW_src="$VIEW_src $i" VIEW_all="$VIEW_all $i"
;; done
esac
VIEW_all="$VIEW_all $i"
done
fi
# return 0 if arg in src|bin|all view # return 0 if arg in src|bin|all view
@ -3522,13 +3513,9 @@ int main(int argc, char** argv) { return argc || argv; }
esac esac
$exec touch $PROTOROOT/UPDATE $exec touch $PROTOROOT/UPDATE
) )
if (vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT) >/dev/null 2>&1 && VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT $show VPATH=$VPATH
then $show vpath $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT $USER_VPATH_CHAIN export VPATH
else VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
$show VPATH=$VPATH
export VPATH
fi
} }
} }
for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin
@ -5856,13 +5843,9 @@ cat $j $k
;; ;;
esac esac
if test '' != "$PROTOROOT" if test '' != "$PROTOROOT"
then if (vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT) >/dev/null 2>&1 && then VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT $show VPATH=$VPATH
then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN export VPATH
else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
$show VPATH=$VPATH
export VPATH
fi
fi fi
note believe generated files for $accept note believe generated files for $accept
eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign

View file

@ -232,10 +232,6 @@ meta FEATURE/dynamic features/%>FEATURE/% features/dynamic dynamic
make features/dynamic make features/dynamic
done 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 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 prev ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit
done FEATURE/dynamic dontcare generated done FEATURE/dynamic dontcare generated
make FEATURE/options implicit make FEATURE/options implicit

View file

@ -52,8 +52,6 @@ The options have the following defaults and meanings:
FILESCAN on Experimental option that allows fast reading of files FILESCAN on Experimental option that allows fast reading of files
using while < file;do ...; done and allowing fields in using while < file;do ...; done and allowing fields in
each line to be accessed as positional parameters. 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. KIA off Allow generation of shell cross reference database with -I.
MULTIBYTE on Multibyte character handling. Requires mblen() and MULTIBYTE on Multibyte character handling. Requires mblen() and
mbctowc(). mbctowc().

View file

@ -26,8 +26,6 @@
* let expr... * let expr...
* . file [arg...] * . file [arg...]
* :, true, false * :, true, false
* vpath [top] [base]
* vmap [top] [base]
* wait [job...] * wait [job...]
* shift [n] * shift [n]
* *

View file

@ -2030,11 +2030,6 @@ _JOB_
"[+SEE ALSO?\bjobs\b(1), \bps\b(1)]" "[+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[] = const char sh_optwhence[] =
"[-1c?\n@(#)$Id: whence (AT&T Research) 2007-04-24 $\n]" "[-1c?\n@(#)$Id: whence (AT&T Research) 2007-04-24 $\n]"
USAGE_LICENSE USAGE_LICENSE

View file

@ -68,7 +68,6 @@ tst pipe_socketpair note{ use socketpair() for peekable pipe() }end execute{
}end }end
tst socketpair_devfd note{ /dev/fd/N handles socketpair() }end execute{ tst socketpair_devfd note{ /dev/fd/N handles socketpair() }end execute{
#include <ast.h> #include <ast.h>
#include <fs3d.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
int main() int main()
@ -76,7 +75,6 @@ tst socketpair_devfd note{ /dev/fd/N handles socketpair() }end execute{
int devfd; int devfd;
int n; int n;
int sfd[2]; int sfd[2];
fs3d(FS3D_OFF);
close(0); close(0);
open("/dev/null", O_RDONLY); open("/dev/null", O_RDONLY);
if ((n = open("/dev/fd/0", O_RDONLY)) < 0) if ((n = open("/dev/fd/0", O_RDONLY)) < 0)

View file

@ -106,7 +106,6 @@ struct limits
int ngroups_max; /* maximum number of process groups */ int ngroups_max; /* maximum number of process groups */
unsigned char posix_version; /* posix version number */ unsigned char posix_version; /* posix version number */
unsigned char posix_jobcontrol;/* non-zero for job control systems */ 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 #ifndef SH_wait_f_defined

View file

@ -30,7 +30,7 @@ __OBSOLETE__ == $("6 months ago":@F=%(%Y0101)T)
HEADERSRC = ast.h ast_dir.h ast_getopt.h ast_std.h \ HEADERSRC = ast.h ast_dir.h ast_getopt.h ast_std.h \
ast_namval.h ast_windows.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 \ 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 \ 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 \ 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 \ 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 \ $(ID) 5.4 :LIBRARY: README RELEASE \
LIBAST.3 aso.3 ast.3 astsa.3 cdt.3 chr.3 compat.3 error.3 \ 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 \ 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 \ 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 \ 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 \ pathnative.c pathposix.c pathtemp.c pathtmp.c pathstat.c \
pathgetlink.c pathsetlink.c pathbin.c pathshell.c pathcd.c \ pathgetlink.c pathsetlink.c pathbin.c pathshell.c pathcd.c \
pathprog.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 \ astintercept.c conformance.c getenv.c setenviron.c \
optget.c optjoin.c optesc.c optctx.c strsort.c struniq.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 \ magic.c mime.c mimetype.c signal.c sigflag.c systrace.c \

View file

@ -490,9 +490,6 @@ exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACK
done telldir.o generated done telldir.o generated
make getcwd.o make getcwd.o
make misc/getcwd.c 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 make include/ast_dir.h implicit
prev std/dirent.h implicit prev std/dirent.h implicit
prev dir/dirlib.h implicit prev dir/dirlib.h implicit
@ -954,7 +951,6 @@ make pathcanon.o
make path/pathcanon.c make path/pathcanon.c
prev ast_api.h implicit prev ast_api.h implicit
prev include/error.h implicit prev include/error.h implicit
prev include/fs3d.h implicit
prev include/ls.h implicit prev include/ls.h implicit
prev include/ast.h implicit prev include/ast.h implicit
done path/pathcanon.c 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 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; } 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 done preroot.h generated
prev include/fs3d.h implicit
prev include/ast.h implicit prev include/ast.h implicit
done path/pathkey.c done path/pathkey.c
meta pathkey.o %.c>%.o path/pathkey.c pathkey 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 prev path/pathprog.c
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathprog.c exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathprog.c
done pathprog.o generated 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 ftwalk.o
make misc/ftwalk.c make misc/ftwalk.c
make include/ftwalk.h implicit make include/ftwalk.h implicit
@ -1251,7 +1237,6 @@ make fts.o
make misc/fts.c make misc/fts.c
prev include/fts.h implicit prev include/fts.h implicit
prev include/ls.h implicit prev include/ls.h implicit
prev include/fs3d.h implicit
prev include/error.h implicit prev include/error.h implicit
prev include/ast_dir.h implicit prev include/ast_dir.h implicit
prev include/ast.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 done getenv.o generated
make setenviron.o make setenviron.o
make misc/setenviron.c make misc/setenviron.c
prev include/fs3d.h implicit
prev misc/intercepts.h implicit prev misc/intercepts.h implicit
done misc/setenviron.c done misc/setenviron.c
meta setenviron.o %.c>%.o misc/setenviron.c setenviron meta setenviron.o %.c>%.o misc/setenviron.c setenviron
@ -5532,7 +5516,6 @@ done conftab.h
prev include/ls.h implicit prev include/ls.h implicit
prev include/proc.h implicit prev include/proc.h implicit
prev include/regex.h implicit prev include/regex.h implicit
prev include/fs3d.h implicit
prev include/error.h implicit prev include/error.h implicit
prev include/ast.h implicit prev include/ast.h implicit
prev misc/univlib.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 exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c obsolete/spawn.c
done spawn.o generated 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 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 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 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 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 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 ;} 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 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 ${INSTALLROOT}/man/man3/ftwalk.3
make man/ftwalk.3 make man/ftwalk.3
done 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 - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fts.h
exec - fi exec - fi
done ${INSTALLROOT}/include/ast/fts.h generated 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 make ${INSTALLROOT}/include/ast/getopt.h
prev comp/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 exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/getopt.h > 1.${COTEMP}.x

View file

@ -523,7 +523,7 @@ do flags=F
done done
case $name in 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= *) values=
script= script=

View file

@ -132,17 +132,11 @@ __STDPP__directive pragma pp:nohide DIR closedir opendir readdir seekdir telldir
int dd_size; /* valid data in block */ \ int dd_size; /* valid data in block */ \
char* dd_buf; /* directory block */ char* dd_buf; /* directory block */
#ifdef _BLD_3d
#define DIR DIRDIR
#endif
#undef _DIRENT_H #undef _DIRENT_H
#include "dirstd.h" #include "dirstd.h"
#ifndef _DIRENT_H #ifndef _DIRENT_H
#define _DIRENT_H 1 #define _DIRENT_H 1
#endif #endif
#ifdef _BLD_3d
#undef DIR
#endif
#ifndef DIRBLKSIZ #ifndef DIRBLKSIZ
#ifdef DIRBLK #ifdef DIRBLK

View file

@ -45,8 +45,6 @@ struct dirent
char d_name[1]; /* entry name */ char d_name[1]; /* entry name */
}; };
#ifndef _BLD_3d
#ifdef rewinddir #ifdef rewinddir
#undef rewinddir #undef rewinddir
#define rewinddir(p) seekdir(p,0L) #define rewinddir(p) seekdir(p,0L)
@ -59,5 +57,3 @@ extern void seekdir(DIR*, long);
extern long telldir(DIR*); extern long telldir(DIR*);
#endif #endif
#endif

View file

@ -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

View file

@ -119,17 +119,6 @@ astconf("UNIVERSE", 0, universe);
.EE .EE
The settable configuration names are: The settable configuration names are:
.TP .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 PATH_RESOLVE
.L logical .L logical
if symbolic links are followed during file tree traversal, if symbolic links are followed during file tree traversal,

View file

@ -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)

View file

@ -138,11 +138,7 @@ removed;
.L .. .L ..
moved to the front; moved to the front;
.L /.. .L /..
preserved for super root hacks; preserved for super root hacks.
.L ...
resolved if
.IR fs3d (3)
is enabled.
.I flags is the inclusive-or of: .I flags is the inclusive-or of:
.TP .TP
.L PATH_DOTDOT .L PATH_DOTDOT
@ -388,4 +384,4 @@ may be
is used to avoid file conflicts but the generated path name is not created, is used to avoid file conflicts but the generated path name is not created,
so you could lose in a race. so you could lose in a race.
.SH "SEE ALSO" .SH "SEE ALSO"
3d(1), access(2), confstr(3), fs3d(3), lstat(2), stat(2) access(2), confstr(3), lstat(2), stat(2)

View file

@ -145,7 +145,3 @@ The
.I ast .I ast
.IR directory (3) .IR directory (3)
routines do this. routines do this.
.IR 3d (1)
viewpathing does
.I preroot
the right way.

View file

@ -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);
}

View file

@ -31,7 +31,6 @@
#include <ast.h> #include <ast.h>
#include <ast_dir.h> #include <ast_dir.h>
#include <error.h> #include <error.h>
#include <fs3d.h>
#include <ls.h> #include <ls.h>
struct Ftsent; struct Ftsent;
@ -65,7 +64,6 @@ typedef int (*Stat_f)(const char*, struct stat*);
int flags; /* fts_open() flags */ \ int flags; /* fts_open() flags */ \
int nd; \ int nd; \
unsigned char children; \ unsigned char children; \
unsigned char fs3d; \
unsigned char nostat; \ unsigned char nostat; \
unsigned char state; /* fts_read() state */ \ unsigned char state; /* fts_read() state */ \
char* base; /* basename in path */ \ char* base; /* basename in path */ \
@ -521,7 +519,7 @@ info(FTS* fts, register FTSENT* f, const char* path, struct stat* sp, int flags)
#endif #endif
if (S_ISDIR(sp->st_mode)) if (S_ISDIR(sp->st_mode))
{ {
if ((flags & FTS_NOSTAT) && !fts->fs3d) if ((flags & FTS_NOSTAT))
{ {
f->fts_parent->nlink--; f->fts_parent->nlink--;
#ifdef D_TYPE #ifdef D_TYPE
@ -752,7 +750,6 @@ fts_open(char* const* pathnames, int flags, int (*comparf)(FTSENT* const*, FTSEN
fts->flags = flags; fts->flags = flags;
fts->cd = (flags & FTS_NOCHDIR) ? 1 : -1; fts->cd = (flags & FTS_NOCHDIR) ? 1 : -1;
fts->comparf = comparf; fts->comparf = comparf;
fts->fs3d = fs3d(FS3D_TEST);
/* /*
* set up the path work buffer * set up the path work buffer

View file

@ -79,7 +79,6 @@ getcwd(char* buf, size_t len)
#include <ast_dir.h> #include <ast_dir.h>
#include <error.h> #include <error.h>
#include <fs3d.h>
#ifndef ERANGE #ifndef ERANGE
#define ERANGE E2BIG #define ERANGE E2BIG
@ -184,18 +183,6 @@ getcwd(char* buf, size_t len)
}; };
if (buf && !len) ERROR(EINVAL); 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; cur = &curst;
par = &parst; par = &parst;
if (stat(".", par)) ERROR(errno); 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) if (cur->st_ino == par->st_ino && cur->st_dev == par->st_dev)
{ {
namlen = strlen(p); 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);
} }
} }
} }

View file

@ -39,11 +39,7 @@ __STDPP__directive pragma pp:nohide getenv
*/ */
Intercepts_t intercepts Intercepts_t intercepts
#if _BLD_3d
;
#else
= { 0 }; = { 0 };
#endif
#if _UWIN && !defined(getenv) #if _UWIN && !defined(getenv)

View file

@ -23,8 +23,6 @@
#include "intercepts.h" #include "intercepts.h"
#include <fs3d.h>
/* /*
* put name=value in the environment * put name=value in the environment
* pointer to value returned * pointer to value returned
@ -75,15 +73,6 @@ setenviron(const char* akey)
n = INCREMENT; n = INCREMENT;
if (!p || (last - p + 1) < n) 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))) if (!(p = newof(p, char*, n, 0)))
return 0; return 0;
last = p + n - 1; last = p + n - 1;

View file

@ -30,13 +30,8 @@
* remove redundant .'s and /'s * remove redundant .'s and /'s
* move ..'s to the front * move ..'s to the front
* /.. preserved (for pdu and newcastle hacks) * /.. 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 * 0 returned on error and if (flags&(PATH_DOTDOT|PATH_EXISTS)) then path
* will contain the components following the failure point * will contain the components following the failure point
*/ */
@ -45,7 +40,6 @@
#include <ast.h> #include <ast.h>
#include <ls.h> #include <ls.h>
#include <fs3d.h>
#include <error.h> #include <error.h>
char* char*
@ -70,9 +64,6 @@ pathcanon_20100601(char* path, size_t size, int flags)
char* v; char* v;
int loop; int loop;
int oerrno; int oerrno;
#if defined(FS_3D)
long visits = 0;
#endif
oerrno = errno; oerrno = errno;
dots = loop = 0; 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--); else for (t -= 5; t > r && *(t - 1) != '/'; t--);
break; break;
case 3: 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; r = t;
#endif
break; break;
default: default:
if ((flags & PATH_PHYSICAL) && loop < 32 && (t - 1) > path) if ((flags & PATH_PHYSICAL) && loop < 32 && (t - 1) > path)

View file

@ -31,25 +31,12 @@
#include <ast.h> #include <ast.h>
/*
* building 3d flirts with the dark side
*/
#if _BLD_3d
#undef pathcat
#define pathcat_20100601 _3d_pathcat
#else
char* char*
pathcat(char* path, const char* dirs, int sep, const char* a, const char* b) pathcat(char* path, const char* dirs, int sep, const char* a, const char* b)
{ {
return pathcat_20100601(dirs, sep, a, b, path, PATH_MAX); return pathcat_20100601(dirs, sep, a, b, path, PATH_MAX);
} }
#endif
#undef _AST_API #undef _AST_API
#include <ast_api.h> #include <ast_api.h>

View file

@ -36,7 +36,6 @@
#include <ast.h> #include <ast.h>
#include <ctype.h> #include <ctype.h>
#include <fs3d.h>
#include <preroot.h> #include <preroot.h>
#include <ls.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 * preroot
*/ */

View file

@ -32,7 +32,6 @@ static const char id[] = "\n@(#)$Id: getconf (AT&T Research) 2012-05-01 $\0\n";
#include <ast.h> #include <ast.h>
#include <error.h> #include <error.h>
#include <fs3d.h>
#include <ctype.h> #include <ctype.h>
#include <regex.h> #include <regex.h>
#include <proc.h> #include <proc.h>
@ -142,19 +141,7 @@ static Feature_t dynamic[] =
0, 0,
OP_conformance OP_conformance
}, },
#define OP_fs_3d 2 #define OP_getconf 2
{
&dynamic[OP_fs_3d+1],
"FS_3D",
&null[0],
"0",
0,
5,
CONF_AST,
0,
OP_fs_3d
},
#define OP_getconf 3
{ {
&dynamic[OP_getconf+1], &dynamic[OP_getconf+1],
"GETCONF", "GETCONF",
@ -170,7 +157,7 @@ static Feature_t dynamic[] =
CONF_READONLY, CONF_READONLY,
OP_getconf OP_getconf
}, },
#define OP_hosttype 4 #define OP_hosttype 3
{ {
&dynamic[OP_hosttype+1], &dynamic[OP_hosttype+1],
"HOSTTYPE", "HOSTTYPE",
@ -182,7 +169,7 @@ static Feature_t dynamic[] =
CONF_READONLY, CONF_READONLY,
OP_hosttype OP_hosttype
}, },
#define OP_libpath 5 #define OP_libpath 4
{ {
&dynamic[OP_libpath+1], &dynamic[OP_libpath+1],
"LIBPATH", "LIBPATH",
@ -198,7 +185,7 @@ static Feature_t dynamic[] =
0, 0,
OP_libpath OP_libpath
}, },
#define OP_libprefix 6 #define OP_libprefix 5
{ {
&dynamic[OP_libprefix+1], &dynamic[OP_libprefix+1],
"LIBPREFIX", "LIBPREFIX",
@ -214,7 +201,7 @@ static Feature_t dynamic[] =
0, 0,
OP_libprefix OP_libprefix
}, },
#define OP_libsuffix 7 #define OP_libsuffix 6
{ {
&dynamic[OP_libsuffix+1], &dynamic[OP_libsuffix+1],
"LIBSUFFIX", "LIBSUFFIX",
@ -230,7 +217,7 @@ static Feature_t dynamic[] =
0, 0,
OP_libsuffix OP_libsuffix
}, },
#define OP_path_attributes 8 #define OP_path_attributes 7
{ {
&dynamic[OP_path_attributes+1], &dynamic[OP_path_attributes+1],
"PATH_ATTRIBUTES", "PATH_ATTRIBUTES",
@ -246,7 +233,7 @@ static Feature_t dynamic[] =
CONF_READONLY, CONF_READONLY,
OP_path_attributes OP_path_attributes
}, },
#define OP_path_resolve 9 #define OP_path_resolve 8
{ {
&dynamic[OP_path_resolve+1], &dynamic[OP_path_resolve+1],
"PATH_RESOLVE", "PATH_RESOLVE",
@ -258,7 +245,7 @@ static Feature_t dynamic[] =
0, 0,
OP_path_resolve OP_path_resolve
}, },
#define OP_universe 10 #define OP_universe 9
{ {
0, 0,
"UNIVERSE", "UNIVERSE",
@ -522,7 +509,7 @@ initialize(register Feature_t* fp, const char* path, const char* command, const
ok = 1; ok = 1;
break; break;
case OP_path_resolve: case OP_path_resolve:
ok = fs3d(FS3D_TEST); ok = 0;
break; break;
case OP_universe: case OP_universe:
ok = streq(_UNIV_DEFAULT, DEFAULT(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 #endif
break; break;
case OP_fs_3d:
fp->value = fs3d(value ? value[0] ? FS3D_ON : FS3D_OFF : FS3D_TEST) ? "1" : null;
break;
case OP_hosttype: case OP_hosttype:
break; break;

View file

@ -262,10 +262,6 @@ done ${PACKAGE_ast_INCLUDE}/stk.h
make ${PACKAGE_ast_INCLUDE}/hashkey.h implicit make ${PACKAGE_ast_INCLUDE}/hashkey.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/hashkey.h 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 fts_fix.h implicit
prev ${PACKAGE_ast_INCLUDE}/times.h implicit prev ${PACKAGE_ast_INCLUDE}/times.h implicit
prev ${PACKAGE_ast_INCLUDE}/ls.h implicit prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
@ -381,7 +377,6 @@ done rev.h
prev cmd.h implicit prev cmd.h implicit
done rev.c done rev.c
make rm.c make rm.c
prev ${PACKAGE_ast_INCLUDE}/fs3d.h implicit
prev fts_fix.h implicit prev fts_fix.h implicit
prev ${PACKAGE_ast_INCLUDE}/ls.h implicit prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
prev cmd.h implicit prev cmd.h implicit

View file

@ -134,7 +134,6 @@ static const char usage_tail[] =
#include <ls.h> #include <ls.h>
#include <times.h> #include <times.h>
#include <fts_fix.h> #include <fts_fix.h>
#include <fs3d.h>
#include <hashkey.h> #include <hashkey.h>
#include <stk.h> #include <stk.h>
#include <tmx.h> #include <tmx.h>
@ -161,11 +160,9 @@ typedef struct State_s /* program state */
int directory; /* destination is directory */ int directory; /* destination is directory */
int flags; /* FTS_* flags */ int flags; /* FTS_* flags */
int force; /* force approval */ int force; /* force approval */
int fs3d; /* 3d fs enabled */
int hierarchy; /* preserve hierarchy */ int hierarchy; /* preserve hierarchy */
int interactive; /* prompt for approval */ int interactive; /* prompt for approval */
int missmode; /* default missing dir mode */ int missmode; /* default missing dir mode */
int official; /* move to next view */
int op; /* {CP,LN,MV} */ int op; /* {CP,LN,MV} */
int perm; /* permissions to preserve */ int perm; /* permissions to preserve */
int postsiz; /* state.path post index */ int postsiz; /* state.path post index */
@ -418,12 +415,8 @@ visit(State_t* state, register FTSENT* ent)
fts_set(NiL, ent, FTS_SKIP); fts_set(NiL, ent, FTS_SKIP);
return 0; 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 != LN && st.st_dev == ent->fts_statp->st_dev && st.st_ino == ent->fts_statp->st_ino)
{ {
if (state->op == MV) if (state->op == MV)
@ -436,8 +429,7 @@ visit(State_t* state, register FTSENT* ent)
sfputr(sfstdout, state->path, '\n'); sfputr(sfstdout, state->path, '\n');
goto operate; 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; return 0;
} }
if (S_ISDIR(st.st_mode)) 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)); error(ERROR_USAGE|4, "%s", optusage(NiL));
if (s && !state->directory) if (s && !state->directory)
error(3, "%s: not a directory", file); error(3, "%s: not a directory", file);
if ((state->fs3d = fs3d(FS3D_TEST)) && strmatch(file, "...|*/...|.../*"))
state->official = 1;
state->postsiz = strlen(file); 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))) 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"); error(ERROR_SYSTEM|3, "out of space");

View file

@ -70,7 +70,6 @@ USAGE_LICENSE
#include <cmd.h> #include <cmd.h>
#include <ls.h> #include <ls.h>
#include <fts_fix.h> #include <fts_fix.h>
#include <fs3d.h>
#define RM_ENTRY 1 #define RM_ENTRY 1
@ -86,7 +85,6 @@ typedef struct State_s /* program state */
int clobber; /* clear out file data first */ int clobber; /* clear out file data first */
int directory; /* remove(dir) not rmdir(dir) */ int directory; /* remove(dir) not rmdir(dir) */
int force; /* force actions */ int force; /* force actions */
int fs3d; /* 3d enabled */
int interactive; /* prompt for approval */ int interactive; /* prompt for approval */
int recursive; /* remove subtrees too */ int recursive; /* remove subtrees too */
int terminal; /* attached to terminal */ int terminal; /* attached to terminal */
@ -115,8 +113,6 @@ rm(State_t* state, register FTSENT* ent)
if (!state->force) if (!state->force)
error(2, "%s: not found", ent->fts_path); 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) else switch (ent->fts_info)
{ {
case FTS_DNR: case FTS_DNR:
@ -332,12 +328,10 @@ b_rm(int argc, register char** argv, Shbltin_t* context)
State_t state; State_t state;
FTS* fts; FTS* fts;
FTSENT* ent; FTSENT* ent;
int set3d;
cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_NOTIFY); cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_NOTIFY);
memset(&state, 0, sizeof(state)); memset(&state, 0, sizeof(state));
state.context = context; state.context = context;
state.fs3d = fs3d(FS3D_TEST);
state.terminal = isatty(0); state.terminal = isatty(0);
for (;;) for (;;)
{ {
@ -396,14 +390,6 @@ b_rm(int argc, register char** argv, Shbltin_t* context)
state.verbose = 0; state.verbose = 0;
state.uid = geteuid(); state.uid = geteuid();
state.unconditional = state.unconditional && state.recursive && state.force; 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)) if (fts = fts_open(argv, FTS_PHYSICAL, NiL))
{ {
while (!sh_checksig(context) && (ent = fts_read(fts)) && !rm(&state, ent)); 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) else if (!state.force)
error(ERROR_SYSTEM|2, "%s: cannot remove", argv[0]); error(ERROR_SYSTEM|2, "%s: cannot remove", argv[0]);
if (set3d)
fs3d(set3d);
return error_info.errors != 0; return error_info.errors != 0;
} }

View file

@ -216,10 +216,6 @@ prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
done ${PACKAGE_ast_INCLUDE}/ls.h 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 ${PACKAGE_ast_INCLUDE}/endian.h implicit
prev colib.h implicit prev colib.h implicit
done coinit.c done coinit.c

View file

@ -33,7 +33,6 @@
#include "colib.h" #include "colib.h"
#include <ctype.h> #include <ctype.h>
#include <fs3d.h>
#include <ls.h> #include <ls.h>
static void static void
@ -346,40 +345,6 @@ coinitialize(Coshell_t* co, int flags)
if (old) if (old)
sfprintf(sp, "\nexport PATH"); sfprintf(sp, "\nexport PATH");
sfputc(sp, '\n'); 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: done:
if (!(flags & CO_SERVER)) if (!(flags & CO_SERVER))
{ {