OpenMPI 0.1.1

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

- File List
- Globals

util.h
1 /**
2 * VampirTrace
3 * http://www.tu-dresden.de/zih/vampirtrace
4 *
5 * Copyright (c) 2004-2005, The Trustees of Indiana University and Indiana
6 * University Research and Technology
7 *
8 * Copyright (c) 2004-2006, The University of Tennessee and The University
9 * of Tennessee Research Foundation
10 *
11 * Copyright (c) 2004-2005, High Performance Computing Center Stuttgart,
12 * University of Stuttgart
13 *
14 * Copyright (c) 2004-2005, The Regents of the University of California
15 *
16 * Copyright (c) 2007, Cisco Systems, Inc.
17 *
18 * Copyright (c) 2005-2012, ZIH, TU Dresden, Federal Republic of Germany
19 *
20 * Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
21 * Centre, Federal Republic of Germany
22 *
23 * See the file COPYING in the package base directory for details
24 **/
25
26 #ifndef _UTIL_H
27 #define _UTIL_H
28
29 #ifdef __cplusplus
30 # define EXTERN extern "C"
31 #else
32 # define EXTERN extern
33 #endif
34
35 #include <stdarg.h>
36 #include <stdlib.h>
37
38 #define vt_assert(expr) if(!(expr)) vt_assert_fail(__FILE__, __LINE__, #expr);
39
40 EXTERN void vt_assert_fail(const char* file, int line, const char* expr);
41 EXTERN int vt_asprintf(char** ptr, const char* fmt, ...);
42 EXTERN int vt_snprintf(char* str, size_t size, const char* fmt, ...);
43 EXTERN int vt_vasprintf(char** ptr, const char* fmt, va_list ap);
44 EXTERN int vt_vsnprintf(char* str, size_t size, const char* fmt, va_list ap);
45 EXTERN char* vt_strdup(const char* s);
46 EXTERN char* vt_strtrim(char* s);
47 EXTERN void* vt_memmove(void* dest, const void* src, size_t n);
48
49 #endif /* _UTIL_H */