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 Creates a userspace for keymaps (#1559) 2017-10-21 11:44:11 -10:00
ajp10304 [Keymap] AJP10304 layout, add Colemak-DHm layer (#15582) 2022-01-10 16:57:41 -08:00
alfrdmalr [Userspace] alfrdmalr: swap # and @ symbols (#8469) 2020-03-17 21:44:55 -07:00
anderson [Keyboard] Added D48 keyboard (#8548) 2020-05-08 23:59:50 -07:00
arkag [Keymap] arkag userspace/keymap -- new macro and minor preonic keymap change (#14623) 2021-09-28 12:21:10 -07:00
art Art userspace (#9068) 2020-05-19 22:05:32 +01:00
badger [Keymap] Badger keymaps/userspace (#10239) 2020-09-16 21:03:28 -07:00
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 [Keymap] Added HHKB Keymap and user config (#8119) 2020-03-10 01:52:39 -07:00
byungyoonc [Keymap] Add personal keymap to GMMK Pro ANSI (#15314) 2022-01-12 20:59:45 -08:00
callum rename callum's custom keycode that conflicts with a LUFA define 2021-01-30 13:11:33 -08:00
cbbrowne Adopted LAYOUT, added some keys (#5320) 2019-03-05 12:22:51 -08:00
cedrikl [Keymap] Add another GMMK Pro ANSI Keymap with custom RGB. (#14243) 2022-01-10 17:15:47 -08:00
charlesrocket Update massdrop/alt:charlesrocket (#17297) 2022-07-02 22:19:35 +10:00
cjuniet [Keymap] Add @cjuniet's keymap/layout/userspace (#8258) 2020-03-04 17:19:26 -08:00
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 [Keymap] cwebster2 Keymap and userspace updates (#14258) 2021-08-31 17:50:42 -07:00
d4mation Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
danielo515 keymap_extras: Remove deprecated defines (#12949) 2021-07-06 09:05:11 +10:00
datagrok create users/datagrok (#7653) 2020-01-26 23:26:40 -05:00
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 Cleanup issues identified by lgtm (#14459) 2021-09-27 10:02:54 -07:00
devdev [Keymap] add personal keymap files, and sofle_rgb default maps, (#12267) 2021-05-26 22:30:34 -07:00
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 Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
drashna Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
dshields Require explicit enabling of RGB Matrix modes (#15018) 2021-11-15 10:41:04 -08:00
dudeofawesome Fix for issue #10386 - Can't compile preonic:dudeofawesome (#10557) 2020-10-14 13:41:34 +11:00
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 [Keymap] Adding garyjzhao's Iris keymap (#6980) 2019-10-09 12:05:31 -07:00
gordon Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
gourdo1 Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
greatwizard 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
haervig [Keymap] Add haervig userspace and keymaps (#13362) 2021-07-01 10:12:19 -07:00
hvp Do not enable PERMISSIVE_HOLD when TAPPING_TERM exceeds 500ms (#15674) 2022-06-24 12:40:09 +02:00
ibnuda [Keymap] reflects current rick's keymap (#14169) 2021-08-31 11:23:02 -07:00
imchipwood [Keymap] Adding user code & keymaps for dumbpad & hotdox (#12924) 2021-07-20 09:40:54 -07:00
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 Creates a userspace for keymaps (#1559) 2017-10-21 11:44:11 -10:00
jarred [Keymap] Add leaf60 and tada68 keymaps (#6645) 2019-08-31 11:20:10 -07:00
jdelkins Merge remote-tracking branch 'origin/master' into develop 2021-08-13 19:29:21 +00:00
jjerrell [Keymap] JJerrell - Add Userspace and ZSA Keyboard Keymaps (#13548) 2021-08-12 07:44:15 -07:00
jonavin Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
kageurufu Features/ws2812 matrix driver (#5418) 2019-04-14 17:50:35 -07:00
klackygears Klackygears add user and handwired brain (#9154) 2020-06-28 12:07:57 +01:00
konstantin [Keymap] Updates to existing keymaps and userspace (#14503) 2021-09-19 11:47:40 -07:00
kuatsure [Keymap] add kuatsure planck keymap (#10625) 2021-08-12 08:56:25 -07:00
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 Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
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 mattly goes windows (#9677) 2020-07-21 17:08:56 -07:00
mechmerlin [Keymap] Disable in-switch RGB when computer goes to bed (#14993) 2021-10-30 21:17:42 -07:00
mguterl [Keymap] Add userspace and personal keymaps (#7093) 2019-10-22 10:41:14 -07:00
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 [Keymap] moults31 userspace and keymaps (#12025) 2021-09-10 18:56:50 -07:00
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 [Keymap] Added mverteuil keymaps and userspace common code (#7876) 2020-01-18 11:24:56 -08:00
narze [Keymap] Add narze lily58 keymap & update my other keymaps (#13110) 2021-07-03 00:50:32 -07:00
nchristus [Keymap] Added nchristus userspace (#10261) 2020-09-08 22:33:38 -07:00
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 Remove redundant KC_TRNS and KC_NO fillers in userspace (#5140) 2019-02-15 16:18:13 -08:00
nstickney Remove BOOTMAGIC_ENABLE = lite option (#15002) 2021-11-05 08:18:09 +11:00
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 Add pcoves's userspace (#9354) 2020-07-08 21:57:11 +01:00
pdl [Keyboard] Add userspace pdl and a handwired board (#14199) 2022-04-12 22:25:19 -07:00
peej [Keymap] Add peej userspace and keymaps (#11332) 2021-01-19 13:10:28 +11:00
pvinis Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
replicaJunction [Keymap] clean up userspace, add XD75 / Keyboardio Atreus (#13121) 2021-08-13 18:14:21 -07:00
riblee [Keymap] Misc userspace and keymap improvements (#15844) 2022-01-13 09:16:03 -08:00
ridingqwerty Remove BOOTMAGIC_ENABLE = lite option (#15002) 2021-11-05 08:18:09 +11:00
rishka [Keymap] Ergodox EZ and dactyl-manuform keymaps for rishka (#7051) 2019-10-21 20:37:33 -07:00
rmeli Personal user space and CRKBD R2G keymap (#15888) 2022-03-10 15:27:37 -08:00
rmw [Keymap] Adding my keymaps for ergodox_ez and kyria (#9365) 2020-06-29 10:23:13 -07:00
romus Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
rossman360 rebound rev4, consolodated switch matrix from 5x12 to 7x8 (#9314) 2020-06-20 08:27:27 +10:00
rs 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
rupa userspace and keymap changes for rupa (#10489) 2020-11-10 16:04:46 +11:00
rverst [Keymap] Feature/extend keymap (#12778) 2021-06-24 12:23:43 +10:00
scheiklp K.O.Y and German layout for several boards (#14991) 2021-12-27 14:40:47 +11:00
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 keymap_extras: Remove deprecated defines (#12949) 2021-07-06 09:05:11 +10:00
spidey3 Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
spotpuff Remove Full Bootmagic (#13846) 2021-08-06 23:59:56 -07:00
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 [Keymap] Add DZ60, Levinson keymaps, twschum user files (#7358) 2019-11-21 03:07:33 -08:00
txkyel [Userspace] Add custom tap dancing function (#13963) 2021-08-11 00:19:19 -07:00
uqs Use a macro to compute the size of arrays at compile time (#18044) 2022-08-30 10:20:04 +02:00
vitoni [Keymap] Add vitoni keymap for GMMK Pro (ISO) (#15006) 2021-12-27 21:13:12 +11:00
vosechu Add one-handed Viterbi layout for gaming (#8963) 2020-05-10 04:53:32 +01:00
wanleg Rename AdafruitBLE to BluefruitLE (#16127) 2022-01-30 17:29:42 +00:00
xtonhasvim Keymap: Fix missing braces around initializer error on older gcc (#3840) 2018-09-03 16:55:06 -07:00
xulkal Make default layer size 16-bit (#15286) 2022-06-19 07:37:51 +10:00
yanfali Remove BOOTMAGIC_ENABLE = lite option (#15002) 2021-11-05 08:18:09 +11:00
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 Creates a userspace for keymaps (#1559) 2017-10-21 11:44:11 -10:00
yanfali_wkl [Keymap] Updates to personal keymaps (#8665) 2020-04-08 18:20:58 -07:00

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.