| 234 | } |
| 235 | |
| 236 | char * |
| 237 | newStringForKey(char *key) |
| 238 | { |
| 239 | char *val, *newstr; |
| 240 | INTN size; |
| 241 | |
| 242 | if (getValueForKey(key, &val, &size) && size) { |
| 243 | newstr = malloc(size + 1); |
| 244 | strncpy(newstr, val, size); |
| 245 | return newstr; |
| 246 | } else { |
| 247 | return 0; |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | /* parse a command line |
| 252 | * in the form: [<argument> ...] [<option>=<value> ...] |
nothing calls this directly
no test coverage detected