be more careful with casts.

This commit is contained in:
cgd 1994-12-23 13:24:39 +00:00
parent 42f0dae5e3
commit 58f1733118
4 changed files with 15 additions and 13 deletions

View File

@ -36,7 +36,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)eval.c 8.1 (Berkeley) 5/31/93";*/
static char *rcsid = "$Id: eval.c,v 1.17 1994/12/05 19:07:37 cgd Exp $";
static char *rcsid = "$Id: eval.c,v 1.18 1994/12/23 13:24:39 cgd Exp $";
#endif /* not lint */
/*
@ -208,7 +208,7 @@ evaltree(n, flags)
#ifndef NO_HISTORY
displayhist = 1; /* show history substitutions done with fc */
#endif
TRACE(("evaltree(0x%x: %d) called\n", (int)n, n->type));
TRACE(("evaltree(0x%lx: %d) called\n", (long)n, n->type));
switch (n->type) {
case NSEMI:
evaltree(n->nbinary.ch1, 0);
@ -479,7 +479,7 @@ evalpipe(n)
int prevfd;
int pip[2];
TRACE(("evalpipe(0x%x) called\n", (int)n));
TRACE(("evalpipe(0x%lx) called\n", (long)n));
pipelen = 0;
for (lp = n->npipe.cmdlist ; lp ; lp = lp->next)
pipelen++;
@ -613,7 +613,7 @@ evalcommand(cmd, flags, backcmd)
char *lastarg;
/* First expand the arguments. */
TRACE(("evalcommand(0x%x, %d) called\n", (int)cmd, flags));
TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags));
setstackmark(&smark);
arglist.lastp = &arglist.list;
varlist.lastp = &varlist.list;

View File

@ -36,7 +36,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)jobs.c 8.1 (Berkeley) 5/31/93";*/
static char *rcsid = "$Id: jobs.c,v 1.13 1994/12/04 07:12:15 cgd Exp $";
static char *rcsid = "$Id: jobs.c,v 1.14 1994/12/23 13:24:41 cgd Exp $";
#endif /* not lint */
#include "shell.h"
@ -509,7 +509,8 @@ makejob(node, nprocs)
jp->ps = &jp->ps0;
}
INTON;
TRACE(("makejob(0x%x, %d) returns %%%d\n", (int)node, nprocs, jp - jobtab + 1));
TRACE(("makejob(0x%lx, %d) returns %%%d\n", (long)node, nprocs,
jp - jobtab + 1));
return jp;
}
@ -538,7 +539,8 @@ forkshell(jp, n, mode)
int pid;
int pgrp;
TRACE(("forkshell(%%%d, 0x%x, %d) called\n", jp - jobtab, (int)n, mode));
TRACE(("forkshell(%%%d, 0x%lx, %d) called\n", jp - jobtab, (long)n,
mode));
INTOFF;
pid = fork();
if (pid == -1) {

View File

@ -36,7 +36,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)trap.c 8.1 (Berkeley) 5/31/93";*/
static char *rcsid = "$Id: trap.c,v 1.10 1994/12/05 19:07:57 cgd Exp $";
static char *rcsid = "$Id: trap.c,v 1.11 1994/12/23 13:24:43 cgd Exp $";
#endif /* not lint */
#include "shell.h"
@ -146,7 +146,7 @@ clear_traps() {
* out what it should be set to.
*/
int
long
setsignal(signo)
int signo;
{
@ -215,7 +215,7 @@ setsignal(signo)
case S_IGN: sigact = SIG_IGN; break;
}
*t = action;
return (int)signal(signo, sigact);
return (long)signal(signo, sigact);
}
/*

View File

@ -34,21 +34,21 @@
* SUCH DAMAGE.
*
* from: @(#)trap.h 8.1 (Berkeley) 5/31/93
* $Id: trap.h,v 1.6 1994/06/11 16:12:38 mycroft Exp $
* $Id: trap.h,v 1.7 1994/12/23 13:24:45 cgd Exp $
*/
extern int pendingsigs;
#ifdef __STDC__
void clear_traps(void);
int setsignal(int);
long setsignal(int);
void ignoresig(int);
void dotrap(void);
void setinteractive(int);
void exitshell(int);
#else
void clear_traps();
int setsignal();
long setsignal();
void ignoresig();
void dotrap();
void setinteractive();