OpenMPI 0.1.1

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

- File List
- Globals

keyval_parse.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * $COPYRIGHT$
13 *
14 * Additional copyrights may follow
15 *
16 * $HEADER$
17 */
18
19 /** @file */
20
21 #ifndef OPAL_UTIL_KEYVAL_PARSE_H
22 #define OPAL_UTIL_KEYVAL_PARSE_H
23
24 #include "opal_config.h"
25
26 BEGIN_C_DECLS
27
28 /**
29 * Callback triggered for each key = value pair
30 *
31 * Callback triggered from opal_util_keyval_parse for each key = value
32 * pair. Both key and value will be pointers into static buffers.
33 * The buffers must not be free()ed and contents may be overwritten
34 * immediately after the callback returns.
35 */
36 typedef void (*opal_keyval_parse_fn_t)(const char *key, const char *value);
37
38 /**
39 * Parse \c filename, made up of key = value pairs.
40 *
41 * Parse \c filename, made up of key = value pairs. For each line
42 * that appears to contain a key = value pair, \c callback will be
43 * called exactly once. In a multithreaded context, calls to
44 * opal_util_keyval_parse() will serialize multiple calls.
45 */
46 OPAL_DECLSPEC int opal_util_keyval_parse(const char *filename,
47 opal_keyval_parse_fn_t callback);
48
49 OPAL_DECLSPEC int opal_util_keyval_parse_init(void);
50
51 OPAL_DECLSPEC int opal_util_keyval_parse_finalize(void);
52
53 END_C_DECLS
54
55 #endif
opal_util_keyval_parse
OPAL_DECLSPEC int opal_util_keyval_parse(const char *filename, opal_keyval_parse_fn_t callback)
Parse filename, made up of key = value pairs.
Definition: keyval_parse.c:42
opal_keyval_parse_fn_t
BEGIN_C_DECLS typedef void(* opal_keyval_parse_fn_t)(const char *key, const char *value)
Callback triggered for each key = value pair.
Definition: keyval_parse.h:36