Electroneum
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)   #x
 
#define STR(x)   STR_(x)
 
#define DEBUG_CONFIG_MSG(x)   "DEBUG_CONFIG: " x
 
#define DEBUG_CONFIG_DEF(x)   DEBUG_CONFIG_MSG(#x "=" STR(x))
 
#define TEST_FAILURE(msg)
 
#define EXPECT(x, c)   (x)
 
#define CHECK(cond)
 
#define VERIFY_CHECK(cond)   do { (void)(cond); } while(0)
 
#define VERIFY_SETUP(stmt)
 
#define ALIGNMENT   16
 
#define ROUND_TO_ALIGN(size)   ((((size) + ALIGNMENT - 1) / ALIGNMENT) * ALIGNMENT)
 
#define SECP256K1_RESTRICT
 
#define I64FORMAT   "lld"
 
#define I64uFORMAT   "llu"
 
#define SECP256K1_GNUC_EXT
 
#define SECP256K1_WIDEMUL_INT64   1
 
#define __has_builtin(x)   0
 

Macro Definition Documentation

◆ __has_builtin

#define __has_builtin (   x)    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.

◆ DEBUG_CONFIG_DEF

#define DEBUG_CONFIG_DEF (   x)    DEBUG_CONFIG_MSG(#x "=" STR(x))

Definition at line 18 of file util.h.

◆ DEBUG_CONFIG_MSG

#define DEBUG_CONFIG_MSG (   x)    "DEBUG_CONFIG: " x

Definition at line 17 of file util.h.

◆ EXPECT

#define EXPECT (   x,
 
)    (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)    ((((size) + ALIGNMENT - 1) / ALIGNMENT) * ALIGNMENT)

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)    STR_(x)

Definition at line 16 of file util.h.

◆ STR_

#define STR_ (   x)    #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.

◆ VERIFY_CHECK

#define VERIFY_CHECK (   cond)    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.