summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc/f/runtime/libI77/fmtlib.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-04-09 13:44:52 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-04-09 13:44:52 +0000
commit454abcd55d12d4ef15ec29c89b2ad4d47f3c82d1 (patch)
tree03ae5cb442348bb46932a1a62039a44962996f47 /gnu/usr.bin/gcc/f/runtime/libI77/fmtlib.c
parentc1c4ca433ba86feadc773a80691f0e693d52ecd8 (diff)
Revert to older (working) version of gcc, plus recent changes.
Diffstat (limited to 'gnu/usr.bin/gcc/f/runtime/libI77/fmtlib.c')
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/fmtlib.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/fmtlib.c b/gnu/usr.bin/gcc/f/runtime/libI77/fmtlib.c
index 91483fc5290..1c6801e68b5 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/fmtlib.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/fmtlib.c
@@ -5,8 +5,6 @@
#ifndef Allow_TYQUAD
#undef longint
#define longint long
-#undef ulongint
-#define ulongint unsigned long
#endif
#ifdef KR_headers
@@ -15,17 +13,13 @@ char *f__icvt(value,ndigit,sign, base) longint value; int *ndigit,*sign;
#else
char *f__icvt(longint value, int *ndigit, int *sign, int base)
#endif
-{
- static char buf[MAXINTLENGTH+1];
+{ static char buf[MAXINTLENGTH+1];
register int i;
- ulongint uvalue;
- if(value > 0) {
- uvalue = value;
+ if(value > 0)
*sign = 0;
- }
else if (value < 0) {
- uvalue = -value;
+ value = -value;
*sign = 1;
}
else {
@@ -36,10 +30,10 @@ char *f__icvt(longint value, int *ndigit, int *sign, int base)
}
i = MAXINTLENGTH;
do {
- buf[--i] = (uvalue%base) + '0';
- uvalue /= base;
+ buf[--i] = (value%base) + '0';
+ value /= base;
}
- while(uvalue > 0);
+ while(value > 0);
*ndigit = MAXINTLENGTH - i;
return &buf[i];
}