This commit is contained in:
vrd
2023-02-25 21:52:00 +02:00
parent 222c3e43be
commit 2310343c8a
5 changed files with 46 additions and 12 deletions
+6 -3
View File
@@ -23,15 +23,18 @@
/* return lhs; */
/* } */
void init();
using fd_t = int; /* file descriptor */
struct MappedFile
{
char* data;
unsigned len;
};
MappedFile mapfile(const char* path);
void init();
MappedFile mapfile(fd_t);
fd_t openOrDie(const char* path);
template <class Vec>
void remove(Vec& vec, size_t pos) /* Remove from vector by moving the last element in its place */