Address clint warnings and other style issues.

* Add const.
* Fix conditions (move && from end to start of line).
* Use int32_t instead of long.
* Use //-style comments.
This commit is contained in:
Thomas Wienecke
2014-03-27 13:04:26 +01:00
committed by Thiago de Arruda
parent 5762c4e528
commit 4e29a820b6
12 changed files with 160 additions and 252 deletions

View File

@@ -1,15 +1,4 @@
/* vi:set ts=2 sts=2 sw=2:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
/*
* env.c -- environment variable access
*/
// env.c -- environment variable access
#include <uv.h>
@@ -33,15 +22,13 @@ int os_setenv(const char *name, const char *value, int overwrite)
char *os_getenvname_at_index(size_t index)
{
# if defined(AMIGA) || defined(__MRC__) || defined(__SC__)
/*
* No environ[] on the Amiga and on the Mac (using MPW).
*/
// No environ[] on the Amiga and on the Mac (using MPW).
return NULL;
# else
# if defined(HAVE__NSGETENVIRON)
char **environ = *_NSGetEnviron();
# elif !defined(__WIN32__)
/* Borland C++ 5.2 has this in a header file. */
// Borland C++ 5.2 has this in a header file.
extern char **environ;
# endif
// check if index is inside the environ array