80 if (fread (& pic,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
87 if (fread (& rid,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
88 if (fread (& cid,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
89 if (fread (& this_proj -> curves[rid][cid] -> displayed,
sizeof(gboolean), 1,
fp) != 1)
return ERROR_RW;
90 if (fread (& this_proj -> curves[rid][cid] -> ndata,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
91 this_proj -> curves[rid][cid] -> data[0] =
allocdouble (this_proj -> curves[rid][cid] -> ndata);
92 if (fread (this_proj -> curves[rid][cid] -> data[0],
sizeof(
double), this_proj -> curves[rid][cid] -> ndata,
fp) != this_proj -> curves[rid][cid] -> ndata)
return ERROR_RW;
93 this_proj -> curves[rid][cid] -> data[1] =
allocdouble (this_proj -> curves[rid][cid] -> ndata);
94 if (fread (this_proj -> curves[rid][cid] -> data[1],
sizeof(
double), this_proj -> curves[rid][cid] -> ndata,
fp) != this_proj -> curves[rid][cid] -> ndata)
return ERROR_RW;
95 if (fread (& i,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
98 this_proj -> curves[rid][cid] -> err =
allocdouble (this_proj -> curves[rid][cid] -> ndata);
99 if (fread (this_proj -> curves[rid][cid] -> err,
sizeof(
double), this_proj -> curves[rid][cid] -> ndata,
fp) != this_proj -> curves[rid][cid] -> ndata)
return ERROR_RW;
102 if (this_proj -> curves[rid][cid] -> displayed)
104 if (fread (this_proj -> curves[rid][cid] -> wsize,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
105 if (fread (this_proj -> curves[rid][cid] -> cmin,
sizeof(
double), 2,
fp) != 2)
return ERROR_RW;
106 if (fread (this_proj -> curves[rid][cid] -> cmax,
sizeof(
double), 2,
fp) != 2)
return ERROR_RW;
108 if (fread (& this_proj -> curves[rid][cid] ->
show_title,
sizeof(gboolean), 1,
fp) != 1)
return ERROR_RW;
113 if (this_proj -> curves[rid][cid] -> title == NULL)
return ERROR_RW;
115 if (fread (this_proj -> curves[rid][cid] -> title_pos,
sizeof(
double), 2,
fp) != 2)
return ERROR_RW;
117 if (this_proj -> curves[rid][cid] -> title_font == NULL)
return ERROR_RW;
118 if (fread (& this_proj -> curves[rid][cid] -> title_color,
sizeof(
ColRGBA), 1,
fp) != 1)
return ERROR_RW;
120 if (fread (this_proj -> curves[rid][cid] -> axmin,
sizeof(
double), 2,
fp) != 2)
return ERROR_RW;
121 if (fread (this_proj -> curves[rid][cid] -> axmax,
sizeof(
double), 2,
fp) != 2)
return ERROR_RW;
129 if (fread (this_proj -> curves[rid][cid] -> axis_title_x,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
130 if (fread (this_proj -> curves[rid][cid] -> axis_title_y,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
131 if (fread (this_proj -> curves[rid][cid] ->
scale,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
132 if (fread (this_proj -> curves[rid][cid] -> axis_defaut_title,
sizeof(gboolean), 2,
fp) != 2)
return ERROR_RW;
133 if (fread (this_proj -> curves[rid][cid] ->
autoscale,
sizeof(gboolean), 2,
fp) != 2)
return ERROR_RW;
134 if (fread (this_proj -> curves[rid][cid] ->
majt,
sizeof(
double), 2,
fp) != 2)
return ERROR_RW;
135 if (fread (this_proj -> curves[rid][cid] -> mint,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
136 if (fread (this_proj -> curves[rid][cid] -> ticks_io,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
137 if (fread (this_proj -> curves[rid][cid] -> ticks_pos,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
138 if (fread (this_proj -> curves[rid][cid] -> majt_size,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
139 if (fread (this_proj -> curves[rid][cid] -> mint_size,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
140 if (fread (this_proj -> curves[rid][cid] -> labels_pos,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
141 if (fread (this_proj -> curves[rid][cid] -> labels_digit,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
145 if (this_proj -> curves[rid][cid] -> labels_font[j] == NULL)
return ERROR_RW;
147 if (fread (this_proj -> curves[rid][cid] -> labels_angle,
sizeof(
double), 2,
fp) != 2)
return ERROR_RW;
148 if (fread (this_proj -> curves[rid][cid] -> labels_shift_x,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
149 if (fread (this_proj -> curves[rid][cid] -> labels_shift_y,
sizeof(
int), 2,
fp) != 2)
return ERROR_RW;
150 if (fread (this_proj -> curves[rid][cid] ->
show_grid,
sizeof(gboolean), 2,
fp) != 2)
return ERROR_RW;
151 if (fread (this_proj -> curves[rid][cid] ->
show_axis,
sizeof(gboolean), 2,
fp) != 2)
return ERROR_RW;
154 if (fread (& this_proj -> curves[rid][cid] ->
show_legend,
sizeof(gboolean), 1,
fp) != 1)
return ERROR_RW;
156 if (this_proj -> curves[rid][cid] -> legend_font == NULL)
return ERROR_RW;
157 if (fread (this_proj -> curves[rid][cid] -> legend_pos,
sizeof(
double), 2,
fp) != 2)
return ERROR_RW;
158 if (fread (& this_proj -> curves[rid][cid] -> legend_color,
sizeof(
ColRGBA), 1,
fp) != 1)
return ERROR_RW;
159 if (fread (& this_proj -> curves[rid][cid] -> show_legend_box,
sizeof(gboolean), 1,
fp) != 1)
return ERROR_RW;
160 if (fread (& this_proj -> curves[rid][cid] -> legend_box_dash,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
161 if (fread (& this_proj -> curves[rid][cid] -> legend_box_thickness,
sizeof(
double), 1,
fp) != 1)
return ERROR_RW;
162 if (fread (& this_proj -> curves[rid][cid] -> legend_box_color,
sizeof(
ColRGBA), 1,
fp) != 1)
return ERROR_RW;
164 if (fread (& this_proj -> curves[rid][cid] ->
show_frame,
sizeof(gboolean), 1,
fp) != 1)
return ERROR_RW;
165 if (fread (& this_proj -> curves[rid][cid] -> frame_type,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
166 if (fread (& this_proj -> curves[rid][cid] -> frame_dash,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
167 if (fread (& this_proj -> curves[rid][cid] -> frame_thickness,
sizeof(
double), 1,
fp) != 1)
return ERROR_RW;
168 if (fread (& this_proj -> curves[rid][cid] -> frame_color,
sizeof(
ColRGBA), 1,
fp) != 1)
return ERROR_RW;
169 if (fread (this_proj -> curves[rid][cid] -> frame_pos,
sizeof(this_proj -> curves[rid][cid] -> frame_pos), 1,
fp) != 1)
return ERROR_RW;
170 if (fread (& this_proj -> curves[rid][cid] -> backcolor,
sizeof(
ColRGBA), 1,
fp) != 1)
return ERROR_RW;
172 this_proj -> curves[rid][cid] ->
layout = g_malloc0 (
sizeof*this_proj -> curves[rid][cid] ->
layout);
174 if (fread (& this_proj -> curves[rid][cid] -> draw_id,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
175 if (fread (& this_proj -> curves[rid][cid] -> bshift,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
177 this_proj -> curves[rid][cid] -> extrac = g_malloc0 (
sizeof*this_proj -> curves[rid][cid] -> extrac);
178 if (fread (& this_proj -> curves[rid][cid] -> extrac -> extras,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
179 if (this_proj -> curves[rid][cid] -> extrac -> extras > 0)
181 this_proj -> curves[rid][cid] -> extrac -> first = g_malloc0 (
sizeof*this_proj -> curves[rid][cid] -> extrac -> first);
182 this_proj -> curves[rid][cid] -> extrac -> last = g_malloc0 (
sizeof*this_proj -> curves[rid][cid] -> extrac -> last);
183 CurveExtra * ctmp = this_proj -> curves[rid][cid] -> extrac -> first;
184 for (i=0; i<this_proj -> curves[rid][cid] -> extrac -> extras; i++)
186 if (fread (& ctmp ->
id.
a,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
187 if (fread (& ctmp ->
id.
b,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
188 if (fread (& ctmp ->
id.
c,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
191 if (i < this_proj -> curves[rid][cid] -> extrac -> extras - 1)
193 ctmp -> next = g_malloc0 (
sizeof*ctmp -> next);
194 ctmp -> next -> prev = ctmp;
197 else if (i == this_proj -> curves[rid][cid] -> extrac -> extras - 1)
199 this_proj -> curves[rid][cid] -> extrac -> last = ctmp;
203 if (fread (& i,
sizeof(
int), 1,
fp) != 1)
return ERROR_RW;
207 if (this_proj -> curves[rid][cid] -> cfile == NULL)
return ERROR_RW;