comparison system/System.h @ 1475:bd1a2cacd1e7 plugin-path-config

Add provisional utf-8 getenv/putenv implementations
author Chris Cannam
date Thu, 07 Jun 2018 15:35:04 +0100
parents 91231350ee22
children c5ee0746bdef
comparison
equal deleted inserted replaced
1474:dcff44a76573 1475:bd1a2cacd1e7
2 2
3 /* 3 /*
4 Sonic Visualiser 4 Sonic Visualiser
5 An audio file viewer and annotation editor. 5 An audio file viewer and annotation editor.
6 Centre for Digital Music, Queen Mary, University of London. 6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2006 Chris Cannam and QMUL. 7 This file copyright 2006-2018 Chris Cannam and QMUL.
8 8
9 This program is free software; you can redistribute it and/or 9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as 10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the 11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifndef _SYSTEM_H_ 16 #ifndef SV_SYSTEM_H
17 #define _SYSTEM_H_ 17 #define SV_SYSTEM_H
18 18
19 #include "base/Debug.h" 19 #include "base/Debug.h"
20 20
21 #ifdef _WIN32 21 #ifdef _WIN32
22 22
180 180
181 #ifdef USE_POW_NO_F 181 #ifdef USE_POW_NO_F
182 #define powf pow 182 #define powf pow
183 #endif 183 #endif
184 184
185 /** Return the value of the given environment variable by reference.
186 Return true if successfully retrieved, false if unset or on error.
187 Both the variable name and the returned value are UTF-8 encoded.
188 */
189 extern bool getEnvUtf8(std::string variable, std::string &value);
190
191 /** Set the value of the given environment variable.
192 Return true if successfully set, false on error.
193 Both the variable name and the value must be UTF-8 encoded.
194 */
195 extern bool putEnvUtf8(std::string variable, std::string value);
196
185 #endif /* ! _SYSTEM_H_ */ 197 #endif /* ! _SYSTEM_H_ */
186 198
187 199