\hypertarget{group__instlib}{
\section{instlib: Installation program generation}
\label{group__instlib}\index{instlib: Installation program generation@{instlib: Installation program generation}}
}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{group__instlib_g35385692dd2b6117364b408be6e1a9ac}{opendir} (const char $\ast$dir)
\item 
int \hyperlink{group__instlib_g3fc82592e1d0a5ddc7bdca095ad0b7e2}{opensubdir} (int dir, const char $\ast$subdir)
\item 
int \hyperlink{group__instlib_g499d97e4291fd8e79e5164dafb2770cc}{d} (int dir, const char $\ast$subdir, unsigned uid, unsigned gid, unsigned mode)
\item 
void \hyperlink{group__instlib_g107f416f0e46995c55caf97d05ee7d4a}{cf} (int dir, const char $\ast$file, unsigned uid, unsigned gid, unsigned mode, const char $\ast$srcfile)
\item 
void \hyperlink{group__instlib_g13082ea1fd1c182bb722b84a62f7dfbe}{c} (int dir, const char $\ast$file, unsigned uid, unsigned gid, unsigned mode)
\item 
void \hyperlink{group__instlib_g346f8f89a44bdef281c2bf180d9fee4f}{s} (int dir, const char $\ast$file, const char $\ast$target)
\item 
void \hyperlink{group__instlib_g8c75d0affb18233f98f81133c0a70e04}{insthier} (void)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
const char $\ast$ \hyperlink{group__instlib_g0bda4e008d03f06c67ad84106059106f}{install\_\-prefix}
\end{CompactItemize}


\subsection{Detailed Description}
The installer libraries provide for building a program to install files, to verify (check) an installation, and to show what would be installed, from a single source. This single source is typically called {\tt \hyperlink{group__instlib_g13082ea1fd1c182bb722b84a62f7dfbe}{insthier.c}} and contains a single routine also named {\tt insthier} (so-named as it provides the installation hierarchy). The libraries provide the {\tt main} function that calls {\tt insthier} as well as all the necessary support functions.

Where given, {\tt uid} and {\tt gid} may be set to {\tt -1} if there is no need to force the installed UID and GID to a particular value. The {\tt dir} argument is a directory number previously opened by {\tt opendir}. 

\subsection{Function Documentation}
\hypertarget{group__instlib_g13082ea1fd1c182bb722b84a62f7dfbe}{
\index{instlib@{instlib}!c@{c}}
\index{c@{c}!instlib@{instlib}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void c (int {\em dir}, const char $\ast$ {\em file}, unsigned {\em uid}, unsigned {\em gid}, unsigned {\em mode})}}
\label{group__instlib_g13082ea1fd1c182bb722b84a62f7dfbe}


Copy a file from the source directory, retaining its name. \hypertarget{group__instlib_g107f416f0e46995c55caf97d05ee7d4a}{
\index{instlib@{instlib}!cf@{cf}}
\index{cf@{cf}!instlib@{instlib}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void cf (int {\em dir}, const char $\ast$ {\em file}, unsigned {\em uid}, unsigned {\em gid}, unsigned {\em mode}, const char $\ast$ {\em srcfile})}}
\label{group__instlib_g107f416f0e46995c55caf97d05ee7d4a}


Copy a file from the source directory to a different name. \hypertarget{group__instlib_g499d97e4291fd8e79e5164dafb2770cc}{
\index{instlib@{instlib}!d@{d}}
\index{d@{d}!instlib@{instlib}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int d (int {\em dir}, const char $\ast$ {\em subdir}, unsigned {\em uid}, unsigned {\em gid}, unsigned {\em mode})}}
\label{group__instlib_g499d97e4291fd8e79e5164dafb2770cc}


Create a subdirectory. \hypertarget{group__instlib_g8c75d0affb18233f98f81133c0a70e04}{
\index{instlib@{instlib}!insthier@{insthier}}
\index{insthier@{insthier}!instlib@{instlib}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void insthier (void)}}
\label{group__instlib_g8c75d0affb18233f98f81133c0a70e04}


The single function that the {\tt \hyperlink{group__instlib_g13082ea1fd1c182bb722b84a62f7dfbe}{insthier.c}} source needs to define. \hypertarget{group__instlib_g35385692dd2b6117364b408be6e1a9ac}{
\index{instlib@{instlib}!opendir@{opendir}}
\index{opendir@{opendir}!instlib@{instlib}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int opendir (const char $\ast$ {\em dir})}}
\label{group__instlib_g35385692dd2b6117364b408be6e1a9ac}


Open a directory and provide a file handle reference for future operations. \hypertarget{group__instlib_g3fc82592e1d0a5ddc7bdca095ad0b7e2}{
\index{instlib@{instlib}!opensubdir@{opensubdir}}
\index{opensubdir@{opensubdir}!instlib@{instlib}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int opensubdir (int {\em dir}, const char $\ast$ {\em subdir})}}
\label{group__instlib_g3fc82592e1d0a5ddc7bdca095ad0b7e2}


Open a subdirectory of a directory already opened by {\tt opendir}. \hypertarget{group__instlib_g346f8f89a44bdef281c2bf180d9fee4f}{
\index{instlib@{instlib}!s@{s}}
\index{s@{s}!instlib@{instlib}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void s (int {\em dir}, const char $\ast$ {\em file}, const char $\ast$ {\em target})}}
\label{group__instlib_g346f8f89a44bdef281c2bf180d9fee4f}


Create a symbolic link. 

\subsection{Variable Documentation}
\hypertarget{group__instlib_g0bda4e008d03f06c67ad84106059106f}{
\index{instlib@{instlib}!install\_\-prefix@{install\_\-prefix}}
\index{install\_\-prefix@{install\_\-prefix}!instlib@{instlib}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ {\bf install\_\-prefix}}}
\label{group__instlib_g0bda4e008d03f06c67ad84106059106f}


The directory prefix under which all files are placed. 