BRL-CAD
#include "common.h"
#include <stddef.h>
#include "bu/defines.h"
Include dependency graph for cv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SIZEOF_NETWORK_SHORT   2 /* htons(), bu_gshort(), bu_pshort() */
 
#define SIZEOF_NETWORK_LONG   4 /* htonl(), bu_glong(), bu_plong() */
 
#define SIZEOF_NETWORK_FLOAT   4 /* htonf() */
 
#define SIZEOF_NETWORK_DOUBLE   8 /* htond() */
 
#define CV_CHANNEL_MASK   0x00ff
 
#define CV_HOST_MASK   0x0100
 
#define CV_SIGNED_MASK   0x0200
 
#define CV_TYPE_MASK   0x1c00 /* 0001 1100 0000 0000 */
 
#define CV_CONVERT_MASK   0x6000 /* 0110 0000 0000 0000 */
 
#define CV_TYPE_SHIFT   10
 
#define CV_CONVERT_SHIFT   13
 
#define CV_8   0x0400
 
#define CV_16   0x0800
 
#define CV_32   0x0c00
 
#define CV_64   0x1000
 
#define CV_D   0x1400
 
#define CV_CLIP   0x0000
 
#define CV_NORMAL   0x2000
 
#define CV_LIT   0x4000
 
#define END_NOTSET   0
 
#define END_BIG   1 /* PowerPC/MIPS */
 
#define END_LITTLE   2 /* Intel */
 
#define END_ILL   3 /* PDP-11 */
 
#define END_CRAY   4 /* Old Cray */
 
#define IND_NOTSET   0
 
#define IND_BIG   1
 
#define IND_LITTLE   2
 
#define IND_ILL   3
 
#define IND_CRAY   4
 
#define ntohll(_val)
 
#define htonll(_val)   ntohll(_val)
 
#define BU_GLONGLONG(_cp)
 
#define BU_GLONG(_cp)
 
#define BU_GSHORT(_cp)
 

Functions

size_t bu_cv (void *out, char *outfmt, size_t size, void *in, char *infmt, size_t count)
 
int bu_cv_cookie (const char *in)
 
int bu_cv_optimize (int cookie)
 
size_t bu_cv_itemlen (int cookie)
 
size_t bu_cv_w_cookie (void *out, int outcookie, size_t size, void *in, int incookie, size_t count)
 
signed char * bu_b64_encode (const signed char *input)
 
signed char * bu_b64_encode_block (const signed char *input, size_t length_in)
 
int bu_b64_decode (signed char **output_buffer, const signed char *input)
 
int bu_b64_decode_block (signed char **output_buffer, const signed char *input, size_t length_in)
 
void bu_cv_htond (unsigned char *out, const unsigned char *in, size_t count)
 
void bu_cv_ntohd (unsigned char *out, const unsigned char *in, size_t count)
 
void bu_cv_htonf (unsigned char *out, const unsigned char *in, size_t count)
 
void bu_cv_ntohf (unsigned char *out, const unsigned char *in, size_t count)
 
size_t bu_cv_ntohss (signed short *in, size_t count, void *out, size_t size)
 
size_t bu_cv_ntohus (unsigned short *, size_t, void *, size_t)
 
size_t bu_cv_ntohsl (signed long int *, size_t, void *, size_t)
 
size_t bu_cv_ntohul (unsigned long int *, size_t, void *, size_t)
 
size_t bu_cv_htonss (void *, size_t, signed short *, size_t)
 
size_t bu_cv_htonus (void *, size_t, unsigned short *, size_t)
 
size_t bu_cv_htonsl (void *, size_t, long *, size_t)
 
size_t bu_cv_htonul (void *, size_t, unsigned long *, size_t)
 
DEPRECATED uint16_t bu_gshort (const unsigned char *msgp)
 
DEPRECATED uint32_t bu_glong (const unsigned char *msgp)
 
DEPRECATED unsigned char * bu_pshort (unsigned char *msgp, uint16_t s)
 
DEPRECATED unsigned char * bu_plong (unsigned char *msgp, uint32_t l)
 
DEPRECATED unsigned char * bu_plonglong (unsigned char *msgp, uint64_t l)
 

Macro Definition Documentation

◆ BU_GLONGLONG

#define BU_GLONGLONG (   _cp)
Value:
((((uint64_t)((_cp)[0])) << 56) | \
(((uint64_t)((_cp)[1])) << 48) | \
(((uint64_t)((_cp)[2])) << 40) | \
(((uint64_t)((_cp)[3])) << 32) | \
(((uint64_t)((_cp)[4])) << 24) | \
(((uint64_t)((_cp)[5])) << 16) | \
(((uint64_t)((_cp)[6])) << 8) | \
((uint64_t)((_cp)[7])))

Definition at line 457 of file cv.h.

◆ BU_GLONG

#define BU_GLONG (   _cp)
Value:
((((uint32_t)((_cp)[0])) << 24) | \
(((uint32_t)((_cp)[1])) << 16) | \
(((uint32_t)((_cp)[2])) << 8) | \
((uint32_t)((_cp)[3])))

Definition at line 471 of file cv.h.

◆ BU_GSHORT

#define BU_GSHORT (   _cp)
Value:
((((uint16_t)((_cp)[0])) << 8) | \
(_cp)[1])

Definition at line 481 of file cv.h.

Function Documentation

◆ bu_gshort()

DEPRECATED uint16_t bu_gshort ( const unsigned char *  msgp)

◆ bu_glong()

DEPRECATED uint32_t bu_glong ( const unsigned char *  msgp)

◆ bu_pshort()

DEPRECATED unsigned char * bu_pshort ( unsigned char *  msgp,
uint16_t  s 
)

◆ bu_plong()

DEPRECATED unsigned char * bu_plong ( unsigned char *  msgp,
uint32_t  l 
)

◆ bu_plonglong()

DEPRECATED unsigned char * bu_plonglong ( unsigned char *  msgp,
uint64_t  l 
)