temp-file: Rename "ext-array" (for "external array").
[pspp-builds.git] / src / data / case-tmpfile.c
index 2b47d6dd26de83831cafba2bf0e15e8b3d63fc76..b2444b9bc5f411ac9d826b9f093972461652b40b 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <libpspp/assertion.h>
 #include <libpspp/taint.h>
-#include <libpspp/temp-file.h>
+#include <libpspp/ext-array.h>
 
 #include "error.h"
 #include "xalloc.h"
@@ -36,7 +36,7 @@ struct case_tmpfile
     struct caseproto *proto;    /* Format of cases in the tmpfile. */
     size_t case_size;           /* Number of bytes per case. */
     size_t *offsets;            /* Offset to each value. */
-    struct temp_file *temp_file; /* Temporary file. */
+    struct ext_array *ext_array; /* Temporary file. */
   };
 
 /* Returns the number of bytes needed to store a value with the
@@ -72,7 +72,7 @@ case_tmpfile_create (const struct caseproto *proto)
 
   ctf = xmalloc (sizeof *ctf);
   ctf->taint = taint_create ();
-  ctf->temp_file = temp_file_create ();
+  ctf->ext_array = ext_array_create ();
   ctf->proto = caseproto_ref (proto);
   ctf->case_size = 0;
   n_values = caseproto_get_n_widths (proto);
@@ -97,7 +97,7 @@ case_tmpfile_destroy (struct case_tmpfile *ctf)
   if (ctf != NULL)
     {
       struct taint *taint = ctf->taint;
-      temp_file_destroy (ctf->temp_file);
+      ext_array_destroy (ctf->ext_array);
       caseproto_unref (ctf->proto);
       free (ctf->offsets);
       free (ctf);
@@ -149,7 +149,7 @@ case_tmpfile_get_values (const struct case_tmpfile *ctf,
     {
       int width = caseproto_get_width (ctf->proto, i);
       if (width != -1
-          && !temp_file_read (ctf->temp_file, case_offset + ctf->offsets[i],
+          && !ext_array_read (ctf->ext_array, case_offset + ctf->offsets[i],
                               width_to_n_bytes (width),
                               value_to_data (&values[i], width)))
           return false;
@@ -194,7 +194,7 @@ case_tmpfile_put_values (struct case_tmpfile *ctf,
     {
       int width = caseproto_get_width (ctf->proto, i);
       if (width != -1
-          && !temp_file_write (ctf->temp_file, case_offset + ctf->offsets[i],
+          && !ext_array_write (ctf->ext_array, case_offset + ctf->offsets[i],
                                width_to_n_bytes (width),
                                value_to_data (values++, width)))
           return false;