6static unsigned char Buffer[10000];
47 for (i = 0; i <
Cube->n_thresh; i++) {
51 for (
j = 0;
j <
Cube->data[i].npoly;
j++) {
69 if (
headfax->linefax.litmodel > 1) {
80 Buffer[1] = (size >> 8) & 0xff;
81 Buffer[2] = size & 0xff;
98 static int num_zero = 0;
104 junk = 0x80 | num_zero;
112 junk = 0x80 | num_zero;
124static long fsize = 0;
125static char *fptr =
NULL;
144 static int first = 1;
164 fsize =
stop - start + 1;
176 for (i = 0; (
ret =
fread(fptr + i, 1, 10240, fp)); i +=
ret)
182 return Cube->n_thresh = 0;
188 return Cube->n_thresh = 0;
199 if (0 >= (
ret =
my_fread((
char *)Buffer, 1, size, fp))) {
207 "Error (size) reading display file offset %" PRId64 "\n",
217 for (i = 0; i <
t_cnt; i++) {
221 for (
j = 0;
j <
Cube->data[i].npoly;
j++) {
240 if (
headfax->linefax.litmodel > 1) {
264 if (cptr +
amt >= fsize)
265 amt = fsize - cptr - 1;
int reset_reads(file_info *headfax)
int write_cube(Cube_data *Cube, int cur_x, file_info *headfax)
int read_cube(Cube_data *Cube, file_info *headfax)
int new_dspf(file_info *hfax)
int my_fread(char *buf, int size, int cnt, FILE *fp)
int write_cube_buffer(unsigned char *Buffer, int size, int cur_x, file_info *headfax)
void G_fseek(FILE *, off_t, int)
Change the file position of the stream.
off_t G_ftell(FILE *)
Get the current file position of the stream.
int struct_copy(char *To, char *From, int size)