scan: New library for high-level PSPP syntax lexical analysis.
[pspp-builds.git] / src / libpspp / msg-locator.c
index 09550e29ac9c802def722eb8269d50efb9ab726d..d29f35db9375cca79dfe6a572f0ad55fd87fd15f 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 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
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
+
+#include "libpspp/msg-locator.h"
+
 #include <stdlib.h>
-#include "msg-locator.h"
-#include <libpspp/message.h>
-#include <libpspp/assertion.h>
-#include "getl.h"
 
-#include "xalloc.h"
+#include "libpspp/assertion.h"
+#include "libpspp/cast.h"
+#include "libpspp/message.h"
+#include "libpspp/getl.h"
+
+#include "gl/xalloc.h"
 
 /* File locator stack. */
 static const struct msg_locator **file_loc;
@@ -77,7 +81,7 @@ get_msg_location (const struct source_stream *ss, struct msg_locator *loc)
     }
   else
     {
-      loc->file_name = getl_source_name (ss);
+      loc->file_name = CONST_CAST (char *, getl_source_name (ss));
       loc->line_number = getl_source_location (ss);
     }
 }