mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-19 22:44:19 +01:00
Contrary to getenv(), sc_get_env() returns an allocated string that is guaranteed to be encoded in UTF-8 on all platforms (it uses _wgetenv() internally on Windows and converts the strings). PR #5560 <https://github.com/Genymobile/scrcpy/pull/5560>
13 lines
221 B
C
13 lines
221 B
C
#ifndef SC_ENV_H
|
|
#define SC_ENV_H
|
|
|
|
#include "common.h"
|
|
|
|
// Return the value of the environment variable (may be NULL).
|
|
//
|
|
// The returned value must be freed by the caller.
|
|
char *
|
|
sc_get_env(const char *varname);
|
|
|
|
#endif
|