Skip to content

Commit d00a512

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Some changes for C90
//-style comments are not allowed in ISO C90 (new gcc defaults).
1 parent 82e78eb commit d00a512

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

Compiler/Template/CodegenC.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3035,7 +3035,7 @@ template functionXXX_system_HPCOM(list<SimEqSystem> derivativEquations, String n
30353035
{
30363036
}
30373037

3038-
//using type: <%type%>
3038+
/* using type: <%type%> */
30393039
void function<%name%>_system<%n%>(DATA *data, threadData_t *threadData)
30403040
{
30413041
<%taskEqs%>
@@ -3048,7 +3048,7 @@ template functionXXX_system_HPCOM(list<SimEqSystem> derivativEquations, String n
30483048
{
30493049
}
30503050

3051-
//using type: <%type%>
3051+
/* using type: <%type%> */
30523052
void function<%name%>_system<%n%>(DATA *data, threadData_t *threadData)
30533053
{
30543054
int fail=0;
@@ -3076,7 +3076,7 @@ template functionXXX_system_HPCOM(list<SimEqSystem> derivativEquations, String n
30763076
{
30773077
}
30783078

3079-
//using type: <%type%>
3079+
/* using type: <%type%> */
30803080
static int initialized = 0;
30813081
void function<%name%>_system<%n%>(DATA *data, threadData_t *threadData)
30823082
{
@@ -3131,7 +3131,7 @@ template functionXXX_system_HPCOM(list<SimEqSystem> derivativEquations, String n
31313131

31323132
<%threadFuncs%>
31333133

3134-
//using type: <%type%>
3134+
/* using type: <%type%> */
31353135
static int initialized = 0;
31363136
void function<%name%>_system<%n%>(DATA *data, threadData_t *threadData)
31373137
{
@@ -3192,7 +3192,7 @@ template functionXXX_system_HPCOM(list<SimEqSystem> derivativEquations, String n
31923192

31933193
<%threadFuncs%>
31943194

3195-
//using type: <%type%>
3195+
/* using type: <%type%> */
31963196
static int initialized = 0;
31973197
void function<%name%>_system<%n%>(DATA *data, threadData_t *threadData)
31983198
{

SimulationRuntime/c/simulation/solver/embedded_server.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ extern "C" {
3939

4040
extern void* (*embedded_server_init)(DATA *data, double tout, double step, const char *argv_0, void (*omc_real_time_sync_update)(DATA *data, double scaling));
4141
extern void (*embedded_server_deinit)(void *handle);
42-
// Tells the embedded server that a simulation step has passed; the server
43-
// can read/write values from/to the simulator
42+
/* Tells the embedded server that a simulation step has passed; the server
43+
* can read/write values from/to the simulator
44+
*/
4445
extern void (*embedded_server_update)(void *handle, double tout);
4546
/* Give the filename or generic name to use for loading an embedded server */
4647
extern void* embedded_server_load_functions(const char *name);

SimulationRuntime/c/simulation/solver/perform_qss_simulation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ static modelica_integer getStatesInDer(const unsigned int* index, const unsigned
530530
/* stackPointer refers to the next free position for der[i] in StatesInDer */
531531
StatesInDer[ der[i] ][ stackPointer[ der[i] ] ] = k;
532532
stackPointer[ der[i] ]++;
533-
der[i] = -1; // clear all
533+
der[i] = -1; /* clear all */
534534
}
535535
}
536536

SimulationRuntime/c/util/rational.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
extern "C" {
3636
#endif
3737

38-
// m/n
38+
/* m/n */
3939
typedef struct RATIONAL {
4040
long m;
4141
long n;

SimulationRuntime/c/util/rtclock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static inline double rt_tock(int ix) {return 0.0;}
6767
#define SIM_PROF_TICK_FN(ix) rt_tick(ix+SIM_TIMER_FIRST_FUNCTION)
6868
#define SIM_PROF_ACC_FN(ix) rt_accumulate(ix+SIM_TIMER_FIRST_FUNCTION)
6969

70-
//These functions are used for profileBlocks, not for equations
70+
/* These functions are used for profileBlocks, not for equations */
7171
#define SIM_PROF_TICK_EQ(ix) rt_tick(ix+SIM_TIMER_FIRST_FUNCTION+data->modelData->modelDataXml.nFunctions)
7272
#define SIM_PROF_ACC_EQ(ix) rt_accumulate(ix+SIM_TIMER_FIRST_FUNCTION+data->modelData->modelDataXml.nFunctions)
7373
#define SIM_PROF_ADD_NCALL_EQ(ix,num) rt_add_ncall(ix+SIM_TIMER_FIRST_FUNCTION+data->modelData->modelDataXml.nFunctions,num)

0 commit comments

Comments
 (0)