projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bell 32V development
[unix-history]
/
usr
/
src
/
libI77
/
fmtlib.c
diff --git
a/usr/src/libI77/fmtlib.c
b/usr/src/libI77/fmtlib.c
index
d745c66
..
4eaa404
100644
(file)
--- a/
usr/src/libI77/fmtlib.c
+++ b/
usr/src/libI77/fmtlib.c
@@
-1,6
+1,5
@@
-#define MAXINTLENGTH 12
-char *icvt(value,ndigit,sign, base) long value; int *ndigit,*sign;
-register int base;
+#define MAXINTLENGTH 10
+char *icvt(value,ndigit,sign) long value; int *ndigit,*sign;
{ static char buf[MAXINTLENGTH+1];
register int i;
if(value>0) *sign=0;
{ static char buf[MAXINTLENGTH+1];
register int i;
if(value>0) *sign=0;
@@
-15,8
+14,8
@@
register int base;
return(&buf[MAXINTLENGTH]);
}
for(i=MAXINTLENGTH-1;value>0;i--)
return(&buf[MAXINTLENGTH]);
}
for(i=MAXINTLENGTH-1;value>0;i--)
- { *(buf+i)=(int)(value%
base
)+'0';
- value /=
base
;
+ { *(buf+i)=(int)(value%
10
)+'0';
+ value /=
10
;
}
*ndigit=MAXINTLENGTH-1-i;
return(&buf[i+1]);
}
*ndigit=MAXINTLENGTH-1-i;
return(&buf[i+1]);