2013-02-15 Niels Möller <nisse@lysator.liu.se>
+ * testsuite/testutils.c: Removed redundant includes.
+ (die): New function.
+
Integrate ecc_mul_g.
* ecc.h: New file.
* ecc-j-to-a.c: New file.
#include <assert.h>
#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
/* -1 means invalid */
static const signed char hex_digits[0x100] =
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
};
+void
+die(const char *format, ...)
+{
+ va_list args;
+ va_start(args, format);
+#if WITH_HOGWEED
+ gmp_vfprintf(stderr, format, args);
+#else
+ vfprintf(stderr, format, args);
+#endif
+ va_end(args);
+
+ abort ();
+}
+
void *
xalloc(size_t size)
{
#include "nettle-types.h"
-#include <string.h>
+#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#if HAVE_LIBGMP
# include "bignum.h"
extern "C" {
#endif
+void
+die(const char *format, ...) PRINTF_STYLE (1, 2) NORETURN;
+
void *
xalloc(size_t size);