Datasheet
The C and C++ Libraries
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 4-79
4.10.3 _sys_open()
This function opens a file.
Syntax
FILEHANDLE _sys_open(const char *name, int openmode)
Implementation
The
_sys_open
function is required by
fopen()
and
freopen()
.These functions, in turn,
are required if any file input/output function is to be used.
The
openmode
parameter is a bitmap, whose bits mostly correspond directly to the ANSI
mode specification. See
rt_sys.h
for details. Target-dependent extensions are possible,
in which case
freopen()
must also be extended.
Returns
The return value is –1 if an error occurs.
4.10.4 _sys_close()
This function closes a file previously opened with
_sys_open()
.
Syntax
int _sys_close(FILEHANDLE fh)
Implementation
This function must be defined if any input/output functionis to be used.
Returns
The return value is 0 if successful. A nonzero value indicates an error.