ptr_diff is a long in ANSI C; cast to int
This commit is contained in:
parent
d6a224ea5f
commit
e8ff85905f
|
@ -145,7 +145,7 @@ _catch(erno) unsigned erno; {
|
|||
p = q;
|
||||
while (*p)
|
||||
p++;
|
||||
if (_write(2,q,p-q) < 0)
|
||||
if (_write(2,q,(int)(p-q)) < 0)
|
||||
;
|
||||
}
|
||||
_exit(erno);
|
||||
|
|
|
@ -64,5 +64,5 @@ _wrf(n,w,r,f) int n,w; double r; struct file *f; {
|
|||
*p++ = (*b ? *b++ : FILL_CHAR);
|
||||
assert(p <= buf+BUFSIZE);
|
||||
}
|
||||
_wstrin(w,p-buf,buf,f);
|
||||
_wstrin(w,(int)(p-buf),buf,f);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ _wsi(w,i,f) int w,i; struct file *f; {
|
|||
while (j /= 10);
|
||||
if (i<0)
|
||||
*--p = '-';
|
||||
_wstrin(w,&buf[SZ]-p,p,f);
|
||||
_wstrin(w,(int)(&buf[SZ]-p),p,f);
|
||||
}
|
||||
|
||||
_wri(i,f) int i; struct file *f; {
|
||||
|
|
|
@ -43,7 +43,7 @@ _wsl(w,l,f) int w; long l; struct file *f; {
|
|||
} while (j /= 10);
|
||||
if (l<0)
|
||||
*--p = '-';
|
||||
_wstrin(w,&buf[11]-p,p,f);
|
||||
_wstrin(w,(int)(&buf[11]-p),p,f);
|
||||
}
|
||||
|
||||
_wrl(l,f) long l; struct file *f; {
|
||||
|
|
|
@ -59,7 +59,7 @@ _wsr(w,r,f) int w; double r; struct file *f; {
|
|||
*p++ = '0' + (d/10) % 10;
|
||||
*p++ = '0' + d%10;
|
||||
}
|
||||
_wstrin(w,p-buf,buf,f);
|
||||
_wstrin(w,(int)(p-buf),buf,f);
|
||||
}
|
||||
|
||||
_wrr(r,f) double r; struct file *f; {
|
||||
|
|
|
@ -27,12 +27,12 @@ _wsz(w,s,f) int w; char *s; struct file *f; {
|
|||
|
||||
if (w < 0) _trp(EWIDTH);
|
||||
for (p=s; *p; p++);
|
||||
_wss(w,p-s,s,f);
|
||||
_wss(w,(int)(p-s),s,f);
|
||||
}
|
||||
|
||||
_wrz(s,f) char *s; struct file *f; {
|
||||
char *p;
|
||||
|
||||
for (p=s; *p; p++);
|
||||
_wrs(p-s,s,f);
|
||||
_wrs((int)(p-s),s,f);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue