.TH "md_src_plugins_ccode_README" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME md_src_plugins_ccode_README \- README .IP "\(bu" 2 infos = Information about ccode plugin is in keys below .IP "\(bu" 2 infos/author = Markus Raab elektra@libelektra.org .IP "\(bu" 2 infos/licence = BSD .IP "\(bu" 2 infos/needs = .IP "\(bu" 2 infos/provides = code .IP "\(bu" 2 infos/placements = postgetstorage presetstorage .IP "\(bu" 2 infos/description = Decoding/Encoding engine which escapes unwanted characters\&. .PP .PP When writing a C string in C code some characters cannot be expressed directly but have a special one letter abbreviation\&. The ccode plugin allows us to map any single escaped character to be replaced by another single character and vice versa\&. The user can configure this mapping\&. .PP .SS "Restrictions" .PP This method of encoding characters is not as powerful as the hexcode plugin in terms of reduction\&. The hexcode plugin allows reduction of the character set to '0'-'9', 'a'-'f' and one escape character\&. So it can represent any key value with only 17 characters\&. On the other hand, ccode cannot reduce the set more than by half\&. .PP So when all control characters and non-ASCII characters need to vanish, it cannot be done with the ccode plugin\&. But it is perfectly suitable to reduce by some characters\&. The advantages are that the size only doubles in the worst case and that it is much easier to read\&. .PP .SS "C" .PP In the language C, following escape characters are present\&. .PP .IP "\(bu" 2 \fCb\fP: backspace, hex: 08 .IP "\(bu" 2 \fCt\fP: horizontal tab, hex: 09 .IP "\(bu" 2 \fCn\fP: new line feed, hex: 0A .IP "\(bu" 2 \fCv\fP: vertical tab, hex: 0B .IP "\(bu" 2 \fCf\fP: form feed, hex: 0C .IP "\(bu" 2 \fCr\fP: carriage return, hex: 0D .IP "\(bu" 2 \fC\\\\\fP: back slash, hex: 5C .IP "\(bu" 2 \fC'\fP: single quote, hex: 27 .IP "\(bu" 2 \fC"\fP: double quote, hex: 22 .IP "\(bu" 2 \fC0\fP: null, hex: 00 .PP .PP This is also the default mapping\&. .PP .SS "Contract" .PP Add \fCccode\fP to \fCinfos/needs\fP for any plugin that you want to be filtered by ccode\&.