#include <nitro/os.h>
cosnt char* OS_GetArgv( int n );
n | Index number of the argument string to be retrieved |
The pointer to the current argument string.
Retrieves the argument string that has the specified index from the argument data embedded in the ROM file.
For NITRO ROMs, arguments are embedded as argument data in the ROM file with the buryarg
tool. For TWL ROMs, arguments are embedded as argument data in the ROM file with the buryarg.TWL
tool. This function gets a pointer to the string with the specified index in these arguments. The program name (the name of the ROM file specified when either buryarg
or buryarg.TWL
was run) corresponds to index 0, the first argument is the data in index 1, the second argument is the data in index 2, and so on.
If you specify a value for n that is greater than any value that the OS_GetArgc
function can get, this function returns NULL
. If you specify a negative number, operations are undefined.
This function always returns NULL
for FINALROM builds, regardless of the value specified for n.
Example:
Ifburyarg main.srl test 1 2 3
is specified, the result will be as follows:
OS_GetArgc() ... 4
OS_GetArgv( 0 ) ... main.srl
OS_GetArgv( 1 ) ... test
OS_GetArgv( 2 ) ... 1
OS_GetArgv( 3 ) ... 2
OS_GetArgv( 4 ) ... 3
OS_GetArgv( 5 ) ... NULL
(The same is true withburyarg.TWL
.)
OS_GetArgc
OS_GetOpt
buryarg
Tool
buryarg.TWL
Tool
2008/06/23 Split into separate cases for NITRO and TWL.
2005/07/21 Initial version.
CONFIDENTIAL