8 #define HEAP_LOG_0() APP_LOG(APP_LOG_LEVEL_DEBUG, "Free Heap: %zu b, Used Heap: %zu b", heap_bytes_free(), heap_bytes_used()) 9 #define HEAP_LOG_1(str) if (str != NULL) { APP_LOG(APP_LOG_LEVEL_DEBUG, "Free Heap: %zu b, Used Heap: %zu b -- %s", heap_bytes_free(), heap_bytes_used(), str); } 10 #define GET_MACRO(_0, _1, NAME, ...) NAME 11 #define HEAP_LOG(...) GET_MACRO(_0, ##__VA_ARGS__, HEAP_LOG_1, HEAP_LOG_0)(__VA_ARGS__) 17 #define strxlen(str) (str==NULL?0:strlen(str)) 20 void textLayer_stylize(TextLayer*,
const GColor,
const GColor,
const GTextAlignment,
const GFont);
23 bool strxcpy(
char* buffer,
size_t bufsize,
const char* source,
const char* readable);
MagPebApp_ErrCode strxcpyalloc(char **dest, const char *src)
Definition: misc.c:65
MagPebApp_ErrCode
Definition: magpebapp.h:12
void textLayer_stylize(TextLayer *, const GColor, const GColor, const GTextAlignment, const GFont)
Stylizes the text layer to the spec.
Definition: misc.c:8
bool strxcpy(char *buffer, size_t bufsize, const char *source, const char *readable)
Copies a string with error handling and logging.
Definition: misc.c:24