Changeset 5a6c28d1 in mainline for uspace/lib/posix/src/stdio.c
- Timestamp:
- 2018-06-13T15:50:53Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 39f84ce4
- Parents:
- f47a905
- git-author:
- Jiri Svoboda <jiri@…> (2018-06-12 17:50:36)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-06-13 15:50:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/src/stdio.c
rf47a905 r5a6c28d1 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.