summaryrefslogtreecommitdiff
path: root/gnu/lib/libg++/include/Integer.hP
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1994-08-08 05:52:55 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1994-08-08 05:52:55 +0000
commit61d5ffaf10e8b89118dab351dc6117a08bee6887 (patch)
treed83d0a76705cc3b36f51f779e7e2879fc5183aaf /gnu/lib/libg++/include/Integer.hP
parent250fc6c83949c3cc35e1958ee5821ee8d08b7748 (diff)
I belive this should be makeable under 2.0. There may be outstanding
issues in these areas: .h's installed .hP's installed -lcurses interaction files needed in ~/legal for copyleft reasons.
Notes
svn path=/vendor/misc-GNU/dist3/; revision=1935
Diffstat (limited to 'gnu/lib/libg++/include/Integer.hP')
-rw-r--r--gnu/lib/libg++/include/Integer.hP30
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/lib/libg++/include/Integer.hP b/gnu/lib/libg++/include/Integer.hP
new file mode 100644
index 000000000000..b8a803942656
--- /dev/null
+++ b/gnu/lib/libg++/include/Integer.hP
@@ -0,0 +1,30 @@
+// Stuff used to implement the Integer class.
+// WARNING: Its internals WILL change!
+
+/*
+ Sizes of shifts for multiple-precision arithmetic.
+ These should not be changed unless Integer representation
+ as unsigned shorts is changed in the implementation files.
+*/
+
+#define I_SHIFT (sizeof(short) * CHAR_BIT)
+#define I_RADIX ((unsigned long)(1L << I_SHIFT))
+#define I_MAXNUM ((unsigned long)((I_RADIX - 1)))
+#define I_MINNUM ((unsigned long)(I_RADIX >> 1))
+#define I_POSITIVE 1
+#define I_NEGATIVE 0
+
+/* All routines assume SHORT_PER_LONG > 1 */
+#define SHORT_PER_LONG ((unsigned)(((sizeof(long) + sizeof(short) - 1) / sizeof(short))))
+#define CHAR_PER_LONG ((unsigned)sizeof(long))
+
+/*
+ minimum and maximum sizes for an IntRep
+*/
+
+#define MINIntRep_SIZE 16
+#define MAXIntRep_SIZE I_MAXNUM
+
+#ifndef MALLOC_MIN_OVERHEAD
+#define MALLOC_MIN_OVERHEAD 4
+#endif