X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcasefile.c;h=8b1ac82838f55ff49d587ec1a14f7d620cad4f62;hb=a55b554c0479168ef3e4879fe0fa517f7ca4def7;hp=1ae743bd965fd81ea2c57738ae5e9f114959b1fd;hpb=3f2ed1c5fe6dc692ca00bb18a15e41617fa2d37d;p=pspp-builds.git diff --git a/src/data/casefile.c b/src/data/casefile.c index 1ae743bd..8b1ac828 100644 --- a/src/data/casefile.c +++ b/src/data/casefile.c @@ -111,6 +111,8 @@ casefile_destroy(). This function will also destroy any remaining casereaders. */ +/* FIXME: should we implement compression? */ + /* In-memory cases are arranged in an array of arrays. The top level is variable size and the size of each bottom level array is fixed at the number of cases defined here. */ @@ -733,17 +735,18 @@ io_error (struct casefile *cf, const char *format, ...) { if (cf->ok) { - struct error e; + struct msg m; va_list args; - e.class = ME; - e.where.file_name = NULL; - e.where.line_number = -1; - e.title = NULL; - + m.category = MSG_GENERAL; + m.severity = MSG_ERROR; + m.where.file_name = NULL; + m.where.line_number = -1; va_start (args, format); - err_vmsg (&e, format, args); + m.text = xvasprintf (format, args); va_end (args); + + msg_emit (&m); } cf->ok = false; }