mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
cleanup environment variable handling + unit tests
* removed a putenv() implementation which isn't needed anymore * mch_getenv() and mch_setenv() are now functions in src/os/env.c * removes direct calls to getenv() and setenv() outside of src/os/env.c * refactored the logic of get_env_name into mch_getenvname_at_index * added unittests for the functions in os/env.c
This commit is contained in:

committed by
Thiago de Arruda

parent
fc86866402
commit
f2433aedc8
@@ -30,6 +30,7 @@
|
||||
#include "screen.h"
|
||||
#include "term.h"
|
||||
#include "ui.h"
|
||||
#include "os/os.h"
|
||||
|
||||
#if defined(FEAT_FLOAT) && defined(HAVE_MATH_H)
|
||||
# include <math.h>
|
||||
@@ -736,11 +737,11 @@ int delete_first_msg(void) {
|
||||
void ex_messages(exarg_T *eap)
|
||||
{
|
||||
struct msg_hist *p;
|
||||
char_u *s;
|
||||
const char *s;
|
||||
|
||||
msg_hist_off = TRUE;
|
||||
|
||||
s = mch_getenv((char_u *)"LANG");
|
||||
s = mch_getenv("LANG");
|
||||
if (s != NULL && *s != NUL)
|
||||
msg_attr((char_u *)
|
||||
_("Messages maintainer: Bram Moolenaar <Bram@vim.org>"),
|
||||
|
Reference in New Issue
Block a user