\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(085323c 2016-\/01-\/06 15\+:32\+:54 +0100)@{/home/mk/tmp/lirc/lib/config\+\_\+file.\+c(085323c 2016-\/01-\/06 15\+:32\+:54 +0100)}}


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


{\ttfamily \#include $<$dirent.\+h$>$}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$glob.\+h$>$}\newline
{\ttfamily \#include $<$limits.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$libgen.\+h$>$}\newline
{\ttfamily \#include $<$sys/socket.\+h$>$}\newline
{\ttfamily \#include $<$sys/un.\+h$>$}\newline
{\ttfamily \#include $<$sys/stat.\+h$>$}\newline
{\ttfamily \#include $<$sys/types.\+h$>$}\newline
{\ttfamily \#include $<$fcntl.\+h$>$}\newline
{\ttfamily \#include $<$ctype.\+h$>$}\newline
{\ttfamily \#include \char`\"{}include/media/lirc.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}lirc/lirc\+\_\+log.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}lirc/lirc\+\_\+options.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}lirc/ir\+\_\+remote.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}lirc/config\+\_\+file.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}lirc/transmit.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}lirc/config\+\_\+flags.\+h\char`\"{}}\newline
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{config__file_8c_a45db13d622cb21897aa934e5ad411c83}{}\label{config__file_8c_a45db13d622cb21897aa934e5ad411c83} 
\#define {\bfseries L\+I\+N\+E\+\_\+\+L\+EN}~1024
\item 
\hypertarget{config__file_8c_a5319bb0b2d15e5b98751faa7c92cc1cf}{}\label{config__file_8c_a5319bb0b2d15e5b98751faa7c92cc1cf} 
\#define {\bfseries M\+A\+X\+\_\+\+I\+N\+C\+L\+U\+D\+ES}~10
\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}{}\label{config__file_8c_a0253a0f97450621088027f8584f850d6} 
enum {\bfseries directive} \{ \newline
{\bfseries I\+D\+\_\+none}, 
{\bfseries I\+D\+\_\+remote}, 
{\bfseries I\+D\+\_\+codes}, 
{\bfseries I\+D\+\_\+raw\+\_\+codes}, 
\newline
{\bfseries I\+D\+\_\+raw\+\_\+name}
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{config__file_8c_a7fdd44d7c663a1ca4a64be594c8e02af}{}\label{config__file_8c_a7fdd44d7c663a1ca4a64be594c8e02af} 
void $\ast$$\ast$ {\bfseries init\+\_\+void\+\_\+array} (struct void\+\_\+array $\ast$ar, size\+\_\+t chunk\+\_\+size, size\+\_\+t item\+\_\+size)
\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}{}\label{config__file_8c_a9c06bc8a350ebf6a1b0be1666476f630} 
void $\ast$ {\bfseries s\+\_\+malloc} (size\+\_\+t size)
\item 
\hypertarget{config__file_8c_a0980bf55161204f1f9f19f838ccf06fb}{}\label{config__file_8c_a0980bf55161204f1f9f19f838ccf06fb} 
char $\ast$ {\bfseries s\+\_\+strdup} (char $\ast$string)
\item 
\hypertarget{config__file_8c_a3508eb04c7125d04556a54e37830f946}{}\label{config__file_8c_a3508eb04c7125d04556a54e37830f946} 
\hyperlink{ir__remote__types_8h_af5395595bc25a70e974255b83d97db06}{ir\+\_\+code} {\bfseries s\+\_\+strtocode} (const char $\ast$val)
\item 
\hypertarget{config__file_8c_a6a02e049a252f6898e524a8c6a7c67b3}{}\label{config__file_8c_a6a02e049a252f6898e524a8c6a7c67b3} 
\+\_\+\+\_\+u32 {\bfseries s\+\_\+strtou32} (char $\ast$val)
\item 
\hypertarget{config__file_8c_a354c50e22a8614d0685e3426cda34a77}{}\label{config__file_8c_a354c50e22a8614d0685e3426cda34a77} 
int {\bfseries s\+\_\+strtoi} (char $\ast$val)
\item 
\hypertarget{config__file_8c_a77597b785b3612b2260c0b27ccf78a31}{}\label{config__file_8c_a77597b785b3612b2260c0b27ccf78a31} 
unsigned int {\bfseries s\+\_\+strtoui} (char $\ast$val)
\item 
\hypertarget{config__file_8c_a332db28389bee1c719760e23d610ec17}{}\label{config__file_8c_a332db28389bee1c719760e23d610ec17} 
lirc\+\_\+t {\bfseries s\+\_\+strtolirc\+\_\+t} (char $\ast$val)
\item 
\hypertarget{config__file_8c_a72ab37ce802cdcb7472acf5eb787b302}{}\label{config__file_8c_a72ab37ce802cdcb7472acf5eb787b302} 
int {\bfseries check\+Mode} (int is\+\_\+mode, int c\+\_\+mode, char $\ast$error)
\item 
\hypertarget{config__file_8c_a8a6e38030f6d2dcda7175cab33695a31}{}\label{config__file_8c_a8a6e38030f6d2dcda7175cab33695a31} 
int {\bfseries add\+Signal} (struct void\+\_\+array $\ast$signals, char $\ast$val)
\item 
\hypertarget{config__file_8c_a6d9520cb701e58761515abee60b96565}{}\label{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)
\item 
\hypertarget{config__file_8c_a1780d1d3ea6b387f38f78135bca46e20}{}\label{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)
\item 
\hypertarget{config__file_8c_a57b60f0b46c7e6ccb1a196caaa9a54c3}{}\label{config__file_8c_a57b60f0b46c7e6ccb1a196caaa9a54c3} 
int {\bfseries parse\+Flags} (char $\ast$val)
\item 
\hypertarget{config__file_8c_af7102931eafea24d0bc35f5e9d94c8f5}{}\label{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)
\item 
struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$ \hyperlink{group__private__api_gaae645b840ccf7816a6dd37d53bc4325a}{read\+\_\+config} (F\+I\+LE $\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}{}\label{config__file_8c_a27630b7490fa30a89837c675c9afd899} 
const char $\ast$ {\bfseries whitespace} = \char`\"{} \textbackslash{}t\char`\"{}
\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}{}\label{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{\texorpdfstring{array\+\_\+guest\+\_\+func}{array\_guest\_func}}
{\footnotesize\ttfamily typedef void$\ast$($\ast$ array\+\_\+guest\+\_\+func) (void $\ast$item, void $\ast$arg)}

foreach\+\_\+void\+\_\+array argument. 

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



\subsection{Function Documentation}
\hypertarget{config__file_8c_a80db2da30ea6ad4282ad56bd2c44ef89}{}\label{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{\texorpdfstring{add\+\_\+void\+\_\+array()}{add\_void\_array()}}
{\footnotesize\ttfamily int add\+\_\+void\+\_\+array (\begin{DoxyParamCaption}\item[{struct void\+\_\+array $\ast$}]{ar,  }\item[{void $\ast$}]{dataptr }\end{DoxyParamCaption})}

Add $\ast$dataptr to end of ar, re-\/allocating as necessary. 

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

\hypertarget{config__file_8c_a2023c5782f807cd639641f400fda3191}{}\label{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{\texorpdfstring{get\+\_\+void\+\_\+array()}{get\_void\_array()}}
{\footnotesize\ttfamily void$\ast$ get\+\_\+void\+\_\+array (\begin{DoxyParamCaption}\item[{struct void\+\_\+array $\ast$}]{ar }\end{DoxyParamCaption})}

Return the array dataptr, an array\mbox{[}nr\+\_\+items\mbox{]} of item\+\_\+size elements. 

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



\subsection{Variable Documentation}
\hypertarget{config__file_8c_a9032e29936c127d0314c1946fdcef80a}{}\label{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{\texorpdfstring{all\+\_\+flags}{all\_flags}}
{\footnotesize\ttfamily const struct \hyperlink{structflaglist}{flaglist} all\+\_\+flags\mbox{[}$\,$\mbox{]}}

{\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 98 of file config\+\_\+file.\+c.

