projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added pointer to residual variable to linreg cache
[pspp]
/
src
/
data
/
por-file-reader.c
diff --git
a/src/data/por-file-reader.c
b/src/data/por-file-reader.c
index db33acf035749b940a69c13ea04d9276beca101e..5b49fa5aa90632e41d013f581b538debad13bb5a 100644
(file)
--- a/
src/data/por-file-reader.c
+++ b/
src/data/por-file-reader.c
@@
-21,7
+21,7
@@
#include <config.h>
#include "por-file-reader.h"
#include <config.h>
#include "por-file-reader.h"
-#include
"message.h"
+#include
<libpspp/message.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@@
-29,25
+29,24
@@
#include <errno.h>
#include <math.h>
#include <setjmp.h>
#include <errno.h>
#include <math.h>
#include <setjmp.h>
-#include
"alloc.h"
+#include
<libpspp/alloc.h>
#include <stdbool.h>
#include "case.h"
#include <stdbool.h>
#include "case.h"
+#include <libpspp/compiler.h>
#include "dictionary.h"
#include "file-handle-def.h"
#include "format.h"
#include "dictionary.h"
#include "file-handle-def.h"
#include "format.h"
-#include
"hash.h"
-#include
"magic.h"
-#include
"misc.h"
-#include
"pool.h"
-#include
"str.h"
+#include
<libpspp/hash.h>
+#include
<libpspp/magic.h>
+#include
<libpspp/misc.h>
+#include
<libpspp/pool.h>
+#include
<libpspp/str.h>
#include "value-labels.h"
#include "variable.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "value-labels.h"
#include "variable.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
-#include "debug-print.h"
-
/* portable_to_local[PORTABLE] translates the given portable
character into the local character set. */
static const char portable_to_local[256] =
/* portable_to_local[PORTABLE] translates the given portable
character into the local character set. */
static const char portable_to_local[256] =
@@
-78,7
+77,8
@@
struct pfm_reader
static void
error (struct pfm_reader *r, const char *msg,...)
static void
error (struct pfm_reader *r, const char *msg,...)
- PRINTF_FORMAT (2, 3);
+ PRINTF_FORMAT (2, 3)
+ NO_RETURN;
/* Displays MSG as an error message and aborts reading the
portable file via longjmp(). */
/* Displays MSG as an error message and aborts reading the
portable file via longjmp(). */
@@
-86,17
+86,18
@@
static void
error (struct pfm_reader *r, const char *msg, ...)
{
struct error e;
error (struct pfm_reader *r, const char *msg, ...)
{
struct error e;
- const char *filename;
+ const char *file
_
name;
char *title;
va_list args;
char *title;
va_list args;
- e.class = ME;
- e.where.filename = NULL;
+ e.category = MSG_GENERAL;
+ e.severity = MSG_ERROR;
+ e.where.file_name = NULL;
e.where.line_number = 0;
e.where.line_number = 0;
- file
name = fh_get_file
name (r->fh);
- e.title = title = pool_alloc (r->pool, strlen (filename) + 80);
+ file
_name = fh_get_file_
name (r->fh);
+ e.title = title = pool_alloc (r->pool, strlen (file
_
name) + 80);
sprintf (title, _("portable file %s corrupt at offset %ld: "),
sprintf (title, _("portable file %s corrupt at offset %ld: "),
- filename, ftell (r->file));
+ file
_
name, ftell (r->file));
va_start (args, msg);
err_vmsg (&e, msg, args);
va_start (args, msg);
err_vmsg (&e, msg, args);
@@
-172,7
+173,7
@@
pfm_open_reader (struct file_handle *fh, struct dictionary **dict,
if (setjmp (r->bail_out))
goto error;
r->fh = fh;
if (setjmp (r->bail_out))
goto error;
r->fh = fh;
- r->file = pool_fopen (r->pool, fh_get_filename (r->fh), "rb");
+ r->file = pool_fopen (r->pool, fh_get_file
_
name (r->fh), "rb");
r->weight_index = -1;
r->trans = NULL;
r->var_cnt = 0;
r->weight_index = -1;
r->trans = NULL;
r->var_cnt = 0;
@@
-185,7
+186,7
@@
pfm_open_reader (struct file_handle *fh, struct dictionary **dict,
{
msg (ME, _("An error occurred while opening \"%s\" for reading "
"as a portable file: %s."),
{
msg (ME, _("An error occurred while opening \"%s\" for reading "
"as a portable file: %s."),
- fh_get_filename (r->fh), strerror (errno));
+ fh_get_file
_
name (r->fh), strerror (errno));
goto error;
}
goto error;
}
@@
-403,7
+404,7
@@
read_header (struct pfm_reader *r)
for (i = 0; i < 8; i++)
if (!match (r, "SPSSPORT"[i]))
{
for (i = 0; i < 8; i++)
if (!match (r, "SPSSPORT"[i]))
{
- msg (SE, _("%s: Not a portable file."), fh_get_filename (r->fh));
+ msg (SE, _("%s: Not a portable file."), fh_get_file
_
name (r->fh));
longjmp (r->bail_out, 1);
}
}
longjmp (r->bail_out, 1);
}
}