20 flsize =
sizeof(float);
25 if (1 != fwrite(&headp->
xdim, isize, 1, fp))
27 if (1 != fwrite(&headp->
ydim, isize, 1, fp))
29 if (1 != fwrite(&headp->
zdim, isize, 1, fp))
34 if (1 != fwrite(&headp->
min, flsize, 1, fp))
36 if (1 != fwrite(&headp->
max, flsize, 1, fp))
40 if (1 != fwrite(&linep->
litmodel, isize, 1, fp))
44 if (1 != fwrite(&linep->
nthres, isize, 1, fp))
48 fprintf(stderr,
"ERROR: fwrite in dspf_header.c\n");
58 if (1 != fwrite(&headp->
Lookoff,
sizeof(
long), 1, fp))
66 if (1 != fwrite(&headp->
Dataoff,
sizeof(
long), 1, fp))
74 if (1 != fwrite(&headp->
Dataoff,
sizeof(
long), 1, fp))
106 if (!fread(buf, 1, len, fp))
109 if (strncmp(
DSPF_ID, buf, len)) {
110 if (!strncmp(
"dspf003.01", buf, len))
113 fprintf(stderr,
"Error: header mismatch '%s' - '%s'\n",
DSPF_ID, buf);
118 flsize =
sizeof(float);
120 if (!fread(&headp->
xdim, isize, 1, fp))
122 if (!fread(&headp->
ydim, isize, 1, fp))
124 if (!fread(&headp->
zdim, isize, 1, fp))
126 if (!fread(&headp->
min, flsize, 1, fp))
128 if (!fread(&headp->
max, flsize, 1, fp))
130 if (!fread(&linep->
litmodel, isize, 1, fp))
132 if (!fread(&linep->
nthres, isize, 1, fp))
136 if (!fread(&headp->
Lookoff, isize, 1, fp))
138 if (!fread(&headp->
Dataoff, isize, 1, fp))
154 flsize =
sizeof(float);
156 if (!fread(&headp->
xdim, isize, 1, fp))
158 if (!fread(&headp->
ydim, isize, 1, fp))
160 if (!fread(&headp->
zdim, isize, 1, fp))
162 if (!fread(&tmp, flsize, 1, fp))
164 if (!fread(&tmp, flsize, 1, fp))
166 if (!fread(&tmp, flsize, 1, fp))
168 if (!fread(&headp->
min, flsize, 1, fp))
170 if (!fread(&headp->
max, flsize, 1, fp))
172 if (!fread(&linep->
litmodel, isize, 1, fp))
174 if (!fread(&linep->
nthres, isize, 1, fp))
178 if (!fread(&headp->
Lookoff, isize, 1, fp))
180 if (!fread(&headp->
Dataoff, isize, 1, fp))
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 print_head_info(file_info *head)