Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:47:27

0001 /*
0002  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
0003  *                         University Research and Technology
0004  *                         Corporation.  All rights reserved.
0005  * Copyright (c) 2004-2005 The University of Tennessee and The University
0006  *                         of Tennessee Research Foundation.  All rights
0007  *                         reserved.
0008  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
0009  *                         University of Stuttgart.  All rights reserved.
0010  * Copyright (c) 2004-2005 The Regents of the University of California.
0011  *                         All rights reserved.
0012  * Copyright (c) 2016-2020 Intel, Inc.  All rights reserved.
0013  * Copyright (c) 2021-2022 Nanook Consulting.  All rights reserved.
0014  * $COPYRIGHT$
0015  *
0016  * Additional copyrights may follow
0017  *
0018  * $HEADER$
0019  */
0020 
0021 /** @file */
0022 
0023 #ifndef PMIX_UTIL_KEYVAL_PARSE_H
0024 #define PMIX_UTIL_KEYVAL_PARSE_H
0025 
0026 #include "src/include/pmix_config.h"
0027 
0028 BEGIN_C_DECLS
0029 
0030 PMIX_EXPORT extern int pmix_util_keyval_parse_lineno;
0031 
0032 /**
0033  * Callback triggered for each key = value pair
0034  *
0035  * Callback triggered from pmix_util_keyval_parse for each key = value
0036  * pair.  Both key and value will be pointers into static buffers.
0037  * The buffers must not be free()ed and contents may be overwritten
0038  * immediately after the callback returns.
0039  */
0040 typedef void (*pmix_keyval_parse_fn_t)(const char *file, int lineno,
0041                                        const char *name,
0042                                        const char *value);
0043 
0044 /**
0045  * Parse \c filename, made up of key = value pairs.
0046  *
0047  * Parse \c filename, made up of key = value pairs.  For each line
0048  * that appears to contain a key = value pair, \c callback will be
0049  * called exactly once.  In a multithreaded context, calls to
0050  * pmix_util_keyval_parse() will serialize multiple calls.
0051  */
0052 PMIX_EXPORT int pmix_util_keyval_parse(const char *filename, pmix_keyval_parse_fn_t callback);
0053 
0054 PMIX_EXPORT int pmix_util_keyval_parse_init(void);
0055 
0056 PMIX_EXPORT void pmix_util_keyval_parse_finalize(void);
0057 
0058 PMIX_EXPORT int pmix_util_keyval_save_internal_envars(pmix_keyval_parse_fn_t callback);
0059 
0060 END_C_DECLS
0061 
0062 #endif