Changes in uspace/lib/posix/src/stdio.c [5a6c28d1:7c3fb9b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/src/stdio.c
r5a6c28d1 r7c3fb9b 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 /** 353 412 * Acquire file stream for the thread. 354 413 *
Note:
See TracChangeset
for help on using the changeset viewer.