From 435e8dffcf378b5a0513c17aabf4f32096c20da8 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Thu, 11 May 1989 16:59:08 -0800 Subject: [PATCH] file reorg, pathnames.h, paths.h SCCS-vsn: usr.sbin/sa/Makefile 5.2 SCCS-vsn: usr.sbin/sa/pathnames.h 5.2 SCCS-vsn: usr.bin/leave/Makefile 5.2 SCCS-vsn: usr.bin/lock/Makefile 5.3 SCCS-vsn: usr.bin/logger/Makefile 5.2 SCCS-vsn: usr.bin/netstat/Makefile 5.11 SCCS-vsn: usr.bin/quota/Makefile 5.2 SCCS-vsn: usr.bin/rdist/Makefile 5.8 SCCS-vsn: usr.bin/rdist/main.c 5.4 SCCS-vsn: usr.bin/renice/Makefile 5.2 SCCS-vsn: usr.bin/banner/Makefile 5.2 SCCS-vsn: usr.bin/rlogin/Makefile 5.2 SCCS-vsn: usr.bin/tip/Makefile 5.8 SCCS-vsn: usr.bin/tip/cmds.c 5.10 SCCS-vsn: usr.bin/tip/remcap.c 5.3 SCCS-vsn: usr.bin/tip/tip.c 5.9 SCCS-vsn: usr.bin/tip/uucplock.c 5.4 SCCS-vsn: usr.bin/tip/vars.c 5.4 SCCS-vsn: usr.bin/tftp/Makefile 5.8 SCCS-vsn: usr.bin/telnet/Makefile 1.13 SCCS-vsn: usr.bin/tcopy/Makefile 5.2 SCCS-vsn: usr.bin/tcopy/tcopy.c 5.12 SCCS-vsn: usr.bin/cmp/Makefile 5.2 SCCS-vsn: old/crypt/crypt.c 4.4 SCCS-vsn: old/which/Makefile 5.2 SCCS-vsn: usr.bin/whois/Makefile 5.2 SCCS-vsn: usr.bin/window/main.c 3.36 SCCS-vsn: usr.bin/window/Makefile 5.3 SCCS-vsn: usr.bin/yes/Makefile 5.2 SCCS-vsn: usr.bin/vacation/Makefile 5.2 SCCS-vsn: usr.bin/vacation/vacation.c 5.14 SCCS-vsn: usr.bin/fstat/Makefile 5.2 SCCS-vsn: usr.bin/fstat/fstat.c 5.18 SCCS-vsn: usr.bin/checknr/Makefile 5.2 SCCS-vsn: usr.bin/chpass/Makefile 5.2 SCCS-vsn: usr.bin/chpass/chpass.c 5.11 SCCS-vsn: usr.bin/chpass/field.c 5.9 SCCS-vsn: usr.bin/chpass/pathnames.h 5.2 SCCS-vsn: usr.bin/chpass/util.c 5.10 SCCS-vsn: usr.bin/tput/Makefile 5.2 SCCS-vsn: usr.bin/colcrt/Makefile 5.2 SCCS-vsn: usr.bin/colrm/Makefile 5.2 SCCS-vsn: usr.bin/dc/Makefile 5.7 SCCS-vsn: usr.bin/dc/dc.c 4.6 SCCS-vsn: usr.bin/mail/Makefile 5.13 SCCS-vsn: usr.bin/mail/cmd1.c 5.19 SCCS-vsn: usr.bin/mail/cmd3.c 5.21 SCCS-vsn: usr.bin/mail/collect.c 5.18 SCCS-vsn: usr.bin/mail/def.h 5.19 SCCS-vsn: usr.bin/mail/edit.c 5.12 SCCS-vsn: usr.bin/mail/fio.c 5.21 SCCS-vsn: usr.bin/mail/main.c 5.23 SCCS-vsn: usr.bin/mail/names.c 5.14 SCCS-vsn: usr.bin/mail/pathnames.h 5.7 SCCS-vsn: usr.bin/mail/quit.c 5.12 SCCS-vsn: usr.bin/mail/send.c 5.18 SCCS-vsn: usr.bin/mail/temp.c 5.12 SCCS-vsn: usr.bin/mail/v7.local.c 5.8 SCCS-vsn: usr.bin/apply/Makefile 5.2 SCCS-vsn: usr.bin/apply/apply.c 5.3 SCCS-vsn: usr.bin/biff/Makefile 5.2 SCCS-vsn: old/cpio/Makefile 5.5 SCCS-vsn: old/cpio/cpio.c 5.5 SCCS-vsn: usr.bin/diction/Makefile 4.9 SCCS-vsn: usr.bin/diction/diction/dprog.c 4.3 SCCS-vsn: usr.bin/diction/diction/diction.sh 4.6 SCCS-vsn: usr.bin/diction/explain/explain.sh 4.6 SCCS-vsn: usr.bin/diction/style/style.sh 4.6 SCCS-vsn: usr.bin/diction/NOTUSED/suggest.sh 5.2 SCCS-vsn: usr.bin/diff/diff3/Makefile 4.6 SCCS-vsn: usr.bin/diff/diff3/diff3.sh 4.2 SCCS-vsn: usr.bin/soelim/Makefile 5.2 SCCS-vsn: usr.bin/script/Makefile 5.2 SCCS-vsn: usr.bin/script/script.c 5.8 SCCS-vsn: usr.bin/tset/Makefile 5.10 SCCS-vsn: usr.bin/ptx/Makefile 5.2 SCCS-vsn: usr.bin/ptx/ptx.c 4.5 SCCS-vsn: usr.bin/ruptime/Makefile 5.2 SCCS-vsn: usr.bin/ruptime/ruptime.c 5.6 SCCS-vsn: usr.bin/rwho/Makefile 5.2 SCCS-vsn: usr.bin/rwho/rwho.c 5.4 SCCS-vsn: old/eqn/neqn/Makefile 5.3 SCCS-vsn: usr.bin/expand/Makefile 5.3 SCCS-vsn: usr.bin/ex/ex_subr.c 7.12 SCCS-vsn: usr.bin/ex/ex.c 7.7 SCCS-vsn: usr.bin/ex/ex3.7preserve/ex3.7preserve.c 7.14 SCCS-vsn: usr.bin/ex/ex_tune.h 7.12 SCCS-vsn: usr.bin/ex/ex_temp.c 7.7 SCCS-vsn: usr.bin/ex/ex3.7recover/ex3.7recover.c 7.10 SCCS-vsn: usr.bin/fold/Makefile 5.2 SCCS-vsn: usr.bin/from/Makefile 5.2 SCCS-vsn: usr.bin/graph/Makefile 4.5 SCCS-vsn: libexec/bugfiler/Makefile 5.14 SCCS-vsn: libexec/bugfiler/bug.h 5.8 SCCS-vsn: libexec/bugfiler/gethead.c 5.7 SCCS-vsn: libexec/bugfiler/redist.c 5.9 SCCS-vsn: libexec/bugfiler/reply.c 5.7 SCCS-vsn: libexec/bugfiler/sendbug.sh 5.9 SCCS-vsn: usr.bin/look/look.c 4.7 SCCS-vsn: usr.bin/calendar/Makefile 4.5 SCCS-vsn: usr.bin/calendar/calendar.sh 4.8 SCCS-vsn: old/machine/Makefile 5.2 SCCS-vsn: usr.bin/diff/diff/Makefile 4.5 SCCS-vsn: usr.bin/diff/diff/diff.c 4.7 --- usr/src/libexec/bugfiler/Makefile | 8 +-- usr/src/libexec/bugfiler/bug.h | 3 +- usr/src/libexec/bugfiler/gethead.c | 5 +- usr/src/libexec/bugfiler/redist.c | 3 +- usr/src/libexec/bugfiler/reply.c | 3 +- usr/src/libexec/bugfiler/sendbug.sh | 19 ++++--- usr/src/old/cpio/Makefile | 8 +-- usr/src/old/cpio/cpio.c | 3 +- usr/src/old/crypt/crypt.c | 6 +-- usr/src/old/eqn/neqn/Makefile | 4 +- usr/src/old/machine/Makefile | 4 +- usr/src/old/which/Makefile | 4 +- usr/src/usr.bin/apply/Makefile | 4 +- usr/src/usr.bin/apply/apply.c | 6 ++- usr/src/usr.bin/banner/Makefile | 6 +-- usr/src/usr.bin/biff/Makefile | 4 +- usr/src/usr.bin/calendar/Makefile | 4 +- usr/src/usr.bin/calendar/calendar.sh | 4 +- usr/src/usr.bin/checknr/Makefile | 4 +- usr/src/usr.bin/chpass/Makefile | 12 +++-- usr/src/usr.bin/chpass/chpass.c | 7 +-- usr/src/usr.bin/chpass/field.c | 4 +- usr/src/usr.bin/chpass/pathnames.h | 7 ++- usr/src/usr.bin/chpass/util.c | 4 +- usr/src/usr.bin/cmp/Makefile | 4 +- usr/src/usr.bin/colcrt/Makefile | 4 +- usr/src/usr.bin/colrm/Makefile | 4 +- usr/src/usr.bin/dc/Makefile | 4 +- usr/src/usr.bin/dc/dc.c | 8 +-- usr/src/usr.bin/diction/Makefile | 17 +++---- usr/src/usr.bin/diction/NOTUSED/suggest.sh | 10 ++-- usr/src/usr.bin/diction/diction/diction.sh | 4 +- usr/src/usr.bin/diction/diction/dprog.c | 5 +- usr/src/usr.bin/diction/explain/explain.sh | 4 +- usr/src/usr.bin/diction/style/style.sh | 6 +-- usr/src/usr.bin/diff/diff/Makefile | 11 ++-- usr/src/usr.bin/diff/diff/diff.c | 10 ++-- usr/src/usr.bin/diff/diff3/Makefile | 4 +- usr/src/usr.bin/diff/diff3/diff3.sh | 4 +- usr/src/usr.bin/ex/ex.c | 7 +-- .../usr.bin/ex/ex3.7preserve/ex3.7preserve.c | 29 ++++++----- .../usr.bin/ex/ex3.7recover/ex3.7recover.c | 27 ++++------ usr/src/usr.bin/ex/ex_subr.c | 5 +- usr/src/usr.bin/ex/ex_temp.c | 3 +- usr/src/usr.bin/ex/ex_tune.h | 28 ++--------- usr/src/usr.bin/expand/Makefile | 4 +- usr/src/usr.bin/fold/Makefile | 4 +- usr/src/usr.bin/from/Makefile | 4 +- usr/src/usr.bin/fstat/Makefile | 4 +- usr/src/usr.bin/fstat/fstat.c | 12 ++--- usr/src/usr.bin/graph/Makefile | 4 +- usr/src/usr.bin/leave/Makefile | 4 +- usr/src/usr.bin/lock/Makefile | 4 +- usr/src/usr.bin/logger/Makefile | 4 +- usr/src/usr.bin/look/look.c | 5 +- usr/src/usr.bin/mail/Makefile | 18 +++---- usr/src/usr.bin/mail/cmd1.c | 4 +- usr/src/usr.bin/mail/cmd3.c | 10 ++-- usr/src/usr.bin/mail/collect.c | 6 +-- usr/src/usr.bin/mail/def.h | 5 +- usr/src/usr.bin/mail/edit.c | 6 +-- usr/src/usr.bin/mail/fio.c | 4 +- usr/src/usr.bin/mail/main.c | 4 +- usr/src/usr.bin/mail/names.c | 4 +- usr/src/usr.bin/mail/pathnames.h | 32 ++++-------- usr/src/usr.bin/mail/quit.c | 5 +- usr/src/usr.bin/mail/send.c | 8 +-- usr/src/usr.bin/mail/temp.c | 32 +++++++----- usr/src/usr.bin/mail/v7.local.c | 4 +- usr/src/usr.bin/netstat/Makefile | 4 +- usr/src/usr.bin/ptx/Makefile | 3 +- usr/src/usr.bin/ptx/ptx.c | 14 +++--- usr/src/usr.bin/quota/Makefile | 4 +- usr/src/usr.bin/rdist/Makefile | 4 +- usr/src/usr.bin/rdist/main.c | 4 +- usr/src/usr.bin/renice/Makefile | 4 +- usr/src/usr.bin/rlogin/Makefile | 4 +- usr/src/usr.bin/ruptime/Makefile | 4 +- usr/src/usr.bin/ruptime/ruptime.c | 7 ++- usr/src/usr.bin/rwho/Makefile | 4 +- usr/src/usr.bin/rwho/rwho.c | 7 ++- usr/src/usr.bin/script/Makefile | 4 +- usr/src/usr.bin/script/script.c | 9 ++-- usr/src/usr.bin/soelim/Makefile | 4 +- usr/src/usr.bin/tcopy/Makefile | 4 +- usr/src/usr.bin/tcopy/tcopy.c | 14 +++--- usr/src/usr.bin/telnet/Makefile | 50 +------------------ usr/src/usr.bin/tftp/Makefile | 4 +- usr/src/usr.bin/tip/Makefile | 4 +- usr/src/usr.bin/tip/cmds.c | 6 ++- usr/src/usr.bin/tip/remcap.c | 16 +++--- usr/src/usr.bin/tip/tip.c | 5 +- usr/src/usr.bin/tip/uucplock.c | 16 +++--- usr/src/usr.bin/tip/vars.c | 7 +-- usr/src/usr.bin/tput/Makefile | 4 +- usr/src/usr.bin/tset/Makefile | 8 +-- usr/src/usr.bin/vacation/Makefile | 4 +- usr/src/usr.bin/vacation/vacation.c | 7 +-- usr/src/usr.bin/whois/Makefile | 4 +- usr/src/usr.bin/window/Makefile | 5 +- usr/src/usr.bin/window/main.c | 4 +- usr/src/usr.bin/yes/Makefile | 4 +- usr/src/usr.sbin/sa/Makefile | 4 +- usr/src/usr.sbin/sa/pathnames.h | 8 +-- 104 files changed, 362 insertions(+), 421 deletions(-) diff --git a/usr/src/libexec/bugfiler/Makefile b/usr/src/libexec/bugfiler/Makefile index 49713c76fb..cb10f2e201 100644 --- a/usr/src/libexec/bugfiler/Makefile +++ b/usr/src/libexec/bugfiler/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.13 (Berkeley) %G% +# @(#)Makefile 5.14 (Berkeley) %G% # CFLAGS= -O -I. LIBC= /lib/libc.a @@ -38,9 +38,9 @@ depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} install: ${MAN1} ${MAN8} - install -s -o root -g bin -m 4755 bugfiler ${DESTDIR}/usr/lib - install -c -o bin -g bin -m 755 sendbug.sh ${DESTDIR}/usr/ucb - install -c -o bin -g bin -m 644 bugformat ${DESTDIR}/usr/lib + install -s -o root -g bin -m 4755 bugfiler ${DESTDIR}/usr/libexec + install -c -o bin -g bin -m 755 sendbug.sh ${DESTDIR}/usr/bin/sendbug + install -c -o bin -g bin -m 644 bugformat ${DESTDIR}/usr/share/misc install -c -o bin -g bin -m 444 ${MAN1} ${DESTDIR}/usr/man/cat1 install -c -o bin -g bin -m 444 ${MAN8} ${DESTDIR}/usr/man/cat8 diff --git a/usr/src/libexec/bugfiler/bug.h b/usr/src/libexec/bugfiler/bug.h index 4e3ab7b6b1..5f9b909f6a 100644 --- a/usr/src/libexec/bugfiler/bug.h +++ b/usr/src/libexec/bugfiler/bug.h @@ -14,12 +14,11 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)bug.h 5.7 (Berkeley) %G% + * @(#)bug.h 5.8 (Berkeley) %G% */ #define BUGS_HOME "owner-bugs@ucbvax.Berkeley.EDU" #define BUGS_ID "bugs" -#define MAIL_CMD "/usr/lib/sendmail -i -t -F \"Bugs Bunny\" -f owner-bugs" /* * the METOO definition has the bugfiler exit with an error (-1) status diff --git a/usr/src/libexec/bugfiler/gethead.c b/usr/src/libexec/bugfiler/gethead.c index f26bab7ba3..49b291a9bd 100644 --- a/usr/src/libexec/bugfiler/gethead.c +++ b/usr/src/libexec/bugfiler/gethead.c @@ -16,12 +16,13 @@ */ #ifndef lint -static char sccsid[] = "@(#)gethead.c 5.6 (Berkeley) %G%"; +static char sccsid[] = "@(#)gethead.c 5.7 (Berkeley) %G%"; #endif /* not lint */ #include #include #include +#include "pathnames.h" static int chk1(), pbuf(); @@ -58,7 +59,7 @@ gethead(redist) int fd; char *distf; - distf = "/tmp/BUG_XXXXXX"; + distf = _PATH_TMP; if (!(fd = mkstemp(distf)) || !(dfp = fdopen(fd, "w+"))) error("can't create redistribution file %s.", distf); /* disappear after last reference is closed */ diff --git a/usr/src/libexec/bugfiler/redist.c b/usr/src/libexec/bugfiler/redist.c index 9180691c80..9d0e7241c0 100644 --- a/usr/src/libexec/bugfiler/redist.c +++ b/usr/src/libexec/bugfiler/redist.c @@ -16,13 +16,14 @@ */ #ifndef lint -static char sccsid[] = "@(#)redist.c 5.8 (Berkeley) %G%"; +static char sccsid[] = "@(#)redist.c 5.9 (Berkeley) %G%"; #endif /* not lint */ #include #include #include #include +#include "pathnames.h" /* * redist -- diff --git a/usr/src/libexec/bugfiler/reply.c b/usr/src/libexec/bugfiler/reply.c index 29e4b01ce4..38b8dc315a 100644 --- a/usr/src/libexec/bugfiler/reply.c +++ b/usr/src/libexec/bugfiler/reply.c @@ -16,12 +16,13 @@ */ #ifndef lint -static char sccsid[] = "@(#)reply.c 5.6 (Berkeley) %G%"; +static char sccsid[] = "@(#)reply.c 5.7 (Berkeley) %G%"; #endif /* not lint */ #include #include #include +#include "pathnames.h" /* * reply -- diff --git a/usr/src/libexec/bugfiler/sendbug.sh b/usr/src/libexec/bugfiler/sendbug.sh index 68f4a66ff8..16831224a5 100644 --- a/usr/src/libexec/bugfiler/sendbug.sh +++ b/usr/src/libexec/bugfiler/sendbug.sh @@ -15,20 +15,23 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)sendbug.sh 5.8 (Berkeley) %G% +# @(#)sendbug.sh 5.9 (Berkeley) %G% # # Create a bug report and mail to '4bsd-bugs'. +PATH=/bin:/sbin:/usr/sbin:/usr/bin +export PATH + TEMP=/tmp/bug$$ -FORMAT=/usr/lib/bugformat +FORMAT=/usr/share/misc/bugformat # uucp sites should use ": ${BUGADDR=ucbvax!4bsd-bugs}" with a suitable path. : ${BUGADDR=4bsd-bugs@BERKELEY.EDU} -: ${EDITOR=/usr/ucb/vi} +: ${EDITOR=vi} -trap '/bin/rm -f $TEMP ; exit 1' 1 2 3 13 15 +trap 'rm -f $TEMP ; exit 1' 1 2 3 13 15 -/bin/cp $FORMAT $TEMP +cp $FORMAT $TEMP if $EDITOR $TEMP then if cmp -s $FORMAT $TEMP @@ -37,9 +40,9 @@ then exit fi case "$#" in - 0) /usr/lib/sendmail -t -oi $BUGADDR < $TEMP ;; - *) /usr/lib/sendmail -t -oi "$@" < $TEMP ;; + 0) sendmail -t -oi $BUGADDR < $TEMP ;; + *) sendmail -t -oi "$@" < $TEMP ;; esac fi -/bin/rm -f $TEMP +rm -f $TEMP diff --git a/usr/src/old/cpio/Makefile b/usr/src/old/cpio/Makefile index 14342bd57e..8b13716914 100644 --- a/usr/src/old/cpio/Makefile +++ b/usr/src/old/cpio/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.4 (Berkeley) %G% +# @(#)Makefile 5.5 (Berkeley) %G% # CFLAGS= -O LIBC= /lib/libc.a @@ -37,9 +37,9 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 cpio ${DESTDIR}/bin/cpio - install -c -o bin -g bin -m 444 cpio.0 ${DESTDIR}/usr/man/cat1/cpio.0 - install -c -o bin -g bin -m 444 cpio_format.0 ${DESTDIR}/usr/man/cat5/cpio.0 + install -s -o bin -g bin -m 755 cpio ${DESTDIR}/usr/bin + install -c -o bin -g bin -m 444 cpio.0 ${DESTDIR}/usr/man/cat1 + install -c -o bin -g bin -m 444 cpio_format.0 ${DESTDIR}/usr/man/cat5 lint: ${SRCS} lint ${CFLAGS} ${SRCS} diff --git a/usr/src/old/cpio/cpio.c b/usr/src/old/cpio/cpio.c index eac1fac796..42355584a7 100644 --- a/usr/src/old/cpio/cpio.c +++ b/usr/src/old/cpio/cpio.c @@ -27,6 +27,7 @@ #include #include #include +#include struct utimbuf { time_t actime; @@ -129,7 +130,7 @@ static FILE *Rtty, *Wtty; static -char ttyname[] = "/dev/tty"; +char ttyname[] = _PATH_TTY; static char **Pattern = 0; diff --git a/usr/src/old/crypt/crypt.c b/usr/src/old/crypt/crypt.c index 67ec0628d3..dbf540a909 100644 --- a/usr/src/old/crypt/crypt.c +++ b/usr/src/old/crypt/crypt.c @@ -1,4 +1,4 @@ -static char *sccsid = "@(#)crypt.c 4.3 (Berkeley) %G%"; +static char *sccsid = "@(#)crypt.c 4.4 (Berkeley) %G%"; /* * A one-rotor machine designed along the lines of Enigma @@ -7,6 +7,7 @@ static char *sccsid = "@(#)crypt.c 4.3 (Berkeley) %G%"; #define ECHO 010 #include +#include "pathnames.h" #define ROTORSZ 256 #define MASK 0377 char t1[ROTORSZ]; @@ -35,8 +36,7 @@ char *pw; close(1); dup(pf[0]); dup(pf[1]); - execl("/usr/lib/makekey", "-", 0); - execl("/lib/makekey", "-", 0); + execl(_PATH_MAKEKEY, "-", 0); exit(1); } write(pf[1], buf, 10); diff --git a/usr/src/old/eqn/neqn/Makefile b/usr/src/old/eqn/neqn/Makefile index 9379b89036..f8b861e9c9 100644 --- a/usr/src/old/eqn/neqn/Makefile +++ b/usr/src/old/eqn/neqn/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.2 (Berkeley) %G% +# @(#)Makefile 5.3 (Berkeley) %G% # COMMON= ../common_source CFLAGS= -O -DNEQN -I. -I${COMMON} @@ -48,7 +48,7 @@ depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 neqn ${DESTDIR}/usr/bin/neqn + install -s -o bin -g bin -m 755 neqn ${DESTDIR}/usr/bin lint: ${SRCS} lint ${CFLAGS} ${SRCS} diff --git a/usr/src/old/machine/Makefile b/usr/src/old/machine/Makefile index 5d1e324e7a..7d741ab14d 100644 --- a/usr/src/old/machine/Makefile +++ b/usr/src/old/machine/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 machine ${DESTDIR}/bin + install -s -o bin -g bin -m 755 machine ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/old/which/Makefile b/usr/src/old/which/Makefile index d54ab7ffd8..5d6f2b1d33 100644 --- a/usr/src/old/which/Makefile +++ b/usr/src/old/which/Makefile @@ -14,12 +14,12 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # MAN= which.0 all which clean cleandir depend lint tags: install: ${MAN} - install -c -o bin -g bin -m 755 which.csh ${DESTDIR}/usr/ucb/which + install -c -o bin -g bin -m 755 which.csh ${DESTDIR}/usr/bin/which install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 diff --git a/usr/src/usr.bin/apply/Makefile b/usr/src/usr.bin/apply/Makefile index b8f7be3c40..1e3de779a1 100644 --- a/usr/src/usr.bin/apply/Makefile +++ b/usr/src/usr.bin/apply/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 apply ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 apply ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/apply/apply.c b/usr/src/usr.bin/apply/apply.c index 7a44f0b7f1..db9fb8d6ec 100644 --- a/usr/src/usr.bin/apply/apply.c +++ b/usr/src/usr.bin/apply/apply.c @@ -11,7 +11,7 @@ char copyright[] = #endif not lint #ifndef lint -static char sccsid[] = "@(#)apply.c 5.2 (Berkeley) %G%"; +static char sccsid[] = "@(#)apply.c 5.3 (Berkeley) %G%"; #endif not lint /*%cc -s -O % @@ -21,7 +21,9 @@ static char sccsid[] = "@(#)apply.c 5.2 (Berkeley) %G%"; * apply -2 cmp A1 B1 A2 B2 compares A's with B's * apply "ln %1 /usr/fred/dir" * duplicates a directory */ +#include #include + char *cmdp; #define NCHARS 512 char cmd[512]; @@ -125,7 +127,7 @@ char *s; char *shell = getenv("SHELL"); if ((pid = fork()) == 0) { - execl(shell ? shell : "/bin/sh", "sh", "-c", s, 0); + execl(shell ? shell : _PATH_BSHELL, "sh", "-c", s, 0); _exit(127); } if(pid == -1){ diff --git a/usr/src/usr.bin/banner/Makefile b/usr/src/usr.bin/banner/Makefile index 038767edd8..1bdaede160 100644 --- a/usr/src/usr.bin/banner/Makefile +++ b/usr/src/usr.bin/banner/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,8 +38,8 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 banner ${DESTDIR}/usr/games - install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat6 + install -s -o bin -g bin -m 755 banner ${DESTDIR}/usr/bin + install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} lint ${CFLAGS} ${SRCS} diff --git a/usr/src/usr.bin/biff/Makefile b/usr/src/usr.bin/biff/Makefile index 73f640afa0..3f13920d1c 100644 --- a/usr/src/usr.bin/biff/Makefile +++ b/usr/src/usr.bin/biff/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 biff ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 biff ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/calendar/Makefile b/usr/src/usr.bin/calendar/Makefile index 539af60cce..9210b07e9b 100644 --- a/usr/src/usr.bin/calendar/Makefile +++ b/usr/src/usr.bin/calendar/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 4.4 (Berkeley) %G% +# @(#)Makefile 4.5 (Berkeley) %G% # CFLAGS= -O LIBC= /lib/libc.a @@ -37,7 +37,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 calendar ${DESTDIR}/usr/lib + install -s -o bin -g bin -m 755 calendar ${DESTDIR}/usr/libexec install -c -o bin -g bin -m 755 calendar.sh ${DESTDIR}/usr/bin/calendar install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 diff --git a/usr/src/usr.bin/calendar/calendar.sh b/usr/src/usr.bin/calendar/calendar.sh index 700cd6f1e9..9c4d513d58 100644 --- a/usr/src/usr.bin/calendar/calendar.sh +++ b/usr/src/usr.bin/calendar/calendar.sh @@ -4,9 +4,9 @@ # All rights reserved. The Berkeley software License Agreement # specifies the terms and conditions for redistribution. # -# @(#)calendar.sh 4.7 (Berkeley) %G% +# @(#)calendar.sh 4.8 (Berkeley) %G% # -PATH=/usr/lib:/bin:/usr/bin:/usr/ucb:/lib # order important +PATH=/usr/libexec:/bin:/usr/bin:/usr/ucb:/lib:/usr/pgrm # order important tmp=/tmp/cal0$$ trap "rm -f $tmp /tmp/cal1$$ /tmp/cal2$$" diff --git a/usr/src/usr.bin/checknr/Makefile b/usr/src/usr.bin/checknr/Makefile index f7827b3365..864aec39a1 100644 --- a/usr/src/usr.bin/checknr/Makefile +++ b/usr/src/usr.bin/checknr/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 checknr ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 checknr ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/chpass/Makefile b/usr/src/usr.bin/chpass/Makefile index 8016fdc8a8..9d010f93a8 100644 --- a/usr/src/usr.bin/chpass/Makefile +++ b/usr/src/usr.bin/chpass/Makefile @@ -14,9 +14,9 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # -CFLAGS= -I. -O +CFLAGS= -O LIBC= /lib/libc.a SRCS= chpass.c field.c util.c OBJS= chpass.o field.o util.o @@ -37,10 +37,12 @@ depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} install: ${MAN} + install -s -o root -g bin -m 4755 chpass ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 - install -s -o root -g bin -m 4755 chpass ${DESTDIR}/bin/chpass - rm -f ${DESTDIR}/bin/chfn; ln ${DESTDIR}/bin/chpass ${DESTDIR}/bin/chfn - rm -f ${DESTDIR}/bin/chsh; ln ${DESTDIR}/bin/chpass ${DESTDIR}/bin/chsh + rm -f ${DESTDIR}/usr/bin/chfn; ln ${DESTDIR}/usr/bin/chpass \ + ${DESTDIR}/usr/bin/chfn + rm -f ${DESTDIR}/usr/bin/chsh; ln ${DESTDIR}/usr/bin/chpass \ + ${DESTDIR}/usr/bin/chsh rm -f ${DESTDIR}/usr/man/cat1/chfn.0 rm -f ${DESTDIR}/usr/man/cat1/chsh.0 ln ${DESTDIR}/usr/man/cat1/chpass.0 ${DESTDIR}/usr/man/cat1/chfn.0 diff --git a/usr/src/usr.bin/chpass/chpass.c b/usr/src/usr.bin/chpass/chpass.c index 185856e327..31706d6fcf 100644 --- a/usr/src/usr.bin/chpass/chpass.c +++ b/usr/src/usr.bin/chpass/chpass.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)chpass.c 5.10 (Berkeley) %G%"; +static char sccsid[] = "@(#)chpass.c 5.11 (Berkeley) %G%"; #endif /* not lint */ #include @@ -35,8 +35,9 @@ static char sccsid[] = "@(#)chpass.c 5.10 (Berkeley) %G%"; #include #include #include -#include #include +#include "chpass.h" +#include "pathnames.h" char e1[] = ": "; char e2[] = ":,"; @@ -238,7 +239,7 @@ info(pw) int fd, rval; char *tfile; - tfile = "/tmp/passwd.XXXXXX"; + tfile = _PATH_TMP; if ((fd = mkstemp(tfile)) == -1 || !(fp = fdopen(fd, "w+"))) { (void)fprintf(stderr, "chpass: no temporary file"); return(0); diff --git a/usr/src/usr.bin/chpass/field.c b/usr/src/usr.bin/chpass/field.c index f0b80273a9..914473790e 100644 --- a/usr/src/usr.bin/chpass/field.c +++ b/usr/src/usr.bin/chpass/field.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)field.c 5.8 (Berkeley) %G%"; +static char sccsid[] = "@(#)field.c 5.9 (Berkeley) %G%"; #endif /* not lint */ #include @@ -25,7 +25,7 @@ static char sccsid[] = "@(#)field.c 5.8 (Berkeley) %G%"; #include #include #include -#include +#include "chpass.h" #include "pathnames.h" /* ARGSUSED */ diff --git a/usr/src/usr.bin/chpass/pathnames.h b/usr/src/usr.bin/chpass/pathnames.h index 695e01c20c..ffdabfc08b 100644 --- a/usr/src/usr.bin/chpass/pathnames.h +++ b/usr/src/usr.bin/chpass/pathnames.h @@ -14,7 +14,10 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)pathnames.h 5.1 (Berkeley) %G% + * @(#)pathnames.h 5.2 (Berkeley) %G% */ -#define _PATH_BSHELL "/bin/sh" +#include + +#undef _PATH_TMP +#define _PATH_TMP "/tmp/passwd.XXXXXX" diff --git a/usr/src/usr.bin/chpass/util.c b/usr/src/usr.bin/chpass/util.c index 81a3a2b3b7..bb1eedd636 100644 --- a/usr/src/usr.bin/chpass/util.c +++ b/usr/src/usr.bin/chpass/util.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)util.c 5.9 (Berkeley) %G%"; +static char sccsid[] = "@(#)util.c 5.10 (Berkeley) %G%"; #endif /* not lint */ #include @@ -24,9 +24,9 @@ static char sccsid[] = "@(#)util.c 5.9 (Berkeley) %G%"; #include #include #include -#include #include #include +#include "chpass.h" #include "pathnames.h" static int dmsize[] = diff --git a/usr/src/usr.bin/cmp/Makefile b/usr/src/usr.bin/cmp/Makefile index 13ed885e24..5bf288ab02 100644 --- a/usr/src/usr.bin/cmp/Makefile +++ b/usr/src/usr.bin/cmp/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 cmp ${DESTDIR}/bin + install -s -o bin -g bin -m 755 cmp ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/colcrt/Makefile b/usr/src/usr.bin/colcrt/Makefile index 5a40aa73fd..86d528e34c 100644 --- a/usr/src/usr.bin/colcrt/Makefile +++ b/usr/src/usr.bin/colcrt/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 colcrt ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 colcrt ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/colrm/Makefile b/usr/src/usr.bin/colrm/Makefile index dd11122e7d..d1b564907e 100644 --- a/usr/src/usr.bin/colrm/Makefile +++ b/usr/src/usr.bin/colrm/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 colrm ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 colrm ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/dc/Makefile b/usr/src/usr.bin/dc/Makefile index 932fc41d9e..cabfe0fb5a 100644 --- a/usr/src/usr.bin/dc/Makefile +++ b/usr/src/usr.bin/dc/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.6 (Berkeley) %G% +# @(#)Makefile 5.7 (Berkeley) %G% # CFLAGS= -O -I. LIBC= /lib/libc.a @@ -37,7 +37,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 dc ${DESTDIR}/usr/bin/dc + install -s -o bin -g bin -m 755 dc ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/dc/dc.c b/usr/src/usr.bin/dc/dc.c index 04f5831e99..f29ed3167e 100644 --- a/usr/src/usr.bin/dc/dc.c +++ b/usr/src/usr.bin/dc/dc.c @@ -1,10 +1,12 @@ #ifndef lint -static char sccsid[] = "@(#)dc.c 4.5 (Berkeley) %G%"; +static char sccsid[] = "@(#)dc.c 4.6 (Berkeley) %G%"; #endif not lint +#include +#include #include -#include #include "dc.h" + main(argc,argv) int argc; char *argv[]; @@ -1579,7 +1581,7 @@ command(){ while((c = readc()) != '\n')*sl++ = c; *sl = 0; if((pid = fork()) == 0){ - execl("/bin/sh","sh","-c",line,0); + execl(_PATH_BSHELL,"sh","-c",line,0); exit(0100); } savint = signal(SIGINT, SIG_IGN); diff --git a/usr/src/usr.bin/diction/Makefile b/usr/src/usr.bin/diction/Makefile index e198c0a7ad..ebc8d8ab23 100644 --- a/usr/src/usr.bin/diction/Makefile +++ b/usr/src/usr.bin/diction/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 4.8 (Berkeley) %G% +# @(#)Makefile 4.9 (Berkeley) %G% # CFLAGS= -O LIBC= /lib/libc.a @@ -25,7 +25,7 @@ MAN= diction.0 style.0 all: dprog style1 style2 style3 dprog: diction.c ${LIBC} - ${CC} ${CFLAGS} -DDICT=\"/usr/lib/dict.d\" diction.c -o $@ + ${CC} ${CFLAGS} diction.c -o $@ style1: nwords.o ${LIBC} ${CC} nwords.o -o $@ -ll @@ -42,23 +42,20 @@ clean: cleandir: clean rm -f ${MAN} tags .depend -depend: ${SRCS} FRC +depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 style1 ${DESTDIR}/usr/lib - install -s -o bin -g bin -m 755 style2 ${DESTDIR}/usr/lib - install -s -o bin -g bin -m 755 style3 ${DESTDIR}/usr/lib - install -s -o bin -g bin -m 755 dprog ${DESTDIR}/usr/lib + install -s -o bin -g bin -m 755 dprog style1 style2 style3 \ + ${DESTDIR}/usr/libexec + install -c -o bin -g bin -m 755 dict.d explain.d \ + ${DESTDIR}/usr/share/dict install -c -o bin -g bin -m 755 style.sh ${DESTDIR}/usr/bin/style install -c -o bin -g bin -m 755 diction.sh ${DESTDIR}/usr/bin/diction install -c -o bin -g bin -m 755 explain.sh ${DESTDIR}/usr/bin/explain - install -c -o bin -g bin -m 755 dict.d ${DESTDIR}/usr/lib - install -c -o bin -g bin -m 755 explain.d ${DESTDIR}/usr/lib install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 rm -f ${DESTDIR}/usr/man/cat1/explain.0 ln ${DESTDIR}/usr/man/cat1/diction.0 ${DESTDIR}/usr/man/cat1/explain.0 -# ln ${DESTDIR}/usr/bin/explain ${DESTDIR}/usr/bin/suggest lint: ${SRCS} lint ${CFLAGS} nwords.c diff --git a/usr/src/usr.bin/diction/NOTUSED/suggest.sh b/usr/src/usr.bin/diction/NOTUSED/suggest.sh index 575a45ecbb..1bc796570f 100644 --- a/usr/src/usr.bin/diction/NOTUSED/suggest.sh +++ b/usr/src/usr.bin/diction/NOTUSED/suggest.sh @@ -1,9 +1,13 @@ -#! /bin/sh +#!/bin/sh - # -# @(#)suggest.sh 4.4 (Berkeley) 82/11/06 +# Copyright (c) 1988 Regents of the University of California. +# All rights reserved. The Berkeley software License Agreement +# specifies the terms and conditions for redistribution. +# +# @(#)suggest.sh 5.2 (Berkeley) %G% # trap 'rm $$; exit' 1 2 3 15 -D=/usr/lib/explain.d +D=/usr/share/dict/explain.d while echo "phrase?";read x do cat >$$ < #include +#include "pathnames.h" #define MAXSIZ 6500 #define QSIZE 650 @@ -98,7 +99,7 @@ char *argv[]; } out: if(nflag){ - wordf = fopen(DICT,"r"); + wordf = fopen(_PATH_DICT,"r"); if(wordf == NULL){ fprintf(stderr,"diction: can't open default dictionary\n"); exit(2); diff --git a/usr/src/usr.bin/diction/explain/explain.sh b/usr/src/usr.bin/diction/explain/explain.sh index e15fefdc6b..d940705ce7 100644 --- a/usr/src/usr.bin/diction/explain/explain.sh +++ b/usr/src/usr.bin/diction/explain/explain.sh @@ -1,8 +1,8 @@ #! /bin/sh # -# @(#)explain.sh 4.5 (Berkeley) 83/05/27 +# @(#)explain.sh 4.6 (Berkeley) 89/05/11 # -D=/usr/lib/explain.d +D=/usr/share/dict/explain.d while echo 'phrase?' read x do diff --git a/usr/src/usr.bin/diction/style/style.sh b/usr/src/usr.bin/diction/style/style.sh index 4acda107f5..c2f05a2fa2 100644 --- a/usr/src/usr.bin/diction/style/style.sh +++ b/usr/src/usr.bin/diction/style/style.sh @@ -1,9 +1,9 @@ #! /bin/sh # -# @(#)style.sh 4.5 (Berkeley) 82/11/06 +# @(#)style.sh 4.6 (Berkeley) 89/05/11 # -L=/usr/lib -B=/usr/bin +L=/usr/libexec +B=/usr/ucb echo " " $* sflag=-s eflag= diff --git a/usr/src/usr.bin/diff/diff/Makefile b/usr/src/usr.bin/diff/diff/Makefile index fb8f87d663..d163f1ecd2 100644 --- a/usr/src/usr.bin/diff/diff/Makefile +++ b/usr/src/usr.bin/diff/diff/Makefile @@ -14,12 +14,9 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 4.4 (Berkeley) %G% +# @(#)Makefile 4.5 (Berkeley) %G% # -DIFF= /bin/diff -DIFFH= /usr/lib/diffh -PR= /bin/pr -CFLAGS= -O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"' +CFLAGS= -O LIBC= /lib/libc.a SRCS= diff.c diffdir.c diffreg.c OBJS= diff.o diffdir.o diffreg.o @@ -45,8 +42,8 @@ depend: ${SRCS} mkdep ${CFLAGS} ${HSRCS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 diff ${DESTDIR}/bin/diff - install -s -o bin -g bin -m 755 diffh ${DESTDIR}/usr/lib/diffh + install -s -o bin -g bin -m 755 diff ${DESTDIR}/usr/bin/diff + install -s -o bin -g bin -m 755 diffh ${DESTDIR}/usr/bin/diffh install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 rm -f ${DESTDIR}/usr/man/cat1/diffh.0 ln ${DESTDIR}/usr/man/cat1/diff.0 ${DESTDIR}/usr/man/cat1/diffh.0 diff --git a/usr/src/usr.bin/diff/diff/diff.c b/usr/src/usr.bin/diff/diff/diff.c index 7950913692..92e15b143c 100644 --- a/usr/src/usr.bin/diff/diff/diff.c +++ b/usr/src/usr.bin/diff/diff/diff.c @@ -1,13 +1,15 @@ -static char sccsid[] = "@(#)diff.c 4.6 %G%"; +static char sccsid[] = "@(#)diff.c 4.7 %G%"; #include "diff.h" +#include "pathnames.h" + /* * diff - driver and subroutines */ -char diff[] = DIFF; -char diffh[] = DIFFH; -char pr[] = PR; +char diff[] = _PATH_DIFF; +char diffh[] = _PATH_DIFFH; +char pr[] = _PATH_PR; main(argc, argv) int argc; diff --git a/usr/src/usr.bin/diff/diff3/Makefile b/usr/src/usr.bin/diff/diff3/Makefile index 4369764d3d..b3c823e47c 100644 --- a/usr/src/usr.bin/diff/diff3/Makefile +++ b/usr/src/usr.bin/diff/diff3/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 4.5 (Berkeley) %G% +# @(#)Makefile 4.6 (Berkeley) %G% # CFLAGS= -O LIBC= /lib/libc.a @@ -37,7 +37,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 diff3 $(DESTDIR)/usr/lib/diff3 + install -s -o bin -g bin -m 755 diff3 $(DESTDIR)/usr/libexec/diff3 install -c -o bin -g bin -m 755 diff3.sh $(DESTDIR)/usr/bin/diff3 install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 diff --git a/usr/src/usr.bin/diff/diff3/diff3.sh b/usr/src/usr.bin/diff/diff3/diff3.sh index f5e3e125bb..1a1e46a584 100644 --- a/usr/src/usr.bin/diff/diff3/diff3.sh +++ b/usr/src/usr.bin/diff/diff3/diff3.sh @@ -1,6 +1,6 @@ #! /bin/sh # -# diff3.sh 4.1 83/02/10 +# diff3.sh 4.2 89/05/11 # e= case $1 in @@ -18,4 +18,4 @@ fi trap "rm -f /tmp/d3[ab]$$" 0 1 2 13 15 diff $1 $3 >/tmp/d3a$$ diff $2 $3 >/tmp/d3b$$ -/usr/lib/diff3 $e /tmp/d3[ab]$$ $1 $2 $3 +/usr/libexec/diff3 $e /tmp/d3[ab]$$ $1 $2 $3 diff --git a/usr/src/usr.bin/ex/ex.c b/usr/src/usr.bin/ex/ex.c index 874ef9aac7..a653ddde9a 100644 --- a/usr/src/usr.bin/ex/ex.c +++ b/usr/src/usr.bin/ex/ex.c @@ -11,13 +11,14 @@ char *copyright = #endif not lint #ifndef lint -static char *sccsid = "@(#)ex.c 7.6.1.1 (Berkeley) %G%"; +static char *sccsid = "@(#)ex.c 7.7 (Berkeley) %G%"; #endif not lint #include "ex.h" #include "ex_argv.h" #include "ex_temp.h" #include "ex_tty.h" +#include "pathnames.h" #ifdef TRACE #ifdef vms @@ -286,8 +287,8 @@ main(ac, av) if (ac == 0) { ppid = 0; setrupt(); - execl(EXRECOVER, "exrecover", "-r", 0); - filioerr(EXRECOVER); + execl(_PATH_EXRECOVER, "exrecover", "-r", 0); + filioerr(_PATH_EXRECOVER); ex_exit(1); } CP(savedfile, *av++), ac--; diff --git a/usr/src/usr.bin/ex/ex3.7preserve/ex3.7preserve.c b/usr/src/usr.bin/ex/ex3.7preserve/ex3.7preserve.c index 5e84211c93..8b8c140402 100644 --- a/usr/src/usr.bin/ex/ex3.7preserve/ex3.7preserve.c +++ b/usr/src/usr.bin/ex/ex3.7preserve/ex3.7preserve.c @@ -11,18 +11,16 @@ char *copyright = #endif not lint #ifndef lint -static char *sccsid = "@(#)ex3.7preserve.c 7.13 (Berkeley) %G%"; +static char *sccsid = "@(#)ex3.7preserve.c 7.14 (Berkeley) %G%"; #endif not lint -#include -#include #include #include #include #include -#include "uparm.h" - -#define TMP "/tmp" +#include +#include +#include "pathnames.h" #ifdef VMUNIX #define HBLKS 2 @@ -33,12 +31,12 @@ static char *sccsid = "@(#)ex3.7preserve.c 7.13 (Berkeley) %G%"; char xstr[1]; /* make loader happy */ /* - * Expreserve - preserve a file in usrpath(preserve) + * Expreserve - preserve a file in _PATH_PRESERVE. * Bill Joy UCB November 13, 1977 * * This routine is very naive - it doesn't remove anything from - * usrpath(preserve)... this may mean that we leave - * stuff there... the danger in doing anything with usrpath(preserve) + * _PATH_PRESERVE... this may mean that we leave + * stuff there... the danger in doing anything with _PATH_PRESERVE * is that the clock may be screwed up and we may get confused. * * We are called in two ways - first from the editor with no argumentss @@ -110,14 +108,14 @@ main(argc) * ... else preserve all the stuff in /tmp, removing * it as we go. */ - if (chdir(TMP) < 0) { - perror(TMP); + if (chdir(_PATH_TMP) < 0) { + perror(_PATH_TMP); exit(1); } tf = opendir("."); if (tf == NULL) { - perror(TMP); + perror(_PATH_TMP); exit(1); } while ((dirent = readdir(tf)) != NULL) { @@ -137,10 +135,10 @@ main(argc) exit(0); } -char pattern[] = usrpath(preserve/Exaa`XXXXX); +char pattern[MAXPATHLEN]; /* - * Copy file name into usrpath(preserve)/... + * Copy file name into pattern[]. * If name is (char *) 0, then do the standard input. * We make some checks on the input to make sure it is * really an editor temporary, generate a name for the @@ -154,6 +152,7 @@ copyout(name) static int reenter; char buf[BUFSIZ]; + (void)sprintf(pattern, "%s/Exaa`XXXXX", _PATH_PRESERVE); /* * The first time we put in the digits of our * process number at the end of the pattern. @@ -331,7 +330,7 @@ notify(uid, fname, flag, time) gethostname(hostname, sizeof(hostname)); timestamp = ctime(&time); timestamp[16] = 0; /* blast from seconds on */ - sprintf(cmd, "/bin/mail %s", pp->pw_name); + sprintf(cmd, "%s %s", _PATH_BINMAIL, pp->pw_name); setuid(getuid()); mf = popen(cmd, "w"); if (mf == NULL) diff --git a/usr/src/usr.bin/ex/ex3.7recover/ex3.7recover.c b/usr/src/usr.bin/ex/ex3.7recover/ex3.7recover.c index 257fd4e50b..5437dd456f 100644 --- a/usr/src/usr.bin/ex/ex3.7recover/ex3.7recover.c +++ b/usr/src/usr.bin/ex/ex3.7recover/ex3.7recover.c @@ -11,7 +11,7 @@ char *copyright = #endif not lint #ifndef lint -static char *sccsid = "@(#)ex3.7recover.c 7.9 (Berkeley) %G%"; +static char *sccsid = "@(#)ex3.7recover.c 7.10 (Berkeley) %G%"; #endif not lint #include /* mjm: BUFSIZ: stdio = 512, VMUNIX = 1024 */ @@ -23,7 +23,6 @@ static char *sccsid = "@(#)ex3.7recover.c 7.9 (Berkeley) %G%"; #include "ex_temp.h" #include "ex_tty.h" #include -#include "uparm.h" char xstr[1]; /* make loader happy */ short tfile = -1; /* ditto */ @@ -31,7 +30,7 @@ short tfile = -1; /* ditto */ /* * * This program searches through the specified directory and then - * the directory usrpath(preserve) looking for an instance of the specified + * the directory _PATH_USRPRESERVE looking for an instance of the specified * file from a crashed editor or a crashed system. * If this file is found, it is unscrambled and written to * the standard output. @@ -50,12 +49,6 @@ short tfile = -1; /* ditto */ #define ignorl(a) a #endif -/* - * This directory definition also appears (obviously) in expreserve.c. - * Change both if you change either. - */ -char mydir[] = usrpath(preserve); - /* * Limit on the number of printed entries * when an, e.g. ``ex -r'' command is given. @@ -86,7 +79,7 @@ main(argc, argv) * If given only a -r argument, then list the saved files. */ if (argc == 2 && eq(argv[1], "-r")) { - listfiles(mydir); + listfiles(_PATH_PRESERVE); exit(0); } if (argc != 3) @@ -224,7 +217,7 @@ listfiles(dirname) struct svfile *fp, svbuf[NENTRY]; /* - * Open usrpath(preserve), and go there to make things quick. + * Open _PATH_PRESERVE, and go there to make things quick. */ dir = opendir(dirname); if (dir == NULL) { @@ -237,7 +230,7 @@ listfiles(dirname) } /* - * Look at the candidate files in usrpath(preserve). + * Look at the candidate files in _PATH_PRESERVE. */ fp = &svbuf[0]; ecount = 0; @@ -375,7 +368,7 @@ int bestfd; /* Keep best file open so it dont vanish */ /* * Look for a file, both in the users directory option value - * (i.e. usually /tmp) and in usrpath(preserve). + * (i.e. usually /tmp) and in _PATH_PRESERVE. * Want to find the newest so we search on and on. */ findtmp(dir) @@ -389,12 +382,12 @@ findtmp(dir) bestfd = -1; /* - * Search usrpath(preserve) and, if we can get there, /tmp + * Search _PATH_PRESERVE and, if we can get there, /tmp * (actually the users "directory" option). */ searchdir(dir); - if (chdir(mydir) == 0) - searchdir(mydir); + if (chdir(_PATH_PRESERVE) == 0) + searchdir(_PATH_PRESERVE); if (bestfd != -1) { /* * Gotcha. @@ -426,7 +419,7 @@ findtmp(dir) * Don't chdir here, because the users directory * may be ".", and we would move away before we searched it. * Note that we actually chdir elsewhere (because it is too slow - * to look around in usrpath(preserve) without chdir'ing there) so we + * to look around in _PATH_PRESERVE without chdir'ing there) so we * can't win, because we don't know the name of '.' and if the path * name of the file we want to unlink is relative, rather than absolute * we won't be able to find it again. diff --git a/usr/src/usr.bin/ex/ex_subr.c b/usr/src/usr.bin/ex/ex_subr.c index d5138628e8..4fc52dd0ee 100644 --- a/usr/src/usr.bin/ex/ex_subr.c +++ b/usr/src/usr.bin/ex/ex_subr.c @@ -5,13 +5,14 @@ */ #ifndef lint -static char *sccsid = "@(#)ex_subr.c 7.11 (Berkeley) %G%"; +static char *sccsid = "@(#)ex_subr.c 7.12 (Berkeley) %G%"; #endif not lint #include "ex.h" #include "ex_re.h" #include "ex_tty.h" #include "ex_vis.h" +#include "pathnames.h" /* * Random routines, in alphabetical order. @@ -898,7 +899,7 @@ preserve() if (pid == 0) { close(0); dup(tfile); - execl(EXPRESERVE, "expreserve", (char *) 0); + execl(_PATH_EXPRESERVE, "expreserve", (char *) 0); ex_exit(1); } waitfor(); diff --git a/usr/src/usr.bin/ex/ex_temp.c b/usr/src/usr.bin/ex/ex_temp.c index e00295c2ad..2195e06b23 100644 --- a/usr/src/usr.bin/ex/ex_temp.c +++ b/usr/src/usr.bin/ex/ex_temp.c @@ -5,13 +5,14 @@ */ #ifndef lint -static char *sccsid = "@(#)ex_temp.c 7.6.1.1 (Berkeley) %G%"; +static char *sccsid = "@(#)ex_temp.c 7.7 (Berkeley) %G%"; #endif not lint #include "ex.h" #include "ex_temp.h" #include "ex_vis.h" #include "ex_tty.h" +#include "pathnames.h" /* * Editor temporary file routines. diff --git a/usr/src/usr.bin/ex/ex_tune.h b/usr/src/usr.bin/ex/ex_tune.h index d52937b497..dbdde63eb7 100644 --- a/usr/src/usr.bin/ex/ex_tune.h +++ b/usr/src/usr.bin/ex/ex_tune.h @@ -3,36 +3,14 @@ * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)ex_tune.h 7.11 (Berkeley) %G% + * @(#)ex_tune.h 7.12 (Berkeley) %G% */ -/* - * Definitions of editor parameters and limits - */ +#include "pathnames.h" /* - * Pathnames. - * - * Only exstrings is looked at "+4", i.e. if you give - * "/usr/lib/..." here, "/lib" will be tried only for strings. + * Definitions of editor parameters and limits */ -#define libpath(file) "/usr/lib/file" -#define loclibpath(file) "/usr/local/lib/file" -#define binpath(file) "/usr/ucb/file" -#define usrpath(file) "/usr/file" -#ifndef vms -#define E_TERMCAP "/etc/termcap" -#else -#define E_TERMCAP "etc:termcap." -#endif -#define B_CSH "/bin/csh" -#define EXRECOVER libpath(ex3.7recover) -#define EXPRESERVE libpath(ex3.7preserve) -#ifndef VMUNIX -#ifndef vms -#define EXSTRINGS libpath(ex3.7strings) -#endif -#endif /* * If your system believes that tabs expand to a width other than diff --git a/usr/src/usr.bin/expand/Makefile b/usr/src/usr.bin/expand/Makefile index 0a3e589f4d..96657f1ff5 100644 --- a/usr/src/usr.bin/expand/Makefile +++ b/usr/src/usr.bin/expand/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.2 (Berkeley) %G% +# @(#)Makefile 5.3 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 expand unexpand ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 expand unexpand ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 rm -f ${DESTDIR}/usr/man/cat1/unexpand.0 ln ${DESTDIR}/usr/man/cat1/expand.0 ${DESTDIR}/usr/man/cat1/unexpand.0 diff --git a/usr/src/usr.bin/fold/Makefile b/usr/src/usr.bin/fold/Makefile index 9d6110c4b6..23ebc0cac8 100644 --- a/usr/src/usr.bin/fold/Makefile +++ b/usr/src/usr.bin/fold/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 fold ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 fold ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/from/Makefile b/usr/src/usr.bin/from/Makefile index d00c4c505f..4dee3b173c 100644 --- a/usr/src/usr.bin/from/Makefile +++ b/usr/src/usr.bin/from/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 from ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 from ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/fstat/Makefile b/usr/src/usr.bin/fstat/Makefile index ebb1258d8b..cb4d11cde6 100644 --- a/usr/src/usr.bin/fstat/Makefile +++ b/usr/src/usr.bin/fstat/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g kmem -m 2755 fstat ${DESTDIR}/etc/fstat + install -s -o bin -g kmem -m 2755 fstat ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/fstat/fstat.c b/usr/src/usr.bin/fstat/fstat.c index 44c48b731a..fa689894a3 100644 --- a/usr/src/usr.bin/fstat/fstat.c +++ b/usr/src/usr.bin/fstat/fstat.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)fstat.c 5.17 (Berkeley) %G%"; +static char sccsid[] = "@(#)fstat.c 5.18 (Berkeley) %G%"; #endif /* not lint */ /* @@ -54,7 +54,7 @@ static char sccsid[] = "@(#)fstat.c 5.17 (Berkeley) %G%"; #include #include #include -#include "pathnames.h" +#include #ifdef ULTRIX /* UFS -> GFS */ @@ -215,7 +215,7 @@ getu() if (read(swap, (char *)&user.user, sizeof(struct user)) != sizeof(struct user)) { VP("fstat: can't read u for pid %d from %s\n", - mproc->p_pid, _PATH_SWAP); + mproc->p_pid, _PATH_DRUM); return(0); } return(1); @@ -224,7 +224,7 @@ getu() (void)lseek(kmem, (off_t)pteaddr, L_SET); if (read(kmem, (char *)&apte, sizeof(apte)) != sizeof(apte)) { VP("fstat: can't read indir pte to get u for pid %d from %s\n", - mproc->p_pid, _PATH_SWAP); + mproc->p_pid, _PATH_DRUM); return(0); } (void)lseek(mem, (off_t)ctob(apte.pg_pfnum+1) - (UPAGES+CLSIZE) @@ -602,9 +602,9 @@ openfiles() strerror(errno), _PATH_MEM); exit(1); } - if ((swap = open(_PATH_SWAP, O_RDONLY, 0)) < 0) { + if ((swap = open(_PATH_DRUM, O_RDONLY, 0)) < 0) { (void)fprintf(stderr, "fstat: %s: %s\n", - strerror(errno), _PATH_SWAP); + strerror(errno), _PATH_DRUM); exit(1); } } diff --git a/usr/src/usr.bin/graph/Makefile b/usr/src/usr.bin/graph/Makefile index 503552db3c..658d315f73 100644 --- a/usr/src/usr.bin/graph/Makefile +++ b/usr/src/usr.bin/graph/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 4.4 (Berkeley) %G% +# @(#)Makefile 4.5 (Berkeley) %G% # CFLAGS= -O LIBC= /lib/libc.a @@ -37,7 +37,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 graph ${DESTDIR}/usr/bin/graph + install -s -o bin -g bin -m 755 graph ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/leave/Makefile b/usr/src/usr.bin/leave/Makefile index 2bffe6fecc..525640a6cd 100644 --- a/usr/src/usr.bin/leave/Makefile +++ b/usr/src/usr.bin/leave/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 leave ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 leave ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/lock/Makefile b/usr/src/usr.bin/lock/Makefile index 776f17ad3a..dff8031749 100644 --- a/usr/src/usr.bin/lock/Makefile +++ b/usr/src/usr.bin/lock/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.2 (Berkeley) %G% +# @(#)Makefile 5.3 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o root -g bin -m 4755 lock ${DESTDIR}/usr/ucb + install -s -o root -g bin -m 4755 lock ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/logger/Makefile b/usr/src/usr.bin/logger/Makefile index 8fcbe5e8b3..5592039004 100644 --- a/usr/src/usr.bin/logger/Makefile +++ b/usr/src/usr.bin/logger/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 logger ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 logger ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/look/look.c b/usr/src/usr.bin/look/look.c index 3cb6d757c9..e24eb82d6d 100644 --- a/usr/src/usr.bin/look/look.c +++ b/usr/src/usr.bin/look/look.c @@ -11,7 +11,7 @@ char copyright[] = #endif not lint #ifndef lint -static char sccsid[] = "@(#)look.c 4.6 (Berkeley) %G%"; +static char sccsid[] = "@(#)look.c 4.7 (Berkeley) %G%"; #endif not lint #include @@ -19,6 +19,7 @@ static char sccsid[] = "@(#)look.c 4.6 (Berkeley) %G%"; #include #include #include +#include "pathnames.h" #define EOS '\0' #define MAXLINELEN 250 @@ -32,7 +33,7 @@ main(argc, argv) { extern char *optarg; extern int optind; - static char *filename = "/usr/share/dict/words"; + static char *filename = _PATH_WORDS; register off_t bot, mid, top; register int c; struct stat sb; diff --git a/usr/src/usr.bin/mail/Makefile b/usr/src/usr.bin/mail/Makefile index c0a22f972c..69c0a5c207 100644 --- a/usr/src/usr.bin/mail/Makefile +++ b/usr/src/usr.bin/mail/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.12 (Berkeley) %G% +# @(#)Makefile 5.13 (Berkeley) %G% # CFLAGS= -O -R -DUSE_OLD_TTY LIBC= /lib/libc.a @@ -26,6 +26,7 @@ OBJS= version.o aux.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o edit.o fio.o \ quit.o send.o strings.o temp.o tty.o vars.o flsbuf.o FSRCS= fmt.c head.c FOBJS= fmt.o head.o +FILES= Mail.help Mail.rc Mail.tildehelp MAN= mail.0 fmt.0 all: mail fmt @@ -46,13 +47,13 @@ depend: mkdep fmt.c ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 mail ${DESTDIR}/usr/ucb/mail - install -s -o bin -g bin -m 755 fmt ${DESTDIR}/usr/ucb/fmt - install -c -o bin -g bin -m 444 misc/Mail.* ${DESTDIR}/usr/lib - rm -f ${DESTDIR}/usr/ucb/Mail - ln ${DESTDIR}/usr/ucb/mail ${DESTDIR}/usr/ucb/Mail - install -c -o bin -g bin -m 444 mail.0 ${DESTDIR}/usr/man/cat1/mail.0 - install -c -o bin -g bin -m 444 fmt.0 ${DESTDIR}/usr/man/cat1/fmt.0 + install -s -o bin -g bin -m 755 mail ${DESTDIR}/usr/bin + install -s -o bin -g bin -m 755 fmt ${DESTDIR}/usr/bin + cd misc; install -c -o bin -g bin -m 444 ${FILES} \ + ${DESTDIR}/usr/share/misc + rm -f ${DESTDIR}/usr/bin/Mail + ln ${DESTDIR}/usr/bin/mail ${DESTDIR}/usr/bin/Mail + install -c -o bin -g bin -m 444 mail.0 fmt.0 ${DESTDIR}/usr/man/cat1 rm -f ${DESTDIR}/usr/man/cat1/Mail.0 ln ${DESTDIR}/usr/man/cat1/mail.0 ${DESTDIR}/usr/man/cat1/Mail.0 @@ -64,4 +65,3 @@ tags: ctags ${SRCS} ctags -a fmt.c sort -o tags tags - diff --git a/usr/src/usr.bin/mail/cmd1.c b/usr/src/usr.bin/mail/cmd1.c index d8379633e7..7f1af26717 100644 --- a/usr/src/usr.bin/mail/cmd1.c +++ b/usr/src/usr.bin/mail/cmd1.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)cmd1.c 5.18 (Berkeley) %G%"; +static char sccsid[] = "@(#)cmd1.c 5.19 (Berkeley) %G%"; #endif /* not lint */ #include "rcv.h" @@ -291,7 +291,7 @@ type1(msgvec, doign, page) if (page || nlines > (*cp ? atoi(cp) : realscreenheight)) { cp = value("PAGER"); if (cp == NULL || *cp == '\0') - cp = MORE; + cp = _PATH_MORE; obuf = Popen(cp, "w"); if (obuf == NULL) { perror(cp); diff --git a/usr/src/usr.bin/mail/cmd3.c b/usr/src/usr.bin/mail/cmd3.c index 1d291b02a6..45bd823215 100644 --- a/usr/src/usr.bin/mail/cmd3.c +++ b/usr/src/usr.bin/mail/cmd3.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)cmd3.c 5.20 (Berkeley) %G%"; +static char sccsid[] = "@(#)cmd3.c 5.21 (Berkeley) %G%"; #endif /* not lint */ #include "rcv.h" @@ -42,7 +42,7 @@ shell(str) if (bangexp(cmd) < 0) return 1; if ((shell = value("SHELL")) == NOSTR) - shell = SHELL; + shell = _PATH_CSHELL; (void) run_command(shell, 0, -1, -1, "-c", cmd, NOSTR); (void) signal(SIGINT, sigint); printf("!\n"); @@ -60,7 +60,7 @@ dosh(str) char *shell; if ((shell = value("SHELL")) == NOSTR) - shell = SHELL; + shell = _PATH_CSHELL; (void) run_command(shell, 0, -1, -1, NOSTR); (void) signal(SIGINT, sigint); putchar('\n'); @@ -130,8 +130,8 @@ help() register c; register FILE *f; - if ((f = fopen(HELPFILE, "r")) == NULL) { - perror(HELPFILE); + if ((f = fopen(_PATH_HELP, "r")) == NULL) { + perror(_PATH_HELP); return(1); } while ((c = getc(f)) != EOF) diff --git a/usr/src/usr.bin/mail/collect.c b/usr/src/usr.bin/mail/collect.c index 2e6da169b5..589e8fed05 100644 --- a/usr/src/usr.bin/mail/collect.c +++ b/usr/src/usr.bin/mail/collect.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)collect.c 5.17 (Berkeley) %G%"; +static char sccsid[] = "@(#)collect.c 5.18 (Berkeley) %G%"; #endif /* not lint */ /* @@ -306,8 +306,8 @@ cont: goto err; goto cont; case '?': - if ((fbuf = fopen(THELPFILE, "r")) == NULL) { - perror(THELPFILE); + if ((fbuf = fopen(_PATH_TILDE, "r")) == NULL) { + perror(_PATH_TILDE); break; } while ((t = getc(fbuf)) != EOF) diff --git a/usr/src/usr.bin/mail/def.h b/usr/src/usr.bin/mail/def.h index 65f62520ef..4adf88f5ca 100644 --- a/usr/src/usr.bin/mail/def.h +++ b/usr/src/usr.bin/mail/def.h @@ -14,7 +14,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)def.h 5.18 (Berkeley) %G% + * @(#)def.h 5.19 (Berkeley) %G% */ #include /* includes */ @@ -23,7 +23,7 @@ #include #include #include -#include "local.h" +#include "pathnames.h" /* * Mail -- a mail program @@ -31,6 +31,7 @@ * Author: Kurt Shoens (UCB) March 25, 1978 */ +#define APPEND /* New mail goes to end of mailbox */ #define ESCAPE '~' /* Default escape for sending */ #define NMLSIZE 1024 /* max names in a message list */ diff --git a/usr/src/usr.bin/mail/edit.c b/usr/src/usr.bin/mail/edit.c index ad076dad09..481cfcfd1c 100644 --- a/usr/src/usr.bin/mail/edit.c +++ b/usr/src/usr.bin/mail/edit.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)edit.c 5.11 (Berkeley) %G%"; +static char sccsid[] = "@(#)edit.c 5.12 (Berkeley) %G%"; #endif /* not lint */ #include "rcv.h" @@ -117,7 +117,7 @@ edit1(msgvec, type) * Run an editor on the file at "fpp" of "size" bytes, * and return a new file pointer. * Signals must be handled by the caller. - * "Type" is 'e' for EDITOR, 'v' for VISUAL. + * "Type" is 'e' for _PATH_EX, 'v' for _PATH_VI. */ FILE * run_editor(fp, size, type, readonly) @@ -160,7 +160,7 @@ run_editor(fp, size, type, readonly) } nf = NULL; if ((edit = value(type == 'e' ? "EDITOR" : "VISUAL")) == NOSTR) - edit = type == 'e' ? EDITOR : VISUAL; + edit = type == 'e' ? _PATH_EX : _PATH_VI; if (run_command(edit, 0, -1, -1, tempEdit, NOSTR) < 0) { (void) unlink(tempEdit); goto out; diff --git a/usr/src/usr.bin/mail/fio.c b/usr/src/usr.bin/mail/fio.c index 8f428ef701..b23514385b 100644 --- a/usr/src/usr.bin/mail/fio.c +++ b/usr/src/usr.bin/mail/fio.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)fio.c 5.20 (Berkeley) %G%"; +static char sccsid[] = "@(#)fio.c 5.21 (Berkeley) %G%"; #endif /* not lint */ #include "rcv.h" @@ -343,7 +343,7 @@ expand(name) } sprintf(cmdbuf, "echo %s", name); if ((shell = value("SHELL")) == NOSTR) - shell = SHELL; + shell = _PATH_CSHELL; pid = start_command(shell, 0, -1, pivec[1], "-c", cmdbuf, NOSTR); if (pid < 0) { close(pivec[0]); diff --git a/usr/src/usr.bin/mail/main.c b/usr/src/usr.bin/mail/main.c index af7b4e2fcf..d9ad0c6b5a 100644 --- a/usr/src/usr.bin/mail/main.c +++ b/usr/src/usr.bin/mail/main.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)main.c 5.22 (Berkeley) %G%"; +static char sccsid[] = "@(#)main.c 5.23 (Berkeley) %G%"; #endif /* not lint */ #include "rcv.h" @@ -190,7 +190,7 @@ Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...\n\ rcvmode = !to; spreserve(); if (!nosrc) - load(MASTER); + load(_PATH_MASTER_RC); /* * Expand returns a savestr, but load only uses the file name * for fopen, so it's save to do this. diff --git a/usr/src/usr.bin/mail/names.c b/usr/src/usr.bin/mail/names.c index 8959979b13..037884adcc 100644 --- a/usr/src/usr.bin/mail/names.c +++ b/usr/src/usr.bin/mail/names.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)names.c 5.13 (Berkeley) %G%"; +static char sccsid[] = "@(#)names.c 5.14 (Berkeley) %G%"; #endif /* not lint */ /* @@ -263,7 +263,7 @@ outof(names, fo, hp) /* XXX, can't really reuse the same image file */ if ((shell = value("SHELL")) == NOSTR) - shell = SHELL; + shell = _PATH_CSHELL; pid = start_command(shell, sigmask(SIGHUP)| sigmask(SIGINT)|sigmask(SIGQUIT), image, -1, "-c", fname, NOSTR); diff --git a/usr/src/usr.bin/mail/pathnames.h b/usr/src/usr.bin/mail/pathnames.h index 63e5dbf3c9..861e7e62fe 100644 --- a/usr/src/usr.bin/mail/pathnames.h +++ b/usr/src/usr.bin/mail/pathnames.h @@ -12,28 +12,18 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)pathnames.h 5.6 (Berkeley) %G% + * @(#)pathnames.h 5.7 (Berkeley) %G% */ -/* - * Declarations and constants specific to an installation. - * - * Vax/Unix version 7. - */ +#include -#define SENDMAIL "/usr/lib/sendmail" - /* Name of classy mail deliverer */ -#define EDITOR "/usr/ucb/ex" /* Name of text editor */ -#define VISUAL "/usr/ucb/vi" /* Name of display editor */ -#define SHELL "/bin/csh" /* Standard shell */ -#define MORE "/usr/ucb/more" /* Standard output pager */ -#define HELPFILE "/usr/lib/Mail.help" - /* Name of casual help file */ -#define THELPFILE "/usr/lib/Mail.tildehelp" - /* Name of casual tilde help */ -#define POSTAGE "/usr/adm/maillog" - /* Where to audit mail sending */ -#define MASTER "/usr/lib/Mail.rc" -#define APPEND /* New mail goes to end of mailbox */ +#define _PATH_EX "/usr/bin/ex" +#define _PATH_HELP "/usr/share/misc/Mail.help" +#define _PATH_TILDE "/usr/share/misc/Mail.tildehelp" +#define _PATH_MAIL_LOG "/usr/adm/maillog" +#define _PATH_MASTER_RC "/usr/share/misc/Mail.rc" +#define _PATH_MBOX "/var/spool/mail/" +#define _PATH_MORE "/usr/bin/more" +#define _PATH_SENDMAIL "/usr/libexec/sendmail" diff --git a/usr/src/usr.bin/mail/quit.c b/usr/src/usr.bin/mail/quit.c index a4b1ee26bc..382a53f196 100644 --- a/usr/src/usr.bin/mail/quit.c +++ b/usr/src/usr.bin/mail/quit.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)quit.c 5.11 (Berkeley) %G%"; +static char sccsid[] = "@(#)quit.c 5.12 (Berkeley) %G%"; #endif /* not lint */ #include "rcv.h" @@ -399,7 +399,8 @@ edstop() goto done; ibuf = NULL; if (stat(mailname, &statb) >= 0 && statb.st_size > mailsize) { - strcpy(tempname, "/tmp/mboxXXXXXX"); + strcpy(tempname, _PATH_TMP); + strcat(tempname, "/mboxXXXXXX"); mktemp(tempname); if ((obuf = fopen(tempname, "w")) == NULL) { perror(tempname); diff --git a/usr/src/usr.bin/mail/send.c b/usr/src/usr.bin/mail/send.c index 28b0c666fe..c59e193e29 100644 --- a/usr/src/usr.bin/mail/send.c +++ b/usr/src/usr.bin/mail/send.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)send.c 5.17 (Berkeley) %G%"; +static char sccsid[] = "@(#)send.c 5.18 (Berkeley) %G%"; #endif /* not lint */ #include "rcv.h" @@ -320,10 +320,10 @@ mail1(hp, printheaders) goto out; } if (pid == 0) { - if (access(POSTAGE, 0) == 0) { + if (access(_PATH_MAIL_LOG, 0) == 0) { FILE *postage; - if ((postage = fopen(POSTAGE, "a")) != NULL) { + if ((postage = fopen(_PATH_MAIL_LOG, "a")) != NULL) { fprintf(postage, "%s %d %ld\n", myname, count(to), fsize(mtf)); (void) fclose(postage); @@ -335,7 +335,7 @@ mail1(hp, printheaders) if ((cp = value("sendmail")) != NOSTR) cp = expand(cp); else - cp = SENDMAIL; + cp = _PATH_SENDMAIL; execv(cp, namelist); perror(cp); _exit(1); diff --git a/usr/src/usr.bin/mail/temp.c b/usr/src/usr.bin/mail/temp.c index ce9a9e6153..a5c7e90e8b 100644 --- a/usr/src/usr.bin/mail/temp.c +++ b/usr/src/usr.bin/mail/temp.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)temp.c 5.11 (Berkeley) %G%"; +static char sccsid[] = "@(#)temp.c 5.12 (Berkeley) %G%"; #endif /* not lint */ #include "rcv.h" @@ -27,23 +27,29 @@ static char sccsid[] = "@(#)temp.c 5.11 (Berkeley) %G%"; * Give names to all the temporary files that we will need. */ -char tempMail[14]; -char tempQuit[14]; -char tempEdit[14]; -char tempSet[14]; -char tempResid[14]; -char tempMesg[14]; +char tempMail[24]; +char tempQuit[24]; +char tempEdit[24]; +char tempSet[24]; +char tempResid[24]; +char tempMesg[24]; tinit() { register char *cp; - mktemp(strcpy(tempMail, "/tmp/RsXXXXXX")); - mktemp(strcpy(tempResid, "/tmp/RqXXXXXX")); - mktemp(strcpy(tempQuit, "/tmp/RmXXXXXX")); - mktemp(strcpy(tempEdit, "/tmp/ReXXXXXX")); - mktemp(strcpy(tempSet, "/tmp/RxXXXXXX")); - mktemp(strcpy(tempMesg, "/tmp/RxXXXXXX")); + strcpy(tempMail, _PATH_TMP); + mktemp(strcat(tempMail, "/RsXXXXXX")); + strcpy(tempResid, _PATH_TMP); + mktemp(strcat(tempResid, "/RqXXXXXX")); + strcpy(tempQuit, _PATH_TMP); + mktemp(strcat(tempQuit, "/RmXXXXXX")); + strcpy(tempEdit, _PATH_TMP); + mktemp(strcat(tempEdit, "/ReXXXXXX")); + strcpy(tempSet, _PATH_TMP); + mktemp(strcat(tempSet, "/RxXXXXXX")); + strcpy(tempMesg, _PATH_TMP); + mktemp(strcat(tempMesg, "/RxXXXXXX")); /* * It's okay to call savestr in here because main will diff --git a/usr/src/usr.bin/mail/v7.local.c b/usr/src/usr.bin/mail/v7.local.c index 5153b5d1fa..a69c067688 100644 --- a/usr/src/usr.bin/mail/v7.local.c +++ b/usr/src/usr.bin/mail/v7.local.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)v7.local.c 5.7 (Berkeley) %G%"; +static char sccsid[] = "@(#)v7.local.c 5.8 (Berkeley) %G%"; #endif /* not lint */ /* @@ -38,7 +38,7 @@ findmail(user, buf) char *buf; { - strcpy(copy("/usr/spool/mail/", buf), user); + strcpy(copy(_PATH_MBOX, buf), user); } /* diff --git a/usr/src/usr.bin/netstat/Makefile b/usr/src/usr.bin/netstat/Makefile index 88f1325be5..d89464679b 100644 --- a/usr/src/usr.bin/netstat/Makefile +++ b/usr/src/usr.bin/netstat/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.10 (Berkeley) %G% +# @(#)Makefile 5.11 (Berkeley) %G% # CFLAGS= -O LIBC= /lib/libc.a @@ -36,7 +36,7 @@ depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g kmem -m 2755 netstat ${DESTDIR}/usr/ucb/netstat + install -s -o bin -g kmem -m 2755 netstat ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 netstat.0 ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/ptx/Makefile b/usr/src/usr.bin/ptx/Makefile index 820995c452..400b8a3141 100644 --- a/usr/src/usr.bin/ptx/Makefile +++ b/usr/src/usr.bin/ptx/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -40,6 +40,7 @@ depend: ${SRCS} install: ${MAN} install -s -o bin -g bin -m 755 ptx ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 + install -c -o bin -g bin -m 444 eign ${DESTDIR}/usr/share/dict lint: ${SRCS} lint ${CFLAGS} ${SRCS} diff --git a/usr/src/usr.bin/ptx/ptx.c b/usr/src/usr.bin/ptx/ptx.c index dbce655129..6e09d03c8b 100644 --- a/usr/src/usr.bin/ptx/ptx.c +++ b/usr/src/usr.bin/ptx/ptx.c @@ -1,5 +1,5 @@ #ifndef lint -static char *sccsid = "@(#)ptx.c 4.4 (Berkeley) %G%"; +static char *sccsid = "@(#)ptx.c 4.5 (Berkeley) %G%"; #endif /* not lint */ /* permuted title index @@ -7,7 +7,7 @@ static char *sccsid = "@(#)ptx.c 4.4 (Berkeley) %G%"; Ptx reads the input file and permutes on words in it. It excludes all words in the ignore file. Alternately it includes words in the only file. - if neither is given it excludes the words in /usr/lib/eign. + if neither is given it excludes the words in _PATH_EIGN. The width of the output line can be changed to num characters. If omitted 72 is default unless troff than 100. @@ -20,9 +20,9 @@ static char *sccsid = "@(#)ptx.c 4.4 (Berkeley) %G%"; #include #include #include -#define DEFLTX "/usr/lib/eign" +#include "pathnames.h" + #define TILDE 0177 -#define SORT "/usr/bin/sort" #define N 30 #define MAX N*BUFSIZ #define LMAX 200 @@ -58,7 +58,7 @@ FILE *inptr = stdin; char *outfile; FILE *outptr = stdout; -char sortfile[] = "/tmp/ptxsXXXXX"; /* output of sort program */ +char sortfile[] = _PATH_TMP; /* output of sort program */ char nofold[] = {'-', 'd', 't', TILDE, 0}; char fold[] = {'-', 'd', 'f', 't', TILDE, 0}; char *sortopt = nofold; @@ -89,7 +89,7 @@ char **argv; /* argument decoding */ - xfile = DEFLTX; + xfile = _PATH_EIGN; argv++; while(argc>1 && **argv == '-') { switch (*++*argv){ @@ -236,7 +236,7 @@ char **argv; diag("Cannot fork",empty); case 0: /* child */ - execl(SORT, SORT, sortopt, "+0", "-1", "+1", + execl(_PATH_SORT, "sort", sortopt, "+0", "-1", "+1", sortfile, "-o", sortfile, 0); default: /* parent */ diff --git a/usr/src/usr.bin/quota/Makefile b/usr/src/usr.bin/quota/Makefile index 7122b735af..10a8668d16 100644 --- a/usr/src/usr.bin/quota/Makefile +++ b/usr/src/usr.bin/quota/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o root -g bin -m 4755 quota ${DESTDIR}/usr/ucb + install -s -o root -g bin -m 4755 quota ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/rdist/Makefile b/usr/src/usr.bin/rdist/Makefile index f40326cdd7..41be56de07 100644 --- a/usr/src/usr.bin/rdist/Makefile +++ b/usr/src/usr.bin/rdist/Makefile @@ -14,10 +14,10 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.7 (Berkeley) %G% +# @(#)Makefile 5.8 (Berkeley) %G% # LIBC= /lib/libc.a -RDIST= /usr/ucb/rdist +RDIST= /usr/bin/rdist CFLAGS= -g SRCS= docmd.c expand.c gram.y lookup.c main.c server.c OBJS= docmd.o expand.o gram.o lookup.o main.o server.o diff --git a/usr/src/usr.bin/rdist/main.c b/usr/src/usr.bin/rdist/main.c index 88b5c5fd2b..c707890c84 100644 --- a/usr/src/usr.bin/rdist/main.c +++ b/usr/src/usr.bin/rdist/main.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)main.c 5.3 (Berkeley) %G%"; +static char sccsid[] = "@(#)main.c 5.4 (Berkeley) %G%"; #endif /* not lint */ #include "defs.h" @@ -34,7 +34,7 @@ static char sccsid[] = "@(#)main.c 5.3 (Berkeley) %G%"; */ char *distfile = NULL; -char tmpfile[] = "/tmp/rdistXXXXXX"; +char tmpfile[] = _PATH_TMP; char *tmpname = &tmpfile[5]; int debug; /* debugging flag */ diff --git a/usr/src/usr.bin/renice/Makefile b/usr/src/usr.bin/renice/Makefile index f9a6915815..ea524a4db0 100644 --- a/usr/src/usr.bin/renice/Makefile +++ b/usr/src/usr.bin/renice/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 renice ${DESTDIR}/etc + install -s -o bin -g bin -m 755 renice ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8 lint: ${SRCS} diff --git a/usr/src/usr.bin/rlogin/Makefile b/usr/src/usr.bin/rlogin/Makefile index 3ad49b8d45..217d1a1538 100644 --- a/usr/src/usr.bin/rlogin/Makefile +++ b/usr/src/usr.bin/rlogin/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o root -g bin -m 4755 rlogin ${DESTDIR}/usr/ucb/rlogin + install -s -o root -g bin -m 4755 rlogin ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 rlogin.0 ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/ruptime/Makefile b/usr/src/usr.bin/ruptime/Makefile index 44400595cc..bdcf436efc 100644 --- a/usr/src/usr.bin/ruptime/Makefile +++ b/usr/src/usr.bin/ruptime/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 ruptime ${DESTDIR}/usr/ucb/ruptime + install -s -o bin -g bin -m 755 ruptime ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ruptime.0 ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/ruptime/ruptime.c b/usr/src/usr.bin/ruptime/ruptime.c index 9c13e12726..e97b877782 100644 --- a/usr/src/usr.bin/ruptime/ruptime.c +++ b/usr/src/usr.bin/ruptime/ruptime.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)ruptime.c 5.5 (Berkeley) %G%"; +static char sccsid[] = "@(#)ruptime.c 5.6 (Berkeley) %G%"; #endif /* not lint */ #include @@ -40,7 +40,6 @@ struct hs { struct whod awhod; #define WHDRSIZE (sizeof (awhod) - sizeof (awhod.wd_we)) -#define RWHODIR "/usr/spool/rwho" #define down(h) (now - (h)->hs_wd->wd_recvtime > 11 * 60) time_t now; @@ -88,8 +87,8 @@ main(argc, argv) exit(1); } - if (chdir(RWHODIR) || (dirp = opendir(".")) == NULL) { - perror(RWHODIR); + if (chdir(_PATH_RWHODIR) || (dirp = opendir(".")) == NULL) { + perror(_PATH_RWHODIR); exit(1); } while (dp = readdir(dirp)) { diff --git a/usr/src/usr.bin/rwho/Makefile b/usr/src/usr.bin/rwho/Makefile index a864c01a7a..3b650e4f62 100644 --- a/usr/src/usr.bin/rwho/Makefile +++ b/usr/src/usr.bin/rwho/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 rwho ${DESTDIR}/etc/rwho + install -s -o bin -g bin -m 755 rwho ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 rwho.0 ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/rwho/rwho.c b/usr/src/usr.bin/rwho/rwho.c index c23bab5dc6..a467aa90a1 100644 --- a/usr/src/usr.bin/rwho/rwho.c +++ b/usr/src/usr.bin/rwho/rwho.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)rwho.c 5.3 (Berkeley) %G%"; +static char sccsid[] = "@(#)rwho.c 5.4 (Berkeley) %G%"; #endif /* not lint */ #include @@ -44,7 +44,6 @@ struct myutmp { int nusers; #define WHDRSIZE (sizeof (wd) - sizeof (wd.wd_we)) -#define RWHODIR "/usr/spool/rwho" /* * this macro should be shared with ruptime. */ @@ -79,8 +78,8 @@ main(argc, argv) fprintf(stderr, "usage: rwho [-a]\n"); exit(1); } - if (chdir(RWHODIR) || (dirp = opendir(".")) == NULL) { - perror(RWHODIR); + if (chdir(_PATH_RWHODIR) || (dirp = opendir(".")) == NULL) { + perror(_PATH_RWHODIR); exit(1); } mp = myutmp; diff --git a/usr/src/usr.bin/script/Makefile b/usr/src/usr.bin/script/Makefile index aa846554a5..f1a089acd8 100644 --- a/usr/src/usr.bin/script/Makefile +++ b/usr/src/usr.bin/script/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 script ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 script ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/script/script.c b/usr/src/usr.bin/script/script.c index 96c66f74f0..a7860d277e 100644 --- a/usr/src/usr.bin/script/script.c +++ b/usr/src/usr.bin/script/script.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)script.c 5.7 (Berkeley) %G%"; +static char sccsid[] = "@(#)script.c 5.8 (Berkeley) %G%"; #endif /* not lint */ /* @@ -34,8 +34,9 @@ static char sccsid[] = "@(#)script.c 5.7 (Berkeley) %G%"; #include #include #include +#include #include -#include +#include char *shell; FILE *fscript; @@ -86,7 +87,7 @@ main(argc, argv) shell = getenv("SHELL"); if (shell == NULL) - shell = "/bin/sh"; + shell = _PATH_BSHELL; getmaster(); printf("Script started, file is %s\n", fname); @@ -163,7 +164,7 @@ doshell() int t; /*** - t = open("/dev/tty", O_RDWR); + t = open(_PATH_TTY, O_RDWR); if (t >= 0) { (void) ioctl(t, TIOCNOTTY, (char *)0); (void) close(t); diff --git a/usr/src/usr.bin/soelim/Makefile b/usr/src/usr.bin/soelim/Makefile index cf6c0de2fd..f96392625a 100644 --- a/usr/src/usr.bin/soelim/Makefile +++ b/usr/src/usr.bin/soelim/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 soelim ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 soelim ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/tcopy/Makefile b/usr/src/usr.bin/tcopy/Makefile index 690fd72c3e..91d3355a9e 100644 --- a/usr/src/usr.bin/tcopy/Makefile +++ b/usr/src/usr.bin/tcopy/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 tcopy ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 tcopy ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/tcopy/tcopy.c b/usr/src/usr.bin/tcopy/tcopy.c index 7a822a98c8..f94e877d9e 100644 --- a/usr/src/usr.bin/tcopy/tcopy.c +++ b/usr/src/usr.bin/tcopy/tcopy.c @@ -22,23 +22,21 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)tcopy.c 5.11 (Berkeley) %G%"; +static char sccsid[] = "@(#)tcopy.c 5.12 (Berkeley) %G%"; #endif /* not lint */ -#include -#include -#include #include +#include +#include #include #include #include +#include +#include "pathnames.h" #define MAXREC (64 * 1024) #define NOCOUNT (-2) -#undef DEFTAPE -#define DEFTAPE "/dev/rmt0" - int filen, guesslen, maxblk = MAXREC; long lastrec, record, size, tsize; @@ -81,7 +79,7 @@ main(argc, argv) case 0: if (op != READ) usage(); - inf = DEFTAPE; + inf = _PATH_DEFTAPE; break; case 1: if (op != READ) diff --git a/usr/src/usr.bin/telnet/Makefile b/usr/src/usr.bin/telnet/Makefile index d5311daae7..795d2211e1 100644 --- a/usr/src/usr.bin/telnet/Makefile +++ b/usr/src/usr.bin/telnet/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 1.12 (Berkeley) %G% +# @(#)Makefile 1.13 (Berkeley) %G% # # The following is the telnet makefile. The sources are down one level @@ -59,7 +59,7 @@ depend: FRC ${SRCS} mkdep ${CFLAGS} `make clist` install: FRC - install -s -o bin -g bin -m 755 telnet ${DESTDIR}/usr/ucb/telnet + install -s -o bin -g bin -m 755 telnet ${DESTDIR}/usr/bin lint: FRC ${SRCS} lint ${CFLAGS} `make clist` @@ -68,49 +68,3 @@ tags: FRC ${SRCS} ctags `make hclist` FRC: - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -commands.o: Source/commands.c /usr/include/sys/types.h -commands.o: /usr/include/sys/socket.h /usr/include/netinet/in.h -commands.o: /usr/include/signal.h /usr/include/machine/trap.h -commands.o: /usr/include/netdb.h /usr/include/ctype.h -commands.o: /usr/include/arpa/telnet.h Source/ring.h Source/externs.h -commands.o: /usr/include/stdio.h /usr/include/setjmp.h Source/defines.h -commands.o: Source/types.h -main.o: Source/main.c /usr/include/sys/types.h Source/ring.h Source/externs.h -main.o: /usr/include/stdio.h /usr/include/setjmp.h Source/defines.h -network.o: Source/network.c /usr/include/sys/types.h /usr/include/sys/socket.h -network.o: /usr/include/sys/time.h /usr/include/time.h /usr/include/errno.h -network.o: /usr/include/arpa/telnet.h Source/ring.h Source/defines.h -network.o: Source/externs.h /usr/include/stdio.h /usr/include/setjmp.h -network.o: Source/fdset.h -ring.o: Source/ring.c /usr/include/stdio.h /usr/include/errno.h -ring.o: /usr/include/sys/types.h /usr/include/sys/ioctl.h -ring.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h -ring.o: /usr/include/sys/socket.h Source/ring.h Source/general.h -sys_bsd.o: Source/sys_bsd.c /usr/include/sys/ioctl.h -sys_bsd.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h -sys_bsd.o: /usr/include/sys/types.h /usr/include/sys/time.h /usr/include/time.h -sys_bsd.o: /usr/include/sys/socket.h /usr/include/signal.h -sys_bsd.o: /usr/include/machine/trap.h /usr/include/errno.h Source/ring.h -sys_bsd.o: Source/fdset.h Source/defines.h Source/externs.h -sys_bsd.o: /usr/include/stdio.h /usr/include/setjmp.h Source/types.h -sys_dos.o: Source/sys_dos.c -telnet.o: Source/telnet.c /usr/include/sys/types.h /usr/include/curses.h -telnet.o: /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h -telnet.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h -telnet.o: /usr/include/arpa/telnet.h /usr/include/strings.h Source/ring.h -telnet.o: Source/defines.h Source/externs.h /usr/include/stdio.h -telnet.o: /usr/include/setjmp.h Source/types.h Source/general.h -telnet.o: /usr/include/varargs.h -terminal.o: Source/terminal.c /usr/include/arpa/telnet.h -terminal.o: /usr/include/sys/types.h Source/ring.h Source/externs.h -terminal.o: /usr/include/stdio.h /usr/include/setjmp.h Source/types.h -tn3270.o: Source/tn3270.c Source/fdset.h -utilities.o: Source/utilities.c /usr/include/arpa/telnet.h -utilities.o: /usr/include/sys/types.h /usr/include/ctype.h Source/ring.h -utilities.o: Source/externs.h /usr/include/stdio.h /usr/include/setjmp.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/usr/src/usr.bin/tftp/Makefile b/usr/src/usr.bin/tftp/Makefile index bdecb127d4..b8c9b21c31 100644 --- a/usr/src/usr.bin/tftp/Makefile +++ b/usr/src/usr.bin/tftp/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.7 (Berkeley) %G% +# @(#)Makefile 5.8 (Berkeley) %G% # CFLAGS= -O LIBC= /lib/libc.a @@ -37,7 +37,7 @@ depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 tftp ${DESTDIR}/usr/ucb/tftp + install -s -o bin -g bin -m 755 tftp ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 tftp.0 ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/tip/Makefile b/usr/src/usr.bin/tip/Makefile index 2674197eaf..ccab9ae4e9 100644 --- a/usr/src/usr.bin/tip/Makefile +++ b/usr/src/usr.bin/tip/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.7 (Berkeley) %G% +# @(#)Makefile 5.8 (Berkeley) %G% # # make file for intermachine communications package # @@ -87,7 +87,7 @@ depend: install: ${MAN} cd aculib; make ${MFLAGS} install - install -s -o uucp -g dialer -m 4710 tip ${DESTDIR}/usr/bin/tip + install -s -o uucp -g dialer -m 4710 tip ${DESTDIR}/usr/bin rm -f ${DESTDIR}/usr/bin/cu ln ${DESTDIR}/usr/bin/tip ${DESTDIR}/usr/bin/cu install -c -o bin -g bin -m 444 tip.0 ${DESTDIR}/usr/man/cat1 diff --git a/usr/src/usr.bin/tip/cmds.c b/usr/src/usr.bin/tip/cmds.c index 58ea92e76d..9e308ffe81 100644 --- a/usr/src/usr.bin/tip/cmds.c +++ b/usr/src/usr.bin/tip/cmds.c @@ -16,10 +16,12 @@ */ #ifndef lint -static char sccsid[] = "@(#)cmds.c 5.9 (Berkeley) %G%"; +static char sccsid[] = "@(#)cmds.c 5.10 (Berkeley) %G%"; #endif /* not lint */ #include "tip.h" +#include "pathnames.h" + /* * tip * @@ -808,7 +810,7 @@ expand(name) if ((pid = vfork()) == 0) { Shell = value(SHELL); if (Shell == NOSTR) - Shell = "/bin/sh"; + Shell = _PATH_BSHELL; close(pivec[0]); close(1); dup(pivec[1]); diff --git a/usr/src/usr.bin/tip/remcap.c b/usr/src/usr.bin/tip/remcap.c index acbcec4d19..202ebd8c62 100644 --- a/usr/src/usr.bin/tip/remcap.c +++ b/usr/src/usr.bin/tip/remcap.c @@ -16,7 +16,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)remcap.c 5.2 (Berkeley) %G%"; +static char sccsid[] = "@(#)remcap.c 5.3 (Berkeley) %G%"; #endif /* not lint */ /* @@ -26,12 +26,12 @@ static char sccsid[] = "@(#)remcap.c 5.2 (Berkeley) %G%"; */ #include #include +#include "pathnames.h" #ifndef BUFSIZ #define BUFSIZ 1024 #endif #define MAXHOP 32 /* max number of tc= indirections */ -#define SYSREMOTE "/etc/remote" /* system remote file */ #define tgetent rgetent #define tnchktc rnchktc @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)remcap.c 5.2 (Berkeley) %G%"; #define tgetnum rgetnum #define tgetflag rgetflag #define tgetstr rgetstr -#define E_TERMCAP RM = SYSREMOTE +#define E_TERMCAP RM = _PATH_REMOTE #define V_TERMCAP "REMOTE" #define V_TERM "HOST" @@ -79,13 +79,13 @@ tgetent(bp, name) int rc1, rc2; remotefile = cp = getenv(V_TERMCAP); - if (cp == (char *)0 || strcmp(cp, SYSREMOTE) == 0) { - remotefile = cp = SYSREMOTE; + if (cp == (char *)0 || strcmp(cp, _PATH_REMOTE) == 0) { + remotefile = cp = _PATH_REMOTE; return (getent(bp, name, cp)); } else { if ((rc1 = getent(bp, name, cp)) != 1) *bp = '\0'; - remotefile = cp = SYSREMOTE; + remotefile = cp = _PATH_REMOTE; rc2 = getent(lbuf, name, cp); if (rc1 != 1 && rc2 != 1) return (rc2); @@ -210,9 +210,9 @@ tnchktc() return (0); } if (getent(tcbuf, tcname, remotefile) != 1) { - if (strcmp(remotefile, SYSREMOTE) == 0) + if (strcmp(remotefile, _PATH_REMOTE) == 0) return (0); - else if (getent(tcbuf, tcname, SYSREMOTE) != 1) + else if (getent(tcbuf, tcname, _PATH_REMOTE) != 1) return (0); } for (q = tcbuf; *q++ != ':'; ) diff --git a/usr/src/usr.bin/tip/tip.c b/usr/src/usr.bin/tip/tip.c index e36593ac82..fe4a30e32d 100644 --- a/usr/src/usr.bin/tip/tip.c +++ b/usr/src/usr.bin/tip/tip.c @@ -22,7 +22,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)tip.c 5.8 (Berkeley) %G%"; +static char sccsid[] = "@(#)tip.c 5.9 (Berkeley) %G%"; #endif /* not lint */ /* @@ -32,6 +32,7 @@ static char sccsid[] = "@(#)tip.c 5.8 (Berkeley) %G%"; * cu phone-number [-s speed] [-l line] [-a acu] */ #include "tip.h" +#include "pathnames.h" /* * Baud rate mapping table @@ -139,7 +140,7 @@ notnumber: * in the right order, so force it here */ if ((PH = getenv("PHONES")) == NOSTR) - PH = "/etc/phones"; + PH = _PATH_PHONES; vinit(); /* init variables */ setparity("even"); /* set the parity table */ if ((i = speed(number(value(BAUDRATE)))) == NULL) { diff --git a/usr/src/usr.bin/tip/uucplock.c b/usr/src/usr.bin/tip/uucplock.c index e8df0a46bc..8705e7fb4b 100644 --- a/usr/src/usr.bin/tip/uucplock.c +++ b/usr/src/usr.bin/tip/uucplock.c @@ -16,18 +16,14 @@ */ #ifndef lint -static char sccsid[] = "@(#)uucplock.c 5.3 (Berkeley) %G%"; +static char sccsid[] = "@(#)uucplock.c 5.4 (Berkeley) %G%"; #endif /* not lint */ #include #include #include #include - -/* pick the directory naming scheme you are using */ - -#define LOCKDIRNAME "/usr/spool/uucp/LCK..%s" /**/ -/* #define LOCKDIRNAME "/usr/spool/uucp/LCK/LCK..%s" /**/ +#include "pathnames.h" /* * uucp style locking routines @@ -40,10 +36,10 @@ uu_lock(ttyname) { extern int errno; int fd, pid; - char tbuf[sizeof(LOCKDIRNAME) + MAXNAMLEN]; + char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN]; off_t lseek(); - (void)sprintf(tbuf, LOCKDIRNAME, ttyname); + (void)sprintf(tbuf, _PATH_LOCKDIRNAME, ttyname); fd = open(tbuf, O_RDWR|O_CREAT|O_EXCL, 0660); if (fd < 0) { /* @@ -90,8 +86,8 @@ uu_lock(ttyname) uu_unlock(ttyname) char *ttyname; { - char tbuf[sizeof(LOCKDIRNAME) + MAXNAMLEN]; + char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN]; - (void)sprintf(tbuf, LOCKDIRNAME, ttyname); + (void)sprintf(tbuf, _PATH_LOCKDIRNAME, ttyname); return(unlink(tbuf)); } diff --git a/usr/src/usr.bin/tip/vars.c b/usr/src/usr.bin/tip/vars.c index 6f80fbf3e4..088c79b1a9 100644 --- a/usr/src/usr.bin/tip/vars.c +++ b/usr/src/usr.bin/tip/vars.c @@ -16,10 +16,11 @@ */ #ifndef lint -static char sccsid[] = "@(#)vars.c 5.3 (Berkeley) %G%"; +static char sccsid[] = "@(#)vars.c 5.4 (Berkeley) %G%"; #endif /* not lint */ #include "tip.h" +#include "pathnames.h" /* * Definition of variables @@ -48,7 +49,7 @@ value_t vtable[] = { { "host", STRING|IREMOTE|INIT, READ< #include #include +#include "pathnames.h" /* * VACATION -- return a message to the sender when on vacation. @@ -340,8 +341,8 @@ sendmessage(myname) syslog(LOG_NOTICE, "vacation: no ~%s/%s file.\n", myname, VMSG); myexit(1); } - execl("/usr/lib/sendmail", "sendmail", "-f", myname, from, NULL); - syslog(LOG_ERR, "vacation: can't exec /usr/lib/sendmail.\n"); + execl(_PATH_SENDMAIL, "sendmail", "-f", myname, from, NULL); + syslog(LOG_ERR, "vacation: can't exec %s.\n", _PATH_SENDMAIL); myexit(1); } diff --git a/usr/src/usr.bin/whois/Makefile b/usr/src/usr.bin/whois/Makefile index 8c14240464..a6264daba7 100644 --- a/usr/src/usr.bin/whois/Makefile +++ b/usr/src/usr.bin/whois/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 whois ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 whois ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.bin/window/Makefile b/usr/src/usr.bin/window/Makefile index 8daee6f721..b7cdccc0e6 100644 --- a/usr/src/usr.bin/window/Makefile +++ b/usr/src/usr.bin/window/Makefile @@ -14,7 +14,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.2 (Berkeley) %G% +# @(#)Makefile 5.3 (Berkeley) %G% # CFLAGS= -O -R LIBC= /lib/libc.a @@ -61,9 +61,8 @@ depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 window ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 window ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 -# install -c -o bin -g bin -m 755 windowrc ${DESTDIR}/usr/local/lib lint: ${SRCS} lint ${CFLAGS} ${SRCS} diff --git a/usr/src/usr.bin/window/main.c b/usr/src/usr.bin/window/main.c index 9e4c2aa203..a6cde96619 100644 --- a/usr/src/usr.bin/window/main.c +++ b/usr/src/usr.bin/window/main.c @@ -16,16 +16,16 @@ */ #ifndef lint -static char sccsid[] = "@(#)main.c 3.35 (Berkeley) %G%"; +static char sccsid[] = "@(#)main.c 3.36 (Berkeley) %G%"; #endif /* not lint */ #include "defs.h" #include +#include #include #include "string.h" #include "char.h" #include "local.h" -#include "pathnames.h" #define next(a) (*++*(a) ? *(a) : (*++(a) ? *(a) : (char *)usage())) diff --git a/usr/src/usr.bin/yes/Makefile b/usr/src/usr.bin/yes/Makefile index 0b813a3a60..2e4e1efca4 100644 --- a/usr/src/usr.bin/yes/Makefile +++ b/usr/src/usr.bin/yes/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 yes ${DESTDIR}/usr/ucb + install -s -o bin -g bin -m 755 yes ${DESTDIR}/usr/bin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 lint: ${SRCS} diff --git a/usr/src/usr.sbin/sa/Makefile b/usr/src/usr.sbin/sa/Makefile index 76d09f9d31..b072d28210 100644 --- a/usr/src/usr.sbin/sa/Makefile +++ b/usr/src/usr.sbin/sa/Makefile @@ -14,7 +14,7 @@ # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND # FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # CFLAGS= -O @@ -38,7 +38,7 @@ depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 sa ${DESTDIR}/etc + install -s -o bin -g bin -m 755 sa ${DESTDIR}/usr/sbin install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8 lint: ${SRCS} diff --git a/usr/src/usr.sbin/sa/pathnames.h b/usr/src/usr.sbin/sa/pathnames.h index df41a9e4de..b6ae3ea0b8 100644 --- a/usr/src/usr.sbin/sa/pathnames.h +++ b/usr/src/usr.sbin/sa/pathnames.h @@ -14,9 +14,9 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)pathnames.h 5.1 (Berkeley) %G% + * @(#)pathnames.h 5.2 (Berkeley) %G% */ -#define _PATH_USRACCT "/usr/adm/usracct" -#define _PATH_SAVACCT "/usr/adm/savacct" -#define _PATH_ACCT "/usr/adm/acct" +#define _PATH_USRACCT "/var/account/usracct" +#define _PATH_SAVACCT "/var/account/savacct" +#define _PATH_ACCT "/var/account/acct" -- 2.20.1