Collaboration diagram for Data Conversion:
![]() |
Files | |
file | convert.c |
Routines to translate data formats. The data formats are:. | |
Defines | |
#define | CV_CHANNEL_MASK 0x00ff |
#define | CV_HOST_MASK 0x0100 |
#define | CV_SIGNED_MASK 0x0200 |
#define | CV_TYPE_MASK 0x1c00 |
#define | CV_CONVERT_MASK 0x6000 |
#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 | IND_NOTSET 0 |
#define | IND_BIG 1 |
#define | IND_LITTLE 2 |
#define | IND_ILL 3 |
#define | IND_CRAY 4 |
Functions | |
int | bu_cv_itemlen (int cookie) |
int | bu_cv_cookie (char *in) |
int | bu_cv_optimize (int cookie) |
int | bu_cv_w_cookie (genptr_t out, int outcookie, size_t size, genptr_t in, int incookie, int count) |
convert with cookie | |
int | bu_cv_ntohss (signed short *, size_t, genptr_t, int) |
int | bu_cv_ntohus (unsigned short *, size_t, genptr_t, int) |
int | bu_cv_ntohsl (signed long int *, size_t, genptr_t, int) |
int | bu_cv_ntohul (unsigned long int *, size_t, genptr_t, int) |
int | bu_cv_htonss (genptr_t, size_t, signed short *, int) |
int | bu_cv_htonus (genptr_t, size_t, unsigned short *, int) |
int | bu_cv_htonsl (genptr_t, size_t, long *, int) |
int | bu_cv_htonul (genptr_t, size_t, unsigned long *, int) |
void | bu_cv_fmt_cookie (char *buf, size_t buflen, int cookie) |
void | bu_cv_pr_cookie (char *title, int cookie) |
int | cv (genptr_t out, char *outfmt, size_t size, genptr_t in, char *infmt, int count) |
convert from one format to another. | |
int | bu_cv_optimize (register int cookie) |
int | bu_cv_itemlen (register int cookie) |
int | bu_cv_ntohss (register short int *out, size_t size, register genptr_t in, int count) |
Network TO Host Signed Short. | |
int | bu_cv_ntohus (register short unsigned int *out, size_t size, register genptr_t in, int count) |
int | bu_cv_ntohsl (register long int *out, size_t size, register genptr_t in, int count) |
int | bu_cv_ntohul (register long unsigned int *out, size_t size, register genptr_t in, int count) |
int | bu_cv_htonss (genptr_t out, size_t size, register short int *in, int count) |
int | bu_cv_htonus (genptr_t out, size_t size, register short unsigned int *in, int count) |
int | bu_cv_htonsl (genptr_t out, size_t size, register long int *in, int count) |
int | bu_cv_htonul (genptr_t out, size_t size, register long unsigned int *in, int count) |
|
Definition at line 437 of file bu.h. Referenced by bu_cv_fmt_cookie(). |
|
Definition at line 438 of file bu.h. Referenced by bu_cv_cookie(), bu_cv_fmt_cookie(), bu_cv_itemlen(), bu_cv_optimize(), and bu_cv_w_cookie(). |
|
Definition at line 439 of file bu.h. Referenced by bu_cv_cookie(), bu_cv_fmt_cookie(), and bu_cv_w_cookie(). |
|
Definition at line 440 of file bu.h. Referenced by bu_cv_fmt_cookie(), bu_cv_itemlen(), bu_cv_optimize(), and bu_cv_w_cookie(). |
|
Definition at line 441 of file bu.h. Referenced by bu_cv_fmt_cookie(). |
|
Definition at line 443 of file bu.h. Referenced by bu_cv_itemlen(). |
|
|
|
Definition at line 446 of file bu.h. Referenced by bu_cv_cookie(), bu_cv_fmt_cookie(), and bu_cv_w_cookie(). |
|
Definition at line 447 of file bu.h. Referenced by bu_cv_cookie(), bu_cv_fmt_cookie(), and bu_cv_w_cookie(). |
|
Definition at line 448 of file bu.h. Referenced by bu_cv_cookie(), bu_cv_fmt_cookie(), and bu_cv_w_cookie(). |
|
Definition at line 449 of file bu.h. Referenced by bu_cv_cookie(), and bu_cv_fmt_cookie(). |
|
Definition at line 450 of file bu.h. Referenced by bu_cv_cookie(), bu_cv_fmt_cookie(), and bu_cv_w_cookie(). |
|
Definition at line 452 of file bu.h. Referenced by bu_cv_cookie(), and bu_cv_fmt_cookie(). |
|
Definition at line 453 of file bu.h. Referenced by bu_cv_cookie(), and bu_cv_fmt_cookie(). |
|
Definition at line 454 of file bu.h. Referenced by bu_cv_cookie(), and bu_cv_fmt_cookie(). |
|
Definition at line 456 of file bu.h. Referenced by bu_cv_optimize(). |
|
Definition at line 457 of file bu.h. Referenced by bu_cv_optimize(). |
|
|
|
|
|
Definition at line 460 of file bu.h. Referenced by bu_cv_optimize(). |
|
Referenced by bu_cv_w_cookie(), and rt_hf_import(). |
|
Definition at line 86 of file convert.c. References CV_16, CV_32, CV_64, CV_8, CV_CLIP, CV_D, CV_HOST_MASK, CV_LIT, CV_NORMAL, and CV_SIGNED_MASK. Referenced by cv(), rt_binunif_export5(), rt_binunif_import5(), and rt_hf_import(). |
|
Referenced by bu_cv_w_cookie(), rt_binunif_export5(), rt_binunif_import5(), and rt_hf_import(). |
|
convert with cookie bu_cv_w_cookie
ns16 -> hs16 -> hd -> hs32 -> ns32
Definition at line 698 of file convert.c. References bcopy, bu_cv_htonsl(), bu_cv_htonss(), bu_cv_htonul(), bu_cv_htonus(), bu_cv_itemlen(), bu_cv_ntohsl(), bu_cv_ntohss(), bu_cv_ntohul(), bu_cv_ntohus(), bu_cv_optimize(), bu_malloc(), CV_16, CV_32, CV_8, CV_D, CV_HOST_MASK, CV_SIGNED_MASK, CV_TYPE_MASK, htond(), ntohd(), and void(). Referenced by cv(), rt_binunif_export5(), rt_binunif_import5(), and rt_hf_import(). Here is the call graph for this function: ![]() |
|
Referenced by bu_cv_w_cookie(). |
|
Referenced by bu_cv_w_cookie(). |
|
Referenced by bu_cv_w_cookie(). |
|
Referenced by bu_cv_w_cookie(). |
|
Referenced by bu_cv_w_cookie(). |
|
Referenced by bu_cv_w_cookie(). |
|
Referenced by bu_cv_w_cookie(). |
|
Referenced by bu_cv_w_cookie(). |
|
Definition at line 178 of file convert.c. References CV_16, CV_32, CV_64, CV_8, CV_CHANNEL_MASK, CV_CLIP, CV_CONVERT_MASK, CV_D, CV_HOST_MASK, CV_LIT, CV_NORMAL, CV_SIGNED_MASK, and CV_TYPE_MASK. Referenced by bu_cv_pr_cookie(). |
|
Definition at line 291 of file convert.c. References bu_cv_fmt_cookie(). Here is the call graph for this function: ![]() |
|
convert from one format to another. c v
Definition at line 313 of file convert.c. References bu_cv_cookie(), and bu_cv_w_cookie(). Referenced by rt_eto_curve(), rt_eto_plot(), rt_eto_prep(), and rt_eto_tess(). Here is the call graph for this function: ![]() |
|
C V _ O P T I M I Z E It is always more efficient to handle host data, rather than network. If host and network formats are the same, and the request was for network format, modify the cookie to request host format. Definition at line 329 of file convert.c. References CV_HOST_MASK, CV_TYPE_MASK, IND_BIG, IND_CRAY, IND_NOTSET, and int. |
|
C V _ I T E M L E N Returns the number of bytes each "item" of type "cookie" occupies. Definition at line 392 of file convert.c. References CV_HOST_MASK, CV_TYPE_MASK, CV_TYPE_SHIFT, and int. |
|
Network TO Host Signed Short. bu_cv_ntohss It is assumed that this routine will only be called if there is real work to do. Ntohs does no checking to see if it is reasonable to do any conversions.
|
|
|
|
Definition at line 470 of file convert.c. References int. |
|
Definition at line 494 of file convert.c. References int. |
|
Definition at line 518 of file convert.c. References val. |
|
Definition at line 539 of file convert.c. References val. |
|
Definition at line 560 of file convert.c. References val. |
|
Definition at line 583 of file convert.c. References val. |