OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Typedefs | Functions
OTF_Filenames.h File Reference
Internal Interfaces

Handles file naming issues. More...

`#include "OTF_inttypes.h"`
`#include "OTF_Definitions.h"`

Go to the source code of this file.

## Macros
#define | OTF_FILETYPE_MASTER 16
#define | OTF_FILETYPE_GLOBAL_DEF 32
#define | OTF_FILETYPE_DEF 64
#define | OTF_FILETYPE_EVENT 128
#define | OTF_FILETYPE_SNAPS 256
#define | OTF_FILETYPE_STATS 512
#define | OTF_FILETYPE_MARKER 1024
#define | OTF_FILETYPE_BITS (16+32+64+128+256+512+1024)
#define | OTF_FILECOMPRESSION_UNCOMPRESSED 0
#define | OTF_FILECOMPRESSION_COMPRESSED 4
#define | OTF_FILECOMPRESSION_BITS (1+2+4+8)

## Typedefs
typedef uint32_t | OTF_FileType
typedef uint32_t | OTF_FileCompression

## Functions
char * | OTF_getFilename (const char *namestub, uint32_t id, OTF_FileType type, unsigned int l, char *ret)
| provide a name stub, a stream id and the type of file. More...
char * | OTF_stripFilename (const char *filename)
| strip the a filename from the ".otf" suffix if present
int | OTF_fileExists (const char *filename)
| DEPRICATED Check whether a file exists or not. More...

## Detailed Description

Handles file naming issues.

## Function Documentation

int OTF_fileExists | ( | const char * | filename | ) |

DEPRICATED Check whether a file exists or not.

Return 1 on success.

char* OTF_getFilename | ( | const char * | namestub,
|  | uint32_t | id,
|  | OTF_FileType | type,
|  | unsigned int | l,
|  | char * | ret
| ) |  |

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 NULL 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 NULL indicates an error.

Referenced by OTF_MasterControl_read(), OTF_MasterControl_write(), OTF_RStream_getDefBuffer(), OTF_RStream_getEventBuffer(), OTF_RStream_getMarkerBuffer(), OTF_RStream_getSnapsBuffer(), OTF_RStream_getStatsBuffer(), OTF_WStream_getDefBuffer(), OTF_WStream_getEventBuffer(), OTF_WStream_getMarkerBuffer(), OTF_WStream_getSnapshotBuffer(), and OTF_WStream_getStatsBuffer().