Commit 489fa515 authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan
Browse files

Call gnumeric_error_save on failure.

2000-01-31  Jon K Hellan  <hellan@acm.org>

	* plugins/dif/dif.c (dif_write_workbook): Call
          gnumeric_error_save on failure.

	* plugins/ff-csv/csv-io.c (csv_write_workbook): Call
	gnumeric_error_save on failure.
parent 032b1452
2000-01-31 Jon K Hellan <hellan@acm.org>
* dif.c (dif_write_workbook): Call gnumeric_error_save on failure.
2000-01-29 Jon K Hellan <hellan@acm.org>
* dif.c (dif_read_workbook, dif_write_workbook): Add
......
......@@ -378,8 +378,10 @@ dif_write_workbook (CommandContext *context,
FILE *f = fopen (filename, "w");
char *workstring;
if (!f)
return -1;
if (!f) {
rc = -1;
goto out;
}
/*
* Since DIF files know nothing about paged spreadsheets,
......@@ -428,6 +430,9 @@ dif_write_workbook (CommandContext *context,
out:
if (f)
fclose (f);
if (rc < 0)
gnumeric_error_save (context, "");
return rc; /* Q: what do we have to return here?? */
}
......
2000-01-31 Jon K Hellan <hellan@acm.org>
* csv-io.c (csv_write_workbook): Call gnumeric_error_save on
failure.
2000-01-29 Jon K Hellan <hellan@acm.org>
* csv-io.c (csv_read_workbook, csv_write_workbook,
......
......@@ -253,8 +253,10 @@ csv_write_workbook (CommandContext *context, Workbook *wb,
int row, col, rc=0;
FILE *f = fopen (filename, "w");
if (!f)
return -1;
if (!f) {
rc = -1;
goto out;
}
setvbuf (f, NULL, _IOFBF, PAGE_SIZE);
......@@ -282,6 +284,9 @@ csv_write_workbook (CommandContext *context, Workbook *wb,
out:
if (f)
fclose (f);
if (rc < 0)
gnumeric_error_save (context, "");
return rc; /* Q: what do we have to return here?? */
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment