ptr_diff is a long in ANSI C; cast to int
authorceriel <none@none>
Tue, 23 Apr 1991 09:35:51 +0000 (09:35 +0000)
committerceriel <none@none>
Tue, 23 Apr 1991 09:35:51 +0000 (09:35 +0000)
lang/pc/libpc/catch.c
lang/pc/libpc/wrf.c
lang/pc/libpc/wri.c
lang/pc/libpc/wrl.c
lang/pc/libpc/wrr.c
lang/pc/libpc/wrz.c

index 1526e62..2041402 100644 (file)
@@ -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);
index acc42d9..5ee6e62 100644 (file)
@@ -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);
 }
index 11a8dc9..5c06e52 100644 (file)
@@ -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; {
index ae6018b..f5a3d67 100644 (file)
@@ -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; {
index 4f8cfc3..5c2df66 100644 (file)
@@ -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; {
index b14b5f2..220c66a 100644 (file)
@@ -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);
 }