BRL-CAD
env.h
Go to the documentation of this file.
1 /* E N V . H
2  * BRL-CAD
3  *
4  * Copyright (c) 2007-2024 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 
21 #ifndef BU_ENV_H
22 #define BU_ENV_H
23 
24 #include "common.h"
25 
26 #include "bu/defines.h"
27 
28 __BEGIN_DECLS
29 
30 /** @addtogroup bu_env
31  *
32  * @brief
33  * Platform-independent methods for interacting with the parent operating
34  * system environment.
35  *
36  */
37 /** @{ */
38 /** @file bu/env.h */
39 
40 BU_EXPORT extern int bu_setenv(const char *name, const char *value, int overwrite);
41 
42 
43 /* Specific types of machine memory information that may be requested */
44 #define BU_MEM_ALL 0
45 #define BU_MEM_AVAIL 1
46 #define BU_MEM_PAGE_SIZE 2
47 
48 /**
49  * Report system memory sizes.
50  *
51  * Returns -1 on error and the size of the requested memory type on
52  * success. Optionally if sz is non-NULL, the size of the requested
53  * memory type will be set to it.
54  */
55 BU_EXPORT extern ssize_t bu_mem(int type, size_t *sz);
56 
57 /** @} */
58 
59 __END_DECLS
60 
61 #endif /* BU_ENV_H */
62 
63 /*
64  * Local Variables:
65  * tab-width: 8
66  * mode: C
67  * indent-tabs-mode: t
68  * c-file-style: "stroustrup"
69  * End:
70  * ex: shiftwidth=4 tabstop=8
71  */
Header file for the BRL-CAD common definitions.
ssize_t bu_mem(int type, size_t *sz)
int bu_setenv(const char *name, const char *value, int overwrite)