#include <default.c>
#include <acknex.h> // Pure Mode
void ediag(STRING* fctName, STRING* level, STRING* diagStr, var param) {
STRING* outputStr = str_create("");
if (fctName != NULL) {
str_cat(outputStr, "[");
str_cat(outputStr, fctName);
str_cat(outputStr, "]: ");
}
str_cat(outputStr, diagStr);
if (param == NULL) {
diag(outputStr);
} else {
diag_var(outputStr, param);
}
}
void main() {
diag("\n");
STRING* fctName = "void main()";
STRING* LEVEL_INFO = "INFO";
int i;
for(i=0; i < 5; i++) {
ediag(fctName, LEVEL_INFO, "test: %3.0f\n", i);
}
}