1 #include "../ctu-hdr.h" 2 3 int callback_to_main(int x); 4 int f(int x) { 5 return x - 1; 6 } 7 8 int g(int x) { 9 return callback_to_main(x) + 1; 10 } 11 12 int h_chain(int); 13 14 int h(int x) { 15 return 2 * h_chain(x); 16 } 17 18 namespace myns { 19 int fns(int x) { 20 return x + 7; 21 } 22 23 namespace embed_ns { 24 int fens(int x) { 25 return x - 3; 26 } 27 } // namespace embed_ns 28 29 class embed_cls { 30 public: 31 int fecl(int x); 32 }; 33 int embed_cls::fecl(int x) { 34 return x - 7; 35 } 36 } // namespace myns 37 38 class mycls { 39 public: 40 int fcl(int x); 41 static int fscl(int x); 42 43 class embed_cls2 { 44 public: 45 int fecl2(int x); 46 }; 47 }; 48 49 int mycls::fcl(int x) { 50 return x + 5; 51 } 52 int mycls::fscl(int x) { 53 return x + 6; 54 } 55 int mycls::embed_cls2::fecl2(int x) { 56 return x - 11; 57 } 58 59 namespace chns { 60 int chf2(int x); 61 62 class chcls { 63 public: 64 int chf4(int x); 65 }; 66 67 int chf3(int x) { 68 return chcls().chf4(x); 69 } 70 71 int chf1(int x) { 72 return chf2(x); 73 } 74 } 75 76 typedef struct { int n; } Anonymous; 77 int fun_using_anon_struct(int n) { Anonymous anon; anon.n = n; return anon.n; } 78 79 int other_macro_diag(int x) { 80 MACRODIAG(); 81 return x; 82 } 83