qmk_firmware/users
Jeff Epler 9632360caa
Use a macro to compute the size of arrays at compile time (#18044)
* Add ARRAY_SIZE and CEILING utility macros

* Apply a coccinelle patch to use ARRAY_SIZE

* fix up some straggling items

* Fix 'make test:secure'

* Enhance ARRAY_SIZE macro to reject acting on pointers

The previous definition would not produce a diagnostic for
```
int *p;
size_t num_elem = ARRAY_SIZE(p)
```
but the new one will.

* explicitly get definition of ARRAY_SIZE

* Convert to ARRAY_SIZE when const is involved

The following spatch finds additional instances where the array is
const and the division is by the size of the type, not the size of
the first element:
```
@ rule5a using "empty.iso" @
type T;
const T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)

@ rule6a using "empty.iso" @
type T;
const T[] E;
@@

- sizeof(E)/sizeof(T)
+ ARRAY_SIZE(E)
```

* New instances of ARRAY_SIZE added since initial spatch run

* Use `ARRAY_SIZE` in docs (found by grep)

* Manually use ARRAY_SIZE

hs_set is expected to be the same size as uint16_t, though it's made
of two 8-bit integers

* Just like char, sizeof(uint8_t) is guaranteed to be 1

This is at least true on any plausible system where qmk is actually used.

Per my understanding it's universally true, assuming that uint8_t exists:
https://stackoverflow.com/questions/48655310/can-i-assume-that-sizeofuint8-t-1

* Run qmk-format on core C files touched in this branch

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-08-30 10:20:04 +02:00
..
333fred Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
_example
ajp10304
alfrdmalr
anderson
arkag
art
badger
bbaserdem Merge remote-tracking branch 'upstream/master' into develop 2022-07-02 21:13:06 +10:00
bcat Removes terminal from QMK. (#17258) 2022-05-30 22:38:08 -07:00
billypython Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
brandonschlack Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
brett
byungyoonc
callum
cbbrowne
cedrikl
charlesrocket Update massdrop/alt:charlesrocket (#17297) 2022-07-02 22:19:35 +10:00
cjuniet
csc027 csc027/keymap-updates (#17881) 2022-08-07 20:40:16 +01:00
curry Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
cwebster2
d4mation
danielo515
datagrok
davidkristoffersen Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
dennytom/chording_engine
devdev
dhertz Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
doogle999 Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
draevin
drashna Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
dshields
dudeofawesome
edvorakjp Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
ericgebhart Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
gary
gordon
gourdo1 Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
greatwizard
haervig
hvp Do not enable PERMISSIVE_HOLD when TAPPING_TERM exceeds 500ms (#15674) 2022-06-24 12:40:09 +02:00
ibnuda
imchipwood
ishtob [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 2022-08-06 20:51:13 +10:00
issmirnov [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 2022-08-06 20:51:13 +10:00
jackhumbert
jarred
jdelkins
jjerrell
jonavin Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
kageurufu
klackygears
konstantin
kuatsure
kuchosauronad0 [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 2022-08-06 20:51:13 +10:00
losinggeneration
manna-harbour_miryoku Allow for `keymaps` array to be implemented in a file other than `$(KEYMAP_C)` (#17559) 2022-07-05 08:58:35 +10:00
mattly
mechmerlin
mguterl
miles2go [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 2022-08-06 20:51:13 +10:00
mnil tap-dance: Restructure code and document in more detail (#16394) 2022-06-13 22:12:55 +02:00
moults31
mtdjr Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
mtei Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) 2022-05-19 02:33:17 +09:00
muppetjones Userspace: muppetjones (#1) (#13461) 2022-08-03 18:23:17 +01:00
mverteuil
narze
nchristus
ninjonas Migrate crkbd keymaps to oled driver (#17863) 2022-07-31 12:36:30 -07:00
noroadsleft Update noroadsleft userspace and keymaps (2022-07-18) (#17714) 2022-07-18 19:09:05 -07:00
not-quite-neo
nstickney
ollyhayes [Keymap] Add ollyhayes keymap (#16632) 2022-07-25 23:26:22 -07:00
pcewing Add pcewing Speedo v3 keymap (#18118) 2022-08-21 20:37:18 +01:00
pcoves
pdl [Keyboard] Add userspace pdl and a handwired board (#14199) 2022-04-12 22:25:19 -07:00
peej
pvinis Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
replicaJunction
riblee
ridingqwerty
rishka
rmeli Personal user space and CRKBD R2G keymap (#15888) 2022-03-10 15:27:37 -08:00
rmw
romus Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
rossman360
rs
rupa
rverst
scheiklp
sethBarberee [Keymap] Update sethbarberee code to QK_BOOT and try out DVVORAK (#17230) 2022-05-30 11:07:16 -07:00
sigma Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
sigul Rename keymap_extras headers for consistency (#16939) 2022-05-15 21:27:01 +10:00
snowe [Keymap] Fix snowe keymap after updates to QMK (#16777) 2022-04-13 07:19:24 -07:00
spacebarracecar
spidey3 Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
spotpuff
stanrc85 Merge remote-tracking branch 'origin/master' into develop 2022-07-03 21:25:42 +00:00
talljoe Remove full bootmagic config (#17702) 2022-07-19 02:28:23 +01:00
toinux [Keymap] Toinux's crkbd keymap and userspace (#16437) 2022-04-22 17:41:54 +10:00
tominabox1 Remove full bootmagic config (#17702) 2022-07-19 02:28:23 +01:00
turbomech Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
twschum
txkyel
uqs Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
vitoni
vosechu
wanleg
xtonhasvim
xulkal Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
yanfali
yet-another-developer [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 2022-08-06 20:51:13 +10:00
zer09 [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 2022-08-06 20:51:13 +10:00
zigotica [Keymap] zigotica layout tweaks (#16291) 2022-02-09 17:21:12 -08:00
readme.md
yanfali_wkl

readme.md

User space

This is a place for users to put code that they might use between keyboards. If you build the keymap mine, /users/mine/rules.mk will be included in your build, and /users/mine/ will be in your path - keep these things in mind when naming your files and referencing them from other places.