end of the function LibVarValue =========================================================================== Parameter: - Returns: - Changes Globals: - ===========================================================================
| 242 | // Changes Globals: - |
| 243 | //=========================================================================== |
| 244 | void LibVarSet(char *var_name, char *value) |
| 245 | { |
| 246 | libvar_t *v; |
| 247 | |
| 248 | v = LibVarGet(var_name); |
| 249 | if (v) |
| 250 | { |
| 251 | FreeMemory(v->string); |
| 252 | } //end if |
| 253 | else |
| 254 | { |
| 255 | v = LibVarAlloc(var_name); |
| 256 | } //end else |
| 257 | //variable string |
| 258 | v->string = (char *) GetMemory(strlen(value) + 1); |
| 259 | strcpy(v->string, value); |
| 260 | //the value |
| 261 | v->value = LibVarStringValue(v->string); |
| 262 | //variable is modified |
| 263 | v->modified = qtrue; |
| 264 | } //end of the function LibVarSet |
| 265 | //=========================================================================== |
| 266 | // |
| 267 | // Parameter: - |
no test coverage detected