feat/api #46

Open
Gregor Weiss wants to merge 56 commits from feat/api into main
Showing only changes of commit e101bd2404 - Show all commits

View file

@ -619,7 +619,7 @@ eas3_add_param_name(eas3_data *const data, char *name)
{ {
eas3_param_names *param_names; eas3_param_names *param_names;
assert(data); assert(data);
param_names = &data->param_names; param_names = data->param_names;
/*--------------------------------------------------------*\ /*--------------------------------------------------------*\
! Check if the specified parameter name has the proper ! ! Check if the specified parameter name has the proper !
! length. ! ! length. !
@ -832,24 +832,24 @@ read_eas3_header(FILE *const fp, eas3_data *const data)
! Emit the standard parameters to the auxiliary informa- ! ! Emit the standard parameters to the auxiliary informa- !
! tion information memory block. ! ! tion information memory block. !
\*--------------------------------------------------------*/ \*--------------------------------------------------------*/
emit_chunck(aux, (uchar*)params, 176); eas3_emit_chunck(aux, (uchar*)params, 176);
/*--------------------------------------------------------*\ /*--------------------------------------------------------*\
! Convert the parameters required for the bwc compression ! ! Convert the parameters required for the bwc compression !
! stage to little endian and store them in the file info ! ! stage to little endian and store them in the file info !
! structure. ! ! structure. !
\*--------------------------------------------------------*/ \*--------------------------------------------------------*/
endian_conversion(params->nts, 8); endian_conversion(&params->nts, 8);
endian_conversion(params->npar, 8); endian_conversion(&params->npar, 8);
endian_conversion(params->ndim1, 8); endian_conversion(&params->ndim1, 8);
endian_conversion(params->ndim2, 8); endian_conversion(&params->ndim2, 8);
endian_conversion(params->ndim3, 8); endian_conversion(&params->ndim3, 8);
endian_conversion(params->accuracy, 8); endian_conversion(&params->accuracy, 8);
if(params->accuracy != 1 && params->accuracy != 2) if(params->accuracy != 1 && params->accuracy != 2)
{ {
fprintf(stderr, "o##########################################################o\n"\ fprintf(stderr, "o##########################################################o\n"\
@ -863,14 +863,14 @@ read_eas3_header(FILE *const fp, eas3_data *const data)
! Convert the size parameters, used to load the rest of the! ! Convert the size parameters, used to load the rest of the!
! header, to little endian. ! ! header, to little endian. !
\*--------------------------------------------------------*/ \*--------------------------------------------------------*/
endian_conversion(params->size_time, 8); endian_conversion(&params->size_time, 8);
endian_conversion(params->size_parameter, 8); endian_conversion(&params->size_parameter, 8);
endian_conversion(params->size_dim1, 8); endian_conversion(&params->size_dim1, 8);
endian_conversion(params->size_dim2, 8); endian_conversion(&params->size_dim2, 8);
endian_conversion(params->size_dim3, 8); endian_conversion(&params->size_dim3, 8);
endian_conversion(params->udef_char_size, 8); endian_conversion(&params->udef_char_size, 8);
endian_conversion(params->udef_int_size, 8); endian_conversion(&params->udef_int_size, 8);
endian_conversion(params->udef_real_size, 8); endian_conversion(&params->udef_real_size, 8);
/*--------------------------------------------------------*\ /*--------------------------------------------------------*\
! Allocate the time step array. If successful, read the ! ! Allocate the time step array. If successful, read the !