| 1086 | /* ── Frontend log file (POST/GET /api/ui-log) ─────────────────── */ |
| 1087 | |
| 1088 | static int ui_log_read_file(const char *path, char *out, size_t outsz) { |
| 1089 | FILE *f = cbm_fopen(path, "rb"); |
| 1090 | if (!f) |
| 1091 | return -1; |
| 1092 | size_t n = fread(out, 1, outsz - 1, f); |
| 1093 | fclose(f); |
| 1094 | out[n] = '\0'; |
| 1095 | return (int)n; |
| 1096 | } |
| 1097 | |
| 1098 | static int ui_log_count_char(const char *s, char ch) { |
| 1099 | int n = 0; |
no test coverage detected