More C autoformat

This commit is contained in:
Kovid Goyal 2026-08-05 19:29:02 +05:30
parent bcf5ffe73f
commit ffd09aad91
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
4 changed files with 21 additions and 11 deletions

5
glfw/x11_init.c vendored
View file

@ -99,8 +99,9 @@ detectEWMH(void) {
#define ALL_ATOMS \
S(NET_WM_STATE) \
S(NET_WM_STATE_ABOVE) S(NET_WM_STATE_BELOW) S(NET_WM_STATE_FULLSCREEN) S(NET_WM_STATE_MAXIMIZED_VERT) S(NET_WM_STATE_MAXIMIZED_HORZ) \
S(NET_WM_STATE_DEMANDS_ATTENTION) S(NET_WM_STATE_SKIP_TASKBAR) S(NET_WM_STATE_SKIP_PAGER) S(NET_WM_STATE_STICKY) \
S(NET_WM_STATE_ABOVE) \
S(NET_WM_STATE_BELOW) S(NET_WM_STATE_FULLSCREEN) S(NET_WM_STATE_MAXIMIZED_VERT) S(NET_WM_STATE_MAXIMIZED_HORZ) S(NET_WM_STATE_DEMANDS_ATTENTION) \
S(NET_WM_STATE_SKIP_TASKBAR) S(NET_WM_STATE_SKIP_PAGER) S(NET_WM_STATE_STICKY) \
\
S(NET_WM_FULLSCREEN_MONITORS) S(NET_WM_STRUT_PARTIAL) \
\

View file

@ -208,8 +208,7 @@ typedef struct {
if (_right_ptr - _lo <= _QSORT_MAX_THRESH) { \
if (_hi - _left_ptr <= _QSORT_MAX_THRESH) /* Ignore both small partitions. */ \
_QSORT_POP(_lo, _hi, _top); \
else /* Ignore small left partition. */ \
_lo = _left_ptr; \
else /* Ignore small left partition. */ _lo = _left_ptr; \
} else if (_hi - _left_ptr <= _QSORT_MAX_THRESH) /* Ignore small right partition. */ \
_hi = _right_ptr; \
else if (_right_ptr - _lo > _hi - _left_ptr) { \

View file

@ -108,14 +108,24 @@ serialize(const EncodingData *data, char *output, const char csi_trailer) {
static uint32_t
convert_kp_key_to_normal_key(uint32_t key_number) {
switch (key_number) {
#define S(x) \
case GLFW_FKEY_KP_##x: key_number = GLFW_FKEY_##x; break;
S(ENTER)
S(HOME) S(END) S(INSERT) S(DELETE) S(PAGE_UP) S(PAGE_DOWN) S(UP) S(DOWN) S(LEFT) S(RIGHT)
case GLFW_FKEY_KP_##x: key_number = GLFW_FKEY_##x; break
switch (key_number) {
S(ENTER);
S(HOME);
S(END);
S(INSERT);
S(DELETE);
S(PAGE_UP);
S(PAGE_DOWN);
S(UP);
S(DOWN);
S(LEFT);
S(RIGHT);
#undef S
case GLFW_FKEY_KP_0:
case GLFW_FKEY_KP_9: key_number = '0' + (key_number - GLFW_FKEY_KP_0); break;
case GLFW_FKEY_KP_9: key_number = '0' + (key_number - GLFW_FKEY_KP_0); break;
case GLFW_FKEY_KP_DECIMAL: key_number = '.'; break;
case GLFW_FKEY_KP_DIVIDE: key_number = '/'; break;
case GLFW_FKEY_KP_MULTIPLY: key_number = '*'; break;

View file

@ -170,8 +170,8 @@ w(right, one_byte, 1) w(right, two_bytes, 2) w(right, four_bytes, 4) w(right, ei
#define reverse_numbered_bytes() \
simde_mm256_setr_epi8(31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
static inline int
FUNC(is_zero)(const integer_t a) {
static inline int
FUNC(is_zero)(const integer_t a) {
return simde_mm256_testz_si256(a, a);
}