projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix punctuation in error message.
[pspp]
/
src
/
data
/
scratch-writer.c
diff --git
a/src/data/scratch-writer.c
b/src/data/scratch-writer.c
index 8bedef65677d984c67a2391cc9c47fa598d779ba..13ccee8c6f0aef698c2542ca495dbf4280bf5677 100644
(file)
--- a/
src/data/scratch-writer.c
+++ b/
src/data/scratch-writer.c
@@
-22,6
+22,7
@@
#include <stdlib.h>
#include "case.h"
#include "casefile.h"
#include <stdlib.h>
#include "case.h"
#include "casefile.h"
+#include "fastfile.h"
#include "dictionary.h"
#include "file-handle-def.h"
#include "scratch-handle.h"
#include "dictionary.h"
#include "file-handle-def.h"
#include "scratch-handle.h"
@@
-61,7
+62,7
@@
scratch_writer_open (struct file_handle *fh,
/* Copy the dictionary and compact if needed. */
scratch_dict = dict_clone (dictionary);
/* Copy the dictionary and compact if needed. */
scratch_dict = dict_clone (dictionary);
- if (dict_
needs_compaction
(scratch_dict))
+ if (dict_
compacting_would_shrink
(scratch_dict))
{
compactor = dict_make_compactor (scratch_dict);
dict_compact_values (scratch_dict);
{
compactor = dict_make_compactor (scratch_dict);
dict_compact_values (scratch_dict);
@@
-72,7
+73,7
@@
scratch_writer_open (struct file_handle *fh,
/* Create new contents. */
sh = xmalloc (sizeof *sh);
sh->dictionary = scratch_dict;
/* Create new contents. */
sh = xmalloc (sizeof *sh);
sh->dictionary = scratch_dict;
- sh->casefile =
case
file_create (dict_get_next_value_idx (sh->dictionary));
+ sh->casefile =
fast
file_create (dict_get_next_value_idx (sh->dictionary));
/* Create writer. */
writer = xmalloc (sizeof *writer);
/* Create writer. */
writer = xmalloc (sizeof *writer);
@@
-115,7
+116,6
@@
scratch_writer_close (struct scratch_writer *writer)
{
struct casefile *cf = writer->handle->casefile;
bool ok = casefile_error (cf);
{
struct casefile *cf = writer->handle->casefile;
bool ok = casefile_error (cf);
- casefile_mode_reader (cf);
fh_close (writer->fh, "scratch file", "we");
free (writer);
return ok;
fh_close (writer->fh, "scratch file", "we");
free (writer);
return ok;