Delete trailing whitespace at end of lines.
[pspp-builds.git] / src / language / utilities / include.c
index c812c97238a9588fddf3586ed366766248372f92..c3a34456d3cc825c1a2dc0552c2a7447d1c9105f 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
@@ -36,6 +35,7 @@
 int
 cmd_include (struct lexer *lexer, struct dataset *ds UNUSED)
 {
+  struct source_stream *ss;
   char *found_fn;
   char *target_fn;
 
@@ -44,25 +44,24 @@ cmd_include (struct lexer *lexer, struct dataset *ds UNUSED)
     lex_match (lexer, '=');
 
   /* File name can be identifier or string. */
-  if (lex_token (lexer) != T_ID && lex_token (lexer) != T_STRING) 
+  if (lex_token (lexer) != T_ID && lex_token (lexer) != T_STRING)
     {
-      lex_error (lexer, _("expecting file name")); 
+      lex_error (lexer, _("expecting file name"));
       return CMD_CASCADING_FAILURE;
     }
 
   target_fn = ds_cstr (lex_tokstr (lexer));
 
-  found_fn = fn_search_path (target_fn,
-                            getl_include_path (),
-                            NULL);
+  ss = lex_get_source_stream (lexer);
+  found_fn = fn_search_path (target_fn, getl_include_path ( ss ));
 
-  if (found_fn != NULL) 
+  if (found_fn != NULL)
     {
-      getl_include_source (create_syntax_file_source (found_fn));
-      free (found_fn); 
+      getl_include_source (ss, create_syntax_file_source (found_fn));
+      free (found_fn);
     }
   else
-    msg (SE, _("Can't find `%s' in include file search path."), 
+    msg (SE, _("Can't find `%s' in include file search path."),
         target_fn);
 
   lex_get (lexer);