Map a parameter's string representation to something we can use. * Returns False if the parameter string is not recognised, else TRUE. */
| 342 | /* Map a parameter's string representation to something we can use. |
| 343 | * Returns False if the parameter string is not recognised, else TRUE. */ |
| 344 | static int map_parameter(char *parmname) |
| 345 | { |
| 346 | int iIndex; |
| 347 | |
| 348 | if (*parmname == '-') |
| 349 | return -1; |
| 350 | |
| 351 | for (iIndex = 0; parm_table[iIndex].label; iIndex++) { |
| 352 | if (strwiEQ(parm_table[iIndex].label, parmname)) |
| 353 | return iIndex; |
| 354 | } |
| 355 | |
| 356 | rprintf(FLOG, "Unknown Parameter encountered: \"%s\"\n", parmname); |
| 357 | return -1; |
| 358 | } |
| 359 | |
| 360 | /* Set a boolean variable from the text value stored in the passed string. |
| 361 | * Returns True in success, False if the passed string does not correctly |
no test coverage detected