pxl8/src/pxl8_macros.h

19 lines
336 B
C
Raw Normal View History

2025-08-13 15:04:49 -05:00
#pragma once
#include <string.h>
2025-09-24 00:39:44 -05:00
#ifndef pxl8_min
#define pxl8_min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef pxl8_max
#define pxl8_max(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef pxl8_strncpy
#define pxl8_strncpy(dst, src, size) do { \
strncpy((dst), (src), (size) - 1); \
(dst)[(size) - 1] = '\0'; \
} while (0)
#endif