Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
Revert "add xml root element for logFormat=xml"
Browse files Browse the repository at this point in the history
This reverts commit c98026b.
  • Loading branch information
Willi Braun authored and OpenModelica-Hudson committed Oct 27, 2016
1 parent 183b510 commit 5c6c19f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
4 changes: 0 additions & 4 deletions SimulationRuntime/c/simulation/simulation_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,10 +953,6 @@ int _main_SimulationRuntime(int argc, char**argv, DATA *data, threadData_t *thre

data->callback->callExternalObjectDestructors(data, threadData);
deInitializeDataStruc(data);

/* in case of xml log format close root element messages */
messagesCloseXMLroot();

fflush(NULL);
MMC_CATCH_INTERNAL(globalJumpBuffer)

Expand Down
22 changes: 0 additions & 22 deletions SimulationRuntime/c/util/omc_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,30 +263,8 @@ void messageText(int type, int stream, int indentNext, char *msg, int subline, c
if (indentNext) level[stream]++;
}

static int printXMLrootNode = 0;

static void messagesXMLroot()
{
fputs("<messages>\n", stdout);
fflush(stdout);
}

void messagesCloseXMLroot()
{
if (printXMLrootNode){
fputs("</messages>\n", stdout);
fflush(stdout);
}
}

void messageXML(int type, int stream, int indentNext, char *msg, int subline, const int *indexes)
{
/* print xml root node */
if(!printXMLrootNode){
messagesXMLroot();
printXMLrootNode = 1;
}

printf("<message stream=\"%s\" type=\"%s\" text=\"", LOG_STREAM_NAME[stream], LOG_TYPE_DESC[type]);
printEscapedXML(msg);
if (indexes) {
Expand Down
1 change: 0 additions & 1 deletion SimulationRuntime/c/util/omc_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ extern int showAllWarnings;
extern char logBuffer[2048];

void setStreamPrintXML(int isXML);
void messagesCloseXMLroot();

#define ACTIVE_STREAM(stream) (useStream[stream])
#define ACTIVE_WARNING_STREAM(stream) (showAllWarnings || useStream[stream])
Expand Down

0 comments on commit 5c6c19f

Please sign in to comment.