
\begin{DoxyItemize}
\item infos = Information about ccode plugin is in keys below
\item infos/author = Markus Raab \href{mailto:elektra@libelektra.org}{\tt elektra@libelektra.\+org}
\item infos/licence = B\+S\+D
\item infos/needs =
\item infos/provides = code
\item infos/placements = postgetstorage presetstorage
\item infos/description = Decoding/\+Encoding engine which escapes unwanted characters.
\end{DoxyItemize}

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.

\subsection*{Restrictions}

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.

So when all control characters and non-\/\+A\+S\+C\+I\+I 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.

\subsection*{C}

In the language C, following escape characters are present.


\begin{DoxyItemize}
\item {\ttfamily b}\+: backspace, hex\+: 08
\item {\ttfamily t}\+: horizontal tab, hex\+: 09
\item {\ttfamily n}\+: new line feed, hex\+: 0\+A
\item {\ttfamily v}\+: vertical tab, hex\+: 0\+B
\item {\ttfamily f}\+: form feed, hex\+: 0\+C
\item {\ttfamily r}\+: carriage return, hex\+: 0\+D
\item {\ttfamily \textbackslash{}\textbackslash{}}\+: back slash, hex\+: 5\+C
\item {\ttfamily '}\+: single quote, hex\+: 27
\item {\ttfamily "}\+: double quote, hex\+: 22
\item {\ttfamily 0}\+: null, hex\+: 00
\end{DoxyItemize}

This is also the default mapping.

\subsubsection*{Contract}

Add {\ttfamily ccode} to {\ttfamily infos/needs} for any plugin that you want to be filtered by ccode. 