You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/strtok-s-strtok-s-l-wcstok-s-wcstok-s-l-mbstok-s-mbstok-s-l.md
+20-18Lines changed: 20 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -128,19 +128,20 @@ unsigned char* _mbstok_s(
128
128
### Parameters
129
129
130
130
*str*
131
-
String containing the token or tokens to find.
131
+
A string containing the token or tokens to find.
132
132
133
-
*delimiters*
134
-
Set of delimiter characters.
133
+
*delimiters*
134
+
The set of delimiter characters to use.
135
135
136
-
*context*
137
-
Used to store position information between calls to `strtok_s`
136
+
*context*
137
+
Used to store position information between calls to the function.
138
138
139
-
`locale`
140
-
Locale to use.
139
+
*locale*
140
+
The locale to use.
141
141
142
142
## Return Value
143
-
Returns a pointer to the next token found in *str*. They return `NULL` when no more tokens are found. Each call modifies *str* by substituting a `NULL` character for the first delimiter that occurs after the returned token.
143
+
144
+
Returns a pointer to the next token found in *str*. Returns `NULL` when no more tokens are found. Each call modifies *str* by substituting a `NULL` character for the first delimiter that occurs after the returned token.
144
145
145
146
### Error Conditions
146
147
@@ -150,25 +151,19 @@ unsigned char* _mbstok_s(
150
151
|any|`NULL`|any|`NULL`|`EINVAL`|
151
152
|any|any|`NULL`|`NULL`|`EINVAL`|
152
153
153
-
If *str* is `NULL` but context is a pointer to a valid context pointer, there is no error.
154
+
If *str* is `NULL` but *context* is a pointer to a valid context pointer, there is no error.
154
155
155
156
## Remarks
156
-
The `strtok_s` function finds the next token in *str*. The set of characters in *delimiters* specifies possible delimiters of the token to be found in *str* on the current call. `wcstok_s` and `_mbstok_s` are wide-character and multibyte-character versions of `strtok_s`. The arguments and return values of `wcstok_s` and `_wcstok_s_l` are wide-character strings; those of `_mbstok_s` and `_mbstok_s_l` are multibyte-character strings. These three functions behave identically otherwise.
157
-
158
-
This function validates its parameters. If an error condition occurs, as in the Error Conditions table, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set `errno` to `EINVAL` and return `NULL`.
159
157
160
-
### Generic-Text Routine Mappings
158
+
The `strtok_s` family of functions finds the next token in *str*. The set of characters in *delimiters* specifies possible delimiters of the token to be found in *str* on the current call. `wcstok_s` and `_mbstok_s` are wide-character and multibyte-character versions of `strtok_s`. The arguments and return values of `wcstok_s` and `_wcstok_s_l` are wide-character strings; those of `_mbstok_s` and `_mbstok_s_l` are multibyte-character strings. These functions behave identically otherwise.
161
159
162
-
|TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined|
This function validates its parameters. If an error condition occurs, as in the Error Conditions table, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set `errno` to `EINVAL` and return `NULL`.
166
161
167
162
On the first call to `strtok_s` the function skips leading delimiters and returns a pointer to the first token in *str*, terminating the token with a null character. More tokens can be broken out of the remainder of *str* by a series of calls to `strtok_s`. Each call to `strtok_s` modifies *str* by inserting a null character after the token returned by that call. The *context* pointer keeps track of which string is being read and where in the string the next token is to be read. To read the next token from *str*, call `strtok_s` with a `NULL` value for the *str* argument, and pass the same *context* parameter. The `NULL`*str* argument causes `strtok_s` to search for the next token in the modified *str*. The *delimiters* argument can take any value from one call to the next so that the set of delimiters may vary.
168
163
169
164
Since the *context* parameter supersedes the static buffers used in `strtok` and `_strtok_l`, it is possible to parse two strings simultaneously in the same thread.
170
165
171
-
The output value is affected by the setting of the `LC_CTYPE` category setting of the locale; see [setlocale](../../c-runtime-library/reference/setlocale-wsetlocale.md) for more information. The versions of these functions without the `_l` suffix use the current locale for this locale-dependent behavior; the versions with the `_l` suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../../c-runtime-library/locale.md).
166
+
The output value is affected by the setting of the `LC_CTYPE` category setting of the locale; see [setlocale](../../c-runtime-library/reference/setlocale-wsetlocale.md) for more information. The versions of these functions without the `_l` suffix use the current thread locale for this locale-dependent behavior. The versions with the `_l` suffix are identical except that they instead use the *locale* parameter. For more information, see [Locale](../../c-runtime-library/locale.md).
172
167
173
168
## Requirements
174
169
@@ -181,6 +176,13 @@ The output value is affected by the setting of the `LC_CTYPE` category setting o
181
176
182
177
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
183
178
179
+
### Generic-Text Routine Mappings
180
+
181
+
|TCHAR.H routine|\_UNICODE & \_MBCS not defined|\_MBCS defined|_UNICODE defined|
Copy file name to clipboardExpand all lines: docs/error-messages/compiler-errors-1/fatal-error-c1001.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ translation.priority.ht:
40
40
41
41
The compiler cannot generate correct code for a construct, often due to the combination of a particular expression and an optimization option, or an issue in parsing. If the compiler file listed has a utc or C2 path segment, it is probably an optimization error. If the file has a cxxfe or c1xx path segment, or is msc1.cpp, it is probably a parser error. If the file named is cl.exe, there is no other information available.
42
42
43
-
You can often fix an optimization problem by removing one or more optimization options. To determine which option is at fault, remove options one at a time and recompile until the error message goes away. The options most commonly responsible are [/Og (Global optimizations)](../../build/reference/og-global-optimizations.md) and [/Oi (Generate Intrinsic Functions)](../../build/reference/og-generate-intrinsic-functions.md). Once you determine which optimization option is responsible, you can disable it around the function where the error occurs by using the [optimize](../../preprocessor/optimize.md) pragma, and continue to use the option for the rest of the module. For more information about optimization options, see [Optimization best practices](../../build/reference/optimization-best-practices.md).
43
+
You can often fix an optimization problem by removing one or more optimization options. To determine which option is at fault, remove options one at a time and recompile until the error message goes away. The options most commonly responsible are [/Og (Global optimizations)](../../build/reference/og-global-optimizations.md) and [/Oi (Generate Intrinsic Functions)](../../build/reference/oi-generate-intrinsic-functions.md). Once you determine which optimization option is responsible, you can disable it around the function where the error occurs by using the [optimize](../../preprocessor/optimize.md) pragma, and continue to use the option for the rest of the module. For more information about optimization options, see [Optimization best practices](../../build/reference/optimization-best-practices.md).
44
44
45
45
If optimizations are not responsible for the error, try rewriting the line where the error is reported, or several lines of code surrounding that line. To see the code the way the compiler sees it after preprocessing, you can use the [/P (Preprocess to a file)](../../build/reference/p-preprocess-to-a-file.md) option.
0 commit comments