From: John Darrington Date: Sat, 13 Aug 2016 06:30:07 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/master' into sheet X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1131cd88a0beb1311d9ae064b9dc14d556e52c07;hp=b8a262a5ea1c5011eeb42d72365620f53ee1a7bc;p=pspp Merge remote-tracking branch 'origin/master' into sheet --- diff --git a/NEWS b/NEWS index 0b87edb31a..883590541e 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,9 @@ Please send PSPP bug reports to bug-gnu-pspp@gnu.org. Changes from 0.10.2 to 0.10.4: - * Updated to Gtk+3.14.5 + * Gtk+3.14.5 or later must now be used when building. + + * The AUTORECODE command now accepts an optional / before INTO. Changes from 0.10.1 to 0.10.2: diff --git a/src/language/stats/autorecode.c b/src/language/stats/autorecode.c index dc357f7c44..d3c5864c22 100644 --- a/src/language/stats/autorecode.c +++ b/src/language/stats/autorecode.c @@ -153,6 +153,7 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds) if (!parse_variables_const (lexer, dict, &src_vars, &n_srcs, PV_NO_DUPLICATE | PV_NO_SCRATCH)) goto error; + lex_match (lexer, T_SLASH); if (!lex_force_match_id (lexer, "INTO")) goto error; lex_match (lexer, T_EQUALS); diff --git a/src/ui/gui/main.c b/src/ui/gui/main.c index 4716b1fa4d..6b908e0fe7 100644 --- a/src/ui/gui/main.c +++ b/src/ui/gui/main.c @@ -57,8 +57,8 @@ show_version_and_exit () return TRUE; } - + gboolean init_prepare (GSource * source, gint * timeout_) @@ -139,20 +139,29 @@ static gint on_local_options (GApplication * application, GVariantDict * options, gpointer user_data) { - GVariant *b; - - b = - g_variant_dict_lookup_value (options, "no-splash", - G_VARIANT_TYPE_BOOLEAN); - if (b) - { + { + GVariant *b = + g_variant_dict_lookup_value (options, "no-unique", + G_VARIANT_TYPE_BOOLEAN); + if (b) + { + GApplicationFlags flags = g_application_get_flags (application); + flags |= G_APPLICATION_NON_UNIQUE; + g_application_set_flags (application, flags); + g_variant_unref (b); + } + } + { + GVariant *b = + g_variant_dict_lookup_value (options, "no-splash", + G_VARIANT_TYPE_BOOLEAN); + if (b) g_variant_unref (b); - } - else - { + else start_time = g_get_monotonic_time (); - } + } + return -1; } @@ -248,7 +257,7 @@ process_pre_start_arguments (int *argc, char ***argv) { GOptionEntry oe[] = { {"version", 'V', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, - show_version_and_exit, "Show version information and exit", 0}, + show_version_and_exit, N_("Show version information and exit"), 0}, {NULL} }; @@ -270,7 +279,9 @@ main (int argc, char *argv[]) GOptionEntry oe[] = { {"no-splash", 'q', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL, - "Do not display the splash screen", 0}, + N_("Do not display the splash screen"), 0}, + {"no-unique", 'n', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL, + N_("Do not attempt single instance negotiation"), 0}, {NULL} }; diff --git a/tests/language/stats/autorecode.at b/tests/language/stats/autorecode.at index 6a8ff8e731..52c56a8582 100644 --- a/tests/language/stats/autorecode.at +++ b/tests/language/stats/autorecode.at @@ -272,3 +272,36 @@ asdfk,0,2.00,. @&t@ asdfk,1,2.00,. @&t@ ]) AT_CLEANUP + + +dnl For compatibility, make sure that /INTO (with leading slash) is accepted +dnl (bug #48762) +AT_SETUP([AUTORECODE with /INTO]) +AT_DATA([autorecode.sps], + [data list list notable /x . +begin data. +1 +8 +-901 +4 +1 +99 +8 +end data. + +autorecode x /into y. + +list. +]) +AT_CHECK([pspp -O format=csv autorecode.sps], [0], +[Table: Data List +x,y +1.00,2.00 +8.00,4.00 +-901.00,1.00 +4.00,3.00 +1.00,2.00 +99.00,5.00 +8.00,4.00 +]) +AT_CLEANUP