\hypertarget{config__file_8c}{}\section{/home/mk/tmp/lirc/lib/config\+\_\+file.c File Reference}
\label{config__file_8c}\index{/home/mk/tmp/lirc/lib/config\+\_\+file.\+c(4b03c40 2015-\/09-\/29 23\+:35\+:45 +0200)@{/home/mk/tmp/lirc/lib/config\+\_\+file.\+c(4b03c40 2015-\/09-\/29 23\+:35\+:45 +0200)}}


Implements \hyperlink{config__file_8h}{config\+\_\+file.\+h}.  


{\ttfamily \#include $<$dirent.\+h$>$}\\*
{\ttfamily \#include $<$errno.\+h$>$}\\*
{\ttfamily \#include $<$glob.\+h$>$}\\*
{\ttfamily \#include $<$limits.\+h$>$}\\*
{\ttfamily \#include $<$unistd.\+h$>$}\\*
{\ttfamily \#include $<$stdio.\+h$>$}\\*
{\ttfamily \#include $<$stdlib.\+h$>$}\\*
{\ttfamily \#include $<$string.\+h$>$}\\*
{\ttfamily \#include $<$libgen.\+h$>$}\\*
{\ttfamily \#include $<$sys/socket.\+h$>$}\\*
{\ttfamily \#include $<$sys/un.\+h$>$}\\*
{\ttfamily \#include $<$sys/stat.\+h$>$}\\*
{\ttfamily \#include $<$sys/types.\+h$>$}\\*
{\ttfamily \#include $<$fcntl.\+h$>$}\\*
{\ttfamily \#include $<$ctype.\+h$>$}\\*
{\ttfamily \#include \char`\"{}include/media/lirc.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}lirc/lirc\+\_\+log.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}lirc/lirc\+\_\+options.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}lirc/ir\+\_\+remote.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}lirc/config\+\_\+file.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}lirc/transmit.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}lirc/config\+\_\+flags.\+h\char`\"{}}\\*
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{config__file_8c_a45db13d622cb21897aa934e5ad411c83}{}\#define {\bfseries L\+I\+N\+E\+\_\+\+L\+E\+N}~1024\label{config__file_8c_a45db13d622cb21897aa934e5ad411c83}

\item 
\hypertarget{config__file_8c_a5319bb0b2d15e5b98751faa7c92cc1cf}{}\#define {\bfseries M\+A\+X\+\_\+\+I\+N\+C\+L\+U\+D\+E\+S}~10\label{config__file_8c_a5319bb0b2d15e5b98751faa7c92cc1cf}

\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void $\ast$($\ast$ \hyperlink{config__file_8c_a0d1babe47ccb669975abe5ad4398548b}{array\+\_\+guest\+\_\+func}) (void $\ast$item, void $\ast$arg)
\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\hypertarget{config__file_8c_a0253a0f97450621088027f8584f850d6}{}enum {\bfseries directive} \{ \\*
{\bfseries I\+D\+\_\+none}, 
{\bfseries I\+D\+\_\+remote}, 
{\bfseries I\+D\+\_\+codes}, 
{\bfseries I\+D\+\_\+raw\+\_\+codes}, 
\\*
{\bfseries I\+D\+\_\+raw\+\_\+name}
 \}\label{config__file_8c_a0253a0f97450621088027f8584f850d6}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{config__file_8c_a7fdd44d7c663a1ca4a64be594c8e02af}{}void $\ast$$\ast$ {\bfseries init\+\_\+void\+\_\+array} (struct void\+\_\+array $\ast$ar, size\+\_\+t chunk\+\_\+size, size\+\_\+t item\+\_\+size)\label{config__file_8c_a7fdd44d7c663a1ca4a64be594c8e02af}

\item 
int \hyperlink{config__file_8c_a80db2da30ea6ad4282ad56bd2c44ef89}{add\+\_\+void\+\_\+array} (struct void\+\_\+array $\ast$ar, void $\ast$dataptr)
\item 
void $\ast$ \hyperlink{config__file_8c_a2023c5782f807cd639641f400fda3191}{get\+\_\+void\+\_\+array} (struct void\+\_\+array $\ast$ar)
\item 
\hypertarget{config__file_8c_a9c06bc8a350ebf6a1b0be1666476f630}{}void $\ast$ {\bfseries s\+\_\+malloc} (size\+\_\+t size)\label{config__file_8c_a9c06bc8a350ebf6a1b0be1666476f630}

\item 
\hypertarget{config__file_8c_a0980bf55161204f1f9f19f838ccf06fb}{}char $\ast$ {\bfseries s\+\_\+strdup} (char $\ast$string)\label{config__file_8c_a0980bf55161204f1f9f19f838ccf06fb}

\item 
\hypertarget{config__file_8c_a3508eb04c7125d04556a54e37830f946}{}\hyperlink{ir__remote__types_8h_af5395595bc25a70e974255b83d97db06}{ir\+\_\+code} {\bfseries s\+\_\+strtocode} (const char $\ast$val)\label{config__file_8c_a3508eb04c7125d04556a54e37830f946}

\item 
\hypertarget{config__file_8c_a6a02e049a252f6898e524a8c6a7c67b3}{}\+\_\+\+\_\+u32 {\bfseries s\+\_\+strtou32} (char $\ast$val)\label{config__file_8c_a6a02e049a252f6898e524a8c6a7c67b3}

\item 
\hypertarget{config__file_8c_a354c50e22a8614d0685e3426cda34a77}{}int {\bfseries s\+\_\+strtoi} (char $\ast$val)\label{config__file_8c_a354c50e22a8614d0685e3426cda34a77}

\item 
\hypertarget{config__file_8c_a77597b785b3612b2260c0b27ccf78a31}{}unsigned int {\bfseries s\+\_\+strtoui} (char $\ast$val)\label{config__file_8c_a77597b785b3612b2260c0b27ccf78a31}

\item 
\hypertarget{config__file_8c_a332db28389bee1c719760e23d610ec17}{}lirc\+\_\+t {\bfseries s\+\_\+strtolirc\+\_\+t} (char $\ast$val)\label{config__file_8c_a332db28389bee1c719760e23d610ec17}

\item 
\hypertarget{config__file_8c_a72ab37ce802cdcb7472acf5eb787b302}{}int {\bfseries check\+Mode} (int is\+\_\+mode, int c\+\_\+mode, char $\ast$error)\label{config__file_8c_a72ab37ce802cdcb7472acf5eb787b302}

\item 
\hypertarget{config__file_8c_a8a6e38030f6d2dcda7175cab33695a31}{}int {\bfseries add\+Signal} (struct void\+\_\+array $\ast$signals, char $\ast$val)\label{config__file_8c_a8a6e38030f6d2dcda7175cab33695a31}

\item 
\hypertarget{config__file_8c_a6d9520cb701e58761515abee60b96565}{}struct \hyperlink{structir__ncode}{ir\+\_\+ncode} $\ast$ {\bfseries define\+Code} (char $\ast$key, char $\ast$val, struct \hyperlink{structir__ncode}{ir\+\_\+ncode} $\ast$code)\label{config__file_8c_a6d9520cb701e58761515abee60b96565}

\item 
\hypertarget{config__file_8c_a1780d1d3ea6b387f38f78135bca46e20}{}struct \hyperlink{structir__code__node}{ir\+\_\+code\+\_\+node} $\ast$ {\bfseries define\+Node} (struct \hyperlink{structir__ncode}{ir\+\_\+ncode} $\ast$code, const char $\ast$val)\label{config__file_8c_a1780d1d3ea6b387f38f78135bca46e20}

\item 
\hypertarget{config__file_8c_a57b60f0b46c7e6ccb1a196caaa9a54c3}{}int {\bfseries parse\+Flags} (char $\ast$val)\label{config__file_8c_a57b60f0b46c7e6ccb1a196caaa9a54c3}

\item 
\hypertarget{config__file_8c_af7102931eafea24d0bc35f5e9d94c8f5}{}int {\bfseries define\+Remote} (char $\ast$key, char $\ast$val, char $\ast$val2, struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$rem)\label{config__file_8c_af7102931eafea24d0bc35f5e9d94c8f5}

\item 
struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$ \hyperlink{group__private__api_gaae645b840ccf7816a6dd37d53bc4325a}{read\+\_\+config} (F\+I\+L\+E $\ast$f, const char $\ast$name)
\item 
void \hyperlink{group__private__api_gaa55b7dcba60df4c178fd885eaf129288}{free\+\_\+config} (struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$remotes)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{config__file_8c_a27630b7490fa30a89837c675c9afd899}{}const char $\ast$ {\bfseries whitespace} = \char`\"{} \textbackslash{}t\char`\"{}\label{config__file_8c_a27630b7490fa30a89837c675c9afd899}

\item 
const struct \hyperlink{structflaglist}{flaglist} \hyperlink{config__file_8c_a9032e29936c127d0314c1946fdcef80a}{all\+\_\+flags} \mbox{[}$\,$\mbox{]}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implements \hyperlink{config__file_8h}{config\+\_\+file.\+h}. 

\begin{DoxyAuthor}{Author}
Pablo d\textquotesingle{}Angelo 
\end{DoxyAuthor}


\subsection{Typedef Documentation}
\hypertarget{config__file_8c_a0d1babe47ccb669975abe5ad4398548b}{}\index{config\+\_\+file.\+c@{config\+\_\+file.\+c}!array\+\_\+guest\+\_\+func@{array\+\_\+guest\+\_\+func}}
\index{array\+\_\+guest\+\_\+func@{array\+\_\+guest\+\_\+func}!config\+\_\+file.\+c@{config\+\_\+file.\+c}}
\subsubsection[{array\+\_\+guest\+\_\+func}]{\setlength{\rightskip}{0pt plus 5cm}typedef void$\ast$($\ast$ array\+\_\+guest\+\_\+func) (void $\ast$item, void $\ast$arg)}\label{config__file_8c_a0d1babe47ccb669975abe5ad4398548b}
foreach\+\_\+void\+\_\+array argument. 

Definition at line 63 of file config\+\_\+file.\+c.



\subsection{Function Documentation}
\hypertarget{config__file_8c_a80db2da30ea6ad4282ad56bd2c44ef89}{}\index{config\+\_\+file.\+c@{config\+\_\+file.\+c}!add\+\_\+void\+\_\+array@{add\+\_\+void\+\_\+array}}
\index{add\+\_\+void\+\_\+array@{add\+\_\+void\+\_\+array}!config\+\_\+file.\+c@{config\+\_\+file.\+c}}
\subsubsection[{add\+\_\+void\+\_\+array}]{\setlength{\rightskip}{0pt plus 5cm}int add\+\_\+void\+\_\+array (
\begin{DoxyParamCaption}
\item[{struct void\+\_\+array $\ast$}]{ar, }
\item[{void $\ast$}]{dataptr}
\end{DoxyParamCaption}
)}\label{config__file_8c_a80db2da30ea6ad4282ad56bd2c44ef89}
Add $\ast$dataptr to end of ar, re-\/allocating as necessary. 

Definition at line 116 of file config\+\_\+file.\+c.

\hypertarget{config__file_8c_a2023c5782f807cd639641f400fda3191}{}\index{config\+\_\+file.\+c@{config\+\_\+file.\+c}!get\+\_\+void\+\_\+array@{get\+\_\+void\+\_\+array}}
\index{get\+\_\+void\+\_\+array@{get\+\_\+void\+\_\+array}!config\+\_\+file.\+c@{config\+\_\+file.\+c}}
\subsubsection[{get\+\_\+void\+\_\+array}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ get\+\_\+void\+\_\+array (
\begin{DoxyParamCaption}
\item[{struct void\+\_\+array $\ast$}]{ar}
\end{DoxyParamCaption}
)}\label{config__file_8c_a2023c5782f807cd639641f400fda3191}
Return the array dataptr, an array\mbox{[}nr\+\_\+items\mbox{]} of item\+\_\+size elements. 

Definition at line 141 of file config\+\_\+file.\+c.



\subsection{Variable Documentation}
\hypertarget{config__file_8c_a9032e29936c127d0314c1946fdcef80a}{}\index{config\+\_\+file.\+c@{config\+\_\+file.\+c}!all\+\_\+flags@{all\+\_\+flags}}
\index{all\+\_\+flags@{all\+\_\+flags}!config\+\_\+file.\+c@{config\+\_\+file.\+c}}
\subsubsection[{all\+\_\+flags}]{\setlength{\rightskip}{0pt plus 5cm}const struct {\bf flaglist} all\+\_\+flags\mbox{[}$\,$\mbox{]}}\label{config__file_8c_a9032e29936c127d0314c1946fdcef80a}
{\bfseries Initial value\+:}
\begin{DoxyCode}
= \{
        \{ \textcolor{stringliteral}{"RAW\_CODES"},     \hyperlink{ir__remote__types_8h_a1d5942b879cf0bb135f4496bb0d27d4a}{RAW\_CODES}    \},
        \{ \textcolor{stringliteral}{"RC5"},           \hyperlink{ir__remote__types_8h_a91697bfec209fb3146fde1f40e425ede}{RC5}                \},
        \{ \textcolor{stringliteral}{"SHIFT\_ENC"},     \hyperlink{ir__remote__types_8h_a1a3e70543f0b4b37b11cf675e16edc78}{SHIFT\_ENC}    \}, 
        \{ \textcolor{stringliteral}{"RC6"},           \hyperlink{ir__remote__types_8h_a259ca3c51823b7454fb93db646b81bb1}{RC6}                \},
        \{ \textcolor{stringliteral}{"RCMM"},          \hyperlink{ir__remote__types_8h_ad67f2feebcdfc52e6342da7cb1c8f997}{RCMM}              \},
        \{ \textcolor{stringliteral}{"SPACE\_ENC"},     \hyperlink{ir__remote__types_8h_a6db726257ddd9e6843e40ea379b6319f}{SPACE\_ENC}    \},
        \{ \textcolor{stringliteral}{"SPACE\_FIRST"},   \hyperlink{ir__remote__types_8h_a595e544f9dbe598b635b48383f57425a}{SPACE\_FIRST}        \},
        \{ \textcolor{stringliteral}{"GOLDSTAR"},      \hyperlink{ir__remote__types_8h_ac3574bc899d70e66c326f73fd8b4b671}{GOLDSTAR}      \},
        \{ \textcolor{stringliteral}{"GRUNDIG"},       \hyperlink{ir__remote__types_8h_a40b8ce019aff9658b6afb245bc26b8eb}{GRUNDIG}        \},
        \{ \textcolor{stringliteral}{"BO"},            \hyperlink{ir__remote__types_8h_a449e8aac922c7f3659cbbf80cf88df10}{BO}          \},
        \{ \textcolor{stringliteral}{"SERIAL"},        \hyperlink{ir__remote__types_8h_aae3f0b4211ba45d265973d40ccbb5fd1}{SERIAL}  \},
        \{ \textcolor{stringliteral}{"XMP"},           \hyperlink{ir__remote__types_8h_a21b087fdf978a6f0da138b3efbdb1cca}{XMP}                \},

        \{ \textcolor{stringliteral}{"REVERSE"},       REVERSE       \},
        \{ \textcolor{stringliteral}{"NO\_HEAD\_REP"},   \hyperlink{ir__remote__types_8h_abf5d6878061b54bd7abcf78ba6336fd0}{NO\_HEAD\_REP}        \},
        \{ \textcolor{stringliteral}{"NO\_FOOT\_REP"},   \hyperlink{ir__remote__types_8h_a94aa4cc9b331962ec02258cc794077cc}{NO\_FOOT\_REP}        \},
        \{ \textcolor{stringliteral}{"CONST\_LENGTH"},  \hyperlink{ir__remote__types_8h_acf323c5598caae45e113bdd9ff1e677a}{CONST\_LENGTH}      \}, 
        \{ \textcolor{stringliteral}{"REPEAT\_HEADER"}, \hyperlink{ir__remote__types_8h_a2c2f13c03a7d50bc96caf3d4c52ee084}{REPEAT\_HEADER} \},
        \{ NULL,            0             \},
\}
\end{DoxyCode}
All flags i config file\+: Their name and mask. 

Definition at line 91 of file config\+\_\+file.\+c.

