1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the w64 mingw-runtime package. 4 * No warranty is given; refer to the file DISCLAIMER within this package. 5 */ 6 7 #ifndef _INC_STRING_S 8 #define _INC_STRING_S 9 10 #include <string.h> 11 12 #if defined(MINGW_HAS_SECURE_API) 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 _Check_return_wat_ 19 _CRTIMP 20 errno_t 21 __cdecl 22 _strset_s( 23 _Inout_updates_z_(_DstSize) char *_Dst, 24 _In_ size_t _DstSize, 25 _In_ int _Value); 26 27 _Check_return_wat_ 28 _CRTIMP 29 errno_t 30 __cdecl 31 _strerror_s( 32 _Out_writes_z_(_SizeInBytes) char *_Buf, 33 _In_ size_t _SizeInBytes, 34 _In_opt_z_ const char *_ErrMsg); 35 36 _Check_return_wat_ 37 _CRTIMP 38 errno_t 39 __cdecl 40 _strlwr_s( 41 _Inout_updates_z_(_Size) char *_Str, 42 _In_ size_t _Size); 43 44 _Check_return_wat_ 45 _CRTIMP 46 errno_t 47 __cdecl 48 _strlwr_s_l( 49 _Inout_updates_z_(_Size) char *_Str, 50 _In_ size_t _Size, 51 _In_opt_ _locale_t _Locale); 52 53 _Check_return_wat_ 54 _CRTIMP 55 errno_t 56 __cdecl 57 _strnset_s( 58 _Inout_updates_z_(_Size) char *_Str, 59 _In_ size_t _Size, 60 _In_ int _Val, 61 _In_ size_t _MaxCount); 62 63 _Check_return_wat_ 64 _CRTIMP 65 errno_t 66 __cdecl 67 _strupr_s( 68 _Inout_updates_z_(_Size) char *_Str, 69 _In_ size_t _Size); 70 71 _Check_return_wat_ 72 _CRTIMP 73 errno_t 74 __cdecl 75 _strupr_s_l( 76 _Inout_updates_z_(_Size) char *_Str, 77 _In_ size_t _Size, 78 _In_opt_ _locale_t _Locale); 79 80 _Check_return_wat_ 81 _CRTIMP 82 errno_t 83 __cdecl 84 strncat_s( 85 _Inout_updates_z_(_DstSizeInChars) char *_Dst, 86 _In_ size_t _DstSizeInChars, 87 _In_z_ const char *_Src, 88 _In_ size_t _MaxCount); 89 90 _Check_return_wat_ 91 _CRTIMP 92 errno_t 93 __cdecl 94 _strncat_s_l( 95 _Inout_updates_z_(_DstSizeInChars) char *_Dst, 96 _In_ size_t _DstSizeInChars, 97 _In_z_ const char *_Src, 98 _In_ size_t _MaxCount, 99 _In_opt_ _locale_t _Locale); 100 101 _Check_return_wat_ 102 _CRTIMP 103 errno_t 104 __cdecl 105 strcpy_s( 106 _Out_writes_z_(_SizeInBytes) char *_Dst, 107 _In_ size_t _SizeInBytes, 108 _In_z_ const char *_Src); 109 110 _Check_return_wat_ 111 _CRTIMP 112 errno_t 113 __cdecl 114 strncpy_s( 115 _Out_writes_z_(_DstSizeInChars) char *_Dst, 116 _In_ size_t _DstSizeInChars, 117 _In_z_ const char *_Src, 118 _In_ size_t _MaxCount); 119 120 _Check_return_wat_ 121 _CRTIMP 122 errno_t 123 __cdecl 124 _strncpy_s_l( 125 _Out_writes_z_(_DstSizeInChars) char *_Dst, 126 _In_ size_t _DstSizeInChars, 127 _In_z_ const char *_Src, 128 _In_ size_t _MaxCount, 129 _In_opt_ _locale_t _Locale); 130 131 _Check_return_ 132 _CRTIMP 133 char * 134 __cdecl 135 strtok_s( 136 _Inout_opt_z_ char *_Str, 137 _In_z_ const char *_Delim, 138 _Inout_ _Deref_prepost_opt_z_ char **_Context); 139 140 _Check_return_ 141 _CRTIMP 142 char * 143 __cdecl 144 _strtok_s_l( 145 _Inout_opt_z_ char *_Str, 146 _In_z_ const char *_Delim, 147 _Inout_ _Deref_prepost_opt_z_ char **_Context, 148 _In_opt_ _locale_t _Locale); 149 150 #ifndef _WSTRING_S_DEFINED 151 #define _WSTRING_S_DEFINED 152 153 _Check_return_ 154 _CRTIMP 155 wchar_t * 156 __cdecl 157 wcstok_s( 158 _Inout_opt_z_ wchar_t *_Str, 159 _In_z_ const wchar_t *_Delim, 160 _Inout_ _Deref_prepost_opt_z_ wchar_t **_Context); 161 162 _Check_return_wat_ 163 _CRTIMP 164 errno_t 165 __cdecl 166 _wcserror_s( 167 _Out_writes_opt_z_(_SizeInWords) wchar_t *_Buf, 168 _In_ size_t _SizeInWords, 169 _In_ int _ErrNum); 170 171 _Check_return_wat_ 172 _CRTIMP 173 errno_t 174 __cdecl 175 __wcserror_s( 176 _Out_writes_opt_z_(_SizeInWords) wchar_t *_Buffer, 177 _In_ size_t _SizeInWords, 178 _In_z_ const wchar_t *_ErrMsg); 179 180 _Check_return_wat_ 181 _CRTIMP 182 errno_t 183 __cdecl 184 _wcsnset_s( 185 _Inout_updates_z_(_DstSizeInWords) wchar_t *_Dst, 186 _In_ size_t _DstSizeInWords, 187 _In_ wchar_t _Val, 188 _In_ size_t _MaxCount); 189 190 _Check_return_wat_ 191 _CRTIMP 192 errno_t 193 __cdecl 194 _wcsset_s( 195 _Inout_updates_z_(_SizeInWords) wchar_t *_Str, 196 _In_ size_t _SizeInWords, 197 _In_ wchar_t _Val); 198 199 _Check_return_wat_ 200 _CRTIMP 201 errno_t 202 __cdecl 203 _wcslwr_s( 204 _Inout_updates_z_(_SizeInWords) wchar_t *_Str, 205 _In_ size_t _SizeInWords); 206 207 _Check_return_wat_ 208 _CRTIMP 209 errno_t 210 __cdecl 211 _wcslwr_s_l( 212 _Inout_updates_z_(_SizeInWords) wchar_t *_Str, 213 _In_ size_t _SizeInWords, 214 _In_opt_ _locale_t _Locale); 215 216 _Check_return_wat_ 217 _CRTIMP 218 errno_t 219 __cdecl 220 _wcsupr_s( 221 _Inout_updates_z_(_Size) wchar_t *_Str, 222 _In_ size_t _Size); 223 224 _Check_return_wat_ 225 _CRTIMP 226 errno_t 227 __cdecl 228 _wcsupr_s_l( 229 _Inout_updates_z_(_Size) wchar_t *_Str, 230 _In_ size_t _Size, 231 _In_opt_ _locale_t _Locale); 232 233 _Check_return_wat_ 234 _CRTIMP 235 errno_t 236 __cdecl 237 wcsncat_s( 238 _Inout_updates_z_(_DstSizeInChars) wchar_t *_Dst, 239 _In_ size_t _DstSizeInChars, 240 _In_z_ const wchar_t *_Src, 241 _In_ size_t _MaxCount); 242 243 _Check_return_wat_ 244 _CRTIMP 245 errno_t 246 __cdecl 247 _wcsncat_s_l( 248 _Inout_updates_z_(_DstSizeInChars) wchar_t *_Dst, 249 _In_ size_t _DstSizeInChars, 250 _In_z_ const wchar_t *_Src, 251 _In_ size_t _MaxCount, 252 _In_opt_ _locale_t _Locale); 253 254 _Check_return_wat_ 255 _CRTIMP 256 errno_t 257 __cdecl 258 wcsncpy_s( 259 _Out_writes_z_(_DstSizeInChars) wchar_t *_Dst, 260 _In_ size_t _DstSizeInChars, 261 _In_z_ const wchar_t *_Src, 262 _In_ size_t _MaxCount); 263 264 _Check_return_wat_ 265 _CRTIMP 266 errno_t 267 __cdecl 268 _wcsncpy_s_l( 269 _Out_writes_z_(_DstSizeInChars) wchar_t *_Dst, 270 _In_ size_t _DstSizeInChars, 271 _In_z_ const wchar_t *_Src, 272 _In_ size_t _MaxCount, 273 _In_opt_ _locale_t _Locale); 274 275 _CRTIMP 276 wchar_t * 277 __cdecl 278 _wcstok_s_l( 279 _Inout_opt_z_ wchar_t *_Str, 280 _In_z_ const wchar_t *_Delim, 281 _Inout_ _Deref_prepost_opt_z_ wchar_t **_Context, 282 _In_opt_ _locale_t _Locale); 283 284 _Check_return_wat_ 285 _CRTIMP 286 errno_t 287 __cdecl 288 _wcsset_s_l( 289 _Inout_updates_z_(_SizeInChars) wchar_t *_Str, 290 _In_ size_t _SizeInChars, 291 _In_ unsigned int _Val, 292 _In_opt_ _locale_t _Locale); 293 294 _Check_return_wat_ 295 _CRTIMP 296 errno_t 297 __cdecl 298 _wcsnset_s_l( 299 _Inout_updates_z_(_SizeInChars) wchar_t *_Str, 300 _In_ size_t _SizeInChars, 301 _In_ unsigned int _Val, 302 _In_ size_t _Count, 303 _In_opt_ _locale_t _Locale); 304 305 #endif /* _WSTRING_S_DEFINED */ 306 307 #ifdef __cplusplus 308 } 309 #endif 310 311 #endif /* MINGW_HAS_SECURE_API */ 312 313 #endif /* _INC_STRING_S */ 314