Skip to content

Commit

Permalink
- Make code pretty
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8500 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 5, 2011
1 parent 6c26094 commit 3235bfe
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions c_runtime/fmu_model_interface.c
Expand Up @@ -180,7 +180,7 @@ fmiStatus fmiSetReal(fmiComponent c, const fmiValueReference vr[], size_t nvr, c
if (comp->loggingOn) comp->functions.logger(c, comp->instanceName, fmiOK, "log",
"fmiSetReal: #r%d# = %.16g", vr[i], value[i]);
if (setReal(comp, vr[i],value[i]) != fmiOK) // to be implemented by the includer of this file
return fmiError;
return fmiError;
}
comp->outputsvalid = fmiFalse;
comp->eventInfo.stateValuesChanged = fmiTrue;
Expand All @@ -204,7 +204,7 @@ fmiStatus fmiSetInteger(fmiComponent c, const fmiValueReference vr[], size_t nvr
if (comp->loggingOn) comp->functions.logger(c, comp->instanceName, fmiOK, "log",
"fmiSetInteger: #i%d# = %d", vr[i], value[i]);
if (setInteger(comp, vr[i],value[i]) != fmiOK) // to be implemented by the includer of this file
return fmiError;
return fmiError;
}
comp->outputsvalid = fmiFalse;
comp->eventInfo.stateValuesChanged = fmiTrue;
Expand All @@ -228,7 +228,7 @@ fmiStatus fmiSetBoolean(fmiComponent c, const fmiValueReference vr[], size_t nvr
if (comp->loggingOn) comp->functions.logger(c, comp->instanceName, fmiOK, "log",
"fmiSetBoolean: #b%d# = %s", vr[i], value[i] ? "true" : "false");
if (setBoolean(comp, vr[i],value[i]) != fmiOK) // to be implemented by the includer of this file
return fmiError;
return fmiError;
}
comp->outputsvalid = fmiFalse;
comp->eventInfo.stateValuesChanged = fmiTrue;
Expand Down Expand Up @@ -298,7 +298,7 @@ fmiStatus fmiSetContinuousStates(fmiComponent c, const fmiReal x[], size_t nx){
"fmiSetContinuousStates: #r%d#=%.16g", vr, x[i]);
assert(vr>=0 && vr<NUMBER_OF_REALS);
if (setReal(comp, vr,x[i]) != fmiOK) // to be implemented by the includer of this file
return fmiError;
return fmiError;
}
#endif
return fmiOK;
Expand Down Expand Up @@ -705,7 +705,7 @@ fmiStatus fmiSetExternalFunction(fmiComponent c, fmiValueReference vr[], size_t
if (vrOutOfRange(comp, "fmiSetExternalFunction", vr[i], NUMBER_OF_EXTERNALFUNCTIONS))
return fmiError;
if (setExternalFunction(comp, vr[i],value[i]) != fmiOK) // to be implemented by the includer of this file
return fmiError;
return fmiError;
}
return fmiOK;
};
Expand Down
2 changes: 1 addition & 1 deletion c_runtime/integer_array.c
Expand Up @@ -161,7 +161,7 @@ void copy_integer_array(integer_array_t *source, integer_array_t *dest)

inline int integer_le(int x, int y)
{
return (x <= y);
return (x <= y);
}

inline int integer_ge(int x, int y)
Expand Down
4 changes: 2 additions & 2 deletions c_runtime/java_interface.c
Expand Up @@ -701,7 +701,7 @@ jobject mmc_to_jobject(JNIEnv* env, void* mmc)

if (numslots>0 && ctor > 1) { /* RECORD */
jobject rec_map;
struct record_description* desc = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(mmc),1));
struct record_description* desc = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(mmc),1));
rec_map = NewJavaMap(env);
if (numslots == 1 && desc == NULL) {
return NewJavaRecord(env, "***output record***", -2, rec_map);
Expand Down Expand Up @@ -733,7 +733,7 @@ jobject mmc_to_jobject(JNIEnv* env, void* mmc)
}

if (numslots==2 && ctor==1) { /* CONS-PAIR; Tested, but not in OMC. */
jobject arr = NewJavaArray(env);
jobject arr = NewJavaArray(env);
while (!MMC_NILTEST(mmc)) {
JavaArrayAdd(env, arr, mmc_to_jobject(env, MMC_CAR(mmc)));
mmc = MMC_CDR(mmc);
Expand Down
2 changes: 1 addition & 1 deletion c_runtime/read_write.c
Expand Up @@ -666,7 +666,7 @@ int read_modelica_record_helper(type_description **descptr, va_list *arg)
for (e = 0; e < desc->data.record.elements; ++e) {
switch (elem->type) {
case TYPE_DESC_NONE:
return -1;
return -1;
case TYPE_DESC_REAL:
read_modelica_real(&elem, va_arg(*arg, modelica_real *));
break;
Expand Down
4 changes: 2 additions & 2 deletions c_runtime/read_write.h
Expand Up @@ -126,8 +126,8 @@ void write_modelica_fnptr(type_description *, modelica_fnptr *);
int read_modelica_metatype(type_description **, modelica_metatype*);
void write_modelica_metatype(type_description *, modelica_metatype*);

int read_modelica_record(type_description **, ...);
void write_modelica_record(type_description *, void *, ...);
int read_modelica_record(type_description **, ...);
void write_modelica_record(type_description *, void *, ...);

void write_noretcall(type_description *);

Expand Down
2 changes: 1 addition & 1 deletion c_runtime/simulation_init.cpp
Expand Up @@ -189,7 +189,7 @@ int simplex_initialization(long& nz,double *z)
leastSquare(&nz,z,&funcValue);
if (funcValue > SIMP) {
printf("Error in initialization. Solver iterated %d times without finding a solution\n",(int)MAXF);
return -1;
return -1;
}
} else if(IFAULT == 2 ) {
printf("Error in initialization. Inconsistent initial conditions.\n");
Expand Down
2 changes: 1 addition & 1 deletion c_runtime/simulation_result_mat.h
Expand Up @@ -53,7 +53,7 @@ class simulation_result_mat : public simulation_result {
virtual ~simulation_result_mat();
virtual void emit();
virtual const char* result_type() {
//return "Dymosim's compatible MAT-file";
//return "Dymosim's compatible MAT-file";
return "mat";
}
private:
Expand Down
4 changes: 2 additions & 2 deletions c_runtime/tables.cpp
Expand Up @@ -382,7 +382,7 @@ class TextFile : public FileWrapper {
trim(hdr,hLen);

if (strncmp("double",hdr,std::min((size_t)6,hLen)) != 0)
return false;
return false;
trim(hdr += 6, hLen -= 6);

for(size_t len = 1; len < hLen; ++len)
Expand Down Expand Up @@ -433,7 +433,7 @@ class MatFile : public FileWrapper {
public:
static FileWrapper* create(const std::string& fileName)
{
return new MatFile(fileName);
return new MatFile(fileName);
}
MatFile(const std::string& fileName):filename(fileName)
{
Expand Down

0 comments on commit 3235bfe

Please sign in to comment.