Rearrange project files.

This commit is contained in:
2026-08-06 20:16:40 +01:00
parent 9841c2cf15
commit 0720a254a3
22 changed files with 16 additions and 70 deletions
+4
View File
@@ -0,0 +1,4 @@
#pragma once
#include "internal/vase/vase.h"
#include "pch.h"
View File
@@ -4,7 +4,6 @@
#include "buffer/original.h"
#include "constants.h"
#include "pch.h"
#include "utils/utils.h"
struct Shard {
enum struct Kind : uint8_t {
@@ -7,7 +7,6 @@
#include "pch.h"
#include "search.h"
#include "shard.h"
#include "utils/utils.h"
struct Point {
uint64_t row;
-38
View File
@@ -1,38 +0,0 @@
#pragma once
#include "pch.h"
inline int read_file(const char *path, char **text, uint32_t *len) {
FILE *f = fopen(path, "rb");
if (!f)
return 0;
fseek(f, 0, SEEK_END);
long size = ftell(f);
fseek(f, 0, SEEK_SET);
if (size < 0 || size > UINT32_MAX) {
fclose(f);
return 0;
}
*len = (uint32_t)size;
*text = (char *)malloc(*len + 1);
if (!*text) {
fclose(f);
return 0;
}
size_t read = fread(*text, 1, *len, f);
fclose(f);
if (read != *len) {
free(*text);
*text = nullptr;
*len = 0;
return 0;
}
return 1;
}