Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/core/stdc/fenv.d
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ int feholdexcept(fenv_t* envp);
///
int fegetexceptflag(fexcept_t* flagp, int excepts);
///
int fesetexceptflag(in fexcept_t* flagp, int excepts);
int fesetexceptflag(const scope fexcept_t* flagp, int excepts);

///
int fegetround();
Expand All @@ -885,7 +885,7 @@ int fesetround(int round);
///
int fegetenv(fenv_t* envp);
///
int fesetenv(in fenv_t* envp);
int fesetenv(const scope fenv_t* envp);

// MS define feraiseexcept() and feupdateenv() inline.
version (CRuntime_Microsoft) // supported since MSVCRT 12 (VS 2013) only
Expand Down Expand Up @@ -923,7 +923,7 @@ version (CRuntime_Microsoft) // supported since MSVCRT 12 (VS 2013) only
}

///
int feupdateenv()(in fenv_t* envp)
int feupdateenv()(const scope fenv_t* envp)
{
int excepts = fetestexcept(FE_ALL_EXCEPT);
return (fesetenv(envp) != 0 || feraiseexcept(excepts) != 0 ? 1 : 0);
Expand All @@ -934,5 +934,5 @@ else
///
int feraiseexcept(int excepts);
///
int feupdateenv(in fenv_t* envp);
int feupdateenv(const scope fenv_t* envp);
}
8 changes: 4 additions & 4 deletions src/core/stdc/inttypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,10 @@ intmax_t imaxabs(intmax_t j);
///
imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
///
intmax_t strtoimax(in char* nptr, char** endptr, int base);
intmax_t strtoimax(const scope char* nptr, char** endptr, int base);
///
uintmax_t strtoumax(in char* nptr, char** endptr, int base);
uintmax_t strtoumax(const scope char* nptr, char** endptr, int base);
///
intmax_t wcstoimax(in wchar_t* nptr, wchar_t** endptr, int base);
intmax_t wcstoimax(const scope wchar_t* nptr, wchar_t** endptr, int base);
///
uintmax_t wcstoumax(in wchar_t* nptr, wchar_t** endptr, int base);
uintmax_t wcstoumax(const scope wchar_t* nptr, wchar_t** endptr, int base);
2 changes: 1 addition & 1 deletion src/core/stdc/locale.d
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,6 @@ else
}

///
@system char* setlocale(int category, in char* locale);
@system char* setlocale(int category, const scope char* locale);
///
lconv* localeconv();
8 changes: 4 additions & 4 deletions src/core/stdc/stdio.d
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ else version (FreeBSD)
int function(void*) _close;
int function(void*, char*, int) _read;
fpos_t function(void*, fpos_t, int) _seek;
int function(void*, in char*, int) _write;
int function(void*, const scope char*, int) _write;

__sbuf _ub;
ubyte* _up;
Expand Down Expand Up @@ -572,7 +572,7 @@ else version (NetBSD)
int function(void*) _close;
ssize_t function(void*, char*, size_t) _read;
fpos_t function(void*, fpos_t, int) _seek;
ssize_t function(void*, in char*, size_t) _write;
ssize_t function(void*, const scope char*, size_t) _write;

__sbuf _ub;
ubyte* _up;
Expand Down Expand Up @@ -1476,9 +1476,9 @@ else version (NetBSD)
}

///
int snprintf(char* s, size_t n, in char* format, ...);
int snprintf(char* s, size_t n, const scope char* format, ...);
///
int vsnprintf(char* s, size_t n, in char* format, va_list arg);
int vsnprintf(char* s, size_t n, const scope char* format, va_list arg);
}
else version (OpenBSD)
{
Expand Down
52 changes: 26 additions & 26 deletions src/core/stdc/wchar_.d
Original file line number Diff line number Diff line change
Expand Up @@ -128,29 +128,29 @@ alias wchar_t wint_t;
enum wchar_t WEOF = 0xFFFF;

///
int fwprintf(FILE* stream, in wchar_t* format, ...);
int fwprintf(FILE* stream, const scope wchar_t* format, ...);
///
int fwscanf(FILE* stream, in wchar_t* format, ...);
int fwscanf(FILE* stream, const scope wchar_t* format, ...);
///
int swprintf(wchar_t* s, size_t n, in wchar_t* format, ...);
int swprintf(wchar_t* s, size_t n, const scope wchar_t* format, ...);
///
int swscanf(in wchar_t* s, in wchar_t* format, ...);
int swscanf(const scope wchar_t* s, const scope wchar_t* format, ...);
///
int vfwprintf(FILE* stream, in wchar_t* format, va_list arg);
int vfwprintf(FILE* stream, const scope wchar_t* format, va_list arg);
///
int vfwscanf(FILE* stream, in wchar_t* format, va_list arg);
int vfwscanf(FILE* stream, const scope wchar_t* format, va_list arg);
///
int vswprintf(wchar_t* s, size_t n, in wchar_t* format, va_list arg);
int vswprintf(wchar_t* s, size_t n, const scope wchar_t* format, va_list arg);
///
int vswscanf(in wchar_t* s, in wchar_t* format, va_list arg);
int vswscanf(const scope wchar_t* s, const scope wchar_t* format, va_list arg);
///
int vwprintf(in wchar_t* format, va_list arg);
int vwprintf(const scope wchar_t* format, va_list arg);
///
int vwscanf(in wchar_t* format, va_list arg);
int vwscanf(const scope wchar_t* format, va_list arg);
///
int wprintf(in wchar_t* format, ...);
int wprintf(const scope wchar_t* format, ...);
///
int wscanf(in wchar_t* format, ...);
int wscanf(const scope wchar_t* format, ...);

// No unsafe pointer manipulation.
@trusted
Expand All @@ -164,7 +164,7 @@ int wscanf(in wchar_t* format, ...);
///
wchar_t* fgetws(wchar_t* s, int n, FILE* stream);
///
int fputws(in wchar_t* s, FILE* stream);
int fputws(const scope wchar_t* s, FILE* stream);

// No unsafe pointer manipulation.
extern (D) @trusted
Expand Down Expand Up @@ -197,19 +197,19 @@ extern (D) @trusted
}

///
double wcstod(in wchar_t* nptr, wchar_t** endptr);
double wcstod(const scope wchar_t* nptr, wchar_t** endptr);
///
float wcstof(in wchar_t* nptr, wchar_t** endptr);
float wcstof(const scope wchar_t* nptr, wchar_t** endptr);
///
real wcstold(in wchar_t* nptr, wchar_t** endptr);
real wcstold(const scope wchar_t* nptr, wchar_t** endptr);
///
c_long wcstol(in wchar_t* nptr, wchar_t** endptr, int base);
c_long wcstol(const scope wchar_t* nptr, wchar_t** endptr, int base);
///
long wcstoll(in wchar_t* nptr, wchar_t** endptr, int base);
long wcstoll(const scope wchar_t* nptr, wchar_t** endptr, int base);
///
c_ulong wcstoul(in wchar_t* nptr, wchar_t** endptr, int base);
c_ulong wcstoul(const scope wchar_t* nptr, wchar_t** endptr, int base);
///
ulong wcstoull(in wchar_t* nptr, wchar_t** endptr, int base);
ulong wcstoull(const scope wchar_t* nptr, wchar_t** endptr, int base);

///
pure wchar_t* wcscpy(return wchar_t* s1, scope const wchar_t* s2);
Expand Down Expand Up @@ -256,7 +256,7 @@ pure wchar_t* wmemmove(return wchar_t* s1, scope const wchar_t* s2, size_t n);
pure wchar_t* wmemset(return wchar_t* s, wchar_t c, size_t n);

///
size_t wcsftime(wchar_t* s, size_t maxsize, in wchar_t* format, in tm* timeptr);
size_t wcsftime(wchar_t* s, size_t maxsize, const scope wchar_t* format, const scope tm* timeptr);

version (Windows)
{
Expand All @@ -280,14 +280,14 @@ version (Windows)
}

///
int mbsinit(in mbstate_t* ps);
int mbsinit(const scope mbstate_t* ps);
///
size_t mbrlen(in char* s, size_t n, mbstate_t* ps);
size_t mbrlen(const scope char* s, size_t n, mbstate_t* ps);
///
size_t mbrtowc(wchar_t* pwc, in char* s, size_t n, mbstate_t* ps);
size_t mbrtowc(wchar_t* pwc, const scope char* s, size_t n, mbstate_t* ps);
///
size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps);
///
size_t mbsrtowcs(wchar_t* dst, in char** src, size_t len, mbstate_t* ps);
size_t mbsrtowcs(wchar_t* dst, const scope char** src, size_t len, mbstate_t* ps);
///
size_t wcsrtombs(char* dst, in wchar_t** src, size_t len, mbstate_t* ps);
size_t wcsrtombs(char* dst, const scope wchar_t** src, size_t len, mbstate_t* ps);
4 changes: 2 additions & 2 deletions src/core/stdc/wctype.d
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ pure int iswxdigit(wint_t wc);
///
int iswctype(wint_t wc, wctype_t desc);
///
@system wctype_t wctype(in char* property);
@system wctype_t wctype(const scope char* property);
///
pure wint_t towlower(wint_t wc);
///
pure wint_t towupper(wint_t wc);
///
wint_t towctrans(wint_t wc, wctrans_t desc);
///
@system wctrans_t wctrans(in char* property);
@system wctrans_t wctrans(const scope char* property);