Write a JSON file to path. Returns 0 on success. */
| 19 | |
| 20 | /* Write a JSON file to path. Returns 0 on success. */ |
| 21 | static int write_json(const char *path, const char *json) { |
| 22 | FILE *f = fopen(path, "w"); |
| 23 | if (!f) { |
| 24 | return -1; |
| 25 | } |
| 26 | fputs(json, f); |
| 27 | fclose(f); |
| 28 | return 0; |
| 29 | } |
| 30 | |
| 31 | /* ── Tests: project config ───────────────────────────────────────── */ |
| 32 |