Author: akhaldi
Date: Fri Aug 16 14:51:13 2013
New Revision: 59750
URL:
http://svn.reactos.org/svn/reactos?rev=59750&view=rev
Log:
[CRT]
* Annotate string_s.h.
Modified:
trunk/reactos/include/crt/sec_api/string_s.h
Modified: trunk/reactos/include/crt/sec_api/string_s.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/sec_api/string…
==============================================================================
--- trunk/reactos/include/crt/sec_api/string_s.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/sec_api/string_s.h [iso-8859-1] Fri Aug 16 14:51:13 2013
@@ -3,6 +3,7 @@
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
+
#ifndef _INC_STRING_S
#define _INC_STRING_S
@@ -14,46 +15,299 @@
extern "C" {
#endif
- _CRTIMP errno_t __cdecl _strset_s(char *_Dst,size_t _DstSize,int _Value);
- _CRTIMP errno_t __cdecl _strerror_s(char *_Buf,size_t _SizeInBytes,const char
*_ErrMsg);
- _CRTIMP errno_t __cdecl _strlwr_s(char *_Str,size_t _Size);
- _CRTIMP errno_t __cdecl _strlwr_s_l(char *_Str,size_t _Size,_locale_t _Locale);
- _CRTIMP errno_t __cdecl _strnset_s(char *_Str,size_t _Size,int _Val,size_t _MaxCount);
- _CRTIMP errno_t __cdecl _strupr_s(char *_Str,size_t _Size);
- _CRTIMP errno_t __cdecl _strupr_s_l(char *_Str,size_t _Size,_locale_t _Locale);
-
- _CRTIMP errno_t __cdecl strncat_s(char *_Dst,size_t _DstSizeInChars,const char
*_Src,size_t _MaxCount);
- _CRTIMP errno_t __cdecl _strncat_s_l(char *_Dst,size_t _DstSizeInChars,const char
*_Src,size_t _MaxCount,_locale_t _Locale);
- _CRTIMP errno_t __cdecl strcpy_s(char *_Dst, size_t _SizeInBytes, const char *_Src);
- _CRTIMP errno_t __cdecl strncpy_s(char *_Dst,size_t _DstSizeInChars,const char
*_Src,size_t _MaxCount);
- _CRTIMP errno_t __cdecl _strncpy_s_l(char *_Dst,size_t _DstSizeInChars,const char
*_Src,size_t _MaxCount,_locale_t _Locale);
- _CRTIMP char *__cdecl strtok_s(char *_Str,const char *_Delim,char **_Context);
- _CRTIMP char *__cdecl _strtok_s_l(char *_Str,const char *_Delim,char
**_Context,_locale_t _Locale);
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _strset_s(
+ _Inout_updates_z_(_DstSize) char *_Dst,
+ _In_ size_t _DstSize,
+ _In_ int _Value);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _strerror_s(
+ _Out_writes_z_(_SizeInBytes) char *_Buf,
+ _In_ size_t _SizeInBytes,
+ _In_opt_z_ const char *_ErrMsg);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _strlwr_s(
+ _Inout_updates_z_(_Size) char *_Str,
+ _In_ size_t _Size);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _strlwr_s_l(
+ _Inout_updates_z_(_Size) char *_Str,
+ _In_ size_t _Size,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _strnset_s(
+ _Inout_updates_z_(_Size) char *_Str,
+ _In_ size_t _Size,
+ _In_ int _Val,
+ _In_ size_t _MaxCount);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _strupr_s(
+ _Inout_updates_z_(_Size) char *_Str,
+ _In_ size_t _Size);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _strupr_s_l(
+ _Inout_updates_z_(_Size) char *_Str,
+ _In_ size_t _Size,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ strncat_s(
+ _Inout_updates_z_(_DstSizeInChars) char *_Dst,
+ _In_ size_t _DstSizeInChars,
+ _In_z_ const char *_Src,
+ _In_ size_t _MaxCount);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _strncat_s_l(
+ _Inout_updates_z_(_DstSizeInChars) char *_Dst,
+ _In_ size_t _DstSizeInChars,
+ _In_z_ const char *_Src,
+ _In_ size_t _MaxCount,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ strcpy_s(
+ _Out_writes_z_(_SizeInBytes) char *_Dst,
+ _In_ size_t _SizeInBytes,
+ _In_z_ const char *_Src);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ strncpy_s(
+ _Out_writes_z_(_DstSizeInChars) char *_Dst,
+ _In_ size_t _DstSizeInChars,
+ _In_z_ const char *_Src,
+ _In_ size_t _MaxCount);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _strncpy_s_l(
+ _Out_writes_z_(_DstSizeInChars) char *_Dst,
+ _In_ size_t _DstSizeInChars,
+ _In_z_ const char *_Src,
+ _In_ size_t _MaxCount,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_
+ _CRTIMP
+ char *
+ __cdecl
+ strtok_s(
+ _Inout_opt_z_ char *_Str,
+ _In_z_ const char *_Delim,
+ _Inout_ _Deref_prepost_opt_z_ char **_Context);
+
+ _Check_return_
+ _CRTIMP
+ char *
+ __cdecl
+ _strtok_s_l(
+ _Inout_opt_z_ char *_Str,
+ _In_z_ const char *_Delim,
+ _Inout_ _Deref_prepost_opt_z_ char **_Context,
+ _In_opt_ _locale_t _Locale);
#ifndef _WSTRING_S_DEFINED
#define _WSTRING_S_DEFINED
- _CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t
**_Context);
- _CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum);
- _CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t
*_ErrMsg);
- _CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t
_Val,size_t _MaxCount);
- _CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val);
- _CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords);
- _CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t
_Locale);
- _CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size);
- _CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale);
-
- _CRTIMP errno_t __cdecl wcsncat_s(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t
*_Src,size_t _MaxCount);
- _CRTIMP errno_t __cdecl _wcsncat_s_l(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t
*_Src,size_t _MaxCount,_locale_t _Locale);
- _CRTIMP errno_t __cdecl wcsncpy_s(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t
*_Src,size_t _MaxCount);
- _CRTIMP errno_t __cdecl _wcsncpy_s_l(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t
*_Src,size_t _MaxCount,_locale_t _Locale);
- _CRTIMP wchar_t *__cdecl _wcstok_s_l(wchar_t *_Str,const wchar_t *_Delim,wchar_t
**_Context,_locale_t _Locale);
- _CRTIMP errno_t __cdecl _wcsset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int
_Val,_locale_t _Locale);
- _CRTIMP errno_t __cdecl _wcsnset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int
_Val, size_t _Count,_locale_t _Locale);
-
-#endif
+
+ _Check_return_
+ _CRTIMP
+ wchar_t *
+ __cdecl
+ wcstok_s(
+ _Inout_opt_z_ wchar_t *_Str,
+ _In_z_ const wchar_t *_Delim,
+ _Inout_ _Deref_prepost_opt_z_ wchar_t **_Context);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcserror_s(
+ _Out_writes_opt_z_(_SizeInWords) wchar_t *_Buf,
+ _In_ size_t _SizeInWords,
+ _In_ int _ErrNum);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ __wcserror_s(
+ _Out_writes_opt_z_(_SizeInWords) wchar_t *_Buffer,
+ _In_ size_t _SizeInWords,
+ _In_z_ const wchar_t *_ErrMsg);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcsnset_s(
+ _Inout_updates_z_(_DstSizeInWords) wchar_t *_Dst,
+ _In_ size_t _DstSizeInWords,
+ _In_ wchar_t _Val,
+ _In_ size_t _MaxCount);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcsset_s(
+ _Inout_updates_z_(_SizeInWords) wchar_t *_Str,
+ _In_ size_t _SizeInWords,
+ _In_ wchar_t _Val);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcslwr_s(
+ _Inout_updates_z_(_SizeInWords) wchar_t *_Str,
+ _In_ size_t _SizeInWords);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcslwr_s_l(
+ _Inout_updates_z_(_SizeInWords) wchar_t *_Str,
+ _In_ size_t _SizeInWords,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcsupr_s(
+ _Inout_updates_z_(_Size) wchar_t *_Str,
+ _In_ size_t _Size);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcsupr_s_l(
+ _Inout_updates_z_(_Size) wchar_t *_Str,
+ _In_ size_t _Size,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ wcsncat_s(
+ _Inout_updates_z_(_DstSizeInChars) wchar_t *_Dst,
+ _In_ size_t _DstSizeInChars,
+ _In_z_ const wchar_t *_Src,
+ _In_ size_t _MaxCount);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcsncat_s_l(
+ _Inout_updates_z_(_DstSizeInChars) wchar_t *_Dst,
+ _In_ size_t _DstSizeInChars,
+ _In_z_ const wchar_t *_Src,
+ _In_ size_t _MaxCount,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ wcsncpy_s(
+ _Out_writes_z_(_DstSizeInChars) wchar_t *_Dst,
+ _In_ size_t _DstSizeInChars,
+ _In_z_ const wchar_t *_Src,
+ _In_ size_t _MaxCount);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcsncpy_s_l(
+ _Out_writes_z_(_DstSizeInChars) wchar_t *_Dst,
+ _In_ size_t _DstSizeInChars,
+ _In_z_ const wchar_t *_Src,
+ _In_ size_t _MaxCount,
+ _In_opt_ _locale_t _Locale);
+
+ _CRTIMP
+ wchar_t *
+ __cdecl
+ _wcstok_s_l(
+ _Inout_opt_z_ wchar_t *_Str,
+ _In_z_ const wchar_t *_Delim,
+ _Inout_ _Deref_prepost_opt_z_ wchar_t **_Context,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcsset_s_l(
+ _Inout_updates_z_(_SizeInChars) wchar_t *_Str,
+ _In_ size_t _SizeInChars,
+ _In_ unsigned int _Val,
+ _In_opt_ _locale_t _Locale);
+
+ _Check_return_wat_
+ _CRTIMP
+ errno_t
+ __cdecl
+ _wcsnset_s_l(
+ _Inout_updates_z_(_SizeInChars) wchar_t *_Str,
+ _In_ size_t _SizeInChars,
+ _In_ unsigned int _Val,
+ _In_ size_t _Count,
+ _In_opt_ _locale_t _Locale);
+
+#endif /* _WSTRING_S_DEFINED */
#ifdef __cplusplus
}
#endif
-#endif
-#endif
+
+#endif /* MINGW_HAS_SECURE_API */
+
+#endif /* _INC_STRING_S */