\hypertarget{group__Evil}{}\section{Evil}
\label{group__Evil}\index{Evil@{Evil}}


Microsoft Windows portability layer.  


\subsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Evil__Dlfcn}{Functions that manage dynamic-\/link libraries.}}
\begin{DoxyCompactList}\small\item\em x $\ast$ This header provides functions to load and unload dynamic-\/link libaries, to get the address of a symbol, and to get diagnostic information. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Evil__Locale__Group}{locale.\+h functions.}}
\begin{DoxyCompactList}\small\item\em This header provides functions ported from Unix in locale.\+h. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Evil__Main__Group}{Main}}
\begin{DoxyCompactList}\small\item\em This header provides functions to initialize and shut down the Evil library. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Evil__Stdio__Group}{Stdio.\+h functions}}
\begin{DoxyCompactList}\small\item\em This header provides functions ported from Unix in stdio.\+h. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Evil__Stdlib__Group}{Stdlib.\+h functions.}}
\begin{DoxyCompactList}\small\item\em This header provides functions ported from Unix in stdlib.\+h. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Evil__String__Group}{String.\+h functions.}}
\begin{DoxyCompactList}\small\item\em This header provides functions ported from Unix in string.\+h. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Evil__Time__Group}{Time.\+h functions}}
\begin{DoxyCompactList}\small\item\em This header provides functions ported from Unix in time.\+h. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Evil__Unistd__Group}{Unistd.\+h functions}}
\begin{DoxyCompactList}\small\item\em This header provides functions ported from Unix in unistd.\+h. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Evil__Pwd__Group}{Pwd.\+h functions}}
\begin{DoxyCompactList}\small\item\em This header provides functions ported from Unix in \mbox{\hyperlink{pwd_8h}{pwd.\+h}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Evil__Mman}{Functions that manage memory mappping.}}
\begin{DoxyCompactList}\small\item\em This header provides the meomry map functions mmap and munmap. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{group__Evil_gad39ebe4c4767eaa9a680777400cfaafe}{fcntl}} (int fd, int cmd,...)
\begin{DoxyCompactList}\small\item\em Provide control over file descriptors. \end{DoxyCompactList}\item 
wchar\+\_\+t $\ast$ \mbox{\hyperlink{group__Evil_gaad3cf8a118e6dc32c90430f6a35bed12}{evil\+\_\+char\+\_\+to\+\_\+wchar}} (const char $\ast$text)
\begin{DoxyCompactList}\small\item\em Convert a string from char $\ast$ to wchar\+\_\+t $\ast$. \end{DoxyCompactList}\item 
char $\ast$ \mbox{\hyperlink{group__Evil_ga3bd76e737e3916c9396daaa11fd77759}{evil\+\_\+wchar\+\_\+to\+\_\+char}} (const wchar\+\_\+t $\ast$text)
\begin{DoxyCompactList}\small\item\em Convert a string from wchar\+\_\+t $\ast$ to char $\ast$. \end{DoxyCompactList}\item 
char $\ast$ \mbox{\hyperlink{group__Evil_ga2d1e829ef2c0a606f07648726e2832de}{evil\+\_\+utf16\+\_\+to\+\_\+utf8}} (const wchar\+\_\+t $\ast$text)
\begin{DoxyCompactList}\small\item\em Convert a string from U\+T\+F-\/16 to U\+T\+F-\/8. \end{DoxyCompactList}\item 
const char $\ast$ \mbox{\hyperlink{group__Evil_ga2b8673322def451eefb11d235d5b9cfb}{evil\+\_\+tmpdir\+\_\+get}} (void)
\begin{DoxyCompactList}\small\item\em Return a dir to store temporary files. \end{DoxyCompactList}\item 
const char $\ast$ \mbox{\hyperlink{group__Evil_gad888002c51fab074cf46cfe227f0b522}{evil\+\_\+homedir\+\_\+get}} (void)
\begin{DoxyCompactList}\small\item\em Return a dir to store personal files. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Evil_ga7c4333c262a1b4fe815a8044c68b0618}{evil\+\_\+path\+\_\+is\+\_\+absolute}} (const char $\ast$path)
\begin{DoxyCompactList}\small\item\em check if the given path is absolute. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Microsoft Windows portability layer. 



\subsection{Function Documentation}
\mbox{\Hypertarget{group__Evil_gad39ebe4c4767eaa9a680777400cfaafe}\label{group__Evil_gad39ebe4c4767eaa9a680777400cfaafe}} 
\index{Evil@{Evil}!fcntl@{fcntl}}
\index{fcntl@{fcntl}!Evil@{Evil}}
\subsubsection{\texorpdfstring{fcntl()}{fcntl()}}
{\footnotesize\ttfamily int fcntl (\begin{DoxyParamCaption}\item[{int}]{fd,  }\item[{int}]{cmd,  }\item[{}]{... }\end{DoxyParamCaption})}



Provide control over file descriptors. 


\begin{DoxyParams}{Parameters}
{\em fd} & The file descriptor. \\
\hline
{\em cmd} & The type of control. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 otherwise.
\end{DoxyReturn}
Performs one of various miscellaneous operations on {\ttfamily fd}. The operation in question is determined by {\ttfamily cmd\+:} 


\begin{DoxyItemize}
\item F\+\_\+\+S\+E\+T\+FD\+: Set the close-\/on-\/exec flag to the value specified by the argument after command (only the least significant bit is used).
\item F\+\_\+\+S\+E\+T\+LK and F\+\_\+\+S\+E\+T\+L\+KW\+: used to manage discretionary file locks. The third argument must be a pointer to a struct flock (that may be overwritten by this call).
\end{DoxyItemize}

This function returns 0 on success, -\/1 otherwise.

Conformity\+: None.

Supported OS\+: Windows Vista, Windows XP or Windows 2000 Professional. 

References flock\+::l\+\_\+len, flock\+::l\+\_\+start, flock\+::l\+\_\+type, and flock\+::l\+\_\+whence.



Referenced by ecore\+\_\+pipe\+\_\+full\+\_\+add(), eina\+\_\+debug\+\_\+local\+\_\+connect(), eina\+\_\+debug\+\_\+remote\+\_\+connect(), and eina\+\_\+file\+\_\+close\+\_\+on\+\_\+exec().

\mbox{\Hypertarget{group__Evil_gaad3cf8a118e6dc32c90430f6a35bed12}\label{group__Evil_gaad3cf8a118e6dc32c90430f6a35bed12}} 
\index{Evil@{Evil}!evil\_char\_to\_wchar@{evil\_char\_to\_wchar}}
\index{evil\_char\_to\_wchar@{evil\_char\_to\_wchar}!Evil@{Evil}}
\subsubsection{\texorpdfstring{evil\_char\_to\_wchar()}{evil\_char\_to\_wchar()}}
{\footnotesize\ttfamily wchar\+\_\+t$\ast$ evil\+\_\+char\+\_\+to\+\_\+wchar (\begin{DoxyParamCaption}\item[{const char $\ast$}]{text }\end{DoxyParamCaption})}



Convert a string from char $\ast$ to wchar\+\_\+t $\ast$. 


\begin{DoxyParams}{Parameters}
{\em text} & The string to convert. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The converted string.
\end{DoxyReturn}
Convert a string from char $\ast$ to wchar\+\_\+t $\ast$ and return it. If the allocation or conversion fails, N\+U\+LL is returned. On success, the returned value must be freed when it is not used anymore.

Conformity\+: Non applicable.

Supported OS\+: Windows 95, Windows 98, Windows Me, Windows NT, Windows 2000, Windows XP. 

Referenced by dlopen(), and dlsym().

\mbox{\Hypertarget{group__Evil_ga3bd76e737e3916c9396daaa11fd77759}\label{group__Evil_ga3bd76e737e3916c9396daaa11fd77759}} 
\index{Evil@{Evil}!evil\_wchar\_to\_char@{evil\_wchar\_to\_char}}
\index{evil\_wchar\_to\_char@{evil\_wchar\_to\_char}!Evil@{Evil}}
\subsubsection{\texorpdfstring{evil\_wchar\_to\_char()}{evil\_wchar\_to\_char()}}
{\footnotesize\ttfamily char$\ast$ evil\+\_\+wchar\+\_\+to\+\_\+char (\begin{DoxyParamCaption}\item[{const wchar\+\_\+t $\ast$}]{text }\end{DoxyParamCaption})}



Convert a string from wchar\+\_\+t $\ast$ to char $\ast$. 


\begin{DoxyParams}{Parameters}
{\em text} & The string to convert. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The converted string.
\end{DoxyReturn}
Convert a string from wchar\+\_\+t $\ast$ to char $\ast$ and return it. If the allocation or conversion fails, N\+U\+LL is returned. On success, the returned value must be freed when it is not used anymore.

Conformity\+: Non applicable.

Supported OS\+: Windows 95, Windows 98, Windows Me, Windows NT, Windows 2000, Windows XP. 

Referenced by getpwnam().

\mbox{\Hypertarget{group__Evil_ga2d1e829ef2c0a606f07648726e2832de}\label{group__Evil_ga2d1e829ef2c0a606f07648726e2832de}} 
\index{Evil@{Evil}!evil\_utf16\_to\_utf8@{evil\_utf16\_to\_utf8}}
\index{evil\_utf16\_to\_utf8@{evil\_utf16\_to\_utf8}!Evil@{Evil}}
\subsubsection{\texorpdfstring{evil\_utf16\_to\_utf8()}{evil\_utf16\_to\_utf8()}}
{\footnotesize\ttfamily char$\ast$ evil\+\_\+utf16\+\_\+to\+\_\+utf8 (\begin{DoxyParamCaption}\item[{const wchar\+\_\+t $\ast$}]{text }\end{DoxyParamCaption})}



Convert a string from U\+T\+F-\/16 to U\+T\+F-\/8. 


\begin{DoxyParams}{Parameters}
{\em text} & The string to convert in U\+T\+F-\/16. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The converted string in U\+T\+F-\/8.
\end{DoxyReturn}
Convert a string from U\+T\+F-\/16 to U\+T\+F-\/8 and return it. If the allocation or conversion fails, N\+U\+LL is returned. On success, the returned value must be freed when it is not used anymore.

Conformity\+: Non applicable.

Supported OS\+: Windows 95, Windows 98, Windows Me, Windows NT, Windows 2000, Windows XP. \mbox{\Hypertarget{group__Evil_ga2b8673322def451eefb11d235d5b9cfb}\label{group__Evil_ga2b8673322def451eefb11d235d5b9cfb}} 
\index{Evil@{Evil}!evil\_tmpdir\_get@{evil\_tmpdir\_get}}
\index{evil\_tmpdir\_get@{evil\_tmpdir\_get}!Evil@{Evil}}
\subsubsection{\texorpdfstring{evil\_tmpdir\_get()}{evil\_tmpdir\_get()}}
{\footnotesize\ttfamily const char$\ast$ evil\+\_\+tmpdir\+\_\+get (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Return a dir to store temporary files. 

\begin{DoxyReturn}{Returns}
The directory to store temporary files.
\end{DoxyReturn}
Return a directory to store temporary files. The function gets the value of the following environment variables, and in that order\+:
\begin{DoxyItemize}
\item T\+MP
\item T\+E\+MP
\item U\+S\+E\+R\+P\+R\+O\+F\+I\+LE
\item W\+I\+N\+D\+IR and returns its value if it exists. If none exists, the function returns \char`\"{}\+C\+:\textbackslash{}\char`\"{}.
\end{DoxyItemize}

Conformity\+: Non applicable.

Supported OS\+: Windows 95, Windows 98, Windows Me, Windows NT, Windows 2000, Windows XP.

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000583}{Deprecated}}]This function is deprecated and returns {\ttfamily N\+U\+LL}. Use \mbox{\hyperlink{group__Eina__Tools__Group_ga6f462dce106714a3ba29f63deea61be2}{eina\+\_\+environment\+\_\+tmp\+\_\+get()}} instead.\end{DoxyRefDesc}
\mbox{\Hypertarget{group__Evil_gad888002c51fab074cf46cfe227f0b522}\label{group__Evil_gad888002c51fab074cf46cfe227f0b522}} 
\index{Evil@{Evil}!evil\_homedir\_get@{evil\_homedir\_get}}
\index{evil\_homedir\_get@{evil\_homedir\_get}!Evil@{Evil}}
\subsubsection{\texorpdfstring{evil\_homedir\_get()}{evil\_homedir\_get()}}
{\footnotesize\ttfamily const char$\ast$ evil\+\_\+homedir\+\_\+get (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Return a dir to store personal files. 

\begin{DoxyReturn}{Returns}
The directory to store personal files.
\end{DoxyReturn}
Return a directory to store personal files. The function gets the value of the following environment variables, and in that order\+:
\begin{DoxyItemize}
\item H\+O\+ME
\item U\+S\+E\+R\+P\+R\+O\+F\+I\+LE
\item W\+I\+N\+D\+IR and returns its value if it exists. If none exists, the function returns \char`\"{}\+C\+:\textbackslash{}\char`\"{}.
\end{DoxyItemize}

Conformity\+: Non applicable.

Supported OS\+: Windows 95, Windows 98, Windows Me, Windows NT, Windows 2000, Windows XP.

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000584}{Deprecated}}]This function is deprecated and returns {\ttfamily N\+U\+LL}. Use \mbox{\hyperlink{group__Eina__Tools__Group_gaaa4c9c9269f1cc1508ca0a785dec8c1c}{eina\+\_\+environment\+\_\+home\+\_\+get()}} instead.\end{DoxyRefDesc}
\mbox{\Hypertarget{group__Evil_ga7c4333c262a1b4fe815a8044c68b0618}\label{group__Evil_ga7c4333c262a1b4fe815a8044c68b0618}} 
\index{Evil@{Evil}!evil\_path\_is\_absolute@{evil\_path\_is\_absolute}}
\index{evil\_path\_is\_absolute@{evil\_path\_is\_absolute}!Evil@{Evil}}
\subsubsection{\texorpdfstring{evil\_path\_is\_absolute()}{evil\_path\_is\_absolute()}}
{\footnotesize\ttfamily int evil\+\_\+path\+\_\+is\+\_\+absolute (\begin{DoxyParamCaption}\item[{const char $\ast$}]{path }\end{DoxyParamCaption})}



check if the given path is absolute. 


\begin{DoxyParams}{Parameters}
{\em path} & The path to check. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 if the given path is absolute, 0 otherwise.
\end{DoxyReturn}
Check if the path {\ttfamily path} is absolute or not. An absolute path must begin with a letter (upper or lower case), followed by by the char \textquotesingle{}\+:\textquotesingle{}, followed by the char \textquotesingle{}/\textquotesingle{} or \textquotesingle{}\textbackslash{}\textquotesingle{}. If {\ttfamily path} is absolute this function returns 1, otherwise it returns 0. If {\ttfamily path} is {\ttfamily N\+U\+LL}, it returns 0.

Conformity\+: Non applicable.

Supported OS\+: Windows 95, Windows 98, Windows Me, Windows NT, Windows 2000, Windows XP.

\begin{DoxySince}{Since}
1.\+7 
\end{DoxySince}


Referenced by eina\+\_\+file\+\_\+path\+\_\+relative().

