You will find enclosed some changes to make gcc -Wall more happy in
/usr/src/bin. Note that some patches are still needed in that directory. I (Joerg) finished most of Philippe's cleanup. /bin/sh will still need *allot* of work, however. Submitted by: charnier@lirmm.fr (Philippe Charnier)
This commit is contained in:
parent
967a3bf893
commit
0fd510b71a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7165
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
#ifndef lint
|
||||||
@ -70,6 +70,8 @@ main(argc, argv)
|
|||||||
int Hflag, Lflag, Pflag, Rflag, ch, fflag, fts_options, hflag, rval;
|
int Hflag, Lflag, Pflag, Rflag, ch, fflag, fts_options, hflag, rval;
|
||||||
char *ep, *mode;
|
char *ep, *mode;
|
||||||
|
|
||||||
|
set = NULL;
|
||||||
|
omode = 0;
|
||||||
Hflag = Lflag = Pflag = Rflag = fflag = hflag = 0;
|
Hflag = Lflag = Pflag = Rflag = fflag = hflag = 0;
|
||||||
while ((ch = getopt(argc, argv, "HLPRXfgorstuwx")) != EOF)
|
while ((ch = getopt(argc, argv, "HLPRXfgorstuwx")) != EOF)
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: alloc.c,v 1.2 1994/09/24 02:53:45 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -122,5 +122,6 @@ showall(v, t)
|
|||||||
{
|
{
|
||||||
memtop = (char *) sbrk(0);
|
memtop = (char *) sbrk(0);
|
||||||
(void) fprintf(cshout, "Allocated memory from 0x%lx to 0x%lx (%ld).\n",
|
(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));
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
#ifndef lint
|
||||||
@ -246,7 +246,7 @@ pdeltat(t1, t0)
|
|||||||
struct timeval td;
|
struct timeval td;
|
||||||
|
|
||||||
tvsub(&td, t1, t0);
|
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
|
void
|
||||||
|
44
bin/df/df.c
44
bin/df/df.c
@ -35,7 +35,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: df.c,v 1.5 1994/09/24 02:55:11 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -76,29 +76,30 @@ struct typetab {
|
|||||||
char *str;
|
char *str;
|
||||||
long types;
|
long types;
|
||||||
} typetab[] = {
|
} typetab[] = {
|
||||||
"ufs", MT(MOUNT_UFS),
|
{"ufs", MT(MOUNT_UFS)},
|
||||||
"local", MT_LOCAL,
|
{"local", MT_LOCAL},
|
||||||
"all", MT_ALL,
|
{"all", MT_ALL},
|
||||||
"nfs", MT(MOUNT_NFS),
|
{"nfs", MT(MOUNT_NFS)},
|
||||||
"mfs", MT(MOUNT_MFS),
|
{"mfs", MT(MOUNT_MFS)},
|
||||||
"lfs", MT(MOUNT_LFS),
|
{"lfs", MT(MOUNT_LFS)},
|
||||||
"msdos", MT(MOUNT_MSDOS),
|
{"msdos", MT(MOUNT_MSDOS)},
|
||||||
"fdesc", MT(MOUNT_FDESC),
|
{"fdesc", MT(MOUNT_FDESC)},
|
||||||
"portal", MT(MOUNT_PORTAL),
|
{"portal", MT(MOUNT_PORTAL)},
|
||||||
#if 0
|
#if 0
|
||||||
/* return fsid of underlying FS */
|
/* return fsid of underlying FS */
|
||||||
"lofs", MT(MOUNT_LOFS),
|
{"lofs", MT(MOUNT_LOFS)},
|
||||||
"null", MT(MOUNT_NULL),
|
{"null", MT(MOUNT_NULL)},
|
||||||
"umap", MT(MOUNT_UMAP),
|
{"umap", MT(MOUNT_UMAP)},
|
||||||
#endif
|
#endif
|
||||||
"kernfs", MT(MOUNT_KERNFS),
|
{"kernfs", MT(MOUNT_KERNFS)},
|
||||||
"procfs", MT(MOUNT_PROCFS),
|
{"procfs", MT(MOUNT_PROCFS)},
|
||||||
"afs", MT(MOUNT_AFS),
|
{"afs", MT(MOUNT_AFS)},
|
||||||
"iso9660fs", MT(MOUNT_CD9660),
|
{"iso9660fs", MT(MOUNT_CD9660)},
|
||||||
"cdfs", MT(MOUNT_CD9660),
|
{"cdfs", MT(MOUNT_CD9660)},
|
||||||
"misc", MT(MOUNT_LOFS)|MT(MOUNT_FDESC)|MT(MOUNT_PORTAL)|
|
{"misc", MT(MOUNT_LOFS)|MT(MOUNT_FDESC)|MT(MOUNT_PORTAL)|
|
||||||
MT(MOUNT_KERNFS)|MT(MOUNT_PROCFS),
|
MT(MOUNT_KERNFS)|MT(MOUNT_PROCFS)},
|
||||||
NULL, 0
|
{NULL, 0}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
long addtype __P((long, char *));
|
long addtype __P((long, char *));
|
||||||
@ -124,6 +125,7 @@ main(argc, argv)
|
|||||||
char *mntpt;
|
char *mntpt;
|
||||||
|
|
||||||
iflag = nflag = tflag = 0;
|
iflag = nflag = tflag = 0;
|
||||||
|
fsmask = MT_NONE;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "iknt:")) != EOF)
|
while ((ch = getopt(argc, argv, "iknt:")) != EOF)
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
@ -40,7 +40,7 @@ static char copyright[] =
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
/*static char sccsid[] = "From: @(#)hostname.c 8.1 (Berkeley) 5/31/93"; */
|
/*static char sccsid[] = "From: @(#)hostname.c 8.1 (Berkeley) 5/31/93"; */
|
||||||
static const char rcsid[] =
|
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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -56,7 +56,7 @@ main(argc,argv)
|
|||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
char *p, domainname[MAXHOSTNAMELEN];
|
char domainname[MAXHOSTNAMELEN];
|
||||||
|
|
||||||
argc--, argv++;
|
argc--, argv++;
|
||||||
|
|
||||||
|
10
bin/ed/cbc.c
10
bin/ed/cbc.c
@ -35,7 +35,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)bdes.c 5.5 (Berkeley) 6/27/91
|
* 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
|
#ifndef lint
|
||||||
@ -115,7 +115,7 @@ init_des_cipher()
|
|||||||
|
|
||||||
des_ct = des_n = 0;
|
des_ct = des_n = 0;
|
||||||
|
|
||||||
/* initialize the initialization vctor */
|
/* initialize the initialization vector */
|
||||||
MEMZERO(ivec, 8);
|
MEMZERO(ivec, 8);
|
||||||
|
|
||||||
/* intialize the padding vector */
|
/* intialize the padding vector */
|
||||||
@ -137,6 +137,8 @@ get_des_char(fp)
|
|||||||
des_ct = cbc_decode(des_buf, fp);
|
des_ct = cbc_decode(des_buf, fp);
|
||||||
}
|
}
|
||||||
return (des_ct > 0) ? des_buf[des_n++] : EOF;
|
return (des_ct > 0) ? des_buf[des_n++] : EOF;
|
||||||
|
#else
|
||||||
|
return (getc(fp));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +155,8 @@ put_des_char(c, fp)
|
|||||||
des_n = 0;
|
des_n = 0;
|
||||||
}
|
}
|
||||||
return (des_ct >= 0) ? (des_buf[des_n++] = c) : EOF;
|
return (des_ct >= 0) ? (des_buf[des_n++] = c) : EOF;
|
||||||
|
#else
|
||||||
|
return (fputc(c, fp));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,6 +172,8 @@ flush_des_file(fp)
|
|||||||
des_n = 0;
|
des_n = 0;
|
||||||
}
|
}
|
||||||
return (des_ct >= 0 && cbc_encode(des_buf, des_n, fp) >= 0) ? 0 : EOF;
|
return (des_ct >= 0 && cbc_encode(des_buf, des_n, fp) >= 0) ? 0 : EOF;
|
||||||
|
#else
|
||||||
|
return (fflush(fp));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: glbl.c,v 1.2 1994/09/24 02:55:26 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -132,8 +132,8 @@ exec_global(interact, gflag)
|
|||||||
for (; *ibufp;)
|
for (; *ibufp;)
|
||||||
if ((status = extract_addr_range()) < 0 ||
|
if ((status = extract_addr_range()) < 0 ||
|
||||||
(status = exec_command()) < 0 ||
|
(status = exec_command()) < 0 ||
|
||||||
status > 0 && (status = display_lines(
|
(status > 0 && (status = display_lines(
|
||||||
current_addr, current_addr, status)) < 0)
|
current_addr, current_addr, status)) < 0))
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: io.c,v 1.3 1994/09/24 02:55:27 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -106,7 +106,7 @@ read_stream(fp, n)
|
|||||||
return ERR;
|
return ERR;
|
||||||
if (appended && size && o_isbinary && o_newline_added)
|
if (appended && size && o_isbinary && o_newline_added)
|
||||||
fputs("newline inserted\n", stderr);
|
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);
|
fputs("newline appended\n", stderr);
|
||||||
if (isbinary && newline_added && !appended)
|
if (isbinary && newline_added && !appended)
|
||||||
size += 1;
|
size += 1;
|
||||||
@ -128,8 +128,8 @@ get_stream_line(fp)
|
|||||||
register int c;
|
register int c;
|
||||||
register int i = 0;
|
register int i = 0;
|
||||||
|
|
||||||
while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || !feof(fp) &&
|
while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || (!feof(fp) &&
|
||||||
!ferror(fp)) && c != '\n') {
|
!ferror(fp))) && c != '\n') {
|
||||||
REALLOC(sbuf, sbufsz, i + 1, ERR);
|
REALLOC(sbuf, sbufsz, i + 1, ERR);
|
||||||
if (!(sbuf[i++] = c))
|
if (!(sbuf[i++] = c))
|
||||||
isbinary = 1;
|
isbinary = 1;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: main.c,v 1.3 1994/09/24 02:55:28 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -154,9 +154,9 @@ main(argc, argv)
|
|||||||
signal(SIGQUIT, SIG_IGN);
|
signal(SIGQUIT, SIG_IGN);
|
||||||
signal(SIGINT, signal_int);
|
signal(SIGINT, signal_int);
|
||||||
#ifdef _POSIX_SOURCE
|
#ifdef _POSIX_SOURCE
|
||||||
if (status = sigsetjmp(env, 1))
|
if ((status = sigsetjmp(env, 1)))
|
||||||
#else
|
#else
|
||||||
if (status = setjmp(env))
|
if ((status = setjmp(env)))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
fputs("\n?\n", stderr);
|
fputs("\n?\n", stderr);
|
||||||
@ -213,7 +213,7 @@ main(argc, argv)
|
|||||||
isglobal = 0;
|
isglobal = 0;
|
||||||
if ((status = extract_addr_range()) >= 0 &&
|
if ((status = extract_addr_range()) >= 0 &&
|
||||||
(status = exec_command()) >= 0)
|
(status = exec_command()) >= 0)
|
||||||
if (!status || status &&
|
if (!status ||
|
||||||
(status = display_lines(current_addr, current_addr,
|
(status = display_lines(current_addr, current_addr,
|
||||||
status)) >= 0)
|
status)) >= 0)
|
||||||
continue;
|
continue;
|
||||||
@ -544,7 +544,7 @@ exec_command()
|
|||||||
return ERR;
|
return ERR;
|
||||||
else if (build_active_list(c == 'g' || c == 'G') < 0)
|
else if (build_active_list(c == 'g' || c == 'G') < 0)
|
||||||
return ERR;
|
return ERR;
|
||||||
else if (n = (c == 'G' || c == 'V'))
|
else if ((n = (c == 'G' || c == 'V')))
|
||||||
GET_COMMAND_SUFFIX();
|
GET_COMMAND_SUFFIX();
|
||||||
isglobal++;
|
isglobal++;
|
||||||
if (exec_global(n, gflag) < 0)
|
if (exec_global(n, gflag) < 0)
|
||||||
@ -840,7 +840,7 @@ exec_command()
|
|||||||
break;
|
break;
|
||||||
case '=':
|
case '=':
|
||||||
GET_COMMAND_SUFFIX();
|
GET_COMMAND_SUFFIX();
|
||||||
printf("%d\n", addr_cnt ? second_addr : addr_last);
|
printf("%ld\n", addr_cnt ? second_addr : addr_last);
|
||||||
break;
|
break;
|
||||||
case '!':
|
case '!':
|
||||||
if (addr_cnt > 0) {
|
if (addr_cnt > 0) {
|
||||||
@ -902,7 +902,7 @@ get_matching_node_addr(pat, dir)
|
|||||||
|
|
||||||
if (!pat) return ERR;
|
if (!pat) return ERR;
|
||||||
do {
|
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);
|
lp = get_addressed_line_node(n);
|
||||||
if ((s = get_sbuf_line(lp)) == NULL)
|
if ((s = get_sbuf_line(lp)) == NULL)
|
||||||
return ERR;
|
return ERR;
|
||||||
@ -910,7 +910,7 @@ get_matching_node_addr(pat, dir)
|
|||||||
NUL_TO_NEWLINE(s, lp->len);
|
NUL_TO_NEWLINE(s, lp->len);
|
||||||
if (!regexec(pat, s, 0, NULL, 0))
|
if (!regexec(pat, s, 0, NULL, 0))
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
} while (n != current_addr);
|
} while (n != current_addr);
|
||||||
sprintf(errmsg, "no match");
|
sprintf(errmsg, "no match");
|
||||||
return ERR;
|
return ERR;
|
||||||
@ -1339,7 +1339,7 @@ strip_escapes(s)
|
|||||||
|
|
||||||
REALLOC(file, filesz, MAXPATHLEN + 1, NULL);
|
REALLOC(file, filesz, MAXPATHLEN + 1, NULL);
|
||||||
/* assert: no trailing escape */
|
/* assert: no trailing escape */
|
||||||
while (file[i++] = (*s == '\\') ? *++s : *s)
|
while ((file[i++] = (*s == '\\') ? *++s : *s))
|
||||||
s++;
|
s++;
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: re.c,v 1.8 1994/09/24 02:55:29 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -67,7 +67,7 @@ get_compiled_pattern()
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
patlock = 0;
|
patlock = 0;
|
||||||
if (n = regcomp(exp, exps, 0)) {
|
if ((n = regcomp(exp, exps, 0))) {
|
||||||
regerror(n, exp, errmsg, sizeof errmsg);
|
regerror(n, exp, errmsg, sizeof errmsg);
|
||||||
free(exp);
|
free(exp);
|
||||||
return exp = NULL;
|
return exp = NULL;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
#ifndef lint
|
||||||
@ -97,7 +97,7 @@ extract_subst_template()
|
|||||||
;
|
;
|
||||||
else if (!isglobal) {
|
else if (!isglobal) {
|
||||||
while ((n = get_tty_line()) == 0 ||
|
while ((n = get_tty_line()) == 0 ||
|
||||||
n > 0 && ibuf[n - 1] != '\n')
|
(n > 0 && ibuf[n - 1] != '\n'))
|
||||||
clearerr(stdin);
|
clearerr(stdin);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -213,8 +213,9 @@ substitute_matching_text(pat, lp, gflag, kth)
|
|||||||
off += i;
|
off += i;
|
||||||
}
|
}
|
||||||
txt += rm[0].rm_eo;
|
txt += rm[0].rm_eo;
|
||||||
} while (*txt && (!changed || (gflag & GSG) && rm[0].rm_eo) &&
|
} while (*txt &&
|
||||||
!regexec(pat, txt, SE_MAX, rm, REG_NOTBOL));
|
(!changed || ((gflag & GSG) && rm[0].rm_eo)) &&
|
||||||
|
!regexec(pat, txt, SE_MAX, rm, REG_NOTBOL));
|
||||||
i = eot - txt;
|
i = eot - txt;
|
||||||
REALLOC(rbuf, rbufsz, off + i + 2, ERR);
|
REALLOC(rbuf, rbufsz, off + i + 2, ERR);
|
||||||
if (i > 0 && !rm[0].rm_eo && (gflag & GSG)) {
|
if (i > 0 && !rm[0].rm_eo && (gflag & GSG)) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Largely rewritten by J.T. Conklin (jtc@wimsey.com)
|
* 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>
|
#include <stdio.h>
|
||||||
@ -193,7 +193,6 @@ struct val *vp;
|
|||||||
int
|
int
|
||||||
yylex ()
|
yylex ()
|
||||||
{
|
{
|
||||||
struct val *vp;
|
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if (*av == NULL)
|
if (*av == NULL)
|
||||||
@ -228,6 +227,8 @@ struct val *vp;
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int yyparse ();
|
||||||
|
|
||||||
void
|
void
|
||||||
main (argc, argv)
|
main (argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
#ifndef lint
|
||||||
@ -117,7 +117,7 @@ main(argc, argv)
|
|||||||
} else {
|
} else {
|
||||||
f_singlecol = 1;
|
f_singlecol = 1;
|
||||||
/* retrieve environment variable, in case of explicit -C */
|
/* retrieve environment variable, in case of explicit -C */
|
||||||
if (p = getenv("COLUMNS"))
|
if ((p = getenv("COLUMNS")))
|
||||||
termwidth = atoi(p);
|
termwidth = atoi(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -371,6 +371,7 @@ display(p, list)
|
|||||||
btotal = maxblock = maxinode = maxlen = maxnlink = 0;
|
btotal = maxblock = maxinode = maxlen = maxnlink = 0;
|
||||||
bcfile = 0;
|
bcfile = 0;
|
||||||
maxuser = maxgroup = maxflags = 0;
|
maxuser = maxgroup = maxflags = 0;
|
||||||
|
flags = NULL;
|
||||||
maxsize = 0;
|
maxsize = 0;
|
||||||
for (cur = list, entries = 0; cur; cur = cur->fts_link) {
|
for (cur = list, entries = 0; cur; cur = cur->fts_link) {
|
||||||
if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) {
|
if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: print.c,v 1.2 1994/09/24 02:55:56 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -188,7 +188,7 @@ printcol(dp)
|
|||||||
dp->s_block);
|
dp->s_block);
|
||||||
if ((base += numrows) >= num)
|
if ((base += numrows) >= num)
|
||||||
break;
|
break;
|
||||||
while ((cnt = (chcnt + TAB & ~(TAB - 1))) <= endcol) {
|
while ((cnt = ((chcnt + TAB) & ~(TAB - 1))) <= endcol){
|
||||||
(void)putchar('\t');
|
(void)putchar('\t');
|
||||||
chcnt = cnt;
|
chcnt = cnt;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: gen_subs.c,v 1.2 1994/09/24 02:56:22 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -135,7 +135,7 @@ ls_list(arcn, now)
|
|||||||
# ifdef NET2_STAT
|
# ifdef NET2_STAT
|
||||||
(void)printf("%4u,%4u ", MAJOR(sbp->st_rdev),
|
(void)printf("%4u,%4u ", MAJOR(sbp->st_rdev),
|
||||||
# else
|
# else
|
||||||
(void)printf("%4lu,%4lu ", MAJOR(sbp->st_rdev),
|
(void)printf("%4lu,%4lu ", (unsigned long)MAJOR(sbp->st_rdev),
|
||||||
# endif
|
# endif
|
||||||
MINOR(sbp->st_rdev));
|
MINOR(sbp->st_rdev));
|
||||||
else {
|
else {
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: options.c,v 1.2 1994/09/24 02:56:22 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -90,34 +90,34 @@ static void cpio_usage __P((void));
|
|||||||
|
|
||||||
FSUB fsub[] = {
|
FSUB fsub[] = {
|
||||||
/* 0: OLD BINARY CPIO */
|
/* 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,
|
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 */
|
/* 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,
|
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 */
|
/* 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,
|
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 */
|
/* 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,
|
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 */
|
/* 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,
|
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 */
|
/* 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,
|
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 F_TAR 4 /* format when called as tar */
|
||||||
#define DEFLT 5 /* default write format from list above */
|
#define DEFLT 5 /* default write format from list above */
|
||||||
@ -367,8 +367,8 @@ pax_options(argc, argv)
|
|||||||
* specify an archive format on write
|
* specify an archive format on write
|
||||||
*/
|
*/
|
||||||
tmp.name = optarg;
|
tmp.name = optarg;
|
||||||
if (frmt = (FSUB *)bsearch((void *)&tmp, (void *)fsub,
|
if ((frmt = (FSUB *)bsearch((void *)&tmp, (void *)fsub,
|
||||||
sizeof(fsub)/sizeof(FSUB), sizeof(FSUB), c_frmt)) {
|
sizeof(fsub)/sizeof(FSUB), sizeof(FSUB), c_frmt))) {
|
||||||
flg |= XF;
|
flg |= XF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -823,7 +823,7 @@ printflg(flg)
|
|||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
|
||||||
(void)fprintf(stderr,"%s: Invalid combination of options:", argv0);
|
(void)fprintf(stderr,"%s: Invalid combination of options:", argv0);
|
||||||
while (nxt = ffs(flg)) {
|
while ((nxt = ffs(flg))) {
|
||||||
flg = flg >> nxt;
|
flg = flg >> nxt;
|
||||||
pos += nxt;
|
pos += nxt;
|
||||||
(void)fprintf(stderr, " -%c", flgch[pos-1]);
|
(void)fprintf(stderr, " -%c", flgch[pos-1]);
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: pat_rep.c,v 1.2 1994/09/24 02:56:24 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -617,7 +617,7 @@ range_match(pattern, test)
|
|||||||
int negate;
|
int negate;
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
|
|
||||||
if (negate = (*pattern == '!'))
|
if ((negate = (*pattern == '!')))
|
||||||
++pattern;
|
++pattern;
|
||||||
|
|
||||||
while ((c = *pattern++) != ']') {
|
while ((c = *pattern++) != ']') {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
#ifndef lint
|
||||||
@ -468,7 +468,7 @@ p_rssize(k, ve) /* doesn't account for text */
|
|||||||
#ifndef NEWVM
|
#ifndef NEWVM
|
||||||
(void)printf("%*d", v->width, pgtok(KI_PROC(k)->p_rssize));
|
(void)printf("%*d", v->width, pgtok(KI_PROC(k)->p_rssize));
|
||||||
#else
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,7 +599,7 @@ pagein(k, ve)
|
|||||||
VAR *v;
|
VAR *v;
|
||||||
|
|
||||||
v = ve->var;
|
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);
|
k->ki_u.u_valid ? k->ki_u.u_ru.ru_majflt : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -630,7 +630,7 @@ tsize(k, ve)
|
|||||||
#ifndef NEWVM
|
#ifndef NEWVM
|
||||||
(void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_xsize));
|
(void)printf("%*d", v->width, pgtok(KI_EPROC(k)->e_xsize));
|
||||||
#else
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -664,7 +664,7 @@ printval(bp, v)
|
|||||||
if (v->flag & LJUST)
|
if (v->flag & LJUST)
|
||||||
*cp++ = '-';
|
*cp++ = '-';
|
||||||
*cp++ = '*';
|
*cp++ = '*';
|
||||||
while (*cp++ = *fcp++);
|
while ((*cp++ = *fcp++));
|
||||||
|
|
||||||
switch (v->type) {
|
switch (v->type) {
|
||||||
case CHAR:
|
case CHAR:
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
#ifndef lint
|
||||||
@ -384,7 +384,7 @@ saveuser(ki)
|
|||||||
struct user *u_addr = (struct user *)USRSTACK;
|
struct user *u_addr = (struct user *)USRSTACK;
|
||||||
|
|
||||||
usp = &ki->ki_u;
|
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)) {
|
(char *)&pstats, sizeof(pstats)) == sizeof(pstats)) {
|
||||||
/*
|
/*
|
||||||
* The u-area might be swapped out, and we can't get
|
* 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
|
* 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.
|
* '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' &&
|
if (isdigit(*cp) &&
|
||||||
(cp - 1 == s || cp[-2] != 't')))
|
(cp == s || (cp[-1] != 't' && cp[-1] != 'p')) &&
|
||||||
|
(cp - 1 == s || cp[-2] != 't'))
|
||||||
*ns++ = 'p';
|
*ns++ = 'p';
|
||||||
(void)strcpy(ns, cp); /* and append the number */
|
(void)strcpy(ns, cp); /* and append the number */
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: rcp.c,v 1.2 1994/09/24 02:56:56 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -226,7 +226,7 @@ main(argc, argv)
|
|||||||
|
|
||||||
(void)signal(SIGPIPE, lostconn);
|
(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);
|
toremote(targ, argc, argv);
|
||||||
else {
|
else {
|
||||||
tolocal(argc, argv); /* Dest is local host. */
|
tolocal(argc, argv); /* Dest is local host. */
|
||||||
@ -248,7 +248,7 @@ toremote(targ, argc, argv)
|
|||||||
if (*targ == 0)
|
if (*targ == 0)
|
||||||
targ = ".";
|
targ = ".";
|
||||||
|
|
||||||
if (thost = strchr(argv[argc - 1], '@')) {
|
if ((thost = strchr(argv[argc - 1], '@'))) {
|
||||||
/* user@host */
|
/* user@host */
|
||||||
*thost++ = 0;
|
*thost++ = 0;
|
||||||
tuser = argv[argc - 1];
|
tuser = argv[argc - 1];
|
||||||
@ -509,7 +509,7 @@ rsource(name, statp)
|
|||||||
closedir(dirp);
|
closedir(dirp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while (dp = readdir(dirp)) {
|
while ((dp = readdir(dirp))) {
|
||||||
if (dp->d_ino == 0)
|
if (dp->d_ino == 0)
|
||||||
continue;
|
continue;
|
||||||
if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
|
if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
|
||||||
@ -539,7 +539,7 @@ sink(argc, argv)
|
|||||||
BUF *bp;
|
BUF *bp;
|
||||||
off_t i, j;
|
off_t i, j;
|
||||||
int amt, count, exists, first, mask, mode, ofd, omode;
|
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];
|
char ch, *cp, *np, *targ, *why, *vect[1], buf[BUFSIZ];
|
||||||
|
|
||||||
#define atime tv[0]
|
#define atime tv[0]
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: util.c,v 1.2 1994/09/24 02:56:57 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -111,7 +111,7 @@ susystem(s, userid)
|
|||||||
char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
sig_t istat, qstat;
|
sig_t istat, qstat;
|
||||||
int status, w;
|
int status;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
pid = vfork();
|
pid = vfork();
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
#ifndef lint
|
||||||
@ -119,6 +119,8 @@ main(argc, argv)
|
|||||||
if (argc < 1)
|
if (argc < 1)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
|
fplen = fptlen = 0;
|
||||||
|
addrp = "";
|
||||||
from_path = from_sys = from_user = NULL;
|
from_path = from_sys = from_user = NULL;
|
||||||
for (offset = 0;;) {
|
for (offset = 0;;) {
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: gfmt.c,v 1.2 1994/09/24 02:58:57 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -64,11 +64,11 @@ gprint(tp, wp, ldisc)
|
|||||||
{
|
{
|
||||||
struct cchar *cp;
|
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);
|
tp->c_cflag, tp->c_iflag, tp->c_lflag, tp->c_oflag);
|
||||||
for (cp = cchars1; cp->name; ++cp)
|
for (cp = cchars1; cp->name; ++cp)
|
||||||
(void)printf("%s=%x:", cp->name, tp->c_cc[cp->sub]);
|
(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
|
void
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: key.c,v 1.2 1994/09/24 02:58:58 davidg Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -286,7 +286,7 @@ f_speed(ip)
|
|||||||
struct info *ip;
|
struct info *ip;
|
||||||
{
|
{
|
||||||
|
|
||||||
(void)printf("%d\n", cfgetospeed(&ip->t));
|
(void)printf("%ld\n", cfgetospeed(&ip->t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
#ifndef lint
|
||||||
@ -115,7 +115,7 @@ main(argc, argv)
|
|||||||
struct value *valsp;
|
struct value *valsp;
|
||||||
struct filestat fs;
|
struct filestat fs;
|
||||||
char c, **ap, *opname, *p;
|
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)
|
if ((p = argv[0]) == NULL)
|
||||||
errx(2, "test: argc is zero");
|
errx(2, "test: argc is zero");
|
||||||
@ -248,7 +248,7 @@ main(argc, argv)
|
|||||||
valsp->u.num);
|
valsp->u.num);
|
||||||
#else
|
#else
|
||||||
(void)sprintf(p,
|
(void)sprintf(p,
|
||||||
"%d", valsp->u.num);
|
"%ld", valsp->u.num);
|
||||||
#endif
|
#endif
|
||||||
valsp->u.string = p;
|
valsp->u.string = p;
|
||||||
} else if (valsp->type == BOOLEAN) {
|
} else if (valsp->type == BOOLEAN) {
|
||||||
|
Loading…
Reference in New Issue
Block a user