Skip to content

Commit

Permalink
- FMI-Import: changed name of the generated file
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10283 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Willi Braun committed Nov 3, 2011
1 parent b9e6581 commit ba6258d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions FMI/import/source/moGenerator.c
Expand Up @@ -12,7 +12,7 @@
#define QUOTEME(x) QUOTEME_(x)
#define _DEBUG_ 1
#define PRINT_INFORMATION
#define _DEBUG_MODELICA 1
// #define _DEBUG_MODELICA 1
// end

// mocro for error message print
Expand Down Expand Up @@ -426,7 +426,7 @@ void instScalarVariable(ModelDescription* md,fmiScalarVariable* list){
* functions that returns the variable naming convention
*/
fmiNamingConvention getNamingConvention(ModelDescription* md, Att att){
ValueStatus vs = valueIllegal;
ValueStatus vs;
Enu enu;
fmiNamingConvention nconv;
enu = getEnumValue(md,att_variableNamingConvention,&vs);
Expand Down Expand Up @@ -475,9 +475,10 @@ void tmpcodegen(fmuModelDescription* fmuMD, const char* decompPath){
char * id;

size_t len = strlen(fmuMD->mid)+strlen(decompPath);
id = (char*) malloc(len+4);
id = (char*) malloc(len+14);
strcpy(id,decompPath);
strcat(id,fmuMD->mid);
strcat(id,"FMUImport");
strcat(id,".mo");

#ifdef _DEBUG_
Expand Down Expand Up @@ -593,9 +594,10 @@ void blockcodegen(fmuModelDescription* fmuMD, const char* decompPath, const char
// double Tolerance = 0.0001;

size_t len = strlen(fmuMD->mid)+strlen(decompPath);
id = (char*) malloc(len+4);
id = (char*) malloc(len+14);
strcpy(id,decompPath);
strcat(id,fmuMD->mid);
strcat(id,"FMUImport");
strcat(id,".mo");

pfile = fopen(id,"a+");
Expand Down

0 comments on commit ba6258d

Please sign in to comment.