Changeset be2a20ac in mainline for uspace/lib/posix/src/stdio.c
- Timestamp:
- 2018-06-14T12:59:51Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ceeac3
- Parents:
- a55d76b1 (diff), 80f345c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiri Svoboda <jiri@…> (2018-06-14 12:55:40)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-06-14 12:59:51)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/src/stdio.c
ra55d76b1 rbe2a20ac 351 351 352 352 /** 353 * Convert formatted input from the stream.354 *355 * @param stream Input stream.356 * @param format Format description.357 * @return The number of converted output items or EOF on failure.358 */359 int fscanf(FILE *restrict stream, const char *restrict format, ...)360 {361 va_list list;362 va_start(list, format);363 int result = vfscanf(stream, format, list);364 va_end(list);365 return result;366 }367 368 /**369 * Convert formatted input from the standard input.370 *371 * @param format Format description.372 * @return The number of converted output items or EOF on failure.373 */374 int scanf(const char *restrict format, ...)375 {376 va_list list;377 va_start(list, format);378 int result = vscanf(format, list);379 va_end(list);380 return result;381 }382 383 /**384 * Convert formatted input from the standard input.385 *386 * @param format Format description.387 * @param arg Output items.388 * @return The number of converted output items or EOF on failure.389 */390 int vscanf(const char *restrict format, va_list arg)391 {392 return vfscanf(stdin, format, arg);393 }394 395 /**396 * Convert formatted input from the string.397 *398 * @param s Input string.399 * @param format Format description.400 * @return The number of converted output items or EOF on failure.401 */402 int sscanf(const char *restrict s, const char *restrict format, ...)403 {404 va_list list;405 va_start(list, format);406 int result = vsscanf(s, format, list);407 va_end(list);408 return result;409 }410 411 /**412 353 * Acquire file stream for the thread. 413 354 *
Note:
See TracChangeset
for help on using the changeset viewer.