MCPcopy Create free account
hub / github.com/Kitware/VTK / string_to_paralist

Function string_to_paralist

ThirdParty/libproj/vtklibproj/src/init.cpp:46–69  ·  view source on GitHub ↗

/

Source from the content-addressed store, hash-verified

44
45/**************************************************************************************/
46static paralist *string_to_paralist (PJ_CONTEXT *ctx, char *definition) {
47/***************************************************************************************
48 Convert a string (presumably originating from get_init_string) to a paralist.
49***************************************************************************************/
50 const char *c = definition;
51 paralist *first = nullptr, *last = nullptr;
52
53 while (*c) {
54 /* Keep a handle to the start of the list, so we have something to return */
55 auto param = pj_mkparam_ws (c, &c);
56 if (nullptr==param) {
57 free_params (ctx, first, PROJ_ERR_OTHER /*ENOMEM*/);
58 return nullptr;
59 }
60 if (nullptr==last) {
61 first = param;
62 }
63 else {
64 last->next = param;
65 }
66 last = param;
67 }
68 return first;
69}
70
71
72

Callers 1

get_initFunction · 0.85

Calls 2

pj_mkparam_wsFunction · 0.85
free_paramsFunction · 0.85

Tested by

no test coverage detected