\hypertarget{array_8c}{\section{array.\+c File Reference}
\label{array_8c}\index{array.\+c@{array.\+c}}
}


Array methods.  


{\ttfamily \#include $<$kdb.\+h$>$}\\*
{\ttfamily \#include $<$kdbease.\+h$>$}\\*
{\ttfamily \#include $<$kdbtypes.\+h$>$}\\*
{\ttfamily \#include $<$kdbhelper.\+h$>$}\\*
{\ttfamily \#include $<$stdlib.\+h$>$}\\*
{\ttfamily \#include $<$stdio.\+h$>$}\\*
{\ttfamily \#include $<$limits.\+h$>$}\\*
{\ttfamily \#include $<$errno.\+h$>$}\\*
{\ttfamily \#include $<$string.\+h$>$}\\*
{\ttfamily \#include $<$ctype.\+h$>$}\\*
Include dependency graph for array.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{array_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{array_8c_afc46476b8d722d89e07a966e023df317}{elektra\+Array\+Inc\+Name} (Key $\ast$key)
\begin{DoxyCompactList}\small\item\em Increment the name of the key by one. \end{DoxyCompactList}\item 
Key\+Set $\ast$ \hyperlink{array_8c_aee59442d3b1dea04454c7b93cd00c7ad}{elektra\+Array\+Get} (const Key $\ast$array\+Parent, Key\+Set $\ast$keys)
\begin{DoxyCompactList}\small\item\em Return all the array keys below the given arrayparent The arrayparent itself is not returned. \end{DoxyCompactList}\item 
Key $\ast$ \hyperlink{array_8c_aff4f7cbfc779e917ee41284d834231c6}{elektra\+Array\+Get\+Next\+Key} (Key\+Set $\ast$array\+Keys)
\begin{DoxyCompactList}\small\item\em Return the next key in the given array. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Array methods. 

\begin{DoxyCopyright}{Copyright}
B\+S\+D License (see doc/\+C\+O\+P\+Y\+I\+N\+G or \href{http://www.libelektra.org}{\tt http\+://www.\+libelektra.\+org}) 
\end{DoxyCopyright}


\subsection{Function Documentation}
\hypertarget{array_8c_aee59442d3b1dea04454c7b93cd00c7ad}{\index{array.\+c@{array.\+c}!elektra\+Array\+Get@{elektra\+Array\+Get}}
\index{elektra\+Array\+Get@{elektra\+Array\+Get}!array.\+c@{array.\+c}}
\subsubsection[{elektra\+Array\+Get}]{\setlength{\rightskip}{0pt plus 5cm}Key\+Set$\ast$ elektra\+Array\+Get (
\begin{DoxyParamCaption}
\item[{const Key $\ast$}]{array\+Parent, }
\item[{Key\+Set $\ast$}]{keys}
\end{DoxyParamCaption}
)}}\label{array_8c_aee59442d3b1dea04454c7b93cd00c7ad}


Return all the array keys below the given arrayparent The arrayparent itself is not returned. 

For example, if user/config/\# is an array, user/config is the array parent. Only the direct array keys will be returned. This means that for example user/config/\#1/key will not be included, but only user/config/\#1.

A new keyset will be allocated for the resulting keys. This means that the caller must ks\+Del the resulting keyset.


\begin{DoxyParams}{Parameters}
{\em array\+Parent} & the parent of the array to be returned \\
\hline
{\em keys} & the keyset containing the array keys.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a keyset containing the arraykeys (if any) 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em N\+U\+L\+L} & on N\+U\+L\+L pointers \\
\hline
\end{DoxyRetVals}
\hypertarget{array_8c_aff4f7cbfc779e917ee41284d834231c6}{\index{array.\+c@{array.\+c}!elektra\+Array\+Get\+Next\+Key@{elektra\+Array\+Get\+Next\+Key}}
\index{elektra\+Array\+Get\+Next\+Key@{elektra\+Array\+Get\+Next\+Key}!array.\+c@{array.\+c}}
\subsubsection[{elektra\+Array\+Get\+Next\+Key}]{\setlength{\rightskip}{0pt plus 5cm}Key$\ast$ elektra\+Array\+Get\+Next\+Key (
\begin{DoxyParamCaption}
\item[{Key\+Set $\ast$}]{array\+Keys}
\end{DoxyParamCaption}
)}}\label{array_8c_aff4f7cbfc779e917ee41284d834231c6}


Return the next key in the given array. 

The function will automatically allocate memory for a new key and name it accordingly.

\begin{DoxyPrecond}{Precondition}
The supplied keyset must contain only valid array keys.
\end{DoxyPrecond}
The caller has to key\+Del the resulting key.


\begin{DoxyParams}{Parameters}
{\em array\+Keys} & the array where the new key will belong to\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new array key on success 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em N\+U\+L\+L} & if the passed array is empty \\
\hline
{\em N\+U\+L\+L} & on N\+U\+L\+L pointers or if an error occurs \\
\hline
\end{DoxyRetVals}
\hypertarget{array_8c_afc46476b8d722d89e07a966e023df317}{\index{array.\+c@{array.\+c}!elektra\+Array\+Inc\+Name@{elektra\+Array\+Inc\+Name}}
\index{elektra\+Array\+Inc\+Name@{elektra\+Array\+Inc\+Name}!array.\+c@{array.\+c}}
\subsubsection[{elektra\+Array\+Inc\+Name}]{\setlength{\rightskip}{0pt plus 5cm}int elektra\+Array\+Inc\+Name (
\begin{DoxyParamCaption}
\item[{Key $\ast$}]{key}
\end{DoxyParamCaption}
)}}\label{array_8c_afc46476b8d722d89e07a966e023df317}


Increment the name of the key by one. 

Alphabetical order will remain

e.\+g. user/abc/\#9 will be changed to user/abc/\#\+\_\+10

For the start\+: user/abc/\# will be changed to user/abc/\#0


\begin{DoxyParams}{Parameters}
{\em key} & which base name will be incremented\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/1} & on error (e.\+g. too large array, not validated array) \\
\hline
{\em 0} & on success \\
\hline
\end{DoxyRetVals}
