Add a couple of extensions to GET DATA TYPE=TXT. Patch #6412. Thanks
[pspp-builds.git] / src / ui / gui / find-dialog.c
index 4978edaffc24947d114f6f160146507a935a2319..84bfa1be239bcbc264956519239b9fce7ad5872a 100644 (file)
@@ -30,18 +30,17 @@ which match particular strings */
 #include <data/datasheet.h>
 #include <data/data-in.h>
 #include "psppire-data-store.h"
-#include <libpspp/alloc.h>
 #include <ctype.h>
 #include <sys/types.h>
 #include <regex.h>
 #include <libpspp/message.h>
 
-
-
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 #include <stdlib.h>
 
+#include "xalloc.h"
+
 #include <gettext.h>
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
@@ -252,7 +251,8 @@ find_dialog (GObject *o, gpointer data)
                                 source,
                                 fd.variable_entry,
                                 insert_source_row_into_entry,
-                                is_currently_in_entry
+                                is_currently_in_entry,
+                                NULL
                                 );
 
   g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  &fd);
@@ -376,7 +376,7 @@ enum iteration_type{
   n_iterators
 };
 
-static struct casenum_iterator ip[n_iterators] =
+static const struct casenum_iterator ip[n_iterators] =
   {
     {cp1, last, forward},
     {cp1c, cm1, forward_wrap},
@@ -387,7 +387,7 @@ static struct casenum_iterator ip[n_iterators] =
 
 \f
 /* A factory returning an iterator according to the dialog box's settings */
-static struct casenum_iterator *
+static const struct casenum_iterator *
 get_iteration_params (const struct find_dialog *fd)
 {
   gboolean wrap = gtk_toggle_button_get_active
@@ -598,8 +598,9 @@ value_comparator_create (const struct variable *var, const char *target)
   vc->pattern = value_create (width);
 
   if ( ! data_in (ss_cstr (target),
+                  LEGACY_NATIVE,
                  fmt->type,
-                 0, 0,
+                 0, 0, 0,
                  vc->pattern, width) )
     {
       free (vc);
@@ -742,7 +743,7 @@ find_value (const struct find_dialog *fd, casenumber current_row,
   {
     union value *val = value_create (width);
     casenumber i;
-    struct casenum_iterator *ip = get_iteration_params (fd);
+    const struct casenum_iterator *ip = get_iteration_params (fd);
     struct comparator *cmptr =
       comparator_factory (var, target_string, flags);