| 417 | /* ── Environment helpers ────────────────────────────────────────────────── */ |
| 418 | |
| 419 | static char *ws_env_save(const char *name) { |
| 420 | const char *value = getenv(name); |
| 421 | return value ? strdup(value) : NULL; |
| 422 | } |
| 423 | |
| 424 | static void ws_env_restore(const char *name, char *saved) { |
| 425 | if (saved) { |