|
MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
|
Standard library module C implementation — math, string conversion, and utility functions. More...

Go to the source code of this file.
Functions | |
| static char * | mx_strdup_c (const char *s) |
| void | free_program_args (void) |
| Free the stored command-line argument memory. | |
| void | set_program_args (int argc, const char **argv) |
| Store command-line arguments for later access via argc()/argv(). | |
| int | argc (void) |
| Return the number of stored command-line arguments. | |
| const char * | argv (int idx) |
| Return the command-line argument at the given index. | |
| int64_t | float_to_int (double d) |
| double | int_to_float (int64_t i) |
| void | release (void *ptr) |
Variables | |
| static int | g_argc = 0 |
| static char ** | g_argv = NULL |
| static int | g_args_registered = 0 |
Standard library module C implementation — math, string conversion, and utility functions.
Definition in file std.c.
| int argc | ( | void | ) |
Return the number of stored command-line arguments.
Definition at line 72 of file std.c.
References g_argc.
Referenced by mx::Argz< String >::Argz(), mx::Argz< String >::initArgs(), main(), mxvm_std_argc(), mxvm_std_set_program_args(), mx::proc_args(), proc_args(), and set_program_args().
| const char * argv | ( | int | idx | ) |
Return the command-line argument at the given index.
| idx | Zero-based argument index |
Definition at line 76 of file std.c.
References g_argc, and g_argv.
Referenced by mx::Argz< String >::Argz(), action_interpret(), mx::Argz< String >::initArgs(), main(), mxvm_std_argv(), mxvm_std_set_program_args(), mx::proc_args(), proc_args(), set_program_args(), and mxvm::Program::setArgs().
| void free_program_args | ( | void | ) |
Free the stored command-line argument memory.
Definition at line 23 of file std.c.
References g_argc, and g_argv.
Referenced by mxvm_std_free_program_args(), and set_program_args().
|
static |
Definition at line 15 of file std.c.
Referenced by set_program_args().
| void set_program_args | ( | int | argc, |
| const char ** | argv ) |
Store command-line arguments for later access via argc()/argv().
Definition at line 35 of file std.c.
References argc(), argv(), free_program_args(), g_argc, g_args_registered, g_argv, and mx_strdup_c().
Referenced by mxvm_std_set_program_args().
|
static |
Definition at line 11 of file std.c.
Referenced by argc(), argv(), free_program_args(), and set_program_args().
|
static |
Definition at line 13 of file std.c.
Referenced by set_program_args().
|
static |
Definition at line 12 of file std.c.
Referenced by argv(), free_program_args(), and set_program_args().