summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>1999-01-21 00:55:32 +0000
committercvs2svn <cvs2svn@FreeBSD.org>1999-01-21 00:55:32 +0000
commit76b5366091f76c9bc73570149ef5055648fc2c39 (patch)
tree590d020e0f2a5bea6e09d66d951a674443b21d67 /bin
parent4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/Makefile.inc3
-rw-r--r--bin/chio/chio.14
-rw-r--r--bin/chio/chio.c14
-rw-r--r--bin/chmod/chmod.c3
-rw-r--r--bin/cp/Makefile3
-rw-r--r--bin/cp/utils.c4
-rw-r--r--bin/csh/dir.c4
-rw-r--r--bin/date/Makefile3
-rw-r--r--bin/date/date.14
-rw-r--r--bin/dd/dd.114
-rw-r--r--bin/dd/misc.c8
-rw-r--r--bin/df/df.c19
-rw-r--r--bin/expr/expr.15
-rw-r--r--bin/ls/ls.14
-rw-r--r--bin/mkdir/mkdir.c26
-rw-r--r--bin/pax/pat_rep.c4
-rw-r--r--bin/pax/tar.c13
-rw-r--r--bin/ps/fmt.c6
-rw-r--r--bin/ps/keyword.c9
-rw-r--r--bin/ps/print.c6
-rw-r--r--bin/pwd/pwd.c4
-rw-r--r--bin/rcp/Makefile3
-rw-r--r--bin/sh/bltin/bltin.h14
-rw-r--r--bin/sh/miscbltin.c5
-rw-r--r--bin/sh/sh.17
-rw-r--r--bin/test/test.15
26 files changed, 71 insertions, 123 deletions
diff --git a/bin/Makefile.inc b/bin/Makefile.inc
index 0c085ca286aa3..4fdaae4b576ba 100644
--- a/bin/Makefile.inc
+++ b/bin/Makefile.inc
@@ -1,8 +1,7 @@
# @(#)Makefile.inc 8.1 (Berkeley) 5/31/93
-# $Id: Makefile.inc,v 1.9 1997/02/22 14:01:23 peter Exp $
+# $Id$
BINDIR?= /bin
-CFLAGS+= -Wall -Wformat
NOSHARED?= YES
.if exists (${.CURDIR}/../../secure)
diff --git a/bin/chio/chio.1 b/bin/chio/chio.1
index 27fee8d0e3db8..e1cbad9cc941a 100644
--- a/bin/chio/chio.1
+++ b/bin/chio/chio.1
@@ -30,7 +30,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: chio.1,v 1.7 1998/09/15 07:48:51 gibbs Exp $
+.\" $Id: chio.1,v 1.6 1998/06/04 21:05:19 steve Exp $
.\"
.Dd May 14, 1998
.Dt CHIO 1
@@ -185,7 +185,7 @@ If the
flag is specified, the volume tag of the specified element is
cleared. If the
.Fl f
-flag is specified, the volume tag is superseded with the specified
+flag is specified, the volume tag is superceded with the specified
volume tag even if a volume tag is already defined for the element.
It is an error to not specify the
.Fl f
diff --git a/bin/chio/chio.c b/bin/chio/chio.c
index bb5f749f194fb..f00b73892c0cd 100644
--- a/bin/chio/chio.c
+++ b/bin/chio/chio.c
@@ -389,7 +389,7 @@ do_params(char *cname, int argc, char **argv)
++argv; --argc;
if (argc) {
- warnx("%s: no arguments expected", cname);
+ warnx("%s: no arguements expected", cname);
goto usage;
}
@@ -520,7 +520,7 @@ do_status(char *cname, int argc, char **argv)
pvoltag = avoltag = source = sense = scsi = intaddr = 1;
break;
default:
- warnx("%s: bad option", cname);
+ warnx("bad option", cname);
goto usage;
}
}
@@ -741,7 +741,7 @@ do_voltag(char *cname, int argc, char **argv)
alternate = 1;
break;
default:
- warnx("%s: bad option", cname);
+ warnx("bad option", cname);
goto usage;
}
}
@@ -750,7 +750,7 @@ do_voltag(char *cname, int argc, char **argv)
argv += optind;
if (argc < 2) {
- warnx("%s: missing element specification", cname);
+ warnx("missing element specification", cname);
goto usage;
}
@@ -759,7 +759,7 @@ do_voltag(char *cname, int argc, char **argv)
if (!clear) {
if (argc < 3 || argc > 4) {
- warnx("%s: missing argument", cname);
+ warnx("missing argument", cname);
goto usage;
}
@@ -769,7 +769,7 @@ do_voltag(char *cname, int argc, char **argv)
csvr.csvr_flags = CSVR_MODE_SET;
if (strlen(argv[2]) > sizeof(csvr.csvr_voltag.cv_volid)) {
- warnx("%s: volume label too long", cname);
+ warnx("volume label too long", cname);
goto usage;
}
@@ -781,7 +781,7 @@ do_voltag(char *cname, int argc, char **argv)
}
} else {
if (argc != 2) {
- warnx("%s: unexpected argument", cname);
+ warnx("unexpected argument", cname);
goto usage;
}
csvr.csvr_flags = CSVR_MODE_CLEAR;
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c
index 4e1712397888b..0d868243f4428 100644
--- a/bin/chmod/chmod.c
+++ b/bin/chmod/chmod.c
@@ -42,7 +42,7 @@ static char const copyright[] =
static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
#endif
static const char rcsid[] =
- "$Id: chmod.c,v 1.11 1998/05/13 07:22:11 charnier Exp $";
+ "$Id: chmod.c,v 1.10 1998/05/06 06:50:08 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -195,7 +195,6 @@ done: argv += optind;
}
if (errno)
err(1, "fts_read");
- free(set);
exit(rval);
}
diff --git a/bin/cp/Makefile b/bin/cp/Makefile
index f4ca4d25c87fc..57883daad0d18 100644
--- a/bin/cp/Makefile
+++ b/bin/cp/Makefile
@@ -1,8 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
-# $Id: Makefile,v 1.4 1997/02/22 14:01:32 peter Exp $
+# $Id$
PROG= cp
SRCS= cp.c utils.c
-CFLAGS+= -DVM_AND_BUFFER_CACHE_SYNCHRONIZED
.include <bsd.prog.mk>
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index f6c0f0d21d553..7e001b2abbff4 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94";
#endif
static const char rcsid[] =
- "$Id: utils.c,v 1.20 1998/06/10 06:29:23 peter Exp $";
+ "$Id: utils.c,v 1.19 1998/06/09 03:38:26 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -124,7 +124,7 @@ copy_file(entp, dne)
* wins some CPU back.
*/
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
- if (S_ISREG(fs->st_mode) && fs->st_size <= 8 * 1048576) {
+ if (fs->st_size <= 8 * 1048576) {
if ((p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
MAP_SHARED, from_fd, (off_t)0)) == MAP_FAILED) {
warn("%s", entp->fts_path);
diff --git a/bin/csh/dir.c b/bin/csh/dir.c
index b1fc00d79f91d..f3b8b9d542b7e 100644
--- a/bin/csh/dir.c
+++ b/bin/csh/dir.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)dir.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
- "$Id: dir.c,v 1.8 1998/06/09 03:38:37 imp Exp $";
+ "$Id: dir.c,v 1.7 1997/08/07 21:42:05 steve Exp $";
#endif
#endif /* not lint */
@@ -85,7 +85,7 @@ dinit(hp)
static char *emsg = "csh: Trying to start from \"%s\"\n";
/* Don't believe the login shell home, because it may be a symlink */
- tcp = getcwd(path, MAXPATHLEN); /* see ngetwd.c for System V version */
+ tcp = getwd(path); /* see ngetwd.c for System V version */
if (tcp == NULL || *tcp == '\0') {
(void) fprintf(csherr, "csh: %s: %s\n", path, strerror(errno));
if (hp && *hp) {
diff --git a/bin/date/Makefile b/bin/date/Makefile
index cf3ceb4c04193..d6562b4b50948 100644
--- a/bin/date/Makefile
+++ b/bin/date/Makefile
@@ -1,8 +1,9 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
-# $Id: Makefile,v 1.6 1997/08/09 22:34:01 brian Exp $
+# $Id: Makefile,v 1.5 1997/08/04 03:37:05 brian Exp $
PROG= date
SRCS= date.c netdate.c vary.c
+CFLAGS+=-Wall
DPADD= ${LIBUTIL}
LDADD= -lutil
diff --git a/bin/date/date.1 b/bin/date/date.1
index cf0c792626c96..6d87af9633f8d 100644
--- a/bin/date/date.1
+++ b/bin/date/date.1
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)date.1 8.3 (Berkeley) 4/28/95
-.\" $Id: date.1,v 1.25 1998/05/13 07:56:44 phk Exp $
+.\" $Id: date.1,v 1.24 1998/05/06 06:51:13 charnier Exp $
.\"
.Dd November 17, 1993
.Dt DATE 1
@@ -183,7 +183,7 @@ and years are handled automatically.
.Sh EXAMPLES
The command:
.Bd -literal -offset indent
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+date "+DATE: 19%y-%m-%d%nTIME: %H:%M:%S"
.Ed
.Pp
will display:
diff --git a/bin/dd/dd.1 b/bin/dd/dd.1
index 67d6b3727baab..bfe05eeee2856 100644
--- a/bin/dd/dd.1
+++ b/bin/dd/dd.1
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)dd.1 8.2 (Berkeley) 1/13/94
-.\" $Id: dd.1,v 1.7 1998/05/06 06:51:35 charnier Exp $
+.\" $Id: dd.1,v 1.6 1997/10/11 20:09:04 joerg Exp $
.\"
.Dd January 13, 1994
.Dt DD 1
@@ -59,9 +59,7 @@ and truncated input records to the standard error output.
The following operands are available:
.Bl -tag -width of=file
.It Cm bs= Ns Ar n
-Set both input and output block size to
-.Va n
-bytes, superseding the
+Set both input and output block size, superseding the
.Cm ibs
and
.Cm obs
@@ -109,13 +107,13 @@ Any regular output file is truncated unless the
conversion value is specified.
If an initial portion of the output file is skipped (see the
.Cm seek
-operand),
+operand)
the output file is truncated at that point.
.It Cm seek= Ns Ar n
Seek
.Va n
blocks from the beginning of the output before copying.
-On non-tape devices, an
+On non-tape devices, a
.Xr lseek 2
operation is used.
Otherwise, existing blocks are read and the data discarded.
@@ -131,7 +129,7 @@ bytes.
Skip
.Va n
blocks from the beginning of the input before copying.
-On input which supports seeks, an
+On input which supports seeks, a
.Xr lseek 2
operation is used.
Otherwise, input data is read and discarded.
@@ -332,7 +330,7 @@ will exit.
.Pp
The
.Nm
-utility exits 0 on success or >0 if an error occurred.
+utility exits 0 on success and >0 if an error occurred.
.Sh SEE ALSO
.Xr cp 1 ,
.Xr mt 1 ,
diff --git a/bin/dd/misc.c b/bin/dd/misc.c
index 00ef7aed06c9c..6f7fcafcd2f8d 100644
--- a/bin/dd/misc.c
+++ b/bin/dd/misc.c
@@ -40,7 +40,7 @@
static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
- "$Id: misc.c,v 1.14 1998/05/13 07:33:50 charnier Exp $";
+ "$Id: misc.c,v 1.13 1998/05/06 06:51:40 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -66,16 +66,16 @@ summary()
secs = 1e-6;
/* Use snprintf(3) so that we don't reenter stdio(3). */
(void)snprintf(buf, sizeof(buf),
- "%lu+%lu records in\n%lu+%lu records out\n",
+ "%u+%u records in\n%u+%u records out\n",
st.in_full, st.in_part, st.out_full, st.out_part);
(void)write(STDERR_FILENO, buf, strlen(buf));
if (st.swab) {
- (void)snprintf(buf, sizeof(buf), "%lu odd length swab %s\n",
+ (void)snprintf(buf, sizeof(buf), "%u odd length swab %s\n",
st.swab, (st.swab == 1) ? "block" : "blocks");
(void)write(STDERR_FILENO, buf, strlen(buf));
}
if (st.trunc) {
- (void)snprintf(buf, sizeof(buf), "%lu truncated %s\n",
+ (void)snprintf(buf, sizeof(buf), "%u truncated %s\n",
st.trunc, (st.trunc == 1) ? "block" : "blocks");
(void)write(STDERR_FILENO, buf, strlen(buf));
}
diff --git a/bin/df/df.c b/bin/df/df.c
index 42ce083c06be9..5fbfe723e49be 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -47,7 +47,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)df.c 8.9 (Berkeley) 5/8/95";
#else
static const char rcsid[] =
- "$Id: df.c,v 1.19 1997/10/13 09:36:05 joerg Exp $";
+ "$Id: df.c,v 1.18 1997/10/12 13:55:43 joerg Exp $";
#endif
#endif /* not lint */
@@ -85,7 +85,7 @@ main(argc, argv)
struct statfs statfsbuf, *mntbuf;
long mntsize;
int ch, err, i, maxwidth, rv, width;
- char *mntpt, *mntpath, **vfslist;
+ char *mntpt, **vfslist;
vfslist = NULL;
while ((ch = getopt(argc, argv, "iknt:")) != -1)
@@ -148,25 +148,17 @@ main(argc, argv)
continue;
} else if ((stbuf.st_mode & S_IFMT) == S_IFBLK) {
if ((mntpt = getmntpt(*argv)) == 0) {
+ mntpt = mktemp(strdup("/tmp/df.XXXXXX"));
mdev.fspec = *argv;
- mntpath = strdup("/tmp/df.XXXXXX");
- if (mntpath == NULL) {
- warn("strdup failed");
+ if (mkdir(mntpt, DEFFILEMODE) != 0) {
+ warn("%s", mntpt);
rv = 1;
continue;
}
- mntpt = mkdtemp(mntpath);
- if (mntpt == NULL) {
- warn("mkdtemp(\"%s\") failed", mntpath);
- rv = 1;
- free(mntpath);
- continue;
- }
if (mount("ufs", mntpt, MNT_RDONLY,
&mdev) != 0) {
rv = ufs_df(*argv, maxwidth) || rv;
(void)rmdir(mntpt);
- free(mntpath);
continue;
} else if (statfs(mntpt, &statfsbuf) == 0) {
statfsbuf.f_mntonname[0] = '\0';
@@ -177,7 +169,6 @@ main(argc, argv)
}
(void)unmount(mntpt, 0);
(void)rmdir(mntpt);
- free(mntpath);
continue;
}
} else
diff --git a/bin/expr/expr.1 b/bin/expr/expr.1
index b3f67fb52d938..74cb2a947659d 100644
--- a/bin/expr/expr.1
+++ b/bin/expr/expr.1
@@ -28,7 +28,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $Id: expr.1,v 1.7 1998/05/13 07:43:56 charnier Exp $
+.\" $Id: expr.1,v 1.6 1997/02/22 14:03:37 peter Exp $
.\"
.Dd July 3, 1993
.Dt EXPR 1
@@ -125,9 +125,6 @@ the expression is an empty string or 0.
.It 2
the expression is invalid.
.El
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr test 1
.Sh STANDARDS
The
.Nm
diff --git a/bin/ls/ls.1 b/bin/ls/ls.1
index 355d1c161874a..64ae89e1376df 100644
--- a/bin/ls/ls.1
+++ b/bin/ls/ls.1
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
-.\" $Id: ls.1,v 1.25 1998/10/04 00:41:08 jkh Exp $
+.\" $Id: ls.1,v 1.24 1998/07/29 00:46:08 hoek Exp $
.\"
.Dd July 29, 1994
.Dt LS 1
@@ -378,7 +378,7 @@ If this variable is set, it is considered to be a
colon-delimited list of minimum column widths. Unreasonable
and insufficient widths are ignored (thus zero signifies
a dynamically sized column). Not all
-columns have changeable widths. The fields are,
+columns have changable widths. The fields are,
in order: inode, block count, number of links, user name,
group name, flags, file size, file name.
.El
diff --git a/bin/mkdir/mkdir.c b/bin/mkdir/mkdir.c
index f9a7ef5e3d6f7..ed26dc80525c1 100644
--- a/bin/mkdir/mkdir.c
+++ b/bin/mkdir/mkdir.c
@@ -42,7 +42,7 @@ static char const copyright[] =
static char sccsid[] = "@(#)mkdir.c 8.2 (Berkeley) 1/25/94";
#endif
static const char rcsid[] =
- "$Id: mkdir.c,v 1.15 1998/10/23 06:28:40 msmith Exp $";
+ "$Id$";
#endif /* not lint */
#include <sys/types.h>
@@ -63,7 +63,7 @@ main(argc, argv)
int argc;
char *argv[];
{
- int ch, exitval, success, omode, pflag;
+ int ch, exitval, omode, pflag;
mode_t *set = (mode_t *)NULL;
char *mode;
@@ -93,28 +93,15 @@ main(argc, argv)
if ((set = setmode(mode)) == NULL)
errx(1, "invalid file mode: %s", mode);
omode = getmode(set, S_IRWXU | S_IRWXG | S_IRWXO);
- free(set);
}
for (exitval = 0; *argv != NULL; ++argv) {
- success = 1;
if (pflag) {
if (build(*argv, omode))
- success = 0;
- } else if (mkdir(*argv, omode) < 0) {
- warn("%s", *argv);
- success = 0;
+ exitval = 1;
+ continue;
}
- if (!success)
- exitval = 1;
- /*
- * The mkdir() and umask() calls both honor only the low
- * nine bits, so if you try to set a mode including the
- * sticky, setuid, setgid bits you lose them. Don't do
- * this unless the user has specifically requested a mode,
- * as chmod will (obviously) ignore the umask.
- */
- if (success && mode != NULL && chmod(*argv, omode) == -1) {
+ if (mkdir(*argv, omode) < 0) {
warn("%s", *argv);
exitval = 1;
}
@@ -183,8 +170,7 @@ build(path, omode)
retval = 1;
break;
}
- if (!last)
- *p = '/';
+ *p = '/';
}
if (!first && !last)
(void)umask(oumask);
diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c
index a02c3a392437f..f46dce1ea6fa0 100644
--- a/bin/pax/pat_rep.c
+++ b/bin/pax/pat_rep.c
@@ -40,7 +40,7 @@
static char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94";
#endif
static const char rcsid[] =
- "$Id: pat_rep.c,v 1.13 1998/12/05 10:29:10 obrien Exp $";
+ "$Id$";
#endif /* not lint */
#include <sys/types.h>
@@ -1002,7 +1002,7 @@ rep_name(name, nlen, prnt)
# ifdef NET2_REGEX
inpt = pt->rcmp->endp[0];
# else
- inpt += pm[0].rm_eo - pm[0].rm_so;
+ inpt += pm[0].rm_eo;
# endif
if ((outpt == endpt) || (*inpt == '\0'))
diff --git a/bin/pax/tar.c b/bin/pax/tar.c
index ba8c6b00081b0..bde4c459f12df 100644
--- a/bin/pax/tar.c
+++ b/bin/pax/tar.c
@@ -40,7 +40,7 @@
static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94";
#endif
static const char rcsid[] =
- "$Id: tar.c,v 1.10 1998/05/15 06:27:47 charnier Exp $";
+ "$Id$";
#endif /* not lint */
#include <sys/types.h>
@@ -977,7 +977,7 @@ ustar_wr(arcn)
* check the length of the linkname
*/
if (((arcn->type == PAX_SLK) || (arcn->type == PAX_HLK) ||
- (arcn->type == PAX_HRG)) && (arcn->ln_nlen >= sizeof(hd->linkname))){
+ (arcn->type == PAX_HRG)) && (arcn->ln_nlen > sizeof(hd->linkname))){
pax_warn(1, "Link name too long for ustar %s", arcn->ln_name);
return(1);
}
@@ -1156,16 +1156,17 @@ name_split(name, len)
*/
if (len <= TNMSZ)
return(name);
- if (len > (TPFSZ + TNMSZ))
+ if (len > (TPFSZ + TNMSZ + 1))
return(NULL);
/*
* we start looking at the biggest sized piece that fits in the name
* field. We walk foward looking for a slash to split at. The idea is
* to find the biggest piece to fit in the name field (or the smallest
- * prefix we can find)
+ * prefix we can find) (the -1 is correct the biggest piece would
+ * include the slash between the two parts that gets thrown away)
*/
- start = name + len - TNMSZ;
+ start = name + len - TNMSZ - 1;
while ((*start != '\0') && (*start != '/'))
++start;
@@ -1183,7 +1184,7 @@ name_split(name, len)
* the file would then expand on extract to //str. The len == 0 below
* makes this special case follow the spec to the letter.
*/
- if ((len >= TPFSZ) || (len == 0))
+ if ((len > TPFSZ) || (len == 0))
return(NULL);
/*
diff --git a/bin/ps/fmt.c b/bin/ps/fmt.c
index f04ae9dc63915..76eb78c21c214 100644
--- a/bin/ps/fmt.c
+++ b/bin/ps/fmt.c
@@ -36,13 +36,13 @@
static char sccsid[] = "@(#)fmt.c 8.4 (Berkeley) 4/15/94";
#endif
static const char rcsid[] =
- "$Id: fmt.c,v 1.12 1998/06/17 11:33:10 jkoshy Exp $";
+ "$Id: fmt.c,v 1.11 1998/05/15 06:29:15 charnier Exp $";
#endif /* not lint */
-#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/syslimits.h>
#include <sys/time.h>
#include <sys/resource.h>
-#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c
index 6cd2c3572dc96..a0c60b11b9f18 100644
--- a/bin/ps/keyword.c
+++ b/bin/ps/keyword.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94";
#else
static const char rcsid[] =
- "$Id: keyword.c,v 1.21 1998/12/19 02:55:32 julian Exp $";
+ "$Id: keyword.c,v 1.19 1998/05/25 05:07:17 steve Exp $";
#endif
#endif /* not lint */
@@ -157,17 +157,10 @@ VAR var[] = {
{"ruser", "RUSER", NULL, LJUST|DSIZ, runame, s_runame, USERLEN},
{"sess", "SESS", NULL, 0, evar, NULL, 6, EOFF(e_sess), KPTR, "lx"},
{"sig", "PENDING", NULL, 0, pvar, NULL, 8, POFF(p_siglist), INT, "x"},
-#ifndef COMPAT_LINUX_THREADS
{"sigcatch", "CAUGHT",
NULL, 0, pvar, NULL, 8, POFF(p_sigcatch), UINT, "x"},
{"sigignore", "IGNORED",
NULL, 0, pvar, NULL, 8, POFF(p_sigignore), UINT, "x"},
-#else
- {"sigcatch", "CAUGHT",
- NULL, 0, evar, NULL, 8, EOFF(e_procsig.ps_sigcatch), UINT, "x"},
- {"sigignore", "IGNORED",
- NULL, 0, evar, NULL, 8, EOFF(e_procsig.ps_sigignore), UINT, "x"},
-#endif /* COMPAT_LINUX_THREADS */
{"sigmask", "BLOCKED",
NULL, 0, pvar, NULL, 8, POFF(p_sigmask), UINT, "x"},
{"sl", "SL", NULL, 0, pvar, NULL, 3, POFF(p_slptime), UINT, "d"},
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 9317c7be1ffc2..09fbf8e342ccb 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#endif
static const char rcsid[] =
- "$Id: print.c,v 1.32 1998/09/14 08:32:20 dfr Exp $";
+ "$Id: print.c,v 1.31 1998/06/28 21:05:48 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -503,8 +503,8 @@ getpcpu(k)
if (p->p_swtime == 0 || (p->p_flag & P_INMEM) == 0)
return (0.0);
if (rawcpu)
- return (100.0 * fxtofl(p->p_pctcpu));
- return (100.0 * fxtofl(p->p_pctcpu) /
+ return (10000.0 / sysconf(_SC_CLK_TCK) * fxtofl(p->p_pctcpu));
+ return (10000.0 / sysconf(_SC_CLK_TCK) * fxtofl(p->p_pctcpu) /
(1.0 - exp(p->p_swtime * log(fxtofl(ccpu)))));
}
diff --git a/bin/pwd/pwd.c b/bin/pwd/pwd.c
index 92973f9b8e357..fab0dfbd0a426 100644
--- a/bin/pwd/pwd.c
+++ b/bin/pwd/pwd.c
@@ -42,7 +42,7 @@ static char const copyright[] =
static char sccsid[] = "@(#)pwd.c 8.3 (Berkeley) 4/1/94";
#endif
static const char rcsid[] =
- "$Id: pwd.c,v 1.7 1998/05/15 06:30:58 charnier Exp $";
+ "$Id$";
#endif /* not lint */
#include <err.h>
@@ -82,7 +82,7 @@ main(argc, argv)
usage();
if ((p = getcwd(NULL, 0)) == NULL)
- err(1, ".");
+ err(1, NULL);
(void)printf("%s\n", p);
exit(0);
}
diff --git a/bin/rcp/Makefile b/bin/rcp/Makefile
index 44ca5331ec670..e8db7dc69a3e3 100644
--- a/bin/rcp/Makefile
+++ b/bin/rcp/Makefile
@@ -1,8 +1,9 @@
# @(#)Makefile 8.1 (Berkeley) 7/19/93
-# $Id: Makefile,v 1.12 1998/10/09 06:31:45 markm Exp $
+# $Id: Makefile,v 1.11 1998/08/06 21:35:04 markm Exp $
PROG= rcp
SRCS= rcp.c util.c
+CFLAGS+=-Wall
.if exists(${DESTDIR}${LIBDIR}/libkrb.a) && defined(MAKE_KERBEROS4)
SRCS+= krcmd.c kcmd.c rcmd_util.c encrypt.c
diff --git a/bin/sh/bltin/bltin.h b/bin/sh/bltin/bltin.h
index ebd035a650de1..a50d55cb3d9e7 100644
--- a/bin/sh/bltin/bltin.h
+++ b/bin/sh/bltin/bltin.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)bltin.h 8.2 (Berkeley) 5/4/95
- * $Id: bltin.h,v 1.8 1997/02/22 13:58:58 peter Exp $
+ * $Id$
*/
/*
@@ -60,17 +60,7 @@
#define fputs outstr
#define fflush flushout
#define INITARGS(argv)
-#define warnx1(a, b, c) { \
- char buf[64]; \
- (void)snprintf(buf, sizeof(buf), a); \
- error("%s", buf); \
-}
-#define warnx2(a, b, c) { \
- char buf[64]; \
- (void)snprintf(buf, sizeof(buf), a, b); \
- error("%s", buf); \
-}
-#define warnx3(a, b, c) { \
+#define warnx(a, b, c) { \
char buf[64]; \
(void)snprintf(buf, sizeof(buf), a, b, c); \
error("%s", buf); \
diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c
index 4daacacfca511..772a3fd17a47a 100644
--- a/bin/sh/miscbltin.c
+++ b/bin/sh/miscbltin.c
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
#endif
static const char rcsid[] =
- "$Id: miscbltin.c,v 1.17 1998/08/25 09:33:34 cracauer Exp $";
+ "$Id: miscbltin.c,v 1.16 1998/08/24 10:20:36 cracauer Exp $";
#endif /* not lint */
/*
@@ -285,11 +285,10 @@ umaskcmd(argc, argv)
} else {
void *set;
if ((set = setmode (ap)) == 0)
- error("Illegal number: %s", ap);
+ error("Illegal number: %s", ap);
mask = getmode (set, ~mask & 0777);
umask(~mask & 0777);
- free(set);
}
}
return 0;
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index cbc377e369a0c..5d99ac64a5a1f 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
-.\" $Id: sh.1,v 1.22 1998/12/02 23:20:11 billf Exp $
+.\" $Id: sh.1,v 1.20 1998/05/18 06:44:17 charnier Exp $
.\"
.Dd May 5, 1995
.Dt SH 1
@@ -1003,7 +1003,7 @@ have a shell function with the same name
as a builtin command.)
.It cd [ directory ]
Switch to the specified directory (default $HOME).
-If an entry for CDPATH appears in the environment
+If the an entry for CDPATH appears in the environment
of the cd command or the shell variable CDPATH is set
and the directory name does not begin with a slash,
then the directories listed in CDPATH will be
@@ -1306,9 +1306,6 @@ Hitting <return> while in command mode will pass the line to the shell.
.Pp
Similarly, the 'set -o emacs' command can be used to enable a subset of
emacs-style commandline editing features.
-.Sh SEE ALSO
-.Xr expr 1 ,
-.Xr test 1
.Sh HISTORY
A
.Nm
diff --git a/bin/test/test.1 b/bin/test/test.1
index 45a84e33b87c8..db51abc6a8ae5 100644
--- a/bin/test/test.1
+++ b/bin/test/test.1
@@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)test.1 8.1 (Berkeley) 5/31/93
-.\" $Id: test.1,v 1.7 1998/09/07 16:59:05 cracauer Exp $
+.\" $Id: test.1,v 1.6 1998/05/18 06:51:56 charnier Exp $
.\"
.Dd May 31, 1993
.Dt TEST 1
@@ -253,9 +253,6 @@ missing.
.It >1
An error occurred.
.El
-.Sh SEE ALSO
-.Xr expr 1 ,
-.Xr sh 1
.Sh STANDARDS
The
.Nm