+ struct html_driver_ext *x = this->ext;
+
+ FILE *fp;
+ int number_pos;
+
+ x->chart_cnt++;
+
+ number_pos = strchr (x->chart_file_name, '#') - x->chart_file_name;
+ ch->file_name = xasprintf ("%.*s%d%s",
+ number_pos, x->chart_file_name,
+ x->chart_cnt,
+ x->chart_file_name + number_pos + 1);
+ fp = fopen (ch->file_name, "wb");
+ if (fp == NULL)
+ {
+ error (0, errno, _("creating \"%s\""), ch->file_name);
+ free (ch->file_name);
+ ch->file_name = NULL;
+ return;
+ }
+
+ ch->pl_params = pl_newplparams ();