summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/chmod/chmod.c4
-rw-r--r--bin/csh/alloc.c5
-rw-r--r--bin/csh/time.c4
-rw-r--r--bin/df/df.c44
-rw-r--r--bin/domainname/domainname.c4
-rw-r--r--bin/ed/cbc.c10
-rw-r--r--bin/ed/glbl.c6
-rw-r--r--bin/ed/io.c8
-rw-r--r--bin/ed/main.c18
-rw-r--r--bin/ed/re.c4
-rw-r--r--bin/ed/sub.c9
-rw-r--r--bin/expr/expr.y5
-rw-r--r--bin/ls/ls.c5
-rw-r--r--bin/ls/print.c4
-rw-r--r--bin/pax/gen_subs.c4
-rw-r--r--bin/pax/options.c32
-rw-r--r--bin/pax/pat_rep.c4
-rw-r--r--bin/ps/print.c10
-rw-r--r--bin/ps/ps.c9
-rw-r--r--bin/rcp/rcp.c10
-rw-r--r--bin/rcp/util.c4
-rw-r--r--bin/rmail/rmail.c4
-rw-r--r--bin/stty/gfmt.c6
-rw-r--r--bin/stty/key.c4
-rw-r--r--bin/test/test.c6
25 files changed, 120 insertions, 103 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c
index 1e3dab0..c02994d 100644
--- a/bin/chmod/chmod.c
+++ b/bin/chmod/chmod.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: chmod.c,v 1.2 1994/09/24 02:53:37 davidg Exp $
+ * $Id: chmod.c,v 1.3 1995/02/03 22:21:09 bde Exp $
*/
#ifndef lint
@@ -70,6 +70,8 @@ main(argc, argv)
int Hflag, Lflag, Pflag, Rflag, ch, fflag, fts_options, hflag, rval;
char *ep, *mode;
+ set = NULL;
+ omode = 0;
Hflag = Lflag = Pflag = Rflag = fflag = hflag = 0;
while ((ch = getopt(argc, argv, "HLPRXfgorstuwx")) != EOF)
switch (ch) {
diff --git a/bin/csh/alloc.c b/bin/csh/alloc.c
index b0a7a1e..aa4e74c 100644
--- a/bin/csh/alloc.c
+++ b/bin/csh/alloc.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: alloc.c,v 1.2 1994/09/24 02:53:45 davidg Exp $
*/
#ifndef lint
@@ -122,5 +122,6 @@ showall(v, t)
{
memtop = (char *) sbrk(0);
(void) fprintf(cshout, "Allocated memory from 0x%lx to 0x%lx (%ld).\n",
- (unsigned long) membot, (unsigned long) memtop, memtop - membot);
+ (unsigned long) membot, (unsigned long) memtop,
+ (unsigned long) (memtop - membot));
}
diff --git a/bin/csh/time.c b/bin/csh/time.c
index bee5bae..c63e0f5 100644
--- a/bin/csh/time.c
+++ b/bin/csh/time.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: time.c,v 1.2 1994/09/24 02:54:20 davidg Exp $
+ * $Id: time.c,v 1.3 1995/02/16 09:17:27 jkh Exp $
*/
#ifndef lint
@@ -246,7 +246,7 @@ pdeltat(t1, t0)
struct timeval td;
tvsub(&td, t1, t0);
- (void) fprintf(cshout, "%d.%01d", td.tv_sec, td.tv_usec / 100000);
+ (void) fprintf(cshout, "%ld.%01ld", td.tv_sec, td.tv_usec / 100000L);
}
void
diff --git a/bin/df/df.c b/bin/df/df.c
index 5a53a34..6c42726 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: df.c,v 1.5 1994/09/24 02:55:11 davidg Exp $
*/
#ifndef lint
@@ -76,29 +76,30 @@ struct typetab {
char *str;
long types;
} typetab[] = {
- "ufs", MT(MOUNT_UFS),
- "local", MT_LOCAL,
- "all", MT_ALL,
- "nfs", MT(MOUNT_NFS),
- "mfs", MT(MOUNT_MFS),
- "lfs", MT(MOUNT_LFS),
- "msdos", MT(MOUNT_MSDOS),
- "fdesc", MT(MOUNT_FDESC),
- "portal", MT(MOUNT_PORTAL),
+ {"ufs", MT(MOUNT_UFS)},
+ {"local", MT_LOCAL},
+ {"all", MT_ALL},
+ {"nfs", MT(MOUNT_NFS)},
+ {"mfs", MT(MOUNT_MFS)},
+ {"lfs", MT(MOUNT_LFS)},
+ {"msdos", MT(MOUNT_MSDOS)},
+ {"fdesc", MT(MOUNT_FDESC)},
+ {"portal", MT(MOUNT_PORTAL)},
#if 0
/* return fsid of underlying FS */
- "lofs", MT(MOUNT_LOFS),
- "null", MT(MOUNT_NULL),
- "umap", MT(MOUNT_UMAP),
+ {"lofs", MT(MOUNT_LOFS)},
+ {"null", MT(MOUNT_NULL)},
+ {"umap", MT(MOUNT_UMAP)},
#endif
- "kernfs", MT(MOUNT_KERNFS),
- "procfs", MT(MOUNT_PROCFS),
- "afs", MT(MOUNT_AFS),
- "iso9660fs", MT(MOUNT_CD9660),
- "cdfs", MT(MOUNT_CD9660),
- "misc", MT(MOUNT_LOFS)|MT(MOUNT_FDESC)|MT(MOUNT_PORTAL)|
- MT(MOUNT_KERNFS)|MT(MOUNT_PROCFS),
- NULL, 0
+ {"kernfs", MT(MOUNT_KERNFS)},
+ {"procfs", MT(MOUNT_PROCFS)},
+ {"afs", MT(MOUNT_AFS)},
+ {"iso9660fs", MT(MOUNT_CD9660)},
+ {"cdfs", MT(MOUNT_CD9660)},
+ {"misc", MT(MOUNT_LOFS)|MT(MOUNT_FDESC)|MT(MOUNT_PORTAL)|
+ MT(MOUNT_KERNFS)|MT(MOUNT_PROCFS)},
+ {NULL, 0}
+
};
long addtype __P((long, char *));
@@ -124,6 +125,7 @@ main(argc, argv)
char *mntpt;
iflag = nflag = tflag = 0;
+ fsmask = MT_NONE;
while ((ch = getopt(argc, argv, "iknt:")) != EOF)
switch (ch) {
diff --git a/bin/domainname/domainname.c b/bin/domainname/domainname.c
index 77a5a86..4295ec5 100644
--- a/bin/domainname/domainname.c
+++ b/bin/domainname/domainname.c
@@ -40,7 +40,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "From: @(#)hostname.c 8.1 (Berkeley) 5/31/93"; */
static const char rcsid[] =
- "$Id: domainname.c,v 1.3 1994/09/21 22:30:55 bde Exp $";
+ "$Id: domainname.c,v 1.4 1994/09/26 02:14:27 wollman Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -56,7 +56,7 @@ main(argc,argv)
int argc;
char *argv[];
{
- char *p, domainname[MAXHOSTNAMELEN];
+ char domainname[MAXHOSTNAMELEN];
argc--, argv++;
diff --git a/bin/ed/cbc.c b/bin/ed/cbc.c
index 11a8027..62fcd99 100644
--- a/bin/ed/cbc.c
+++ b/bin/ed/cbc.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)bdes.c 5.5 (Berkeley) 6/27/91
- * $Id$
+ * $Id: cbc.c,v 1.4 1994/09/24 02:55:24 davidg Exp $
*/
#ifndef lint
@@ -115,7 +115,7 @@ init_des_cipher()
des_ct = des_n = 0;
- /* initialize the initialization vctor */
+ /* initialize the initialization vector */
MEMZERO(ivec, 8);
/* intialize the padding vector */
@@ -137,6 +137,8 @@ get_des_char(fp)
des_ct = cbc_decode(des_buf, fp);
}
return (des_ct > 0) ? des_buf[des_n++] : EOF;
+#else
+ return (getc(fp));
#endif
}
@@ -153,6 +155,8 @@ put_des_char(c, fp)
des_n = 0;
}
return (des_ct >= 0) ? (des_buf[des_n++] = c) : EOF;
+#else
+ return (fputc(c, fp));
#endif
}
@@ -168,6 +172,8 @@ flush_des_file(fp)
des_n = 0;
}
return (des_ct >= 0 && cbc_encode(des_buf, des_n, fp) >= 0) ? 0 : EOF;
+#else
+ return (fflush(fp));
#endif
}
diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c
index b57bee4..525411d 100644
--- a/bin/ed/glbl.c
+++ b/bin/ed/glbl.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: glbl.c,v 1.2 1994/09/24 02:55:26 davidg Exp $
*/
#ifndef lint
@@ -132,8 +132,8 @@ exec_global(interact, gflag)
for (; *ibufp;)
if ((status = extract_addr_range()) < 0 ||
(status = exec_command()) < 0 ||
- status > 0 && (status = display_lines(
- current_addr, current_addr, status)) < 0)
+ (status > 0 && (status = display_lines(
+ current_addr, current_addr, status)) < 0))
return status;
}
return 0;
diff --git a/bin/ed/io.c b/bin/ed/io.c
index 0c98504c..1072d06 100644
--- a/bin/ed/io.c
+++ b/bin/ed/io.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: io.c,v 1.3 1994/09/24 02:55:27 davidg Exp $
*/
#ifndef lint
@@ -106,7 +106,7 @@ read_stream(fp, n)
return ERR;
if (appended && size && o_isbinary && o_newline_added)
fputs("newline inserted\n", stderr);
- else if (newline_added && (!appended || !isbinary && !o_isbinary))
+ else if (newline_added && (!appended || (!isbinary && !o_isbinary)))
fputs("newline appended\n", stderr);
if (isbinary && newline_added && !appended)
size += 1;
@@ -128,8 +128,8 @@ get_stream_line(fp)
register int c;
register int i = 0;
- while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || !feof(fp) &&
- !ferror(fp)) && c != '\n') {
+ while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || (!feof(fp) &&
+ !ferror(fp))) && c != '\n') {
REALLOC(sbuf, sbufsz, i + 1, ERR);
if (!(sbuf[i++] = c))
isbinary = 1;
diff --git a/bin/ed/main.c b/bin/ed/main.c
index 9ef9db2..d43efad 100644
--- a/bin/ed/main.c
+++ b/bin/ed/main.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: main.c,v 1.3 1994/09/24 02:55:28 davidg Exp $
*/
#ifndef lint
@@ -154,9 +154,9 @@ top:
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, signal_int);
#ifdef _POSIX_SOURCE
- if (status = sigsetjmp(env, 1))
+ if ((status = sigsetjmp(env, 1)))
#else
- if (status = setjmp(env))
+ if ((status = setjmp(env)))
#endif
{
fputs("\n?\n", stderr);
@@ -213,7 +213,7 @@ top:
isglobal = 0;
if ((status = extract_addr_range()) >= 0 &&
(status = exec_command()) >= 0)
- if (!status || status &&
+ if (!status ||
(status = display_lines(current_addr, current_addr,
status)) >= 0)
continue;
@@ -544,7 +544,7 @@ exec_command()
return ERR;
else if (build_active_list(c == 'g' || c == 'G') < 0)
return ERR;
- else if (n = (c == 'G' || c == 'V'))
+ else if ((n = (c == 'G' || c == 'V')))
GET_COMMAND_SUFFIX();
isglobal++;
if (exec_global(n, gflag) < 0)
@@ -840,7 +840,7 @@ exec_command()
break;
case '=':
GET_COMMAND_SUFFIX();
- printf("%d\n", addr_cnt ? second_addr : addr_last);
+ printf("%ld\n", addr_cnt ? second_addr : addr_last);
break;
case '!':
if (addr_cnt > 0) {
@@ -902,7 +902,7 @@ get_matching_node_addr(pat, dir)
if (!pat) return ERR;
do {
- if (n = dir ? INC_MOD(n, addr_last) : DEC_MOD(n, addr_last)) {
+ if ((n = dir ? INC_MOD(n, addr_last) : DEC_MOD(n, addr_last))) {
lp = get_addressed_line_node(n);
if ((s = get_sbuf_line(lp)) == NULL)
return ERR;
@@ -910,7 +910,7 @@ get_matching_node_addr(pat, dir)
NUL_TO_NEWLINE(s, lp->len);
if (!regexec(pat, s, 0, NULL, 0))
return n;
- }
+ }
} while (n != current_addr);
sprintf(errmsg, "no match");
return ERR;
@@ -1339,7 +1339,7 @@ strip_escapes(s)
REALLOC(file, filesz, MAXPATHLEN + 1, NULL);
/* assert: no trailing escape */
- while (file[i++] = (*s == '\\') ? *++s : *s)
+ while ((file[i++] = (*s == '\\') ? *++s : *s))
s++;
return file;
}
diff --git a/bin/ed/re.c b/bin/ed/re.c
index 779bdd5..805f59f 100644
--- a/bin/ed/re.c
+++ b/bin/ed/re.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: re.c,v 1.8 1994/09/24 02:55:29 davidg Exp $
*/
#ifndef lint
@@ -67,7 +67,7 @@ get_compiled_pattern()
return NULL;
}
patlock = 0;
- if (n = regcomp(exp, exps, 0)) {
+ if ((n = regcomp(exp, exps, 0))) {
regerror(n, exp, errmsg, sizeof errmsg);
free(exp);
return exp = NULL;
diff --git a/bin/ed/sub.c b/bin/ed/sub.c
index c23e4a2..904bc6a 100644
--- a/bin/ed/sub.c
+++ b/bin/ed/sub.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sub.c,v 1.3 1994/09/24 02:55:31 davidg Exp $
+ * $Id: sub.c,v 1.4 1995/01/14 11:47:16 alm Exp $
*/
#ifndef lint
@@ -97,7 +97,7 @@ extract_subst_template()
;
else if (!isglobal) {
while ((n = get_tty_line()) == 0 ||
- n > 0 && ibuf[n - 1] != '\n')
+ (n > 0 && ibuf[n - 1] != '\n'))
clearerr(stdin);
if (n < 0)
return NULL;
@@ -213,8 +213,9 @@ substitute_matching_text(pat, lp, gflag, kth)
off += i;
}
txt += rm[0].rm_eo;
- } while (*txt && (!changed || (gflag & GSG) && rm[0].rm_eo) &&
- !regexec(pat, txt, SE_MAX, rm, REG_NOTBOL));
+ } while (*txt &&
+ (!changed || ((gflag & GSG) && rm[0].rm_eo)) &&
+ !regexec(pat, txt, SE_MAX, rm, REG_NOTBOL));
i = eot - txt;
REALLOC(rbuf, rbufsz, off + i + 2, ERR);
if (i > 0 && !rm[0].rm_eo && (gflag & GSG)) {
diff --git a/bin/expr/expr.y b/bin/expr/expr.y
index b2d66bf..e745bb7 100644
--- a/bin/expr/expr.y
+++ b/bin/expr/expr.y
@@ -4,7 +4,7 @@
*
* Largely rewritten by J.T. Conklin (jtc@wimsey.com)
*
- * $Id$
+ * $Id: expr.y,v 1.8 1994/09/24 02:55:37 davidg Exp $
*/
#include <stdio.h>
@@ -193,7 +193,6 @@ struct val *vp;
int
yylex ()
{
- struct val *vp;
char *p;
if (*av == NULL)
@@ -228,6 +227,8 @@ struct val *vp;
/* NOTREACHED */
}
+int yyparse ();
+
void
main (argc, argv)
int argc;
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index d2047c9..2d4922a 100644
--- a/bin/ls/ls.c
+++ b/bin/ls/ls.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ls.c,v 1.3 1994/09/24 02:55:54 davidg Exp $
+ * $Id: ls.c,v 1.4 1994/12/18 19:00:01 joerg Exp $
*/
#ifndef lint
@@ -117,7 +117,7 @@ main(argc, argv)
} else {
f_singlecol = 1;
/* retrieve environment variable, in case of explicit -C */
- if (p = getenv("COLUMNS"))
+ if ((p = getenv("COLUMNS")))
termwidth = atoi(p);
}
@@ -371,6 +371,7 @@ display(p, list)
btotal = maxblock = maxinode = maxlen = maxnlink = 0;
bcfile = 0;
maxuser = maxgroup = maxflags = 0;
+ flags = NULL;
maxsize = 0;
for (cur = list, entries = 0; cur; cur = cur->fts_link) {
if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) {
diff --git a/bin/ls/print.c b/bin/ls/print.c
index de889ca..83df587 100644
--- a/bin/ls/print.c
+++ b/bin/ls/print.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: print.c,v 1.2 1994/09/24 02:55:56 davidg Exp $
*/
#ifndef lint
@@ -188,7 +188,7 @@ printcol(dp)
dp->s_block);
if ((base += numrows) >= num)
break;
- while ((cnt = (chcnt + TAB & ~(TAB - 1))) <= endcol) {
+ while ((cnt = ((chcnt + TAB) & ~(TAB - 1))) <= endcol){
(void)putchar('\t');
chcnt = cnt;
}
diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c
index 85a24b3..d80a2be 100644
--- a/bin/pax/gen_subs.c
+++ b/bin/pax/gen_subs.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: gen_subs.c,v 1.2 1994/09/24 02:56:22 davidg Exp $
*/
#ifndef lint
@@ -135,7 +135,7 @@ ls_list(arcn, now)
# ifdef NET2_STAT
(void)printf("%4u,%4u ", MAJOR(sbp->st_rdev),
# else
- (void)printf("%4lu,%4lu ", MAJOR(sbp->st_rdev),
+ (void)printf("%4lu,%4lu ", (unsigned long)MAJOR(sbp->st_rdev),
# endif
MINOR(sbp->st_rdev));
else {
diff --git a/bin/pax/options.c b/bin/pax/options.c
index 986e015..e8e5cc6 100644
--- a/bin/pax/options.c
+++ b/bin/pax/options.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: options.c,v 1.2 1994/09/24 02:56:22 davidg Exp $
*/
#ifndef lint
@@ -90,34 +90,34 @@ static void cpio_usage __P((void));
FSUB fsub[] = {
/* 0: OLD BINARY CPIO */
- "bcpio", 5120, sizeof(HD_BCPIO), 1, 0, 0, 1, bcpio_id, cpio_strd,
+ {"bcpio", 5120, sizeof(HD_BCPIO), 1, 0, 0, 1, bcpio_id, cpio_strd,
bcpio_rd, bcpio_endrd, cpio_stwr, bcpio_wr, cpio_endwr, cpio_trail,
- rd_wrfile, wr_rdfile, bad_opt,
+ rd_wrfile, wr_rdfile, bad_opt},
/* 1: OLD OCTAL CHARACTER CPIO */
- "cpio", 5120, sizeof(HD_CPIO), 1, 0, 0, 1, cpio_id, cpio_strd,
+ {"cpio", 5120, sizeof(HD_CPIO), 1, 0, 0, 1, cpio_id, cpio_strd,
cpio_rd, cpio_endrd, cpio_stwr, cpio_wr, cpio_endwr, cpio_trail,
- rd_wrfile, wr_rdfile, bad_opt,
+ rd_wrfile, wr_rdfile, bad_opt},
/* 2: SVR4 HEX CPIO */
- "sv4cpio", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, vcpio_id, cpio_strd,
+ {"sv4cpio", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, vcpio_id, cpio_strd,
vcpio_rd, vcpio_endrd, cpio_stwr, vcpio_wr, cpio_endwr, cpio_trail,
- rd_wrfile, wr_rdfile, bad_opt,
+ rd_wrfile, wr_rdfile, bad_opt},
/* 3: SVR4 HEX CPIO WITH CRC */
- "sv4crc", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, crc_id, crc_strd,
+ {"sv4crc", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, crc_id, crc_strd,
vcpio_rd, vcpio_endrd, crc_stwr, vcpio_wr, cpio_endwr, cpio_trail,
- rd_wrfile, wr_rdfile, bad_opt,
+ rd_wrfile, wr_rdfile, bad_opt},
/* 4: OLD TAR */
- "tar", 10240, BLKMULT, 0, 1, BLKMULT, 0, tar_id, no_op,
+ {"tar", 10240, BLKMULT, 0, 1, BLKMULT, 0, tar_id, no_op,
tar_rd, tar_endrd, no_op, tar_wr, tar_endwr, tar_trail,
- rd_wrfile, wr_rdfile, tar_opt,
+ rd_wrfile, wr_rdfile, tar_opt},
/* 5: POSIX USTAR */
- "ustar", 10240, BLKMULT, 0, 1, BLKMULT, 0, ustar_id, ustar_strd,
+ {"ustar", 10240, BLKMULT, 0, 1, BLKMULT, 0, ustar_id, ustar_strd,
ustar_rd, tar_endrd, ustar_stwr, ustar_wr, tar_endwr, tar_trail,
- rd_wrfile, wr_rdfile, bad_opt,
+ rd_wrfile, wr_rdfile, bad_opt},
};
#define F_TAR 4 /* format when called as tar */
#define DEFLT 5 /* default write format from list above */
@@ -367,8 +367,8 @@ pax_options(argc, argv)
* specify an archive format on write
*/
tmp.name = optarg;
- if (frmt = (FSUB *)bsearch((void *)&tmp, (void *)fsub,
- sizeof(fsub)/sizeof(FSUB), sizeof(FSUB), c_frmt)) {
+ if ((frmt = (FSUB *)bsearch((void *)&tmp, (void *)fsub,
+ sizeof(fsub)/sizeof(FSUB), sizeof(FSUB), c_frmt))) {
flg |= XF;
break;
}
@@ -823,7 +823,7 @@ printflg(flg)
int pos = 0;
(void)fprintf(stderr,"%s: Invalid combination of options:", argv0);
- while (nxt = ffs(flg)) {
+ while ((nxt = ffs(flg))) {
flg = flg >> nxt;
pos += nxt;
(void)fprintf(stderr, " -%c", flgch[pos-1]);
diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c
index 7b712bf..546a945 100644
--- a/bin/pax/pat_rep.c
+++ b/bin/pax/pat_rep.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: pat_rep.c,v 1.2 1994/09/24 02:56:24 davidg Exp $
*/
#ifndef lint
@@ -617,7 +617,7 @@ range_match(pattern, test)
int negate;
int ok = 0;
- if (negate = (*pattern == '!'))
+ if ((negate = (*pattern == '!')))
++pattern;
while ((c = *pattern++) != ']') {
diff --git a/bin/ps/print.c b/bin/ps/print.c
index cbbe38a..ded44f5 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: print.c,v 1.4 1994/10/02 08:33:30 davidg Exp $
+ * $Id: print.c,v 1.5 1994/10/02 14:11:32 ache Exp $
*/
#ifndef lint
@@ -468,7 +468,7 @@ p_rssize(k, ve) /* doesn't account for text */
#ifndef NEWVM
(void)printf("%*d", v->width, pgtok(KI_PROC(k)->p_rssize));
#else
- (void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_vm.vm_rssize));
+ (void)printf("%*ld", v->width, pgtok(KI_EPROC(k)->e_vm.vm_rssize));
#endif
}
@@ -599,7 +599,7 @@ pagein(k, ve)
VAR *v;
v = ve->var;
- (void)printf("%*d", v->width,
+ (void)printf("%*ld", v->width,
k->ki_u.u_valid ? k->ki_u.u_ru.ru_majflt : 0);
}
@@ -630,7 +630,7 @@ tsize(k, ve)
#ifndef NEWVM
(void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_xsize));
#else
- (void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_vm.vm_tsize));
+ (void)printf("%*ld", v->width, pgtok(KI_EPROC(k)->e_vm.vm_tsize));
#endif
}
@@ -664,7 +664,7 @@ printval(bp, v)
if (v->flag & LJUST)
*cp++ = '-';
*cp++ = '*';
- while (*cp++ = *fcp++);
+ while ((*cp++ = *fcp++));
switch (v->type) {
case CHAR:
diff --git a/bin/ps/ps.c b/bin/ps/ps.c
index 85a03e4..831649b 100644
--- a/bin/ps/ps.c
+++ b/bin/ps/ps.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ps.c,v 1.4 1994/10/02 08:33:31 davidg Exp $
+ * $Id: ps.c,v 1.5 1994/10/18 04:27:46 davidg Exp $
*/
#ifndef lint
@@ -384,7 +384,7 @@ saveuser(ki)
struct user *u_addr = (struct user *)USRSTACK;
usp = &ki->ki_u;
- if (kvm_uread(kd, KI_PROC(ki), &u_addr->u_stats,
+ if (kvm_uread(kd, KI_PROC(ki), (unsigned long)&u_addr->u_stats,
(char *)&pstats, sizeof(pstats)) == sizeof(pstats)) {
/*
* The u-area might be swapped out, and we can't get
@@ -486,8 +486,9 @@ kludge_oldps_options(s)
* if there's a trailing number, and not a preceding 'p' (pid) or
* 't' (tty) flag, then assume it's a pid and insert a 'p' flag.
*/
- if (isdigit(*cp) && (cp == s || cp[-1] != 't' && cp[-1] != 'p' &&
- (cp - 1 == s || cp[-2] != 't')))
+ if (isdigit(*cp) &&
+ (cp == s || (cp[-1] != 't' && cp[-1] != 'p')) &&
+ (cp - 1 == s || cp[-2] != 't'))
*ns++ = 'p';
(void)strcpy(ns, cp); /* and append the number */
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c
index c33bbc5..53f601c 100644
--- a/bin/rcp/rcp.c
+++ b/bin/rcp/rcp.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: rcp.c,v 1.2 1994/09/24 02:56:56 davidg Exp $
*/
#ifndef lint
@@ -226,7 +226,7 @@ main(argc, argv)
(void)signal(SIGPIPE, lostconn);
- if (targ = colon(argv[argc - 1])) /* Dest is remote host. */
+ if ((targ = colon(argv[argc - 1]))) /* Dest is remote host. */
toremote(targ, argc, argv);
else {
tolocal(argc, argv); /* Dest is local host. */
@@ -248,7 +248,7 @@ toremote(targ, argc, argv)
if (*targ == 0)
targ = ".";
- if (thost = strchr(argv[argc - 1], '@')) {
+ if ((thost = strchr(argv[argc - 1], '@'))) {
/* user@host */
*thost++ = 0;
tuser = argv[argc - 1];
@@ -509,7 +509,7 @@ rsource(name, statp)
closedir(dirp);
return;
}
- while (dp = readdir(dirp)) {
+ while ((dp = readdir(dirp))) {
if (dp->d_ino == 0)
continue;
if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
@@ -539,7 +539,7 @@ sink(argc, argv)
BUF *bp;
off_t i, j;
int amt, count, exists, first, mask, mode, ofd, omode;
- int setimes, size, targisdir, wrerrno;
+ int setimes, size, targisdir, wrerrno = 0;
char ch, *cp, *np, *targ, *why, *vect[1], buf[BUFSIZ];
#define atime tv[0]
diff --git a/bin/rcp/util.c b/bin/rcp/util.c
index 287bb08..89e3560 100644
--- a/bin/rcp/util.c
+++ b/bin/rcp/util.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: util.c,v 1.2 1994/09/24 02:56:57 davidg Exp $
*/
#ifndef lint
@@ -111,7 +111,7 @@ susystem(s, userid)
char *s;
{
sig_t istat, qstat;
- int status, w;
+ int status;
pid_t pid;
pid = vfork();
diff --git a/bin/rmail/rmail.c b/bin/rmail/rmail.c
index fda2619..5305a2e 100644
--- a/bin/rmail/rmail.c
+++ b/bin/rmail/rmail.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: rmail.c,v 1.2 1994/09/24 02:57:06 davidg Exp $
+ * $Id: rmail.c,v 1.3 1995/03/05 08:27:14 joerg Exp $
*/
#ifndef lint
@@ -119,6 +119,8 @@ main(argc, argv)
if (argc < 1)
usage();
+ fplen = fptlen = 0;
+ addrp = "";
from_path = from_sys = from_user = NULL;
for (offset = 0;;) {
diff --git a/bin/stty/gfmt.c b/bin/stty/gfmt.c
index b0bf79a..880c122 100644
--- a/bin/stty/gfmt.c
+++ b/bin/stty/gfmt.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: gfmt.c,v 1.2 1994/09/24 02:58:57 davidg Exp $
*/
#ifndef lint
@@ -64,11 +64,11 @@ gprint(tp, wp, ldisc)
{
struct cchar *cp;
- (void)printf("gfmt1:cflag=%x:iflag=%x:lflag=%x:oflag=%x:",
+ (void)printf("gfmt1:cflag=%lx:iflag=%lx:lflag=%lx:oflag=%lx:",
tp->c_cflag, tp->c_iflag, tp->c_lflag, tp->c_oflag);
for (cp = cchars1; cp->name; ++cp)
(void)printf("%s=%x:", cp->name, tp->c_cc[cp->sub]);
- (void)printf("ispeed=%d:ospeed=%d\n", cfgetispeed(tp), cfgetospeed(tp));
+ (void)printf("ispeed=%ld:ospeed=%ld\n", cfgetispeed(tp), cfgetospeed(tp));
}
void
diff --git a/bin/stty/key.c b/bin/stty/key.c
index 4b388d2..bc7cf56 100644
--- a/bin/stty/key.c
+++ b/bin/stty/key.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: key.c,v 1.2 1994/09/24 02:58:58 davidg Exp $
*/
#ifndef lint
@@ -286,7 +286,7 @@ f_speed(ip)
struct info *ip;
{
- (void)printf("%d\n", cfgetospeed(&ip->t));
+ (void)printf("%ld\n", cfgetospeed(&ip->t));
}
void
diff --git a/bin/test/test.c b/bin/test/test.c
index 3b3f4d0..d9a22e4 100644
--- a/bin/test/test.c
+++ b/bin/test/test.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: test.c,v 1.8 1994/11/05 20:24:49 ache Exp $
+ * $Id: test.c,v 1.9 1994/11/05 20:48:06 ache Exp $
*/
#ifndef lint
@@ -115,7 +115,7 @@ main(argc, argv)
struct value *valsp;
struct filestat fs;
char c, **ap, *opname, *p;
- int binary, nest, op, pri, ret_val, skipping;
+ int binary, nest, op = 0, pri, ret_val, skipping;
if ((p = argv[0]) == NULL)
errx(2, "test: argc is zero");
@@ -248,7 +248,7 @@ main(argc, argv)
valsp->u.num);
#else
(void)sprintf(p,
- "%d", valsp->u.num);
+ "%ld", valsp->u.num);
#endif
valsp->u.string = p;
} else if (valsp->type == BOOLEAN) {
OpenPOWER on IntegriCloud