#include <config.h>
#include "dialog-common.h"
-#include <language/syntax-string-source.h>
#include <language/stats/aggregate.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&fd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&fd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&fd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&fd)));
break;
default:
break;
#include "binomial-dialog.h"
-#include <language/syntax-string-source.h>
-
#include "psppire-dialog.h"
#include "psppire-var-view.h"
#include "psppire-acr.h"
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&bin_d);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&bin_d)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&bin_d);
- paste_syntax_to_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&bin_d)));
break;
default:
break;
#include "chi-square-dialog.h"
-#include <language/syntax-string-source.h>
-
#include "psppire-dialog.h"
#include "psppire-var-view.h"
#include "psppire-acr.h"
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&csd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&csd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&csd);
- paste_syntax_to_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&csd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 Free Software Foundation
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
#include "helper.h"
#include "psppire-data-window.h"
#include "psppire-data-editor.h"
-#include <language/syntax-string-source.h>
#include "executor.h"
#include "psppire-var-store.h"
#include <ui/syntax-gen.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&cd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&cd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&cd);
-
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&cd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 Free Software Foundation
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
#include <libpspp/i18n.h>
#include <language/expressions/public.h>
-#include <language/syntax-string-source.h>
#include "executor.h"
static void function_list_populate (GtkTreeView *tv);
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&scd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&scd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&scd);
-
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&scd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2009 Free Software Foundation
+ Copyright (C) 2009, 2010 Free Software Foundation
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
#include <config.h>
#include "dialog-common.h"
-#include <language/syntax-string-source.h>
#include <ui/syntax-gen.h>
#include <libpspp/str.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&rd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&rd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&rd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&rd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2008 Free Software Foundation
+ Copyright (C) 2008, 2010 Free Software Foundation
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
#include <gtk/gtk.h>
#include <stdlib.h>
-#include <language/syntax-string-source.h>
#include <ui/gui/psppire-data-window.h>
#include <ui/gui/dialog-common.h>
#include <ui/gui/dict-display.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&cd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&cd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&cd);
-
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&cd)));
break;
default:
break;
#include <gtk/gtk.h>
#include <stdlib.h>
-#include <language/syntax-string-source.h>
#include <ui/gui/psppire-data-window.h>
#include <ui/gui/dialog-common.h>
#include <ui/gui/dict-display.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&scd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&scd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&scd);
- paste_syntax_to_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&scd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2008, 2009 Free Software Foundation
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation
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
#include <gtk/gtk.h>
#include <stdlib.h>
-#include <language/syntax-string-source.h>
#include <ui/gui/psppire-data-window.h>
#include <ui/gui/dialog-common.h>
#include <ui/gui/dict-display.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&ex_d);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
-
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&ex_d)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&ex_d);
- paste_syntax_to_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&ex_d)));
break;
default:
break;
#include <config.h>
-#include "executor.h"
-#include "psppire-data-store.h"
-#include <data/lazy-casereader.h>
-#include <data/procedure.h>
-#include <libpspp/getl.h>
-#include <language/lexer/lexer.h>
-#include <language/command.h>
-#include <output/driver.h>
-#include "psppire-output-window.h"
+#include "ui/gui/executor.h"
+
+#include "data/lazy-casereader.h"
+#include "data/procedure.h"
+#include "language/command.h"
+#include "language/lexer/lexer.h"
+#include "language/syntax-string-source.h"
+#include "libpspp/cast.h"
+#include "libpspp/getl.h"
+#include "output/driver.h"
+#include "ui/gui/psppire-data-store.h"
+#include "ui/gui/psppire-output-window.h"
extern struct dataset *the_dataset;
extern struct source_stream *the_source_stream;
return retval;
}
+
+/* Executes null-terminated string SYNTAX as syntax.
+ Returns SYNTAX. */
+gchar *
+execute_syntax_string (gchar *syntax)
+{
+ execute_const_syntax_string (syntax);
+ return syntax;
+}
+
+/* Executes null-terminated string SYNTAX as syntax. */
+void
+execute_const_syntax_string (const gchar *syntax)
+{
+ execute_syntax (create_syntax_string_source (syntax));
+}
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2009 Free Software Foundation
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation
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
struct getl_interface;
gboolean execute_syntax (struct getl_interface *sss);
-
+gchar *execute_syntax_string (gchar *syntax);
+void execute_const_syntax_string (const gchar *syntax);
#endif
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2009 Free Software Foundation
+ Copyright (C) 2009, 2010 Free Software Foundation
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
#include <config.h>
#include "dialog-common.h"
-#include <language/syntax-string-source.h>
#include <ui/syntax-gen.h>
#include <libpspp/str.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&fd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&fd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&fd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&fd)));
break;
default:
break;
#include <gtk/gtk.h>
#include <stdlib.h>
-#include <language/syntax-string-source.h>
#include <ui/gui/psppire-data-window.h>
#include <ui/gui/dialog-common.h>
#include <ui/gui/dict-display.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&fd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&fd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&fd);
- paste_syntax_to_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&fd)));
break;
default:
break;
return FALSE;
}
-void
-paste_syntax_to_window (const gchar *syntax)
+char *
+paste_syntax_to_window (gchar *syntax)
{
static GtkWidget *the_syntax_pasteboard = NULL;
gtk_text_buffer_end_user_action (buffer);
gtk_widget_show (the_syntax_pasteboard);
+
+ return syntax;
}
#include "gl/configmake.h"
-void paste_syntax_to_window (const gchar *syntax);
+gchar *paste_syntax_to_window (gchar *syntax);
struct fmt_spec;
#include "k-related-dialog.h"
-#include <language/syntax-string-source.h>
-
#include "psppire-dialog.h"
#include "psppire-var-view.h"
#include "psppire-acr.h"
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&krd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&krd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&krd);
- paste_syntax_to_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&krd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 Free Software Foundation
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
#include "psppire-selector.h"
#include "dict-display.h"
-#include <language/syntax-string-source.h>
#include "executor.h"
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&ow);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&ow)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&ow);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&ow)));
break;
default:
break;
#include "psppire-data-editor.h"
#include "psppire-var-sheet.h"
-#include <language/syntax-string-source.h>
#include "psppire-data-store.h"
#include <libpspp/i18n.h>
#include <ui/gui/sheet/psppire-axis.h>
static void
do_sort (PsppireDataStore *ds, int var, gboolean descend)
{
- GString *string = g_string_new ("SORT CASES BY ");
-
const struct variable *v =
psppire_dict_get_variable (ds->dict, var);
+ gchar *syntax;
- g_string_append_printf (string, "%s", var_get_name (v));
-
- if ( descend )
- g_string_append (string, " (D)");
-
- g_string_append (string, ".");
-
- execute_syntax (create_syntax_string_source (string->str));
-
- g_string_free (string, TRUE);
+ syntax = g_strdup_printf ("SORT CASES BY %s%s.",
+ var_get_name (v), descend ? " (D)" : "");
+ g_free (execute_syntax_string (syntax));
}
static void
execute (void)
{
- struct getl_interface *sss = create_syntax_string_source ("EXECUTE.");
-
- execute_syntax (sss);
+ execute_const_syntax_string ("EXECUTE.");
}
static void
gchar *native_file_name = NULL;
gchar *file_name = NULL;
GString *fnx;
- struct getl_interface *sss;
struct string filename ;
PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (w);
+ gchar *syntax;
g_object_get (w, "filename", &file_name, NULL);
syntax_gen_string (&filename, ss_cstr (native_file_name));
g_free (native_file_name);
- if ( de->save_as_portable )
- {
- sss = create_syntax_format_source ("EXPORT OUTFILE=%s.",
- ds_cstr (&filename));
- }
- else
- {
- sss = create_syntax_format_source ("SAVE OUTFILE=%s.",
- ds_cstr (&filename));
- }
+ syntax = g_strdup_printf ("%s OUTFILE=%s.",
+ de->save_as_portable ? "EXPORT" : "SAVE",
+ ds_cstr (&filename));
ds_destroy (&filename);
- execute_syntax (sss);
+ g_free (execute_syntax_string (syntax));
}
static void
display_dict (PsppireDataWindow *de)
{
-
- struct getl_interface *sss =
- create_syntax_string_source ("DISPLAY DICTIONARY.");
-
- execute_syntax (sss);
+ execute_const_syntax_string ("DISPLAY DICTIONARY.");
}
static void
if ( GTK_RESPONSE_ACCEPT == gtk_dialog_run (GTK_DIALOG (dialog)))
{
struct string filename;
- struct getl_interface *sss;
gchar *file_name =
gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
gchar *native_file_name =
convert_glib_filename_to_system_filename (file_name, NULL);
+ gchar *syntax;
+
ds_init_empty (&filename);
syntax_gen_string (&filename, ss_cstr (native_file_name));
g_free (native_file_name);
- sss = create_syntax_format_source ("SYSFILE INFO %s.",
- ds_cstr (&filename));
- execute_syntax (sss);
+ syntax = g_strdup_printf ("SYSFILE INFO %s.", ds_cstr (&filename));
+ g_free (execute_syntax_string (syntax));
}
gtk_widget_destroy (dialog);
static void
new_file (PsppireDataWindow *de)
{
- struct getl_interface *sss =
- create_syntax_string_source ("NEW FILE.");
-
- execute_syntax (sss);
-
+ execute_const_syntax_string ("NEW FILE.");
psppire_window_set_filename (PSPPIRE_WINDOW (de), NULL);
}
if (data_file != NULL)
load_data_file (data_file);
- execute_syntax (create_syntax_string_source (""));
+ execute_const_syntax_string ("");
gtk_widget_show (the_data_window);
}
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 Free Software Foundation
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
#include <gtk/gtk.h>
#include <stdlib.h>
-#include <language/syntax-string-source.h>
#include <ui/gui/psppire-data-window.h>
#include <ui/gui/dialog-common.h>
#include <ui/gui/dict-display.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&rd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&rd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&rd);
- paste_syntax_to_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&rd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2009 Free Software Foundation
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation
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
#include <gtk/gtk.h>
#include <xalloc.h>
-#include <language/syntax-string-source.h>
#include <ui/gui/psppire-data-window.h>
#include <ui/gui/dialog-common.h>
#include <ui/gui/dict-display.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&rd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&rd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&rd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&rd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2008 Free Software Foundation
+ Copyright (C) 2008, 2010 Free Software Foundation
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
#include <gtk/gtk.h>
#include <stdlib.h>
-#include <language/syntax-string-source.h>
#include <ui/gui/psppire-data-window.h>
#include <ui/gui/dialog-common.h>
#include <ui/gui/dict-display.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&rd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&rd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&rd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&rd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2009 Free Software Foundation
+ Copyright (C) 2009, 2010 Free Software Foundation
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
#include <config.h>
#include "dialog-common.h"
-#include <language/syntax-string-source.h>
#include "reliability-dialog.h"
#include "psppire-selector.h"
#include "psppire-dictview.h"
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&rd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&rd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&rd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&rd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2009 Free Software Foundation
+ Copyright (C) 2009, 2010 Free Software Foundation
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
#include <config.h>
#include "dialog-common.h"
-#include <language/syntax-string-source.h>
#include <ui/syntax-gen.h>
#include <libpspp/str.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&rd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&rd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&rd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&rd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 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
#include "dict-display.h"
#include "dialog-common.h"
#include "widget-io.h"
-#include <language/syntax-string-source.h>
#include "helper.h"
#include <xalloc.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&scd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&scd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&scd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&scd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 Free Software Foundation
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
#include "dict-display.h"
#include "psppire-var-view.h"
-#include <language/syntax-string-source.h>
#include "helper.h"
static void
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&scd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&scd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&scd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&scd)));
break;
default:
break;
#include "executor.h"
#include "psppire-data-window.h"
#include "dict-display.h"
-#include <language/syntax-string-source.h>
#include "helper.h"
#include <data/dictionary.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&sfd);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&sfd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&sfd);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&sfd)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2009 Free Software Foundation
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation
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
#include "t-test-options.h"
#include <ui/syntax-gen.h>
-#include <language/syntax-string-source.h>
#include "helper.h"
#include <gl/xalloc.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&tt_d);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&tt_d)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&tt_d);
- paste_syntax_to_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&tt_d)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 Free Software Foundation
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
#include "executor.h"
#include "t-test-options.h"
-#include <language/syntax-string-source.h>
#include <gettext.h>
#define _(msgid) gettext (msgid)
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&tt_d);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&tt_d)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&tt_d);
-
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&tt_d)));
break;
default:
break;
#include <config.h>
#include <gtk/gtk.h>
-#include <language/syntax-string-source.h>
#include "psppire-data-window.h"
#include "psppire-selector.h"
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&tt_d);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&tt_d)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&tt_d);
- paste_syntax_to_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&tt_d)));
break;
default:
break;
#include <config.h>
-#include <gtk/gtk.h>
-
-
-#include "widget-io.h"
-#include "checkbox-treeview.h"
-#include "descriptives-dialog.h"
+#include "ui/gui/text-data-import-dialog.h"
#include <errno.h>
-
#include <gtk-contrib/psppire-sheet.h>
+#include <gtk/gtk.h>
#include <limits.h>
#include <stdlib.h>
#include <sys/stat.h>
-#include <data/data-in.h>
-#include <data/data-out.h>
-#include <data/format-guesser.h>
-#include <data/value-labels.h>
-#include <language/data-io/data-parser.h>
-#include <language/syntax-string-source.h>
-#include <libpspp/assertion.h>
-#include <libpspp/message.h>
-#include <ui/syntax-gen.h>
-#include <ui/gui/psppire-data-window.h>
-#include <ui/gui/dialog-common.h>
-#include <ui/gui/helper.h>
-#include <ui/gui/psppire-dialog.h>
-#include <ui/gui/psppire-var-sheet.h>
-#include <ui/gui/psppire-var-store.h>
-#include "executor.h"
-
-#include "error.h"
-#include "xalloc.h"
+#include "data/data-in.h"
+#include "data/data-out.h"
+#include "data/format-guesser.h"
+#include "data/value-labels.h"
+#include "language/data-io/data-parser.h"
+#include "language/lexer/lexer.h"
+#include "libpspp/assertion.h"
+#include "libpspp/message.h"
+#include "ui/gui/checkbox-treeview.h"
+#include "ui/gui/descriptives-dialog.h"
+#include "ui/gui/dialog-common.h"
+#include "ui/gui/executor.h"
+#include "ui/gui/helper.h"
+#include "ui/gui/psppire-data-window.h"
+#include "ui/gui/psppire-dialog.h"
+#include "ui/gui/psppire-var-sheet.h"
+#include "ui/gui/psppire-var-store.h"
+#include "ui/gui/widget-io.h"
+#include "ui/syntax-gen.h"
+
+#include "gl/error.h"
+#include "gl/xalloc.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
switch (ia->asst.response)
{
case GTK_RESPONSE_APPLY:
- {
- char *syntax = generate_syntax (ia);
- execute_syntax (create_syntax_string_source (syntax));
- free (syntax);
- }
+ free (execute_syntax_string (generate_syntax (ia)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- char *syntax = generate_syntax (ia);
- paste_syntax_to_window (syntax);
- free (syntax);
- }
+ free (paste_syntax_to_window (generate_syntax (ia)));
break;
default:
break;
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2008 Free Software Foundation
+ Copyright (C) 2008, 2010 Free Software Foundation
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
#ifndef TEXT_DATA_IMPORT_DIALOG_H
#define TEXT_DATA_IMPORT_DIALOG_H
-#include <glib-object.h>
+#include <gtk/gtk.h>
-void text_data_import_assistant (GObject *o, gpointer data);
+void text_data_import_assistant (GtkWindow *parent_window);
#endif
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 Free Software Foundation
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
#include "executor.h"
#include "psppire-data-window.h"
#include "dict-display.h"
-#include <language/syntax-string-source.h>
#include "helper.h"
#include "dialog-common.h"
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (dict, xml);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (dict, xml)));
break;
case PSPPIRE_RESPONSE_PASTE:
{
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2009 Free Software Foundation
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation
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
#include <data/variable.h>
#include <data/format.h>
#include <data/value-labels.h>
-#include <language/syntax-string-source.h>
#include <libpspp/i18n.h>
#include "variable-info-dialog.h"
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 Free Software Foundation
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
#include "executor.h"
#include "psppire-data-window.h"
#include "dict-display.h"
-#include <language/syntax-string-source.h>
#include "helper.h"
#include <gtk/gtk.h>
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&wcd);
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (generate_syntax (&wcd)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&wcd);
- paste_syntax_to_window (syntax);
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&wcd)));
break;
default:
break;