datatomfile: fix the name of the .mod file at the top of the generated file

With the new layout of the files generated by the preprocessor, it would always
print “driver.m”, which is not very informative.
time-shift
Sébastien Villemot 2020-01-29 17:05:37 +01:00
parent d527096e61
commit 6542ce4a16
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 2 additions and 3 deletions

View File

@ -17,7 +17,7 @@ function datatomfile (s, var_list, names)
% provided, all the variables as defined in M_.endo_names will be saved in
% the generated m file.
% Copyright (C) 2001-2018 Dynare Team
% Copyright (C) 2001-2020 Dynare Team
%
% This file is part of Dynare.
%
@ -68,8 +68,7 @@ for i=1:n
ivar(i) = i_tmp;
end
end
stack = dbstack;
fprintf(fid,'%% Dataset generated by %s.\n',stack(2).file);
fprintf(fid,'%% Dataset generated by %s.mod\n',M_.fname);
fprintf(fid,['%% ' datestr(now,0) '\n']);
% Save the selected data.
for i = 1:n