10 #if defined(WIN32) || defined(__unix__) 14 #if defined(aix) || defined (LYNXOS) 18 #if defined(__linux__) && !defined (__LP64__) 52 static int check_vms_out(flags, format, curr_par_num, buff_out)
54 int format, curr_par_num;
57 unsigned int input_code;
67 (
int *)buff_out -= num;
68 for( i = 0; i < num; i++)
70 cvt$convert_float((
void *)buff_out, CVT$K_VAX_F,
71 (
void *)buff_out, CVT$K_IEEE_S,
78 input_code = CVT$K_VAX_G;
80 input_code = CVT$K_VAX_D;
83 (
double *)buff_out -= num;
84 for( i = 0; i < num; i++ )
86 cvt$convert_float((
void *)buff_out, input_code,
87 (
void *)buff_out, CVT$K_IEEE_T,
89 ((
double *)buff_out)++;
98 static int check_vms_in(flags, curr_par_num, curr_par_bytes, buff_out)
100 int curr_par_num, curr_par_bytes;
103 unsigned int input_code, output_code;
109 switch(curr_par_bytes)
115 (
int *)buff_out -= num;
116 for( i = 0; i<num; i++)
118 cvt$convert_float((
void *)buff_out, CVT$K_IEEE_S,
119 (
void *)buff_out, CVT$K_VAX_F,
127 output_code = CVT$K_VAX_G;
129 output_code = CVT$K_VAX_D;
134 input_code = CVT$K_VAX_D;
137 input_code = CVT$K_VAX_G;
140 input_code = CVT$K_IEEE_T;
144 (
double *)buff_out -= num;
145 for( i = 0; i<num; i++)
147 cvt$convert_float((
void *)buff_out, input_code,
148 (
void *)buff_out, output_code,
150 ((
double *)buff_out)++;
163 if( (num = curr_bytes % item_size))
165 num = item_size - num;
172 int num = 0, pad_num = 0, curr_size = 0, curr_out = 0;
173 int next_par_bytes, curr_par_num;
177 if(buff_in != buff_out)
178 memcpy( buff_out, buff_in, (
size_t)size );
182 while(next_par_bytes)
184 curr_par_num = format_data->
par_num;
185 if((curr_size+(curr_par_num * format_data->
par_bytes))
188 curr_par_num = (size - curr_size)/format_data->
par_bytes;
191 switch(format_data->
flags & 0x3)
198 memcpy( buff_out, buff_in, (
size_t)num);
212 curr_size += pad_num;
215 memcpy( buff_out, buff_in, (
size_t)num);
229 curr_size += pad_num;
232 memcpy( buff_out, buff_in, (
size_t)num);
250 curr_size += pad_num;
253 memcpy( buff_out, buff_in, (
size_t)num);
260 check_vms_out(format_data->
flags, format, curr_par_num, buff_out);
272 int num, pad_num, curr_size = 0, curr_out = 0;
273 int next_par_bytes, curr_par_num, curr_par_bytes;
277 if(buff_in != buff_out)
278 memcpy( buff_out, buff_in, (
size_t)size );
282 while(next_par_bytes)
284 curr_par_num = format_data->
par_num;
286 if((curr_size+(curr_par_num * curr_par_bytes))
289 curr_par_num = (size - curr_size)/curr_par_bytes;
292 switch(format_data->
flags & 0x3)
297 size - curr_size, curr_par_bytes);
323 if(buff_in != buff_out)
324 memcpy( buff_out, buff_in, (
size_t)num);
389 check_vms_in(format_data->
flags, curr_par_num, curr_par_bytes, buff_out);
void _swaps_buffer(short *s2, short *s1, int n)
void dis_disable_padding()
static int check_padding(int curr_bytes, int item_size)
int copy_swap_buffer_in(FORMAT_STR *format_data, void *buff_out, void *buff_in, int size)
int copy_swap_buffer_out(int format, FORMAT_STR *format_data, void *buff_out, void *buff_in, int size)
void _swapl_buffer(int *s2, int *s1, int n)
void dic_disable_padding()
void _swapd_buffer(double *s2, double *s1, int n)
static int get_curr_bytes(int items, int bytes_left, int item_size)