projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Constness
[pspp]
/
src
/
language
/
stats
/
flip.c
diff --git
a/src/language/stats/flip.c
b/src/language/stats/flip.c
index c8cb03b92d7f75aff63dc5fe3ca549d8a4d2b365..de7f52c043bcb4d85fa263d3fc91debd8e916488 100644
(file)
--- a/
src/language/stats/flip.c
+++ b/
src/language/stats/flip.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2009
, 2010
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-144,7
+144,7
@@
cmd_flip (struct lexer *lexer, struct dataset *ds)
}
}
}
}
- flip->file = pool_
tmp
file (flip->pool);
+ flip->file = pool_
create_temp_
file (flip->pool);
if (flip->file == NULL)
{
msg (SE, _("Could not create temporary file for FLIP."));
if (flip->file == NULL)
{
msg (SE, _("Could not create temporary file for FLIP."));
@@
-322,13
+322,13
@@
flip_file (struct flip_pgm *flip)
output_buf = input_buf + flip->n_vars * case_capacity;
input_file = flip->file;
output_buf = input_buf + flip->n_vars * case_capacity;
input_file = flip->file;
- if (fseek (input_file, 0, SEEK_SET) != 0)
+ if (fseek
o
(input_file, 0, SEEK_SET) != 0)
{
msg (SE, _("Error rewinding FLIP file: %s."), strerror (errno));
return false;
}
{
msg (SE, _("Error rewinding FLIP file: %s."), strerror (errno));
return false;
}
- output_file = pool_
tmp
file (flip->pool);
+ output_file = pool_
create_temp_
file (flip->pool);
if (output_file == NULL)
{
msg (SE, _("Error creating FLIP source file."));
if (output_file == NULL)
{
msg (SE, _("Error creating FLIP source file."));
@@
-379,15
+379,11
@@
flip_file (struct flip_pgm *flip)
case_idx += read_cases;
}
case_idx += read_cases;
}
- if (pool_fclose (flip->pool, input_file) == EOF)
- {
- msg (SE, _("Error closing FLIP source file: %s."), strerror (errno));
- return false;
- }
+ pool_fclose_temp_file (flip->pool, input_file);
pool_unregister (flip->pool, input_buf);
free (input_buf);
pool_unregister (flip->pool, input_buf);
free (input_buf);
- if (fseek (output_file, 0, SEEK_SET) != 0)
+ if (fseek
o
(output_file, 0, SEEK_SET) != 0)
{
msg (SE, _("Error rewinding FLIP source file: %s."), strerror (errno));
return false;
{
msg (SE, _("Error rewinding FLIP source file: %s."), strerror (errno));
return false;