#include #include #include #include #include // Read characters with red bytes check bool vm_rd_char(FILE *fd, size_t count, char *o) { if (!fd || !o) return false; return fread(o, sizeof(char), count, fd) == count; } // Read 16-byte uints with red bytes check bool vm_rd_u16(FILE *fd, size_t count, uint16_t *o) { if (!fd || !o) return false; return fread(o, sizeof(uint16_t), count, fd) == count; } // Read machine word-size uints with red bytes check bool vm_rd_word(FILE *fd, size_t count, size_t *o) { if (!fd || !o) return false; return fread(o, sizeof(size_t), count, fd) == count; }