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