Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1aa265d

Browse files
committed
typos + small changes
1 parent 5be9e94 commit 1aa265d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎src/stdlib_system.F90‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,9 +934,9 @@ end function stdlib_is_directory
934934

935935
end function is_directory
936936

937-
! A helper function to get the result of the C function `strerror`.
938-
! `strerror` is a function provided by `<string.h>`.
939-
! It returns a string describing the meaning of `errno` in the C header `<errno.h>`
937+
! A helper function to get the string describing an error from C functions.
938+
! If `winapi` is false or not present, uses `strerror` provided by `<string.h>`
939+
! Otherwise, uses `strerror` on unix and `FormatMessageA` on windows.
940940
function c_get_strerror(winapi) result(str)
941941
character(len=:), allocatable :: str
942942
logical, optional, intent(in) :: winapi

‎src/stdlib_system.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
#endif /* ifdef _WIN32 */
1313

1414
// Wrapper to get the string describing a system syscall error.
15-
// Uses `strerr` on unix.
15+
// Always Uses `strerr` on unix.
1616
// if `winapi` is `false`, uses the usual `strerr` on windows.
17-
// If `winapi` is `false`, uses `FormatMessage`(from windows.h) on windows.
17+
// If `winapi` is `true`, uses `FormatMessageA`(from windows.h) on windows.
1818
char* stdlib_strerror(size_t* len, bool winapi){
1919

2020
if (winapi) {
2121
#ifdef _WIN32
2222
LPSTR err = NULL;
2323
DWORD dw = GetLastError();
2424

25-
FormatMessage(
25+
FormatMessageA(
2626
FORMAT_MESSAGE_ALLOCATE_BUFFER |
2727
FORMAT_MESSAGE_FROM_SYSTEM |
2828
FORMAT_MESSAGE_IGNORE_INSERTS,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /