19 flsize =
sizeof(float);
24 if (1 != fwrite(&headp->
xdim, isize, 1, fp))
26 if (1 != fwrite(&headp->
ydim, isize, 1, fp))
28 if (1 != fwrite(&headp->
zdim, isize, 1, fp))
33 if (1 != fwrite(&headp->
min, flsize, 1, fp))
35 if (1 != fwrite(&headp->
max, flsize, 1, fp))
39 if (1 != fwrite(&linep->
litmodel, isize, 1, fp))
43 if (1 != fwrite(&linep->
nthres, isize, 1, fp))
47 fprintf(stderr,
"ERROR: fwrite in dspf_header.c\n");
55 Where_lookoff = ftell(fp);
57 if (1 != fwrite(&headp->
Lookoff,
sizeof(
long), 1, fp))
63 Where_dataoff = ftell(fp);
65 if (1 != fwrite(&headp->
Dataoff,
sizeof(
long), 1, fp))
72 fseek(fp, Where_dataoff, 0);
73 if (1 != fwrite(&headp->
Dataoff,
sizeof(
long), 1, fp))
105 if (!fread(buf, 1, len, fp))
108 if (strncmp(
DSPF_ID, buf, len)) {
109 if (!strncmp(
"dspf003.01", buf, len))
112 fprintf(stderr,
"Error: header mismatch '%s' - '%s'\n",
DSPF_ID, buf);
117 flsize =
sizeof(float);
119 if (!fread(&headp->
xdim, isize, 1, fp))
121 if (!fread(&headp->
ydim, isize, 1, fp))
123 if (!fread(&headp->
zdim, isize, 1, fp))
125 if (!fread(&headp->
min, flsize, 1, fp))
127 if (!fread(&headp->
max, flsize, 1, fp))
129 if (!fread(&linep->
litmodel, isize, 1, fp))
131 if (!fread(&linep->
nthres, isize, 1, fp))
135 if (!fread(&headp->
Lookoff, isize, 1, fp))
137 if (!fread(&headp->
Dataoff, isize, 1, fp))
153 flsize =
sizeof(float);
155 if (!fread(&headp->
xdim, isize, 1, fp))
157 if (!fread(&headp->
ydim, isize, 1, fp))
159 if (!fread(&headp->
zdim, isize, 1, fp))
161 if (!fread(&tmp, flsize, 1, fp))
163 if (!fread(&tmp, flsize, 1, fp))
165 if (!fread(&tmp, flsize, 1, fp))
167 if (!fread(&headp->
min, flsize, 1, fp))
169 if (!fread(&headp->
max, flsize, 1, fp))
171 if (!fread(&linep->
litmodel, isize, 1, fp))
173 if (!fread(&linep->
nthres, isize, 1, fp))
177 if (!fread(&headp->
Lookoff, isize, 1, fp))
179 if (!fread(&headp->
Dataoff, isize, 1, fp))
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
int print_head_info(file_info *head)