mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-30 19:01:02 -07:00
C-library Finished setting up header dependencies (
This commit is contained in:
@ -194,6 +194,7 @@ b32 file_read_at( FileInfo* file, void* buffer, ssize size, s64 offset );
|
||||
*/
|
||||
b32 file_read_at_check( FileInfo* file, void* buffer, ssize size, s64 offset, ssize* bytes_read );
|
||||
|
||||
typedef struct FileContents FileContents;
|
||||
struct FileContents
|
||||
{
|
||||
AllocatorInfo allocator;
|
||||
@ -201,8 +202,8 @@ struct FileContents
|
||||
ssize size;
|
||||
};
|
||||
|
||||
constexpr b32 zero_terminate = true;
|
||||
constexpr b32 no_zero_terminate = false;
|
||||
constexpr b32 file_zero_terminate = true;
|
||||
constexpr b32 file_no_zero_terminate = false;
|
||||
|
||||
/**
|
||||
* Reads the whole file contents
|
||||
|
@ -13,7 +13,7 @@ CodeBody gen_ecode( char const* path )
|
||||
char scratch_mem[kilobytes(1)];
|
||||
Arena scratch = arena_init_from_memory( scratch_mem, sizeof(scratch_mem) );
|
||||
|
||||
file_read_contents( arena_allocator_info( & scratch), zero_terminate, path );
|
||||
file_read_contents( arena_allocator_info( & scratch), file_zero_terminate, path );
|
||||
|
||||
CSV_Object csv_nodes;
|
||||
csv_parse( &csv_nodes, scratch_mem, GlobalAllocator, false );
|
||||
@ -63,7 +63,7 @@ CodeBody gen_eoperator( char const* path )
|
||||
char scratch_mem[kilobytes(4)];
|
||||
Arena scratch = arena_init_from_memory( scratch_mem, sizeof(scratch_mem) );
|
||||
|
||||
file_read_contents( arena_allocator_info(& scratch), zero_terminate, path );
|
||||
file_read_contents( arena_allocator_info(& scratch), file_zero_terminate, path );
|
||||
|
||||
CSV_Object csv_nodes;
|
||||
csv_parse( &csv_nodes, scratch_mem, GlobalAllocator, false );
|
||||
@ -119,7 +119,7 @@ CodeBody gen_especifier( char const* path )
|
||||
char scratch_mem[kilobytes(4)];
|
||||
Arena scratch = arena_init_from_memory( scratch_mem, sizeof(scratch_mem) );
|
||||
|
||||
file_read_contents( arena_allocator_info(& scratch), zero_terminate, path );
|
||||
file_read_contents( arena_allocator_info(& scratch), file_zero_terminate, path );
|
||||
|
||||
CSV_Object csv_nodes;
|
||||
csv_parse( &csv_nodes, scratch_mem, GlobalAllocator, false );
|
||||
@ -226,12 +226,12 @@ CodeBody gen_etoktype( char const* etok_path, char const* attr_path )
|
||||
|
||||
AllocatorInfo scratch_info = arena_allocator_info(& scratch);
|
||||
|
||||
FileContents enum_content = file_read_contents( scratch_info, zero_terminate, etok_path );
|
||||
FileContents enum_content = file_read_contents( scratch_info, file_zero_terminate, etok_path );
|
||||
|
||||
CSV_Object csv_enum_nodes;
|
||||
csv_parse( &csv_enum_nodes, rcast(char*, enum_content.data), GlobalAllocator, false );
|
||||
|
||||
FileContents attrib_content = file_read_contents( scratch_info, zero_terminate, attr_path );
|
||||
FileContents attrib_content = file_read_contents( scratch_info, file_zero_terminate, attr_path );
|
||||
|
||||
CSV_Object csv_attr_nodes;
|
||||
csv_parse( &csv_attr_nodes, rcast(char*, attrib_content.data), GlobalAllocator, false );
|
||||
|
Reference in New Issue
Block a user