create parameter list entry */
| 36 | |
| 37 | /* create parameter list entry */ |
| 38 | paralist *pj_mkparam(const char *str) { |
| 39 | paralist *newitem; |
| 40 | |
| 41 | if((newitem = (paralist *)malloc(sizeof(paralist) + strlen(str))) != nullptr) { |
| 42 | newitem->used = 0; |
| 43 | newitem->next = nullptr; |
| 44 | if (*str == '+') |
| 45 | ++str; |
| 46 | (void)strcpy(newitem->param, str); |
| 47 | unquote_string(newitem->param); |
| 48 | } |
| 49 | return newitem; |
| 50 | } |
| 51 | |
| 52 | |
| 53 | /* As pj_mkparam, but payload ends at first whitespace, rather than at end of <str> */ |
no test coverage detected