Mercurial > octave
diff liboctave/system/lo-sysdep.cc @ 27933:863ae57eee69
maint: Use Octave coding conventions in liboctave/
* Array-C.cc, Array-d.cc, Array-f.cc, MSparse.cc, Sparse.cc, dim-vector.h,
xerbla.cc, aepbalance.cc, eigs-base.cc, gepbalance.cc, oct-fftw.cc,
randmtzig.cc, mx-inlines.cc, lo-sysdep.cc, base-list.h, cmd-edit.h,
lo-regexp.cc, oct-atomic.h, oct-binmap.h, oct-inttypes.cc, oct-inttypes.h,
quit.h, url-transfer.cc:
Use Octave coding conventions in liboctave.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 11 Jan 2020 12:53:20 -0800 |
parents | bd51beb6205e |
children | b895daca20e2 |
line wrap: on
line diff
--- a/liboctave/system/lo-sysdep.cc Fri Jan 10 17:25:12 2020 -0800 +++ b/liboctave/system/lo-sysdep.cc Sat Jan 11 12:53:20 2020 -0800 @@ -84,7 +84,8 @@ } bool - get_dirlist (const std::string& dirname, string_vector& dirlist, std::string& msg) + get_dirlist (const std::string& dirname, string_vector& dirlist, + std::string& msg) { dirlist = ""; msg = ""; @@ -102,17 +103,17 @@ // Find first file in directory. HANDLE hFind = FindFirstFileW (u8_to_wstring (path_name).c_str (), - &ffd); + &ffd); if (INVALID_HANDLE_VALUE == hFind) { DWORD errCode = GetLastError (); char *errorText = nullptr; FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_IGNORE_INSERTS, - nullptr, errCode, - MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - reinterpret_cast <char *> (&errorText), 0, nullptr); + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_IGNORE_INSERTS, + nullptr, errCode, + MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), + reinterpret_cast <char *> (&errorText), 0, nullptr); if (errorText != nullptr) { msg = std::string (errorText); @@ -375,16 +376,16 @@ std::string test_dir = canonicalize_file_name (oct_ascii_dir); if (test_dir.empty ()) - { - std::string msg; - int status = sys::mkdir (oct_ascii_dir, 0777, msg); + { + std::string msg; + int status = sys::mkdir (oct_ascii_dir, 0777, msg); - if (status < 0) - return orig_file_name; + if (status < 0) + return orig_file_name; - // Set hidden property. - SetFileAttributesA (oct_ascii_dir.c_str (), FILE_ATTRIBUTE_HIDDEN); - } + // Set hidden property. + SetFileAttributesA (oct_ascii_dir.c_str (), FILE_ATTRIBUTE_HIDDEN); + } // Create file from hash of full filename. std::string filename_hash