Skip to content

Commit

Permalink
Fix for #2879:
Browse files Browse the repository at this point in the history
- Fixed Absyn, SCode and DAE dumping of multiline comments.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22703 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Oct 9, 2014
1 parent a5b51b6 commit bf0ffe2
Show file tree
Hide file tree
Showing 6 changed files with 544 additions and 378 deletions.
9 changes: 9 additions & 0 deletions Compiler/FrontEnd/ModelicaBuiltin.mo
Expand Up @@ -1530,6 +1530,15 @@ external "builtin" annotation(__OpenModelica_Impure=true,Documentation(info="<ht
</html>"));
end compareFilesAndMove;

impure function compareFiles
input String file1;
input String file2;
output Boolean isEqual;
external "builtin" annotation(__OpenModelica_Impure=true,Documentation(info="<html>
<p>Compares <i>file1</i> and <i>file2</i> and returns true if their content is equal, otherwise false.</p>
</html>"));
end compareFiles;

impure function alarm
input Integer seconds;
output Integer previousSeconds;
Expand Down
6 changes: 6 additions & 0 deletions Compiler/Script/CevalScript.mo
Expand Up @@ -1931,6 +1931,12 @@ algorithm
then
(cache,Values.BOOL(false),st);

case (cache,_,"compareFiles",{Values.STRING(str1),Values.STRING(str2)},st,_)
equation
b = System.fileContentsEqual(str1,str2);
then
(cache,Values.BOOL(b),st);

case (cache,_,"compareFilesAndMove",{Values.STRING(str1),Values.STRING(str2)},st,_)
equation
true = System.regularFileExists(str1);
Expand Down

0 comments on commit bf0ffe2

Please sign in to comment.