mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
324ec40db3 | ||
|
|
17b0776217 | ||
|
|
8d77b4e304 | ||
|
|
157002a7fa | ||
|
|
4c731d7856 | ||
|
|
1afa50deb4 | ||
|
|
5cc13c0e22 | ||
|
|
9f0dc73359 | ||
|
|
32cd273372 | ||
|
|
92c9323d3b | ||
|
|
01233029ed | ||
|
|
c264e2c65c | ||
|
|
45728f7c5d | ||
|
|
e382a3a979 | ||
|
|
d216e1f6de | ||
|
|
f4856526c7 |
No files matched your search
@@ -13,24 +13,13 @@ committing code that was written by someone else, I decided to use the
|
||||
|
||||
The template looks like this:
|
||||
|
||||
Reviewed by:
|
||||
Submitted by:
|
||||
Obtained from:
|
||||
Reviewed by:
|
||||
Submitted by:
|
||||
CVS: ----------------------------------------------------------------------
|
||||
CVS: Obtained from:
|
||||
CVS: If this change has been taken from another system, such as NetBSD,
|
||||
CVS: then name the system in this line, otherwise delete it.
|
||||
CVS: Reviewed by:
|
||||
CVS: Before committing changes please have someone check your work and
|
||||
CVS: include their name here. If the change is trivial and you have not
|
||||
CVS: had it reviewed then delete this line.
|
||||
CVS: Submitted by:
|
||||
CVS: If this code has been contributed to FreeBSD by someone else; i.e.,
|
||||
CVS: they sent us a patch or a new module, then include their name/email
|
||||
CVS: address here. If this is your work then delete this line.
|
||||
|
||||
(Note that these lines will also automatically removed now if the tags
|
||||
are empty.)
|
||||
CVS: Delete the ``Reviewed by'' line if this is somebody else's work
|
||||
CVS: (you are the reviewer).
|
||||
CVS: Delete the ``Submitted by'' line if this is NOT somebody else's
|
||||
CVS: work (you are the author).
|
||||
|
||||
If you are making substantial or possibly controversial changes to the
|
||||
code, please talk to someone else who either has commit authority, or
|
||||
@@ -53,13 +42,3 @@ so that the logs look cleaner.
|
||||
|
||||
-GAWollman
|
||||
|
||||
|
||||
Importing new stuff is somewhat error-prone since it's easy to create
|
||||
unwanted directories or even whole subtrees without noticing it. The
|
||||
script ``easy-import'' has been created to make first-time imports
|
||||
easier to handle (vendor-branch imports are not yet supported), and to
|
||||
help people avoiding the most common errors. It is available as
|
||||
/usr/local/bin/easy-import on freefall, or in the source tree as
|
||||
src/gnu/usr.bin/cvs/contrib/easy-import.pl.
|
||||
|
||||
Jörg Wunsch
|
||||
@@ -1,29 +1,31 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
# $Id: Makefile,v 1.29 1994/11/08 00:55:08 ache Exp $
|
||||
#
|
||||
# Make command line options:
|
||||
# -DCLOBBER will remove /usr/include and MOST of /usr/lib
|
||||
# -DCLOBBER will remove /usr/include and MOST of /usr/lib
|
||||
# -DMAKE_LOCAL to add ./local to the SUBDIR list
|
||||
# -DMAKE_PORTS to add ./ports to the SUBDIR list
|
||||
# XXX1 -DMAKE_KERBEROS to build KerberosIV
|
||||
# -DMAKE_EBONES to build eBones (KerberosIV)
|
||||
#
|
||||
# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
|
||||
# -DNOCLEAN to not clean anything at all
|
||||
# -DNOCRYPT will prevent building of crypt versions
|
||||
# -DNOLKM do not build loadable kernel modules
|
||||
# -DNOOBJDIR do not run ``${MAKE} obj''
|
||||
# -DNOPROFILE do not build profiled libraries
|
||||
# -DNOSECURE do not go into secure subdir
|
||||
#
|
||||
#
|
||||
# XXX1 The kerberos IV off the 4.4-Lite tape (src/kerberosIV)
|
||||
# will not build successfully yet. MAKE_KERBEROS should not be
|
||||
# defined.
|
||||
|
||||
# Put initial settings here.
|
||||
SUBDIR=
|
||||
|
||||
# We must do include and lib first so that the perl *.ph generation
|
||||
# works correctly as it uses the header files installed by this.
|
||||
.if exists(include)
|
||||
SUBDIR+= include
|
||||
.endif
|
||||
.if exists(lib)
|
||||
SUBDIR+= lib
|
||||
# Must be first for "distribute" to work
|
||||
.if exists(release)
|
||||
SUBDIR+= release
|
||||
.endif
|
||||
|
||||
.if exists(bin)
|
||||
@@ -38,6 +40,15 @@ SUBDIR+= games
|
||||
.if exists(gnu)
|
||||
SUBDIR+= gnu
|
||||
.endif
|
||||
.if exists(include)
|
||||
SUBDIR+= include
|
||||
.endif
|
||||
.if exists(lib)
|
||||
SUBDIR+= lib
|
||||
.endif
|
||||
.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS)
|
||||
SUBDIR+= kerberosIV
|
||||
.endif
|
||||
.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
|
||||
SUBDIR+= eBones
|
||||
.endif
|
||||
@@ -86,33 +97,26 @@ OBJDIR=
|
||||
.else
|
||||
OBJDIR= obj
|
||||
.endif
|
||||
|
||||
.if defined(NOCLEAN)
|
||||
CLEANDIR=
|
||||
WORLD_CLEANDIST=obj
|
||||
.else
|
||||
WORLD_CLEANDIST=cleandist
|
||||
.if defined(NOCLEANDIR)
|
||||
CLEANDIR= clean
|
||||
.else
|
||||
.else
|
||||
CLEANDIR= cleandir
|
||||
.endif
|
||||
.endif
|
||||
|
||||
world: hierarchy mk $(WORLD_CLEANDIST) include-tools includes lib-tools libraries build-tools
|
||||
world: hierarchy cleandist mk includes libraries tools
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " Rebuilding ${DESTDIR} The whole thing"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo
|
||||
${MAKE} depend all install
|
||||
cd ${.CURDIR}/share/man && ${MAKE} makedb
|
||||
@echo "make world completed on `date`"
|
||||
|
||||
|
||||
hierarchy:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " Making hierarchy"
|
||||
@echo "--------------------------------------------------------------"
|
||||
cd ${.CURDIR}/etc && ${MAKE} distrib-dirs
|
||||
cd ${.CURDIR}/release && ${MAKE} hierarchy
|
||||
|
||||
update:
|
||||
.if defined(SUP_UPDATE)
|
||||
@@ -120,12 +124,6 @@ update:
|
||||
@echo "Running sup"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@sup -v ${SUPFILE}
|
||||
.if defined(SUPFILE1)
|
||||
@sup -v ${SUPFILE1}
|
||||
.endif
|
||||
.if defined(SUPFILE2)
|
||||
@sup -v ${SUPFILE2}
|
||||
.endif
|
||||
.endif
|
||||
.if defined(CVS_UPDATE)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@@ -171,7 +169,6 @@ installmost:
|
||||
cd ${.CURDIR}/usr.sbin && ${MAKE} ${.MAKEFLAGS} install
|
||||
cd ${.CURDIR}/gnu/libexec && ${MAKE} ${.MAKEFLAGS} install
|
||||
cd ${.CURDIR}/gnu/usr.bin && ${MAKE} ${.MAKEFLAGS} install
|
||||
cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} ${.MAKEFLAGS} install
|
||||
#.if defined(MAKE_EBONES) && !defined(NOCRYPT)
|
||||
# cd ${.CURDIR}/eBones && ${MAKE} ${.MAKEFLAGS} installmost
|
||||
#.endif
|
||||
@@ -190,7 +187,6 @@ most:
|
||||
cd ${.CURDIR}/usr.sbin && ${MAKE} ${.MAKEFLAGS} all
|
||||
cd ${.CURDIR}/gnu/libexec && ${MAKE} ${.MAKEFLAGS} all
|
||||
cd ${.CURDIR}/gnu/usr.bin && ${MAKE} ${.MAKEFLAGS} all
|
||||
cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} ${.MAKEFLAGS} all
|
||||
#.if defined(MAKE_EBONES) && !defined(NOCRYPT)
|
||||
# cd ${.CURDIR}/eBones && ${MAKE} ${.MAKEFLAGS} most
|
||||
#.endif
|
||||
@@ -210,69 +206,33 @@ includes:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo
|
||||
.if defined(CLOBBER)
|
||||
rm -rf ${DESTDIR}/usr/include/*
|
||||
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
|
||||
-p ${DESTDIR}/usr/include
|
||||
rm -rf ${DESTDIR}/usr/include
|
||||
mkdir ${DESTDIR}/usr/include
|
||||
chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include
|
||||
chmod 755 ${DESTDIR}/usr/include
|
||||
.endif
|
||||
cd ${.CURDIR}/include && ${MAKE} install
|
||||
cd ${.CURDIR}/gnu/include && ${MAKE} install
|
||||
cd ${.CURDIR}/gnu/lib/libdialog && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/gnu/lib/libg++ && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/gnu/lib/libgmp && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/gnu/lib/libmp && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/gnu/lib/libreadline && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/gnu/lib/libregex && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/gnu/lib/libg++ && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/gnu/lib/libdialog && ${MAKE} beforeinstall
|
||||
.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS)
|
||||
cd ${.CURDIR}/kerberosIV/include && ${MAKE} install
|
||||
.endif
|
||||
.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
|
||||
cd ${.CURDIR}/eBones/include && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/eBones/lib/libkrb && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/eBones/lib/libkadm && ${MAKE} beforeinstall
|
||||
.endif
|
||||
cd ${.CURDIR}/lib/csu/${MACHINE} && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libc && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libcurses && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libdisk && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libedit && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libftpio && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libmd && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libmytinfo && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libncurses && ${MAKE} beforeinstall
|
||||
.if !defined(WANT_CSRG_LIBM)
|
||||
.if defined(WANT_MSUN)
|
||||
cd ${.CURDIR}/lib/msun && ${MAKE} beforeinstall
|
||||
.endif
|
||||
cd ${.CURDIR}/lib/libpcap && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/librpcsvc && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libskey && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libtermcap && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libcom_err && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libss && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libscsi && ${MAKE} beforeinstall
|
||||
cd ${.CURDIR}/lib/libutil && ${MAKE} beforeinstall
|
||||
.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
|
||||
cd ${.CURDIR}/secure/lib/libdes && ${MAKE} beforeinstall
|
||||
.endif
|
||||
|
||||
lib-tools:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " Rebuilding tools needed to build the libraries"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo
|
||||
cd ${.CURDIR}/usr.bin/xinstall && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/gnu/usr.bin/ld && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/usr.bin/ar && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/usr.bin/ranlib && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/usr.bin/nm && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/usr.bin/lex/lib && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/usr.bin/compile_et && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR} && \
|
||||
rm -f /usr/sbin/compile_et
|
||||
cd ${.CURDIR}/usr.bin/mk_cmds && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
|
||||
libraries:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@@ -283,65 +243,51 @@ libraries:
|
||||
find ${DESTDIR}/usr/lib \! -name '*.s[ao].*' -a \! -type d | \
|
||||
xargs rm -rf
|
||||
.endif
|
||||
.if exists(lib/libcompat)
|
||||
cd ${.CURDIR}/lib/libcompat && \
|
||||
${MAKE} depend all install
|
||||
.endif
|
||||
.if exists(lib/libncurses)
|
||||
cd ${.CURDIR}/lib/libncurses && \
|
||||
${MAKE} depend all install
|
||||
.endif
|
||||
.if exists(lib/libtermcap)
|
||||
cd ${.CURDIR}/lib/libtermcap && \
|
||||
${MAKE} depend all install
|
||||
cd ${.CURDIR}/gnu/lib && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/gnu/usr.bin/cc/libgcc && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
|
||||
cd ${.CURDIR}/secure/lib && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
.endif
|
||||
.if exists(lib)
|
||||
cd ${.CURDIR}/lib/csu/i386 && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/lib && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
.endif
|
||||
.if exists(gnu)
|
||||
cd ${.CURDIR}/gnu/lib && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/gnu/usr.bin/cc/libgcc && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
.endif
|
||||
.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
|
||||
cd ${.CURDIR}/secure/lib && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
.endif
|
||||
cd ${.CURDIR}/usr.bin/lex/lib && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS)
|
||||
cd ${.CURDIR}/kerberosIV/acl && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/kerberosIV/des && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/kerberosIV/kdb && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/kerberosIV/krb && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
.endif
|
||||
.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
|
||||
cd ${.CURDIR}/eBones/lib && \
|
||||
cd ${.CURDIR}/eBones/des && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/eBones/acl && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/eBones/kdb && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/eBones/krb && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
.endif
|
||||
.if exists(usr.sbin/pcvt/keycap)
|
||||
cd ${.CURDIR}/usr.sbin/pcvt/keycap && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
.endif
|
||||
|
||||
include-tools:
|
||||
tools:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " Rebuilding tools needed to build the includes"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo
|
||||
cd ${.CURDIR}/usr.bin/xinstall && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
|
||||
build-tools:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " Rebuilding ${DESTDIR} C compiler, make, and zic(8)"
|
||||
@echo " Rebuilding ${DESTDIR} Compiler and Make"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo
|
||||
cd ${.CURDIR}/gnu/usr.bin/cc && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/usr.bin/make && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/gnu/usr.bin/groff && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
cd ${.CURDIR}/usr.sbin/zic && \
|
||||
${MAKE} depend all install ${CLEANDIR} ${OBJDIR}
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
@@ -1,9 +1,9 @@
|
||||
; $FreeBSD$
|
||||
; $Id: TODO,v 1.4 1994/09/11 20:01:03 phk Exp $
|
||||
|
||||
** To skip this preamble, search forward for the pattern `**'.
|
||||
|
||||
This file contains a list of ideas that people have come up for "good
|
||||
things to do" in FreeBSD. These aren't necessarily things on the
|
||||
things to do" in FreeBSD 2.0. These aren't necessarily things on the
|
||||
fast-track, and in fact consist mostly of things that the core team is
|
||||
never going to find the time to do so, if most things here are going
|
||||
to happen at all, they'll happen when someone reading this list steps
|
||||
@@ -13,7 +13,7 @@ That said, a lot of these ideas would be very nice to have and would
|
||||
add substantially to the perceived value of FreeBSD. Some items on
|
||||
this list would add a LOT of value, for that matter, and are by no
|
||||
means trivial. Take and fix an item with a (*) next to it and WC will
|
||||
even send you a free CD for your troubles! It's the least they
|
||||
even send you a free 2.0 CD for your troubles! It's the least they
|
||||
can do for all notable contributors.
|
||||
|
||||
This is a also good place to look if you're keen for a little
|
||||
@@ -40,8 +40,8 @@ If you start working on something from this list, we also suggest that
|
||||
you contact the email-address listed for more information and to
|
||||
provide some central coordination for your effort. If the email
|
||||
address given is simply <foo> then the email address can be presumed
|
||||
to be <foo@FreeBSD.ORG>. If no email address is listed, then
|
||||
simply send to <freebsd-hackers@FreeBSD.org>.
|
||||
to be <foo@freefall.cdrom.com>. If no email address is listed, then
|
||||
simply send to <freebsd-hackers@freefall.cdrom.com>.
|
||||
|
||||
Thanks!
|
||||
|
||||
@@ -49,12 +49,30 @@ Thanks!
|
||||
|
||||
** --- cut here ---
|
||||
|
||||
TASKID: 940820001
|
||||
TASK: Add interupts to pas.c
|
||||
DETAIL: { You'll need a manual for the ncr-5380 chip and possibly some
|
||||
doc on the PAS16. Linux/NetBSD also have existing drivers to study. }
|
||||
EMAIL: <phk>
|
||||
CATS: kernel scsi
|
||||
GRADE: ADVANCED
|
||||
STATUS: OPEN
|
||||
|
||||
TASKID: 940820002
|
||||
TASK: Add Linux/Crynwr compatible plip mode to lpt.c
|
||||
DETAIL: { Use IF_LLC0 as mode-flag. Look at the crynwr packet-driver
|
||||
plip.asm (ftp::ftp.ftp.com) and the linux driver for reference. }
|
||||
EMAIL: <phk>
|
||||
CATS: kernel networking
|
||||
GRADE: ADVANCED
|
||||
STATUS: OPEN (*)
|
||||
|
||||
TASKID: 940820003
|
||||
TASK: Add laptop-feature to wd.c
|
||||
DETAIL: { If disk just spun up, do sync when we have it running. Need
|
||||
to detect that disk was turned off, e.g. had a long delay in becomming
|
||||
ready again. }
|
||||
EMAIL: <phk, nate>
|
||||
EMAIL: <phk>
|
||||
CATS: kernel laptop
|
||||
GRADE: INTERMEDIATE
|
||||
STATUS: OPEN
|
||||
@@ -67,10 +85,29 @@ also requires some modification of existing drivers to support being used
|
||||
by PCMCIA cards. This task is both really hard and comparatively easy;
|
||||
hard because it's a big job, easy because others have already gone much of
|
||||
the way and you have their work for reference. }
|
||||
EMAIL: <phk, nate>
|
||||
EMAIL: <jkh>
|
||||
CATS: kernel laptop
|
||||
GRADE: ADVANCED
|
||||
STATUS: IN PROGRESS
|
||||
STATUS: OPEN (*)
|
||||
|
||||
TASKID: 940820005
|
||||
TASK: Salvage seagate.c driver from 1.1.5.1
|
||||
DETAIL: { We've got a seagate driver that could use a little cleanup and
|
||||
migration effort }
|
||||
EMAIL: <jkh>
|
||||
CATS: kernel scsi
|
||||
GRADE: BEGINNER
|
||||
STATUS: OPEN
|
||||
|
||||
TASKID: 940820006
|
||||
TASK: Add bootp/DHCP to the generic ethernet code.
|
||||
DETAIL: { Implement an ioctl(), which will send a bootp on a particular
|
||||
interface and return the data in a usable format. OR make a program which uses
|
||||
existing ioctls to do it. See RFC153[34] for information on DHCP. }
|
||||
EMAIL: <phk>
|
||||
CATS: kernel networking
|
||||
GRADE: ADVANCED
|
||||
STATUS: OPEN (*)
|
||||
|
||||
TASKID: 940820007
|
||||
TASK: Add bootp/DHCP capability to slip driver.
|
||||
@@ -81,6 +118,16 @@ CATS: kernel networking
|
||||
GRADE: ADVANCED
|
||||
STATUS: OPEN (*)
|
||||
|
||||
TASKID: 940820009
|
||||
TASK: Make a freebsd.com MS-DOS boot program
|
||||
DETAIL: { This program should be able to boot like the boot-blocks, that is
|
||||
find a FreeBSD-partition and load the kernel from there, but it should
|
||||
also be able to load the kernel from an optional MS-DOS file. }
|
||||
EMAIL: <phk>
|
||||
CATS: kernel DOS
|
||||
GRADE: ADVANCED
|
||||
STATUS: OPEN (*)
|
||||
|
||||
TASKID: 940820010
|
||||
TASK: Make iostat find the disks
|
||||
DETAIL: { This is actually mostly a change to the device-drivers to collect
|
||||
@@ -109,7 +156,7 @@ best accomplish the task. }
|
||||
EMAIL: <jkh>
|
||||
CATS: user
|
||||
GRADE: INTERMEDIATE
|
||||
STATUS: CLOSED - PENDING DOC
|
||||
STATUS: OPEN
|
||||
|
||||
TASKID: 940911001
|
||||
TASK: Make PAS16 a controller.
|
||||
@@ -119,14 +166,3 @@ EMAIL: <phk>
|
||||
CATS: kernel
|
||||
GRADE: INTERMEDIATE
|
||||
STATUS: OPEN
|
||||
|
||||
TASKID: 950222001
|
||||
TASK: Make find smarter about -fstype local
|
||||
DETAIL: { Currently when doing a find blah -fstype local the find traverses
|
||||
through all nfs mounted file systems looking for locally mounted filesystems,
|
||||
this could be short circuited by using getmntinfo/statfs. Note that you
|
||||
can not do this when following symlinks. }
|
||||
EMAIL: <rgrimes, phk>
|
||||
CATS: user
|
||||
GRADE: INTERMEDIATE
|
||||
STATUS: OPEN
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# From: @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
SUBDIR= cat chmod cp csh date dd df domainname echo ed expr hostname \
|
||||
kill ln ls mkdir mv pax ps pwd rcp rm rmail rmdir sh sleep \
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
# @(#)Makefile.inc 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
|
||||
BINDIR?= /bin
|
||||
NOSHARED?= YES
|
||||
|
||||
.if exists (${.CURDIR}/../../secure)
|
||||
|
||||
.if exists(${.CURDIR}/../../secure/lib/libcipher/obj)
|
||||
CIPHEROBJDIR= ${.CURDIR}/../../secure/lib/libcipher/obj
|
||||
.else
|
||||
CIPHEROBJDIR= ${.CURDIR}/../../secure/lib/libcipher
|
||||
.endif
|
||||
|
||||
.endif
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= cat
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)cat.1 8.1 (Berkeley) 6/29/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd June 29, 1993
|
||||
.Dt CAT 1
|
||||
|
||||
+2
-7
@@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -128,7 +128,6 @@ cook_args(argv)
|
||||
fp = stdin;
|
||||
else if ((fp = fopen(*argv, "r")) == NULL) {
|
||||
warn("%s", *argv);
|
||||
rval = 1;
|
||||
++argv;
|
||||
continue;
|
||||
}
|
||||
@@ -197,7 +196,6 @@ cook_buf(fp)
|
||||
}
|
||||
if (ferror(fp)) {
|
||||
warn("%s", filename);
|
||||
rval = 1;
|
||||
clearerr(fp);
|
||||
}
|
||||
if (ferror(stdout))
|
||||
@@ -218,7 +216,6 @@ raw_args(argv)
|
||||
fd = fileno(stdin);
|
||||
else if ((fd = open(*argv, O_RDONLY, 0)) < 0) {
|
||||
warn("%s", *argv);
|
||||
rval = 1;
|
||||
++argv;
|
||||
continue;
|
||||
}
|
||||
@@ -251,8 +248,6 @@ raw_cat(rfd)
|
||||
for (off = 0; nr; nr -= nw, off += nw)
|
||||
if ((nw = write(wfd, buf + off, nr)) < 0)
|
||||
err(1, "stdout");
|
||||
if (nr < 0) {
|
||||
if (nr < 0)
|
||||
warn("%s", filename);
|
||||
rval = 1;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= chmod
|
||||
|
||||
|
||||
+1
-2
@@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)chmod.1 8.4 (Berkeley) 3/31/94
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd March 31, 1994
|
||||
.Dt CHMOD 1
|
||||
@@ -274,7 +274,6 @@ There's no
|
||||
.Ar perm
|
||||
option for the naughty bits.
|
||||
.Sh SEE ALSO
|
||||
.Xr chflags 1 ,
|
||||
.Xr install 1 ,
|
||||
.Xr chmod 2 ,
|
||||
.Xr stat 2 ,
|
||||
|
||||
+1
-4
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -49,7 +49,6 @@ static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fts.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -70,8 +69,6 @@ main(argc, argv)
|
||||
int Hflag, Lflag, Pflag, Rflag, ch, fflag, fts_options, hflag, rval;
|
||||
char *ep, *mode;
|
||||
|
||||
set = NULL;
|
||||
omode = 0;
|
||||
Hflag = Lflag = Pflag = Rflag = fflag = hflag = 0;
|
||||
while ((ch = getopt(argc, argv, "HLPRXfgorstuwx")) != EOF)
|
||||
switch (ch) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= cp
|
||||
SRCS= cp.c utils.c
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)cp.1 8.3 (Berkeley) 4/18/94
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd April 18, 1994
|
||||
.Dt CP 1
|
||||
|
||||
+37
-36
@@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -48,11 +48,11 @@ static char sccsid[] = "@(#)cp.c 8.2 (Berkeley) 4/1/94";
|
||||
|
||||
/*
|
||||
* Cp copies source files to target files.
|
||||
*
|
||||
*
|
||||
* The global PATH_T structure "to" always contains the path to the
|
||||
* current target file. Since fts(3) does not change directories,
|
||||
* this path can be either absolute or dot-realative.
|
||||
*
|
||||
*
|
||||
* The basic algorithm is to initialize "to" and use fts(3) to traverse
|
||||
* the file hierarchy rooted in the argument list. A trivial case is the
|
||||
* case of 'cp file1 file2'. The more interesting case is the case of
|
||||
@@ -79,7 +79,7 @@ static char sccsid[] = "@(#)cp.c 8.2 (Berkeley) 4/1/94";
|
||||
#include "extern.h"
|
||||
|
||||
#define STRIP_TRAILING_SLASH(p) { \
|
||||
while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \
|
||||
while ((p).p_end > (p).p_path && (p).p_end[-1] == '/') \
|
||||
*--(p).p_end = 0; \
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ main(argc, argv)
|
||||
char *target;
|
||||
|
||||
Hflag = Lflag = Pflag = Rflag = 0;
|
||||
while ((ch = getopt(argc, argv, "HLPRfipr")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "HLPRfipr")) != EOF)
|
||||
switch (ch) {
|
||||
case 'H':
|
||||
Hflag = 1;
|
||||
@@ -188,8 +188,8 @@ main(argc, argv)
|
||||
to.target_end = to.p_end;
|
||||
|
||||
/* Set end of argument list for fts(3). */
|
||||
argv[argc] = NULL;
|
||||
|
||||
argv[argc] = NULL;
|
||||
|
||||
/*
|
||||
* Cp has two distinct cases:
|
||||
*
|
||||
@@ -210,7 +210,7 @@ main(argc, argv)
|
||||
if (r == -1 || !S_ISDIR(to_stat.st_mode)) {
|
||||
/*
|
||||
* Case (1). Target is not a directory.
|
||||
*/
|
||||
*/
|
||||
if (argc > 1) {
|
||||
usage();
|
||||
exit(1);
|
||||
@@ -227,7 +227,7 @@ main(argc, argv)
|
||||
stat(*argv, &tmp_stat);
|
||||
else
|
||||
lstat(*argv, &tmp_stat);
|
||||
|
||||
|
||||
if (S_ISDIR(tmp_stat.st_mode) && (Rflag || rflag))
|
||||
type = DIR_TO_DNE;
|
||||
else
|
||||
@@ -253,7 +253,7 @@ copy(argv, type, fts_options)
|
||||
FTS *ftsp;
|
||||
FTSENT *curr;
|
||||
int base, dne, nlen, rval;
|
||||
char *p, *target_mid;
|
||||
char *p;
|
||||
|
||||
if ((ftsp = fts_open(argv, fts_options, mastercmp)) == NULL)
|
||||
err(1, NULL);
|
||||
@@ -274,10 +274,18 @@ copy(argv, type, fts_options)
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are in case (2) or (3) above, we need to append the
|
||||
* source name to the target name.
|
||||
* If we are in case (2) or (3) above, we need to append the
|
||||
* source name to the target name.
|
||||
*/
|
||||
if (type != FILE_TO_FILE) {
|
||||
if ((curr->fts_namelen +
|
||||
to.target_end - to.p_path + 1) > MAXPATHLEN) {
|
||||
warnx("%s/%s: name too long (not copied)",
|
||||
to.p_path, curr->fts_name);
|
||||
rval = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Need to remember the roots of traversals to create
|
||||
* correct pathnames. If there's a directory being
|
||||
@@ -300,29 +308,24 @@ copy(argv, type, fts_options)
|
||||
if (curr->fts_level == FTS_ROOTLEVEL)
|
||||
if (type != DIR_TO_DNE) {
|
||||
p = strrchr(curr->fts_path, '/');
|
||||
base = (p == NULL) ? 0 :
|
||||
base = (p == NULL) ? 0 :
|
||||
(int)(p - curr->fts_path + 1);
|
||||
|
||||
if (!strcmp(&curr->fts_path[base],
|
||||
if (!strcmp(&curr->fts_path[base],
|
||||
".."))
|
||||
base += 1;
|
||||
} else
|
||||
base = curr->fts_pathlen;
|
||||
|
||||
if (to.target_end[-1] != '/') {
|
||||
*to.target_end = '/';
|
||||
*(to.target_end + 1) = 0;
|
||||
}
|
||||
p = &curr->fts_path[base];
|
||||
nlen = curr->fts_pathlen - base;
|
||||
target_mid = to.target_end;
|
||||
if (*p != '/' && target_mid[-1] != '/')
|
||||
*target_mid++ = '/';
|
||||
*target_mid = 0;
|
||||
if (target_mid - to.p_path + nlen > MAXPATHLEN) {
|
||||
warnx("%s%s: name too long (not copied)",
|
||||
to.p_path, p);
|
||||
rval = 1;
|
||||
continue;
|
||||
}
|
||||
(void)strncat(target_mid, p, nlen);
|
||||
to.p_end = target_mid + nlen;
|
||||
|
||||
(void)strncat(to.target_end + 1, p, nlen);
|
||||
to.p_end = to.target_end + nlen + 1;
|
||||
*to.p_end = 0;
|
||||
STRIP_TRAILING_SLASH(to);
|
||||
}
|
||||
@@ -365,23 +368,23 @@ copy(argv, type, fts_options)
|
||||
* umask blocks owner writes, we fail..
|
||||
*/
|
||||
if (dne) {
|
||||
if (mkdir(to.p_path,
|
||||
if (mkdir(to.p_path,
|
||||
curr->fts_statp->st_mode | S_IRWXU) < 0)
|
||||
err(1, "%s", to.p_path);
|
||||
} else if (!S_ISDIR(to_stat.st_mode)) {
|
||||
errno = ENOTDIR;
|
||||
err(1, "%s", to.p_path);
|
||||
err(1, "%s: %s", to.p_path);
|
||||
}
|
||||
/*
|
||||
* If not -p and directory didn't exist, set it to be
|
||||
* the same as the from directory, umodified by the
|
||||
* umask; arguably wrong, but it's been that way
|
||||
* the same as the from directory, umodified by the
|
||||
* umask; arguably wrong, but it's been that way
|
||||
* forever.
|
||||
*/
|
||||
if (pflag && setfile(curr->fts_statp, 0))
|
||||
rval = 1;
|
||||
else if (dne)
|
||||
(void)chmod(to.p_path,
|
||||
(void)chmod(to.p_path,
|
||||
curr->fts_statp->st_mode);
|
||||
break;
|
||||
case S_IFBLK:
|
||||
@@ -389,19 +392,17 @@ copy(argv, type, fts_options)
|
||||
if (Rflag) {
|
||||
if (copy_special(curr->fts_statp, !dne))
|
||||
rval = 1;
|
||||
} else {
|
||||
} else
|
||||
if (copy_file(curr, dne))
|
||||
rval = 1;
|
||||
}
|
||||
break;
|
||||
case S_IFIFO:
|
||||
if (Rflag) {
|
||||
if (Rflag)
|
||||
if (copy_fifo(curr->fts_statp, !dne))
|
||||
rval = 1;
|
||||
} else {
|
||||
else
|
||||
if (copy_file(curr, dne))
|
||||
rval = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (copy_file(curr, dne))
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)extern.h 8.2 (Berkeley) 4/1/94
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
|
||||
+10
-10
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -64,7 +64,7 @@ copy_file(entp, dne)
|
||||
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
|
||||
char *p;
|
||||
#endif
|
||||
|
||||
|
||||
if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
|
||||
warn("%s", entp->fts_path);
|
||||
return (1);
|
||||
@@ -143,12 +143,13 @@ copy_file(entp, dne)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't remove the target even after an error. The target might
|
||||
* not be a regular file, or its attributes might be important,
|
||||
* or its contents might be irreplacable. It would only be safe
|
||||
* to remove it if we created it and its length is 0.
|
||||
*/
|
||||
/* If the copy went bad, lose the file. */
|
||||
if (rval == 1) {
|
||||
(void)unlink(to.p_path);
|
||||
(void)close(from_fd);
|
||||
(void)close(to_fd);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (pflag && setfile(fs, to_fd))
|
||||
rval = 1;
|
||||
@@ -241,8 +242,7 @@ setfile(fs, fd)
|
||||
int rval;
|
||||
|
||||
rval = 0;
|
||||
fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX |
|
||||
S_IRWXU | S_IRWXG | S_IRWXO;
|
||||
fs->st_mode &= S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO;
|
||||
|
||||
TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec);
|
||||
TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
#
|
||||
# C Shell with process control; VM/UNIX VAX Makefile
|
||||
# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 8/14/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
DIR= usd/04.csh
|
||||
SRCS= tabs csh.1 csh.2 csh.3 csh.4 csh.a csh.g
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)csh.1 8.1 (Berkeley) 6/8/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.EH 'USD:4-%''An Introduction to the C shell'
|
||||
.OH 'An Introduction to the C shell''USD:4-%'
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)csh.2 8.1 (Berkeley) 6/8/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.nr H1 1
|
||||
.NH
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)csh.3 8.1 (Berkeley) 6/8/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.nr H1 2
|
||||
.NH
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)csh.4 8.1 (Berkeley) 6/8/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.nr H1 3
|
||||
.NH
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)csh.a 8.1 (Berkeley) 6/8/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.SH
|
||||
Appendix \- Special characters
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)csh.g 8.1 (Berkeley) 6/8/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.SH
|
||||
Glossary
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)tabs 8.1 (Berkeley) 6/8/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.ta 5n 10n 15n 20n 25n 30n 35n 40n 45n 50n 55n 60n 65n 70n 75n 80n
|
||||
+2
-3
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -122,6 +122,5 @@ showall(v, t)
|
||||
{
|
||||
memtop = (char *) sbrk(0);
|
||||
(void) fprintf(cshout, "Allocated memory from 0x%lx to 0x%lx (%ld).\n",
|
||||
(unsigned long) membot, (unsigned long) memtop,
|
||||
(unsigned long) (memtop - membot));
|
||||
(unsigned long) membot, (unsigned long) memtop, memtop - membot);
|
||||
}
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)char.h 8.1 (Berkeley) 5/31/93
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
+5
-5
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -72,7 +72,7 @@ Char STRcent2[] = { '%', '%', '\0' };
|
||||
Char STRcenthash[] = { '%', '#', '\0' };
|
||||
Char STRcentplus[] = { '%', '+', '\0' };
|
||||
Char STRcentminus[] = { '%', '-', '\0' };
|
||||
Char STRchase_symlinks[] = { 'c', 'h', 'a', 's', 'e', '_', 's', 'y', 'm', 'l',
|
||||
Char STRchase_symlinks[] = { 'c', 'h', 'a', 's', 'e', '_', 's', 'y', 'm', 'l',
|
||||
'i', 'n', 'k', 's', '\0' };
|
||||
Char STRchild[] = { 'c', 'h', 'i', 'l', 'd', '\0' };
|
||||
Char STRcolon[] = { ':', '\0' };
|
||||
@@ -90,7 +90,7 @@ Char STRfignore[] = { 'f', 'i', 'g', 'n', 'o', 'r', 'e', '\0' };
|
||||
Char STRfilec[] = { 'f', 'i', 'l', 'e', 'c', '\0' };
|
||||
#endif /* FILEC */
|
||||
Char STRhistchars[] = { 'h', 'i', 's', 't', 'c', 'h', 'a', 'r', 's', '\0' };
|
||||
Char STRtildothist[] = { '~', '/', '.', 'h', 'i', 's', 't', 'o', 'r',
|
||||
Char STRtildothist[] = { '~', '/', '.', 'h', 'i', 's', 't', 'o', 'r',
|
||||
'y', '\0' };
|
||||
Char STRhistfile[] = { 'h', 'i', 's', 't', 'f', 'i', 'l', 'e', '\0' };
|
||||
Char STRhistory[] = { 'h', 'i', 's', 't', 'o', 'r', 'y', '\0' };
|
||||
@@ -109,7 +109,7 @@ Char STRml[] = { '-', 'l', '\0' };
|
||||
Char STRmn[] = { '-', 'n', '\0' };
|
||||
Char STRmquestion[] = { '?' | QUOTE, ' ', '\0' };
|
||||
Char STRnice[] = { 'n', 'i', 'c', 'e', '\0' };
|
||||
Char STRnoambiguous[] = { 'n', 'o', 'a', 'm', 'b', 'i', 'g', 'u', 'o', 'u',
|
||||
Char STRnoambiguous[] = { 'n', 'o', 'a', 'm', 'b', 'i', 'g', 'u', 'o', 'u',
|
||||
's', '\0' };
|
||||
Char STRnobeep[] = { 'n', 'o', 'b', 'e', 'e', 'p', '\0' };
|
||||
Char STRnoclobber[] = { 'n', 'o', 'c', 'l', 'o', 'b', 'b', 'e', 'r', '\0' };
|
||||
@@ -121,7 +121,7 @@ Char STRnotify[] = { 'n', 'o', 't', 'i', 'f', 'y', '\0' };
|
||||
Char STRor[] = { '|', '\0' };
|
||||
Char STRor2[] = { '|', '|', '\0' };
|
||||
Char STRpath[] = { 'p', 'a', 't', 'h', '\0' };
|
||||
Char STRprintexitvalue[] = { 'p', 'r', 'i', 'n', 't', 'e', 'x', 'i', 't', 'v',
|
||||
Char STRprintexitvalue[] = { 'p', 'r', 'i', 'n', 't', 'e', 'x', 'i', 't', 'v',
|
||||
'a', 'l', 'u', 'e', '\0' };
|
||||
Char STRprompt[] = { 'p', 'r', 'o', 'm', 'p', 't', '\0' };
|
||||
Char STRprompt2[] = { 'p', 'r', 'o', 'm', 'p', 't', '2', '\0' };
|
||||
|
||||
+2
-11
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)csh.1 8.2 (Berkeley) 1/21/94
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd January 21, 1994
|
||||
.Dt CSH 1
|
||||
@@ -40,7 +40,7 @@
|
||||
.Nd a shell (command interpreter) with C-like syntax
|
||||
.Sh SYNOPSIS
|
||||
.Nm csh
|
||||
.Op Fl bcefimnstvVxX
|
||||
.Op Fl bcefinstvVxX
|
||||
.Op arg ...
|
||||
.Nm csh
|
||||
.Op Fl l
|
||||
@@ -96,14 +96,6 @@ and outputs are terminals.
|
||||
The shell is a login shell (only applicable if
|
||||
.Fl l
|
||||
is the only flag specified).
|
||||
.It Fl m
|
||||
The shell loads
|
||||
.Pa .cshrc
|
||||
even if it does not belong to the effective user.
|
||||
.Xr su 1
|
||||
can pass
|
||||
.Fl m
|
||||
to the shell.
|
||||
.It Fl n
|
||||
Commands are parsed, but not executed.
|
||||
This aids in syntactic checking of shell scripts.
|
||||
@@ -2115,7 +2107,6 @@ To detect looping, the shell restricts the number of
|
||||
substitutions on a single line to 20.
|
||||
.Sh SEE ALSO
|
||||
.Xr sh 1 ,
|
||||
.Xr su 1 ,
|
||||
.Xr access 2 ,
|
||||
.Xr execve 2 ,
|
||||
.Xr fork 2 ,
|
||||
|
||||
+16
-19
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -248,6 +248,14 @@ main(argc, argv)
|
||||
if ((tcp = getenv("TERM")) != NULL)
|
||||
set(STRterm, SAVE(tcp));
|
||||
|
||||
/*
|
||||
* Re-initialize path if set in environment
|
||||
*/
|
||||
if ((tcp = getenv("PATH")) == NULL)
|
||||
set1(STRpath, defaultpath(), &shvhed);
|
||||
else
|
||||
importpath(SAVE(tcp));
|
||||
|
||||
set(STRshell, Strsave(STR_SHELLPATH));
|
||||
|
||||
doldol = putn((int) getpid()); /* For $$ */
|
||||
@@ -409,16 +417,6 @@ main(argc, argv)
|
||||
stderror(ERR_SYSTEM, "csh", strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Re-initialize path if set in environment
|
||||
* importpath uses intty and intact
|
||||
*/
|
||||
if ((tcp = getenv("PATH")) == NULL)
|
||||
set1(STRpath, defaultpath(), &shvhed);
|
||||
else
|
||||
importpath(SAVE(tcp));
|
||||
|
||||
/*
|
||||
* Decide whether we should play with signals or not. If we are explicitly
|
||||
* told (via -i, or -) or we are a login shell (arg0 starts with -) or the
|
||||
@@ -620,8 +618,7 @@ importpath(cp)
|
||||
for (;;) {
|
||||
if ((c = *dp) == ':' || c == 0) {
|
||||
*dp = 0;
|
||||
if (*cp != '/' && (euid == 0 || uid == 0) &&
|
||||
(intact || intty && isatty(SHOUT)))
|
||||
if ((*cp != '/' || *cp == '\0') && (euid == 0 || uid == 0))
|
||||
(void) fprintf(csherr,
|
||||
"Warning: imported path contains relative components\n");
|
||||
pv[i++] = Strsave(*cp ? cp : STRdot);
|
||||
@@ -812,7 +809,7 @@ rechist()
|
||||
(void) Strcat(buf, STRsldthist);
|
||||
}
|
||||
|
||||
if ((fp = creat(short2str(hfile), 0600)) == -1)
|
||||
if ((fp = creat(short2str(hfile), 0600)) == -1)
|
||||
return;
|
||||
|
||||
oldidfds = didfds;
|
||||
@@ -876,14 +873,14 @@ int sig;
|
||||
|
||||
/*
|
||||
* We kill the last foreground process group. It then becomes
|
||||
* responsible to propagate the SIGHUP to its progeny.
|
||||
* responsible to propagate the SIGHUP to its progeny.
|
||||
*/
|
||||
{
|
||||
struct process *pp, *np;
|
||||
|
||||
for (pp = proclist.p_next; pp; pp = pp->p_next) {
|
||||
np = pp;
|
||||
/*
|
||||
/*
|
||||
* Find if this job is in the foreground. It could be that
|
||||
* the process leader has exited and the foreground flag
|
||||
* is cleared for it.
|
||||
@@ -891,7 +888,7 @@ int sig;
|
||||
do
|
||||
/*
|
||||
* If a process is in the foreground; we try to kill
|
||||
* it's process group. If we succeed, then the
|
||||
* it's process group. If we succeed, then the
|
||||
* whole job is gone. Otherwise we keep going...
|
||||
* But avoid sending HUP to the shell again.
|
||||
*/
|
||||
@@ -1270,9 +1267,9 @@ vis_fputc(ch, fp)
|
||||
{
|
||||
char uenc[5]; /* 4 + NULL */
|
||||
|
||||
if (ch & QUOTE)
|
||||
if (ch & QUOTE)
|
||||
return fputc(ch & TRIM, fp);
|
||||
/*
|
||||
/*
|
||||
* XXX: When we are in AsciiOnly we want all characters >= 0200 to
|
||||
* be encoded, but currently there is no way in vis to do that.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)csh.h 8.1 (Berkeley) 5/31/93
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -84,7 +84,7 @@ dinit(hp)
|
||||
/* Don't believe the login shell home, because it may be a symlink */
|
||||
tcp = getwd(path); /* see ngetwd.c for System V version */
|
||||
if (tcp == NULL || *tcp == '\0') {
|
||||
(void) fprintf(csherr, "csh: %s: %s\n", path, strerror(errno));
|
||||
(void) fprintf(csherr, "csh: %s\n", path);
|
||||
if (hp && *hp) {
|
||||
tcp = short2str(hp);
|
||||
if (chdir(tcp) == -1)
|
||||
@@ -221,7 +221,7 @@ printdirs()
|
||||
}
|
||||
if (!(dirflag & DIR_LONG) && hp != NULL && !eq(hp, STRslash) &&
|
||||
(len = Strlen(hp), Strncmp(hp, dp->di_name, len) == 0) &&
|
||||
(dp->di_name[len] == '\0' || dp->di_name[len] == '/'))
|
||||
(dp->di_name[len] == '\0' || dp->di_name[len] == '/'))
|
||||
len = Strlen(s = (dp->di_name + len)) + 2;
|
||||
else
|
||||
len = Strlen(s = dp->di_name) + 1;
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)dir.h 8.1 (Berkeley) 5/31/93
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+7
-7
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -425,7 +425,7 @@ Dgetdol()
|
||||
if (dimen || bitset)
|
||||
stderror(ERR_SYNTAX);
|
||||
if (backpid != 0) {
|
||||
if (dolbang)
|
||||
if (dolbang)
|
||||
xfree((ptr_t) dolbang);
|
||||
setDolp(dolbang = putn(backpid));
|
||||
}
|
||||
@@ -645,13 +645,13 @@ fixDolMod()
|
||||
dolwcnt = 10000;
|
||||
c = DgetC(0);
|
||||
}
|
||||
if ((c == 'g' && dolmcnt != 10000) ||
|
||||
if ((c == 'g' && dolmcnt != 10000) ||
|
||||
(c == 'a' && dolwcnt != 10000)) {
|
||||
if (c == 'g')
|
||||
dolmcnt = 10000;
|
||||
else
|
||||
dolwcnt = 10000;
|
||||
c = DgetC(0);
|
||||
c = DgetC(0);
|
||||
}
|
||||
|
||||
if (c == 's') { /* [eichin:19910926.0755EST] */
|
||||
@@ -659,12 +659,12 @@ fixDolMod()
|
||||
int delim = DgetC(0);
|
||||
dolmod[dolnmod++] = c;
|
||||
dolmod[dolnmod++] = delim;
|
||||
|
||||
|
||||
if (!delim || letter(delim)
|
||||
|| Isdigit(delim) || any(" \t\n", delim)) {
|
||||
seterror(ERR_BADSUBST);
|
||||
break;
|
||||
}
|
||||
}
|
||||
while ((c = DgetC(0)) != (-1)) {
|
||||
dolmod[dolnmod++] = c;
|
||||
if(c == delim) delimcnt--;
|
||||
@@ -708,7 +708,7 @@ setDolp(cp)
|
||||
Char *lhsub, *rhsub, *np;
|
||||
size_t lhlen = 0, rhlen = 0;
|
||||
int didmod = 0;
|
||||
|
||||
|
||||
delim = dolmod[++i];
|
||||
if (!delim || letter(delim)
|
||||
|| Isdigit(delim) || any(" \t\n", delim)) {
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+7
-14
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -50,7 +50,7 @@ static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 5/31/93";
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "csh.h"
|
||||
#include "extern.h"
|
||||
@@ -656,7 +656,7 @@ tellmewhat(lex)
|
||||
register struct biltins *bptr;
|
||||
register struct wordent *sp = lex->next;
|
||||
bool aliased = 0;
|
||||
Char *s0, *s1, *s2, *cmd;
|
||||
Char *s0, *s1, *s2;
|
||||
Char qc;
|
||||
|
||||
if (adrof1(sp->word, &aliases)) {
|
||||
@@ -696,15 +696,13 @@ tellmewhat(lex)
|
||||
if (eq(sp->word, str2short(bptr->bname))) {
|
||||
if (aliased)
|
||||
prlex(cshout, lex);
|
||||
(void) fprintf(cshout, "%s: shell built-in command.\n",
|
||||
(void) fprintf(cshout, "%s: shell built-in command.\n",
|
||||
vis_str(sp->word));
|
||||
sp->word = s0; /* we save and then restore this */
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
sp->word = cmd = globone(sp->word, G_IGNORE);
|
||||
|
||||
if ((i = iscommand(strip(sp->word))) != 0) {
|
||||
register Char **pv;
|
||||
register struct varent *v;
|
||||
@@ -719,14 +717,10 @@ tellmewhat(lex)
|
||||
while (--i)
|
||||
pv++;
|
||||
if (pv[0][0] == 0 || eq(pv[0], STRdot)) {
|
||||
if (!slash) {
|
||||
sp->word = Strspl(STRdotsl, sp->word);
|
||||
prlex(cshout, lex);
|
||||
xfree((ptr_t) sp->word);
|
||||
} else
|
||||
prlex(cshout, lex);
|
||||
sp->word = Strspl(STRdotsl, sp->word);
|
||||
prlex(cshout, lex);
|
||||
xfree((ptr_t) sp->word);
|
||||
sp->word = s0; /* we save and then restore this */
|
||||
xfree((ptr_t) cmd);
|
||||
return;
|
||||
}
|
||||
s1 = Strspl(*pv, STRslash);
|
||||
@@ -740,6 +734,5 @@ tellmewhat(lex)
|
||||
prlex(cshout, lex);
|
||||
(void) fprintf(csherr, "%s: Command not found.\n", vis_str(sp->word));
|
||||
}
|
||||
xfree((ptr_t) cmd);
|
||||
sp->word = s0; /* we save and then restore this */
|
||||
}
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)extern.h 8.1 (Berkeley) 5/31/93
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
+6
-6
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -112,14 +112,14 @@ static void
|
||||
setup_tty(on)
|
||||
int on;
|
||||
{
|
||||
struct termios tchars;
|
||||
static struct termios tchars;
|
||||
|
||||
(void) tcgetattr(SHIN, &tchars);
|
||||
|
||||
if (on) {
|
||||
tchars.c_cc[VEOL] = ESC;
|
||||
if (tchars.c_lflag & ICANON)
|
||||
on = TCSADRAIN;
|
||||
on = TCSANOW;
|
||||
else {
|
||||
on = TCSAFLUSH;
|
||||
tchars.c_lflag |= ICANON;
|
||||
@@ -127,10 +127,10 @@ setup_tty(on)
|
||||
}
|
||||
else {
|
||||
tchars.c_cc[VEOL] = _POSIX_VDISABLE;
|
||||
on = TCSADRAIN;
|
||||
on = TCSANOW;
|
||||
}
|
||||
|
||||
(void) tcsetattr(SHIN, on, &tchars);
|
||||
(void) tcsetattr(SHIN, TCSANOW, &tchars);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -521,7 +521,7 @@ again: /* search for matches */
|
||||
return (numitems);
|
||||
}
|
||||
else { /* LIST */
|
||||
qsort((ptr_t) items, numitems, sizeof(items[0]),
|
||||
qsort((ptr_t) items, numitems, sizeof(items[0]),
|
||||
(int (*) __P((const void *, const void *))) sortscmp);
|
||||
print_by_column(looking_for_lognames ? NULL : tilded_dir,
|
||||
items, numitems);
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -860,12 +860,12 @@ wfree()
|
||||
if (wp->w_end.type != I_SEEK && wp->w_start.type == wp->w_end.type &&
|
||||
wp->w_start.type == o.type) {
|
||||
if (wp->w_end.type == F_SEEK) {
|
||||
if (o.f_seek >= wp->w_start.f_seek &&
|
||||
if (o.f_seek >= wp->w_start.f_seek &&
|
||||
(wp->w_end.f_seek == 0 || o.f_seek < wp->w_end.f_seek))
|
||||
break;
|
||||
}
|
||||
else {
|
||||
if (o.a_seek >= wp->w_start.a_seek &&
|
||||
if (o.a_seek >= wp->w_start.a_seek &&
|
||||
(wp->w_end.a_seek == 0 || o.a_seek < wp->w_end.a_seek))
|
||||
break;
|
||||
}
|
||||
|
||||
+5
-5
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -574,7 +574,7 @@ tglob(t)
|
||||
*/
|
||||
if (c == '`') {
|
||||
gflag |= G_CSH;
|
||||
while (*p && *p != '`')
|
||||
while (*p && *p != '`')
|
||||
if (*p++ == '\\') {
|
||||
if (*p) /* Quoted chars */
|
||||
p++;
|
||||
@@ -806,7 +806,7 @@ pword()
|
||||
pnleft = MAXPATHLEN - 4;
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
Gmatch(string, pattern)
|
||||
Char *string, *pattern;
|
||||
{
|
||||
@@ -829,7 +829,7 @@ Gmatch(string, pattern)
|
||||
|
||||
blkfree(blk);
|
||||
return(gres == gpol);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
pmatch(string, pattern)
|
||||
@@ -870,7 +870,7 @@ pmatch(string, pattern)
|
||||
(*(pattern-2) & TRIM) <= stringc);
|
||||
pattern++;
|
||||
}
|
||||
else
|
||||
else
|
||||
match = (stringc == (rangec & TRIM));
|
||||
}
|
||||
if (rangec == 0)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+5
-5
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -575,12 +575,12 @@ getdol()
|
||||
int delimcnt = 2;
|
||||
int delim = getC(0);
|
||||
*np++ = delim;
|
||||
|
||||
|
||||
if (!delim || letter(delim)
|
||||
|| Isdigit(delim) || any(" \t\n", delim)) {
|
||||
seterror(ERR_BADSUBST);
|
||||
break;
|
||||
}
|
||||
}
|
||||
while ((c = getC(0)) != (-1)) {
|
||||
*np++ = c;
|
||||
if(c == delim) delimcnt--;
|
||||
@@ -877,7 +877,7 @@ dosub(sc, en, global)
|
||||
|
||||
wdp = hp;
|
||||
while (--i >= 0) {
|
||||
register struct wordent *new =
|
||||
register struct wordent *new =
|
||||
(struct wordent *) xcalloc(1, sizeof *wdp);
|
||||
|
||||
new->word = 0;
|
||||
@@ -1187,7 +1187,7 @@ gethent(sc)
|
||||
}
|
||||
np = lhsb;
|
||||
event = 0;
|
||||
while (!cmap(c, _ESC | _META | _QF | _QB) && !any("^$*-%{}:", c)) {
|
||||
while (!cmap(c, _ESC | _META | _QF | _QB) && !any("${}:", c)) {
|
||||
if (event != -1 && Isdigit(c))
|
||||
event = event * 10 + c - '0';
|
||||
else
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+8
-8
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -52,19 +52,19 @@ static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 5/31/93";
|
||||
static void asyntax __P((struct wordent *, struct wordent *));
|
||||
static void asyn0 __P((struct wordent *, struct wordent *));
|
||||
static void asyn3 __P((struct wordent *, struct wordent *));
|
||||
static struct wordent
|
||||
static struct wordent
|
||||
*freenod __P((struct wordent *, struct wordent *));
|
||||
static struct command
|
||||
static struct command
|
||||
*syn0 __P((struct wordent *, struct wordent *, int));
|
||||
static struct command
|
||||
static struct command
|
||||
*syn1 __P((struct wordent *, struct wordent *, int));
|
||||
static struct command
|
||||
static struct command
|
||||
*syn1a __P((struct wordent *, struct wordent *, int));
|
||||
static struct command
|
||||
static struct command
|
||||
*syn1b __P((struct wordent *, struct wordent *, int));
|
||||
static struct command
|
||||
static struct command
|
||||
*syn2 __P((struct wordent *, struct wordent *, int));
|
||||
static struct command
|
||||
static struct command
|
||||
*syn3 __P((struct wordent *, struct wordent *, int));
|
||||
|
||||
#define ALEFT 21 /* max of 20 alias expansions */
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define _PATH_BIN "/bin"
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)proc.h 8.1 (Berkeley) 5/31/93
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -438,7 +438,7 @@ execute(t, wanttty, pipein, pipeout)
|
||||
}
|
||||
/*
|
||||
* Fall through for all breaks from switch
|
||||
*
|
||||
*
|
||||
* If there will be no more executions of this command, flush all file
|
||||
* descriptors. Places that turn on the F_REPEAT bit are responsible for
|
||||
* doing donefds after the last re-execution
|
||||
@@ -476,7 +476,7 @@ int i;
|
||||
*
|
||||
* I don't know what is best to do. I think that Ambiguous is better
|
||||
* than restructuring the command vector, because the user can get
|
||||
* unexpected results. In any case, the command vector restructuring
|
||||
* unexpected results. In any case, the command vector restructuring
|
||||
* code is present and the user can choose it by setting noambiguous
|
||||
*/
|
||||
static Char *
|
||||
|
||||
+2
-3
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -664,8 +664,7 @@ exportpath(val)
|
||||
"Warning: ridiculously long PATH truncated\n");
|
||||
break;
|
||||
}
|
||||
if (**val != '/' && (euid == 0 || uid == 0) &&
|
||||
(intact || intty && isatty(SHOUT)))
|
||||
if ((**val != '/' || **val == '\0') && (euid == 0 || uid == 0))
|
||||
(void) fprintf(csherr,
|
||||
"Warning: exported path contains relative components.\n");
|
||||
(void) Strcat(exppath, *val++);
|
||||
|
||||
+5
-5
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -449,21 +449,21 @@ vis_str(cp)
|
||||
|
||||
if (cp == NULL)
|
||||
return (NULL);
|
||||
|
||||
|
||||
for (dp = cp; *dp++;)
|
||||
continue;
|
||||
n = ((dp - cp) << 2) + 1; /* 4 times + NULL */
|
||||
if (dstsize < n) {
|
||||
sdst = (char *) (dstsize ?
|
||||
sdst = (char *) (dstsize ?
|
||||
xrealloc(sdst, (size_t) n * sizeof(char)) :
|
||||
xmalloc((size_t) n * sizeof(char)));
|
||||
dstsize = n;
|
||||
}
|
||||
/*
|
||||
/*
|
||||
* XXX: When we are in AsciiOnly we want all characters >= 0200 to
|
||||
* be encoded, but currently there is no way in vis to do that.
|
||||
*/
|
||||
(void) strvis(sdst, short2str(cp), VIS_NOSLASH);
|
||||
return (sdst);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -180,7 +180,7 @@ prusage(r0, r1, e, b)
|
||||
break;
|
||||
|
||||
case 'X': /* (average) shared text size */
|
||||
(void) fprintf(cshout, "%ld", t == 0 ? 0L :
|
||||
(void) fprintf(cshout, "%ld", t == 0 ? 0L :
|
||||
(r1->ru_ixrss - r0->ru_ixrss) / t);
|
||||
break;
|
||||
|
||||
@@ -246,7 +246,7 @@ pdeltat(t1, t0)
|
||||
struct timeval td;
|
||||
|
||||
tvsub(&td, t1, t0);
|
||||
(void) fprintf(cshout, "%ld.%01ld", td.tv_sec, td.tv_usec / 100000L);
|
||||
(void) fprintf(cshout, "%d.%01d", td.tv_sec, td.tv_usec / 100000);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -256,7 +256,7 @@ tvadd(tsum, t0)
|
||||
|
||||
tsum->tv_sec += t0->tv_sec;
|
||||
tsum->tv_usec += t0->tv_usec;
|
||||
if (tsum->tv_usec >= 1000000)
|
||||
if (tsum->tv_usec > 1000000)
|
||||
tsum->tv_sec++, tsum->tv_usec -= 1000000;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= date
|
||||
SRCS= date.c netdate.c
|
||||
|
||||
+3
-3
@@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)date.1 8.2 (Berkeley) 11/17/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd November 17, 1993
|
||||
.Dt DATE 1
|
||||
@@ -107,7 +107,7 @@ in the
|
||||
manual page, as well as any arbitrary text.
|
||||
The format string for the default display is:
|
||||
.Bd -literal -offset indent
|
||||
``%+''.
|
||||
``%a %b %e %H:%M:%S %Z %Y%n''.
|
||||
.Ed
|
||||
.Pp
|
||||
If an operand does not have a leading plus sign, it is interpreted as
|
||||
@@ -127,7 +127,7 @@ Hour, a number from 0 to 23.
|
||||
.It Ar mm
|
||||
Minutes, a number from 0 to 59.
|
||||
.It Ar .ss
|
||||
Seconds, a number from 0 to 61 (59 plus a maximum of two leap seconds).
|
||||
Seconds, a number from 0 to 61 (59 plus a a maximum of two leap seconds).
|
||||
.El
|
||||
.Pp
|
||||
Everything but the minutes is optional.
|
||||
|
||||
+16
-19
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -76,19 +76,13 @@ main(argc, argv)
|
||||
struct timezone tz;
|
||||
int ch, rflag;
|
||||
char *format, buf[1024];
|
||||
char *endptr;
|
||||
int set_timezone;
|
||||
|
||||
tz.tz_dsttime = tz.tz_minuteswest = 0;
|
||||
rflag = 0;
|
||||
set_timezone = 0;
|
||||
while ((ch = getopt(argc, argv, "d:nr:ut:")) != EOF)
|
||||
switch((char)ch) {
|
||||
case 'd': /* daylight savings time */
|
||||
tz.tz_dsttime = strtol(optarg, &endptr, 10) ? 1 : 0;
|
||||
if (endptr == optarg || *endptr != '\0')
|
||||
usage();
|
||||
set_timezone = 1;
|
||||
tz.tz_dsttime = atoi(optarg) ? 1 : 0;
|
||||
break;
|
||||
case 'n': /* don't set network */
|
||||
nflag = 1;
|
||||
@@ -102,11 +96,11 @@ main(argc, argv)
|
||||
break;
|
||||
case 't': /* minutes west of GMT */
|
||||
/* error check; don't allow "PST" */
|
||||
tz.tz_minuteswest = strtol(optarg, &endptr, 10);
|
||||
if (endptr == optarg || *endptr != '\0')
|
||||
usage();
|
||||
set_timezone = 1;
|
||||
break;
|
||||
if (isdigit(*optarg)) {
|
||||
tz.tz_minuteswest = atoi(optarg);
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
@@ -117,13 +111,14 @@ main(argc, argv)
|
||||
* If -d or -t, set the timezone or daylight savings time; this
|
||||
* doesn't belong here, there kernel should not know about either.
|
||||
*/
|
||||
if (set_timezone && settimeofday((struct timeval *)NULL, &tz))
|
||||
err(1, "settimeofday (timezone)");
|
||||
if ((tz.tz_minuteswest || tz.tz_dsttime) &&
|
||||
settimeofday(NULL, &tz))
|
||||
err(1, "settimeofday");
|
||||
|
||||
if (!rflag && time(&tval) == -1)
|
||||
err(1, "time");
|
||||
|
||||
format = "%+";
|
||||
format = "%a %b %e %H:%M:%S %Z %Y\n";
|
||||
|
||||
/* allow the operands in any order */
|
||||
if (*argv && **argv == '+') {
|
||||
@@ -140,7 +135,7 @@ main(argc, argv)
|
||||
format = *argv + 1;
|
||||
|
||||
(void)strftime(buf, sizeof(buf), format, localtime(&tval));
|
||||
(void)printf("%s\n", buf);
|
||||
(void)printf("%s", buf);
|
||||
exit(retval);
|
||||
}
|
||||
|
||||
@@ -215,8 +210,10 @@ setthetime(p)
|
||||
logwtmp("|", "date", "");
|
||||
tv.tv_sec = tval;
|
||||
tv.tv_usec = 0;
|
||||
if (settimeofday(&tv, (struct timezone *)NULL))
|
||||
err(1, "settimeofday (timeval)");
|
||||
if (settimeofday(&tv, NULL)) {
|
||||
perror("date: settimeofday");
|
||||
exit(1);
|
||||
}
|
||||
logwtmp("{", "date", "");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)extern.h 8.1 (Berkeley) 5/31/93
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
int netsettime __P((time_t));
|
||||
+3
-4
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -116,8 +116,7 @@ netsettime(tval)
|
||||
warn("gethostname");
|
||||
goto bad;
|
||||
}
|
||||
(void)strncpy(msg.tsp_name, hostname, sizeof(msg.tsp_name));
|
||||
msg.tsp_name[sizeof(msg.tsp_name) - 1] = '\0';
|
||||
(void)strncpy(msg.tsp_name, hostname, sizeof(hostname));
|
||||
msg.tsp_seq = htons((u_short)0);
|
||||
msg.tsp_time.tv_sec = htonl((u_long)tval);
|
||||
msg.tsp_time.tv_usec = htonl((u_long)0);
|
||||
@@ -170,7 +169,7 @@ loop:
|
||||
(void)close(s);
|
||||
return (0);
|
||||
default:
|
||||
warnx("wrong ack received from timed: %s",
|
||||
warnx("wrong ack received from timed: %s",
|
||||
tsptype[msg.tsp_type]);
|
||||
timed_ack = -1;
|
||||
break;
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= dd
|
||||
SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+69
-3
@@ -34,7 +34,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -71,10 +71,76 @@ static char sccsid[] = "@(#)conv_tab.c 8.1 (Berkeley) 5/31/93";
|
||||
*/
|
||||
|
||||
/* Lower-case to upper-case */
|
||||
u_char l2u[256];
|
||||
u_char l2u[] = {
|
||||
0000, 0001, 0002, 0003, 0004, 0005, 0006, 0007, /* 0000 */
|
||||
0010, 0011, 0012, 0013, 0014, 0015, 0016, 0017, /* 0010 */
|
||||
0020, 0021, 0022, 0023, 0024, 0025, 0026, 0027, /* 0020 */
|
||||
0030, 0031, 0032, 0033, 0034, 0035, 0036, 0037, /* 0030 */
|
||||
0040, 0041, 0042, 0043, 0044, 0045, 0046, 0047, /* 0040 */
|
||||
0050, 0051, 0052, 0053, 0054, 0055, 0056, 0057, /* 0050 */
|
||||
0060, 0061, 0062, 0063, 0064, 0065, 0066, 0067, /* 0060 */
|
||||
0070, 0071, 0072, 0073, 0074, 0075, 0076, 0077, /* 0070 */
|
||||
0100, 0101, 0102, 0103, 0104, 0105, 0106, 0107, /* 0100 */
|
||||
0110, 0111, 0112, 0113, 0114, 0115, 0116, 0117, /* 0110 */
|
||||
0120, 0121, 0122, 0123, 0124, 0125, 0126, 0127, /* 0120 */
|
||||
0130, 0131, 0132, 0133, 0134, 0135, 0136, 0137, /* 0130 */
|
||||
0140, 0101, 0102, 0103, 0104, 0105, 0106, 0107, /* 0140 */
|
||||
0110, 0111, 0112, 0113, 0114, 0115, 0116, 0117, /* 0150 */
|
||||
0120, 0121, 0122, 0123, 0124, 0125, 0126, 0127, /* 0160 */
|
||||
0130, 0131, 0132, 0173, 0174, 0175, 0176, 0177, /* 0170 */
|
||||
0200, 0201, 0202, 0203, 0204, 0205, 0206, 0207, /* 0200 */
|
||||
0210, 0211, 0212, 0213, 0214, 0215, 0216, 0217, /* 0210 */
|
||||
0220, 0221, 0222, 0223, 0224, 0225, 0226, 0227, /* 0220 */
|
||||
0230, 0231, 0232, 0233, 0234, 0235, 0236, 0237, /* 0230 */
|
||||
0240, 0241, 0242, 0243, 0244, 0245, 0246, 0247, /* 0240 */
|
||||
0250, 0251, 0252, 0253, 0254, 0255, 0256, 0257, /* 0250 */
|
||||
0260, 0261, 0262, 0263, 0264, 0265, 0266, 0267, /* 0260 */
|
||||
0270, 0271, 0272, 0273, 0274, 0275, 0276, 0277, /* 0270 */
|
||||
0300, 0301, 0302, 0303, 0304, 0305, 0306, 0307, /* 0300 */
|
||||
0310, 0311, 0312, 0313, 0314, 0315, 0316, 0317, /* 0310 */
|
||||
0320, 0321, 0322, 0323, 0324, 0325, 0326, 0327, /* 0320 */
|
||||
0330, 0331, 0332, 0333, 0334, 0335, 0336, 0337, /* 0330 */
|
||||
0340, 0341, 0342, 0343, 0344, 0345, 0346, 0347, /* 0340 */
|
||||
0350, 0351, 0352, 0353, 0354, 0355, 0356, 0357, /* 0350 */
|
||||
0360, 0361, 0362, 0363, 0364, 0365, 0366, 0367, /* 0360 */
|
||||
0370, 0371, 0372, 0373, 0374, 0375, 0376, 0377, /* 0370 */
|
||||
};
|
||||
|
||||
/* Upper-case to lower-case */
|
||||
u_char u2l[256];
|
||||
u_char u2l[] = {
|
||||
0000, 0001, 0002, 0003, 0004, 0005, 0006, 0007, /* 0000 */
|
||||
0010, 0011, 0012, 0013, 0014, 0015, 0016, 0017, /* 0010 */
|
||||
0020, 0021, 0022, 0023, 0024, 0025, 0026, 0027, /* 0020 */
|
||||
0030, 0031, 0032, 0033, 0034, 0035, 0036, 0037, /* 0030 */
|
||||
0040, 0041, 0042, 0043, 0044, 0045, 0046, 0047, /* 0040 */
|
||||
0050, 0051, 0052, 0053, 0054, 0055, 0056, 0057, /* 0050 */
|
||||
0060, 0061, 0062, 0063, 0064, 0065, 0066, 0067, /* 0060 */
|
||||
0070, 0071, 0072, 0073, 0074, 0075, 0076, 0077, /* 0070 */
|
||||
0100, 0141, 0142, 0143, 0144, 0145, 0146, 0147, /* 0100 */
|
||||
0150, 0151, 0152, 0153, 0154, 0155, 0156, 0157, /* 0110 */
|
||||
0160, 0161, 0162, 0163, 0164, 0165, 0166, 0167, /* 0120 */
|
||||
0170, 0171, 0172, 0133, 0134, 0135, 0136, 0137, /* 0130 */
|
||||
0140, 0141, 0142, 0143, 0144, 0145, 0146, 0147, /* 0140 */
|
||||
0150, 0151, 0152, 0153, 0154, 0155, 0156, 0157, /* 0150 */
|
||||
0160, 0161, 0162, 0163, 0164, 0165, 0166, 0167, /* 0160 */
|
||||
0170, 0171, 0172, 0173, 0174, 0175, 0176, 0177, /* 0170 */
|
||||
0200, 0201, 0202, 0203, 0204, 0205, 0206, 0207, /* 0200 */
|
||||
0210, 0211, 0212, 0213, 0214, 0215, 0216, 0217, /* 0210 */
|
||||
0220, 0221, 0222, 0223, 0224, 0225, 0226, 0227, /* 0220 */
|
||||
0230, 0231, 0232, 0233, 0234, 0235, 0236, 0237, /* 0230 */
|
||||
0240, 0241, 0242, 0243, 0244, 0245, 0246, 0247, /* 0240 */
|
||||
0250, 0251, 0252, 0253, 0254, 0255, 0256, 0257, /* 0250 */
|
||||
0260, 0261, 0262, 0263, 0264, 0265, 0266, 0267, /* 0260 */
|
||||
0270, 0271, 0272, 0273, 0274, 0275, 0276, 0277, /* 0270 */
|
||||
0300, 0301, 0302, 0303, 0304, 0305, 0306, 0307, /* 0300 */
|
||||
0310, 0311, 0312, 0313, 0314, 0315, 0316, 0317, /* 0310 */
|
||||
0320, 0321, 0322, 0323, 0324, 0325, 0326, 0327, /* 0320 */
|
||||
0330, 0331, 0332, 0333, 0334, 0335, 0336, 0337, /* 0330 */
|
||||
0340, 0341, 0342, 0343, 0344, 0345, 0346, 0347, /* 0340 */
|
||||
0350, 0351, 0352, 0353, 0354, 0355, 0356, 0357, /* 0350 */
|
||||
0360, 0361, 0362, 0363, 0364, 0365, 0366, 0367, /* 0360 */
|
||||
0370, 0371, 0372, 0373, 0374, 0375, 0376, 0377, /* 0370 */
|
||||
};
|
||||
|
||||
/* EBCDIC to ASCII -- 32V compatible. */
|
||||
u_char e2a_32V[] = {
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)dd.1 8.2 (Berkeley) 1/13/94
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd January 13, 1994
|
||||
.Dt DD 1
|
||||
|
||||
+6
-20
@@ -34,7 +34,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -177,40 +177,26 @@ setup()
|
||||
if (ddflags & (C_LCASE|C_UCASE))
|
||||
if (ddflags & C_ASCII)
|
||||
if (ddflags & C_LCASE) {
|
||||
for (cnt = 0; cnt <= 0377; ++cnt)
|
||||
for (cnt = 0; cnt < 0377; ++cnt)
|
||||
if (isupper(ctab[cnt]))
|
||||
ctab[cnt] = tolower(ctab[cnt]);
|
||||
} else {
|
||||
for (cnt = 0; cnt <= 0377; ++cnt)
|
||||
for (cnt = 0; cnt < 0377; ++cnt)
|
||||
if (islower(ctab[cnt]))
|
||||
ctab[cnt] = toupper(ctab[cnt]);
|
||||
}
|
||||
else if (ddflags & C_EBCDIC)
|
||||
if (ddflags & C_LCASE) {
|
||||
for (cnt = 0; cnt <= 0377; ++cnt)
|
||||
for (cnt = 0; cnt < 0377; ++cnt)
|
||||
if (isupper(cnt))
|
||||
ctab[cnt] = ctab[tolower(cnt)];
|
||||
} else {
|
||||
for (cnt = 0; cnt <= 0377; ++cnt)
|
||||
for (cnt = 0; cnt < 0377; ++cnt)
|
||||
if (islower(cnt))
|
||||
ctab[cnt] = ctab[toupper(cnt)];
|
||||
}
|
||||
else {
|
||||
else
|
||||
ctab = ddflags & C_LCASE ? u2l : l2u;
|
||||
if (ddflags & C_LCASE) {
|
||||
for (cnt = 0; cnt <= 0377; ++cnt)
|
||||
if (isupper(cnt))
|
||||
ctab[cnt] = tolower(cnt);
|
||||
else
|
||||
ctab[cnt] = cnt;
|
||||
} else {
|
||||
for (cnt = 0; cnt <= 0377; ++cnt)
|
||||
if (islower(cnt))
|
||||
ctab[cnt] = toupper(cnt);
|
||||
else
|
||||
ctab[cnt] = cnt;
|
||||
}
|
||||
}
|
||||
(void)time(&st.start); /* Statistics timestamp. */
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)dd.h 8.3 (Berkeley) 4/2/94
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* Input/output stream state. */
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)extern.h 8.3 (Berkeley) 4/2/94
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.2 (Berkeley) 4/1/94
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= df
|
||||
BINGRP= operator
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)df.1 8.2 (Berkeley) 1/13/94
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd January 13, 1994
|
||||
.Dt DF 1
|
||||
|
||||
+27
-26
@@ -35,7 +35,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -76,30 +76,29 @@ struct typetab {
|
||||
char *str;
|
||||
long types;
|
||||
} typetab[] = {
|
||||
{"ufs", MT(MOUNT_UFS)},
|
||||
{"local", MT_LOCAL},
|
||||
{"all", MT_ALL},
|
||||
{"nfs", MT(MOUNT_NFS)},
|
||||
{"mfs", MT(MOUNT_MFS)},
|
||||
{"lfs", MT(MOUNT_LFS)},
|
||||
{"msdos", MT(MOUNT_MSDOS)},
|
||||
{"fdesc", MT(MOUNT_FDESC)},
|
||||
{"portal", MT(MOUNT_PORTAL)},
|
||||
"ufs", MT(MOUNT_UFS),
|
||||
"local", MT_LOCAL,
|
||||
"all", MT_ALL,
|
||||
"nfs", MT(MOUNT_NFS),
|
||||
"mfs", MT(MOUNT_MFS),
|
||||
"lfs", MT(MOUNT_LFS),
|
||||
"msdos", MT(MOUNT_MSDOS),
|
||||
"fdesc", MT(MOUNT_FDESC),
|
||||
"portal", MT(MOUNT_PORTAL),
|
||||
#if 0
|
||||
/* return fsid of underlying FS */
|
||||
{"lofs", MT(MOUNT_LOFS)},
|
||||
{"null", MT(MOUNT_NULL)},
|
||||
{"umap", MT(MOUNT_UMAP)},
|
||||
"lofs", MT(MOUNT_LOFS),
|
||||
"null", MT(MOUNT_NULL),
|
||||
"umap", MT(MOUNT_UMAP),
|
||||
#endif
|
||||
{"kernfs", MT(MOUNT_KERNFS)},
|
||||
{"procfs", MT(MOUNT_PROCFS)},
|
||||
{"afs", MT(MOUNT_AFS)},
|
||||
{"iso9660fs", MT(MOUNT_CD9660)},
|
||||
{"cdfs", MT(MOUNT_CD9660)},
|
||||
{"misc", MT(MOUNT_LOFS)|MT(MOUNT_FDESC)|MT(MOUNT_PORTAL)|
|
||||
MT(MOUNT_KERNFS)|MT(MOUNT_PROCFS)},
|
||||
{NULL, 0}
|
||||
|
||||
"kernfs", MT(MOUNT_KERNFS),
|
||||
"procfs", MT(MOUNT_PROCFS),
|
||||
"afs", MT(MOUNT_AFS),
|
||||
"iso9660fs", MT(MOUNT_CD9660),
|
||||
"cdfs", MT(MOUNT_CD9660),
|
||||
"misc", MT(MOUNT_LOFS)|MT(MOUNT_FDESC)|MT(MOUNT_PORTAL)|
|
||||
MT(MOUNT_KERNFS)|MT(MOUNT_PROCFS),
|
||||
NULL, 0
|
||||
};
|
||||
|
||||
long addtype __P((long, char *));
|
||||
@@ -125,7 +124,6 @@ main(argc, argv)
|
||||
char *mntpt;
|
||||
|
||||
iflag = nflag = tflag = 0;
|
||||
fsmask = MT_NONE;
|
||||
|
||||
while ((ch = getopt(argc, argv, "iknt:")) != EOF)
|
||||
switch (ch) {
|
||||
@@ -336,7 +334,7 @@ prtstat(sfsp, maxwidth)
|
||||
used = inodes - sfsp->f_ffree;
|
||||
(void)printf(" %7ld %7ld %5.0f%% ", used, sfsp->f_ffree,
|
||||
inodes == 0 ? 100.0 : (double)used / (double)inodes * 100.0);
|
||||
} else
|
||||
} else
|
||||
(void)printf(" ");
|
||||
(void)printf(" %s\n", sfsp->f_mntonname);
|
||||
}
|
||||
@@ -386,7 +384,10 @@ ufs_df(file, maxwidth)
|
||||
sfsp->f_blocks = sblock.fs_dsize;
|
||||
sfsp->f_bfree = sblock.fs_cstotal.cs_nbfree * sblock.fs_frag +
|
||||
sblock.fs_cstotal.cs_nffree;
|
||||
sfsp->f_bavail = freespace(&sblock, sblock.fs_minfree);
|
||||
sfsp->f_bavail = (sblock.fs_dsize * (100 - sblock.fs_minfree) / 100) -
|
||||
(sblock.fs_dsize - sfsp->f_bfree);
|
||||
if (sfsp->f_bavail < 0)
|
||||
sfsp->f_bavail = 0;
|
||||
sfsp->f_files = sblock.fs_ncg * sblock.fs_ipg;
|
||||
sfsp->f_ffree = sblock.fs_cstotal.cs_nifree;
|
||||
sfsp->f_fsid.val[0] = 0;
|
||||
@@ -421,7 +422,7 @@ bread(off, buf, cnt)
|
||||
void
|
||||
usage()
|
||||
{
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"usage: df [-ikn] [-t fstype] [file | file_system ...]\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= domainname
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" From: @(#)hostname.1 8.1 (Berkeley) 5/31/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd September 18, 1994
|
||||
.Dt DOMAINNAME 1
|
||||
@@ -55,7 +55,7 @@ domain name does not necessarily have anything to do with the Domain
|
||||
Name System domain name, although they are often set equal for administrative
|
||||
convenience.
|
||||
.Sh SEE ALSO
|
||||
.Xr getdomainname 3
|
||||
.Xr getdomainname 2
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
|
||||
@@ -40,7 +40,7 @@ static char copyright[] =
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "From: @(#)hostname.c 8.1 (Berkeley) 5/31/93"; */
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
"$Id: domainname.c,v 1.3 1994/09/21 22:30:55 bde Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@@ -56,7 +56,7 @@ main(argc,argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
char domainname[MAXHOSTNAMELEN];
|
||||
char *p, domainname[MAXHOSTNAMELEN];
|
||||
|
||||
argc--, argv++;
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= echo
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)echo.1 8.1 (Berkeley) 7/22/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd July 22, 1993
|
||||
.Dt ECHO 1
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+5
-6
@@ -1,15 +1,14 @@
|
||||
# $FreeBSD$
|
||||
# $Id: Makefile,v 1.8 1994/09/24 02:55:20 davidg Exp $
|
||||
|
||||
PROG= ed
|
||||
SRCS= buf.c cbc.c glbl.c io.c main.c re.c sub.c undo.c
|
||||
SRCS= buf.c cbc.c glbl.c io.c main.c re.c sub.c undo.c
|
||||
LINKS= ${BINDIR}/ed ${BINDIR}/red
|
||||
MLINKS= ed.1 red.1
|
||||
|
||||
.if exists(../../secure) && !defined(NOCRYPT) && !defined(NOSECURE)
|
||||
DISTRIBUTION=des
|
||||
.if !defined(NOCRYPT)
|
||||
CFLAGS+=-DDES
|
||||
LDADD+= -L${CIPHEROBJDIR} -lcipher
|
||||
DPADD+= ${CIPHEROBJDIR}/libcipher.a
|
||||
LDADD+= -lcrypt
|
||||
DPADD+= ${LIBCRYPT}
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
$FreeBSD$
|
||||
$Id$
|
||||
|
||||
This version of ed(1) is not strictly POSIX compliant, as described in
|
||||
the POSIX 1003.2 document. The following is a summary of the omissions,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
$FreeBSD$
|
||||
$Id$
|
||||
|
||||
ed is an 8-bit-clean, POSIX-compliant line editor. It should work with
|
||||
any regular expression package that conforms to the POSIX interface
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
#ifndef lint
|
||||
static char *rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp";
|
||||
@@ -253,7 +253,7 @@ init_buffers()
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
/* Read stdin one character at a time to avoid i/o contention
|
||||
/* Read stdin one character at a time to avoid i/o contention
|
||||
with shell escapes invoked by nonterminal input, e.g.,
|
||||
ed - <<EOF
|
||||
!cat
|
||||
|
||||
+2
-8
@@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)bdes.c 5.5 (Berkeley) 6/27/91
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -115,7 +115,7 @@ init_des_cipher()
|
||||
|
||||
des_ct = des_n = 0;
|
||||
|
||||
/* initialize the initialization vector */
|
||||
/* initialize the initialization vctor */
|
||||
MEMZERO(ivec, 8);
|
||||
|
||||
/* intialize the padding vector */
|
||||
@@ -137,8 +137,6 @@ get_des_char(fp)
|
||||
des_ct = cbc_decode(des_buf, fp);
|
||||
}
|
||||
return (des_ct > 0) ? des_buf[des_n++] : EOF;
|
||||
#else
|
||||
return (getc(fp));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -155,8 +153,6 @@ put_des_char(c, fp)
|
||||
des_n = 0;
|
||||
}
|
||||
return (des_ct >= 0) ? (des_buf[des_n++] = c) : EOF;
|
||||
#else
|
||||
return (fputc(c, fp));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -172,8 +168,6 @@ flush_des_file(fp)
|
||||
des_n = 0;
|
||||
}
|
||||
return (des_ct >= 0 && cbc_encode(des_buf, des_n, fp) >= 0) ? 0 : EOF;
|
||||
#else
|
||||
return (fflush(fp));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.TH ED 1 "21 May 1993"
|
||||
.SH NAME
|
||||
.\" ed, red \- text editor
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ed.h,v 1.5 1994/02/01 00:34:39 alm Exp
|
||||
* $FreeBSD$
|
||||
* $Id: ed.h,v 1.7 1994/09/24 02:55:25 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
+5
-5
@@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -132,8 +132,8 @@ exec_global(interact, gflag)
|
||||
for (; *ibufp;)
|
||||
if ((status = extract_addr_range()) < 0 ||
|
||||
(status = exec_command()) < 0 ||
|
||||
(status > 0 && (status = display_lines(
|
||||
current_addr, current_addr, status)) < 0))
|
||||
status > 0 && (status = display_lines(
|
||||
current_addr, current_addr, status)) < 0)
|
||||
return status;
|
||||
}
|
||||
return 0;
|
||||
@@ -158,7 +158,7 @@ set_active_node(lp)
|
||||
#if defined(sun) || defined(NO_REALLOC_NULL)
|
||||
if (active_list != NULL) {
|
||||
#endif
|
||||
if ((ts = (line_t **) realloc(active_list,
|
||||
if ((ts = (line_t **) realloc(active_list,
|
||||
(ti += MINBUFSZ) * sizeof(line_t **))) == NULL) {
|
||||
fprintf(stderr, "%s\n", strerror(errno));
|
||||
sprintf(errmsg, "out of memory");
|
||||
@@ -167,7 +167,7 @@ set_active_node(lp)
|
||||
}
|
||||
#if defined(sun) || defined(NO_REALLOC_NULL)
|
||||
} else {
|
||||
if ((ts = (line_t **) malloc((ti += MINBUFSZ) *
|
||||
if ((ts = (line_t **) malloc((ti += MINBUFSZ) *
|
||||
sizeof(line_t **))) == NULL) {
|
||||
fprintf(stderr, "%s\n", strerror(errno));
|
||||
sprintf(errmsg, "out of memory");
|
||||
|
||||
+4
-4
@@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -106,7 +106,7 @@ read_stream(fp, n)
|
||||
return ERR;
|
||||
if (appended && size && o_isbinary && o_newline_added)
|
||||
fputs("newline inserted\n", stderr);
|
||||
else if (newline_added && (!appended || (!isbinary && !o_isbinary)))
|
||||
else if (newline_added && (!appended || !isbinary && !o_isbinary))
|
||||
fputs("newline appended\n", stderr);
|
||||
if (isbinary && newline_added && !appended)
|
||||
size += 1;
|
||||
@@ -128,8 +128,8 @@ get_stream_line(fp)
|
||||
register int c;
|
||||
register int i = 0;
|
||||
|
||||
while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || (!feof(fp) &&
|
||||
!ferror(fp))) && c != '\n') {
|
||||
while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || !feof(fp) &&
|
||||
!ferror(fp)) && c != '\n') {
|
||||
REALLOC(sbuf, sbufsz, i + 1, ERR);
|
||||
if (!(sbuf[i++] = c))
|
||||
isbinary = 1;
|
||||
|
||||
+22
-22
@@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -42,7 +42,7 @@ static char *rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp";
|
||||
* CREDITS
|
||||
*
|
||||
* This program is based on the editor algorithm described in
|
||||
* Brian W. Kernighan and P. J. Plauger's book "Software Tools
|
||||
* Brian W. Kernighan and P. J. Plauger's book "Software Tools
|
||||
* in Pascal," Addison-Wesley, 1981.
|
||||
*
|
||||
* The buffering algorithm is attributed to Rodney Ruddock of
|
||||
@@ -154,9 +154,9 @@ top:
|
||||
signal(SIGQUIT, SIG_IGN);
|
||||
signal(SIGINT, signal_int);
|
||||
#ifdef _POSIX_SOURCE
|
||||
if ((status = sigsetjmp(env, 1)))
|
||||
if (status = sigsetjmp(env, 1))
|
||||
#else
|
||||
if ((status = setjmp(env)))
|
||||
if (status = setjmp(env))
|
||||
#endif
|
||||
{
|
||||
fputs("\n?\n", stderr);
|
||||
@@ -192,7 +192,7 @@ top:
|
||||
fputs("?\n", stderr);
|
||||
sprintf(errmsg, "warning: file modified");
|
||||
if (!isatty(0)) {
|
||||
fprintf(stderr, garrulous ?
|
||||
fprintf(stderr, garrulous ?
|
||||
"script, line %d: %s\n" :
|
||||
"", lineno, errmsg);
|
||||
quit(2);
|
||||
@@ -213,7 +213,7 @@ top:
|
||||
isglobal = 0;
|
||||
if ((status = extract_addr_range()) >= 0 &&
|
||||
(status = exec_command()) >= 0)
|
||||
if (!status ||
|
||||
if (!status || status &&
|
||||
(status = display_lines(current_addr, current_addr,
|
||||
status)) >= 0)
|
||||
continue;
|
||||
@@ -225,16 +225,16 @@ top:
|
||||
fputs("?\n", stderr); /* give warning */
|
||||
sprintf(errmsg, "warning: file modified");
|
||||
if (!isatty(0)) {
|
||||
fprintf(stderr, garrulous ?
|
||||
"script, line %d: %s\n" :
|
||||
fprintf(stderr, garrulous ?
|
||||
"script, line %d: %s\n" :
|
||||
"", lineno, errmsg);
|
||||
quit(2);
|
||||
}
|
||||
break;
|
||||
case FATAL:
|
||||
if (!isatty(0))
|
||||
fprintf(stderr, garrulous ?
|
||||
"script, line %d: %s\n" : "",
|
||||
fprintf(stderr, garrulous ?
|
||||
"script, line %d: %s\n" : "",
|
||||
lineno, errmsg);
|
||||
else
|
||||
fprintf(stderr, garrulous ? "%s\n" : "",
|
||||
@@ -243,7 +243,7 @@ top:
|
||||
default:
|
||||
fputs("?\n", stderr);
|
||||
if (!isatty(0)) {
|
||||
fprintf(stderr, garrulous ?
|
||||
fprintf(stderr, garrulous ?
|
||||
"script, line %d: %s\n" : "",
|
||||
lineno, errmsg);
|
||||
quit(2);
|
||||
@@ -256,7 +256,7 @@ top:
|
||||
|
||||
long first_addr, second_addr, addr_cnt;
|
||||
|
||||
/* extract_addr_range: get line addresses from the command buffer until an
|
||||
/* extract_addr_range: get line addresses from the command buffer until an
|
||||
illegal address is seen; return status */
|
||||
int
|
||||
extract_addr_range()
|
||||
@@ -544,11 +544,11 @@ exec_command()
|
||||
return ERR;
|
||||
else if (build_active_list(c == 'g' || c == 'G') < 0)
|
||||
return ERR;
|
||||
else if ((n = (c == 'G' || c == 'V')))
|
||||
else if (n = (c == 'G' || c == 'V'))
|
||||
GET_COMMAND_SUFFIX();
|
||||
isglobal++;
|
||||
if (exec_global(n, gflag) < 0)
|
||||
return ERR;
|
||||
return ERR;
|
||||
break;
|
||||
case 'h':
|
||||
if (addr_cnt > 0) {
|
||||
@@ -691,7 +691,7 @@ exec_command()
|
||||
sflags |= SGR;
|
||||
ibufp++;
|
||||
break;
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
STRTOL(sgnum, ibufp);
|
||||
sflags |= SGF;
|
||||
@@ -802,7 +802,7 @@ exec_command()
|
||||
return ERR;
|
||||
}
|
||||
#endif
|
||||
if ((addr = write_file(*fnp ? fnp : old_filename,
|
||||
if ((addr = write_file(*fnp ? fnp : old_filename,
|
||||
(c == 'W') ? "a" : "w", first_addr, second_addr)) < 0)
|
||||
return ERR;
|
||||
else if (addr == addr_last)
|
||||
@@ -840,7 +840,7 @@ exec_command()
|
||||
break;
|
||||
case '=':
|
||||
GET_COMMAND_SUFFIX();
|
||||
printf("%ld\n", addr_cnt ? second_addr : addr_last);
|
||||
printf("%d\n", addr_cnt ? second_addr : addr_last);
|
||||
break;
|
||||
case '!':
|
||||
if (addr_cnt > 0) {
|
||||
@@ -888,7 +888,7 @@ check_addr_range(n, m)
|
||||
}
|
||||
|
||||
|
||||
/* get_matching_node_addr: return the address of the next line matching a
|
||||
/* get_matching_node_addr: return the address of the next line matching a
|
||||
pattern in a given direction. wrap around begin/end of editor buffer if
|
||||
necessary */
|
||||
long
|
||||
@@ -902,7 +902,7 @@ get_matching_node_addr(pat, dir)
|
||||
|
||||
if (!pat) return ERR;
|
||||
do {
|
||||
if ((n = dir ? INC_MOD(n, addr_last) : DEC_MOD(n, addr_last))) {
|
||||
if (n = dir ? INC_MOD(n, addr_last) : DEC_MOD(n, addr_last)) {
|
||||
lp = get_addressed_line_node(n);
|
||||
if ((s = get_sbuf_line(lp)) == NULL)
|
||||
return ERR;
|
||||
@@ -910,7 +910,7 @@ get_matching_node_addr(pat, dir)
|
||||
NUL_TO_NEWLINE(s, lp->len);
|
||||
if (!regexec(pat, s, 0, NULL, 0))
|
||||
return n;
|
||||
}
|
||||
}
|
||||
} while (n != current_addr);
|
||||
sprintf(errmsg, "no match");
|
||||
return ERR;
|
||||
@@ -1148,7 +1148,7 @@ move_lines(addr)
|
||||
REQUE(b2, b1->q_forw);
|
||||
REQUE(a1->q_back, a2);
|
||||
REQUE(b1, a1);
|
||||
current_addr = addr + ((addr < first_addr) ?
|
||||
current_addr = addr + ((addr < first_addr) ?
|
||||
second_addr - first_addr + 1 : 0);
|
||||
}
|
||||
if (isglobal)
|
||||
@@ -1339,7 +1339,7 @@ strip_escapes(s)
|
||||
|
||||
REALLOC(file, filesz, MAXPATHLEN + 1, NULL);
|
||||
/* assert: no trailing escape */
|
||||
while ((file[i++] = (*s == '\\') ? *++s : *s))
|
||||
while (file[i++] = (*s == '\\') ? *++s : *s)
|
||||
s++;
|
||||
return file;
|
||||
}
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -39,7 +39,7 @@ extern int patlock;
|
||||
|
||||
char errmsg[MAXPATHLEN + 40] = "";
|
||||
|
||||
/* get_compiled_pattern: return pointer to compiled pattern from command
|
||||
/* get_compiled_pattern: return pointer to compiled pattern from command
|
||||
buffer */
|
||||
pattern_t *
|
||||
get_compiled_pattern()
|
||||
@@ -67,7 +67,7 @@ get_compiled_pattern()
|
||||
return NULL;
|
||||
}
|
||||
patlock = 0;
|
||||
if ((n = regcomp(exp, exps, 0))) {
|
||||
if (n = regcomp(exp, exps, 0)) {
|
||||
regerror(n, exp, errmsg, sizeof errmsg);
|
||||
free(exp);
|
||||
return exp = NULL;
|
||||
|
||||
+6
-10
@@ -1,4 +1,4 @@
|
||||
/* sub.c: This file contains the substitution routines for the ed
|
||||
/* sub.c: This file contains the substitution routines for the ed
|
||||
line editor */
|
||||
/*-
|
||||
* Copyright (c) 1993 Andrew Moore, Talke Studio.
|
||||
@@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@@ -97,7 +97,7 @@ extract_subst_template()
|
||||
;
|
||||
else if (!isglobal) {
|
||||
while ((n = get_tty_line()) == 0 ||
|
||||
(n > 0 && ibuf[n - 1] != '\n'))
|
||||
n > 0 && ibuf[n - 1] != '\n')
|
||||
clearerr(stdin);
|
||||
if (n < 0)
|
||||
return NULL;
|
||||
@@ -124,7 +124,6 @@ search_and_replace(pat, gflag, kth)
|
||||
char *txt;
|
||||
char *eot;
|
||||
long lc;
|
||||
long xa = current_addr;
|
||||
int nsubs = 0;
|
||||
line_t *lp;
|
||||
int len;
|
||||
@@ -155,10 +154,8 @@ search_and_replace(pat, gflag, kth)
|
||||
} while (txt != eot);
|
||||
SPL0();
|
||||
nsubs++;
|
||||
xa = current_addr;
|
||||
}
|
||||
}
|
||||
current_addr = xa;
|
||||
if (nsubs == 0 && !(gflag & GLB)) {
|
||||
sprintf(errmsg, "no match");
|
||||
return ERR;
|
||||
@@ -188,7 +185,7 @@ substitute_matching_text(pat, lp, gflag, kth)
|
||||
|
||||
if ((txt = get_sbuf_line(lp)) == NULL)
|
||||
return ERR;
|
||||
if (isbinary)
|
||||
if (isbinary)
|
||||
NUL_TO_NEWLINE(txt, lp->len);
|
||||
eot = txt + lp->len;
|
||||
if (!regexec(pat, txt, SE_MAX, rm, 0)) {
|
||||
@@ -213,9 +210,8 @@ substitute_matching_text(pat, lp, gflag, kth)
|
||||
off += i;
|
||||
}
|
||||
txt += rm[0].rm_eo;
|
||||
} while (*txt &&
|
||||
(!changed || ((gflag & GSG) && rm[0].rm_eo)) &&
|
||||
!regexec(pat, txt, SE_MAX, rm, REG_NOTBOL));
|
||||
} while (*txt && (!changed || (gflag & GSG) && rm[0].rm_eo) &&
|
||||
!regexec(pat, txt, SE_MAX, rm, REG_NOTBOL));
|
||||
i = eot - txt;
|
||||
REALLOC(rbuf, rbufsz, off + i + 2, ERR);
|
||||
if (i > 0 && !rm[0].rm_eo && (gflag & GSG)) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
SHELL= /bin/sh
|
||||
ED= ../obj/ed
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
# /b/source/CVS/src/bin/expr/Makefile,v 1.5 1993/06/14 19:56:06 jtc Exp
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= expr
|
||||
SRCS= expr.c
|
||||
SRCS= expr.c
|
||||
CLEANFILES+= expr.c y.tab.h
|
||||
|
||||
expr.c:
|
||||
|
||||
+5
-5
@@ -15,7 +15,7 @@
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by Winning Strategies, Inc.
|
||||
.\" 4. The name of the author may not be used to endorse or promote products
|
||||
.\" derived from this software without specific prior written permission
|
||||
.\" derived from this software withough specific prior written permission
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
@@ -28,7 +28,7 @@
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\" $Id: expr.1,v 1.2 1993/10/04 22:07:27 jtc Exp $
|
||||
.\"
|
||||
.Dd July 3, 1993
|
||||
.Dt EXPR 1
|
||||
@@ -51,8 +51,8 @@ All operators are separate arguments to the
|
||||
utility.
|
||||
Characters special to the command interpreter must be escaped.
|
||||
.Pp
|
||||
Operators are listed below in order of increasing precedence.
|
||||
Operators with equal precedence are grouped within { } symbols.
|
||||
Operators are listed below in order of increasing precidence.
|
||||
Operators with equal precidence are grouped within { } symbols.
|
||||
.Bl -tag -width indent
|
||||
.It Ar expr1 Li | Ar expr2
|
||||
Returns the evaluation of
|
||||
@@ -66,7 +66,7 @@ Returns the evaluation of
|
||||
if neither expression evaluates to an empty string or zero;
|
||||
otherwise, returns zero.
|
||||
.It Ar expr1 Li "{=, >, >=, <, <=, !=}" Ar expr2
|
||||
Returns the results of integer comparison if both arguments are integers;
|
||||
Returns the results of integer comparision if both arguments are integers;
|
||||
otherwise, returns the results of string comparison using the locale-specific
|
||||
collation sequence.
|
||||
The result of each comparison is 1 if the specified relation is true,
|
||||
|
||||
+32
-43
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Largely rewritten by J.T. Conklin ([email protected])
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <err.h>
|
||||
|
||||
enum valtype {
|
||||
integer, numeric_string, string
|
||||
integer, string
|
||||
} ;
|
||||
|
||||
struct val {
|
||||
@@ -56,6 +56,7 @@ char **av;
|
||||
%left <val> '+' '-'
|
||||
%left <val> '*' '/' '%'
|
||||
%left <val> ':'
|
||||
%left UNARY
|
||||
|
||||
%token <val> TOKEN
|
||||
%type <val> start expr
|
||||
@@ -93,7 +94,7 @@ int i;
|
||||
|
||||
vp = (struct val *) malloc (sizeof (*vp));
|
||||
if (vp == NULL) {
|
||||
errx (2, "malloc() failed");
|
||||
err (2, NULL);
|
||||
}
|
||||
|
||||
vp->type = integer;
|
||||
@@ -106,26 +107,13 @@ make_str (s)
|
||||
char *s;
|
||||
{
|
||||
struct val *vp;
|
||||
int i, isint;
|
||||
|
||||
vp = (struct val *) malloc (sizeof (*vp));
|
||||
if (vp == NULL || ((vp->u.s = strdup (s)) == NULL)) {
|
||||
errx (2, "malloc() failed");
|
||||
err (2, NULL);
|
||||
}
|
||||
|
||||
for(i = 1, isint = isdigit(s[0]) || s[0] == '-';
|
||||
isint && i < strlen(s);
|
||||
i++)
|
||||
{
|
||||
if(!isdigit(s[i]))
|
||||
isint = 0;
|
||||
}
|
||||
|
||||
if (isint)
|
||||
vp->type = numeric_string;
|
||||
else
|
||||
vp->type = string;
|
||||
|
||||
vp->type = string;
|
||||
return vp;
|
||||
}
|
||||
|
||||
@@ -134,7 +122,7 @@ void
|
||||
free_value (vp)
|
||||
struct val *vp;
|
||||
{
|
||||
if (vp->type == string || vp->type == numeric_string)
|
||||
if (vp->type == string)
|
||||
free (vp->u.s);
|
||||
}
|
||||
|
||||
@@ -143,19 +131,34 @@ int
|
||||
to_integer (vp)
|
||||
struct val *vp;
|
||||
{
|
||||
char *s;
|
||||
int neg;
|
||||
int i;
|
||||
|
||||
if (vp->type == integer)
|
||||
return 1;
|
||||
|
||||
if (vp->type == string)
|
||||
return 0;
|
||||
s = vp->u.s;
|
||||
i = 0;
|
||||
|
||||
neg = (*s == '-');
|
||||
if (neg)
|
||||
s++;
|
||||
|
||||
for (;*s; s++) {
|
||||
if (!isdigit (*s))
|
||||
return 0;
|
||||
|
||||
i *= 10;
|
||||
i += *s - '0';
|
||||
}
|
||||
|
||||
/* vp->type == numeric_string, make it numeric */
|
||||
i = atoi(vp->u.s);
|
||||
free (vp->u.s);
|
||||
vp->u.i = i;
|
||||
if (neg)
|
||||
i *= -1;
|
||||
|
||||
vp->type = integer;
|
||||
vp->u.i = i;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -165,12 +168,12 @@ struct val *vp;
|
||||
{
|
||||
char *tmp;
|
||||
|
||||
if (vp->type == string || vp->type == numeric_string)
|
||||
if (vp->type == string)
|
||||
return;
|
||||
|
||||
tmp = malloc (25);
|
||||
if (tmp == NULL) {
|
||||
errx (2, "malloc() failed");
|
||||
err (2, NULL);
|
||||
}
|
||||
|
||||
sprintf (tmp, "%d", vp->u.i);
|
||||
@@ -183,7 +186,6 @@ int
|
||||
isstring (vp)
|
||||
struct val *vp;
|
||||
{
|
||||
/* only TRUE if this string is not a valid integer */
|
||||
return (vp->type == string);
|
||||
}
|
||||
|
||||
@@ -191,6 +193,7 @@ struct val *vp;
|
||||
int
|
||||
yylex ()
|
||||
{
|
||||
struct val *vp;
|
||||
char *p;
|
||||
|
||||
if (*av == NULL)
|
||||
@@ -225,9 +228,7 @@ struct val *vp;
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
int yyparse ();
|
||||
|
||||
int
|
||||
void
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
@@ -243,7 +244,7 @@ char **argv;
|
||||
else
|
||||
printf ("%s\n", result->u.s);
|
||||
|
||||
return (is_zero_or_null (result));
|
||||
exit (is_zero_or_null (result));
|
||||
}
|
||||
|
||||
int
|
||||
@@ -292,8 +293,6 @@ struct val *a, *b;
|
||||
to_string (b);
|
||||
r = make_integer (strcoll (a->u.s, b->u.s) == 0);
|
||||
} else {
|
||||
(void)to_integer(a);
|
||||
(void)to_integer(b);
|
||||
r = make_integer (a->u.i == b->u.i);
|
||||
}
|
||||
|
||||
@@ -313,8 +312,6 @@ struct val *a, *b;
|
||||
to_string (b);
|
||||
r = make_integer (strcoll (a->u.s, b->u.s) > 0);
|
||||
} else {
|
||||
(void)to_integer(a);
|
||||
(void)to_integer(b);
|
||||
r= make_integer (a->u.i > b->u.i);
|
||||
}
|
||||
|
||||
@@ -334,8 +331,6 @@ struct val *a, *b;
|
||||
to_string (b);
|
||||
r = make_integer (strcoll (a->u.s, b->u.s) < 0);
|
||||
} else {
|
||||
(void)to_integer(a);
|
||||
(void)to_integer(b);
|
||||
r = make_integer (a->u.i < b->u.i);
|
||||
}
|
||||
|
||||
@@ -355,8 +350,6 @@ struct val *a, *b;
|
||||
to_string (b);
|
||||
r = make_integer (strcoll (a->u.s, b->u.s) >= 0);
|
||||
} else {
|
||||
(void)to_integer(a);
|
||||
(void)to_integer(b);
|
||||
r = make_integer (a->u.i >= b->u.i);
|
||||
}
|
||||
|
||||
@@ -376,8 +369,6 @@ struct val *a, *b;
|
||||
to_string (b);
|
||||
r = make_integer (strcoll (a->u.s, b->u.s) <= 0);
|
||||
} else {
|
||||
(void)to_integer(a);
|
||||
(void)to_integer(b);
|
||||
r = make_integer (a->u.i <= b->u.i);
|
||||
}
|
||||
|
||||
@@ -397,8 +388,6 @@ struct val *a, *b;
|
||||
to_string (b);
|
||||
r = make_integer (strcoll (a->u.s, b->u.s) != 0);
|
||||
} else {
|
||||
(void)to_integer(a);
|
||||
(void)to_integer(b);
|
||||
r = make_integer (a->u.i != b->u.i);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= hostname
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)hostname.1 8.1 (Berkeley) 5/31/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd May 31, 1993
|
||||
.Dt HOSTNAME 1
|
||||
@@ -58,7 +58,7 @@ Trims off any domain information from the printed
|
||||
name.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr gethostname 3
|
||||
.Xr gethostname 2
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm hostname
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
# $Id$
|
||||
|
||||
PROG= kill
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)kill.1 8.1 (Berkeley) 5/31/93
|
||||
.\" $FreeBSD$
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd May 31, 1993
|
||||
.Dt KILL 1
|
||||
|
||||
Loaded 100 of 8839 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user