#include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE *file;
off_t data_offset;
uintmax_t block_indices_low[] = { 20, 30, 40 };
uintmax_t block_indices_high[] = { 50, 60, 70 };
void *block;
file = fopen("input.gta", "r");
if (!file) {
return 1;
}
return 1;
}
return 1;
}
data_offset = ftello(file);
if (data_offset == -1) {
return 1;
}
block = malloc(31 * 31 * 31 * sizeof(uint16_t));
if (!block) {
return 1;
}
block_indices_low, block_indices_high, block, file);
return 1;
}
free(block);
fclose(file);
return 0;
}
gta_result_t
GTA result type.
Definition gta.h:213
@ GTA_OK
Success / no error.
Definition gta.h:214
void gta_destroy_header(gta_header_t *restrict header)
Destroy a GTA header structure and free its resources.
gta_result_t gta_read_block_from_stream(const gta_header_t *restrict header, intmax_t data_offset, const uintmax_t *restrict lower_coordinates, const uintmax_t *restrict higher_coordinates, void *restrict block, FILE *restrict f)
Read an array block from a stream.
struct gta_internal_header_struct gta_header_t
The GTA header type.
Definition gta.h:193
gta_result_t gta_create_header(gta_header_t *restrict *restrict header)
Create a new GTA header structure and initialize it.
gta_result_t gta_read_header_from_stream(gta_header_t *restrict header, FILE *restrict f)
Read a GTA header from a stream.