Defined in rt_sys.h, the
_sys_command_string() function retrieves the command line that invoked the current application from the environment that called the application.
is a pointer to a buffer that can store the command line. It is not required that the command line is stored in
is the length of the buffer.
This function is called by the library startup code to set
argc to pass to
You must not assume that the C library is fully initialized
when this function is called. For example, you must not call
within this function. This is because the C library startup sequence
calls this function before the heap is fully configured.
The function must return either:
A pointer to the command line, if successful. This can be either a pointer to the
cmdbuffer if it is used, or a pointer to wherever else the command line is stored.
NULL, if not successful.