equal
deleted
inserted
replaced
1502 symbol->fblock_body->accept(*inlinedecl); |
1502 symbol->fblock_body->accept(*inlinedecl); |
1503 delete inlinedecl; |
1503 delete inlinedecl; |
1504 |
1504 |
1505 /* (B) Constructor */ |
1505 /* (B) Constructor */ |
1506 /* (B.1) Constructor name... */ |
1506 /* (B.1) Constructor name... */ |
1507 s4o.print(s4o.indent_spaces + "void "); |
1507 s4o.print(s4o.indent_spaces + "static void "); |
1508 symbol->fblock_name->accept(*this); |
1508 symbol->fblock_name->accept(*this); |
1509 s4o.print(FB_INIT_SUFFIX); |
1509 s4o.print(FB_INIT_SUFFIX); |
1510 s4o.print("("); |
1510 s4o.print("("); |
1511 |
1511 |
1512 /* first and only parameter is a pointer to the data */ |
1512 /* first and only parameter is a pointer to the data */ |
1549 sfcdecl->generate(symbol->fblock_body, generate_c_sfcdecl_c::actiondef_sd); |
1549 sfcdecl->generate(symbol->fblock_body, generate_c_sfcdecl_c::actiondef_sd); |
1550 |
1550 |
1551 /* (C.3) Function declaration */ |
1551 /* (C.3) Function declaration */ |
1552 s4o.print("// Code part\n"); |
1552 s4o.print("// Code part\n"); |
1553 /* function interface */ |
1553 /* function interface */ |
1554 s4o.print("void "); |
1554 s4o.print("static void "); |
1555 symbol->fblock_name->accept(*this); |
1555 symbol->fblock_name->accept(*this); |
1556 s4o.print(FB_FUNCTION_SUFFIX); |
1556 s4o.print(FB_FUNCTION_SUFFIX); |
1557 s4o.print("("); |
1557 s4o.print("("); |
1558 /* first and only parameter is a pointer to the data */ |
1558 /* first and only parameter is a pointer to the data */ |
1559 symbol->fblock_name->accept(*this); |
1559 symbol->fblock_name->accept(*this); |
1692 symbol->function_block_body->accept(*inlinedecl); |
1692 symbol->function_block_body->accept(*inlinedecl); |
1693 delete inlinedecl; |
1693 delete inlinedecl; |
1694 |
1694 |
1695 /* (B) Constructor */ |
1695 /* (B) Constructor */ |
1696 /* (B.1) Constructor name... */ |
1696 /* (B.1) Constructor name... */ |
1697 s4o.print(s4o.indent_spaces + "void "); |
1697 s4o.print(s4o.indent_spaces + "static void "); |
1698 symbol->program_type_name->accept(*this); |
1698 symbol->program_type_name->accept(*this); |
1699 s4o.print(FB_INIT_SUFFIX); |
1699 s4o.print(FB_INIT_SUFFIX); |
1700 s4o.print("("); |
1700 s4o.print("("); |
1701 |
1701 |
1702 /* first and only parameter is a pointer to the data */ |
1702 /* first and only parameter is a pointer to the data */ |
1736 sfcdecl->generate(symbol->function_block_body, generate_c_sfcdecl_c::actiondef_sd); |
1736 sfcdecl->generate(symbol->function_block_body, generate_c_sfcdecl_c::actiondef_sd); |
1737 |
1737 |
1738 /* (C.3) Function declaration */ |
1738 /* (C.3) Function declaration */ |
1739 s4o.print("// Code part\n"); |
1739 s4o.print("// Code part\n"); |
1740 /* function interface */ |
1740 /* function interface */ |
1741 s4o.print("void "); |
1741 s4o.print("static void "); |
1742 symbol->program_type_name->accept(*this); |
1742 symbol->program_type_name->accept(*this); |
1743 s4o.print(FB_FUNCTION_SUFFIX); |
1743 s4o.print(FB_FUNCTION_SUFFIX); |
1744 s4o.print("("); |
1744 s4o.print("("); |
1745 /* first and only parameter is a pointer to the data */ |
1745 /* first and only parameter is a pointer to the data */ |
1746 symbol->program_type_name->accept(*this); |
1746 symbol->program_type_name->accept(*this); |
1871 generate_c_vardecl_c::global_vt, |
1871 generate_c_vardecl_c::global_vt, |
1872 symbol->configuration_name); |
1872 symbol->configuration_name); |
1873 vardecl->print(symbol); |
1873 vardecl->print(symbol); |
1874 delete vardecl; |
1874 delete vardecl; |
1875 s4o.print("\n"); |
1875 s4o.print("\n"); |
|
1876 |
|
1877 /* (A.3) POUs inclusion */ |
|
1878 s4o.print("#include \"POUS.c\"\n\n"); |
1876 |
1879 |
1877 /* (A.3) Declare global prototypes in include file */ |
1880 /* (A.3) Declare global prototypes in include file */ |
1878 vardecl = new generate_c_vardecl_c(&s4o_incl, |
1881 vardecl = new generate_c_vardecl_c(&s4o_incl, |
1879 generate_c_vardecl_c::globalprototype_vf, |
1882 generate_c_vardecl_c::globalprototype_vf, |
1880 generate_c_vardecl_c::global_vt, |
1883 generate_c_vardecl_c::global_vt, |