\hypertarget{group__Evil__Stdlib__Group}{}\doxysection{Stdlib.\+h functions.}
\label{group__Evil__Stdlib__Group}\index{Stdlib.h functions.@{Stdlib.h functions.}}


This header provides functions ported from Unix in stdlib.\+h.  


\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Evil__Stdlib__Group_ga766c36c79f161c16b99308ad8e05e455}\label{group__Evil__Stdlib__Group_ga766c36c79f161c16b99308ad8e05e455}} 
\#define {\bfseries HAVE\+\_\+\+REALPATH}~1
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
EVIL\+\_\+\+API int \mbox{\hyperlink{group__Evil__Stdlib__Group_ga2792afef49ad564ba4c80778cc7b3079}{setenv}} (const char $\ast$name, const char $\ast$value, int overwrite)
\begin{DoxyCompactList}\small\item\em Create, modify, or remove environment variables. \end{DoxyCompactList}\item 
EVIL\+\_\+\+API int \mbox{\hyperlink{group__Evil__Stdlib__Group_ga4e5eaaa7b8574607c237534276f15edd}{unsetenv}} (const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Remove environment variables. \end{DoxyCompactList}\item 
EVIL\+\_\+\+API char $\ast$ \mbox{\hyperlink{group__Evil__Stdlib__Group_gac8926887ae0c84e25445bfed43f3c6cb}{realpath}} (const char $\ast$file\+\_\+name, char $\ast$resolved\+\_\+name)
\begin{DoxyCompactList}\small\item\em Return an absolute or full path name for a specified relative path name. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This header provides functions ported from Unix in stdlib.\+h. 



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Evil__Stdlib__Group_ga2792afef49ad564ba4c80778cc7b3079}\label{group__Evil__Stdlib__Group_ga2792afef49ad564ba4c80778cc7b3079}} 
\index{Stdlib.h functions.@{Stdlib.h functions.}!setenv@{setenv}}
\index{setenv@{setenv}!Stdlib.h functions.@{Stdlib.h functions.}}
\doxysubsubsection{\texorpdfstring{setenv()}{setenv()}}
{\footnotesize\ttfamily EVIL\+\_\+\+API int setenv (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name,  }\item[{const char $\ast$}]{value,  }\item[{int}]{overwrite }\end{DoxyParamCaption})}



Create, modify, or remove environment variables. 


\begin{DoxyParams}{Parameters}
{\em name} & The name of the environment variable. \\
\hline
{\em value} & The value of the environment variable to set. \\
\hline
{\em overwrite} & 0 to let the environment variable unchanged, 1 otherwise. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 otherwise.
\end{DoxyReturn}
Add the new environment variable {\ttfamily name} or modify its value if it exists, and set it to {\ttfamily value}. Environment variables define the environment in which a process executes. If {\ttfamily value} is {\ttfamily NULL}, the variable is removed (unset) and that call is equivalent to \mbox{\hyperlink{group__Evil__Stdlib__Group_ga4e5eaaa7b8574607c237534276f15edd}{unsetenv()}}.If the environment variable named by {\ttfamily name} already exists and the value of {\ttfamily overwrite} is 0, the function shall return success and the environment shall remain unchanged. If the function succeeds, it returns 0, otherwise it returns -\/1.

Conformity\+: Non applicable.

Supported OS\+: Windows XP. 

Referenced by \mbox{\hyperlink{group__Ecore__Drm__Tty__Group_ga73153bb0b7118993ceddaf8e19d0fbc1}{ecore\+\_\+drm\+\_\+tty\+\_\+open()}}, \mbox{\hyperlink{group__Ecore__Wl2__Display__Group_gae2609ecf3c650e35f713943e718b921f}{ecore\+\_\+wl2\+\_\+display\+\_\+create()}}, and \mbox{\hyperlink{group__Evil__Stdlib__Group_ga4e5eaaa7b8574607c237534276f15edd}{unsetenv()}}.

\mbox{\Hypertarget{group__Evil__Stdlib__Group_ga4e5eaaa7b8574607c237534276f15edd}\label{group__Evil__Stdlib__Group_ga4e5eaaa7b8574607c237534276f15edd}} 
\index{Stdlib.h functions.@{Stdlib.h functions.}!unsetenv@{unsetenv}}
\index{unsetenv@{unsetenv}!Stdlib.h functions.@{Stdlib.h functions.}}
\doxysubsubsection{\texorpdfstring{unsetenv()}{unsetenv()}}
{\footnotesize\ttfamily EVIL\+\_\+\+API int unsetenv (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Remove environment variables. 


\begin{DoxyParams}{Parameters}
{\em name} & The name of the environment variable. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 otherwise.
\end{DoxyReturn}
Remove the new environment variable {\ttfamily name} if it exists. That function is equivalent to \mbox{\hyperlink{group__Evil__Stdlib__Group_ga2792afef49ad564ba4c80778cc7b3079}{setenv()}} with its second parameter to {\ttfamily NULL} and the third to 1. If the function succeeds, it returns 0, otherwise it returns -\/1.

Conformity\+: Non applicable.

Supported OS\+: Windows XP. 

References \mbox{\hyperlink{group__Evil__Stdlib__Group_ga2792afef49ad564ba4c80778cc7b3079}{setenv()}}.



Referenced by \mbox{\hyperlink{group__Ecore__Drm__Tty__Group_gab0d1199e4346591a7236d5fecd3c3558}{ecore\+\_\+drm\+\_\+tty\+\_\+close()}}, \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaadff0a56ba8818d8a35f9dc95e25a808}{ecore\+\_\+fork\+\_\+reset()}}, and \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}}.

\mbox{\Hypertarget{group__Evil__Stdlib__Group_gac8926887ae0c84e25445bfed43f3c6cb}\label{group__Evil__Stdlib__Group_gac8926887ae0c84e25445bfed43f3c6cb}} 
\index{Stdlib.h functions.@{Stdlib.h functions.}!realpath@{realpath}}
\index{realpath@{realpath}!Stdlib.h functions.@{Stdlib.h functions.}}
\doxysubsubsection{\texorpdfstring{realpath()}{realpath()}}
{\footnotesize\ttfamily EVIL\+\_\+\+API char $\ast$ realpath (\begin{DoxyParamCaption}\item[{const char $\ast$}]{file\+\_\+name,  }\item[{char $\ast$}]{resolved\+\_\+name }\end{DoxyParamCaption})}



Return an absolute or full path name for a specified relative path name. 


\begin{DoxyParams}{Parameters}
{\em file\+\_\+name} & The absolute path name. \\
\hline
{\em resolved\+\_\+name} & The relative path name. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily NULL} on failure, a pointer to the absolute path name otherwise.
\end{DoxyReturn}
The function expands the relative path name {\ttfamily file\+\_\+name} to its fully qualified or absolute path and store it in the buffer pointed by {\ttfamily resolved\+\_\+name}. The buffer is at most {\ttfamily PATH\+\_\+\+MAX} bytes long. If {\ttfamily resolved\+\_\+name} is {\ttfamily NULL}, malloc() is used to allocate a buffer of sufficient length to hold the path name. In that case, it is the responsibility of the caller to free this buffer with free().

That function can be used to obtain the absolute path name for relative paths (rel\+Path) that include \char`\"{}./\char`\"{} or \char`\"{}../\char`\"{} in their names.

On Windows XP, errno is set in the following cases\+:

\begin{DoxyItemize}
\item EACCESS\+: if {\ttfamily file\+\_\+name} can not be accessed. \item EINVAL\+: if {\ttfamily file\+\_\+name} is {\ttfamily NULL}. \item ENAMETOOLONG\+: if the path name is too long. \item ENOENT\+: {\ttfamily file\+\_\+name} does not exist \item ENOMEM\+: if memory allocation fails.\end{DoxyItemize}
Conformity\+: None.

Supported OS\+: Windows XP. 

Referenced by \mbox{\hyperlink{group__Ecore__File__Group_ga93de3e691ec32bb8220545f9d807e3e5}{ecore\+\_\+file\+\_\+cp()}}, \mbox{\hyperlink{group__Ecore__File__Group_ga062018ae501d68814d586483391b9daa}{ecore\+\_\+file\+\_\+realpath()}}, and \mbox{\hyperlink{group__Eina__Prefix__Group_ga92b8591293b0be7c1621e082229e3963}{eina\+\_\+prefix\+\_\+new()}}.

