MCPcopy Create free account
hub / github.com/OpenPrinting/cups / set_variable

Method set_variable

ppdc/ppdc-source.cxx:3393–3416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3391//
3392
3393ppdcVariable * // O - Variable
3394ppdcSource::set_variable(
3395 const char *name, // I - Name
3396 const char *value) // I - Value
3397{
3398 ppdcVariable *v; // Variable
3399
3400
3401 // See if the variable exists already...
3402 v = find_variable(name);
3403 if (v)
3404 {
3405 // Change the variable value...
3406 v->set_value(value);
3407 }
3408 else
3409 {
3410 // Create a new variable and add it...
3411 v = new ppdcVariable(name, value);
3412 vars->add(v);
3413 }
3414
3415 return (v);
3416}
3417
3418
3419//

Callers 3

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 2

set_valueMethod · 0.80
addMethod · 0.80

Tested by

no test coverage detected