GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
portable.c File Reference
#include <string.h>
#include <grass/gis.h>
#include <grass/Vect.h>
Include dependency graph for portable.c:

Go to the source code of this file.

Functions

void port_init (void)
 
int dig__fread_port_D (double *buf, int cnt, GVFILE *fp)
 
int dig__fread_port_F (float *buf, int cnt, GVFILE *fp)
 
int dig__fread_port_L (long *buf, int cnt, GVFILE *fp)
 
int dig__fread_port_I (int *buf, int cnt, GVFILE *fp)
 
int dig__fread_port_S (short *buf, int cnt, GVFILE *fp)
 
int dig__fread_port_C (char *buf, int cnt, GVFILE *fp)
 
int dig__fread_port_P (plus_t *buf, int cnt, GVFILE *fp)
 
int dig__fwrite_port_D (double *buf, int cnt, GVFILE *fp)
 
int dig__fwrite_port_F (float *buf, int cnt, GVFILE *fp)
 
int dig__fwrite_port_L (long *buf, int cnt, GVFILE *fp)
 
int dig__fwrite_port_I (int *buf, int cnt, GVFILE *fp)
 
int dig__fwrite_port_S (short *buf, int cnt, GVFILE *fp)
 
int dig__fwrite_port_P (plus_t *buf, int cnt, GVFILE *fp)
 
int dig__fwrite_port_C (char *buf, int cnt, GVFILE *fp)
 
void dig_init_portable (struct Port_info *port, int byte_order)
 
int dig_set_cur_port (struct Port_info *port)
 
int dig__byte_order_out ()
 

Variables

int nat_dbl
 
int nat_flt
 
int nat_lng
 
int nat_int
 
int nat_shrt
 
int dbl_order
 
int flt_order
 
int lng_order
 
int int_order
 
int shrt_order
 
unsigned char dbl_cnvrt [sizeof(double)]
 
unsigned char flt_cnvrt [sizeof(float)]
 
unsigned char lng_cnvrt [sizeof(long)]
 
unsigned char int_cnvrt [sizeof(int)]
 
unsigned char shrt_cnvrt [sizeof(short)]
 
struct Port_info * Cur_Head
 

Function Documentation

int dig__byte_order_out ( )
int dig__fread_port_C ( char *  buf,
int  cnt,
GVFILE *  fp 
)
int dig__fread_port_D ( double *  buf,
int  cnt,
GVFILE *  fp 
)
int dig__fread_port_F ( float *  buf,
int  cnt,
GVFILE *  fp 
)

Definition at line 106 of file portable.c.

References Cur_Head, and dig_fread().

Referenced by dig_Rd_P_node(), and main().

int dig__fread_port_I ( int buf,
int  cnt,
GVFILE *  fp 
)
int dig__fread_port_L ( long *  buf,
int  cnt,
GVFILE *  fp 
)
int dig__fread_port_P ( plus_t *  buf,
int  cnt,
GVFILE *  fp 
)
int dig__fread_port_S ( short *  buf,
int  cnt,
GVFILE *  fp 
)

Definition at line 277 of file portable.c.

References Cur_Head, dig_fread(), nat_shrt, and shrt_order.

Referenced by main().

int dig__fwrite_port_C ( char *  buf,
int  cnt,
GVFILE *  fp 
)
int dig__fwrite_port_D ( double *  buf,
int  cnt,
GVFILE *  fp 
)
int dig__fwrite_port_F ( float *  buf,
int  cnt,
GVFILE *  fp 
)

Definition at line 396 of file portable.c.

References Cur_Head, and dig_fwrite().

Referenced by dig_Wr_P_node(), and main().

int dig__fwrite_port_I ( int buf,
int  cnt,
GVFILE *  fp 
)
int dig__fwrite_port_L ( long *  buf,
int  cnt,
GVFILE *  fp 
)
int dig__fwrite_port_P ( plus_t *  buf,
int  cnt,
GVFILE *  fp 
)
int dig__fwrite_port_S ( short *  buf,
int  cnt,
GVFILE *  fp 
)

Definition at line 508 of file portable.c.

References Cur_Head, dig_fwrite(), nat_shrt, and shrt_order.

Referenced by main(), and V1__rewrite_line_nat().

void port_init ( void  )

Variable Documentation

unsigned char dbl_cnvrt[sizeof(double)]

Definition at line 91 of file port_init.c.

Referenced by dig_init_portable(), main(), and port_init().

int dbl_order

Definition at line 85 of file port_init.c.

Referenced by dig__byte_order_out(), dig_init_portable(), main(), and port_init().

unsigned char flt_cnvrt[sizeof(float)]

Definition at line 92 of file port_init.c.

Referenced by dig_init_portable(), main(), and port_init().

int flt_order

Definition at line 86 of file port_init.c.

Referenced by dig_init_portable(), main(), and port_init().

unsigned char int_cnvrt[sizeof(int)]

Definition at line 94 of file port_init.c.

Referenced by dig_init_portable(), main(), and port_init().

int int_order

Definition at line 88 of file port_init.c.

Referenced by dig__fread_port_I(), dig__fwrite_port_I(), dig_init_portable(), main(), and port_init().

unsigned char lng_cnvrt[sizeof(long)]

Definition at line 93 of file port_init.c.

Referenced by dig_init_portable(), main(), and port_init().

int lng_order

Definition at line 87 of file port_init.c.

Referenced by dig__fread_port_L(), dig__fwrite_port_L(), dig_init_portable(), main(), and port_init().

int nat_dbl

Definition at line 79 of file port_init.c.

Referenced by main(), and port_init().

int nat_flt

Definition at line 80 of file port_init.c.

Referenced by main(), and port_init().

int nat_int

Definition at line 82 of file port_init.c.

Referenced by dig__fread_port_I(), dig__fwrite_port_I(), main(), and port_init().

int nat_lng

Definition at line 81 of file port_init.c.

Referenced by dig__fread_port_L(), dig__fwrite_port_L(), main(), and port_init().

int nat_shrt

Definition at line 83 of file port_init.c.

Referenced by dig__fread_port_S(), dig__fwrite_port_S(), main(), and port_init().

unsigned char shrt_cnvrt[sizeof(short)]

Definition at line 95 of file port_init.c.

Referenced by dig_init_portable(), main(), and port_init().

int shrt_order

Definition at line 89 of file port_init.c.

Referenced by dig__fread_port_S(), dig__fwrite_port_S(), dig_init_portable(), main(), and port_init().