\hypertarget{md_doc_decisions_escaped_name_autotoc_md1931}{}\doxysection{Problem}\label{md_doc_decisions_escaped_name_autotoc_md1931}
Currently we store both the escaped and unescaped name in a Key and in a way that there cannot be an optimization not to store it (there are functions handling out the pointer).\hypertarget{md_doc_decisions_escaped_name_autotoc_md1932}{}\doxysection{Constraints}\label{md_doc_decisions_escaped_name_autotoc_md1932}

\begin{DoxyItemize}
\item allow implementations of Elektra to not store two names
\end{DoxyItemize}\hypertarget{md_doc_decisions_escaped_name_autotoc_md1933}{}\doxysection{Assumptions}\label{md_doc_decisions_escaped_name_autotoc_md1933}

\begin{DoxyItemize}
\item the memory consumption of storing the name twice is considerable
\end{DoxyItemize}\hypertarget{md_doc_decisions_escaped_name_autotoc_md1934}{}\doxysection{Considered Alternatives}\label{md_doc_decisions_escaped_name_autotoc_md1934}

\begin{DoxyItemize}
\item store it twice
\item store it once but in one memory block
\end{DoxyItemize}\hypertarget{md_doc_decisions_escaped_name_autotoc_md1935}{}\doxysection{Decision}\label{md_doc_decisions_escaped_name_autotoc_md1935}
Remove the escaped name from {\ttfamily struct \+\_\+\+Key} and use it only when necessary.

Clarify and reduce terminology.

API Changes\+:


\begin{DoxyItemize}
\item {\ttfamily key\+Name} returns the unescaped name (temporary some other name for PR\+: {\ttfamily key\+Unescaped\+Name(\+Size)})
\item remove {\ttfamily key\+Unescaped\+Name}, {\ttfamily key\+Get\+Unescaped\+Name\+Size}.
\item reverse terminology\+: with \char`\"{}key name\char`\"{} we will refer to the unescaped (base) name, the escaped name will be explicitly called \char`\"{}escaped key name\char`\"{}.
\item escaped name will be only present in
\begin{DoxyItemize}
\item {\ttfamily key\+New} (+ arguments for adding key names) \mbox{[}unclear\+: maybe not needed\mbox{]}
\item {\ttfamily elektra\+Escape\+Name} (operating on chars)
\item rename {\ttfamily key\+Add\+Name}, e.\+g. to {\ttfamily key\+Add\+Escaped\+Name}
\end{DoxyItemize}
\item {\ttfamily key\+Dup(.., int)} with options to filter which parts are copied (to allow copy of keys where only the key name is copied)
\end{DoxyItemize}\hypertarget{md_doc_decisions_escaped_name_autotoc_md1936}{}\doxysection{Rationale}\label{md_doc_decisions_escaped_name_autotoc_md1936}
\hypertarget{md_doc_decisions_escaped_name_autotoc_md1937}{}\doxysection{Implications}\label{md_doc_decisions_escaped_name_autotoc_md1937}

\begin{DoxyItemize}
\item needs fix of OPMPHM
\item Later modifications in key\+New to also accept key base names might be useful\+:
\item key\+New(KEY\+\_\+\+VALUE, \char`\"{}...\char`\"{}, KEY\+\_\+\+NAME, \char`\"{}\char`\"{}, \char`\"{}...\char`\"{}, KEY\+\_\+\+END)
\item key\+New (KEY\+\_\+\+NAME, KEY\+\_\+\+NS\+\_\+\+USER, \char`\"{}abc\char`\"{}, \char`\"{}def\char`\"{}, KEY\+\_\+\+NAME\+\_\+\+END, KEY\+\_\+\+END);
\end{DoxyItemize}\hypertarget{md_doc_decisions_escaped_name_autotoc_md1938}{}\doxysection{Related Decisions}\label{md_doc_decisions_escaped_name_autotoc_md1938}
\hypertarget{md_doc_decisions_escaped_name_autotoc_md1939}{}\doxysection{Notes}\label{md_doc_decisions_escaped_name_autotoc_md1939}
