Rename procedure.[ch] to dataset.[ch].
[pspp-builds.git] / src / language / data-io / get.c
index cf59c8e0fbadc78f904fe9049d84341c5bf04e60..1b63e75ad8cc3cf6bb2a8ec6c575b167ea4a4d62 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2010, 2011 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 <stdlib.h>
 
-#include <data/any-reader.h>
-#include <data/case.h>
-#include <data/case-map.h>
-#include <data/casereader.h>
-#include <data/dictionary.h>
-#include <data/por-file-writer.h>
-#include <data/procedure.h>
-#include <language/command.h>
-#include <language/data-io/file-handle.h>
-#include <language/data-io/trim.h>
-#include <language/lexer/lexer.h>
-#include <libpspp/compiler.h>
-#include <libpspp/misc.h>
-#include <libpspp/str.h>
-
-#include "xalloc.h"
+#include "data/any-reader.h"
+#include "data/case-map.h"
+#include "data/case.h"
+#include "data/casereader.h"
+#include "data/dataset.h"
+#include "data/dictionary.h"
+#include "data/por-file-writer.h"
+#include "language/command.h"
+#include "language/data-io/file-handle.h"
+#include "language/data-io/trim.h"
+#include "language/lexer/lexer.h"
+#include "libpspp/compiler.h"
+#include "libpspp/misc.h"
+#include "libpspp/str.h"
+
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -75,11 +75,11 @@ parse_read_command (struct lexer *lexer, struct dataset *ds, enum reader_command
 
   for (;;)
     {
-      lex_match (lexer, '/');
+      lex_match (lexer, T_SLASH);
 
       if (lex_match_id (lexer, "FILE") || lex_is_string (lexer))
        {
-         lex_match (lexer, '=');
+         lex_match (lexer, T_EQUALS);
 
           fh_unref (fh);
          fh = fh_parse (lexer, FH_REF_FILE | FH_REF_SCRATCH);
@@ -88,7 +88,7 @@ parse_read_command (struct lexer *lexer, struct dataset *ds, enum reader_command
        }
       else if (type == IMPORT_CMD && lex_match_id (lexer, "TYPE"))
        {
-         lex_match (lexer, '=');
+         lex_match (lexer, T_EQUALS);
 
          if (lex_match_id (lexer, "COMM"))
            type = PFM_COMM;
@@ -116,9 +116,9 @@ parse_read_command (struct lexer *lexer, struct dataset *ds, enum reader_command
 
   case_map_prepare_dict (dict);
 
-  while (lex_token (lexer) != '.')
+  while (lex_token (lexer) != T_ENDCMD)
     {
-      lex_match (lexer, '/');
+      lex_match (lexer, T_SLASH);
       if (!parse_dict_trim (lexer, dict))
         goto error;
     }