Commit 24cc29e9 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Corrected C include macros to allow 2006 and 2014 to be

used in the program.
parent 3f91b127
......@@ -187,8 +187,8 @@ aspect C_CodeGen {
out.println("*/");
env.println("");
env.println("");
env.println("#ifndef __LABCOMM_" + env.lcName + "_H__");
env.println("#define __LABCOMM_" + env.lcName + "_H__");
env.println("#ifndef __LABCOMM2006_" + env.lcName + "_H__");
env.println("#define __LABCOMM2006_" + env.lcName + "_H__");
env.println("");
// Include
......@@ -270,18 +270,20 @@ aspect C_Type {
}
public void TypeDecl.C_emitType(C_env env) {
env.println("#ifndef PREDEFINED_" + env.prefix + getName());
env.println("#ifndef LABCOMM_DEFINED_" + env.prefix + getName());
env.print("typedef ");
getType().C_emitType(env, env.prefix + getName());
env.println(";");
env.println("#define LABCOMM_DEFINED_" + env.prefix + getName());
env.println("#endif");
}
public void SampleDecl.C_emitType(C_env env) {
env.println("#ifndef PREDEFINED_" + env.prefix + getName());
env.println("#ifndef LABCOMM_DEFINED_" + env.prefix + getName());
env.print("typedef ");
getType().C_emitType(env, env.prefix + getName());
env.println(";");
env.println("#define LABCOMM_DEFINED_" + env.prefix + getName());
env.println("#endif");
env.println("extern const struct labcomm"+env.verStr+"_signature " +
"*labcomm"+env.verStr+"_signature_" + env.prefix + getName() +
......
......@@ -270,18 +270,20 @@ aspect C_Type {
}
public void TypeDecl.C_emitType(C_env env) {
env.println("#ifndef PREDEFINED_" + env.prefix + getName());
env.println("#ifndef LABCOMM_DEFINED_" + env.prefix + getName());
env.print("typedef ");
getType().C_emitType(env, env.prefix + getName());
env.println(";");
env.println("#define LABCOMM_DEFINED_" + env.prefix + getName());
env.println("#endif");
}
public void SampleDecl.C_emitType(C_env env) {
env.println("#ifndef PREDEFINED_" + env.prefix + getName());
env.println("#ifndef LABCOMM_DEFINED_" + env.prefix + getName());
env.print("typedef ");
getType().C_emitType(env, env.prefix + getName());
env.println(";");
env.println("#define LABCOMM_DEFINED_" + env.prefix + getName());
env.println("#endif");
env.println("extern const struct labcomm"+env.verStr+"_signature " +
"*labcomm"+env.verStr+"_signature_" + env.prefix + getName() +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment