| 75 | } |
| 76 | |
| 77 | static int jl_write(const char *path, const char *content) { |
| 78 | FILE *file = cbm_fopen(path, "wb"); |
| 79 | if (!file) { |
| 80 | return -1; |
| 81 | } |
| 82 | size_t length = strlen(content); |
| 83 | size_t written = fwrite(content, 1U, length, file); |
| 84 | int close_result = fclose(file); |
| 85 | return written == length && close_result == 0 ? 0 : -1; |
| 86 | } |
| 87 | |
| 88 | static char *jl_read(const char *path) { |
| 89 | FILE *file = cbm_fopen(path, "rb"); |
no test coverage detected