Files
mcaselector-lite/docs/dev/styleref.md
Quinn 6c0a1de365 fix: x86_64 wikipedia link is always the English variant.
The link was pointing to `en.wikipedia.org`, where it is better to not
assume the (preferred) language, and just link to `wikipedia.org`.
2025-08-23 22:34:20 +02:00

2.1 KiB

mcaselector-lite style reference

contents

  • gcc
  • git (duh)
  • clang-format
  • clang-tidy
  • linux / unix-like machine

code information

The project is written in the GNU dialect of C99. Where we have dependencies on:

library summary
libarchive compression / decompression of various formats.
glfw window creation / input handling.
openGL hardware accelleration, for handling graphics.

It is intended to be platform-agnostic, within reason. But the main focus is for Linux systems with x86_64 architecture. Within intdef.h there live definitions for fixed-width integer types.

style guide

  • Code must be written correctly, read Correct C if more information is required.
  • snake_casing is used, with no Hungarian notation. (macros are all-uppercase, with a few exceptions)
  • K&R style braces/indentation should be used.
  • For indentation tabs are used, and are assumed to be 8 spaces wide. For alignment spaces should be used.
  • A space should precede a pointer *. Where it is attached to the name, rather than the type. For const clarity, and chains such as: u8 *a, *b, *c;. This is true for functions as well: void *malloc(size_t n);
  • Generally speaking, British spelling is preferred. Define potential macros for, or when using alternate dialects.
  • Grammar should be correct. (don't or do not, not dont)
  • Commits should attempt to convey clearly what is being changed, for the sanity of the maintainer(s).