summaryrefslogtreecommitdiff
path: root/gnu/lib/libf2c/libI77/fmtlib.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-12-30 17:35:29 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-12-30 17:35:29 +0000
commit157d4bd650a3e421c5bac48da7e528af9a6a76e2 (patch)
tree0379fb2c85e183c3c5669d425b3e42ae4592791b /gnu/lib/libf2c/libI77/fmtlib.c
parent791194721fec8918406191b62da6dc41f2d690e5 (diff)
Actual synch with 3.3.5.
Changes in Makefile.bsd-wrapper to avoid prereq. Fix in lib*/config.h.in to include the right ones and get the correct definitions. Bump of shlib_version accordingly.
Diffstat (limited to 'gnu/lib/libf2c/libI77/fmtlib.c')
-rw-r--r--gnu/lib/libf2c/libI77/fmtlib.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/gnu/lib/libf2c/libI77/fmtlib.c b/gnu/lib/libf2c/libI77/fmtlib.c
index 69c0d9b406f..3d2a299d232 100644
--- a/gnu/lib/libf2c/libI77/fmtlib.c
+++ b/gnu/lib/libf2c/libI77/fmtlib.c
@@ -10,37 +10,37 @@
#define ulongint unsigned long
#endif
-#ifdef KR_headers
-char *f__icvt(value,ndigit,sign, base) longint value; int *ndigit,*sign;
- register int base;
-#else
-char *f__icvt(longint value, int *ndigit, int *sign, int base)
-#endif
+char *
+f__icvt (longint value, int *ndigit, int *sign, int base)
{
- static char buf[MAXINTLENGTH+1];
- register int i;
- ulongint uvalue;
+ static char buf[MAXINTLENGTH + 1];
+ register int i;
+ ulongint uvalue;
- if(value > 0) {
- uvalue = value;
- *sign = 0;
- }
- else if (value < 0) {
- uvalue = -value;
- *sign = 1;
- }
- else {
- *sign = 0;
- *ndigit = 1;
- buf[MAXINTLENGTH-1] = '0';
- return &buf[MAXINTLENGTH-1];
- }
- i = MAXINTLENGTH;
- do {
- buf[--i] = (uvalue%base) + '0';
- uvalue /= base;
- }
- while(uvalue > 0);
- *ndigit = MAXINTLENGTH - i;
- return &buf[i];
- }
+ if (value > 0)
+ {
+ uvalue = value;
+ *sign = 0;
+ }
+ else if (value < 0)
+ {
+ uvalue = -value;
+ *sign = 1;
+ }
+ else
+ {
+ *sign = 0;
+ *ndigit = 1;
+ buf[MAXINTLENGTH - 1] = '0';
+ return &buf[MAXINTLENGTH - 1];
+ }
+ i = MAXINTLENGTH;
+ do
+ {
+ buf[--i] = (uvalue % base) + '0';
+ uvalue /= base;
+ }
+ while (uvalue > 0);
+ *ndigit = MAXINTLENGTH - i;
+ return &buf[i];
+}