style cleanup
This commit is contained in:
@@ -37,7 +37,7 @@ FILE * ufopen(const char * filename, const char * mode)
|
||||
{
|
||||
FILE *f = NULL;
|
||||
UTF16_ENCODE(filename);
|
||||
UTF16_ENCODE (mode);
|
||||
UTF16_ENCODE(mode);
|
||||
|
||||
if (filename_16 && mode_16) {
|
||||
f = _wfopen(filename_16, mode_16);
|
||||
@@ -79,9 +79,11 @@ int urename(const char *oldname, const char *newname )
|
||||
{
|
||||
int r = -1;
|
||||
UTF16_ENCODE(oldname);
|
||||
UTF16_ENCODE (newname);
|
||||
UTF16_ENCODE(newname);
|
||||
|
||||
if (oldname_16 && newname_16) r = _wrename(oldname_16, newname_16);
|
||||
if (oldname_16 && newname_16) {
|
||||
r = _wrename(oldname_16, newname_16);
|
||||
}
|
||||
|
||||
UTF16_UN_ENCODE(newname);
|
||||
UTF16_UN_ENCODE(oldname);
|
||||
@@ -94,7 +96,9 @@ int umkdir(const char *pathname)
|
||||
BOOL r = 0;
|
||||
UTF16_ENCODE(pathname);
|
||||
|
||||
if (pathname_16) r = CreateDirectoryW(pathname_16, NULL);
|
||||
if (pathname_16) {
|
||||
r = CreateDirectoryW(pathname_16, NULL);
|
||||
}
|
||||
|
||||
UTF16_UN_ENCODE(pathname);
|
||||
|
||||
@@ -123,7 +127,10 @@ int uput_getenv(const char *varname, char * value, size_t buffsize)
|
||||
{
|
||||
int r = 0;
|
||||
wchar_t * str;
|
||||
if (!buffsize) return r;
|
||||
|
||||
if (!buffsize) {
|
||||
return r;
|
||||
}
|
||||
|
||||
UTF16_ENCODE(varname);
|
||||
if (varname_16) {
|
||||
@@ -133,7 +140,9 @@ int uput_getenv(const char *varname, char * value, size_t buffsize)
|
||||
}
|
||||
UTF16_UN_ENCODE(varname);
|
||||
|
||||
if (!r) value[0] = 0;
|
||||
if (!r) {
|
||||
value[0] = 0;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -143,6 +152,7 @@ int uputenv(const char *name, const char *value)
|
||||
int r = -1;
|
||||
UTF16_ENCODE(name);
|
||||
UTF16_ENCODE(value);
|
||||
|
||||
if (name_16 && value_16) {
|
||||
r = (SetEnvironmentVariableW(name_16,value_16)!= 0) ? 0 : -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user