Skip to content

Commit

Permalink
- Added clearDebugFlags scripting function for consistency.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17676 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Oct 14, 2013
1 parent 747b923 commit e0dc550
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Compiler/FrontEnd/ModelicaBuiltin.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,13 @@ algorithm
annotation(__OpenModelica_EarlyInline = true, preferredView="text");
end setDebugFlags;

function clearDebugFlags
"Resets all debug flags to their default values."
output Boolean success;
external "builtin";
annotation(preferredView="text");
end clearDebugFlags;

function setPreOptModules "example input: removeFinalParameters,removeSimpleEquations,expandDerOperator"
input String modules;
output Boolean success;
Expand Down Expand Up @@ -1308,7 +1315,7 @@ annotation(preferredView="text");
end setCommandLineOptions;

function clearCommandLineOptions
"Resets all commdand-line flags to their default values."
"Resets all command-line flags to their default values."
output Boolean success;
external "builtin";
annotation(preferredView="text");
Expand Down
9 changes: 9 additions & 0 deletions Compiler/Script/CevalScript.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,15 @@ algorithm
case (cache,env,"clearCommandLineOptions",_,st,_)
then (cache,Values.BOOL(false),st);

case (cache,env,"clearDebugFlags",_,st,_)
equation
Flags.resetDebugFlags();
then
(cache,Values.BOOL(true),st);

case (cache,env,"clearDebugFlags",_,st,_)
then (cache,Values.BOOL(false),st);

case (cache,env,"cd",{Values.STRING("")},st,_)
equation
str_1 = System.pwd();
Expand Down

0 comments on commit e0dc550

Please sign in to comment.