You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
3 years ago
..
333fred Make default layer size 16-bit (#15286) 4 years ago
_example
ajp10304 [Keymap] AJP10304 layout, add Colemak-DHm layer (#15582) 4 years ago
alfrdmalr
anderson
arkag [Keymap] arkag userspace/keymap -- new macro and minor preonic keymap change (#14623) 4 years ago
art
badger
bbaserdem Merge remote-tracking branch 'upstream/master' into develop 3 years ago
bcat Removes terminal from QMK. (#17258) 4 years ago
billypython Make default layer size 16-bit (#15286) 4 years ago
brandonschlack Use a macro to compute the size of arrays at compile time (#18044) 3 years ago
brett
byungyoonc [Keymap] Add personal keymap to GMMK Pro ANSI (#15314) 4 years ago
callum
cbbrowne
cedrikl [Keymap] Add another GMMK Pro ANSI Keymap with custom RGB. (#14243) 4 years ago
charlesrocket Update massdrop/alt:charlesrocket (#17297) 3 years ago
cjuniet
csc027 csc027/keymap-updates (#17881) 3 years ago
curry Use a macro to compute the size of arrays at compile time (#18044) 3 years ago
cwebster2
d4mation
danielo515
datagrok
davidkristoffersen Use a macro to compute the size of arrays at compile time (#18044) 3 years ago
dennytom/chording_engine Cleanup issues identified by lgtm (#14459) 4 years ago
devdev
dhertz Make default layer size 16-bit (#15286) 4 years ago
doogle999 Make default layer size 16-bit (#15286) 4 years ago
draevin
drashna Use a macro to compute the size of arrays at compile time (#18044) 3 years ago
dshields Require explicit enabling of RGB Matrix modes (#15018) 4 years ago
dudeofawesome
edvorakjp Make default layer size 16-bit (#15286) 4 years ago
ericgebhart Make default layer size 16-bit (#15286) 4 years ago
gary
gordon
gourdo1 Use a macro to compute the size of arrays at compile time (#18044) 3 years ago
greatwizard
haervig
hvp Do not enable PERMISSIVE_HOLD when TAPPING_TERM exceeds 500ms (#15674) 4 years ago
ibnuda
imchipwood
ishtob [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 3 years ago
issmirnov [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 3 years ago
jackhumbert
jarred
jdelkins
jjerrell
jonavin Use a macro to compute the size of arrays at compile time (#18044) 3 years ago
kageurufu
klackygears
konstantin [Keymap] Updates to existing keymaps and userspace (#14503) 4 years ago
kuatsure
kuchosauronad0 [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 3 years ago
losinggeneration
manna-harbour_miryoku Allow for `keymaps` array to be implemented in a file other than `$(KEYMAP_C)` (#17559) 3 years ago
mattly
mechmerlin [Keymap] Disable in-switch RGB when computer goes to bed (#14993) 4 years ago
mguterl
miles2go [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 3 years ago
mnil tap-dance: Restructure code and document in more detail (#16394) 4 years ago
moults31 [Keymap] moults31 userspace and keymaps (#12025) 4 years ago
mtdjr Make default layer size 16-bit (#15286) 4 years ago
mtei Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966) 4 years ago
muppetjones Userspace: muppetjones (#1) (#13461) 3 years ago
mverteuil
narze
nchristus
ninjonas Migrate crkbd keymaps to oled driver (#17863) 3 years ago
noroadsleft Update noroadsleft userspace and keymaps (2022-07-18) (#17714) 3 years ago
not-quite-neo
nstickney Remove `BOOTMAGIC_ENABLE = lite` option (#15002) 4 years ago
ollyhayes [Keymap] Add ollyhayes keymap (#16632) 3 years ago
pcewing Add pcewing Speedo v3 keymap (#18118) 3 years ago
pcoves
pdl [Keyboard] Add userspace pdl and a handwired board (#14199) 4 years ago
peej
pvinis Make default layer size 16-bit (#15286) 4 years ago
replicaJunction
riblee [Keymap] Misc userspace and keymap improvements (#15844) 4 years ago
ridingqwerty Remove `BOOTMAGIC_ENABLE = lite` option (#15002) 4 years ago
rishka
rmeli Personal user space and CRKBD R2G keymap (#15888) 4 years ago
rmw
romus Make default layer size 16-bit (#15286) 4 years ago
rossman360
rs
rupa
rverst
scheiklp K.O.Y and German layout for several boards (#14991) 4 years ago
sethBarberee [Keymap] Update sethbarberee code to QK_BOOT and try out DVVORAK (#17230) 4 years ago
sigma Make default layer size 16-bit (#15286) 4 years ago
sigul Rename keymap_extras headers for consistency (#16939) 4 years ago
snowe [Keymap] Fix snowe keymap after updates to QMK (#16777) 4 years ago
spacebarracecar
spidey3 Use a macro to compute the size of arrays at compile time (#18044) 3 years ago
spotpuff
stanrc85 Merge remote-tracking branch 'origin/master' into develop 3 years ago
talljoe Remove full bootmagic config (#17702) 3 years ago
toinux [Keymap] Toinux's crkbd keymap and userspace (#16437) 4 years ago
tominabox1 Remove full bootmagic config (#17702) 3 years ago
turbomech Make default layer size 16-bit (#15286) 4 years ago
twschum
txkyel
uqs Use a macro to compute the size of arrays at compile time (#18044) 3 years ago
vitoni [Keymap] Add vitoni keymap for GMMK Pro (ISO) (#15006) 4 years ago
vosechu
wanleg Rename `AdafruitBLE` to `BluefruitLE` (#16127) 4 years ago
xtonhasvim
xulkal Make default layer size 16-bit (#15286) 4 years ago
yanfali Remove `BOOTMAGIC_ENABLE = lite` option (#15002) 4 years ago
yet-another-developer [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 3 years ago
zer09 [Core] Process all changed keys in one scan loop, deprecate `QMK_KEYS_PER_SCAN` (#15292) 3 years ago
zigotica [Keymap] zigotica layout tweaks (#16291) 4 years ago
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.