18 flsize =
sizeof(float);
23 if (1 != fwrite(&headp->
xdim, isize, 1, fp))
25 if (1 != fwrite(&headp->
ydim, isize, 1, fp))
27 if (1 != fwrite(&headp->
zdim, isize, 1, fp))
31 if (1 != fwrite(&headp->
min, flsize, 1, fp))
33 if (1 != fwrite(&headp->
max, flsize, 1, fp))
37 if (1 != fwrite(&linep->
litmodel, isize, 1, fp))
41 if (1 != fwrite(&linep->
nthres, isize, 1, fp))
44 if ((fwrite(linep->
tvalue, flsize, linep->
nthres, fp)) !=
46 fprintf(stderr,
"ERROR: fwrite in dspf_header.c\n");
55 if (1 != fwrite(&headp->
Lookoff,
sizeof(
long), 1, fp))
63 if (1 != fwrite(&headp->
Dataoff,
sizeof(
long), 1, fp))
69 if (1 != fwrite(&headp->
Dataoff,
sizeof(
long), 1, fp))
99 if (!fread(buf, 1, len, fp))
102 if (strncmp(
DSPF_ID, buf, len)) {
103 if (!strncmp(
"dspf003.01", buf, len))
106 fprintf(stderr,
"Error: header mismatch '%s' - '%s'\n",
DSPF_ID, buf);
111 flsize =
sizeof(float);
113 if (!fread(&headp->
xdim, isize, 1, fp))
115 if (!fread(&headp->
ydim, isize, 1, fp))
117 if (!fread(&headp->
zdim, isize, 1, fp))
119 if (!fread(&headp->
min, flsize, 1, fp))
121 if (!fread(&headp->
max, flsize, 1, fp))
123 if (!fread(&linep->
litmodel, isize, 1, fp))
125 if (!fread(&linep->
nthres, isize, 1, fp))
129 if (!fread(&headp->
Lookoff, isize, 1, fp))
131 if (!fread(&headp->
Dataoff, isize, 1, fp))
147 flsize =
sizeof(float);
149 if (!fread(&headp->
xdim, isize, 1, fp))
151 if (!fread(&headp->
ydim, isize, 1, fp))
153 if (!fread(&headp->
zdim, isize, 1, fp))
155 if (!fread(&tmp, flsize, 1, fp))
157 if (!fread(&tmp, flsize, 1, fp))
159 if (!fread(&tmp, flsize, 1, fp))
161 if (!fread(&headp->
min, flsize, 1, fp))
163 if (!fread(&headp->
max, flsize, 1, fp))
165 if (!fread(&linep->
litmodel, isize, 1, fp))
167 if (!fread(&linep->
nthres, isize, 1, fp))
171 if (!fread(&headp->
Lookoff, isize, 1, fp))
173 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)