mentioned below.
The coding style for Python code is documented in
-[PEP8](https://www.python.org/dev/peps/pep-0008/). New Python code should be compatible
-with Python 2.6, 2.7, and Python 3.4 onwards. This means using Python 3 syntax
-with the appropriate `from __future__` imports.
+[PEP8](https://www.python.org/dev/peps/pep-0008/). New Python code
+should be compatible with Python 3.6 onwards.
But to save you the trouble of reading the Linux kernel style guide, here
are the highlights.
autocmd BufNewFile,BufRead *.c,*.h exec 'match Todo /\%>' . &textwidth . 'v.\+/'
```
-### clang-format
+### How to use clang-format
-```
-BasedOnStyle: LLVM
-IndentWidth: 8
-UseTab: true
-BreakBeforeBraces: Linux
-AllowShortIfStatementsOnASingleLine: false
-IndentCaseLabels: false
-BinPackParameters: false
-BinPackArguments: false
-SortIncludes: false
-```
+Install 'git-format-clang' which is part of the clang suite (Fedora:
+git-clang-format, openSUSE: clang-tools).
+Now do your changes and stage them with `git add`. Once they are staged
+format the code using `git clang-format` before you commit.
+
+Now the formatting changed can be viewed with `git diff` against the
+staged changes.
## FAQ & Statement Reference
* with some more words...*/
```
-### Indention & Whitespace & 80 columns
+### Indentation & Whitespace & 80 columns
To avoid confusion, indentations have to be tabs with length 8 (not 8
' ' characters). When wrapping parameters for function calls,
The messages from these macros are automatically prefixed with the
function name.
+
+
+
+### PRINT format specifiers PRIuxx
+
+Use %PRIu32 instead of %u for uint32_t. Do not assume that this is valid:
+
+/usr/include/inttypes.h
+104:# define PRIu32 "u"
+
+It could be possible to have a platform where "unsigned" is 64-bit. In theory
+even 16-bit. The point is that "unsigned" being 32-bit is nowhere specified.
+The PRIuxx specifiers are standard.
+
+Example usage:
+
+```
+D_DEBUG("Resolving %"PRIu32" SID(s).\n", state->num_sids);
+```
+
+Note:
+
+Do not use PRIu32 for uid_t and gid_t, they do not have to be uint32_t.