OpenMPI 0.1.1

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

- File List
- Globals

OTF_Filenames.h
Go to the documentation of this file.
1 /*
2 This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2012.
3 Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch
4 */
5
6 /**
7 * @file OTF_Filenames.h
8 *
9 * @brief Handles file naming issues.
10 *
11 * \ingroup internal
12 */
13
14
15 #ifndef OTF_FILENAMES
16 #define OTF_FILENAMES
17
18
19 #include "OTF_inttypes.h"
20 #include "OTF_Definitions.h"
21
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26
27 /*#define OTF_FILETYPE_MASTER 0
28 #define OTF_FILETYPE_GLOBAL_DEF 1
29 #define OTF_FILETYPE_DEF 2
30 #define OTF_FILETYPE_EVENT 3
31 #define OTF_FILETYPE_SNAPS 4
32 #define OTF_FILETYPE_STATS 5*/
33 #define OTF_FILETYPE_MASTER 16
34 #define OTF_FILETYPE_GLOBAL_DEF 32
35 #define OTF_FILETYPE_DEF 64
36 #define OTF_FILETYPE_EVENT 128
37 #define OTF_FILETYPE_SNAPS 256
38 #define OTF_FILETYPE_STATS 512
39 #define OTF_FILETYPE_MARKER 1024
40 #define OTF_FILETYPE_BITS (16+32+64+128+256+512+1024)
41 typedef uint32_t OTF_FileType;
42
43 /* zlevel has to be 0-9 */
44 #define OTF_FILECOMPRESSION_UNCOMPRESSED 0
45 /* default compression level */
46 #define OTF_FILECOMPRESSION_COMPRESSED 4
47 #define OTF_FILECOMPRESSION_BITS (1+2+4+8)
48 typedef uint32_t OTF_FileCompression;
49
50
51 /** provide a name stub, a stream id and the type of file.
52 the function will create the proper filename in 'ret'. ret may be
53 pre-allocated with length 'l' or NULL with 'l=0'. in the latter case
54 memory is allocated via malloc internally but has to be freed later on.
55 on success the resulting string is returned, return NULL indicates an error. */
56 char* OTF_getFilename( const char* namestub, uint32_t id, OTF_FileType type,
57 unsigned int l, char* ret );
58
59
60 /** strip the a filename from the ".otf" suffix if present */
61 char* OTF_stripFilename( const char* filename );
62
63
64 /** DEPRICATED Check whether a file exists or not. Return 1 on success. */
65 int OTF_fileExists( const char* filename );
66
67 #ifdef __cplusplus
68 }
69 #endif /* __cplusplus */
70
71 #endif /* OTF_FILENAMES */
OTF_getFilename
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.
Definition: OTF_Filenames.c:46
OTF_fileExists
int OTF_fileExists(const char *filename)
DEPRICATED Check whether a file exists or not.
Definition: OTF_Filenames.c:147
OTF_stripFilename
char * OTF_stripFilename(const char *filename)
strip the a filename from the ".otf" suffix if present
Definition: OTF_Filenames.c:112
OTF_Definitions.h
Provides many many macros for different purposes.
OTF_inttypes.h
Deals with all data type related issues.