Update contrib.
3 * Portions Copyright (c) 1990-2006 Nokia Corporation and/or its subsidiary(-ies).
8 * Copyright (c) 1990 The Regents of the University of California.
11 * Redistribution and use in source and binary forms are permitted
12 * provided that the above copyright notice and this paragraph are
13 * duplicated in all such forms and that any documentation,
14 * advertising materials, and other materials related to such
15 * distribution and use acknowledge that the software was developed
16 * by the University of California, Berkeley. The name of the
17 * University may not be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30 Read formatted data from standard input.
31 Reads data from the standard input and stores it into the locations given by argument(s).
33 @param fmt String that can contain one or more of these items:
34 Whitespace characters: the function will read and ignore any whitespace characters
35 (this includes blank, newline and tab characters) encountered before the next
36 non-whitespace character. This includes any quantity of whitespace characters
37 (including none). Non-whitespace characters (any character not including blank,
38 newline, tab, or any format specifier begining with % character): this cause that
39 the function read and discard any character that match the given non-whitespace
41 If this character is not found the function ends returning error.
43 @return On Success, the number of items succesfully read.
44 On Failure, EOF is returned and errno may be set.
46 EXPORT_C int scanf (const char *fmt, ...)
50 struct _reent *r = _REENT2;
52 return EOF; // Memory for library globals is not allocated (errno not set).
54 ret = __svfscanf (_stdin_r (r), fmt, ap);
60 A reentrant version of scanf().
62 EXPORT_C int _scanf_r (struct _reent *ptr, const char *fmt, ...)
68 ret = __svfscanf (_stdin_r (ptr), fmt, ap);
74 Read formatted data from a stream.
75 Reads data from the current position of stream and stores it
76 into the locations given by argument(s).
77 Locations pointed by each argument are filled with their corresponding type of value
78 requested in the format string.
79 There must be the same number of type specifiers in format string than arguments passed.
80 @return The number of items succesfully read.
81 @param fp Pointer to an open file.
82 @param fmt String that can contain one or more of these item:
83 Whitespace characters: the function will read and ignore any whitespace characters
84 (this includes blank, newline and tab characters)
85 encountered before the next non-whitespace character.
86 This includes any quantity of whitespace characters (including none).
87 Non-whitespace characters (any character not including blank, newline, tab,
88 or any format specifier begining with % character):
89 this cause that the function read and discard any character that match the given non-whitespace character.
90 If this character is not found the function ends returning error.
93 fscanf (FILE * fp, const char *fmt, ...)
99 ret = __svfscanf (fp, fmt, ap);