blob: 6c70649124c0d40bd339bc3f9b41795c8a17eef5 (
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
30
|
$NetBSD: patch-aa,v 1.2 2006/06/09 10:26:05 rillig Exp $
--- /dev/null Tue Apr 17 00:09:13 2001
+++ src/ipmpar.c
@@ -0,0 +1,25 @@
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.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(%d)\n", *i);
+ exit (1);
+ return 0;
+}
|