X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/0f4556f12c8f75078501c9d1338ae7648a97f975..95f51977ddc18faa2e212f30c00a39540b39f325:/usr/src/usr.lib/libmp/mout.c diff --git a/usr/src/usr.lib/libmp/mout.c b/usr/src/usr.lib/libmp/mout.c index c074d94781..e002c8fb50 100644 --- a/usr/src/usr.lib/libmp/mout.c +++ b/usr/src/usr.lib/libmp/mout.c @@ -1,4 +1,6 @@ -/* @(#)mout.c 4.2 6/14/83 */ +#ifndef lint +static char sccsid[] = "@(#)mout.c 5.3 (Berkeley) 3/2/87"; +#endif not lint #include #include @@ -17,7 +19,7 @@ m_in(a,b,f) MINT *a; FILE *f; while((c=getc(f))!=EOF) switch(c) { - case '\\': getc(f); + case '\\': (void)getc(f); continue; case '\t': case '\n': a->len *= sign; @@ -46,7 +48,7 @@ m_out(a,b,f) MINT *a; FILE *f; { int sign,xlen,i; short r; MINT x; - char *obuf; + char *obuf, *malloc(); register char *bp; sign=1; xlen=a->len; @@ -61,12 +63,12 @@ m_out(a,b,f) MINT *a; FILE *f; x.len=xlen; x.val=xalloc(xlen,"m_out"); for(i=0;ival[i]; - obuf=(char *)malloc(7*xlen); + obuf=malloc(7*(unsigned)xlen); bp=obuf+7*xlen-1; *bp--=0; while(x.len>0) { for(i=0;i<10&&x.len>0;i++) - { sdiv(&x,b,&x,&r); + { sdiv(&x,(short)b,&x,&r); *bp--=r+'0'; } if(x.len>0) *bp--=' '; @@ -77,7 +79,7 @@ m_out(a,b,f) MINT *a; FILE *f; FREE(x) return; } -sdiv(a,n,q,r) MINT *a,*q; short *r; +sdiv(a,n,q,r) MINT *a,*q; short n; short *r; { MINT x,y; int sign; sign=1; @@ -98,7 +100,7 @@ sdiv(a,n,q,r) MINT *a,*q; short *r; *r = *r*sign; return; } -s_div(a,n,q,r) MINT *a,*q; short *r; +s_div(a,n,q,r) MINT *a,*q; short n; short *r; { int qlen,i; long int x; short *qval;