\hypertarget{group__ciniparser}{}\section{Ciniparser}
\label{group__ciniparser}\index{Ciniparser@{Ciniparser}}
\subsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \hyperlink{ciniparser_8c}{ciniparser.\+c}
\begin{DoxyCompactList}\small\item\em Parser for ini files. \end{DoxyCompactList}\item 
file \hyperlink{ciniparser_8h}{ciniparser.\+h}
\begin{DoxyCompactList}\small\item\em Parser for ini files. \end{DoxyCompactList}\item 
file \hyperlink{dictionary_8c}{dictionary.\+c}
\begin{DoxyCompactList}\small\item\em Implements a dictionary for string variables. \end{DoxyCompactList}\item 
file \hyperlink{dictionary_8h}{dictionary.\+h}
\begin{DoxyCompactList}\small\item\em Implements a dictionary for string variables.

This module implements a simple dictionary object, i.\+e. a list of string/string associations. This object is useful to store e.\+g. information retrieved from a configuration file (ini files). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct__dictionary__}{\+\_\+dictionary\+\_\+}
\begin{DoxyCompactList}\small\item\em Dictionary object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__ciniparser_gaeb84e295ec3307b215991d4bf88bceb7}{}\label{group__ciniparser_gaeb84e295ec3307b215991d4bf88bceb7} 
\#define {\bfseries A\+S\+C\+I\+I\+L\+I\+N\+E\+SZ}~(1024)
\item 
\hypertarget{group__ciniparser_gafd7ba4a10fc951dcb65fa2b001afb7a4}{}\label{group__ciniparser_gafd7ba4a10fc951dcb65fa2b001afb7a4} 
\#define {\bfseries I\+N\+I\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+K\+EY}~((char$\ast$)N\+U\+LL)
\item 
\hypertarget{group__ciniparser_gaf2c47d7df2f20bb2418bae0cc4433667}{}\label{group__ciniparser_gaf2c47d7df2f20bb2418bae0cc4433667} 
\#define {\bfseries ciniparser\+\_\+getstr}(d,  k)~\hyperlink{group__ciniparser_gaeb8a3530ebcbacf04b16a06c2353699a}{ciniparser\+\_\+getstring}(d, k, N\+U\+LL)
\item 
\hypertarget{group__ciniparser_gad7856ddf91b24bc6f67d013436806b7f}{}\label{group__ciniparser_gad7856ddf91b24bc6f67d013436806b7f} 
\#define {\bfseries ciniparser\+\_\+setstr}~\hyperlink{group__ciniparser_ga2890386ff0d944066f74cecff3cd0922}{ciniparser\+\_\+setstring}
\item 
\#define \hyperlink{group__ciniparser_ga071228a4e1c69ac2eec59e9c1385185a}{M\+A\+X\+V\+A\+L\+SZ}~1024
\item 
\#define \hyperlink{group__ciniparser_gaaf4ab97b3163920286cb932a3faedf86}{D\+I\+C\+T\+M\+I\+N\+SZ}~128
\item 
\#define \hyperlink{group__ciniparser_ga220dbd9af990c8faebfd01bd62b2dde4}{D\+I\+C\+T\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+K\+EY}~((char$\ast$)-\/1)
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef enum \hyperlink{group__ciniparser_ga2fdd0675424601a39f3534cf0088822c}{\+\_\+line\+\_\+status\+\_\+} \hyperlink{group__ciniparser_gadc101255f1686a23210fb9ea88394d46}{line\+\_\+status}
\item 
typedef struct \hyperlink{struct__dictionary__}{\+\_\+dictionary\+\_\+} \hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary}
\begin{DoxyCompactList}\small\item\em Dictionary object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{group__ciniparser_ga2fdd0675424601a39f3534cf0088822c}{\+\_\+line\+\_\+status\+\_\+} \{ \newline
{\bfseries L\+I\+N\+E\+\_\+\+U\+N\+P\+R\+O\+C\+E\+S\+S\+ED}, 
{\bfseries L\+I\+N\+E\+\_\+\+E\+R\+R\+OR}, 
{\bfseries L\+I\+N\+E\+\_\+\+E\+M\+P\+TY}, 
{\bfseries L\+I\+N\+E\+\_\+\+C\+O\+M\+M\+E\+NT}, 
\newline
{\bfseries L\+I\+N\+E\+\_\+\+S\+E\+C\+T\+I\+ON}, 
{\bfseries L\+I\+N\+E\+\_\+\+V\+A\+L\+UE}
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{group__ciniparser_ga306ec559a5feef2a44712a16a72ba64b}{ciniparser\+\_\+getnsec} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d)
\begin{DoxyCompactList}\small\item\em Get number of sections in a dictionary. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{group__ciniparser_ga57f6090b503edee285e7897b280ee6d0}{ciniparser\+\_\+getsecname} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, int n)
\begin{DoxyCompactList}\small\item\em Get name for section n in a dictionary. \end{DoxyCompactList}\item 
void \hyperlink{group__ciniparser_gac3baf2303bc7715836462364ad3d1b71}{ciniparser\+\_\+dump} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, F\+I\+LE $\ast$f)
\begin{DoxyCompactList}\small\item\em Dump a dictionary to an opened file pointer. \end{DoxyCompactList}\item 
void \hyperlink{group__ciniparser_gaedeba8efcca011ca841b7d27f892e930}{ciniparser\+\_\+dump\+\_\+ini} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, F\+I\+LE $\ast$f)
\begin{DoxyCompactList}\small\item\em Save a dictionary to a loadable ini file. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{group__ciniparser_gaeb8a3530ebcbacf04b16a06c2353699a}{ciniparser\+\_\+getstring} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, const char $\ast$key, char $\ast$def)
\begin{DoxyCompactList}\small\item\em Get the string associated to a key. \end{DoxyCompactList}\item 
int \hyperlink{group__ciniparser_ga494c830a31e50ba9daa03c5b3b596d1d}{ciniparser\+\_\+getint} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, const char $\ast$key, int notfound)
\begin{DoxyCompactList}\small\item\em Get the string associated to a key, convert to an int. \end{DoxyCompactList}\item 
double \hyperlink{group__ciniparser_gab47e041735c05feab41bb03b2c2b09f7}{ciniparser\+\_\+getdouble} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, const char $\ast$key, double notfound)
\begin{DoxyCompactList}\small\item\em Get the string associated to a key, convert to a double. \end{DoxyCompactList}\item 
int \hyperlink{group__ciniparser_ga21a20d1db5df6cb8854829a9649d57eb}{ciniparser\+\_\+getboolean} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, const char $\ast$key, int notfound)
\begin{DoxyCompactList}\small\item\em Get the string associated to a key, convert to a boolean. \end{DoxyCompactList}\item 
int \hyperlink{group__ciniparser_gafeceb3aa96858ad6d94367e834a84d19}{ciniparser\+\_\+find\+\_\+entry} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$ini, const char $\ast$entry)
\begin{DoxyCompactList}\small\item\em Finds out if a given entry exists in a dictionary. \end{DoxyCompactList}\item 
int \hyperlink{group__ciniparser_ga169dabf5b0a86dc1f4bd01ba6d7e23ce}{ciniparser\+\_\+set} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, const char $\ast$entry, const char $\ast$val)
\begin{DoxyCompactList}\small\item\em Set an item in the dictionary. \end{DoxyCompactList}\item 
void \hyperlink{group__ciniparser_gad0046980ed3cbf9da80b4f47655d27d9}{ciniparser\+\_\+unset} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$ini, char $\ast$entry)
\begin{DoxyCompactList}\small\item\em Delete an entry in a dictionary. \end{DoxyCompactList}\item 
\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$ \hyperlink{group__ciniparser_ga1e877c8cb81d953914b7f10030d84ccd}{ciniparser\+\_\+load} (const char $\ast$ininame)
\begin{DoxyCompactList}\small\item\em Parse an ini file and return an allocated dictionary object. \end{DoxyCompactList}\item 
void \hyperlink{group__ciniparser_gaddec45454d13abb8fc4a8da8dd4cc338}{ciniparser\+\_\+freedict} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d)
\begin{DoxyCompactList}\small\item\em Free all memory associated to an ini dictionary. \end{DoxyCompactList}\item 
int \hyperlink{group__ciniparser_ga2890386ff0d944066f74cecff3cd0922}{ciniparser\+\_\+setstring} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$ini, char const $\ast$entry, const char $\ast$val)
\begin{DoxyCompactList}\small\item\em Set an entry in a dictionary. \end{DoxyCompactList}\item 
unsigned \hyperlink{group__ciniparser_ga7c1ef0a729e668d1e8d6a7e774feaf2e}{dictionary\+\_\+hash} (const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Compute the hash key for a string. \end{DoxyCompactList}\item 
\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$ \hyperlink{group__ciniparser_ga876a908eb786f957f939a08a362e514d}{dictionary\+\_\+new} (int size)
\begin{DoxyCompactList}\small\item\em Create a new dictionary object. \end{DoxyCompactList}\item 
void \hyperlink{group__ciniparser_ga9d792f2544cf674a371663e2f32128fa}{dictionary\+\_\+del} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$vd)
\begin{DoxyCompactList}\small\item\em Delete a dictionary object. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{group__ciniparser_ga9b891a858ce598f8c87e3312d47bb2fc}{dictionary\+\_\+get} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, const char $\ast$key, const char $\ast$def)
\begin{DoxyCompactList}\small\item\em Get a value from a dictionary. \end{DoxyCompactList}\item 
int \hyperlink{group__ciniparser_gaab65a95ad09062716b24a129d8529b76}{dictionary\+\_\+set} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$vd, const char $\ast$key, const char $\ast$val)
\begin{DoxyCompactList}\small\item\em Set a value in a dictionary. \end{DoxyCompactList}\item 
void \hyperlink{group__ciniparser_ga27f0752948d52ccd2568dae22f5db2bc}{dictionary\+\_\+unset} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Delete a key in a dictionary. \end{DoxyCompactList}\item 
void \hyperlink{group__ciniparser_ga6e29ecf9c79331b1c6c26cd662cba042}{dictionary\+\_\+dump} (\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$d, F\+I\+LE $\ast$out)
\begin{DoxyCompactList}\small\item\em Dump a dictionary to an opened file pointer. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Macro Definition Documentation}
\hypertarget{group__ciniparser_ga220dbd9af990c8faebfd01bd62b2dde4}{}\label{group__ciniparser_ga220dbd9af990c8faebfd01bd62b2dde4} 
\index{Ciniparser@{Ciniparser}!D\+I\+C\+T\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+K\+EY@{D\+I\+C\+T\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+K\+EY}}
\index{D\+I\+C\+T\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+K\+EY@{D\+I\+C\+T\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+K\+EY}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{D\+I\+C\+T\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+K\+EY}{DICT\_INVALID\_KEY}}
{\footnotesize\ttfamily \#define D\+I\+C\+T\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+K\+EY~((char$\ast$)-\/1)}

Invalid key token 

Definition at line 53 of file dictionary.\+c.

\hypertarget{group__ciniparser_gaaf4ab97b3163920286cb932a3faedf86}{}\label{group__ciniparser_gaaf4ab97b3163920286cb932a3faedf86} 
\index{Ciniparser@{Ciniparser}!D\+I\+C\+T\+M\+I\+N\+SZ@{D\+I\+C\+T\+M\+I\+N\+SZ}}
\index{D\+I\+C\+T\+M\+I\+N\+SZ@{D\+I\+C\+T\+M\+I\+N\+SZ}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{D\+I\+C\+T\+M\+I\+N\+SZ}{DICTMINSZ}}
{\footnotesize\ttfamily \#define D\+I\+C\+T\+M\+I\+N\+SZ~128}

Minimal allocated number of entries in a dictionary 

Definition at line 50 of file dictionary.\+c.

\hypertarget{group__ciniparser_ga071228a4e1c69ac2eec59e9c1385185a}{}\label{group__ciniparser_ga071228a4e1c69ac2eec59e9c1385185a} 
\index{Ciniparser@{Ciniparser}!M\+A\+X\+V\+A\+L\+SZ@{M\+A\+X\+V\+A\+L\+SZ}}
\index{M\+A\+X\+V\+A\+L\+SZ@{M\+A\+X\+V\+A\+L\+SZ}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{M\+A\+X\+V\+A\+L\+SZ}{MAXVALSZ}}
{\footnotesize\ttfamily \#define M\+A\+X\+V\+A\+L\+SZ~1024}

Maximum value size for integers and doubles. 

Definition at line 47 of file dictionary.\+c.



\subsection{Typedef Documentation}
\hypertarget{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{}\label{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af} 
\index{Ciniparser@{Ciniparser}!dictionary@{dictionary}}
\index{dictionary@{dictionary}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{dictionary}{dictionary}}
{\footnotesize\ttfamily typedef struct \hyperlink{struct__dictionary__}{\+\_\+dictionary\+\_\+}  \hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary}}



Dictionary object. 


\begin{DoxyParams}{Parameters}
{\em n} & Number of entries in the dictionary \\
\hline
{\em size} & Storage size \\
\hline
{\em val} & List of string values \\
\hline
{\em key} & List of string keys \\
\hline
{\em hash} & List of hash values for keys\\
\hline
\end{DoxyParams}
This object contains a list of string/string associations. Each association is identified by a unique string key. Looking up values in the dictionary is speeded up by the use of a (hopefully collision-\/free) hash function. \hypertarget{group__ciniparser_gadc101255f1686a23210fb9ea88394d46}{}\label{group__ciniparser_gadc101255f1686a23210fb9ea88394d46} 
\index{Ciniparser@{Ciniparser}!line\+\_\+status@{line\+\_\+status}}
\index{line\+\_\+status@{line\+\_\+status}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{line\+\_\+status}{line\_status}}
{\footnotesize\ttfamily typedef enum \hyperlink{group__ciniparser_ga2fdd0675424601a39f3534cf0088822c}{\+\_\+line\+\_\+status\+\_\+}  \hyperlink{group__ciniparser_gadc101255f1686a23210fb9ea88394d46}{line\+\_\+status}}

This enum stores the status for each parsed line (internal use only). 

\subsection{Enumeration Type Documentation}
\hypertarget{group__ciniparser_ga2fdd0675424601a39f3534cf0088822c}{}\label{group__ciniparser_ga2fdd0675424601a39f3534cf0088822c} 
\index{Ciniparser@{Ciniparser}!\+\_\+line\+\_\+status\+\_\+@{\+\_\+line\+\_\+status\+\_\+}}
\index{\+\_\+line\+\_\+status\+\_\+@{\+\_\+line\+\_\+status\+\_\+}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{\+\_\+line\+\_\+status\+\_\+}{\_line\_status\_}}
{\footnotesize\ttfamily enum \hyperlink{group__ciniparser_ga2fdd0675424601a39f3534cf0088822c}{\+\_\+line\+\_\+status\+\_\+}}

This enum stores the status for each parsed line (internal use only). 

Definition at line 44 of file ciniparser.\+c.



\subsection{Function Documentation}
\hypertarget{group__ciniparser_gac3baf2303bc7715836462364ad3d1b71}{}\label{group__ciniparser_gac3baf2303bc7715836462364ad3d1b71} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+dump@{ciniparser\+\_\+dump}}
\index{ciniparser\+\_\+dump@{ciniparser\+\_\+dump}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+dump()}{ciniparser\_dump()}}
{\footnotesize\ttfamily void ciniparser\+\_\+dump (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{F\+I\+LE $\ast$}]{f }\end{DoxyParamCaption})}



Dump a dictionary to an opened file pointer. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to dump. \\
\hline
{\em f} & Opened file pointer to dump to. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void
\end{DoxyReturn}
This function prints out the contents of a dictionary, one element by line, onto the provided file pointer. It is OK to specify {\ttfamily stderr} or {\ttfamily stdout} as output files. This function is meant for debugging purposes mostly. 

Definition at line 227 of file ciniparser.\+c.

\hypertarget{group__ciniparser_gaedeba8efcca011ca841b7d27f892e930}{}\label{group__ciniparser_gaedeba8efcca011ca841b7d27f892e930} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+dump\+\_\+ini@{ciniparser\+\_\+dump\+\_\+ini}}
\index{ciniparser\+\_\+dump\+\_\+ini@{ciniparser\+\_\+dump\+\_\+ini}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+dump\+\_\+ini()}{ciniparser\_dump\_ini()}}
{\footnotesize\ttfamily void ciniparser\+\_\+dump\+\_\+ini (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{F\+I\+LE $\ast$}]{f }\end{DoxyParamCaption})}



Save a dictionary to a loadable ini file. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to dump \\
\hline
{\em f} & Opened file pointer to dump to \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void
\end{DoxyReturn}
This function dumps a given dictionary into a loadable ini file. It is Ok to specify {\ttfamily stderr} or {\ttfamily stdout} as output files. 

Definition at line 244 of file ciniparser.\+c.

\hypertarget{group__ciniparser_gafeceb3aa96858ad6d94367e834a84d19}{}\label{group__ciniparser_gafeceb3aa96858ad6d94367e834a84d19} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+find\+\_\+entry@{ciniparser\+\_\+find\+\_\+entry}}
\index{ciniparser\+\_\+find\+\_\+entry@{ciniparser\+\_\+find\+\_\+entry}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+find\+\_\+entry()}{ciniparser\_find\_entry()}}
{\footnotesize\ttfamily int ciniparser\+\_\+find\+\_\+entry (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{ini,  }\item[{const char $\ast$}]{entry }\end{DoxyParamCaption})}



Finds out if a given entry exists in a dictionary. 


\begin{DoxyParams}{Parameters}
{\em ini} & Dictionary to search \\
\hline
{\em entry} & Name of the entry to look for \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
integer 1 if entry exists, 0 otherwise
\end{DoxyReturn}
Finds out if a given entry exists in the dictionary. Since sections are stored as keys with N\+U\+LL associated values, this is the only way of querying for the presence of sections in a dictionary. 

Definition at line 348 of file ciniparser.\+c.

\hypertarget{group__ciniparser_gaddec45454d13abb8fc4a8da8dd4cc338}{}\label{group__ciniparser_gaddec45454d13abb8fc4a8da8dd4cc338} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+freedict@{ciniparser\+\_\+freedict}}
\index{ciniparser\+\_\+freedict@{ciniparser\+\_\+freedict}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+freedict()}{ciniparser\_freedict()}}
{\footnotesize\ttfamily void ciniparser\+\_\+freedict (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d }\end{DoxyParamCaption})}



Free all memory associated to an ini dictionary. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to free \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void
\end{DoxyReturn}
Free all memory associated to an ini dictionary. It is mandatory to call this function before the dictionary object gets out of the current context. 

Definition at line 468 of file ciniparser.\+c.

\hypertarget{group__ciniparser_ga21a20d1db5df6cb8854829a9649d57eb}{}\label{group__ciniparser_ga21a20d1db5df6cb8854829a9649d57eb} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+getboolean@{ciniparser\+\_\+getboolean}}
\index{ciniparser\+\_\+getboolean@{ciniparser\+\_\+getboolean}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+getboolean()}{ciniparser\_getboolean()}}
{\footnotesize\ttfamily int ciniparser\+\_\+getboolean (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{const char $\ast$}]{key,  }\item[{int}]{notfound }\end{DoxyParamCaption})}



Get the string associated to a key, convert to a boolean. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to search \\
\hline
{\em key} & Key string to look for \\
\hline
{\em notfound} & Value to return in case of error \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
integer
\end{DoxyReturn}
This function queries a dictionary for a key. A key as read from an ini file is given as \char`\"{}section\+:key\char`\"{}. If the key cannot be found, the notfound value is returned.

A true boolean is found if one of the following is matched\+:


\begin{DoxyItemize}
\item A string starting with \textquotesingle{}y\textquotesingle{}
\item A string starting with \textquotesingle{}Y\textquotesingle{}
\item A string starting with \textquotesingle{}t\textquotesingle{}
\item A string starting with \textquotesingle{}T\textquotesingle{}
\item A string starting with \textquotesingle{}1\textquotesingle{}
\end{DoxyItemize}

A false boolean is found if one of the following is matched\+:


\begin{DoxyItemize}
\item A string starting with \textquotesingle{}n\textquotesingle{}
\item A string starting with \textquotesingle{}N\textquotesingle{}
\item A string starting with \textquotesingle{}f\textquotesingle{}
\item A string starting with \textquotesingle{}F\textquotesingle{}
\item A string starting with \textquotesingle{}0\textquotesingle{}
\end{DoxyItemize}

The notfound value returned if no boolean is identified, does not necessarily have to be 0 or 1. 

Definition at line 324 of file ciniparser.\+c.

\hypertarget{group__ciniparser_gab47e041735c05feab41bb03b2c2b09f7}{}\label{group__ciniparser_gab47e041735c05feab41bb03b2c2b09f7} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+getdouble@{ciniparser\+\_\+getdouble}}
\index{ciniparser\+\_\+getdouble@{ciniparser\+\_\+getdouble}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+getdouble()}{ciniparser\_getdouble()}}
{\footnotesize\ttfamily double ciniparser\+\_\+getdouble (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{const char $\ast$}]{key,  }\item[{double}]{notfound }\end{DoxyParamCaption})}



Get the string associated to a key, convert to a double. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to search \\
\hline
{\em key} & Key string to look for \\
\hline
{\em notfound} & Value to return in case of error \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
double
\end{DoxyReturn}
This function queries a dictionary for a key. A key as read from an ini file is given as \char`\"{}section\+:key\char`\"{}. If the key cannot be found, the notfound value is returned. 

Definition at line 312 of file ciniparser.\+c.

\hypertarget{group__ciniparser_ga494c830a31e50ba9daa03c5b3b596d1d}{}\label{group__ciniparser_ga494c830a31e50ba9daa03c5b3b596d1d} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+getint@{ciniparser\+\_\+getint}}
\index{ciniparser\+\_\+getint@{ciniparser\+\_\+getint}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+getint()}{ciniparser\_getint()}}
{\footnotesize\ttfamily int ciniparser\+\_\+getint (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{const char $\ast$}]{key,  }\item[{int}]{notfound }\end{DoxyParamCaption})}



Get the string associated to a key, convert to an int. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to search \\
\hline
{\em key} & Key string to look for \\
\hline
{\em notfound} & Value to return in case of error \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
integer
\end{DoxyReturn}
This function queries a dictionary for a key. A key as read from an ini file is given as \char`\"{}section\+:key\char`\"{}. If the key cannot be found, the notfound value is returned.

Supported values for integers include the usual C notation so decimal, octal (starting with 0) and hexadecimal (starting with 0x) are supported. Examples\+:


\begin{DoxyItemize}
\item \char`\"{}42\char`\"{} -\/$>$ 42
\item \char`\"{}042\char`\"{} -\/$>$ 34 (octal -\/$>$ decimal)
\item \char`\"{}0x42\char`\"{} -\/$>$ 66 (hexa -\/$>$ decimal)
\end{DoxyItemize}

Warning\+: the conversion may overflow in various ways. Conversion is totally outsourced to strtol(), see the associated man page for overflow handling.

Credits\+: Thanks to A. Becker for suggesting strtol() 

Definition at line 300 of file ciniparser.\+c.

\hypertarget{group__ciniparser_ga306ec559a5feef2a44712a16a72ba64b}{}\label{group__ciniparser_ga306ec559a5feef2a44712a16a72ba64b} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+getnsec@{ciniparser\+\_\+getnsec}}
\index{ciniparser\+\_\+getnsec@{ciniparser\+\_\+getnsec}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+getnsec()}{ciniparser\_getnsec()}}
{\footnotesize\ttfamily int ciniparser\+\_\+getnsec (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d }\end{DoxyParamCaption})}



Get number of sections in a dictionary. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to examine \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
int Number of sections found in dictionary, -\/1 on error
\end{DoxyReturn}
This function returns the number of sections found in a dictionary. The test to recognize sections is done on the string stored in the dictionary\+: a section name is given as \char`\"{}section\char`\"{} whereas a key is stored as \char`\"{}section\+:key\char`\"{}, thus the test looks for entries that do not contain a colon.

This clearly fails in the case a section name contains a colon, but this should simply be avoided. 

Definition at line 179 of file ciniparser.\+c.

\hypertarget{group__ciniparser_ga57f6090b503edee285e7897b280ee6d0}{}\label{group__ciniparser_ga57f6090b503edee285e7897b280ee6d0} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+getsecname@{ciniparser\+\_\+getsecname}}
\index{ciniparser\+\_\+getsecname@{ciniparser\+\_\+getsecname}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+getsecname()}{ciniparser\_getsecname()}}
{\footnotesize\ttfamily const char $\ast$ ciniparser\+\_\+getsecname (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{int}]{n }\end{DoxyParamCaption})}



Get name for section n in a dictionary. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to examine \\
\hline
{\em n} & Section number (from 0 to nsec-\/1). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to char string, N\+U\+LL on error
\end{DoxyReturn}
This function locates the n-\/th section in a dictionary and returns its name as a pointer to a string statically allocated inside the dictionary. Do not free or modify the returned string! 

Definition at line 198 of file ciniparser.\+c.

\hypertarget{group__ciniparser_gaeb8a3530ebcbacf04b16a06c2353699a}{}\label{group__ciniparser_gaeb8a3530ebcbacf04b16a06c2353699a} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+getstring@{ciniparser\+\_\+getstring}}
\index{ciniparser\+\_\+getstring@{ciniparser\+\_\+getstring}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+getstring()}{ciniparser\_getstring()}}
{\footnotesize\ttfamily const char $\ast$ ciniparser\+\_\+getstring (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{const char $\ast$}]{key,  }\item[{char $\ast$}]{def }\end{DoxyParamCaption})}



Get the string associated to a key. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to search \\
\hline
{\em key} & Key string to look for \\
\hline
{\em def} & Default value to return if key not found. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to statically allocated character string
\end{DoxyReturn}
This function queries a dictionary for a key. A key as read from an ini file is given as \char`\"{}section\+:key\char`\"{}. If the key cannot be found, the pointer passed as \textquotesingle{}def\textquotesingle{} is returned. The returned char pointer is pointing to a string allocated in the dictionary, do not free or modify it. 

Definition at line 286 of file ciniparser.\+c.

\hypertarget{group__ciniparser_ga1e877c8cb81d953914b7f10030d84ccd}{}\label{group__ciniparser_ga1e877c8cb81d953914b7f10030d84ccd} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+load@{ciniparser\+\_\+load}}
\index{ciniparser\+\_\+load@{ciniparser\+\_\+load}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+load()}{ciniparser\_load()}}
{\footnotesize\ttfamily \hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$ ciniparser\+\_\+load (\begin{DoxyParamCaption}\item[{const char $\ast$}]{ininame }\end{DoxyParamCaption})}



Parse an ini file and return an allocated dictionary object. 


\begin{DoxyParams}{Parameters}
{\em ininame} & Name of the ini file to read. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to newly allocated dictionary
\end{DoxyReturn}
This is the parser for ini files. This function is called, providing the name of the file to be read. It returns a dictionary object that should not be accessed directly, but through accessor functions instead.

The returned dictionary must be freed using \hyperlink{group__ciniparser_gaddec45454d13abb8fc4a8da8dd4cc338}{ciniparser\+\_\+freedict()}. 

Definition at line 368 of file ciniparser.\+c.

\hypertarget{group__ciniparser_ga169dabf5b0a86dc1f4bd01ba6d7e23ce}{}\label{group__ciniparser_ga169dabf5b0a86dc1f4bd01ba6d7e23ce} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+set@{ciniparser\+\_\+set}}
\index{ciniparser\+\_\+set@{ciniparser\+\_\+set}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+set()}{ciniparser\_set()}}
{\footnotesize\ttfamily int ciniparser\+\_\+set (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{const char $\ast$}]{entry,  }\item[{const char $\ast$}]{val }\end{DoxyParamCaption})}



Set an item in the dictionary. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary object created by \hyperlink{group__ciniparser_ga1e877c8cb81d953914b7f10030d84ccd}{ciniparser\+\_\+load()} \\
\hline
{\em entry} & Entry in the dictionary to manipulate \\
\hline
{\em val} & Value to assign to the entry \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on error
\end{DoxyReturn}
Remember that string values are converted by \hyperlink{group__ciniparser_ga21a20d1db5df6cb8854829a9649d57eb}{ciniparser\+\_\+getboolean()}, \hyperlink{group__ciniparser_gab47e041735c05feab41bb03b2c2b09f7}{ciniparser\+\_\+getdouble()}, etc. It is also OK to set an entry to N\+U\+LL. 

Definition at line 358 of file ciniparser.\+c.

\hypertarget{group__ciniparser_ga2890386ff0d944066f74cecff3cd0922}{}\label{group__ciniparser_ga2890386ff0d944066f74cecff3cd0922} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+setstring@{ciniparser\+\_\+setstring}}
\index{ciniparser\+\_\+setstring@{ciniparser\+\_\+setstring}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+setstring()}{ciniparser\_setstring()}}
{\footnotesize\ttfamily int ciniparser\+\_\+setstring (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{ini,  }\item[{char const $\ast$}]{entry,  }\item[{const char $\ast$}]{val }\end{DoxyParamCaption})}



Set an entry in a dictionary. 


\begin{DoxyParams}{Parameters}
{\em ini} & Dictionary to modify. \\
\hline
{\em entry} & Entry to modify (entry name) \\
\hline
{\em val} & New value to associate to the entry. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
int 0 if Ok, -\/1 otherwise.
\end{DoxyReturn}
If the given entry can be found in the dictionary, it is modified to contain the provided value. If it cannot be found, -\/1 is returned. It is Ok to set val to N\+U\+LL. \hypertarget{group__ciniparser_gad0046980ed3cbf9da80b4f47655d27d9}{}\label{group__ciniparser_gad0046980ed3cbf9da80b4f47655d27d9} 
\index{Ciniparser@{Ciniparser}!ciniparser\+\_\+unset@{ciniparser\+\_\+unset}}
\index{ciniparser\+\_\+unset@{ciniparser\+\_\+unset}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{ciniparser\+\_\+unset()}{ciniparser\_unset()}}
{\footnotesize\ttfamily void ciniparser\+\_\+unset (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{ini,  }\item[{char $\ast$}]{entry }\end{DoxyParamCaption})}



Delete an entry in a dictionary. 


\begin{DoxyParams}{Parameters}
{\em ini} & Dictionary to modify \\
\hline
{\em entry} & Entry to delete (entry name) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void
\end{DoxyReturn}
If the given entry can be found, it is deleted from the dictionary. 

Definition at line 363 of file ciniparser.\+c.

\hypertarget{group__ciniparser_ga9d792f2544cf674a371663e2f32128fa}{}\label{group__ciniparser_ga9d792f2544cf674a371663e2f32128fa} 
\index{Ciniparser@{Ciniparser}!dictionary\+\_\+del@{dictionary\+\_\+del}}
\index{dictionary\+\_\+del@{dictionary\+\_\+del}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{dictionary\+\_\+del()}{dictionary\_del()}}
{\footnotesize\ttfamily void dictionary\+\_\+del (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{vd }\end{DoxyParamCaption})}



Delete a dictionary object. 


\begin{DoxyParams}{Parameters}
{\em d} & dictionary object to deallocate. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void
\end{DoxyReturn}
Deallocate a dictionary object and all memory associated to it. 

Definition at line 109 of file dictionary.\+c.

\hypertarget{group__ciniparser_ga6e29ecf9c79331b1c6c26cd662cba042}{}\label{group__ciniparser_ga6e29ecf9c79331b1c6c26cd662cba042} 
\index{Ciniparser@{Ciniparser}!dictionary\+\_\+dump@{dictionary\+\_\+dump}}
\index{dictionary\+\_\+dump@{dictionary\+\_\+dump}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{dictionary\+\_\+dump()}{dictionary\_dump()}}
{\footnotesize\ttfamily void dictionary\+\_\+dump (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{F\+I\+LE $\ast$}]{out }\end{DoxyParamCaption})}



Dump a dictionary to an opened file pointer. 


\begin{DoxyParams}{Parameters}
{\em d} & Dictionary to dump \\
\hline
{\em out} & Opened file pointer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void
\end{DoxyReturn}
Dumps a dictionary onto an opened file pointer. Key pairs are printed out as {\ttfamily }\mbox{[}Key\mbox{]}=\mbox{[}Value\mbox{]}, one per line. It is Ok to provide stdout or stderr as output file pointers. 

Definition at line 241 of file dictionary.\+c.

\hypertarget{group__ciniparser_ga9b891a858ce598f8c87e3312d47bb2fc}{}\label{group__ciniparser_ga9b891a858ce598f8c87e3312d47bb2fc} 
\index{Ciniparser@{Ciniparser}!dictionary\+\_\+get@{dictionary\+\_\+get}}
\index{dictionary\+\_\+get@{dictionary\+\_\+get}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{dictionary\+\_\+get()}{dictionary\_get()}}
{\footnotesize\ttfamily const char $\ast$ dictionary\+\_\+get (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{const char $\ast$}]{key,  }\item[{const char $\ast$}]{def }\end{DoxyParamCaption})}



Get a value from a dictionary. 


\begin{DoxyParams}{Parameters}
{\em d} & dictionary object to search. \\
\hline
{\em key} & Key to look for in the dictionary. \\
\hline
{\em def} & Default value to return if key not found. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 pointer to internally allocated character string.
\end{DoxyReturn}
This function locates a key in a dictionary and returns a pointer to its value, or the passed \textquotesingle{}def\textquotesingle{} pointer if no such key can be found in dictionary. The returned character pointer points to data internal to the dictionary object, you should not try to free it or modify it. 

Definition at line 128 of file dictionary.\+c.

\hypertarget{group__ciniparser_ga7c1ef0a729e668d1e8d6a7e774feaf2e}{}\label{group__ciniparser_ga7c1ef0a729e668d1e8d6a7e774feaf2e} 
\index{Ciniparser@{Ciniparser}!dictionary\+\_\+hash@{dictionary\+\_\+hash}}
\index{dictionary\+\_\+hash@{dictionary\+\_\+hash}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{dictionary\+\_\+hash()}{dictionary\_hash()}}
{\footnotesize\ttfamily unsigned dictionary\+\_\+hash (\begin{DoxyParamCaption}\item[{const char $\ast$}]{key }\end{DoxyParamCaption})}



Compute the hash key for a string. 


\begin{DoxyParams}{Parameters}
{\em key} & Character string to use for key. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 unsigned int on at least 32 bits.
\end{DoxyReturn}
This hash function has been taken from an Article in Dr Dobbs Journal. This is normally a collision-\/free function, distributing keys evenly. The key is stored anyway in the struct so that collision can be avoided by comparing the key itself in last resort. 

Definition at line 74 of file dictionary.\+c.

\hypertarget{group__ciniparser_ga876a908eb786f957f939a08a362e514d}{}\label{group__ciniparser_ga876a908eb786f957f939a08a362e514d} 
\index{Ciniparser@{Ciniparser}!dictionary\+\_\+new@{dictionary\+\_\+new}}
\index{dictionary\+\_\+new@{dictionary\+\_\+new}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{dictionary\+\_\+new()}{dictionary\_new()}}
{\footnotesize\ttfamily \hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$ dictionary\+\_\+new (\begin{DoxyParamCaption}\item[{int}]{size }\end{DoxyParamCaption})}



Create a new dictionary object. 


\begin{DoxyParams}{Parameters}
{\em size} & Optional initial size of the dictionary. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
allocated dictionary object on success, N\+U\+LL on failure
\end{DoxyReturn}
This function allocates a new dictionary object of given size and returns it. If you do not know in advance (roughly) the number of entries in the dictionary, give size=0. 

Definition at line 92 of file dictionary.\+c.

\hypertarget{group__ciniparser_gaab65a95ad09062716b24a129d8529b76}{}\label{group__ciniparser_gaab65a95ad09062716b24a129d8529b76} 
\index{Ciniparser@{Ciniparser}!dictionary\+\_\+set@{dictionary\+\_\+set}}
\index{dictionary\+\_\+set@{dictionary\+\_\+set}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{dictionary\+\_\+set()}{dictionary\_set()}}
{\footnotesize\ttfamily int dictionary\+\_\+set (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{vd,  }\item[{const char $\ast$}]{key,  }\item[{const char $\ast$}]{val }\end{DoxyParamCaption})}



Set a value in a dictionary. 


\begin{DoxyParams}{Parameters}
{\em d} & dictionary object to modify. \\
\hline
{\em key} & Key to modify or add. \\
\hline
{\em val} & Value to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
int 0 if Ok, anything else otherwise
\end{DoxyReturn}
If the given key is found in the dictionary, the associated value is replaced by the provided one. If the key cannot be found in the dictionary, it is added to it.

It is Ok to provide a N\+U\+LL value for val, but N\+U\+LL values for the dictionary or the key are considered as errors\+: the function will return immediately in such a case.

Notice that if you dictionary\+\_\+set a variable to N\+U\+LL, a call to dictionary\+\_\+get will return a N\+U\+LL value\+: the variable will be found, and its value (N\+U\+LL) is returned. In other words, setting the variable content to N\+U\+LL is equivalent to deleting the variable from the dictionary. It is not possible (in this implementation) to have a key in the dictionary without value.

This function returns non-\/zero in case of failure. 

Definition at line 147 of file dictionary.\+c.

\hypertarget{group__ciniparser_ga27f0752948d52ccd2568dae22f5db2bc}{}\label{group__ciniparser_ga27f0752948d52ccd2568dae22f5db2bc} 
\index{Ciniparser@{Ciniparser}!dictionary\+\_\+unset@{dictionary\+\_\+unset}}
\index{dictionary\+\_\+unset@{dictionary\+\_\+unset}!Ciniparser@{Ciniparser}}
\subsubsection{\texorpdfstring{dictionary\+\_\+unset()}{dictionary\_unset()}}
{\footnotesize\ttfamily void dictionary\+\_\+unset (\begin{DoxyParamCaption}\item[{\hyperlink{group__ciniparser_ga5bd3b2ce42b776c76755ec65642f43af}{dictionary} $\ast$}]{d,  }\item[{const char $\ast$}]{key }\end{DoxyParamCaption})}



Delete a key in a dictionary. 


\begin{DoxyParams}{Parameters}
{\em d} & dictionary object to modify. \\
\hline
{\em key} & Key to remove. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
void
\end{DoxyReturn}
This function deletes a key in a dictionary. Nothing is done if the key cannot be found. 

Definition at line 206 of file dictionary.\+c.

