We are using a single member in struct file_handle, the "name"
[pspp-builds.git] / src / language / control / repeat.c
index 286cc347098e397c40ce587b346ab5922d494a2e..69a29a82085c98f77e26e68ad0f5e941e47b256f 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -328,8 +327,13 @@ parse_lines (struct lexer *lexer, struct repeat_block *block)
       lex_preprocess_line (&text, syntax,
                            &command_ends_before_line,
                            &command_ends_after_line);
-      if (recognize_do_repeat (ds_ss (&text)))
-        nesting_level++;
+      if (recognize_do_repeat (ds_ss (&text))) 
+        {
+          if (get_syntax () == COMPATIBLE)
+            msg (SE, _("DO REPEAT may not nest in compatibility mode."));
+          else
+            nesting_level++; 
+        }
       else if (recognize_end_repeat (ds_ss (&text), &block->print)
                && nesting_level-- == 0)
         {