#include <STDIO.H>
Link against:
estlib.lib
__need_size_t
Description
__SLBF 0x0001
Description
__SNBF 0x0002
Description
__SEOF 0x0020
Description
__SERR 0x0040
Description
__SMBF 0x0080
Description
__SAPP 0x0100
Description
__SSTR 0x0200
Description
__SOPT 0x0400
Description
__SNPT 0x0800
Description
__SOFF 0x1000
Description
__SMOD 0x2000
Description
_IOFBF 0
Description
The following three definitions are for ANSI C, which took them from System V, which stupidly took internal interface macros
and made them official arguments to setvbuf(FILE *,char *,int,size_t)
setvbuf(FILE *,char *,int,size_t)
, without renaming them. Hence, these ugly _IOxxx names are *supposed* to appear in user code.
Although these happen to match their counterparts above, the implementation does not rely on that (so these could be renumbered).
FILENAME_MAX 256
Description
P_tmpdir "/System/temp/"
Description
WIDEP_tmpdir L"/System/temp/"
Description
stdin (__stdin())
Description
stdout (__stdout())
Description
stderr (__stderr())
Description
typedef _fpos_t fpos_t;
Description
typedef struct __sFILE FILE;
Description
IMPORT_C FILE* __stdin(void);
Description
Function interface to the "constants" stdin. These functions guarantee to return a fixed value, so that it will be possible
to use expressions such as if (fp != stdout) fclose(fp); with complete confidence. Unfortunately it will rule out initialising
global variables with stdin/stdout/stderr, as in the common idiom:
static FILE *log = stderr;
This isn't currently possible with EPOC32.
Return value
IMPORT_C FILE* __stdout(void);
Description
Function interface to the "constants" stdout See __stdin
Return value
IMPORT_C FILE* __stderr(void);
Description
Function interface to the "constants" stderr See __stdin
Return value
IMPORT_C FILE* tmpfile(void);
Description
Open a temporary file. Creates a temporary binary file for update. The filename is unique to avoid any conflict with existing
files.
Return value
__sFILE __sFILE *
|
file pointer (stream) to the temporary file created. If the file can not be created a NULL pointer is returned.
|
|
IMPORT_C char* tmpnam(char *);
Description
Generate a unique temporary filename.
Parameters
char * |
Pointer to an array of bytes, where the proposed tempname will be stored.
|
|
Return value
char * |
A pointer to the string containing the proposed name for a temporary file. If NULL was specified as the buffer this points
to an internal buffer that will be overwritten the next time this function is called, otherwise it returns the buffer parameter.
If an error occurs this function returns NULL.
|
|
IMPORT_C wchar_t* wtmpnam(wchar_t *);
Description
Parameters
Return value
IMPORT_C int fclose(FILE *);
Description
Close a stream. Close the file associated with the specified stream after flushing all buffers associated with it.
Parameters
__sFILE __sFILE * |
Pointer to FILE structure specifying the stream to be closed.
|
|
Return value
int |
If the stream is successfully closed 0 is returned. If any error EOF is returned.
|
|
IMPORT_C int fflush(FILE *);
Description
Flush a stream. If the given stream has been opened for writing operations the output buffer is phisically written to the
file. If the stream was open for reading operations the content of the input buffer is cleared. The stream remains open after
this call.
Parameters
Return value
int |
On Success, a 0 value indicates success. On Failure, EOF is returned and errno may be set.
|
|
freopen(const char *,const char *,FILE *)
IMPORT_C FILE* freopen(const char *, const char *, FILE *);
Description
Reopen a stream with a different file and mode.
Parameters
const char * |
name of the file to be opened. This paramenter must follow operating system's specifications and can include a path if the
system supports it.
|
const char * |
type of access requested.
|
__sFILE __sFILE * |
pointer to open file that has to be reopened.
|
|
Return value
__sFILE __sFILE *
|
If the file has been succesfully reopened the function returns a pointer to the file. Otherwise a NULL pointer is returned.
|
|
wfreopen(const wchar_t *,const wchar_t *,FILE *)
IMPORT_C FILE* wfreopen(const wchar_t *, const wchar_t *, FILE *);
Description
Parameters
Return value
IMPORT_C void setbuf(FILE *, char *);
Description
Change stream buffering. Changes the buffer used for I/O operations with the specified stream, or, if the specified buffer
is NULL it disables buffering with the stream. This function should be called once the file associated with the stream has
been opened but before any input or output operation has been done. With buffered streams writing operations do not write
directly to the device associated with them; the data is accumulated in the buffer and written to the device as a block. All
buffers are also flushed when program terminates.
Parameters
__sFILE __sFILE * |
pointer to an open file.
|
char * |
User User allocated buffer. Must have a length of BUFSIZ bytes.
|
|
setvbuf(FILE *,char *,int,size_t)
IMPORT_C int setvbuf(FILE *, char *, int, size_t);
Description
Change stream buffering. Changes the buffer to be used for I/O operations with the specified stream. Size and mode for the
buffer can be specified. This function should be called once the file associated with the stream has been opened but before
any input or output operation has been done. The size of the buffer is specified by the size parameter, and can be any value
between 2 and 32767 in bytes, this value may be rounded down by some system due to specific alignment. buffer can be NULL.
Parameters
Return value
int |
If the buffer is correctly assigned to the file a 0 value is returned. On error, a non-zero value is returned. This can be
because an invalid type or size has been specified or because an error allocating memory (if NULL buffer was specified).
|
|
fprintf(FILE *,const char *,...)
IMPORT_C int fprintf(FILE *, const char *,...);
Description
Print formatted data to a stream. Prints to the specified stream a sequence of arguments formatted as the format argument
specifies.
Parameters
__sFILE __sFILE * |
Pointer to an open file.
|
const char * |
String that contains the text to be printed.
|
... |
|
|
Return value
int |
On success, the total number of characters printed is returned. On error, a negative number is returned.
|
|
fscanf(FILE *,const char *,...)
IMPORT_C int fscanf(FILE *, const char *,...);
Description
Read formatted data from a stream. Reads data from the current position of stream and stores it into the locations given by
argument(s). Locations pointed by each argument are filled with their corresponding type of value requested in the format
string. There must be the same number of type specifiers in format string than arguments passed.
Parameters
__sFILE __sFILE * |
Pointer to an open file.
|
const char * |
String that can contain one or more of these item: Whitespace characters: the function will read and ignore any whitespace
characters (this includes blank, newline and tab characters) encountered before the next non-whitespace character. This includes
any quantity of whitespace characters (including none). Non-whitespace characters (any character not including blank, newline,
tab, or any format specifier begining with character): this cause that the function read and discard any character that match
the given non-whitespace character. If this character is not found the function ends returning error.
|
... |
|
|
Return value
int |
The number of items succesfully read.
|
|
IMPORT_C int printf(const char *,...);
Description
Print formatted data to stdout. Prints to standard output a sequence of arguments formatted as the format argument specifies.
Parameters
const char * |
String that contains the text to be printed. Optionally it can contain format tags that are substituted by the values specified
in subsequent argument(s) and formatted as requested.
|
... |
|
|
Return value
int |
On success, the total number of characters printed is returned. On error, a negative number is returned.
|
|
IMPORT_C int scanf(const char *,...);
Description
Read formatted data from standard input. Reads data from the standard input and stores it into the locations given by argument(s).
Parameters
const char * |
String that can contain one or more of these items: Whitespace characters: the function will read and ignore any whitespace
characters (this includes blank, newline and tab characters) encountered before the next non-whitespace character. This includes
any quantity of whitespace characters (including none). Non-whitespace characters (any character not including blank, newline,
tab, or any format specifier begining with character): this cause that the function read and discard any character that match
the given non-whitespace character. If this character is not found the function ends returning error.
|
... |
|
|
Return value
int |
On Success, the number of items succesfully read. On Failure, EOF is returned and errno may be set.
|
|
sscanf(const char *,const char *,...)
IMPORT_C int sscanf(const char *, const char *,...);
Description
Read formatted data from string. Reads data from the buffer specified and stores it into the locations given by argument(s).
Locations pointed by each argument are filled with their corresponding type of value requested in the format string.
Parameters
const char * |
Buffer containing the string to be parsed for data.
|
const char * |
String that can contain one or more of these items: Whitespace characters: the function will read and ignore any whitespace
characters (this includes blank, newline and tab characters) encountered before the next non-whitespace character. This includes
any quantity of whitespace characters (including none). On-whitespace characters (any character not including blank, newline,
tab, or any format specifier begining with character): this cause that the function read and discard any character that match
the given non-whitespace character. If this character is not found the function ends returning error. Format specifiers: A
sequence of characters begining with '%' indicates that next data has to be readed and stored at the location pointed by its
corresponding argument with a given format that is specified following this prototype: [*][width][modifiers]type
|
... |
|
|
Return value
int |
On Success, The number of items succesfully read. This count doesn't include any ignored fields. On Failure, returns EOF,
if an error has occurred before the first assignation could be done and errno may be set.
|
|
vfprintf(FILE *,const char *,__e32_va_list)
IMPORT_C int vfprintf(FILE *, const char *, __e32_va_list);
Description
Parameters
Return value
vprintf(const char *,__e32_va_list)
IMPORT_C int vprintf(const char *, __e32_va_list);
Description
Parameters
Return value
vsprintf(char *,const char *,__e32_va_list)
IMPORT_C int vsprintf(char *, const char *, __e32_va_list);
Description
Parameters
char * |
Buffer where to store the resulting formatted string.
|
const char * |
String that contains the text to be printed.
|
__e32_va_list __e32_va_list
|
|
|
Return value
int |
On Success, the total number of characters printed is returned. On Failure, a negative number is returned.
|
|
IMPORT_C int fgetc(FILE *);
Description
Get the next character from a stream. Returns the next character of the stream and increases the file pointer to point to
the following one.
Parameters
Return value
int |
The character read is returned as an int value. If the End Of File has been reached or there has been an error reading, the
function returns EOF.
|
|
IMPORT_C char* fgets(char *, int, FILE *);
Description
Get a string from a stream.
Parameters
char * |
pointer to a buffer where to store data read.
|
int |
max number of bytes to be read.
|
__sFILE __sFILE * |
pointer to an open file.
|
|
Return value
char * |
On success, the string read is returned. On end-of-file or error, null pointer is returned.
|
|
IMPORT_C int fputc(int, FILE *);
Description
Write character to stream.
Parameters
int |
Character to be written. The function casts the int parameter to its unsigned char equivalent before writing it.
|
__sFILE __sFILE * |
pointer to an open file.
|
|
Return value
int |
If there are no errors the written character is returned. If an error occurs, EOF is returned.
|
|
fputs(const char *,FILE *)
IMPORT_C int fputs(const char *, FILE *);
Description
Write string to a stream. Writes string to the current position of the given stream. On error the function returns EOF.
Parameters
const char * |
Null-terminated string to be written.
|
__sFILE __sFILE * |
pointer to an open file.
|
|
Return value
IMPORT_C int getc(FILE *);
Description
Parameters
Return value
IMPORT_C int getchar(void);
Description
Get the next character from stdin.Returns the next character from the standard input.
Return value
int |
On Success, the character read is returned as an int. On Failure, returns EOF, if the 'End Of File' is reached or there has
been an error reading and errno may be set.
|
|
IMPORT_C char* gets(char *);
Description
Get a string from stdin. Reads characters from stdin and stores them into buffer until a newline (
) or EOF character is encountered.
Parameters
Return value
char * |
On success, the buffer parameter is returned. On end-of-file or error, a null pointer is returned.
|
|
IMPORT_C int putc(int, FILE *);
Description
Parameters
Return value
IMPORT_C int putchar(int);
Description
Write character to standard output. Writes character to the current position in the standard output and increases the file
pointer to point to next character. This routine cooresponds to: putc(character,stdout).
Parameters
int |
Character to be written.
|
|
Return value
int |
On Success, returns the written character. On Failure, EOF is returned and errno may be set.
|
|
IMPORT_C int puts(const char *);
Description
Outputs a string to stdout. Copies the string to standard output stream and appends a new line character (
).
Parameters
Return value
int |
On Success, a non-negative value is returned. On Failure, EOF value is returned and errno may be set.
|
|
IMPORT_C int ungetc(int, FILE *);
Description
Parameters
Return value
fread(void *,size_t,size_t,FILE *)
IMPORT_C size_t fread(void *, size_t _size, size_t _n, FILE *);
Description
Read block of data from a stream. Read count number of items each one with a size of size bytes from the stream and stores
it in the specified buffer. Stream's postion indicator is increased by the number of bytes readed. Total amount of bytes read
is (size x count).
Parameters
void * |
Pointer to the destination structure with a minimum size of (size*count) bytes.
|
size_t size_t _size |
Size in bytes of each item to be read.
|
size_t size_t _n |
Number of items, each one with a size of size bytes.
|
__sFILE __sFILE * |
pointer to an open file.
|
|
Return value
fwrite(const void *,size_t,size_t,FILE *)
IMPORT_C size_t fwrite(const void *, size_t _size, size_t _n, FILE *);
Description
Parameters
Return value
IMPORT_C int fgetpos(FILE *, fpos_t *);
Description
Get position in a stream.
Parameters
Return value
int |
0 value indicates success. non-zero value indicates error.
|
|
IMPORT_C int fseek(FILE *, long, int);
Description
Parameters
Return value
fsetpos(FILE *,const fpos_t *)
IMPORT_C int fsetpos(FILE *, const fpos_t *);
Description
Reposition file pointer to a saved location.
Parameters
__sFILE __sFILE * |
Pointer to an open file.
|
const fpos_t fpos_t * |
Position value obtained from a previous call to fgetpos that indicates the position of the file pointer at that moment.
|
|
Return value
int |
If successful the function returns 0. Otherwise it returns nonzero and sets the global variable errno to a non-zero value.
|
|
IMPORT_C long ftell(FILE *);
Description
Return the current position in a stream. Returns the current position pointed by the position indicator of the stream. When
a file has been opened in binary mode the value obtained corresponds to the number of bytes from the beginning of the file.
In files opened in text-mode this is not granted because of carriage-return translations under that mode.
Parameters
Return value
long |
On success, the current file pointer position is returned. If an error occurs -1 is returned.
|
|
IMPORT_C void rewind(FILE *);
Description
Repositions the file pointer to the beginning of a stream. Sets the file pointer associated with the stream to the beginning
of the file.
Parameters
IMPORT_C void clearerr(FILE *);
Description
Reset error indicators. Reset error and EOF indicators of the given stream.
Parameters
IMPORT_C int feof(FILE *);
Description
Check if End Of File has been reached.
Parameters
Return value
int |
A non-zero value is returned in the case that the position indicator reached the End Of File in the last input operation with
the specified stream, otherwise 0 is returned.
|
|
IMPORT_C int ferror(FILE *);
Description
Check for errors.
Parameters
Return value
int |
If there were no errors a 0 value is returned. Otherwise a non-zero value is returned .
|
|
IMPORT_C void perror(const char *);
Description
Parameters
fopen(const char *,const char *)
IMPORT_C FILE* fopen(const char *_name, const char *_type);
Description
Open a file. Opens the file which name is stored in the filename string and returns a pointer to the file (stream). Operations
allowed to the file returned are defined by the mode parameter.
Parameters
const char *_name |
name of the file to be opened. This paramenter must follow operating system's specifications and can include a path if the
system supports it.
|
const char *_type |
type of access requested
|
|
Return value
__sFILE __sFILE *
|
If the file has been succesfully opened the function will return a pointer to the file. Otherwise a NULL pointer is returned.
|
|
wfopen(const wchar_t *,const wchar_t *)
IMPORT_C FILE* wfopen(const wchar_t *_name, const wchar_t *_type);
Description
Parameters
Return value
sprintf(char *,const char *,...)
IMPORT_C int sprintf(char *, const char *,...);
Description
Print formatted data to a string. Writes a sequence of arguments to the given buffer formatted as the format argument specifies.
Parameters
char * |
Buffer where to store the resulting formatted string.
|
const char * |
String that contains the text to be printed.
|
... |
|
|
Return value
int |
On Success, the total number of characters printed is returned. On Failure, a negative number is returned.
|
|
IMPORT_C int fileno(FILE *);
Description
Routines in POSIX 1003.1.
Parameters
Return value
IMPORT_C FILE* fdopen(int, const char *);
Description
This function associates a stream with an open file descriptor. A stream is a pointer to a FILE structure that contains information
about a file. A stream permits user-controlled buffering and formatted input and output.
Parameters
int |
The open file descriptor on which to open a stream.
|
const char * |
The access mode for the stream.
|
|
Return value
__sFILE __sFILE *
|
a FILE pointer to the control block for the new stream.
|
|
wfdopen(int,const wchar_t *)
IMPORT_C FILE* wfdopen(int, const wchar_t *);
Description
A wide-character version of fdopen(int,const char *)
fdopen(int,const char *)
Parameters
Return value
IMPORT_C void _cleanup(void);
Description
Performs cleanup
popen3(const char *,const char *,char **,int)
IMPORT_C int popen3(const char *cmd, const char *mode, char **envp, int fids[3]);
Description
Gives access to the client's stdin.
Parameters
const char *cmd |
|
const char *mode |
|
char **envp |
|
int fids |
|
|
Return value
int |
On Success, returns a pointer to an open stream, used to read or write to the pipe. On Failure, return a null pointer.
|
|
wpopen3(const wchar_t *,const wchar_t *,wchar_t **,int)
IMPORT_C int wpopen3(const wchar_t *cmd, const wchar_t *mode, wchar_t **envp, int fids[3]);
Description
A wide-character version of popen3(const char *,const char *,char **,int)
popen3(const char *,const char *,char **,int)
.
Parameters
Return value