CODING_STYLE: document the order in which unescaping + specifier expansion should...
authorLennart Poettering <lennart@poettering.net>
Tue, 21 Nov 2017 16:58:51 +0000 (17:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 29 Nov 2017 11:32:56 +0000 (12:32 +0100)
CODING_STYLE

index 9dcc090..b090db3 100644 (file)
   that interrupted system calls are automatically restarted, and we minimize
   hassles with handling EINTR (in particular as EINTR handling is pretty broken
   on Linux).
+
+- When applying C-style unescaping as well as specifier expansion on the same
+  string, always apply the C-style unescaping fist, followed by the specifier
+  expansion. When doing the reverse, make sure to escape '%' in specifier-style
+  first (i.e. '%' → '%%'), and then do C-style escaping where necessary.