Jens Rohler: Include guard
[infodrom/dtaus] / bigint.h
index 6a7754c..7d10b9a 100644 (file)
--- a/bigint.h
+++ b/bigint.h
@@ -23,6 +23,9 @@
  * 4294967295 is max (unsigned long int)
  */
 
+#ifndef _BIGINT_H_
+#define _BIGINT_H_
+
 #define BIGINT_LEN     2
 #define BIGINT_MAX     1000000000
 #define BIGINT_PREC    9
@@ -41,3 +44,12 @@ bigint bigint_int(int num);
 bigint bigint_string(char *s);
 
 void bigint_sprintf (char *res, char *format, bigint a);
+
+/* compares two bigints
+   a < b  => -1
+   a > b  =>  1
+   a == b =>  0
+*/
+int bigint_cmp(bigint a, bigint b);
+
+#endif /* _BIGINT_H_ */