Target dependencies on low-level functions
in the C and C++ libraries
Table 9 shows
the dependencies of the higher-level functions on lower-level functions.
If you define your own versions of the lower-level functions, you
can use the library versions of the higher-level functions directly.
fgetc() uses __FILE,
but fputc() uses __FILE and ferror().
Note
You must provide definitions of __stdin and __stdout if
you use any of their associated high-level functions. This applies
even if your re-implementations of other functions, such as fgetc() and fputc(),
do not reference any data stored in __stdin and __stdout.
Table key:
__FILE,
the file structure.
__stdin, the standard input object
of type __FILE.
__stdout, the standard output
object of type __FILE.
fputc(), outputs a character
to a file.
ferror(), returns the error
status accumulated during file I/O.
fgetc(), gets a character from
a file.
fgetwc()
fputwc()
__backspace(), moves the file
pointer to the previous character.
__backspacewc().
Table 9. Input/output dependencies
High-level function
Low-level object
1
2
3
4
5
6
7
8
9
10
fgets
x
-
-
-
x
x
-
-
-
-
fgetws
x
-
-
-
-
-
x
-
-
-
fprintf
x
-
-
x
x
-
-
-
-
-
fputs
x
-
-
x
-
-
-
-
-
-
fputws
x
-
-
-
-
-
-
x
-
-
fread
x
-
-
-
-
x
-
-
-
-
fscanf
x
-
-
-
-
x
-
-
x
-
fwprintf
x
-
-
-
x
-
-
x
-
-
fwrite
x
-
-
x
-
-
-
-
-
-
fwscanf
x
-
-
-
-
-
x
-
-
x
getchar
x
x
-
-
-
x
-
-
-
-
gets
x
x
-
-
x
x
-
-
-
-
getwchar
x
x
-
-
-
-
x
-
-
-
perror
x
-
x
x
-
-
-
-
-
-
printf
x
-
x
x
x
-
-
-
-
-
putchar
x
-
x
x
-
-
-
-
-
-
puts
x
-
x
x
-
-
-
-
-
-
putwchar
x
-
x
-
-
-
-
x
-
-
scanf
x
x
-
-
-
x
-
-
x
-
vfprintf
x
-
-
x
x
-
-
-
-
-
vfscanf
x
-
-
-
-
x
-
-
x
-
vfwprintf
x
-
-
-
x
-
-
x
-
-
vfwscanf
x
-
-
-
-
-
x
-
-
x
vprintf
x
-
x
x
x
-
-
-
-
-
vscanf
x
x
-
-
-
x
-
-
x
-
vwprintf
x
-
x
-
x
-
-
x
-
-
vwscanf
x
x
-
-
-
-
x
-
-
x
wprintf
x
-
x
-
x
-
-
x
-
-
wscanf
x
x
-
-
-
-
x
-
-
x
Note
If you choose to re-implement fgetc(), fputc(),
and __backspace(), be aware that fopen() and related
functions use the ARM layout for the __FILE structure.
You might also have to re-implement fopen() and
related functions if you define your own version of __FILE.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.