File tree Expand file tree Collapse file tree 2 files changed +24
-22
lines changed Expand file tree Collapse file tree 2 files changed +24
-22
lines changed Original file line number Diff line number Diff line change 1111
1212#include <stdlib.h>
1313#include <stdint.h>
14- #include <stdio.h>
1514#include <limits.h>
1615
1716#define STR_ (x ) #x
1817#define STR (x ) STR_(x)
1918#define DEBUG_CONFIG_MSG (x ) "DEBUG_CONFIG: " x
2019#define DEBUG_CONFIG_DEF (x ) DEBUG_CONFIG_MSG(#x "=" STR(x))
2120
22- /* Debug helper for printing arrays of unsigned char. */
23- #define PRINT_BUF (buf , len ) do { \
24- printf("%s[%lu] = ", #buf, (unsigned long)len); \
25- print_buf_plain(buf, len); \
26- } while(0)
27-
28- static void print_buf_plain (const unsigned char * buf , size_t len ) {
29- size_t i ;
30- printf ("{" );
31- for (i = 0 ; i < len ; i ++ ) {
32- if (i % 8 == 0 ) {
33- printf ("\n " );
34- } else {
35- printf (" " );
36- }
37- printf ("0x%02X," , buf [i ]);
38- }
39- printf ("\n}\n" );
40- }
41-
4221# if (!defined(__STDC_VERSION__ ) || (__STDC_VERSION__ < 199901L ) )
4322# if SECP256K1_GNUC_PREREQ (2 ,7 )
4423# define SECP256K1_INLINE __inline__
Original file line number Diff line number Diff line change 1- 148,152c148,150
1+ 14d13
2+ < #include <stdio.h>
3+ 22,41d20
4+ < /* Debug helper for printing arrays of unsigned char. */
5+ < #define PRINT_BUF(buf, len) do { \
6+ < printf("%s[%lu] = ", #buf, (unsigned long)len); \
7+ < print_buf_plain(buf, len); \
8+ < } while(0)
9+ <
10+ < static void print_buf_plain(const unsigned char *buf, size_t len) {
11+ < size_t i;
12+ < printf("{");
13+ < for (i = 0; i < len; i++) {
14+ < if (i % 8 == 0) {
15+ < printf("\n ");
16+ < } else {
17+ < printf(" ");
18+ < }
19+ < printf("0x%02X,", buf[i]);
20+ < }
21+ < printf("\n}\n");
22+ < }
23+ <
24+ 148,152c127,129
225< void *ret = malloc(size);
326< if (ret == NULL) {
427< secp256k1_callback_call(cb, "Out of memory");
You can’t perform that action at this time.
0 commit comments