MCPcopy Create free account
hub / github.com/RsyncProject/rsync / map_parameter

Function map_parameter

loadparm.c:344–358  ·  view source on GitHub ↗

Map a parameter's string representation to something we can use. * Returns False if the parameter string is not recognised, else TRUE. */

Source from the content-addressed store, hash-verified

342/* Map a parameter's string representation to something we can use.
343 * Returns False if the parameter string is not recognised, else TRUE. */
344static 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

Callers 2

do_parameterFunction · 0.85
set_dparamsFunction · 0.85

Calls 2

strwiEQFunction · 0.85
rprintfFunction · 0.70

Tested by

no test coverage detected