fixes
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void *calloc_or_fail(size_t size);
|
||||
void *malloc_or_fail(size_t size);
|
||||
@@ -14,4 +17,17 @@ int hex_string_to_hex_value (uint8_t *hex_value, const char *hex_string, int siz
|
||||
|
||||
char *itoa(int i);
|
||||
|
||||
#define findInList(keY, result, list, element_type) {\
|
||||
int i;\
|
||||
for (i=0; i<sizeof(list)/sizeof(element_type) ; i++)\
|
||||
if (list[i].key==keY) {\
|
||||
result=list[i].val;\
|
||||
break;\
|
||||
}\
|
||||
AssertFatal(i < sizeof(list)/sizeof(element_type), "List %s doesn't contain %s\n",#list, #keY); \
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user