|Non-Confidential||PDF version||ARM DUI0472J|
|Home > Standard C Implementation Definition > Environment|
Describes implementation-defined aspects of the ARM C compiler and C library relating to environment, as required by the ISO C standard requires.
The mapping of a command line from the ARM architecture-based
environment into arguments to
main() is implementation-specific.
The generic ARM C library supports the following:
The arguments given to
main() are the
words of the command line not including input/output redirections,
delimited by whitespace, except where the whitespace is contained
in double quotes.
A whitespace character is any
character where the result of
A double quote or backslash character
double quotes must be preceded by a backslash character.
An input/output redirection is not recognized inside double quotes.
In a nonhosted implementation of the ARM C library, the term interactive
device might be meaningless. The generic ARM C library
supports a pair of devices, both called
intended to handle keyboard input and VDU screen output. In the
No buffering is done on any
stream connected to
:tt unless input/output redirection
If input/output redirection other than to
occurred, full file buffering is used except that line buffering
is used if both
redirected to the same file.
Using the generic ARM C library, the standard input, output
and error streams can be redirected at runtime. For example, if
a program running on a host debugger that copies the standard input
to the standard output, the following line runs the program:
mycopy < infile > outfile 2> errfile
and redirects the files as follows:
The standard input stream is redirected to
The standard output stream is redirected to
The standard error stream is redirected to
The permitted redirections are:
stderr to the same place
stderr on the target, you must define:
File redirection is done only if either:
The invoking operating system supports it.
The program reads and writes characters and has
not replaced the C library functions