summaryrefslogtreecommitdiff
path: root/math/dcdflib.f/patches/patch-aa
blob: ec660b8565cefe59170b9fe10f9284b2c4e4613b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$NetBSD: patch-aa,v 1.1.1.1 2001/04/17 00:19:57 jtb Exp $

--- /dev/null	Tue Apr 17 00:09:13 2001
+++ ipmpar.c
@@ -0,0 +1,24 @@
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#include <stdio.h>
+
+int
+ipmpar_ (int *i)
+{
+    switch (*i) {
+    case 1:  return 2;
+    case 2:  return (sizeof(int)*(CHAR_BIT) - 1);
+    case 3:  return INT_MAX;
+    case 4:  return FLT_RADIX;
+    case 5:  return FLT_MANT_DIG;
+    case 6:  return FLT_MIN_EXP;
+    case 7:  return FLT_MAX_EXP;
+    case 8:  return DBL_MANT_DIG;
+    case 9:  return DBL_MIN_EXP;
+    case 10: return FLT_MAX_EXP;
+    }
+    fprintf (stderr, "invalid argument: ipmpar(%ld)\n", *i);
+    exit (1);
+    return 0;
+}