Lines Matching refs:sv
16 static void _strvec_init(struct lwp_string_vector *sv) in _strvec_init() argument
19 sv->strvec = rt_malloc(DEFAUTL_ARGV_BUFLEN * sizeof(char *)); in _strvec_init()
20 sv->strvec_buflen = DEFAUTL_ARGV_BUFLEN; in _strvec_init()
21 sv->string_count = 0; in _strvec_init()
24 static void _strvec_detach(struct lwp_string_vector *sv) in _strvec_detach() argument
26 if (sv->strvec) in _strvec_detach()
28 rt_free(sv->strvec); in _strvec_detach()
32 static rt_err_t _strvec_append(struct lwp_string_vector *sv, const char *string) in _strvec_append() argument
34 if (sv->string_count == sv->strvec_buflen) in _strvec_append()
37 newptr = rt_realloc(sv->strvec, sv->strvec_buflen * 2 * sizeof(char *)); in _strvec_append()
40 sv->strvec = newptr; in _strvec_append()
41 sv->strvec_buflen *= 2; in _strvec_append()
44 sv->strvec[sv->string_count++] = string; in _strvec_append()