Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

pack.H File Reference

Go to the source code of this file.

Defines

#define UGA_PACK_DOUBLE(QUAN, BUF, COUNT)
#define UGA_PACK_NDOUBLE(QUAN, BUF, NUM, COUNT)
#define UGA_PACK_WORD(QUAN, BUF, COUNT)
#define UGA_PACK_NWORD(QUAN, BUF, NUM, COUNT)
#define UGA_PACK_BYTES(PTR, BUF, SIZE, COUNT)
#define UGA_UNPACK_DOUBLE(QUAN, BUF, COUNT)
#define UGA_UNPACK_NDOUBLE(QUAN, BUF, NUM, COUNT)
#define UGA_UNPACK_WORD(QUAN, BUF, COUNT, TYPE)
#define UGA_UNPACK_NWORD(QUAN, BUF, NUM, COUNT, TYPE)
#define UGA_UNPACK_BYTES(PTR, BUF, SIZE, COUNT)
#define UGA_PACK_LONG(Q, B, C)   UGA_PACK_WORD(Q,B,C)
#define UGA_PACK_NLONG(Q, B, N, C)   UGA_PACK_NWORD(Q,B,N,C)
#define UGA_PACK_INTEGER(Q, B, C)   UGA_PACK_WORD(Q,B,C)
#define UGA_PACK_NINTEGER(Q, B, N, C)   UGA_PACK_NWORD(Q,B,N,C)
#define UGA_PACK_ENUM(Q, B, C)   UGA_PACK_WORD(Q,B,C)
#define UGA_PACK_NENUM(Q, B, N, C)   UGA_PACK_NWORD(Q,B,N,C)
#define UGA_PACK_POINTER(Q, B, C)   UGA_PACK_WORD(Q,B,C)
#define UGA_PACK_NPOINTER(Q, B, N, C)   UGA_PACK_NWORD(Q,B,N,C)
#define UGA_UNPACK_LONG(Q, B, C)   UGA_UNPACK_WORD(Q,B,C,long)
#define UGA_UNPACK_NLONG(Q, B, N, C)   UGA_UNPACK_NWORD(Q,B,N,C,long)
#define UGA_UNPACK_INTEGER(Q, B, C)   UGA_UNPACK_WORD(Q,B,C,int)
#define UGA_UNPACK_NINTEGER(Q, B, N, C)   UGA_UNPACK_NWORD(Q,B,N,C,int)
#define UGA_UNPACK_ENUM(Q, B, C, T)   UGA_UNPACK_WORD(Q,B,C,T)
#define UGA_UNPACK_NENUM(Q, B, N, C, T)   UGA_UNPACK_NWORD(Q,B,N,C,T)
#define UGA_UNPACK_POINTER(Q, B, C, T)   UGA_UNPACK_WORD(Q,B,C,T)
#define UGA_UNPACK_NPOINTER(Q, B, N, C, T)   UGA_UNPACK_NWORD(Q,B,N,C,T)
#define OPSYS_ALIGN_CHAR   sizeof(char)
#define OPSYS_ALIGN_INT   sizeof(int)
#define OPSYS_ALIGN_SHORT   sizeof(short)
#define OPSYS_ALIGN_LONG   sizeof(long)
#define OPSYS_ALIGN_FLOAT   sizeof(float)
#define OPSYS_ALIGN_DOUBLE   sizeof(double)
#define OPSYS_ALIGN_GENERIC   (sizeof(double)>sizeof(long)?sizeof(double):sizeof(long))


Define Documentation

#define OPSYS_ALIGN_CHAR   sizeof(char)
 

#define OPSYS_ALIGN_DOUBLE   sizeof(double)
 

#define OPSYS_ALIGN_FLOAT   sizeof(float)
 

#define OPSYS_ALIGN_GENERIC   (sizeof(double)>sizeof(long)?sizeof(double):sizeof(long))
 

#define OPSYS_ALIGN_INT   sizeof(int)
 

#define OPSYS_ALIGN_LONG   sizeof(long)
 

#define OPSYS_ALIGN_SHORT   sizeof(short)
 

#define UGA_PACK_BYTES PTR,
BUF,
SIZE,
COUNT   
 

Value:

((void)bcopy((char *)(PTR),(char *)(BUF),(int)(SIZE)),  \
         BUF += (SIZE),(COUNT) += (SIZE))

#define UGA_PACK_DOUBLE QUAN,
BUF,
COUNT   
 

Value:

do { char *_buf_ = BUF, *_ptr_ = (char *)&(QUAN);       \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        (BUF) = _buf_;                      \
        (COUNT) += 8; } while (0)

#define UGA_PACK_ENUM Q,
B,
     UGA_PACK_WORD(Q,B,C)
 

#define UGA_PACK_INTEGER Q,
B,
     UGA_PACK_WORD(Q,B,C)
 

#define UGA_PACK_LONG Q,
B,
     UGA_PACK_WORD(Q,B,C)
 

#define UGA_PACK_NDOUBLE QUAN,
BUF,
NUM,
COUNT   
 

Value:

do { int _i;                        \
          for (_i=0; _i<(int)NUM; _i++)             \
               UGA_PACK_DOUBLE(QUAN[_i], BUF, COUNT); } while (0)

#define UGA_PACK_NENUM Q,
B,
N,
     UGA_PACK_NWORD(Q,B,N,C)
 

#define UGA_PACK_NINTEGER Q,
B,
N,
     UGA_PACK_NWORD(Q,B,N,C)
 

#define UGA_PACK_NLONG Q,
B,
N,
     UGA_PACK_NWORD(Q,B,N,C)
 

#define UGA_PACK_NPOINTER Q,
B,
N,
     UGA_PACK_NWORD(Q,B,N,C)
 

#define UGA_PACK_NWORD QUAN,
BUF,
NUM,
COUNT   
 

Value:

do { int _i;                        \
          for (_i=0; _i<(int)NUM; _i++)             \
                UGA_PACK_WORD(QUAN[_i], BUF, COUNT); } while (0)

#define UGA_PACK_POINTER Q,
B,
     UGA_PACK_WORD(Q,B,C)
 

#define UGA_PACK_WORD QUAN,
BUF,
COUNT   
 

Value:

do { u_long _long_ = htonl((u_long)QUAN);       \
        char *_buf_ = BUF, *_ptr_;              \
        _ptr_ = (char *)&_long_;                \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        *((_buf_)++) = *((_ptr_)++);                \
        (BUF) = _buf_;                      \
        (COUNT) += 4; } while (0)

#define UGA_UNPACK_BYTES PTR,
BUF,
SIZE,
COUNT   
 

Value:

((void)bcopy((char *)(BUF), (char *)(PTR), (int)(SIZE)),\
         BUF += (SIZE),(COUNT) += (SIZE))

#define UGA_UNPACK_DOUBLE QUAN,
BUF,
COUNT   
 

Value:

do { char *_buf_ = BUF, *_ptr_ = (char *)&(QUAN);   \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        (BUF) = _buf_;                      \
        (COUNT) += 8; } while (0)

#define UGA_UNPACK_ENUM Q,
B,
C,
     UGA_UNPACK_WORD(Q,B,C,T)
 

#define UGA_UNPACK_INTEGER Q,
B,
     UGA_UNPACK_WORD(Q,B,C,int)
 

#define UGA_UNPACK_LONG Q,
B,
     UGA_UNPACK_WORD(Q,B,C,long)
 

#define UGA_UNPACK_NDOUBLE QUAN,
BUF,
NUM,
COUNT   
 

Value:

do { int _i;                        \
          for (_i=0; _i<(int)NUM; _i++)             \
               UGA_UNPACK_DOUBLE(QUAN[_i], BUF, COUNT); } while (0)

#define UGA_UNPACK_NENUM Q,
B,
N,
C,
     UGA_UNPACK_NWORD(Q,B,N,C,T)
 

#define UGA_UNPACK_NINTEGER Q,
B,
N,
     UGA_UNPACK_NWORD(Q,B,N,C,int)
 

#define UGA_UNPACK_NLONG Q,
B,
N,
     UGA_UNPACK_NWORD(Q,B,N,C,long)
 

#define UGA_UNPACK_NPOINTER Q,
B,
N,
C,
     UGA_UNPACK_NWORD(Q,B,N,C,T)
 

#define UGA_UNPACK_NWORD QUAN,
BUF,
NUM,
COUNT,
TYPE   
 

Value:

do { int _i;                        \
          for (_i=0; _i<(int)NUM; _i++)             \
                UGA_UNPACK_WORD(QUAN, BUF, COUNT, TYPE); } while (0)

#define UGA_UNPACK_POINTER Q,
B,
C,
     UGA_UNPACK_WORD(Q,B,C,T)
 

#define UGA_UNPACK_WORD QUAN,
BUF,
COUNT,
TYPE   
 

Value:

do { char *_buf_ = BUF, *_ptr_ = (char *)&(QUAN);   \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        *((_ptr_)++) = *((_buf_)++);                \
        (BUF) = _buf_;                      \
        (QUAN) = (TYPE)ntohl((u_long)QUAN);         \
        (COUNT) += 4; } while (0)


Generated on Mon Sep 15 16:25:58 2003 for gluebase by doxygen1.2.18