ARM VERSION 1.2 Fiche technique Page 167

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 276
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 166
The C and C++ Libraries
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 4-77
{
/* Your implementation of ferror */
return EOF;
}
void test(void)
{
printf("Hello world\n"); /* This works ... */
}
By default,
fread()
and
fwrite()
call fast block input/output functions that are part of
the ARM stream implementation. If you define your own
__FILE
structure instead of
using the ARM stream implementation,
fread()
and
fwrite()
will call
fgetc()
instead
of calling the block input/output functions. See also the implementation in
\Examples\Embedded\embed\retarget.c
.
fread(), fgets(), and gets()
The functions
fread()
,
fgets()
, and
gets()
are implemented as a loop over
fgetc()
and
ferror()
. Each uses the
FILE
argument opaquely.
If you provide your own implementation of
__FILE
,
__stdin
(for
gets()
),
fgetc()
, and
ferror()
, you can use these functions directly from the library.
Vue de la page 166
1 2 ... 162 163 164 165 166 167 168 169 170 171 172 ... 275 276

Commentaires sur ces manuels

Pas de commentaire