1 | #include <stdio.h> |
---|---|
2 | #include <stdlib.h> |
3 | #include <string.h> |
4 | |
5 | #include "present.h" |
6 | #include "to-be-removed.h" |
7 | |
8 | const int main_const_data = 5; |
9 | int main_dirty_data = 10; |
10 | int main(int argc, char **argv) { |
11 | |
12 | to_be_removed_init(in: argc); |
13 | present_init(in: argc); |
14 | main_dirty_data += argc; |
15 | |
16 | char *heap_buf = (char *)malloc(size: 80); |
17 | strcpy(dest: heap_buf, src: "this is a string on the heap"); |
18 | |
19 | return to_be_removed(main_heap_buf: heap_buf, main_const_data, main_dirty_data); |
20 | } |
21 |