Skip to content

Commit

Permalink
-Added Algorithm.isReinitStatement
Browse files Browse the repository at this point in the history
-Fixed compilation of systemimpl.c for Visual Studio (All declarations at beginning of block for ANSI-C)


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6429 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Oct 19, 2010
1 parent 12078b9 commit d5dbc8d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Compiler/Algorithm.mo
Expand Up @@ -79,6 +79,16 @@ algorithm
end matchcontinue;
end algorithmEmpty;

public function isReinitStatement "returns true if statement is a reinit"
input Statement stmt;
output Boolean res;
algorithm
res := matchcontinue(stmt)
case(DAE.STMT_REINIT(var = _)) then true;
case(_) then false;
end matchcontinue;
end isReinitStatement;

public function splitReinits ""
input list<Algorithm> inAlgs;
output list<Algorithm> reinits;
Expand Down
4 changes: 3 additions & 1 deletion Compiler/runtime/systemimpl.c
Expand Up @@ -40,6 +40,7 @@
#include <shlwapi.h>
#endif


/*
* Common includes
*/
Expand Down Expand Up @@ -2219,8 +2220,9 @@ RML_BEGIN_LABEL(System__getUUIDStr)
{
char outStr[36];
char *uuidStr;
memset(&uuidStr,0,sizeof(char)*36);
UUID uuid;
memset(&uuidStr,0,sizeof(char)*36);

if (UuidCreate(&uuid) == RPC_S_OK)
UuidToString(&uuid, (unsigned char **)(&uuidStr));
uuidStr[36] = '\0';
Expand Down

0 comments on commit d5dbc8d

Please sign in to comment.