45static char *buffer =
NULL;
46static int buf_alloced = 0;
48static int buf_alloc(
int needed)
81 unsigned char *
c1, *
c2;
95 c1 = (
unsigned char *)buffer;
96 c2 = (
unsigned char *)buf;
97 for (i = 0; i <
cnt; i++) {
125 unsigned char *
c1, *
c2;
139 c1 = (
unsigned char *)buffer;
140 c2 = (
unsigned char *)buf;
141 for (i = 0; i <
cnt; i++) {
170 unsigned char *
c1, *
c2;
187 c1 = (
unsigned char *)buffer;
188 c2 = (
unsigned char *)buf;
189 for (i = 0; i <
cnt; i++) {
221 c1 = (
unsigned char *)buffer;
222 c2 = (
unsigned char *)buf;
223 for (i = 0; i <
cnt; i++) {
264 unsigned char *
c1, *
c2;
281 c1 = (
unsigned char *)buffer;
282 c2 = (
unsigned char *)buf;
283 for (i = 0; i <
cnt; i++) {
309 c1 = (
unsigned char *)buffer;
310 c2 = (
unsigned char *)buf;
311 for (i = 0; i <
cnt; i++) {
347 unsigned char *
c1, *
c2;
364 c1 = (
unsigned char *)buffer;
365 c2 = (
unsigned char *)buf;
366 for (i = 0; i <
cnt; i++) {
392 c1 = (
unsigned char *)buffer;
393 c2 = (
unsigned char *)buf;
394 for (i = 0; i <
cnt; i++) {
430 unsigned char *
c1, *
c2;
447 c1 = (
unsigned char *)buffer;
448 c2 = (
unsigned char *)buf;
449 for (i = 0; i <
cnt; i++) {
475 c1 = (
unsigned char *)buffer;
476 c2 = (
unsigned char *)buf;
477 for (i = 0; i <
cnt; i++) {
560 unsigned char *
c1, *
c2;
568 c1 = (
unsigned char *)buf;
569 c2 = (
unsigned char *)buffer;
570 for (i = 0; i <
cnt; i++) {
598 unsigned char *
c1, *
c2;
606 c1 = (
unsigned char *)buf;
607 c2 = (
unsigned char *)buffer;
608 for (i = 0; i <
cnt; i++) {
638 unsigned char *
c1, *
c2;
647 c1 = (
unsigned char *)buf;
648 c2 = (
unsigned char *)buffer;
649 for (i = 0; i <
cnt; i++) {
669 c1 = (
unsigned char *)buf;
670 c2 = (
unsigned char *)buffer;
671 for (i = 0; i <
cnt; i++) {
704 unsigned char *
c1, *
c2;
713 c1 = (
unsigned char *)buf;
714 c2 = (
unsigned char *)buffer;
715 for (i = 0; i <
cnt; i++) {
729 c1 = (
unsigned char *)buf;
730 c2 = (
unsigned char *)buffer;
731 for (i = 0; i <
cnt; i++) {
759 unsigned char *
c1, *
c2;
768 c1 = (
unsigned char *)buf;
769 c2 = (
unsigned char *)buffer;
770 for (i = 0; i <
cnt; i++) {
784 c1 = (
unsigned char *)buf;
785 c2 = (
unsigned char *)buffer;
786 for (i = 0; i <
cnt; i++) {
814 unsigned char *
c1, *
c2;
823 c1 = (
unsigned char *)buf;
824 c2 = (
unsigned char *)buffer;
825 for (i = 0; i <
cnt; i++) {
839 c1 = (
unsigned char *)buf;
840 c2 = (
unsigned char *)buffer;
841 for (i = 0; i <
cnt; i++) {
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
#define PORT_DOUBLE
Sizes of types used in portable format (different names used in Vlib/ and diglib/ for the same thing)
size_t dig_fwrite(const void *ptr, size_t size, size_t nmemb, struct gvfile *file)
Write struct gvfile.
size_t dig_fread(void *ptr, size_t size, size_t nmemb, struct gvfile *file)
Read struct gvfile.
void * dig__alloc_space(int, int *, int, void *, int)
int dig_out_of_memory(void)
For now just print message and return error code.
#define ENDIAN_LITTLE
Endian check.
int dig__fread_port_S(short *buf, size_t cnt, struct gvfile *fp)
Read shorts from the Portable Vector Format.
unsigned char flt_cnvrt[sizeof(float)]
int dig__fwrite_port_F(const float *buf, size_t cnt, struct gvfile *fp)
Write floats to the Portable Vector Format.
int dig__fread_port_O(off_t *buf, size_t cnt, struct gvfile *fp, size_t port_off_t_size)
Read off_ts from the Portable Vector Format.
int dig__fread_port_D(double *buf, size_t cnt, struct gvfile *fp)
Read doubles from the Portable Vector Format.
int dig__fread_port_C(char *buf, size_t cnt, struct gvfile *fp)
Read chars from the Portable Vector Format.
int dig__byte_order_out(void)
Get byte order.
int dig__fread_port_L(long *buf, size_t cnt, struct gvfile *fp)
Read longs from the Portable Vector Format.
unsigned char dbl_cnvrt[sizeof(double)]
int dig__fread_port_P(plus_t *buf, size_t cnt, struct gvfile *fp)
Read plus_t from the Portable Vector Format.
unsigned char lng_cnvrt[sizeof(long)]
int dig__fwrite_port_S(const short *buf, size_t cnt, struct gvfile *fp)
Write shorts to the Portable Vector Format.
int dig__fwrite_port_I(const int *buf, size_t cnt, struct gvfile *fp)
Write integers to the Portable Vector Format.
int dig__fwrite_port_D(const double *buf, size_t cnt, struct gvfile *fp)
Write doubles to the Portable Vector Format.
unsigned char off_t_cnvrt[sizeof(off_t)]
struct Port_info * Cur_Head
int dig__fread_port_I(int *buf, size_t cnt, struct gvfile *fp)
Read integers from the Portable Vector Format.
void dig_init_portable(struct Port_info *port, int byte_order)
Set Port_info structure to byte order of file.
unsigned char shrt_cnvrt[sizeof(short)]
int dig_set_cur_port(struct Port_info *port)
Set current Port_info structure.
int dig__fwrite_port_C(const char *buf, size_t cnt, struct gvfile *fp)
Write chars to the Portable Vector Format.
void port_init(void)
Initialize Port_info structures.
int dig__fwrite_port_O(const off_t *buf, size_t cnt, struct gvfile *fp, size_t port_off_t_size)
Write off_ts to the Portable Vector Format.
int dig__fwrite_port_L(const long *buf, size_t cnt, struct gvfile *fp)
Write longs to the Portable Vector Format.
unsigned char int_cnvrt[sizeof(int)]
int dig__fread_port_F(float *buf, size_t cnt, struct gvfile *fp)
Read floats from the Portable Vector Format.
int dig__fwrite_port_P(const plus_t *buf, size_t cnt, struct gvfile *fp)
Write plus_t to the Portable Vector Format.
unsigned char flt_cnvrt[PORT_FLOAT]
Conversion matrices between file and native byte order (float)
int flt_quick
Quick reading flag for float.
unsigned char lng_cnvrt[PORT_LONG]
Conversion matrices between file and native byte order (long)
int dbl_quick
Quick reading flag for double.
unsigned char off_t_cnvrt[PORT_OFF_T]
Conversion matrices between file and native byte order (off_t)
unsigned char int_cnvrt[PORT_INT]
Conversion matrices between file and native byte order (int)
int off_t_quick
Quick reading flag for off_t.
int lng_quick
Quick reading flag for long.
int int_quick
Quick reading flag for int.
unsigned char shrt_cnvrt[PORT_SHORT]
Conversion matrices between file and native byte order (short)
unsigned char dbl_cnvrt[PORT_DOUBLE]
Conversion matrices between file and native byte order (double)
int shrt_quick
Quick reading flag for short.
int byte_order
File byte order.