X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fget.c;h=2440bd900b9d2ee01fcfac78342f70f88004c36b;hb=e441137bbe19f41edbc87dd51ecd2a8e4396cf6d;hp=9a788a01e3a67922ddad51177cadef6cefbbb418;hpb=63c7521729b947ace9e192dff9330813ecfb5812;p=pspp diff --git a/src/language/data-io/get.c b/src/language/data-io/get.c index 9a788a01e3..2440bd900b 100644 --- a/src/language/data-io/get.c +++ b/src/language/data-io/get.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006, 2007, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006-2007, 2010-15 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 @@ -31,6 +31,7 @@ #include "language/lexer/lexer.h" #include "libpspp/compiler.h" #include "libpspp/misc.h" +#include "libpspp/message.h" #include "libpspp/str.h" #include "gl/xalloc.h" @@ -126,6 +127,13 @@ parse_read_command (struct lexer *lexer, struct dataset *ds, if (reader == NULL) goto error; + if (dict_get_var_cnt (dict) == 0) + { + msg (SE, _("%s: Data file dictionary has no variables."), + fh_get_name (fh)); + goto error; + } + stage = case_map_stage_create (dict); while (lex_token (lexer) != T_ENDCMD)