## How-Tos ### Set up NeoVim on Linux for C development This even (mostly) works for retro systems! With Conquer of Completion installed: * Install `clangd` * In Vim, `:CocInstall coc-clangd` Local references to headers and comments on functions work. Doxygen on macros don't seem to work, though. #### References * https://www.reddit.com/r/neovim/comments/fja2d5/comment/fklwe9z/ ### Unit test on retro machines https://github.com/ennorehling/cutest works on IBM PC and Amiga. #### Amiga config With SAS/C: `sc link math=standard lib_test.c lib.c cutest/CuTest.c link`. If your linker is complaining about `__CXC55`, linking to the standard math library is needed. Increase the stack size before running tests. There's a [big char variable defined as the buffer for the string output](https://github.com/ennorehling/cutest/blob/master/CuTest.c#L92) that will make smaller stacks fail. On the Amiga: `stack 32000` then run the command. On Vamos, `vamos -s 32 command`. #### References * http://www.jaruzel.com/amiga/amiga-os-command-reference-help/stack.html * https://eab.abime.net/showthread.php?t=103659 ### Recast a void star pointer to be used to fill another data type If you want to take a void pointer then use it for building a structure of objects of the same data size, recast it: ```c void *myRAM; // allocate the ram short *shortInterface = (short *)myRAM; shortInterface++; //=> incremented by 2 ```