#include "bc_machdefs.h"
#include "bc_util.h"
Include dependency graph for bc_safe_io.c:
Go to the source code of this file.
Defines | |
#define | SREAD 1 |
#define | SWRITE 2 |
#define | SRW_EMPTY 3 |
#define | SRW_READ 4 |
#define | SRW_WRITE 5 |
#define | TFILE 1 |
#define | TDESC 2 |
#define | TNET 3 |
#define | NBITMASK(n) ((1<<(n))-1) |
#define | BITRANGE(x, start, length) (((x) >> (start)) & NBITMASK(length)) |
#define | BITS_PER_CHAR (8) |
#define | O_BINARY 0 |
#define | O_EXCL 0 |
#define | MUNCH_HI_EXP(x, e, v, lv) if (x >= v) {e = (unsigned int) e + lv; x *= 1/v;} |
#define | MUNCH_LO_EXP(x, e, v, lv) if (x < 1/v) {e = (unsigned int) e - lv; x *= v;} |
#define | UNMUNCH_HI_EXP(x, e, v, lv) |
#define | UNMUNCH_LO_EXP(x, e, v, lv) |
#define | UNMUNCH_HI_EXP(x, e, v, lv) |
#define | UNMUNCH_LO_EXP(x, e, v, lv) |
Functions | |
static CC_SFILE * | sopen_write (const char *f) |
static CC_SFILE ** | sopen_read (const char *f) |
static CC_SFILE *** | sdopen (int t) |
static CC_SFILE **** | sdopen_write (int t) |
static CC_SFILE ***** | sdopen_read (int t) |
static CC_SFILE ****** | sdopen_readwrite (int t) |
static int | swrite_buffer (CC_SFILE *f) |
static int | sread_buffer (CC_SFILE *f) |
static int | prepare_write (CC_SFILE *f) |
static int | prepare_read (CC_SFILE *f) |
static void | sinit (CC_SFILE *s) |
CC_SFILE * | CCutil_sopen (const char *f, const char *s) |
CC_SFILE * | CCutil_sdopen (int d, const char *s) |
int | CCutil_swrite (CC_SFILE *f, char *buf, int size) |
int | CCutil_swrite_bits (CC_SFILE *f, int x, int xbits) |
int | CCutil_swrite_ubits (CC_SFILE *f, unsigned int x, int xbits) |
int | CCutil_swrite_char (CC_SFILE *f, int x) |
int | CCutil_swrite_string (CC_SFILE *f, const char *s) |
int | CCutil_swrite_short (CC_SFILE *f, short x) |
int | CCutil_swrite_ushort (CC_SFILE *f, unsigned x) |
int | CCutil_swrite_int (CC_SFILE *f, int x) |
int | CCutil_swrite_uint (CC_SFILE *f, unsigned int x) |
int | CCutil_swrite_double (CC_SFILE *f, double x) |
int | CCutil_sread (CC_SFILE *f, char *buf, int size) |
int | CCutil_sread_bits (CC_SFILE *f, int *x, int xbits) |
int | CCutil_sread_ubits (CC_SFILE *f, unsigned int *x, int xbits) |
int | CCutil_sread_char (CC_SFILE *f, char *x) |
int | CCutil_sread_string (CC_SFILE *f, char *x, int maxlen) |
int | CCutil_sread_short (CC_SFILE *f, short *x) |
int | CCutil_sread_ushort (CC_SFILE *f, unsigned short *x) |
int | CCutil_sread_short_r (CC_SFILE *f, short *x) |
int | CCutil_sread_int (CC_SFILE *f, int *x) |
int | CCutil_sread_uint (CC_SFILE *f, unsigned int *x) |
int | CCutil_sread_int_r (CC_SFILE *f, int *x) |
int | CCutil_sread_double (CC_SFILE *f, double *x) |
int | CCutil_sread_double_r (CC_SFILE *f, double *x) |
int | CCutil_sflush (CC_SFILE *f) |
int | CCutil_stell (CC_SFILE *f) |
int | CCutil_sseek (CC_SFILE *f, int offset) |
int | CCutil_srewind (CC_SFILE *f) |
int | CCutil_sclose (CC_SFILE *f) |
int | CCutil_sbits (unsigned int x) |
int | CCutil_sdelete_file (const char *fname) |
int | CCutil_sdelete_file_backup (const char *fname) |
CC_SFILE * | CCutil_snet_open (const char *hname, unsigned p) |
CC_SFILE * | CCutil_snet_receive (CC_SPORT *s) |
CC_SPORT * | CCutil_snet_listen (unsigned p) |
void | CCutil_snet_unlisten (CC_SPORT *s) |
|
Definition at line 348 of file bc_safe_io.c. |
|
Definition at line 349 of file bc_safe_io.c. |
|
|
|
|
|
Definition at line 347 of file bc_safe_io.c. |
|
Definition at line 352 of file bc_safe_io.c. |
|
Definition at line 355 of file bc_safe_io.c. |
|
Definition at line 337 of file bc_safe_io.c. |
|
Definition at line 339 of file bc_safe_io.c. |
|
Definition at line 340 of file bc_safe_io.c. |
|
Definition at line 341 of file bc_safe_io.c. |
|
Definition at line 338 of file bc_safe_io.c. |
|
Definition at line 344 of file bc_safe_io.c. |
|
Definition at line 343 of file bc_safe_io.c. |
|
Definition at line 345 of file bc_safe_io.c. |
|
Value: if ((unsigned int) e >= (unsigned int) (128 + lv)) \ {e = (unsigned int) e - lv; x *= v;} |
|
Value: if ((unsigned int) e >= (unsigned int) (128 + lv)) \ {e = (unsigned int) e - lv; x *= v;} |
|
Value: if ((unsigned int) e <= (unsigned int) (128 - lv)) \ {e = (unsigned int) e + lv; x *= 1/v;} |
|
Value: if ((unsigned int) e <= (unsigned int) (128 - lv)) \ {e = (unsigned int) e + lv; x *= 1/v;} |
|
Definition at line 1337 of file bc_safe_io.c. |
|
Definition at line 1191 of file bc_safe_io.c. |
|
Definition at line 1353 of file bc_safe_io.c. |
|
Definition at line 1366 of file bc_safe_io.c. |
|
Definition at line 376 of file bc_safe_io.c. |
|
Definition at line 1103 of file bc_safe_io.c. |
|
Definition at line 1545 of file bc_safe_io.c. |
|
Definition at line 1436 of file bc_safe_io.c. |
|
Definition at line 1514 of file bc_safe_io.c. |
|
Definition at line 1598 of file bc_safe_io.c. |
|
Definition at line 358 of file bc_safe_io.c. |
|
Definition at line 754 of file bc_safe_io.c. |
|
Definition at line 768 of file bc_safe_io.c. |
|
Definition at line 815 of file bc_safe_io.c. |
|
Definition at line 993 of file bc_safe_io.c. |
|
Definition at line 1045 of file bc_safe_io.c. |
|
Definition at line 911 of file bc_safe_io.c. |
|
Definition at line 956 of file bc_safe_io.c. |
|
Definition at line 851 of file bc_safe_io.c. |
|
Definition at line 884 of file bc_safe_io.c. |
|
Definition at line 831 of file bc_safe_io.c. |
|
Definition at line 780 of file bc_safe_io.c. |
|
Definition at line 922 of file bc_safe_io.c. |
|
Definition at line 862 of file bc_safe_io.c. |
|
Definition at line 1186 of file bc_safe_io.c. |
|
Definition at line 1159 of file bc_safe_io.c. |
|
Definition at line 1133 of file bc_safe_io.c. |
|
Definition at line 556 of file bc_safe_io.c. |
|
Definition at line 570 of file bc_safe_io.c. |
|
Definition at line 617 of file bc_safe_io.c. |
|
Definition at line 701 of file bc_safe_io.c. |
|
Definition at line 675 of file bc_safe_io.c. |
|
Definition at line 651 of file bc_safe_io.c. |
|
Definition at line 635 of file bc_safe_io.c. |
|
Definition at line 582 of file bc_safe_io.c. |
|
Definition at line 681 of file bc_safe_io.c. |
|
Definition at line 657 of file bc_safe_io.c. |
|
Definition at line 1406 of file bc_safe_io.c. |
|
Definition at line 1377 of file bc_safe_io.c. |
|
Definition at line 494 of file bc_safe_io.c. |
|
Definition at line 530 of file bc_safe_io.c. |
|
Definition at line 543 of file bc_safe_io.c. |
|
Definition at line 517 of file bc_safe_io.c. |
|
Definition at line 1325 of file bc_safe_io.c. |
|
Definition at line 458 of file bc_safe_io.c. |
|
Definition at line 398 of file bc_safe_io.c. |
|
Definition at line 1273 of file bc_safe_io.c. |
|
Definition at line 1233 of file bc_safe_io.c. |