\hypertarget{OTF__Filenames_8h}{\section{ompi/contrib/vt/vt/extlib/otf/otflib/\+O\+T\+F\+\_\+\+Filenames.h File Reference}
\label{OTF__Filenames_8h}\index{ompi/contrib/vt/vt/extlib/otf/otflib/\+O\+T\+F\+\_\+\+Filenames.\+h@{ompi/contrib/vt/vt/extlib/otf/otflib/\+O\+T\+F\+\_\+\+Filenames.\+h}}
}


Handles file naming issues.  


{\ttfamily \#include \char`\"{}O\+T\+F\+\_\+inttypes.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}O\+T\+F\+\_\+\+Definitions.\+h\char`\"{}}\\*
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{OTF__Filenames_8h_af026281501df84f109d5ad50476b9866}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+M\+A\+S\+T\+E\+R}~16}\label{OTF__Filenames_8h_af026281501df84f109d5ad50476b9866}

\item 
\hypertarget{OTF__Filenames_8h_a8ad29c0045cbdc140db9b656b2d2907d}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+G\+L\+O\+B\+A\+L\+\_\+\+D\+E\+F}~32}\label{OTF__Filenames_8h_a8ad29c0045cbdc140db9b656b2d2907d}

\item 
\hypertarget{OTF__Filenames_8h_acc2a042a52fdf72d5f31042b8b1ef0e4}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+D\+E\+F}~64}\label{OTF__Filenames_8h_acc2a042a52fdf72d5f31042b8b1ef0e4}

\item 
\hypertarget{OTF__Filenames_8h_a0320940d927dc2de79ca14134087e06c}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+E\+V\+E\+N\+T}~128}\label{OTF__Filenames_8h_a0320940d927dc2de79ca14134087e06c}

\item 
\hypertarget{OTF__Filenames_8h_a9f09ba959aee99dc7ae49aa6d26c2ded}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+S\+N\+A\+P\+S}~256}\label{OTF__Filenames_8h_a9f09ba959aee99dc7ae49aa6d26c2ded}

\item 
\hypertarget{OTF__Filenames_8h_ada957d4d7289c232540fa46e047fc179}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+S\+T\+A\+T\+S}~512}\label{OTF__Filenames_8h_ada957d4d7289c232540fa46e047fc179}

\item 
\hypertarget{OTF__Filenames_8h_a8efcfa16b2391087c83050e5c94de021}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+M\+A\+R\+K\+E\+R}~1024}\label{OTF__Filenames_8h_a8efcfa16b2391087c83050e5c94de021}

\item 
\hypertarget{OTF__Filenames_8h_a1045e42048c13cffe0121332266d6da8}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+B\+I\+T\+S}~(16+32+64+128+256+512+1024)}\label{OTF__Filenames_8h_a1045e42048c13cffe0121332266d6da8}

\item 
\hypertarget{OTF__Filenames_8h_a98c1de0345e968d3af1cc482522ee017}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+C\+O\+M\+P\+R\+E\+S\+S\+I\+O\+N\+\_\+\+U\+N\+C\+O\+M\+P\+R\+E\+S\+S\+E\+D}~0}\label{OTF__Filenames_8h_a98c1de0345e968d3af1cc482522ee017}

\item 
\hypertarget{OTF__Filenames_8h_a2344e9ebe73081b07ce4b3549b0e0f46}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+C\+O\+M\+P\+R\+E\+S\+S\+I\+O\+N\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+E\+D}~4}\label{OTF__Filenames_8h_a2344e9ebe73081b07ce4b3549b0e0f46}

\item 
\hypertarget{OTF__Filenames_8h_a6a8ec7f80574134675337da65f8bc737}{\#define {\bfseries O\+T\+F\+\_\+\+F\+I\+L\+E\+C\+O\+M\+P\+R\+E\+S\+S\+I\+O\+N\+\_\+\+B\+I\+T\+S}~(1+2+4+8)}\label{OTF__Filenames_8h_a6a8ec7f80574134675337da65f8bc737}

\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{OTF__Filenames_8h_a4b2c44b7fb103081c5025caeaca0b9ca}{typedef uint32\+\_\+t {\bfseries O\+T\+F\+\_\+\+File\+Type}}\label{OTF__Filenames_8h_a4b2c44b7fb103081c5025caeaca0b9ca}

\item 
\hypertarget{OTF__Filenames_8h_a3fd5389b2fb38e47d03ce8aa75b2cf51}{typedef uint32\+\_\+t {\bfseries O\+T\+F\+\_\+\+File\+Compression}}\label{OTF__Filenames_8h_a3fd5389b2fb38e47d03ce8aa75b2cf51}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
char $\ast$ \hyperlink{OTF__Filenames_8h_affc2e09af5ece26feb591f1f65e34501}{O\+T\+F\+\_\+get\+Filename} (const char $\ast$namestub, uint32\+\_\+t id, O\+T\+F\+\_\+\+File\+Type type, unsigned int l, char $\ast$ret)
\begin{DoxyCompactList}\small\item\em provide a name stub, a stream id and the type of file. \end{DoxyCompactList}\item 
\hypertarget{OTF__Filenames_8h_a66a810921e9921d10584890f69742e24}{char $\ast$ \hyperlink{OTF__Filenames_8h_a66a810921e9921d10584890f69742e24}{O\+T\+F\+\_\+strip\+Filename} (const char $\ast$filename)}\label{OTF__Filenames_8h_a66a810921e9921d10584890f69742e24}

\begin{DoxyCompactList}\small\item\em strip the a filename from the \char`\"{}.\+otf\char`\"{} suffix if present \end{DoxyCompactList}\item 
int \hyperlink{OTF__Filenames_8h_af457f140f5ae54bd8ca304ad845618a2}{O\+T\+F\+\_\+file\+Exists} (const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em D\+E\+P\+R\+I\+C\+A\+T\+E\+D Check whether a file exists or not. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Handles file naming issues. 



\subsection{Function Documentation}
\hypertarget{OTF__Filenames_8h_af457f140f5ae54bd8ca304ad845618a2}{\index{O\+T\+F\+\_\+\+Filenames.\+h@{O\+T\+F\+\_\+\+Filenames.\+h}!O\+T\+F\+\_\+file\+Exists@{O\+T\+F\+\_\+file\+Exists}}
\index{O\+T\+F\+\_\+file\+Exists@{O\+T\+F\+\_\+file\+Exists}!O\+T\+F\+\_\+\+Filenames.\+h@{O\+T\+F\+\_\+\+Filenames.\+h}}
\subsubsection[{O\+T\+F\+\_\+file\+Exists}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+file\+Exists (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{filename}
\end{DoxyParamCaption}
)}}\label{OTF__Filenames_8h_af457f140f5ae54bd8ca304ad845618a2}


D\+E\+P\+R\+I\+C\+A\+T\+E\+D Check whether a file exists or not. 

Return 1 on success. \hypertarget{OTF__Filenames_8h_affc2e09af5ece26feb591f1f65e34501}{\index{O\+T\+F\+\_\+\+Filenames.\+h@{O\+T\+F\+\_\+\+Filenames.\+h}!O\+T\+F\+\_\+get\+Filename@{O\+T\+F\+\_\+get\+Filename}}
\index{O\+T\+F\+\_\+get\+Filename@{O\+T\+F\+\_\+get\+Filename}!O\+T\+F\+\_\+\+Filenames.\+h@{O\+T\+F\+\_\+\+Filenames.\+h}}
\subsubsection[{O\+T\+F\+\_\+get\+Filename}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ O\+T\+F\+\_\+get\+Filename (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{namestub, }
\item[{uint32\+\_\+t}]{id, }
\item[{O\+T\+F\+\_\+\+File\+Type}]{type, }
\item[{unsigned int}]{l, }
\item[{char $\ast$}]{ret}
\end{DoxyParamCaption}
)}}\label{OTF__Filenames_8h_affc2e09af5ece26feb591f1f65e34501}


provide a name stub, a stream id and the type of file. 

the function will create the proper filename in 'ret'. ret may be pre-\/allocated with length 'l' or N\+U\+L\+L with 'l=0'. in the latter case memory is allocated via malloc internally but has to be freed later on. on success the resulting string is returned, return N\+U\+L\+L indicates an error. 

Referenced by O\+T\+F\+\_\+\+Master\+Control\+\_\+read(), O\+T\+F\+\_\+\+Master\+Control\+\_\+write(), O\+T\+F\+\_\+\+R\+Stream\+\_\+get\+Def\+Buffer(), O\+T\+F\+\_\+\+R\+Stream\+\_\+get\+Event\+Buffer(), O\+T\+F\+\_\+\+R\+Stream\+\_\+get\+Marker\+Buffer(), O\+T\+F\+\_\+\+R\+Stream\+\_\+get\+Snaps\+Buffer(), O\+T\+F\+\_\+\+R\+Stream\+\_\+get\+Stats\+Buffer(), O\+T\+F\+\_\+\+W\+Stream\+\_\+get\+Def\+Buffer(), O\+T\+F\+\_\+\+W\+Stream\+\_\+get\+Event\+Buffer(), O\+T\+F\+\_\+\+W\+Stream\+\_\+get\+Marker\+Buffer(), O\+T\+F\+\_\+\+W\+Stream\+\_\+get\+Snapshot\+Buffer(), and O\+T\+F\+\_\+\+W\+Stream\+\_\+get\+Stats\+Buffer().

