Electroneum
Loading...
Searching...
No Matches
util.h File Reference
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <limits.h>
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  secp256k1_callback

Macros

#define STR_(x)
#define STR(x)
#define DEBUG_CONFIG_MSG(x)
#define DEBUG_CONFIG_DEF(x)
#define TEST_FAILURE(msg)
#define EXPECT(x, c)
#define CHECK(cond)
#define VERIFY_CHECK(cond)
#define VERIFY_SETUP(stmt)
#define ALIGNMENT   16
#define ROUND_TO_ALIGN(size)
#define SECP256K1_RESTRICT
#define I64FORMAT   "lld"
#define I64uFORMAT   "llu"
#define SECP256K1_GNUC_EXT
#define SECP256K1_WIDEMUL_INT64   1
#define __has_builtin(x)

Macro Definition Documentation

◆ __has_builtin

#define __has_builtin ( x)
Value:
0

Definition at line 242 of file util.h.

◆ ALIGNMENT

#define ALIGNMENT   16

Definition at line 122 of file util.h.

◆ CHECK

#define CHECK ( cond)
Value:
do { \
if (EXPECT(!(cond), 0)) { \
TEST_FAILURE("test condition failed: " #cond); \
} \
} while(0)
#define EXPECT(x, c)
Definition util.h:71

Definition at line 81 of file util.h.

81#define CHECK(cond) do { \
82 if (EXPECT(!(cond), 0)) { \
83 TEST_FAILURE("test condition failed: " #cond); \
84 } \
85} while(0)

◆ DEBUG_CONFIG_DEF

#define DEBUG_CONFIG_DEF ( x)
Value:
#define DEBUG_CONFIG_MSG(x)
Definition util.h:17
#define STR(x)
Definition util.h:16

Definition at line 18 of file util.h.

◆ DEBUG_CONFIG_MSG

#define DEBUG_CONFIG_MSG ( x)
Value:
"DEBUG_CONFIG: " x

Definition at line 17 of file util.h.

◆ EXPECT

#define EXPECT ( x,
c )
Value:
(x)

Definition at line 71 of file util.h.

◆ I64FORMAT

#define I64FORMAT   "lld"

Definition at line 148 of file util.h.

◆ I64uFORMAT

#define I64uFORMAT   "llu"

Definition at line 149 of file util.h.

◆ ROUND_TO_ALIGN

#define ROUND_TO_ALIGN ( size)
Value:
((((size) + ALIGNMENT - 1) / ALIGNMENT) * ALIGNMENT)
#define ALIGNMENT
Definition util.h:122

Definition at line 125 of file util.h.

◆ SECP256K1_GNUC_EXT

#define SECP256K1_GNUC_EXT

Definition at line 155 of file util.h.

◆ SECP256K1_RESTRICT

#define SECP256K1_RESTRICT

Definition at line 137 of file util.h.

◆ SECP256K1_WIDEMUL_INT64

#define SECP256K1_WIDEMUL_INT64   1

Definition at line 238 of file util.h.

◆ STR

#define STR ( x)
Value:
STR_(x)
#define STR_(x)
Definition util.h:15

Definition at line 16 of file util.h.

◆ STR_

#define STR_ ( x)
Value:
#x

Definition at line 15 of file util.h.

◆ TEST_FAILURE

#define TEST_FAILURE ( msg)
Value:
do { \
fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, msg); \
abort(); \
} while(0)

Definition at line 62 of file util.h.

62#define TEST_FAILURE(msg) do { \
63 fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, msg); \
64 abort(); \
65} while(0)

◆ VERIFY_CHECK

#define VERIFY_CHECK ( cond)
Value:
do { (void)(cond); } while(0)

Definition at line 96 of file util.h.

◆ VERIFY_SETUP

#define VERIFY_SETUP ( stmt)

Definition at line 97 of file util.h.