47static char *buffer =
NULL;
48static int buf_alloced = 0;
50static int buf_alloc(
int needed)
83 unsigned char *
c1, *
c2;
97 c1 = (
unsigned char *)buffer;
98 c2 = (
unsigned char *)buf;
99 for (i = 0; i <
cnt; i++) {
127 unsigned char *
c1, *
c2;
141 c1 = (
unsigned char *)buffer;
142 c2 = (
unsigned char *)buf;
143 for (i = 0; i <
cnt; i++) {
172 unsigned char *
c1, *
c2;
189 c1 = (
unsigned char *)buffer;
190 c2 = (
unsigned char *)buf;
191 for (i = 0; i <
cnt; i++) {
223 c1 = (
unsigned char *)buffer;
224 c2 = (
unsigned char *)buf;
225 for (i = 0; i <
cnt; i++) {
266 unsigned char *
c1, *
c2;
283 c1 = (
unsigned char *)buffer;
284 c2 = (
unsigned char *)buf;
285 for (i = 0; i <
cnt; i++) {
311 c1 = (
unsigned char *)buffer;
312 c2 = (
unsigned char *)buf;
313 for (i = 0; i <
cnt; i++) {
349 unsigned char *
c1, *
c2;
366 c1 = (
unsigned char *)buffer;
367 c2 = (
unsigned char *)buf;
368 for (i = 0; i <
cnt; i++) {
394 c1 = (
unsigned char *)buffer;
395 c2 = (
unsigned char *)buf;
396 for (i = 0; i <
cnt; i++) {
432 unsigned char *
c1, *
c2;
449 c1 = (
unsigned char *)buffer;
450 c2 = (
unsigned char *)buf;
451 for (i = 0; i <
cnt; i++) {
477 c1 = (
unsigned char *)buffer;
478 c2 = (
unsigned char *)buf;
479 for (i = 0; i <
cnt; i++) {
562 unsigned char *
c1, *
c2;
570 c1 = (
unsigned char *)buf;
571 c2 = (
unsigned char *)buffer;
572 for (i = 0; i <
cnt; i++) {
600 unsigned char *
c1, *
c2;
608 c1 = (
unsigned char *)buf;
609 c2 = (
unsigned char *)buffer;
610 for (i = 0; i <
cnt; i++) {
640 unsigned char *
c1, *
c2;
649 c1 = (
unsigned char *)buf;
650 c2 = (
unsigned char *)buffer;
651 for (i = 0; i <
cnt; i++) {
671 c1 = (
unsigned char *)buf;
672 c2 = (
unsigned char *)buffer;
673 for (i = 0; i <
cnt; i++) {
706 unsigned char *
c1, *
c2;
715 c1 = (
unsigned char *)buf;
716 c2 = (
unsigned char *)buffer;
717 for (i = 0; i <
cnt; i++) {
731 c1 = (
unsigned char *)buf;
732 c2 = (
unsigned char *)buffer;
733 for (i = 0; i <
cnt; i++) {
761 unsigned char *
c1, *
c2;
770 c1 = (
unsigned char *)buf;
771 c2 = (
unsigned char *)buffer;
772 for (i = 0; i <
cnt; i++) {
786 c1 = (
unsigned char *)buf;
787 c2 = (
unsigned char *)buffer;
788 for (i = 0; i <
cnt; i++) {
816 unsigned char *
c1, *
c2;
825 c1 = (
unsigned char *)buf;
826 c2 = (
unsigned char *)buffer;
827 for (i = 0; i <
cnt; i++) {
841 c1 = (
unsigned char *)buf;
842 c2 = (
unsigned char *)buffer;
843 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.