projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sys-file-reader: Disallow system and scratch long variable names too.
[pspp]
/
src
/
data
/
any-reader.c
diff --git
a/src/data/any-reader.c
b/src/data/any-reader.c
index aee034ce319ae8131669305e3e3fa6aa4fc9ec3b..ff7f4ab6c923a4dd7bec8ea3e425e5523262b2bd 100644
(file)
--- a/
src/data/any-reader.c
+++ b/
src/data/any-reader.c
@@
-51,7
+51,7
@@
static const struct any_reader_class *classes[] =
enum { N_CLASSES = sizeof classes / sizeof *classes };
int
enum { N_CLASSES = sizeof classes / sizeof *classes };
int
-any_reader_detect (const
char *file_nam
e,
+any_reader_detect (const
struct file_handle *file_handl
e,
const struct any_reader_class **classp)
{
struct detector
const struct any_reader_class **classp)
{
struct detector
@@
-66,11
+66,11
@@
any_reader_detect (const char *file_name,
if (classp)
*classp = NULL;
if (classp)
*classp = NULL;
- file = fn_open (file_
nam
e, "rb");
+ file = fn_open (file_
handl
e, "rb");
if (file == NULL)
{
msg (ME, _("An error occurred while opening `%s': %s."),
if (file == NULL)
{
msg (ME, _("An error occurred while opening `%s': %s."),
- f
ile_name
, strerror (errno));
+ f
h_get_file_name (file_handle)
, strerror (errno));
return -errno;
}
return -errno;
}
@@
-90,9
+90,9
@@
any_reader_detect (const char *file_name,
}
if (retval < 0)
}
if (retval < 0)
- msg (ME, _("Error reading `%s': %s."), f
ile_name
, strerror (-retval));
+ msg (ME, _("Error reading `%s': %s."), f
h_get_file_name (file_handle)
, strerror (-retval));
- fn_close (file_
nam
e, file);
+ fn_close (file_
handl
e, file);
return retval;
}
return retval;
}
@@
-107,7
+107,7
@@
any_reader_open (struct file_handle *handle)
const struct any_reader_class *class;
int retval;
const struct any_reader_class *class;
int retval;
- retval = any_reader_detect (
fh_get_file_name (handle)
, &class);
+ retval = any_reader_detect (
handle
, &class);
if (retval <= 0)
{
if (retval == 0)
if (retval <= 0)
{
if (retval == 0)