MOS Source Code
Loading...
Searching...
No Matches
cmdline.c File Reference
#include <mos/lib/cmdline.h>
#include <mos_stdlib.h>
#include <mos_string.h>
+ Include dependency graph for cmdline.c:

Go to the source code of this file.

Typedefs

typedef const char **(* cmdline_insert_fn_t) (const char **result, size_t result_capacity, char *cmdline, size_t *result_count)
 

Functions

static const char ** cmdline_static_array_insert (const char **result, size_t result_capacity, char *cmdline, size_t *result_count)
 
static const char ** cmdline_dynamic_array_insert (const char **argv, size_t result_capacity, char *cmdline, size_t *result_count)
 
static bool cmdline_parse_generic (char *start, size_t length, size_t cmdline_max, size_t *out_count, const char ***argv_ptr, cmdline_insert_fn_t insert)
 
bool cmdline_parse_inplace (char *inbuf, size_t length, size_t cmdline_max, size_t *out_count, const char **out_cmdlines)
 
const char ** cmdline_parse (const char **inargv, char *inbuf, size_t length, size_t *out_count)
 
void string_unquote (char *str)
 

Typedef Documentation

◆ cmdline_insert_fn_t

typedef const char **(* cmdline_insert_fn_t) (const char **result, size_t result_capacity, char *cmdline, size_t *result_count)

Definition at line 8 of file cmdline.c.

Function Documentation

◆ cmdline_static_array_insert()

static const char ** cmdline_static_array_insert ( const char ** result,
size_t result_capacity,
char * cmdline,
size_t * result_count )
static

Definition at line 10 of file cmdline.c.

Referenced by cmdline_parse_inplace().

◆ cmdline_dynamic_array_insert()

static const char ** cmdline_dynamic_array_insert ( const char ** argv,
size_t result_capacity,
char * cmdline,
size_t * result_count )
static

Definition at line 20 of file cmdline.c.

Referenced by cmdline_parse().

+ Here is the call graph for this function:

◆ cmdline_parse_generic()

static bool cmdline_parse_generic ( char * start,
size_t length,
size_t cmdline_max,
size_t * out_count,
const char *** argv_ptr,
cmdline_insert_fn_t insert )
static

Definition at line 29 of file cmdline.c.

Referenced by cmdline_parse(), and cmdline_parse_inplace().

+ Here is the call graph for this function:

◆ cmdline_parse_inplace()

◆ cmdline_parse()

const char ** cmdline_parse ( const char ** inargv,
char * inbuf,
size_t length,
size_t * out_count )

Definition at line 98 of file cmdline.c.

Referenced by MOS_SETUP().

+ Here is the call graph for this function:

◆ string_unquote()

void string_unquote ( char * str)

Definition at line 107 of file cmdline.c.

Referenced by MOS_SETUP().

+ Here is the call graph for this function: