projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed constness issues.
[pspp-builds.git]
/
src
/
data
/
fastfile.c
diff --git
a/src/data/fastfile.c
b/src/data/fastfile.c
index 3b5cfdba5f4161a1b4a60b569e255fd59a8498f5..5856d07c80b359fc06ab7002614fa46efdb5945f 100644
(file)
--- a/
src/data/fastfile.c
+++ b/
src/data/fastfile.c
@@
-1,5
+1,5
@@
/* PSPP - computes sample statistics.
/* PSPP - computes sample statistics.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006
, 2007
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
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@
-17,9
+17,11
@@
02110-1301, USA. */
#include <config.h>
02110-1301, USA. */
#include <config.h>
+
#include "casefile.h"
#include "casefile-private.h"
#include "fastfile.h"
#include "casefile.h"
#include "casefile-private.h"
#include "fastfile.h"
+
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
@@
-27,16
+29,19
@@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+
+#include <data/case.h>
+#include <data/make-file.h>
+#include <data/settings.h>
+#include <data/variable.h>
#include <libpspp/alloc.h>
#include <libpspp/alloc.h>
-#include "case.h"
#include <libpspp/compiler.h>
#include <libpspp/message.h>
#include <libpspp/compiler.h>
#include <libpspp/message.h>
+#include <libpspp/misc.h>
+#include <libpspp/str.h>
+
#include "full-read.h"
#include "full-write.h"
#include "full-read.h"
#include "full-write.h"
-#include <libpspp/misc.h>
-#include "make-file.h"
-#include "settings.h"
-#include "variable.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@
-241,8
+246,7
@@
fastfilereader_get_next_case (struct casereader *cr)
ffr->buffer_pos = 0;
}
ffr->buffer_pos = 0;
}
- case_from_values (&ffr->c, ffr->buffer + ffr->buffer_pos,
- ff->value_cnt);
+ case_copy_in (&ffr->c, 0, ffr->buffer + ffr->buffer_pos, ff->value_cnt);
ffr->buffer_pos += ff->value_cnt;
read_case = &ffr->c;
ffr->buffer_pos += ff->value_cnt;
read_case = &ffr->c;
@@
-640,7
+644,7
@@
write_case_to_disk (struct fastfile *ff, const struct ccase *c)
if (!ff->ok)
return;
if (!ff->ok)
return;
- case_
to_values (c
, ff->buffer + ff->buffer_used, ff->value_cnt);
+ case_
copy_out (c, 0
, ff->buffer + ff->buffer_used, ff->value_cnt);
ff->buffer_used += ff->value_cnt;
if (ff->buffer_used + ff->value_cnt > ff->buffer_size)
flush_buffer (ff);
ff->buffer_used += ff->value_cnt;
if (ff->buffer_used + ff->value_cnt > ff->buffer_size)
flush_buffer (ff);