Skip to content

Fix up #include's and add #pragma once, et al

Roland C. Dowdeswell requested to merge elric1@a-bit-of-cleanup into main

Three cleanup commits:

0d80fa93 Fix up #include's and add #pragma once

We audit the #include sections of each C file and fix them to be a bit more idiomatic. We use <> to enclose includes of external library headers including the BOLOS headers. We also order the includes to be uniform:

1. system headers come first, followed by system headers
   in subdirectories, i.e. #include <sys/types.h>,

2. BOLOS headers come next, and finally

3. our local headers enclosed in double quotes come after.

In each section of header, the header files are sorted. In the fullness of time, we should ensure that no header depends on other headers being included before it in C files. If it needs definitions, then it should directly include each of the headers that provides a definition for it.

And we add #pragma once as well.

860218e1 app_main.c: split switch to have pre-conditions separate 1506b696 Don't need braces in switch case statements without decls

Merge request reports