#include <stdint.h>
#include <inttypes.h>

#ifndef RBT_NO_CMAKE
#  include "cmake_config.h"
#endif //RBT_NO_CMAKE

#include "common.h"
#include "debug.h"

/*
  key.h
*/
#define RBT_KEY_H_PREFIX_ string_
#define RBT_PIN_T uint_fast8_t
#define RBT_KEY_SIZE_T uint_fast32_t
#define RBT_KEY_SIZE_T_FORMAT PRIuFAST32
#include "key.h"





/*
  set.h
*/
#define RBT_SET_H_PREFIX_ RBT_KEY_H_PREFIX_
#define RBT_WRAPPER_H_PREFIX_ RBT_SET_H_PREFIX_
#define RBT_KEY_T char *
// #define RBT_KEY_SIZE_FIXED 0
// #define RBT_KEY_SIZE_FIXED 0x100
/*
  strlen(key) ignores the terminating null character. "+1" is required to take
  it into account but this is only necessary when using the traverse function
  and only when the pin type set above is not the same width as a char.
*/
// #define RBT_KEY_COUNT_BITS(key) ((strlen(key) + 1) * BITS_PER_BYTE)
#define RBT_KEY_COUNT_BITS(key) (strlen(key) * BITS_PER_BYTE)
#define RBT_KEY_PTR(key) (key)
#define RBT_KEY_FPRINT(fd, key) fprintf(fd, "%s", key);

#define RBT_NODE_CACHE_SIZE 100

#include "set.h"
