| 3391 | // |
| 3392 | |
| 3393 | ppdcVariable * // O - Variable |
| 3394 | ppdcSource::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 | // |